Related
For LTE model only!
Usual disclaimers apply (i.e., I am not responsible for bricking your device).
Version: 2.8.6.0-12-gf746dbb
Rationale: CM 12 uses the hardware encryption capabilities of the Qualcomm SoC to strengthen the derived encryption key. To be able to decrypt the data partition, the recovery needs a proprietary daemon blob (qseecomd).
Image available in the Downloads section. Install with
Code:
fastboot flash recovery recovery.img
Known issues:
Date is plain wrong
fastboot boot recovery.img breaks hardware encryption. Please flash the image.
Inspiration/Thanks:
cybojenix's recovery
scritch007's CM12.1 ROM
TeamWin's work on qcom hw encryption for the OnePlus One
XDA:DevDB Information
TWRP with hardware encryption, Tool/Utility for the Moto E 2015
Contributors
vlcdsm
Source Code: https://github.com/vianney/android_device_motorola_surnia
Version Information
Status: Testing
Created 2015-05-25
Last Updated 2015-05-28
Great!
Date is wrong! This is unacceptable!
Just playing. Thanks a ton for the updated recovery. You might want to put which version of TWRP in the subject of the OP
Does this make it to where my Stock Backup will restore and boot properly?? After installing CM12.1 my phone won't boot the backup of my Stock 5.0.2 for some reason
jahrule said:
You might want to put which version of TWRP in the subject of the OP
Click to expand...
Click to collapse
Added in the description (it would make the title too long for my taste ).
goldeneagle1972 said:
Does this make it to where my Stock Backup will restore and boot properly?? After installing CM12.1 my phone won't boot the backup of my Stock 5.0.2 for some reason
Click to expand...
Click to collapse
There should be no reason why this recovery works better than another when it comes to restoring a previous backup. How did you make your backup (which recovery, which version, which format/compression)? Was your device encrypted when you took the backup? Can you read the backup files from a desktop computer?
Just bought the Virgin Mobile Moto E this evening and wanted to make sure I could root before I activated. I use Google Authenticator, and I can't backup and restore my keys without Titanium Backup, so root is essential. Not sure if it's a new BL or what, but not a single damn one of the recoveries I have been trying to flash would open. No errors in flashing, just nothing at all would happen when I try to enter recovery after flashing. Finally this worked. I was pretty close to giving up. Thanks so much for the hard work it takes to create these recoveries for the rest of us.
After flashing this recovery I was unable to flash cm12.1 unified. Any ideas? Reverting back to the other version without encryption enabled me to flash custom ROM again.
Is this intended to allow encryption with stock 5.0.* firmware, or is it just for cyanogenmod etc? I've installed this recovery with stock firmware, but hangs on reboot with a black screen after selecting 'encrypt' from security menu.
I have my device encrypted. After installing this recovery, it asks for a password when I enter recovery mode. However, it only asks for a 3x3 pattern - which is not the size of my pattern. So I'm unable to actually use the encryption support :-/ . Is there any way to change the size of the pattern?
(For now, I'll just switch to a PIN, but still...)
I have clean installed Magisk because of an irregularity. To be specific: when I TWRP>Install systemless_xposed-uninstaller-signed.zip, I get an error: Updater process ended with ERROR: 1. TWRP last_log shows ¨e2fsck: No such file or directory¨while trying to open /data/adb/magisk.img¨. So Magisk seems not to be installed.
While this happens, at the same time, when sytem is booted, I have no issues (seemingly) using Magisk manager and installing and using modules.
Because of this irregularity I clean installed Magisk:
- un-installed Magisk through Magisk manager>Uninstall>Complete uninstall
- flashed stock boot image using ¨fastboot flash ramdisk RAMDISK.img¨
- and re-installed Magisk TWRP>Install Magisk-v16.0.zip
After which the Magisk installation on my device is still broken in some way and regarded as ¨weird¨ by fellow xda members; I was advised to ask about it in the device forum.
I attach last_log-magisk-install.txt & last_log-systemless_xposed-uninstaller-signed.txt
Does anybody have a clue and/or experience in this matter maybe?
It's because /data/adb/ is encrypted after installing Magisk.
Not sure why it does that, that folder used to stay unencrypted after installing.
You can use TWRP file manager and check /data/adb/ for encrypted files, and check while booted too. If it's empty it is indeed not installing correctly.
Why are you running Xposed uninstaller by the way?
ante0 said:
It's because /data/adb/ is encrypted after installing Magisk.
Not sure why it does that, that folder used to stay unencrypted after installing.
You can use TWRP file manager and check /data/adb/ for encrypted files, and check while booted too. If it's empty it is indeed not installing correctly.
Why are you running Xposed uninstaller by the way?
Click to expand...
Click to collapse
/data/adb in twrp filemanager looks encrypted yes. Booted to system however, it shows correctly (screenshot). I do not understand why you expected it to be empty as you say.
What do you advise? Decrypt data partition maybe?
You ask why i run Xposed uninstaller; I just ran this script now to get the log. Before all this investgation started I was advised to run it to get rid of possible Xposed framework leftovers after I had installed Xposed, bootlooped and deletef the module.
lvbaal said:
/data/adb in twrp filemanager looks encrypted yes. Booted to system however, it shows correctly (screenshot). I do not understand why you expected it to be empty as you say.
What do you advise? Decrypt data partition maybe?
You ask why i run Xposed uninstaller; I just ran this script now to get the log. Before all this investgation started I was advised to run it to get rid of possible Xposed framework leftovers after I had installed Xposed, bootlooped and deletef the module.
Click to expand...
Click to collapse
No, I meant if it was empty it would be a reason why it can't find magisk.img. But in this case its encryption thats causing it.
You could decrypt, it would fix it. Though as you probably know you'd have to do this after each update.
You might be able to go back to fastboot directly after update finishes and flash twrp, then to twrp and replace fstab in /vendor/etc/ so it doesn't encrypt again. I haven't tested but should work. As long as you don't boot to system before replacing fstab it should stay decrypted.
I have a feeling it's caused by the FBE bypass that was introduced in v16 (actually 1541 from the custom honor v10 link, but added in 16 to stable). Magisk refused to even install because of encryption before this was fixed.
ante0 said:
No, I meant if it was empty it would be a reason why it can't find magisk.img. But in this case its encryption thats causing it.
You could decrypt, it would fix it. Though as you probably know you'd have to do this after each update.
You might be able to go back to fastboot directly after update finishes and flash twrp, then to twrp and replace fstab in /vendor/etc/ so it doesn'tencrypt again. I haven't tested but should work. As long as you don't boot to system before replacing fstab it should stay decrypted.
I have a feeling it's caused by the FBE bypass that was introduced in v16 (actually 1541 from the custom honor v10 link, but added in 16 to stable). Magisk refused to even install because of encryption before this was fixed.
Click to expand...
Click to collapse
Thanks for your input. I'll keep decrypting in mind. For now, it looks like I can install a module from Magisk manager - greenify4magisk. I could not do this however when I had v16. Now on v16.1 it installs. I will check it's functioning later.
ante0 said:
No, I meant if it was empty it would be a reason why it can't find magisk.img. But in this case its encryption thats causing it.
You could decrypt, it would fix it. Though as you probably know you'd have to do this after each update.
You might be able to go back to fastboot directly after update finishes and flash twrp, then to twrp and replace fstab in /vendor/etc/ so it doesn't encrypt again. I haven't tested but should work. As long as you don't boot to system before replacing fstab it should stay decrypted.
I have a feeling it's caused by the FBE bypass that was introduced in v16 (actually 1541 from the custom honor v10 link, but added in 16 to stable). Magisk refused to even install because of encryption before this was fixed.
Click to expand...
Click to collapse
I'm not sure what alteration in /vendor/etc/fstab is needed to prevent encryption. Can you elaborate maybe? Also, in this regard, can you confirm the following:
when I decide to format internal storage in TWRP with ¨Format Data¨and thus getting rid of encryption(link), will it still be (re-)encrypted if I use the unmodified stock kernel (I'm using stock Emui8)? If so, do you know of a modified kernel without encryption for BLA-L29(C432)?
lvbaal said:
I'm not sure what alteration in /vendor/etc/fstab is needed to prevent encryption. Can you elaborate maybe? Also, in this regard, can you confirm the following:
when I decide to format internal storage in TWRP with ¨Format Data¨and thus getting rid of encryption(link), will it still be (re-)encrypted if I use the unmodified stock kernel (I'm using stock Emui8)? If so, do you know of a modified kernel without encryption for BLA-L29(C432)?
Click to expand...
Click to collapse
This flag: ",fileencryption=aes-256-xts:aes-256-cts" on the /data line needs to be removed. After that you format data in twrp and decryption will stick. As of Oreo fstab is located in /vendor/etc so it doesn't matter what ramdisk you use, only matter is when you update firmware as /vendor is over-written. In theory you should be able to update, go straight to fastboot after and flash twrp, go to twrp and replace fstab. I haven't tested that yet, but as long as you don't boot to system it should stay decrypted.
(TWRP with FBE decryption support is on the horizon so you might want to wait. A fix was pushed a few days ago and it works on Honor 9, we just need a newly built twrp. I can't get the 8.1 tree to build a working one so I will check if it can be done with the 7.1 tree.)
ante0 said:
This flag: ",fileencryption=aes-256-xts:aes-256-cts" on the /data line needs to be removed. After that you format data in twrp and decryption will stick. As of Oreo fstab is located in /vendor/etc so it doesn't matter what ramdisk you use, only matter is when you update firmware as /vendor is over-written. In theory you should be able to update, go straight to fastboot after and flash twrp, go to twrp and replace fstab. I haven't tested that yet, but as long as you don't boot to system it should stay decrypted.
(TWRP with FBE decryption support is on the horizon so you might want to wait. A fix was pushed a few days ago and it works on Honor 9, we just need a newly built twrp. I can't get the 8.1 tree to build a working one so I will check if it can be done with the 7.1 tree.)
Click to expand...
Click to collapse
Hi and thanks for the clarification. As I'm in the process of re-flashing complete stock firmware (131->138 from pro-teammt.ru) I think I will be going for the solution provided by @Didgeridoohan. As I understand it at this moment, both solutions will permanently decrypt my /data, but the your solution does not mention Magisk installation. Does a Magisk installation not have any bearing to the issue then?
lvbaal said:
Hi and thanks for the clarification. As I'm in the process of re-flashing complete stock firmware (131->138 from pro-teammt.ru) I think I will be going for the solution provided by @Didgeridoohan. As I understand it at this moment, both solutions will permanently decrypt my /data, but the your solution does not mention Magisk installation. Does a Magisk installation not have any bearing to the issue then?
Click to expand...
Click to collapse
I'm not sure Magisk can. It could when I pushed a commit that added fileencryptioninline (this was for nougat), and when fstab was located in boot partition.
But that was removed as it broke support for Pixel devices.
This is what it looks for: https://github.com/topjohnwu/Magisk...285d860b4d95db13f7/native/jni/utils/pattern.c
"const char *encrypt_list[] = { "forceencrypt", "forcefdeorfbe", NULL };"
As you see it doesn't contain "fileencryption".
I'm not sure it even looks for fstab in /vendor. That would break the systemlessness of Magisk (doesn't modify /system or /vendor)
Though, it doesn't matter anyway, it does the exact same thing as manually editing /vendor/etc/fstab.kirin970
You can test though, to confirm
When you do Format Data you need to manually flash back the public and hw data zips in TWRP, they give errors but it's the folder "hw_init" that's placed in /data/ that's needed. Themes and stuff are in there.
ante0 said:
This flag: ",fileencryption=aes-256-xts:aes-256-cts" on the /data line needs to be removed. After that you format data in twrp and decryption will stick. As of Oreo fstab is located in /vendor/etc so it doesn't matter what ramdisk you use, only matter is when you update firmware as /vendor is over-written. In theory you should be able to update, go straight to fastboot after and flash twrp, go to twrp and replace fstab. I haven't tested that yet, but as long as you don't boot to system it should stay decrypted.
(TWRP with FBE decryption support is on the horizon so you might want to wait. A fix was pushed a few days ago and it works on Honor 9, we just need a newly built twrp. I can't get the 8.1 tree to build a working one so I will check if it can be done with the 7.1 tree.)
Click to expand...
Click to collapse
Thanks again But I cannot quite picture this; when you say ¨In theory you should be able to update, go straight to fastboot after and flash twrp¨, because when I have flashed the complete stock firmware, I suppose Developper option USB debugging is off and I cannot send command <fastboot flash recovery_ramdisk twrp.img> from PC, or can I?
lvbaal said:
Thanks again But I cannot quite picture this; when you say ¨In theory you should be able to update, go straight to fastboot after and flash twrp¨, because when I have flashed the complete stock firmware, I suppose Developper option USB debugging is off and I cannot send command <fastboot flash recovery_ramdisk twrp.img> from PC, or can I?
Click to expand...
Click to collapse
When you flash on Oreo it will not wipe anything, /data stays.
Basically it does an OTA but with a full fw.
Unless you factory reset after, then it would wipe.
As I said it's in theory as I haven't tested it yet, so you're free to try if you're going to update anyway
Mine has been on everytime I've updated anyway. Only difference was in Nougat where bootloader was locked and you had to unlock it, which meant a mandatory wipe...
ante0 said:
This flag: ",fileencryption=aes-256-xts:aes-256-cts" on the /data line needs to be removed. After that you format data in twrp and decryption will stick. As of Oreo fstab is located in /vendor/etc so it doesn't matter what ramdisk you use, only matter is when you update firmware as /vendor is over-written. In theory you should be able to update, go straight to fastboot after and flash twrp, go to twrp and replace fstab. I haven't tested that yet, but as long as you don't boot to system it should stay decrypted.
(TWRP with FBE decryption support is on the horizon so you might want to wait. A fix was pushed a few days ago and it works on Honor 9, we just need a newly built twrp. I can't get the 8.1 tree to build a working one so I will check if it can be done with the 7.1 tree.)
Click to expand...
Click to collapse
Hello again. I've studied the shell scripts used in the HWOTA8 package and found out that the kernel and stock recovery will be flashed to the device after which it switches to recovery mode and the update zips will be pushed to /data/update along with update commands in /cache/recovery/command. Then it is supposed to reboot to recovery; to apply the updates I presume?. So when I interrupt this flow and do not boot to recovery but to fastboot to flash twrp and replace fstab, how will the updates be applied then?
I attach the script in question.
Any news already on TWRP on the horizon?
lvbaal said:
Hello again. I've studied the shell scripts used in the HWOTA8 package and found out that the kernel and stock recovery will be flashed to the device after which it switches to recovery mode and the update zips will be pushed to /data/update along with update commands in /cache/recovery/command. Then it is supposed to reboot to recovery; to apply the updates I presume?. So when I interrupt this flow and do not boot to recovery but to fastboot to flash twrp and replace fstab, how will the updates be applied then?
I attach the script in question.
Any news already on TWRP on the horizon?
Click to expand...
Click to collapse
First, copy fstab to computer and remove the fileencryption flag.
If course you need to flash update first.
You install update using HWOTA8. After it's done with the update in recovery mode you boot directly to fastboot instead of booting to system. You'd have to watch phone while it's updating as it reboota automatically. You should have USB plugged in already, so just start holding vol down when it says update is complete and it will reboot and you should land in fastboot. Now flash twrp to recovery_ramdisk and type 'fastboot reboot'. Remove USB and hold vol up. Now you should boot to twrp. Adb push the modified fstab to /vendor/etc/fstab.kirin970.
Also check Internal storage in twrp to make sure it's still decrypted. (you would have to decrypt before installing update to make sure this theory actually works ).
I could actually test it tonight on my Mate 9.
As for TWRP, the fix has been pushed to gerrit but it's not merged yet. I've been trying to get the android-8.0/8.1 branch to build a functional twrp but no luck yet. For some reason a bunch of folders are missing, and I'm not sure why. They are there in the source branch for both 8.0/8.1... I will test using git clone instead if repo sync.
ante0 said:
As for TWRP, the fix has been pushed to gerrit but it's not merged yet. I've been trying to get the android-8.0/8.1 branch to build a functional twrp but no luck yet. For some reason a bunch of folders are missing, and I'm not sure why. They are there in the source branch for both 8.0/8.1... I will test using git clone instead if repo sync.
Click to expand...
Click to collapse
I managed to build an Ubuntu based development environment, but using minimal manifest (8.1 branch) to build TWRP throws errors (i don't know if you have the same errors).
Here's the error log - > https://pastebin.com/C6jVg2eY
ante0 said:
First, copy fstab to computer and remove the fileencryption flag.
If course you need to flash update first.
You install update using HWOTA8. After it's done with the update in recovery mode you boot directly to fastboot instead of booting to system. You'd have to watch phone while it's updating as it reboota automatically. You should have USB plugged in already, so just start holding vol down when it says update is complete and it will reboot and you should land in fastboot. Now flash twrp to recovery_ramdisk and type 'fastboot reboot'. Remove USB and hold vol up. Now you should boot to twrp. Adb push the modified fstab to /vendor/etc/fstab.kirin970.
Also check Internal storage in twrp to make sure it's still decrypted. (you would have to decrypt before installing update to make sure this theory actually works ).
I could actually test it tonight on my Mate 9.
As for TWRP, the fix has been pushed to gerrit but it's not merged yet. I've been trying to get the android-8.0/8.1 branch to build a functional twrp but no luck yet. For some reason a bunch of folders are missing, and I'm not sure why. They are there in the source branch for both 8.0/8.1... I will test using git clone instead if repo sync.
Click to expand...
Click to collapse
Actually the ota.sh script boots to recovery after pushing the update. Presumably to apply the update through stock recovery. There fore I issued command adb reboot bootloader in an other powershell window. Then I flashed TWRP rebooted to TWRP to replace replaced fstab but then TWRP decides to apply the update because of input in /cache/recovery/command, so at that point I cannot replace fstab. Therefor I altered the script ota.sh and de-activated writes to /cache/recovery/command, and started over...
[/B]
lvbaal said:
Actually the ota.sh script boots to recovery after pushing the update. Presumably to apply the update through stock recovery. There fore I issued command adb reboot bootloader in an other powershell window. Then I flashed TWRP rebooted to TWRP to replace replaced fstab but then TWRP decides to apply the update because of input in /cache/recovery/command, so at that point I cannot replace fstab. Therefor I altered the script ota.sh and de-activated writes to /cache/recovery/command, and started over...
[/B]
Click to expand...
Click to collapse
Well, it has to apply the update in stock recovery. It can't do it in TWRP.
Basically you:
Format Data in TWRP and replace fstab with one that has fileencryption flag removed.
Boot to system once and then back to TWRP, check that you are decrypted (file manager in TWRP to Internal SD or browse child folders in /data).
Run HWOTA8 and let it update through stock recovery.
When it's done updating and about to reboot back to system, hold vol down so it goes to fastboot mode.
Now flash TWRP and issue 'fastboot reboot', quickly remove usb cable and hold volume up. Or remove usb and hold power+vol up.
Check that you are still decrypted.
Replace Fstab again with the 'fileencryption' flag removed one.
Now you can boot to system.
Edit: I managed to get TWRP source working, will test the decrypt fix soon.
---------- Post added at 08:44 PM ---------- Previous post was at 08:01 PM ----------
Pretoriano80 said:
I managed to build an Ubuntu based development environment, but using minimal manifest (8.1 branch) to build TWRP throws errors (i don't know if you have the same errors).
Here's the error log - > https://pastebin.com/C6jVg2eY
Click to expand...
Click to collapse
You need the full Omni source. Takes a while to sync
It's missing stuff from minimal that's needed.
After it's done syncing, you need to git clone https://github.com/omnirom/android_bootable_recovery to TWRPfolder/bootable/ and replace the recovery folder.
Same with https://github.com/omnirom/android_external_busybox/ to TWRPfolder/external/busybox (folder doesn't exist).
I'm not sure why it does this, the source looks fine when viewed in browser, but it doesn't sync everything...
ante0 said:
Well, it has to apply the update in stock recovery. It can't do it in TWRP.
Basically you:
Format Data in TWRP and replace fstab with one that has fileencryption flag removed.
Boot to system once and then back to TWRP, check that you are decrypted (file manager in TWRP to Internal SD or browse child folders in /data).
Run HWOTA8 and let it update through stock recovery.
When it's done updating and about to reboot back to system, hold vol down so it goes to fastboot mode.
Now flash TWRP and issue 'fastboot reboot', quickly remove usb cable and hold volume up. Or remove usb and hold power+vol up.
Check that you are still decrypted.
Replace Fstab again with the 'fileencryption' flag removed one.
Now you can boot to system.
Edit: I managed to get TWRP source working, will test the decrypt fix soon.
Click to expand...
Click to collapse
When I format data in twrp, replace fstab and boot to system once and then back to twrp to check encryption state in twrp filemanager, will /data not be empty then, so there's noting to check? Or am I missing something here?
lvbaal said:
When I format data in twrp, replace fstab and boot to system once and then back to twrp to check encryption state in twrp filemanager, will /data not be empty then, so there's noting to check? Or am I missing something here?
Click to expand...
Click to collapse
/data will not be empty. Unless you completely wipe it. But I think phone refuses to boot if you Wipe instead of Format Data
ante0 said:
/data will not be empty. Unless you completely wipe it. But I think phone refuses to boot if you Wipe instead of Format Data
Click to expand...
Click to collapse
I took my chances and did as proposed: only booting to system will not happen: it tries 2 times and the third time Huawei eRecovery comes up ¨Data partition was damaged seriously and you are recommended to format it to recover your phone¨ . It recommends Low level format data partition or shutdown. I chose Shutdown and booted to twrp once more to check /data. There's only lost+found and media/0 both empty. So /data turns out to be empty nevertheless. I did not completely wipe it; I did TWRP>Wipe>Format Data and typed ¨yes¨ to continue. Is this not what you meant by Format data in TWRP then?
lvbaal said:
I took my chances and did as proposed: only booting to system will not happen: it tries 2 times and the third time Huawei eRecovery comes up ¨Data partition was damaged seriously and you are recommended to format it to recover your phone¨ . It recommends Low level format data partition or shutdown. I chose Shutdown and booted to twrp once more to check /data. There's only lost+found and media/0 both empty. So /data turns out to be empty nevertheless. I did not completely wipe it; I did TWRP>Wipe>Format Data and typed ¨yes¨ to continue. Is this not what you meant by Format data in TWRP then?
Click to expand...
Click to collapse
Yes. That's where you Format Data.
Hmm.
Unless this twrp actually wipes rather than format.
Did you do update too now or just remove the flag in fstab and Format Data?
To get to Low level format, flash stock recovery OR the nocheck recovery from HWOTA8.
Hey,
Does anyone know where I can find the secure startut options in my Mate 10 Pro (running EMUI 9.1.0)?
Or did Huawei remove that from EMUI ?
Thanks !
utilisateur75 said:
Hey,
Does anyone know where I can find the secure startut options in my Mate 10 Pro (running EMUI 9.1.0)?
Or did Huawei remove that from EMUI ?
Thanks !
Click to expand...
Click to collapse
It can be initiated from recovery if I remember correctly. If that's what you mean, safe mode?
If you currently have Magisk or TWRP as recovery you'd have to flash back stock recovery_ramdisk to get there.
ante0 said:
It can be initiated from recovery if I remember correctly. If that's what you mean, safe mode?
If you currently have Magisk or TWRP as recovery you'd have to flash back stock recovery_ramdisk to get there.
Click to expand...
Click to collapse
I made additional research. Secure Startup is something available for android 9 and lower version. When secure startup is activated in your settings, you have to enter a first password if you want the phone to boot.
As far as I understand, secure startup goes with Full Disk Encryption,and is no more an option with File Based Encryption.
utilisateur75 said:
I made additional research. Secure Startup is something available for android 9 and lower version. When secure startup is activated in your settings, you have to enter a first password if you want the phone to boot.
As far as I understand, secure startup goes with Full Disk Encryption,and is no more an option with File Based Encryption.
Click to expand...
Click to collapse
Ah, sorry. I misunderstood you. Iirc you can achieve it, but on EMUI 9.1 it's a lot harder as they switched to erofs. You'd have to unpack vendor image, modify fstab to remove encryption (FBE) and repack it as an erofs image, then flash the image from TWRP as you can't flash vendor from fastboot directly. After this you should be able to encrypt from Settings. You'd need an unlocked phone for this though, and it will switch back to FBE on the next update.
So in my opinion, it's much more work than its worth. :/
I was a Mi A2 user for a while, now I'm moving to Note 9 Pro and I feel a bit lost because of lacking of guides and tools.
I encounter some unexpected issues with disabling phone encryption. In short, I followed the steps I used for my Mi A2, but it seemed only working partially, and I encountered boot loop when upgrading ROM afterwards.
The details are as follow:
I have Note 9 Pro global (joyeuse), originally it was on stock ROM V11.0.5.0.QJZMIXM
After unlocking bootloader, I booted to TWRP with TWRP-3.4.1B-joyeuse-fix.img (from https://xiaomi.eu/community/threads/custom-twrp-3-4-1b-for-redmi-note-9-pro-joyeuse.56896/ ) and flashed Magisk, then Disable_Dm-Verity_ForceEncrypt_03.04.2020.zip (from https://zackptg5.com/android.php#disverfe )
Everything was fine, I could debloat and disable Xiaomi services, and Google Pay was working (with Magisk Hide and MagiskHide Props Config).
But when entering TWRP again, TWRP requested passcode to decrypt data, that's when I realized the phone was not decrypted. Booting to normal mode, phone Settings showed "Encrypted". But because TWRP was able to decrypt with passcode and could backup as normal, so I ignored it.
When V11.0.7.0.QJZMIXM was released, I backed up /data using TWRP and flashed the new ROM using fastboot without erasing data. Then the phone was in boot loop (it showed redmi logo then vibrated then rebooted)
I flashed back V11.0.5.0.QJZMIXM without erasing data, but it still entered boot loop.
I decided to wipe data (using TWRP and using Wipe menu in XIaomi recovery mode), but boot loop still occurred.
I flashed V11.0.7.0.QJZMIXM again, but this time without keeping data (flash_all.bat), but boot loop still occurred.
I accidentally selected flash all & lock bootloader (in MiFlashTool), then phone could boot up normally. But I lost root, and bootloader was relocked.
Additional info: In a rage, I turned on Developer mode and tapped to bind mi account, and now I have to wait 168hrs to unlock bootloader again.
Questions:
What have I done wrong that the phone entered boot loop even after wiping data?
What's the proper way of using TWRP so that I can backup data and can update ROM in the future without going through this mess again?
HRSE said:
I was a Mi A2 user for a while, now I'm moving to Note 9 Pro and I feel a bit lost because of lacking of guides and tools.
I encounter some unexpected issues with disabling phone encryption. In short, I followed the steps I used for my Mi A2, but it seemed only working partially, and I encountered boot loop when upgrading ROM afterwards.
The details are as follow:
I have Note 9 Pro global (joyeuse), originally it was on stock ROM V11.0.5.0.QJZMIXM
After unlocking bootloader, I booted to TWRP with TWRP-3.4.1B-joyeuse-fix.img (from https://xiaomi.eu/community/threads/custom-twrp-3-4-1b-for-redmi-note-9-pro-joyeuse.56896/ ) and flashed Magisk, then Disable_Dm-Verity_ForceEncrypt_03.04.2020.zip (from https://zackptg5.com/android.php#disverfe )
Everything was fine, I could debloat and disable Xiaomi services, and Google Pay was working (with Magisk Hide and MagiskHide Props Config).
But when entering TWRP again, TWRP requested passcode to decrypt data, that's when I realized the phone was not decrypted. Booting to normal mode, phone Settings showed "Encrypted". But because TWRP was able to decrypt with passcode and could backup as normal, so I ignored it.
When V11.0.7.0.QJZMIXM was released, I backed up /data using TWRP and flashed the new ROM using fastboot without erasing data. Then the phone was in boot loop (it showed redmi logo then vibrated then rebooted)
I flashed back V11.0.5.0.QJZMIXM without erasing data, but it still entered boot loop.
I decided to wipe data (using TWRP and using Wipe menu in XIaomi recovery mode), but boot loop still occurred.
I flashed V11.0.7.0.QJZMIXM again, but this time without keeping data (flash_all.bat), but boot loop still occurred.
I accidentally selected flash all & lock bootloader (in MiFlashTool), then phone could boot up normally. But I lost root, and bootloader was re-locked.
Additional info: In a rage, I turned on Developer mode and tapped to bind mi account, and now I have to wait 168hrs to unlock bootloader again.
Questions:
What have I done wrong that the phone entered boot loop even after wiping data?
What's the proper way of using TWRP so that I can backup data and can update ROM in the future without going through this mess again?
Click to expand...
Click to collapse
first of all you are not the only one that faces same problems. So chears mate. Next is the TWRP and the lack of stable/working version since i have done quite few phones now i can tell that the TWRP encryption ignore is not persistent and it works while you don't touch the recovery and not booting it up. Upon the boot it triggers the encryption and although he filesystem is not encrypted it still thinks it is.
Solution for now? wait for the fixed version while this is new phone and may take some time to re-code he recovery (find the damn cause of the encryption trigger).
Anyways. I am still thinking to do the fastboot rom mod, root it while it is not flashed and hen flash it while i don't actually need. I just need to remove all the miui/xiaomi stuff, block the damn ADS and root the phone and those things can be done on a pc i am just figuring out the correct way to do i.
The idea about skipping the TWRP came right after i downloaded mi-flash tool and found out that it uses same fastboot mode to flash everything and the file structure of the rom is not packet or something. Img files can be exacted and re-packed again so everything in the image can be modified.
What i really hate is the fact that there is tons of tools for other phones but somehow Xiaomi was skipped in the device selection...
Downloaded unlock tool, nice but limited to only requesting ad unlocking the phones bootloader. Next thing is the flash tool, it is limited to only flashing. There is xiaomi tool v2 that can also install the twrp, and cause the encryption crap or download and install stock or xiaomi.eu...
What i was looking for was the tool that can take the stock, decompress it and allow you to choose the apps you want to be per-installed, add some functions to it, mod bootscreens, pre-root it and eventually pack and flash the damn thing. While you are skipping the recovery procedure you are way safer than with its crap.
Agree with me?
daigtas said:
first of all you are not the only one that faces same problems. So chears mate. Next is the TWRP and the lack of stable/working version since i have done quite few phones now i can tell that the TWRP encryption ignore is not persistent and it works while you don't touch the recovery and not booting it up. Upon the boot it triggers the encryption and although he filesystem is not encrypted it still thinks it is.
Solution for now? wait for the fixed version while this is new phone and may take some time to re-code he recovery (find the damn cause of the encryption trigger).
Anyways. I am still thinking to do the fastboot rom mod, root it while it is not flashed and hen flash it while i don't actually need. I just need to remove all the miui/xiaomi stuff, block the damn ADS and root the phone and those things can be done on a pc i am just figuring out the correct way to do i.
The idea about skipping the TWRP came right after i downloaded mi-flash tool and found out that it uses same fastboot mode to flash everything and the file structure of the rom is not packet or something. Img files can be exacted and re-packed again so everything in the image can be modified.
What i really hate is the fact that there is tons of tools for other phones but somehow Xiaomi was skipped in the device selection...
Downloaded unlock tool, nice but limited to only requesting ad unlocking the phones bootloader. Next thing is the flash tool, it is limited to only flashing. There is xiaomi tool v2 that can also install the twrp, and cause the encryption crap or download and install stock or xiaomi.eu...
What i was looking for was the tool that can take the stock, decompress it and allow you to choose the apps you want to be per-installed, add some functions to it, mod bootscreens, pre-root it and eventually pack and flash the damn thing. While you are skipping the recovery procedure you are way safer than with its crap.
Agree with me?
Click to expand...
Click to collapse
More than one month, 280 view, 1 comment, no solution, no answer. Everyone out there are competing with each other to create their own ROMs/recovery/kernel images with whatever catchy names they can think of. Nice. But what's the point if the basics are not yet nailed down?
BTW, Telegram channel is flooded with non-contributing chit chat.
My casual observation is that lrtwrp seems to be a common theme for those who have had major issues on Joyeuse.
sir_bazz said:
My casual observation is that lrtwrp seems to be a common theme for those who have had major issues on Joyeuse.
Click to expand...
Click to collapse
For what it's worth, TWRP does not currently have any official builds for curtana OR joyeuse as far as I can tell. The flashing of early, unofficial, pre-alpha ports of TWRP directly onto partitions causing bricks is not that surprising. Xiaomi locking down EDL access is a ****ty move, but still.
[RECOVERY] TWRP 3.6.0_11-0 - TeamWin Recovery Project
Introduction:
Team Win Recovery Project or TWRP for short, is a custom recovery built with ease of use and customization in mind. We started from the ground up by taking AOSP recovery and loading it with the standard recovery options, then added a lot of our own features. It's a fully touch driven user interface , no more volume rocker or power buttons to mash. The GUI is also fully XML driven and completely theme-able. You can change just about every aspect of the look and feel.
Key Features:
Touchscreen driven with real buttons and drag-to-scroll
XML-based GUI that allows full customization of the layout true theming!
Settings are saved to the sdcard and persist through reboots
Ability to choose which partitions to back up and which to restore
Ability to choose to compress backups now with pigz (multi-core processor support for faster compression times)
Onscreen keyboard
Easy selection of internal/external storage
In addition to the above new features, TWRP features a scripting engine that allows an app to send commands to the recovery for the recovery to perform during startup. We call this scripting engine OpenRecoveryScript. The app will also let you choose to install multiple zips from within Android, wipe, and run a backup.
We are looking for other talented developers, themers, and device maintainers if they are interested in helping with a free, open source project.
Source Code:
GitHub - https://github.com/TeamWin/android_bootable_recovery
Gerrit Instance - http://gerrit.twrp.me
If you have made your own TWRP build for an unsupported device, please let us know. We might add your build to the list of official builds.
Device Config: https://github.com/bigbiff/android_device_google_crosshatch
Hello, this is a test build for crosshatch users.
If others thing don't work, please report the issue and let me know.
I am opening this thread to replace @Dees_Troy's thread with his blessing.
http://twrp.me
I tried to boot to this image on my bootloader-unlocked Pixel 3, but the operation failed.
With the device connected and the bootloader active, I ran the following command:
Code:
$ fastboot boot twrp-3.6.0_11-0-blueline.img
Sending 'boot.img' (65536 KB) OKAY [ 1.797s]
Booting FAILED (remote: 'Error verifying the received boot.img: Buffer Too Small')
fastboot: error: Command failed
I had just performed a factory reset (from
blueline-qq3a.200805.001). Flashing a blank vbmeta.img to disable verification did not resolve the error.
Thanks @bigbiff I've now got this installed on my Pixel 3 running Lineage 18 (A11). So nice to have TWRP back!! I've got one question about backing up. I'm seeing the following backup options:
Data (excluding storage)
Boot
Persist
Super (system system_ext vendor product)
I've not seen this "Persist" before. If I want to backup/restore the device, using TWRP, should all four of these options be selected?
Thanks again!
brainchild said:
I tried to boot to this image on my bootloader-unlocked Pixel 3, but the operation failed.
With the device connected and the bootloader active, I ran the following command:
Code:
$ fastboot boot twrp-3.6.0_11-0-blueline.img
Sending 'boot.img' (65536 KB) OKAY [ 1.797s]
Booting FAILED (remote: 'Error verifying the received boot.img: Buffer Too Small')
fastboot: error: Command failed
I had just performed a factory reset (from
blueline-qq3a.200805.001). Flashing a blank vbmeta.img to disable verification did not resolve the error.
Click to expand...
Click to collapse
See this post, and the subsequent posts.
TWRP 3.2.3-2 for Pixel 3
MTP does not work in TWRP on the Pixel 3 and will not work until we have time to update the TWRP MTP implementation. You may still use adb to push and pull files. Pixel devices have 2 "slots" for ROMs / firmware. TWRP will detect whichever slot...
forum.xda-developers.com
OTG not working -_-
Thank you for the earlier reply. I am still learning about the relation between original firmware, Android version, recovery version, and partition layout. Whereas previously each had been largely independent of the others, recent changes have brought them into a very close dependence, which is often not clarified in the distribution of the various components.
I applied Android 11 firmware to the device, and was able to boot from the image.
I am now having problems installing custom Android 11 images, due to limited space on the system partition. In some cases, I can install the image but not Gapps, not even the pico size.
The general recommendation for this problem is to use the Advanced Wipe feature to resize the partition, but I have found no partition labeled System in the list.
The partitions listed under Advanced Wipe are only the following:
Dalvik / ART Cache
metadata
Data
Internal Storage
USB-OTG
I was able to install LineageOS entirely successfully using the project's own recovery, and then, once the main system was ready, install the TWRP 3.6 recovery image. While this procedure has appeared as a viable workaround, I look forward to any clarification about completing the installation entirely through TWRP. I also look forward to clarification about whether these observations indeed represent a current limitation in the TWRP images available for the device, and whether any other limitations are known.
Wow - TWRP for the Pixel 3 - finally!! What a great job, and thank you very, very much! Successfully completed my very first backup of my Blueline tonight; for the first time since buying this great phone over 18 months ago.
Issues I have found:
USB-OTG doesn't seem to work; I was hoping I could perform the backup to a USB flash drive.
Also, could not seem to get ADB from my computer to work.
Thank you so much @bigbiff for your hard work on this. It is very much appreciated! Well done!!
I do have one question, if I may: is it safe to flash this to recovery, or should we only use it via "fastboot boot twrp..."?
shaunoleary said:
Wow - TWRP for the Pixel 3 - finally!! What a great job, and thank you very, very much! Successfully completed my very first backup of my Blueline tonight; for the first time since buying this great phone over 18 months ago.
Issues I have found:
USB-OTG doesn't seem to work; I was hoping I could perform the backup to a USB flash drive.
Also, could not seem to get ADB from my computer to work.
Thank you so much @bigbiff for your hard work on this. It is very much appreciated! Well done!!
Click to expand...
Click to collapse
Thank you so much too, @bigbiff . Although USB-otg cannot be used, I can back up data on ArrowOS 12.0 without issues. Till now, I haven't tested restoration of my backup data yet.
Can this version of TWRP handle encrypted phones? (ones with lock screen passwords) I've been poking around the internet finding conflicting information.
Fnord12 said:
Can this version of TWRP handle encrypted phones? (ones with lock screen passwords) I've been poking around the internet finding conflicting information.
Click to expand...
Click to collapse
It can handle Android 11 encryption. I don't believe Android 12 encryption works yet.
dcarvil said:
It can handle Android 11 encryption. I don't believe Android 12 encryption works yet.
Click to expand...
Click to collapse
Fun, looks like i'll be waiting for a bit then as I was eyeballing one of the Android 12 ROMs to put on my Pixel 3 and i'll need encryption for NFC payment stuff.
Fnord12 said:
Fun, looks like i'll be waiting for a bit then as I was eyeballing one of the Android 12 ROMs to put on my Pixel 3 and i'll need encryption for NFC payment stuff.
Click to expand...
Click to collapse
You can still use it on Android 12 - you just need to remove the PIN first, then restore it afterwards.
dcarvil said:
You can still use it on Android 12 - you just need to remove the PIN first, then restore it afterwards.
Click to expand...
Click to collapse
You need to remove PIN on Android 12 before invoking backup process of your encrypted data on TWRP as @bigbiff said another thread. Probably, you can restore the backup data after removing PIN on Android 12. Then, you can set PIN on Android 12 again after the restoration.
Another observation... After a OTA update, LineageOS replaced the recovery with its own. From booting the TWRP image from a fastboot connection, the resulting session of TWRP shows option in the advanced menu for installing TWRP to the device. I'm not sure that I would be able to reinstall TWRP without this option, since attempts to flash through fastboot had failed previously. I'm confused about why this menu item no longer appears.
brainchild said:
Another observation... After a OTA update, LineageOS replaced the recovery with its own. From booting the TWRP image from a fastboot connection, the resulting session of TWRP shows option in the advanced menu for installing TWRP to the device. I'm not sure that I would be able to reinstall TWRP without this option, since attempts to flash through fastboot had failed previously. I'm confused about why this menu item no longer appears.
Click to expand...
Click to collapse
You can use Flash Current TWRP to have TWRP reinjected in the ramdisk, it's not showing up for you?
bigbiff said:
You can use Flash Current TWRP to have TWRP reinjected in the ramdisk, it's not showing up for you?
Click to expand...
Click to collapse
No. I believe what has happened is that the OTA update switched the active slot from A to B, with TWRP still residing on the now inactive slot A. Perhaps TWRP only looks in slot A, and if it finds itself installed, it hides this menu entry.
I am not sure what the general use pattern is, as I am still learning the newer paradigm of seamless updates, and A/B and dynamic partitions. Is TWRP compatible with OTA updates? What is the general usage pattern? The updated slot seems to have retained Magisk.
brainchild said:
No. I believe what has happened is that the OTA update switched the active slot from A to B, with TWRP still residing on the now inactive slot A. Perhaps TWRP only looks in slot A, and if it finds itself installed, it hides this menu entry.
I am not sure what the general use pattern is, as I am still learning the newer paradigm of seamless updates, and A/B and dynamic partitions. Is TWRP compatible with OTA updates? What is the general usage pattern? The updated slot seems to have retained Magisk.
Click to expand...
Click to collapse
Usually you have to reinstall twrp to the boot partition, which is typically not A/B
bigbiff said:
Usually you have to reinstall twrp to the boot partition, which is typically not A/B
Click to expand...
Click to collapse
The boot partition is shared by both slots, or each has a separate boot partition? It seems two recoveries are resident on the device.
brainchild said:
The boot partition is shared by both slots, or each has a separate boot partition? It seems two recoveries are resident on the device.
Click to expand...
Click to collapse
There are two boot partitions, boot_a and boot_b.
dcarvil said:
There are two boot partitions, boot_a and boot_b.
Click to expand...
Click to collapse
Right. It seems that when I originally loaded the firmware and installed TWRP, it installed to slot A. Later, LineageOS installed its OTA update on slot B, and activated it. Now the active recovery is the LOS recovery, in slot B. I can boot TWRP from fastboot, but the resulting session may be hiding the menu entry for installation on the the device because it detects itself already installed on slot A.
I suppose the questions are whether installation to multiple slots is supported by TWRP, and whether TWRP and LOS support integration for OTA updates.
More generally, the overall question is what is the overall recommended usage pattern for updating LOS when TWRP is also installed.