Hi guys,
I'm running an international HOX+ with unlocked HBOOT-1.72.0000 plus an unrooted 4.2.2 stock ROM. Unfortunately, I messed up to backup the stock ROM in recovery mode before rooting the phone. After rooting, I encrpyted the whole device.
To my best understanding, TWRP (here version 2.6.3.0) supports handling of encrypted filesystems. After launching recovery mode the log anyway contains "Unable to mount '/data'" and I'm not able to perform any operation on the filesystem. Also any attempt of manually mounting fails.
For the moment being, that's not a problem, since everything runs smoothly. In the future, anyway, I might envisage to perform an OTA-update (if there should be a stock ROM 4.3) or an update to cyanomodgen 10.2. But after consulting various posts here, I'm in doubt, if things would indeed work out as expected. Can you give hints how to proceed with the three subsequent issues?
Update via OTA
==============
As far as I know, running updates via ota requires a (re-)locked bootloader and a stock recovery partition to be installed.
Is the relock really mandatory? If yes, I'd assume "adb oem lock" is appropriate to tackle it.
For the stock recovery, I've found an image here at http://forum.xda-developers.com/showpost.php?p=37203749&postcount=177
Would it be sufficient to flash this recovery.img via fastboot to allow launching the regular OTA update on the encrypted system afterwards?
Update to custom ROM
====================
Since obviously neither TWRP nor CWM Recovery are able to deal with the encrypted data partition (yet), installation of a different ROM requires a workaround. I read that mounting a tmpfs to /sdcard and proceeding via sideload is feasible to apply patches from TWRP in case of an encrypted device. Nonetheless, is such a proceeding also reasonable to flash a custom ROM in the given situation?
Factory Reset
=============
If the latter approach fails, the path might lead via factory reset, first. I've stumbled upon this discussion: http://forum.xda-developers.com/showthread.php?t=2139163
Should I expect any problems to carry out a factory reset either directly from the boot menu or from TWRP?
Thanks for your hints in advance!
best regards,
Thorsten
Related
I want to root my phone but I also need to encrypt it. The challenge as I see it is the root process requires installation of a custom recovery, but I've read that custom recoveries are not compatible with encryption and will prevent me from ever being able to perform a factory reset. I don't care about installing custom ROMS, but not being able to factory reset makes me nervous.
Would flashing back to stock recovery after root be a solution? Is that even possible? I'm thinking these would be the steps:
1. Unlock bootloader
2. Install custom recovery
3. Root
4. Flash stock recovery
5. Encrypt
Or, is there some way to just root the At&t HTC One M8 without having to install a custom recovery?
1. Root
2. Encrypt
Thanks.
[SOLVED] root + encryption
I found the solution in another post. In case anyone's interested this is what I did:
1. Unlock bootloader (I assume this is necessary for the next step, maybe not, I did it anyways)
2. Boot latest TWRP using command: fastboot boot recovery.img. This is key, and very useful I might add. It doesn't install the recovery, just let's you run it so you can perform the next 2 steps:
3. Perform nandorid backup in TWRP (just in case)
4. Flash latest SuperSU in TWRP for root access
5. Encrypt
Then I verified a few things after encrypting:
a. Booted into TWRP to see if it would it work with encryption. Some things worked, but anything that required access the system didn't, and I expected this. NOTE: you won't be able to perform a nandroid backup after you encrypt.
b. Copied the nandroid backup I made prior to encrypting to my computer then performed a factory reset in Android. Everything worked fine.
c. Copied my nandroid backup back to my device then booted into TWRP and restored the backup. Everything worked perfect, just had to re-root and re-encrypt.
I'm now rooted and encrypted with stock recovery, and can still easily factory reset or take an OTA update if I want.
So I decided to unlock the bootloader and flash TWRP, i knew that unlocking it would wipe the data but what happened to me was that after trying to reboot into the system and install SuperSU it would always return to recovery and now it says no OS detected. So now i have to flash a completely stock image and i dont have one. Can anyone help???
EDIT: Used the restore tool(cant remember who by) and it worked fine.
Official twrp does not support squashfs which the new system is in, here is an unofficial build from the twrp forum on the lg g watch
http://www.mediafire.com/download/apwtscp0tn0y8qd/twrp-3.0.0-0-dory+squashfs.img
follow my guide here for rooting on android wear 6.0: http://forum.xda-developers.com/apps/supersu/android-wear-6-0-1-root-squashfs-t3319097
Hi
First a little history...
I recently got an OPX with the intention of installing Sailfish OS on it. So first I need to get CM 12.1 installed. Following the instructions here I flashed TWRP using fastboot, but the version of TWRP provided at the link would not find any system partitions on my device and therefore could not be used to flash any images. Newer versions of TWRP would simply not load.
Eventually, using the stock OPX recovery, I managed to upgrade Oxygen OS to the latest version. I then flashed the latest version of TWRP (3.1.1-1) again and it worked! It found my devices partitions and I could flash ROMs with it. But, it wouldn't flash CM 12.1. Something about a trustzone incompatibility...
So I got the idea to try and downgrade Oxygen OS, which I did via TWRP. But then TWRP stopped working... and here is my problem.
I'm now stuck in a situation where:
- I can access fastboot
- The only versions of TWRP which work (e.g. 3.0.2-0) fail to find my system partitions, and therefore can't be used to flash ROMs
- The stock recovery also seems to fail to find the system partitions (clicking on "install locally" does nothing), so I can't use that to flash ROMs either
So I really need to get a working image on my phone somehow... but how?? Is it possible to do this via fastboot only?
Cheers!
Is your bootloader unlocked? TWRP cannot see system partitions if so.
I unlocked it originally... but since then I have installed a new ROM (Oxygen OS 2.x). Would this overwrite the bootloader? Do I need to unlock again? I think I must be using the old OOS bootloader now...
I think you can see if it's unlocked if you boot into bootloader, connect to pc and write on cmd "fastboot devices".
Whenever you switch between android 5.0 roms and 6.0 and further you have to first use the correct recovery from oneplus, only then you can flash the correct twrp and the adequate roms
My bootloader is unlocked. I cannot flash a new ROM via recovery, because none of the recovery images (stock, TWRP) can see my system partitions (I don't know why). At this stage I would just like to know if there is a way to flash a stock ROM/recovery/bootloader via some other method (fastboot, or a special tool), so I can restore my phone back to factory state. I don't care about losing data. Thanks.
EDIT: Just to clarify, I believe this is my current situation (please correct me if something doesn't make sense):
- OOS has two different bootloaders, 2.x and 3.x.
- The phone originally had OOS 2.x on it. None of the TWRP images I installed recognized my system partitions, so I couldn't flash with TWRP.
- After re-installing the stock recovery (which happened automatically when I booted to the stock ROM), I was able to upgrade to OOS 3.x via stock recovery. Now recent TWRP versions were working (I assume because upgrading to OOS 3.x updated the bootloader too), and were recognizing my system partitions.
- Using a new version of TWRP (3.1.1-1), I re-flashed an older version of OOS 2.x again. I think this was my mistake, because I think this downgraded the bootloader to 2.x again. Now none of the TWRP versions recognize my system partitions, so I cannot flash ROMs.
- I have re-flashed the stock recovery from the OnePlus website, but not even this allows me to flash ROMs. The symptoms look like in TWRP, i.e. that it fails to recognize my system partitions. So I am stuck with no way to flash ROMs, or upgrade the bootloader.
There is an excellent explanation of Xiaomi's antirollback features elsewhere on the site. The thread contains a general overview of the steps required to install TWRP to flash a custom ROM. In brief (i) boot into TWRP installed on local machine with adb (ii) use TRWP to install TWRP itself and/or the ROM (iii) flash away....
My experience has been that TWRP run from the local machine cannot decrypt and access the file system to read/write/execute files. This is despite using the correct PIN, no PIN, factory reset. Note that TWRP cannot access /data so cannot selectively format it.
Any suggestions for a n00b???
droid_tsar said:
There is an excellent explanation of Xiaomi's antirollback features elsewhere on the site. The thread contains a general overview of the steps required to install TWRP to flash a custom ROM. In brief (i) boot into TWRP installed on local machine with adb (ii) use TRWP to install TWRP itself and/or the ROM (iii) flash away....
My experience has been that TWRP run from the local machine cannot decrypt and access the file system to read/write/execute files. This is despite using the correct PIN, no PIN, factory reset. Note that TWRP cannot access /data so cannot selectively format it.
Any suggestions for a n00b???
Click to expand...
Click to collapse
You cannot decrypt it because of:
a: you have to flash twrp with working decryption
b: boot to a custom recovery, WIPE DATA ONLY NOT FACTORY RESET (in advance) then flash Disable_Force_Encryption.zip (This will prevent the system to encrypt data from first boot)
Of course, everything you need is on XDA, just find it.
Xiaomi's AntiRollback feature prevents you from rollbacking from e.g MIUI 10 to MIUI 9 due to the vendor and firmware issues.
More details here https://www.xda-developers.com/xiaomi-anti-rollback-protection-brick-phone/amp/
Thanks Darklouis - solved the problem by not rebooting to the system before flashing the ROM...just reboot into bootloader mode without allowing the encryption to proceed, move ROM into storage and flash from TWRP. Worked well
Darklouis said:
You cannot decrypt it because of:
a: you have to flash twrp with working decryption
b: boot to a custom recovery, WIPE DATA ONLY NOT FACTORY RESET (in advance) then flash Disable_Force_Encryption.zip (This will prevent the system to encrypt data from first boot)
Of course, everything you need is on XDA, just find it.
Xiaomi's AntiRollback feature prevents you from rollbacking from e.g MIUI 10 to MIUI 9 due to the vendor and firmware issues.
More details here https://www.xda-developers.com/xiaomi-anti-rollback-protection-brick-phone/amp/
Click to expand...
Click to collapse
droid_tsar said:
Thanks Darklouis - solved the problem by not rebooting to the system before flashing the ROM...just reboot into bootloader mode without allowing the encryption to proceed, move ROM into storage and flash from TWRP. Worked well
Click to expand...
Click to collapse
Glad to help
It's a tale as old as time. I have a functioning A3 with TWRP and magisk installed. OTA Jan security update failed. "Installation problem" was all it said. I expected this. I think all my magisk mods are systemless but I did flash a custom kernel in TWRP to get kcal.
Ok I'd gone through this for the December update. I downloaded fastboot ROM and extracted the boot.img. I made sure it was correct. Laurel sprout V10.3.13.0.PFQEUXM. But flashing it with either TWRP or fastboot I got the dreaded error screen on reboot where your options are try again or factory reset. Yes I flashed into the active slot. Even when I chose to factory reset and started fresh, I still got the same error when I tried to update.
I also tried to flash boot+system but also got same corrupted error. I tried using flash_all_except_data_storage but got an antirollback error. I've gone back to a nandroid backup for now but obviously I need to get this sorted out before the Android 10 update.
Any ideas? Thanks
Mi A3 doesn't have anti rollback mechanism as far as I know. If you installed TWRP, you also most probably enabled "allow system modifications" (there is a one time prompt on the first start of TWRP, pretty much everyone just dismisses it without reading). TWRP remembers this setting and for each subsequent boot into TWRP it automatically mounts system as R/W, breaking OTA even if you don't flash anything.
You need to reflash stock fastboot images for boot and system with the same version as you're currently running. If you are getting data corruption error, it usually happens when you flash system image from incorrect region or versions differ too much (you're flashing too old image).
Don't install TWRP (or make sure that you delete its settings first and then do NOT allow system modifications).
As you already performed a factory reset, I'd start from fresh state again - switch to active slot A and reflash whole ROM from fastboot, including data wipe (flash_all.bat if I'm not mistaken, but I don't have it in front of me, so double-check its content that it doesn't lock your bootloader).