[Q] Post encryption issues - Nexus 7 Q&A, Help & Troubleshooting

I'm on 4.2.2, unlocked and rooted. Decided to encrypt tablet the other day and have had issues since. I can get past the encryption PIN without issue, but 90% of the time I'm locked out of the lock screen PIN, with a message of wrong PIN.
I want to do a factory reset, but when I do manage to get into the device (sometimes entering no PIN works), when I get to the confirmation to factory wipe it refuses my PIN. I also cannot change my PIN because it refuses to accept my PIN. Yes, I'm certain I'm using the correct PIN.
Can't do a factory reset because Clockworkmod can't mount the SD card due to the encryption. Should I uninstall Clockworkmod and try that? I just don't want to end up bricking or totally locking myself out if there is another route I should take.

You could try flashing stock and then format /data and /userdata using fastboot
Sent from my Nexus 7 running Android 4.2.2

mihahn said:
You could try flashing stock and then format /data and /userdata using fastboot
Sent from my Nexus 7 running Android 4.2.2
Click to expand...
Click to collapse
Thanks. Should I be able to do that even though the SD card is encrypted? I have done a fair amount of Googling around, but have not found a lot of information about encrypted devices and issues.
-----------------------
I ended up formatting all storage partitions, and wiping cache, then took about 2 hours to get ADB working correctly, but was finally able to sideload a new image.

Related

[CLOSED] Need to remove encryption, but factory reset borked - help!

I've got a bit of a problem with my Nexus 10, I want to do a factory reset to remove encryption, but the factory reset fails every time. I've tried the stock one via the menus, and the clockwork one via recovery, but neither works. I thought I'd have a go at re-rooting it to see if I could force the issue, but the recovery isn't able to mount the SD, so I can't get to the file to flash. The unit is spoofing a Galaxy Nexus for SkyGo purposes, which seems to be causing the adb drivers to not work on my PC, as it's obviously not seeing it as a Nexus 10 when I connect. I can't remove the spoofing, as it needs to be rooted, which brings me full circle.
It's a right pickle!
Any ideas what I might be able to do to get the unit rooted again?
mcwildcard said:
I've got a bit of a problem with my Nexus 10, I want to do a factory reset to remove encryption, but the factory reset fails every time. I've tried the stock one via the menus, and the clockwork one via recovery, but neither works. I thought I'd have a go at re-rooting it to see if I could force the issue, but the recovery isn't able to mount the SD, so I can't get to the file to flash. The unit is spoofing a Galaxy Nexus for SkyGo purposes, which seems to be causing the adb drivers to not work on my PC, as it's obviously not seeing it as a Nexus 10 when I connect. I can't remove the spoofing, as it needs to be rooted, which brings me full circle.
It's a right pickle!
Any ideas what I might be able to do to get the unit rooted again?
Click to expand...
Click to collapse
Custom recoveries don't deal with encryption, if I'm remembering things correctly. If your stock recovery's not working either, then that's a serious cause for concern (and is likely why factory reset isn't working for you). To be honest, you may be kind of hosed on this install around. I'd recommend that you boot up, back up your data using Titanium Backup, offload it (connect it to a PC/cloud service while device is on), then plonk into fastboot and just reinstall (or RUU).
Rirere said:
Custom recoveries don't deal with encryption, if I'm remembering things correctly. If your stock recovery's not working either, then that's a serious cause for concern (and is likely why factory reset isn't working for you). To be honest, you may be kind of hosed on this install around. I'd recommend that you boot up, back up your data using Titanium Backup, offload it (connect it to a PC/cloud service while device is on), then plonk into fastboot and just reinstall (or RUU).
Click to expand...
Click to collapse
Therein lies the problem though, for whatever reason my PC won't recognise the nexus 10, despite the drivers being installed from the ADK etc.
Because of that, I can't use fastboot or anything PC based. I suspect it's because the device is spoofed as a Galaxy Nexus.
The device is currently unrooted too, so that also limits my options.
My data isn't really a problem, I'm happy to wipe everything, it's all backed up on my NAS anyway.
Isn't there any sort of physical reset button anywhere that will force a factory reset?
Managed to get the drivers working on my gf's laptop, not sure why my PC wasn't playing ball, but this is all fixed now.
Ta!

[Q] bootlooping - any way to recover without wipe/reset?

Would appreciate any advice, please.
My daughter's Nexus 7 Wifi (grouper/nakasi) is bootlooping.
[Yesterday, an app wouldn't install from Play Store (error code -24); went to go to Settings, to clear Play Store cache, but Settings wouldn't open. Rebooted, now it's bootlooping]
The device is still locked, so I'm obviously very limited in what I can do. Is there any way at all I can recover things, without having to do a wipe?
Failing that, I'd like to at least save her app data, and SD contents, before a wipe.
I've tried clearing /cache from (stock) Recovery, no change.
I can connect with adb, but only when in Recovery sideload. I can't connect with adb when it's bootlooping.
I can't flash a factory image, with wipe disabled, since it's still locked.
I tried to sideload an update, but the update fails, since they're all from->to, and it is already on the latest 4.4.2.
I tried mtpfs, but it won't mount.
Anything else I can try, please, before resorting to wiping, and losing all her app data and any pics she may have taken?
Since your N7's bootloader is locked and is on stock recovery, your hands are pretty much tied. I can't think of any solution then a unlocking and fastboot flashing a stock image.
But maybe someone with more knowledge comes by and can help you.
So, I did a wipe/reset from Recovery, which re-formatted /data & /cache.
And it still won't boot... I wonder what is wrong?
What is the recommended procedure now? Would that be to oem unlock then flash a factory image, and oem lock?
Just to follow-up - it was just less than 1 year old, so I rang Google, who did an RMA over the phone, and are sending me a replacement.
They no longer have stock of wifi-only, so are sending a 3G model. Not that I need that. I have heard that this model uses more battery even when there's no SIM in it. Hope not.
Can't fault the service.

[Q] Was able to encrypt once, now can't encrypt anymore on CM 12

Here's what I've done so far and info relating to my setup
Phone: klte - G900T (T-Mobile Samsung Galaxy S5). I'm not on SafeStrap, I'm installing to system. I'm running TWRP recovery 2.8.4.0.
I first installed the CyanogenMod 12 nightly for 20150204 with Paranoid Android GApps 5.0.1RC3. All good there. I then went to "Security" and clicked "Encrypt Phone." It didn't ask me to set a password, so I assumed it'd generate a random key for LUKS and encrypt it with the default password. All good there. It rebooted into the "Encryption Wizard," and went through encrypting the phone. Cool, I thought.
It then boot-looped on start, seemingly because it didn't yet understand how to decrypt using the default password. TWRP decrypted data on startup of the recovery just fine, so that's cool. Okay, so maybe the nightly doesn't support decrypting on boot yet. Fine. I upgraded to CM 12 20150208 (today's) and tried again. Nothing.
I then did a factory reset and wiped system, reinstalling CyanogenMod from scratch. No joy either, couldn't boot. What was weird was that I still noticed that it was mounting /dev/dm-0 at /data, so my data was still encrypted. Shoot. How to get rid of encryption? I wrote a ton of zeroes to the beginning of data to wipe out the LUKS header:
Code:
dd if=/dev/zero of=/dev/block/platform/msm_sdcc.1/by-name/userdata bs=4096
I terminated this process a while in (probably should have been more exact by specifying how much to zero, but laziness). I then ran
Code:
make_ext4fs /dev/block/platform/msm_sdcc.1/by-name/userdata
Next, reboot recovery, and all is well. Install ROM, and try encrypting again, this time setting an unlock code so that it actually uses a real encryption key instead of default. It reboots, takes a really long time, and then just continues into regular boot, no encrypting taking place, it seems to bypass that. Dangit.
I then tried switching off and on again the set_encrypted_filesystem flag to recovery:
Code:
adb shell recovery --wipe_data --set_encrypted_filesystem=off
adb shell recovery --set_encrypted_filesystem on
No joy, when I try to encrypt it still just reboots regular (albeit really slowly) into regular system and doesn't encrypt. Ugh, I feel like I've lost all progress. I've made sure to clear Dalvik and regular caches on each try, so things shouldn't be persisting. I had an old backup of the stock T-Mobile ROM, so I flashed back to that, and then tried installing CM 12 again and encrypting, and no matter what I do, I can't get to that encryption screen. (my original T-Mobile backup had EFS, Modem, etc. basically everything that TWRP would let me include) [email protected]##$!!! Y U NO ENCRYPT!?
What are my next steps? How can I see what happens in that boot, ie what fails, so I can fix it and get onto my lovely life outdoors?
Shoot, logcat shows the following
Code:
E/Cryptfs ( 241): Orig filesystem overlaps crypto footer region. Cannot encrypt in place.
I'd better just zero out the entire thing to bypass this madness. Maybe that's what I screwed up?
I wrote all zeroes to the data partition to clear it out completely:
Code:
dd if=/dev/zero of=/dev/block/platform/msm_sdcc.1/by-name/userdata bs=512
Then, encrypt, and fail to encrypt. Output from logcat:
Code:
E/Cryptfs ( 242): Bad magic for real block device /dev/block/platform/msm_sdcc.1/by-name/userdata
E/Cryptfs ( 242): Error getting crypt footer and key
I'm now going to try again by doing
Code:
adb shell dd if=/dev/zero of=/dev/block/platform/msm_sdcc.1/by-name/userdata bs=512
adb shell recovery --set_encrypted_filesystem=on
We'll see what happens. This is a weird process.
I am no expert but I had trouble with encryption on my s3 with cm rom a while back.
What eventually helped was to flash official ROM and recovery using Odin, which brought the phone back to life. and then flashing whatever you need.
Hope it helps you.
I'll have to try that. I'm compiling a list of what to try next. This is a bit of a nightmare, but I'm convinced that eventually I can get back to the way it was originally.
Okay, so all this is pretty spooky stuff, but here's what actually worked.
Grab the latest stock ROM. This will take you forever trying to find it on a stupid pay-per-download website and you'll have to hack your way around or through it to get to the download (which won't complete if you have a free account because it's too big, be forewarned). After your (premium!) download completes after 3 hours, use Odin and flash. Once your phone reboots, it'll see something's wrong with /data and will fix it. I'm not sure what fixing it entails, but I have to imagine it's something like wiping the LUKS header/footer (yes, there actually is something called a LUKS footer, as I discovered through this process) and reformatting the partition. It'll reboot again, and you'll be in happy stock land.
Next, install your recovery weapon of choice using Odin (reboot bootloader, flash, reboot recovery).
Next, wipe system and install CM 12. (20150204 works for me) Boot into CyanogenMod, and go to encrypt the phone. Here's the catch: you must use a PIN that's longer than 4 characters. I found this out the hard way. I'm not sure if six characters are required, but my four-character PIN simply didn't work and was the source of so much frustration. Give a good PIN or passphrase (passphrase is obviously better) and go forward with the encryption. My device rebooted a bunch of times and seemed to get into a boot loop. However, on each boot, it'd ask for the PIN, so I knew I was getting somewhere. Unplug it from the wall, and it should boot into the ROM.
Thank goodness, I lost a lot of time on this today.
An interesting aside: it seems that now in Android you can set a different disk encryption passphrase than your screen unlock pattern. FINALLY! Android Lollipop is awesome!
Having the exact same issue with multiple devices!!!
it is always the same! if a device was encrypted on cm12 and you wipe out everything, you will run into that problem again.
So, if a device is used and you want to format it and reuse it, the encryption will always fail! That can not be the right approach!
Understand the problem.
CyanogenMod 12 as of this point doesn't support the default encryption password, which is why it fails to boot. If the encryption password gets set to the default password, like if you change your screen pattern and not specify it for encryption also, it will fail to boot. This is a bug in CyanogenMod 12.
Your recovery also has a bug. If and when you factory reset, if the device is encrypted, the recovery should overwrite the encrypted filesystem footer with zeroes and then recreate an ext4 filesystem there and configure it properly. It doesn't, which leads to this annoying problem of not being able to boot.
rfkrocktk said:
Understand the problem.
CyanogenMod 12 as of this point doesn't support the default encryption password, which is why it fails to boot. If the encryption password gets set to the default password, like if you change your screen pattern and not specify it for encryption also, it will fail to boot. This is a bug in CyanogenMod 12.
Your recovery also has a bug. If and when you factory reset, if the device is encrypted, the recovery should overwrite the encrypted filesystem footer with zeroes and then recreate an ext4 filesystem there and configure it properly. It doesn't, which leads to this annoying problem of not being able to boot.
Click to expand...
Click to collapse
Still struggling with an S4 mini, going back to stock and reflashing again works, but after encryption i have a lot of FCs and clearing cache etc. does not help @ all
So you mean, setting a pin BEFORE encryting will cause this fault?
Cheers,
saint
saintxseiya said:
Still struggling with an S4 mini, going back to stock and reflashing again works, but after encryption i have a lot of FCs and clearing cache etc. does not help @ all
So you mean, setting a pin BEFORE encryting will cause this fault?
Cheers,
saint
Click to expand...
Click to collapse
Not exactly. If you setup encryption with a password or PIN, the encryption should more or less work. If you then change your PIN or password and that change doesn't hit the disk (ie: you elect not to use your screen unlock password as your encryption pasword), the default password will be used, which will fail on boot.
rfkrocktk said:
I wrote all zeroes to the data partition to clear it out completely:
Code:
dd if=/dev/zero of=/dev/block/platform/msm_sdcc.1/by-name/userdata bs=512
Click to expand...
Click to collapse
This is gonna be hella necroposting, but I did the same thing on different device and I know what I did wrongly. You can't just blow away the entire partition because the last 16KB needs to be dedicated to the crypto footer. Without that, Android has nowhere to store the encrypted key, "magic" header, etc. it needs to process the rest of the partition. That's also why FDE that isn't hardware-backed isn't a great idea. Anyway, that's all. Time to reformat using a slightly smaller filesystem size.
LUKS AFAIK typically uses a header and not a footer on these volumes, which is why I was confused. No idea why the logic is better to store these things at the end of the disk, it makes it much more difficult to target easily.

"Decryption unsuccessful" message on stock 7.0/7.1.1

This is the second time I get this message. First time was on stock Android 7.0. next time, ~2 weeks later on stock Android 7.1.1. To revive my phone I had to perform a factory reset twice.
What causes this message? Is it software or hardware related? I assumed the former, but the fact that it happened twice after a reset and on a new version made me wonder...
I'm heading to a country without 3G coverage and barely any WiFi, so if this happens then, I'm screwed on 2 levels: -Loss of pictures, due to not able to back-up -Not able to reset, since that requires WiFi.
Anyone else who had this issue? Any recommendations, RMA?
Full error message: "Decryption unsuccessful" The password that you entered is correct but unfortunately your data is corrupt. To resume using your phone, you need to perform a factory reset. When you set up your phone after the reset, you'll have an opportunity to restore any data that was backed up to your Google account"
Thx.
You can set the phone to back up without wifi if you are good with that I've had my phone since December I have not had that happen odd.
Sent from my Nexus 6P using Tapatalk
gjkrisa said:
You can set the phone to back up without wifi if you are good with that I've had my phone since December I have not had that happen odd.
Sent from my Nexus 6P using Tapatalk
Click to expand...
Click to collapse
And how would you do that? Can't seem to find any way to do that...
In Google photos there is in settings also drive after that I believe the rest of settings will back up w/o wifi I know photos will
Sent from my Nexus 6P using Tapatalk
Dytoonn said:
This is the second time I get this message. First time was on stock Android 7.0. next time, ~2 weeks later on stock Android 7.1.1. To revive my phone I had to perform a factory reset twice.
What causes this message? Is it software or hardware related? I assumed the former, but the fact that it happened twice after a reset and on a new version made me wonder...
I'm heading to a country without 3G coverage and barely any WiFi, so if this happens then, I'm screwed on 2 levels: -Loss of pictures, due to not able to back-up -Not able to reset, since that requires WiFi.
Anyone else who had this issue? Any recommendations, RMA?
Full error message: "Decryption unsuccessful" The password that you entered is correct but unfortunately your data is corrupt. To resume using your phone, you need to perform a factory reset. When you set up your phone after the reset, you'll have an opportunity to restore any data that was backed up to your Google account"
Thx.
Click to expand...
Click to collapse
Did you experience any random reboots?
When you say stock you confirm that it's full stock (no root and running google's kernel) ?
rchtk said:
Did you experience any random reboots?
When you say stock you confirm that it's full stock (no root and running google's kernel) ?
Click to expand...
Click to collapse
Never had any troubles with random reboots.
My phone froze, got unresponsive. I had to restart, and when it tried to boot I got this message. This happened twice.
No root, standard kernel. Bootloader not even unlocked.
Dytoonn said:
Never had any troubles with random reboots.
My phone froze, got unresponsive. I had to restart, and when it tried to boot I got this message. This happened twice.
No root, standard kernel. Bootloader not even unlocked.
Click to expand...
Click to collapse
That's it. Storage corruption and the decryption unsuccessful is a consequence of your problem.
Sorry but that looks like a defective device.
ram/emmc/power, it's hard to find without root/twrp. Unless an update got wrong but I don't think that would show these symptoms.
First, I would also raise a PR on google to see what they suggest: https://source.android.com/source/report-bugs.html
You really need to backup your data and have a backup phone in case the following gets you a brick..
I'd actually try flashing factory images (you won't be able to flash recovery image but others yes ). Make sure to record the messages returned on your PC to see if something went wrong. The update process is a bit dumb, it goes on even if errors are encountered so even if it finishes it doesn't mean much.
Once the device is flashed, if it boots, you could try filling your data partition by moving big files using usb transfer. When its full, reboot and see what's happening.
If you are short on time, prepare the RMA process...
edit: oh btw, I'm sure people would be interested to get the information displayed in bootloader mode (power on the phone by pressing volume down)
rchtk said:
That's it. Storage corruption and the decryption unsuccessful is a consequence of your problem.
Sorry but that looks like a defective device.
ram/emmc/power, it's hard to find without root/twrp. Unless an update got wrong but I don't think that would show these symptoms.
First, I would also raise a PR on google to see what they suggest: https://source.android.com/source/report-bugs.html
You really need to backup your data and have a backup phone in case the following gets you a brick..
I'd actually try flashing factory images (you won't be able to flash recovery image but others yes ). Make sure to record the messages returned on your PC to see if something went wrong. The update process is a bit dumb, it goes on even if errors are encountered so even if it finishes it doesn't mean much.
Once the device is flashed, if it boots, you could try filling your data partition by moving big files using usb transfer. When its full, reboot and see what's happening.
If you are short on time, prepare the RMA process...
edit: oh btw, I'm sure people would be interested to get the information displayed in bootloader mode (power on the phone by pressing volume down)
Click to expand...
Click to collapse
Thanks for your reply.
I sent it for an RMA, so unfortunately not able to do what you described. Couldn't chance it getting this error message when abroad.
Curious though if they will grant an RMA, nothing much is looking wrong at the moment. Hope they will, because else I'm screwed.
If they don't, though, I'll see if I can get the information displayed in bootloader mode.
I'm having the same issue.
Same message, only I'm BL unlocked, rooted and twrp.
It happened twice. Once on 7.1 DP1, and again on DP2.
Once I get into recovery, the system is encrypted, and I can't do a thing.
I'm going to try and back up to a flash drive, and try to mount that in twrp if it happens again.
rwj5279955 said:
I'm having the same issue.
Same message, only I'm BL unlocked, rooted and twrp.
It happened twice. Once on 7.1 DP1, and again on DP2.
Once I get into recovery, the system is encrypted, and I can't do a thing.
I'm going to try and back up to a flash drive, and try to mount that in twrp if it happens again.
Click to expand...
Click to collapse
Recent Twrp now supports full disk encryption so you should be able to see your files? And even do a backup from there. Take twrp 3.0.2-3
rchtk said:
Recent Twrp now supports full disk encryption so you should be able to see your files? And even do a backup from there. Take twrp 3.0.2-3
Click to expand...
Click to collapse
Strange, that's exactly the version I'm using.
rwj5279955 said:
Strange, that's exactly the version I'm using.
Click to expand...
Click to collapse
Weird. I don't have twrp so I can't check but you should see your data. Maybe the partition needs to be mounted (I think it is by default though). No /data/media ? /sdcard is the same but as a virtualized FAT file system to be able to be access from Windows. Could be that /sdcard is empty in twrp but /data/media shouldn't.
rchtk said:
Weird. I don't have twrp so I can't check but you should see your data. Maybe the partition needs to be mounted (I think it is by default though). No /data/media ? /sdcard is the same but as a virtualized FAT file system to be able to be access from Windows. Could be that /sdcard is empty in twrp but /data/media shouldn't.
Click to expand...
Click to collapse
I'll have to look if it happens again.
I only remember trying to access /sdcard. Empty
https://twrp.me/faq/datamedia.html
Same issue , rooted and twrp noto e4 plus , any help ? Idk what's is going on
Joeykatie said:
Same issue , rooted and twrp noto e4 plus , any help ? Idk what's is going on
Click to expand...
Click to collapse
If I understand this thread flash custom kernel like ElementalX to unencrypt your device.

How to decrypt the Axon 7?

OK so this is totally self inflicted. At some point I was dinking around in the settings and the device asked me if I wanted to set a pin at startup. I went along with it and did that thinking it was a good idea. What it seems to have done (besides the startup pin) is encrypted the phone. Now technically everything works I can just enter my pin to boot to ROM or TWRP. But I want to remove the encryption and for the life of me I cannot find how to do that.
Any help would be GREATLY appreciated.
Here are notes on my situation:
-yes i searched the internets and XDA and mostly found stuff about the Nexus and OnePlus devices
-under security settings it just says "encrypted" there is no option to decrypt
-i have tried wiping and even formatting to different formats on data and system partitions
-tried different roms as well
-this is a Axon 7 U device
-running TWRP 3.1.1-0
-ROMs RR and Dark Rom
-obviously boot loader unlocked
Thank You
DarkQuark said:
OK so this is totally self inflicted. At some point I was dinking around in the settings and the device asked me if I wanted to set a pin at startup. I went along with it and did that thinking it was a good idea. What it seems to have done (besides the startup pin) is encrypted the phone. Now technically everything works I can just enter my pin to boot to ROM or TWRP. But I want to remove the encryption and for the life of me I cannot find how to do that.
Any help would be GREATLY appreciated.
Here are notes on my situation:
-yes i searched the internets and XDA and mostly found stuff about the Nexus and OnePlus devices
-under security settings it just says "encrypted" there is no option to decrypt
-i have tried wiping and even formatting to different formats on data and system partitions
-tried different roms as well
-this is a Axon 7 U device
-running TWRP 3.1.1-0
-ROMs RR and Dark Rom
-obviously boot loader unlocked
Thank You
Click to expand...
Click to collapse
Remove your PIN and then add it back but this time when it asks you if you want the startup pin choose no thanks.
Startup pin IS encryption.
bkores said:
Remove your PIN and then add it back but this time when it asks you if you want the startup pin choose no thanks.
Startup pin IS encryption.
Click to expand...
Click to collapse
I had tried that earlier and it did not work. What did work was doing doing a format data in twrp. I think mine was just stuck.
DarkQuark said:
I had tried that earlier and it did not work. What did work was doing doing a format data in twrp. I think mine was just stuck.
Click to expand...
Click to collapse
i believe that's the only way to decrypt the phone. You can have your phone encrypted without jt asking for a pin or pattern and startup, and it happens every damn time you forget to flash supersu or magisk on first boot. If you flash another ROM later you'll have to format data, or it will fail if it is encrypted.
If your phone has TWRP I suggest that you go to it and format data, then install supersu/magisk via sideload or an sd card or otg without rebooting.

Categories

Resources