[Q] flashing new ROM on encrypted phone? - Nexus 4 Q&A, Help & Troubleshooting

How do I do this? No access to /sdcard in recovery mode, can't even wipe the phone from recovery. How can you install a new ROM when the phone is encrypted? Running CWM.
EDIT: Will a factory data reset get rid of the device encryption and enable me to install the updated ROM from recovery mode? I don't mind losing the data.

jb91 said:
How do I do this? No access to /sdcard in recovery mode, can't even wipe the phone from recovery. How can you install a new ROM when the phone is encrypted? Running CWM.
EDIT: Will a factory data reset get rid of the device encryption and enable me to install the updated ROM from recovery mode? I don't mind losing the data.
Click to expand...
Click to collapse
I am pretty sure that you can use twrp on an encrypted device.

Related

How can I remove encryption with custom recovery installed?

Factory Resets do not remove encryption with TWRP recovery. It will reset the phone like normal, but the encryption will still remain.
I am looking to try and remove encryption entirely so I can install 4.4 and CWM Recovery. I've heard you have to flash to stock but I don't know what packages, where to get them, and which way I should flash them. Any help is appreciated.
ThomasBags said:
Factory Resets do not remove encryption with TWRP recovery. It will reset the phone like normal, but the encryption will still remain.
I am looking to try and remove encryption entirely so I can install 4.4 and CWM Recovery. I've heard you have to flash to stock but I don't know what packages, where to get them, and which way I should flash them. Any help is appreciated.
Click to expand...
Click to collapse
You need to use the FORMAT DATA option, which will wipe the entire device, if you still get asked for password after that, flash factory image.
Flash the stock recovery....
ThomasBags said:
Factory Resets do not remove encryption with TWRP recovery. It will reset the phone like normal, but the encryption will still remain.
I am looking to try and remove encryption entirely so I can install 4.4 and CWM Recovery. I've heard you have to flash to stock but I don't know what packages, where to get them, and which way I should flash them. Any help is appreciated.
Click to expand...
Click to collapse
I had an Encrypted HTC One that I installed TWRP Recovery. TWRP could not decrypt the phone and the phone would not factory reset. Fixed by using Fastboot to flash the stock recovery and then was able to factory reset my phone.
Fastboot flash recovery recovery.img
Got the Sprint stock recovery image from viperboy (I'm too new to post links) the file name is: Sprint_One_stock_recovery.img
Search XDA with this file name you you will find it.
Too late for you I'm sure but maybe it will help some others.

TWRP hangs on booting to recovery

Ok, I messed up somewhere.
I had Nexus 6p running on MM, rooted along with xposed.
I had downloaded the beta OTA but not installed it.
I used flashfire to flash the old 6p image (the same one that was installed) and flashed system, boot, recovery, cache and vendor.
Then I updated using the downloaded OTA to N. When I did that , the phone showed me the corruption message and booted to recovery. My phone was being detected by adb in normal mode, but not by fastboot in the bootloader, somehow I was able to get it to detect and installed my older TWRP 2.8.7.2 recovery, which was able to decrypt data. After that, I sideloaded Android N via TWRP and even flashed TWRP 3.0.0.1, but it hangs whenever I try to boot to recovery, never been able to go past the TWRP bootlogo. Is there anyway I can get TWRP to work again without wiping data/userdata? I'm guessing it's all happening because of encrypted data.
kunal_07 said:
Ok, I messed up somewhere.
I had Nexus 6p running on MM, rooted along with xposed.
I had downloaded the beta OTA but not installed it.
I used flashfire to flash the old 6p image (the same one that was installed) and flashed system, boot, recovery, cache and vendor.
Then I updated using the downloaded OTA to N. When I did that , the phone showed me the corruption message and booted to recovery. My phone was being detected by adb in normal mode, but not by fastboot in the bootloader, somehow I was able to get it to detect and installed my older TWRP 2.8.7.2 recovery, which was able to decrypt data. After that, I sideloaded Android N via TWRP and even flashed TWRP 3.0.0.1, but it hangs whenever I try to boot to recovery, never been able to go past the TWRP bootlogo. Is there anyway I can get TWRP to work again without wiping data/userdata? I'm guessing it's all happening because of encrypted data.
Click to expand...
Click to collapse
Is there a reason you're messing around with Flashfire and sideloading instead of doing it the proper way via fastboot? I'd suggest taking that route now. I have instructions on flashing factory images in my guide:
http://forum.xda-developers.com/nexus-6p/general/guides-how-to-guides-beginners-t3206928
Heisenberg said:
Is there a reason you're messing around with Flashfire and sideloading instead of doing it the proper way via fastboot? I'd suggest taking that route now. I have instructions on flashing factory images in my guide:
http://forum.xda-developers.com/nexus-6p/general/guides-how-to-guides-beginners-t3206928
Click to expand...
Click to collapse
I just had a phone next to me at that time, so I thought I'd be able to do it without a pc. Now I know it wasn't a good idea
So you suggest I fastboot flash everything like you've mentioned in the guide without formatting userdata and data? Also, should I flash twrp at that time as well? Do I need the modified boot mentioned in http://forum.xda-developers.com/nexus-6p/general/stock-modified-boot-img-regular-root-t3306684
kunal_07 said:
I just had a phone next to me at that time, so I thought I'd be able to do it without a pc. Now I know it wasn't a good idea
So you suggest I fastboot flash everything like you've mentioned in the guide without formatting userdata and data? Also, should I flash twrp at that time as well? Do I need the modified boot mentioned in http://forum.xda-developers.com/nexus-6p/general/stock-modified-boot-img-regular-root-t3306684
Click to expand...
Click to collapse
Yes, flash everything except userdata. Personally, I'd be wiping data with TWRP first though, just to make sure there's no lingering data causing problems moving forward. You can use Titanium to make a backup of your user apps first, and then restore them afterwards. No you don't need the modified boot.img.
In response to one of your initial statements though, I don't think TWRP is hanging due to not being able to decrypt. The 3.0.0-1 build has been patched so that it can decrypt.
Heisenberg said:
Yes, flash everything except userdata. Personally, I'd be wiping data with TWRP first though, just to make sure there's no lingering data causing problems moving forward. You can use Titanium to make a backup of your user apps first, and then restore them afterwards. No you don't need the modified boot.img.
In response to one of your initial statements though, I don't think TWRP is hanging due to not being able to decrypt. The 3.0.0-1 build has been patched so that it can decrypt.
Click to expand...
Click to collapse
any other way I can do that? I'm not rooted, and I cant flash supersu without booting to recovery, right?
kunal_07 said:
any other way I can do that? I'm not rooted, and I cant flash supersu without booting to recovery, right?
Click to expand...
Click to collapse
Instead of relying on the recovery partition on the phone, you can live-boot TWRP with fastboot. This will boot into TWRP using the TWRP image on your PC, via the fastboot connection. The command is as follows:
Code:
fastboot boot twrp-3.0.0-1-angler.img
Then you can flash SuperSU, make your backup with Titanium, and continue on.
Heisenberg said:
Instead of relying on the recovery partition on the phone, you can live-boot TWRP with fastboot. This will boot into TWRP using the TWRP image on your PC, via the fastboot connection. The command is as follows:
Code:
fastboot boot twrp-3.0.0-1-angler.img
Then you can flash SuperSU, make your backup with Titanium, and continue on.
Click to expand...
Click to collapse
sorry to bug you often, but i had no luck with live booting 3.0.0-1. I tried with 2.8.7.2 and it booted, asked to decrypt data. tried my pin/pattern as well as default_password but no luck.
the log says:
E:Unable to decrypt with default password, you may need to perform a format data.
E:unable to mount storage
E:unable to mount settings storage during GUI startup.
kunal_07 said:
sorry to bug you often, but i had no luck with live booting 3.0.0-1. I tried with 2.8.7.2 and it booted, asked to decrypt data. tried my pin/pattern as well as default_password but no luck.
Click to expand...
Click to collapse
That's odd, I can't think of why 3.0.0-1 wouldn't boot, but 2.8.7.2 definitely won't work as it obviously can't decrypt. You might not be able to backup.
Enabling 'require pattern at startup' allowed 3.0.0-1 to boot but this time it was stuck at decrypting.
kunal_07 said:
Enabling 'require pattern at startup' allowed 3.0.0-1 to boot but this time it was stuck at decrypting.
Click to expand...
Click to collapse
I think you're pretty much stuck, you could try disabling all security.
is it possible to sideload supersu somehow?
kunal_07 said:
is it possible to sideload supersu somehow?
Click to expand...
Click to collapse
Maybe, you could try adb sideload in TWRP, but SuperSU needs to access the data partition which TWRP can't decrypt.
I tried it and it got to
**Boot image patcher**
patching sepolicy.
Failure, aborting.
i seem to have the same issues too. unable to access recovery and lost root. phone cant be detected in fastboot.
supersu 2.69 to the rescue. chainfire auto root worked with encrypted data
1)So, now the best way forward is to backup via Titanium and format data?
2) will fastboot erase data erase userdata as well?
3) after the format, will data remain decrypted or do I need to do something else?
kunal_07 said:
supersu 2.69 to the rescue. chainfire auto root worked with encrypted data
1)So, now the best way forward is to backup via Titanium and format data?
2) will fastboot erase data erase userdata as well?
3) after the format, will data remain decrypted or do I need to do something else?
Click to expand...
Click to collapse
Great news
1. Yes.
2. I don't think such a command exists. You'd need to use the "fastboot format userdata" command instead if you want to decrypt anyway. Just remember to backup all your data first.
3. You'd need to flash a custom kernel today doesn't force encryption. Otherwise your data well will automatically encrypt on the first boot after formatting.
kunal_07 said:
supersu 2.69 to the rescue. chainfire auto root worked with encrypted data
1)So, now the best way forward is to backup via Titanium and format data?
2) will fastboot erase data erase userdata as well?
3) after the format, will data remain decrypted or do I need to do something else?
Click to expand...
Click to collapse
Is there a link for the CF Auto root?
I tried searching, but didn't find anything =(
kauemelhado said:
Is there a link for the CF Auto root?
I tried searching, but didn't find anything =(
Click to expand...
Click to collapse
http://forum.xda-developers.com/apps/supersu/wip-android-n-preview-t3335726
kunal_07 said:
http://forum.xda-developers.com/apps/supersu/wip-android-n-preview-t3335726
Click to expand...
Click to collapse
Tks,
I found it 2 seconds later I asked you. LOL
Anyhow, thank you bro.

Cannot wipe with TWRP

Hi,
I have G935F, installed TWRP 3.0.0.0 and rooted, WITHOUT wiping. System boots correctly, but I cannot do factory reset or wipe with TWRP, because I got some messages like "Cannot mount Data" and "Failed crypto loader". I understand that it has to do with encryption. Can someone please enlight me, and give me tips about the issue?
Thank you
Polemos82 said:
Hi,
I have G935F, installed TWRP 3.0.0.0 and rooted, WITHOUT wiping. System boots correctly, but I cannot do factory reset or wipe with TWRP, because I got some messages like "Cannot mount Data" and "Failed crypto loader". I understand that it has to do with encryption. Can someone please enlight me, and give me tips about the issue?
Thank you
Click to expand...
Click to collapse
You have to download dm-verity and force encryption disabler from here , put it to SD card, reboot into TWRP, FORMAT DATA (not wipe) and flash that file (dm-verity and force encryption disabler). All your data will be erased.
No way to unencrypt without loosing you data for the moment(
"All your data will be erased" means that after boot I'll find a clean system installation (as factory reset)?
I hope not to be posing stupid questions, I'm completely new to this world
Thank you very much
Yes just as a factory reset
Sent from my SM-G935W8 using Tapatalk
Ok, thank you all!!! ???
s it very important to wipe data?
Can I first flash the twrp ,second back up the rom by TWRP recovery
and then after factory reset ,I restore thw rom by twrp??
IS IT possible?
AGU PENG said:
Can I first flash the twrp ,second back up the rom by TWRP recovery
and then after factory reset ,I restore thw rom by twrp??
IS IT possible?
Click to expand...
Click to collapse
No, you cannot perform a backup, because your data is encrypted by default and the only way to disable it is to format your data.
I have a unique problem. I have a HTC Desire 612 from Verizon and I decided to revive it to playe PoGo. But it was stuck in a boot loop and I couldn't get any custom ROM.
Finally a gentle soul here gave me the stock rom and I flashed it vide TWRP and played PoGo for weeks. Then yesterday the phone bro led and when it came up it was stuck in a boot loop.
So I decided to flash the stock ROM again. But before that I tried to factory reset. I could go to TWRP, select wipe data, enter yes and the wiping was successful, then clear dalvic and cache and system beforehand finally I flashed the stock ROM.
Surprise surprise is NOTHING happens. The phone boots without the apps telling me they are installing. Then I get back the exact same data in my phone including my selected wallpaper and apps. Before I can do anything the phone restarts.
Point is wiping and restoring the stock ROM does NOTHING to the phone yet the processes are successful. Can somebody help?
vooks said:
I have a unique problem. I have a HTC Desire 612 from Verizon and I decided to revive it to playe PoGo. But it was stuck in a boot loop and I couldn't get any custom ROM.
Finally a gentle soul here gave me the stock rom and I flashed it vide TWRP and played PoGo for weeks. Then yesterday the phone bro led and when it came up it was stuck in a boot loop.
So I decided to flash the stock ROM again. But before that I tried to factory reset. I could go to TWRP, select wipe data, enter yes and the wiping was successful, then clear dalvic and cache and system beforehand finally I flashed the stock ROM.
Surprise surprise is NOTHING happens. The phone boots without the apps telling me they are installing. Then I get back the exact same data in my phone including my selected wallpaper and apps. Before I can do anything the phone restarts.
Point is wiping and restoring the stock ROM does NOTHING to the phone yet the processes are successful. Can somebody help?
Click to expand...
Click to collapse
HTC?? Wrong thread.
B3311 said:
HTC?? Wrong thread.
Click to expand...
Click to collapse
It really is about TWRP failing to wipe

twrp issues

Hi o am on the latest twrp for this phone. I don't have my data encrypted and when I boot into recovery from the phone using the reboot into recovery method it works fine. Bit if I power off the phone and reboot into recovery it says data is encrypted and asked for a password. I tried my lock screen password but it doesn't work. So I'm thinking that I should just wipe the entire phone and start fresh. I aslo noticed that since the last term update my Los updater doesn't work it won't run the updater script.
What would be the best way to do this? Should I just wipe the phone and then adb sidload the latest Los gapps and magisk? Or should I just wipe then push the files to my phone and install the from twrp? I have never done either of those operations but it doesn't look too complicated.n
Any suggestions?

HELP with resetting wifi config on V11.0.0.IN11BA

hey guys, i really need your help urgently.
i just finished setting up my OP8Pro to my needs and then i restored wifi networks from my Titanium Backup from Android 8, i booted and it won't boot anymore.
i get a FATAL EXCEPTION IN SYSTEM PROCESS: WifiHandlerThread...
so now i need to reset these settings via stock recovery and i already modified my recovery to enable ADB but i can't access /data
anyone has a hint for me how to access /data and where to find the wifi config on Android 11?
it's not stored in /data/misc/wifi anymore :/
thanks a lot in advance!
You can reset WiFi within WiFi settings in settings.
But I would probably just clear data on the app you restored either in settings/apps or simply via titanium.
If it still fails then boot to recovery and wipe system.
Your storage will remain unaffected.
You could also try safe mode, power off and hold vol up and down as soon as you see the bootloader warning
Fyi I wouldn't bother restoring WiFi passwords like that, there's other ways of doing it.
Google can back these up for you for example, there are apps which can do it like swift (I think can do it)
dladz said:
You can reset WiFi within WiFi settings in settings.
But I would probably just clear data on the app you restored either in settings/apps or simply via titanium.
If it still fails then boot to recovery and wipe system.
Your storage will remain unaffected.
You could also try safe mode, power off and hold vol up and down as soon as you see the bootloader warning
Fyi I wouldn't bother restoring WiFi passwords like that, there's other ways of doing it.
Google can back these up for you for example, there are apps which can do it like swift (I think can do it)
Click to expand...
Click to collapse
thanks for your answer but unfortunately i can't boot anymore and i can't decrypt /data anymore even after reflashing stock recovery.
what's the best way to flash via fastboot to preserve data?
thank you!
eis0r said:
thanks for your answer but unfortunately i can't boot anymore and i can't decrypt /data anymore even after reflashing stock recovery.
what's the best way to flash via fastboot to preserve data?
thank you!
Click to expand...
Click to collapse
You'd have to grab one of the fastboot ROMs then flash.
Why can't you open recovery? Isn't your pin / password being accepted?
If it's not and fastboot installation can't be done then honestly I'd just MSM your current firmware..it's easier than fastboot tbh.
You'd need to bootloader unlock after but this is going to wipe everything anyway.
dladz said:
You'd have to grab one of the fastboot ROMs then flash.
Why can't you open recovery? Isn't your pin / password being accepted?
If it's not and fastboot installation can't be done then honestly I'd just MSM your current firmware..it's easier than fastboot tbh.
You'd need to bootloader unlock after but this is going to wipe everything anyway.
Click to expand...
Click to collapse
my bootloader is already unlocked and i was rooted on 11.0.0... i can boot into fastboot and recovery but i'm not prompted my unlock pattern.
this was working before testing adb integrated recovery and restoring stock recovery...
eis0r said:
my bootloader is already unlocked and i was rooted on 11.0.0... i can boot into fastboot and recovery but i'm not prompted my unlock pattern.
this was working before testing adb integrated recovery and restoring stock recovery...
Click to expand...
Click to collapse
I don't get you mate??
I'm saying that if you use the MSM tool it will lock your bootloader so you'll need to unlock it again.
In regards to your recovery if you can get to it then choose English, then wipe, then system, then wipe system.
That will get you back like I said in my previous post.
If it's not asking for your pin/password (there is no pattern)
Then you're fine
I've not used that recovery but I don't see a point in using it
dladz said:
I don't get you mate??
I'm saying that if you use the MSM tool it will lock your bootloader so you'll need to unlock it again.
In regards to your recovery if you can get to it then choose English, then wipe, then system, then wipe system.
That will get you back like I said in my previous post.
If it's not asking for your pin/password (there is no pattern)
Then you're fine
I've not used that recovery but I don't see a point in using it
Click to expand...
Click to collapse
sorry i haven't used MSM yet so i didn't know it'll relock the bootloader but i'm more familiar with fastboot flashing so i'd like to stick with that also because i read of problems with the fingerprint reader when relocking the bootloader.
i thought i could delete reset the faulty wifi config via adb by using the adb-enabled stock recovery but i wasn't able to mount /data with it since it's encrypted and it's not asking for my pattern to decrypt it.
neither the stock recovery is asking for it now...
i don't want to lose my data hence i'm looking for a way to get it back running without completely reinstalling.
do you think it could work by only flashing system partition via fastboot?
thanks man!
eis0r said:
sorry i haven't used MSM yet so i didn't know it'll relock the bootloader but i'm more familiar with fastboot flashing so i'd like to stick with that also because i read of problems with the fingerprint reader when relocking the bootloader.
i thought i could delete reset the faulty wifi config via adb by using the adb-enabled stock recovery but i wasn't able to mount /data with it since it's encrypted and it's not asking for my pattern to decrypt it.
neither the stock recovery is asking for it now...
i don't want to lose my data hence i'm looking for a way to get it back running without completely reinstalling.
do you think it could work by only flashing system partition via fastboot?
thanks man!
Click to expand...
Click to collapse
Use the thanks button buddy
I think you've certainly got a shot at it and what's the worst that can happen?
Did you actually try to wipe system in recovery? That would be my way to go.
MSM is extremely easy but I understand not wanting to lose storage.
That being said if you're correct about decryption then it won't matter anyway
dladz said:
Use the thanks button buddy
I think you've certainly got a shot at it and what's the worst that can happen?
Did you actually try to wipe system in recovery? That would be my way to go.
MSM is extremely easy but I understand not wanting to lose storage.
That being said if you're correct about decryption then it won't matter anyway
Click to expand...
Click to collapse
well after trying lots of different things i ended up wiping system settings in stock recovery. atleast i didn't lose storage.
thanks a lot for your help tho!
eis0r said:
well after trying lots of different things i ended up wiping system settings in stock recovery. atleast i didn't lose storage.
thanks a lot for your help tho!
Click to expand...
Click to collapse
You're very welcome mate, I've done the same a few times..it's not that much of a loss really, a lot of apps pick up where they left off and if you do have titanium then your back ups are retained.
Glad you're sorted.
PS: this would have had the same effect that installing system would have had, only this time you get a clean slate

Categories

Resources