Unable to wipe encrypted GN - Samsung Galaxy Nexus

Recovery: ClockworkMod 5.5.0.2
ROM: MCR Ir4
So, I've had my GN for about 5 days now, and wanted to experiment with the device encryption option. So, I followed the steps, and let the phone do it's thing, and an hour later it was encrypted. Now when the phone boots, it shows the boot animation, then prompts for the passcode, then remounts the unencrypted partitions as expected.
So, I starting having a look at how this impacts the usability, and now I have a bit of a problem. Firstly, as (at least) the whole /data partition is encrypted, it's not possible to access the 'sd card' from recovery, meaning that it's not possible to either create a backup or restore from one (as CWM can't mount the sdcard to do so). On realising this, I decided that I was done experimenting, and wanted to go back to the unencrypted state. How? Well, I can't.
If you go back to the security menu, the area that was used to start encryption is grayed out...it seems to have been a one-way process. At the time it mentionted that the only way to access the device if the encrytion passcode was lost would be to do a Factory Reset, so, this was what I tried next. The device restarted, showed the android with his front open and the cog on display for a few seconds, then restarted again, but took me back to where I was before - the wipe had not occurred.
Next, I tried to do a wipe from CWM - here I at least got a bit more feedback as to what was going on. It seems CWM needs to mount a given partition before it can wipe it, and as it can't do that, it couldn't wipe anything, so that didn't achieve anything either.
So, I'm now in a position where I have an encrypted device that I can't wipe, either through the normal factory reset in the Android UI, or via CWM recovery. I know that the collective smarts of this forum is a power to be reconed with, and as I've now reached the limits of my knowledge of working with this kind of thing, I'm hoping someone will be able to help me out.
My thinking so far: As the suggested method of recovering from an encrypted state is to do a factory reset, it would suggest that there is either
a) a bug in ICS that isn't handling the wipe of an encrypted device correctly
b) an incompatibility with CWM that is conflicting with the OS' ability to execute the wipe (as CWM can't interact with the encrypted partitions)
c) a bug in Paul's MCR ROM (much less likely IMO)
I hope that all makes sense, and that someone has some thoughts on where to go from here - thanks!

Flash stock images through fast boot?
Sent from my Galaxy Nexus using xda premium

I've just been reading up on fastboot since posting (I think I've only ever used it via other people's scripts before), and assuming that it can overcome the problem, I was thinking that maybe it would be able to do the wipe (though obviously I don't want to end up with a £500 paperweight...)
If I were to flash a stock image, how would I go about that? (It's been a long time since I've loaded a rom not via a recovery)
EDIT: Going to try a manual nandroid restore (from a backup made just before encrypting) as described here - http://wiki.cyanogenmod.com/wiki/Fastboot

Ok, flashed a stock image and back to factory state again so now all working (phew) - thankful I was doing this on a Nexus device where fastboot was easily available.
While this has solved the problem, it didn't really identify the cause - I'd be curious to hear of others' experiences with using the encryption in 3.0+.

Please keep questions out of the development section. Thank you
Sent from the MIUI powered 3d

jayharper08 said:
Please keep questions out of the development section. Thank you
Sent from the MIUI powered 3d
Click to expand...
Click to collapse
Apologies - posted here as thought it could have been development related (Possible CWM/MCR bug).

Don Vincenzo said:
Apologies - posted here as thought it could have been development related (Possible CWM/MCR bug).
Click to expand...
Click to collapse
No worries. Dev section is just for strictly developed roms and kernels and such. No biggie
Wish I could help you with the answer though :/
Sent from the MIUI powered 3d

Don Vincenzo said:
Recovery: ClockworkMod 5.5.0.2
ROM: MCR Ir4
So, I've had my GN for about 5 days now, and wanted to experiment with the device encryption option. So, I followed the steps, and let the phone do it's thing, and an hour later it was encrypted. Now when the phone boots, it shows the boot animation, then prompts for the passcode, then remounts the unencrypted partitions as expected.
So, I starting having a look at how this impacts the usability, and now I have a bit of a problem. Firstly, as (at least) the whole /data partition is encrypted, it's not possible to access the 'sd card' from recovery, meaning that it's not possible to either create a backup or restore from one (as CWM can't mount the sdcard to do so). On realising this, I decided that I was done experimenting, and wanted to go back to the unencrypted state. How? Well, I can't.
If you go back to the security menu, the area that was used to start encryption is grayed out...it seems to have been a one-way process. At the time it mentionted that the only way to access the device if the encrytion passcode was lost would be to do a Factory Reset, so, this was what I tried next. The device restarted, showed the android with his front open and the cog on display for a few seconds, then restarted again, but took me back to where I was before - the wipe had not occurred.
Next, I tried to do a wipe from CWM - here I at least got a bit more feedback as to what was going on. It seems CWM needs to mount a given partition before it can wipe it, and as it can't do that, it couldn't wipe anything, so that didn't achieve anything either.
So, I'm now in a position where I have an encrypted device that I can't wipe, either through the normal factory reset in the Android UI, or via CWM recovery. I know that the collective smarts of this forum is a power to be reconed with, and as I've now reached the limits of my knowledge of working with this kind of thing, I'm hoping someone will be able to help me out.
My thinking so far: As the suggested method of recovering from an encrypted state is to do a factory reset, it would suggest that there is either
a) a bug in ICS that isn't handling the wipe of an encrypted device correctly
b) an incompatibility with CWM that is conflicting with the OS' ability to execute the wipe (as CWM can't interact with the encrypted partitions)
c) a bug in Paul's MCR ROM (much less likely IMO)
I hope that all makes sense, and that someone has some thoughts on where to go from here - thanks!
Click to expand...
Click to collapse
just connect via adb in recovery and format it via mkfs.ext4...

and... then what? Once the partition is formatted - it seems it would need to be populated? Or does some subsequent restoration - once the /data partition is accessible - will re-create any files / folder structure in this filesystem?

Related

Problems with /data and unintentional encryption

Hey xda mates,
I'm having a huge problem at the moment with my HTC M8 (from T-Mobile if that may help). I may have accidentally "bricked" my phone because of an error of misclicking when trying to install a new ROM and restore my settings. Something weird must have occurred after trying to restore my Device ID using Titanium Backup. After doing a suggested reboot, my phone locked itself up and seemed to have encrypted the storage, asking me for a password to unencrypt the phone. I've tried factory resetting my phone however I have huge issues when trying to reset everything.
Despite going into PhilZ's Recovery and trying to clean up all the previous data, I cannot properly accomplish it because my /data partition seems to be locked or unavailable. When specifically trying to Format /data in Recovery, it gives me an error that it cannot be mounted or accessed. I've tried installing another ROM and formatting again but nothing seems to work. Does anyone have any idea on how to fix this issue?
I would really appreciate any help or tips you guys can give me!
This happened to me yesterday running CM11. I followed the instructions in the below post and they allowed me to get my phone back to a functional state, albeit losing everything since my last backup.
http://forum.xda-developers.com/showpost.php?p=52961209&postcount=682&nocache=1&z=2188268828464220
I ended up sideloading KANGAKAT and it's been great.
http://forum.xda-developers.com/showthread.php?t=2709097
Good luck!
killcake said:
This happened to me yesterday running CM11. I followed the instructions in the below post and they allowed me to get my phone back to a functional state, albeit losing everything since my last backup.
http://forum.xda-developers.com/showpost.php?p=52961209&postcount=682&nocache=1&z=2188268828464220
I ended up sideloading KANGAKAT and it's been great.
http://forum.xda-developers.com/showthread.php?t=2709097
Good luck!
Click to expand...
Click to collapse
Oh my goodness! Thank you so much! It has worked as directed, took me a bit longer because I didn't follow the directions as is. For those of you who may also face this problem I've copied the directions down below formatted a bit more cleanly.
[with credit to user pjim]
Use the HTC Tool Kit from here. You may already have it installed because this is how you likely rooted your phone.
1: Go into Recovery and Format system.
2: Still in recovery, go to "Install Zip" then choose "Install zip from sideload"
3: Use the Toolkit to flash a ROM that could be smaller than 900mb by going into the "ADB" button and then choosing a ROM from the File Path, then clicking "Sideload"
4: Once it's finished installing, let it boot, and let your phone boot into the password screen as well.
5: Power back down and then go back into Recovery.
6: Go to the "Mounts and Storage Menu," scroll down and then select "format /data and /data/media (/sdcard)"
7: Reboot into a new clean phone.
Extra note: Make sure you always back-up your data in case of problems that arise like this! Although I have a feeling that this may have also arisen as a result of having S-ON, so maybe doing S-OFF should prevent this, though I could be wrong.
lightrapid said:
Oh my goodness! Thank you so much! It has worked as directed, took me a bit longer because I didn't follow the directions as is. For those of you who may also face this problem I've copied the directions down below formatted a bit more cleanly.
[with credit to user pjim]
Use the HTC Tool Kit from here. You may already have it installed because this is how you likely rooted your phone.
1: Go into Recovery and Format system.
2: Still in recovery, go to "Install Zip" then choose "Install zip from sideload"
3: Use the Toolkit to flash a ROM that could be smaller than 900mb by going into the "ADB" button and then choosing a ROM from the File Path, then clicking "Sideload"
4: Once it's finished installing, let it boot, and let your phone boot into the password screen as well.
5: Power back down and then go back into Recovery.
6: Go to the "Mounts and Storage Menu," scroll down and then select "format /data and /data/media (/sdcard)"
7: Reboot into a new clean phone.
Extra note: Make sure you always back-up your data in case of problems that arise like this! Although I have a feeling that this may have also arisen as a result of having S-ON, so maybe doing S-OFF should prevent this, though I could be wrong.
Click to expand...
Click to collapse
Just out of curiosity, did you flash an AOSP ROM when this encryption thing happened(As mentioned by you in first post) ? I know the second poster here did flash AOSP (Cyanogenmod)
Perhaps could have tried the suggestion in opening post here .
Oh well, good that your device works again anyways.

[SCRIPT] (Depreciated) Wipe Encrypted Data Without Wiping Internal Storage

Update: The latest TWRP is already capable of decrypting data. This method is now unnecessary and depreciated. Use factory reset in TWRP menu instead
Disclaimer: This mod will wipe your data. I am not responsible for data loss after using this mod.
I tested on my device several times, it's working for me so internal storage is always preserved, but I cannot guarantee if anything is messed up on your side. Please read the post carefully before using this mod!
Always backup your important data before modifying your phone's software!
To compensate the mistake I have done in the modified SuperSU script (I fixed it eventually though ), I decided to release a mod I consider quite useful for most people.
I've used the 10 for quite some time, and I've been messing with it from day 1.
Since the encryption is required for the phone to have proper radio signal (more info here), we are forced to keep our devices encrypted.
And because HTC uses proprietary encryption method, TWRP is unable to decrypt our data partition, which causes the recovery unable to read anything from data.
This is actually quite a big problem. If you want to full wipe and clean flash your favorite custom rom, the "Factory Reset" option in TWRP is not available, so you are forced to wipe the whole data partition, which will cause all your personal files stored in internal storage to be removed.
If you're a flashaholic like I am, you are forced not to store anything important in the phone storage because it will be wiped every time trying to clean flash a rom.
To breakthrough this inconvenience, I created this flashable zip to accomplish something similar to the "Factory Reset" option in TWRP.
Requirement: You have to use the systemless root of SuperSU to use this mod. If you want to flash the wipe script with SuperSU, flash SuperSU first, then flash the wipe script.
Important: If you have chosen "Require PIN/password/pattern to start device" in the "Secure startup" page during the initial setup, you CANNOT use this mod!
If you have to enter your PIN/password/pattern before your device booted up, this means that you have secure startup enabled. You CANNOT use this mod!
If secure startup is enabled and you flash this zip, your encryption will be messed up and you will have to format the whole data partition eventually to make your phone working again.
After flashing the mod, your data will not be wiped immediately in recovery because we cannot do so. It will wipe the data AFTER you rebooted back to system. It will reboot again after the wipe is done. If you flashed SuperSU at the same time with this mod, you will experience 2 consecutive reboot loops. This is normal behavior, don't panic.
If devs are interested in including this zip into your rom, you can use it in the same way as SuperSU:
Code:
package_extract_dir("wipe", "/tmp/wipe");
run_program("/sbin/busybox", "unzip", "/tmp/wipe/wipe.zip", "META-INF/com/google/android/*", "-d", "/tmp/wipe");
run_program("/sbin/busybox", "sh", "/tmp/wipe/META-INF/com/google/android/update-binary", "dummy", "1", "/tmp/wipe/wipe.zip");
For those who are interested in what this zip actually do, here is a brief explanation:
If secure startup is disabled, data will be decrypted as soon as the device booted up. We can only access data after it is decrypted. So our only choice is to wipe data after the device has booted up.
I created a script to wipe all data except SuperSU app, su binary image, and your internal storage.
SuperSU will automatically run scripts inside the directory /su/su.d, so after putting the script into the folder, SuperSU will the wipe script at boot time.
The problem is: su.img is also located in /data, how can we push files into the image? Fortunately, our master Chainfire has thought of this problem. The image /cache/su.img will be merged with /data/su.img during boot. So I just need to place the script into /cache/su.img, then Chainfire's script will do all the rest of the work automatically. If you're interested in the merging process, take a look at launch_daemonsu.sh in the ramdisk of a SuperSU modified boot for more details.
Is this helpful in regards to initial routing and flashing a rom or only afterwards to flash a new one?
topjohnwu said:
Disclaimer: This mod will wipe your data. I am not responsible for data loss after using this mod.
I tested on my device several times, it's working for me so internal storage is always preserved, but I cannot guarantee if anything is messed up on your side. Please read the post carefully before using this mod!
Always backup your important data before modifying your phone's software!
To compensate the mistake I have done in the modified SuperSU script (I fixed it eventually though ), I decided to release a mod I consider quite useful for most people.
I've used the 10 for quite some time, and I've been messing with it from day 1.
Since the encryption is required for the phone to have proper radio signal (more info here), we are forced to keep our devices encrypted.
And because HTC uses proprietary encryption method, TWRP is unable to decrypt our data partition, which causes the recovery unable to read anything from data.
This is actually quite a big problem. If you want to full wipe and clean flash your favorite custom rom, the "Factory Reset" option in TWRP is not available, so you are forced to wipe the whole data partition, which will cause all your personal files stored in internal storage to be removed.
If you're a flashaholic like I am, you are forced not to store anything important in the phone storage because it will be wiped every time trying to clean flash a rom.
To breakthrough this inconvenience, I created this flashable zip to accomplish something similar to the "Factory Reset" option in TWRP.
Requirement: You have to use the systemless root of SuperSU to use this mod. If you want to flash the wipe script with SuperSU, flash SuperSU first, then flash the wipe script.
Important: If you have chosen "Require PIN/password/pattern to start device" in the "Secure startup" page during the initial setup, you CANNOT use this mod!
If you have to enter your PIN/password/pattern before your device booted up, this means that you have secure startup enabled. You CANNOT use this mod!
If secure startup is enabled and you flash this zip, your encryption will be messed up and you will have to format the whole data partition eventually to make your phone working again.
After flashing the mod, your data will not be wiped immediately in recovery because we cannot do so. It will wipe the data AFTER you rebooted back to system. It will reboot again after the wipe is done. If you flashed SuperSU at the same time with this mod, you will experience 2 consecutive reboot loops. This is normal behavior, don't panic.
If devs are interested in including this zip into your rom, you can use it in the same way as SuperSU:
Code:
package_extract_dir("wipe", "/tmp/wipe");
run_program("/sbin/busybox", "unzip", "/tmp/wipe/wipe.zip", "META-INF/com/google/android/*", "-d", "/tmp/wipe");
run_program("/sbin/busybox", "sh", "/tmp/wipe/META-INF/com/google/android/update-binary", "dummy", "1", "/tmp/wipe/wipe.zip");
For those who are interested in what this zip actually do, here is a brief explanation:
If secure startup is disabled, data will be decrypted as soon as the device booted up. We can only access data after it is decrypted. So our only choice is to wipe data after the device has booted up.
I created a script to wipe all data except SuperSU app, su binary image, and your internal storage.
SuperSU will automatically run scripts inside the directory /su/su.d, so after putting the script into the folder, SuperSU will the wipe script at boot time.
The problem is: su.img is also located in /data, how can we push files into the image? Fortunately, our master Chainfire has thought of this problem. The image /cache/su.img will be merged with /data/su.img during boot. So I just need to place the script into /cache/su.img, then Chainfire's script will do all the rest of the work automatically. If you're interested in the merging process, take a look at launch_daemonsu.sh in the ramdisk of a SuperSU modified boot for more details.
Click to expand...
Click to collapse
Is the systemless one the one you patched?
Sent from my LG-H830 using XDA-Developers mobile app
stonew5082 said:
Is this helpful in regards to initial routing and flashing a rom or only afterwards to flash a new one?
Click to expand...
Click to collapse
It functions the same as "Factory Reset" in TWRP, which means it will wipe all data, but your personal files stored in internal storage will remain on the device.
StickyEyez said:
Is the systemless one the one you patched?
Sent from my LG-H830 using XDA-Developers mobile app
Click to expand...
Click to collapse
Actually you can use the original version. But I suggest you to use my patched one, in case you accidentally wiped your whole data partition (this mod will not do this), you will stay encrypted, and your data signal will be fine
Hi topjohnwu
@ jollywhitefoot suggested you might be able to help to wipe userdata from download mode.
My phone will not get passed message "Your phones is encrypted" "TO DECRYPT YOUR PHONE. ENTER YOUR SCREEN LOCK PASSWORD" I had no screen lock password... i have different passwords to decrypt . Each time i put a password in it resest phone and does factory rest and then reboots straight into Bootloader again.
Phone has no recovery " Failed to boot into recovery mode" red writing on a black screen.
Phoned has OEM Relocked ....cant fastboot or unlock bootloader again
Please can you help
tailor999 said:
Hi topjohnwu
@ jollywhitefoot suggested you might be able to help to wipe userdata from download mode.
My phone will not get passed message "Your phones is encrypted" "TO DECRYPT YOUR PHONE. ENTER YOUR SCREEN LOCK PASSWORD" I had no screen lock password... i have different passwords to decrypt . Each time i put a password in it resest phone and does factory rest and then reboots straight into Bootloader again.
Phone has no recovery " Failed to boot into recovery mode" red writing on a black screen.
Phoned has OEM Relocked ....cant fastboot or unlock bootloader again
Please can you help
Click to expand...
Click to collapse
You can try to unlock your bootloader again.
If you cannot unlock it, then I regret to say that your phone might be doomed.
Never try to relock your phone if it's not in 100% stock condition and perfectly working.
topjohnwu said:
You can try to unlock your bootloader again.
If you cannot unlock it, then I regret to say that your phone might be doomed.
Never try to relock your phone if it's not in 100% stock condition and perfectly working.
Click to expand...
Click to collapse
I have tried unlocking boot loader again. The log shows oem needs to be unlocked.
When a RUU comes out, would that help recover the phone?
Sent from my ONE A2003 using XDA-Developers mobile app
tailor999 said:
Hi topjohnwu
@ jollywhitefoot suggested you might be able to help to wipe userdata from download mode.
My phone will not get passed message "Your phones is encrypted" "TO DECRYPT YOUR PHONE. ENTER YOUR SCREEN LOCK PASSWORD" I had no screen lock password... i have different passwords to decrypt . Each time i put a password in it resest phone and does factory rest and then reboots straight into Bootloader again.
Phone has no recovery " Failed to boot into recovery mode" red writing on a black screen.
Phoned has OEM Relocked ....cant fastboot or unlock bootloader again
Please can you help
Click to expand...
Click to collapse
Assuming you have a stock recovery image..
Boot to bootloader then recovery.
Long press power for a few seconds then tap volume up.
You can then factory reset in stock recovery
LeeDroid said:
Assuming you have a stock recovery image..
Boot to bootloader then recovery.
Long press power for a few seconds then tap volume up.
You can then factory reset in stock recovery
Click to expand...
Click to collapse
Oh dam it, just seen your post a bit late. Car phone warehouse has just collected my handset :silly: - im sure they'll send it back saying ive lost warranty :crying:
tailor999 said:
Oh dam it, just seen your post a bit late. Car phone warehouse has just collected my handset :silly: - im sure they'll send it back saying ive lost warranty :crying:
Click to expand...
Click to collapse
Oh dear....
topjohnwu said:
Requirement: You have to use the systemless root of SuperSU to use this mod. If you want to flash the wipe script with SuperSU, flash SuperSU first, then flash the wipe script.
Important: If you have chosen "Require PIN/password/pattern to start device" in the "Secure startup" page during the initial setup, you CANNOT use this mod!
If you have to enter your PIN/password/pattern before your device booted up, this means that you have secure startup enabled. You CANNOT use this mod!
If secure startup is enabled and you flash this zip, your encryption will be messed up and you will have to format the whole data partition eventually to make your phone working again.
Click to expand...
Click to collapse
the thing is i have selected no for secure boot but whenever i setup a fingerprint and boot then it gets enabled again even if i had disabled it...
any way around or am i missing on something.. currently on lee's rom
SacredDeviL666 said:
the thing is i have selected no for secure boot but whenever i setup a fingerprint and boot then it gets enabled again even if i had disabled it...
any way around or am i missing on something.. currently on lee's rom
Click to expand...
Click to collapse
you're talking about something different that he is. secure boot is a pin before you ever get the system loaded. you are talking about lockscreen pin/password, which, is mandatory if you use fingerprint scanner.
jollywhitefoot said:
you're talking about something different that he is. secure boot is a pin before you ever get the system loaded. you are talking about lockscreen pin/password, which, is mandatory if you use fingerprint scanner.
Click to expand...
Click to collapse
cool thank you...
I'm confused a bit. So every time I want to clean flash a rom, I can flash this script and it will wipe everything (system, data, cache etc.) except internal storage? Would dirty flashing a rom have any affect?
Ndaoud360 said:
I'm confused a bit. So every time I want to clean flash a rom, I can flash this script and it will wipe everything (system, data, cache etc.) except internal storage? Would dirty flashing a rom have any affect?
Click to expand...
Click to collapse
+1
Ndaoud360 said:
I'm confused a bit. So every time I want to clean flash a rom, I can flash this script and it will wipe everything (system, data, cache etc.) except internal storage? Would dirty flashing a rom have any affect?
Click to expand...
Click to collapse
It will only wipe data without internal storage.
You should flash this zip after you flash a rom.
It will wipe data after the device boots up.
topjohnwu said:
It will only wipe data without internal storage.
You should flash this zip after you flash a rom.
It will wipe data after the device boots up.
Click to expand...
Click to collapse
Ok so the process would be wipe system, cache, flash rom, flash data wipe script?
Ndaoud360 said:
Ok so the process would be wipe system, cache, flash rom, flash data wipe script?
Click to expand...
Click to collapse
Why would you wipe system this will be done by the rom installation, just flash the rom then flash the script & job done
LeeDroid said:
Why would you wipe system this will be done by the rom installation, just flash the rom then flash the script & job done
Click to expand...
Click to collapse
huh? Ever since I began rooting phones, I would wipe system, data and cache before a clean flash of a rom. I guess I never knew the rom does it for you. I thought the rom just over wrote the system possibly leaving remnants of the old system which could lead to issues which is why devs advise to full wipe when switching roms.
Ndaoud360 said:
huh? Ever since I began rooting phones, I would wipe system, data and cache before a clean flash of a rom. I guess I never knew the rom does it for you. I thought the rom just over wrote the system possibly leaving remnants of the old system which could lead to issues which is why devs advise to full wipe when switching roms.
Click to expand...
Click to collapse
Ah, a full wipe is only applicable to data buddy, if a rom dev doesn't wipe system before their installation, they need a good slap with a frozen kipper.
Cache is entirely optional

How To re-encrypt my OnePlus 3 ?

Hello,
I am a happy owner of OnePlus 3 and at the beginning when I got this Smartphone and run it, I had to set-up a Pin which was also used for Encryption,
due to the decision that I wanted to change it, I have tried numerous things to do this, either via System -> Security, System -> Lock Screen or TWRP Recovery.
Then I have stumbled upon a wiping feature in TWRP. (TWRP Menu -> Wipe) where there was a couple of options like Advanced Wipe, Format Data and Swipe to Factory Reset. So I have
decided to see what Format Data does which showed me the following statement before I continued with it "Format Data will wipe all of your apps, backups, pictures, videos, media and
removes encryption on internal storage". Well when it said it removes the encryption I have proceeded because at this point where all of the methods failed I wanted to remove and
re-encrypt my OnePlus 3 again in order to change my encrypting pin. Ok, cool this worked perfectly except that now I can't restore my original rom or encrypt my OnePlus 3 again ....
Then I have flashed CyanogenMod 13 Nightly from August (The latest one on the CyanogenMod website) and when I went into System -> Security there was Encrypt button instead of saying
Encrypted at the top of the menu then I have played around with setting up a new Pin/Password and when I went throug all the process at the end the following happens within a few
seconds: a green dissasembled android shows then screen turns black and returns to lock screen. I checked if OnePlus 3 is encrypted and is not. This is not the normal as usually
encrypting takes some time.
Also, I have tried to restore my original rom which came with my smartphone and was encrypted, when I restored it, OnePlus 3 stucks on the first screen showing OnePlus logo on the
middle of the screen and text "Powered by Android" on the bottom of the screen.
I presume that CyanogenMod 13 encryption is broken or that I shouldn't have format Data ?
Is there any way that I can encrypt my smartphone again ?
P.S I know that OnePlus 3 encryption is handled by Hardware.
You can try downloading the official OxygenOS ROM, flashing it and trying to encrypt again. Last I tried doing it on Sultan's CM13, it didn't work, so it might be a CM problem.
As per my knowledge, if you flash stock OxygenOS rom and also be on stock oneplus recovery. Performing a Factory Reset will automatically encrypt your device again. But you must be on stock recovery + stock kernel + stock rom in order for it to work.
abhibnl said:
As per my knowledge, if you flash stock OxygenOS rom and also be on stock oneplus recovery. Performing a Factory Reset will automatically encrypt your device again. But you must be on stock recovery + stock kernel + stock rom in order for it to work.
Click to expand...
Click to collapse
Why do I need to be on stock recovery ?
Won't TWRP work just fine ?
formating data with TWRP -28 will decrypt your phone, it's madethis way so it can work on beta 9 and f2fs ...
that said i had encrypted device before on CM
so if you're not using beta 9 and your data partition is not f2fs, you can have an ecrypted device, the easiest way is to sideload official rom 3.2.8 (make sure you're on stock recovery and start adb sideload from there) , after the sideload the phone will be encrypted, if you're staying at MM, fastboot TWRP .22 or 23 or just the official in case .28 decrypts the phone.
Gliop022 said:
Why do I need to be on stock recovery ?
Won't TWRP work just fine ?
Click to expand...
Click to collapse
Well man i want you be on as much safe side as possible. When you perform factory data reset on stock recovery, it will wipe and reformat your internal memory as well. TWRP only wipes data partition, and you need to format whole internal memory manually. But stock is recommended for full compatibility.
Ok, I have finally re-encrypted my smartphone.
So for the future people who have the same problem as I have, do the following:
SIDE NOTE: You don't need to unroot anything, just re-flash original Oxygen OS and go forwards from there
1) Download Oxygen OS from official website (downloads.oneplus.net)
2) Copy it over to internal storage
3) Enter Recovery Mode => Volume Down + Power Button
4) Flash downloaded .zip file via Recovery Mode (SIDE NOTE: The flashing progress might look like it have a loop but it takes a little bit of time to flash it, more than CyanogenMod anyway).
5) Now, after you have flashed the system .zip file and rebooted your smarpthone, it will take some time to load so don't panic that you have stuck in bootloop as it again, takes some time to load the first time.
SIDE NOTE: My suspicions are that it takes some time to flash and run the first time because it needs to set-up some encryption parameters or something like that but I might be wrong.
6) Then when you finally get to the wizard screen and go through the initial setup like wi-fi, sim card etc, the system will ask you if you want to protect device before it turns on, you choose yes and type your PIN or Password. After that step your smartphone is successfully encrypted again, enjoy !
Gliop022 said:
Ok, I have finally re-encrypted my smartphone.
So for the future people who have the same problem as I have, do the following:
SIDE NOTE: You don't need to unroot anything, just re-flash original Oxygen OS and go forwards from there
1) Download Oxygen OS from official website (downloads.oneplus.net)
2) Copy it over to internal storage
3) Enter Recovery Mode => Volume Down + Power Button
4) Flash downloaded .zip file via Recovery Mode (SIDE NOTE: The flashing progress might look like it have a loop but it takes a little bit of time to flash it, more than CyanogenMod anyway).
5) Now, after you have flashed the system .zip file and rebooted your smarpthone, it will take some time to load so don't panic that you have stuck in bootloop as it again, takes some time to load the first time.
SIDE NOTE: My suspicions are that it takes some time to flash and run the first time because it needs to set-up some encryption parameters or something like that but I might be wrong.
6) Then when you finally get to the wizard screen and go through the initial setup like wi-fi, sim card etc, the system will ask you if you want to protect device before it turns on, you choose yes and type your PIN or Password. After that step your smartphone is successfully encrypted again, enjoy !
Click to expand...
Click to collapse
Hello Gliop022,
Do you know if flashing OxygenOs stock from TWRP 3.1.0 encrypts the phone or do I have to be on stock recovery?
Then once the phone is encrypted, are you able to flash an OOS based ROM (e.g. FreedomOs) and keep the encryption?

How to fully decrypt G3 (d855)?

Hello
After rooting my G3, I installed an AOSP-based custom rom via TWRP. Then later on, encrypted the phone (& sdcard).
Recently, decided to install a LG stock-based rom (Clean Rom 2.8), but can't get passed a white screen asking for a password at first boot. This appears to be something to do with encryption? (From what I recall, there's no password to set when encrypting the phone). I factory-wiped, and wiped via advanced options of TWRP before installing this rom, so thought the phone has been decrypted.
After reading around, I tried flashing the latest LineageOS rom, and it worked fine. Notably, the phone indicates it's still encrypted! though the sdcard isn't as I can access it outside of the phone. I read about this problem with some ROMs not being able to boot past a password/white screen, but CM/LineageOS not having this issue.
Anyhow, how do I fully decrypt the LG phone? I've read various advice, but confused (especially about bootloaders).
Any help appreciated.
I dont own the device right now (in the future i wil) but i think i can help u whit that.... (it happened me with other phones)
The thing is if you have encription in the phone the only way to dencrypt the device is format the data partition through twrp THIS WILL ERASE ALL OF YOUR FILES LIKE PHOTOS AND MUSIC PLEASE DO A BACKUP BEFORE TRYING THIS
Boot to twrp, press the wipe button, in the wipe screen you will see a button that say "Format data" (in the top corner above the switch saying "swipe to factory reset") then twrp ask you to type yes, you do it and this will format the data partition erasing the files and the encription....
For the sd is the same but you can do it from a computer if you want or other way
I hope that this can help u

Stuck in boot loop - need magisk_patched file Pixel 2 XL (QQ3A.200805.001, Aug 2020)

Dear XDA-Developers, after installing August 2020 update for my Pixel 2 XL and possibly applying incorrect Magisk bootloader version, my phone doesn't boot anymore and is constantly stuck in bootscreen animation.
What I have tried so far to no result:
- Re-flashing both May 2020 (previous working version) and August 2020 without -w flag to preserve my data that I would ideally like to recover.
- Side-loading May 2020 and August 2020 OTA versions through TWRP
- Creating and booting from Magisk-core only image as per guide called "How to Create & Boot from a Magisk Core-Only Image to Fix a Bootloop Without Custom Recovery" (since I cannot post links in here).
While unpacking and repacking Magisk-core image I noticed that "BOARD_OS_PATCH_LEVEL 2020-05" indicating that I might have had the wrong version applied to it.
So looks like my only hope is finding magisk_patched.img file for August 2020 Pixel 2 XL (image-taimen-qq3a.200805.001) and trying to patch it to disable Magisk upon startup. Would anybody be so kind to post one here?
I have also tried to make data backup using TWRP, but it fails mounting /data partition and shows that it's 0 Mb.
Any other ideas to how to save the phone without wiping all the data would be greatly appreciated.
Thank you all very much for whatever suggestions you might have to help me!
hencrow said:
So looks like my only hope is finding magisk_patched.img file for August 2020 Pixel 2 XL (image-taimen-qq3a.200805.001) and trying to patch it to disable Magisk upon startup. Would anybody be so kind to post one here?
Click to expand...
Click to collapse
Magisk doesn't touch the bootloader, only modifying the boot image. Given your description of the issue, I don't believe Magisk to be the culprit here. Based upon personal experience, flashing a stock image using flash-all.bat, whether the -w flag is present or absent, totally removes Magisk as the stock boot image overwrites the modified version created by Magisk.
It's clear though that you have an issue, but how much of it is brought about by misconceptions and incorrect knowledge is unknown and at this point irrelevant. So what do you do now? Try backing up your data using the instructions here. But be prepared for the very real possibility that you have already lost all your data, and only a stock ROM install with the -w flag present will restore the device to working order.
Strephon Alkhalikoi said:
So what do you do now? Try backing up your data using the instructions URL. But be prepared for the very real possibility that you have already lost all your data, and only a stock ROM install with the -w flag present will restore the device to working order.
Click to expand...
Click to collapse
Thanks for getting back. I'm a little confused how can adb backup can work though if the only thing I can boot into is TWRP and even it fails to decrypt /data partition (it just shows "Could not mount /data and unable to find crypto footer" upon startup).
And with my very limited Android debugging experience wondering if things are really that hopeless that it's not possible to simply copy and decrypt user data partition or there aren't even any logs from failed Android boot attempts that can be looked at to at least diagnose the issue.
hencrow said:
Thanks for getting back. I'm a little confused how can adb backup can work though if the only thing I can boot into is TWRP and even it fails to decrypt /data partition (it just shows "Could not mount /data and unable to find crypto footer" upon startup).
And with my very limited Android debugging experience wondering if things are really that hopeless that it's not possible to simply copy and decrypt user data partition or there aren't even any logs from failed Android boot attempts that can be looked at to at least diagnose the issue.
Click to expand...
Click to collapse
It may not work, and in fact it probably won't, especially if TWRP can't mount the data partition. That's why I said you should be prepared for the very real possibility that you have lost all your data. As for getting logs to diagnose the issue, the only certain way to get a catlog is to record the logcat from the device on your PC as you boot it, via USB Debugging. Something that likely will not be of much help now, given what you have tried doing to resolve the issue.
At this point, in your position I would simply cut my losses and install a factory image and let it wipe the data. Once you are back up and running, you want to get into the habit of backing up app data. There are many apps that can do this, but regardless of the app used, backing up the app data to internal storage or to a location like Mega or Dropbox will make life easier if you ever encounter this again.
An update if anybody is wondering what happened - flashing Android 11 Beta 3 brought the phone back to life with all the data intact. All versions of Android 10 haven't even reached the booting stage where adbd was started and showed no logs.

Categories

Resources