Cannot reboot to TWRP from system or perform OTA updates - Xperia Z3 Compact Q&A, Help & Troubleshooting

Hello all,
I am pretty sure my problem has nothing to do with Carbon ROM, but one of the symptom I have is the unability to perform OTA update from CR-6.1, I ask for help here instead of on the ROM thread in case someone experienced the same :
- I used TWRP to flash CR-6.1 on a Z3C with TWRP. I unlocked the bootloader and flashed the recovery using fastboot (fastboot flash recovery xxx.img).
- CR-6.1 was properly flashed, boots without issues, but then if I try to reboot on recovery from here (using the power menu), the phone just reboots, and won't go to TWRP. Then it seems logical that when it tries to reboot on recovery to perform the OTA update it fails, since it just reboots to CR.
- My only was to access recovery is to press the down volume button while powering it up : It boots to TWRP successfully
- But then, if I try to manually flash the .zip file downloaded by the OTA, I get an error message (error 7): The devicename does not match, TWRP (official release 3.0.2-1) detects the phone as "". Note that with unofficial release 3.2.3-0 found here I get no error 7 message : The manual flash is successful.
I checked other posts here on XDA, one solution would be to just modify the device name in the .zip, then it works but I wonder if all these are not a symptom of an incorrect TWRP flash as recovery. I tried to reflash it from TWRP, unfortunately, it only proposes me to flash to boot. Flash to recovery is not available.
Thanks for your help!
Lionel

I'm dealing with this exact problem on my wife's phone. I've made progress though. First up, boot into bootloader, "adb reboot booloader", then boot into recovery, making sure you have a suitable twrp image on your desktop, "fastboot boot twrp-3.2.3.img". Now you're in TWRP, which is where I now am. I'm going to wipe the recovery partition, boot back into the bootloader and flash recovery. Let's see how that goes.
---------- Post added at 11:29 AM ---------- Previous post was at 10:59 AM ----------
Ignore the above, got it working. It seems that the version of CarbonRom is playing funny for some reason. Here's the recipe to fix things:
- On the phone, check and download the latest CarbonRom. Don't flash it.
- Run "adb reboot bootloader"
- Run "fastboot boot twrp-3.2.3.img"
- In TWRP, install the latest CarbonROM from sdcard/CarbonDelta
- Reboot
- Reboot back into bootloader, "adb reboot bootloader"
- Flash recovery, "fastboot flash recovery twrp-3.2.3.img"
- Run "fastboot reboot"
Everything is back the way it should be.

Good Morning,
I am the dev of the LineageOS 16 builds for this device and i have been working on a new TWRP tree. Therefore i have found some things according to you problem.
First of all we should make the basics clear: On our Z3 Compact we have got a bootloader update which can boot a recovery from powered off state by pressing volume down and the power button. Because we haven't ever had this updated bootloader and not all sony devices received the update, there have been some intelligent people who brought a special init binary which can handle recovery boots during a normal boot. This means when using advanced reboot from the ROM or pressing a volume key while the sony logo appears at boot. https://github.com/LineageOS/android_device_sony_common/commits/lineage-16.0
To make this work there is this binary to extract the ramdisk: https://github.com/LineageOS/androi...eage-16.0/extract_ramdisk/extract_ramdisk.cpp which uses zlib to decompress it. So far so good, zlib can decompress the default compression for recovery ramdisk which is gzip. However LZMA is more effective to reduce the size so we took it's advantage: https://github.com/omnirom/android_...mmit/885b01223a460d3f2500155ea415bdc8573679bc in order to fit recoverys compiled from recent environments (android-9.0 in my case) into our small FOTAKernel partition.
According to this change the init_sony can't handle the recovery boot anymore because it can't decompress the recovery's ramdisk so nailyk and Diewi (as far as i know) added support to decompress LZMA compressed ramdisk's with this chain: https://github.com/sonyxperiadev/device-sony-common-init/pull/20/commits
However these commits have never been merged into the LineageOS/android_device_sony_common nor the sonyxperiadev/device-sony-common-init. Since your ROM, CarbonROM, is using a fork of LineageOS/android_device_sony_common is missing these commits the recovery boot fails with a kernel panic, like this: https://del.dog/egawososux.htm
So you can either use a recovery which doesn't compress the ramdisk with LZMA (for example the one from here: https://forum.xda-developers.com/z3-compact/development/recovery-twrp-3-2-3-0-aries-t3837192 or ask your ROM developer to pick the according commits into the sony_common tree/use my fork of LineageOS's one https://github.com/z3c-pie/android_...mits/fa85dfcc07f42d73f9a1abf1f4c82d8bf0486a93 which would enable you to use recent TWRP builds with a LZMA compressed ramdisk.
I hope i presented it clearly and in the right way,
Have a nice day!
EDIT: Minimized patch for LZMA is available here: https://review.lineageos.org/c/LineageOS/android_device_sony_common/+/252923

NeoArian said:
Good Morning,
I am the dev of the LineageOS 16 builds for this device and i have been working on a new TWRP tree. Therefore i have found some things according to you problem.
First of all we should make the basics clear: On our Z3 Compact we have got a bootloader update which can boot a recovery from powered off state by pressing volume down and the power button. Because we haven't ever had this updated bootloader and not all sony devices received the update, there have been some intelligent people who brought a special init binary which can handle recovery boots during a normal boot. This means when using advanced reboot from the ROM or pressing a volume key while the sony logo appears at boot. https://github.com/LineageOS/android_device_sony_common/commits/lineage-16.0
To make this work there is this binary to extract the ramdisk: https://github.com/LineageOS/androi...eage-16.0/extract_ramdisk/extract_ramdisk.cpp which uses zlib to decompress it. So far so good, zlib can decompress the default compression for recovery ramdisk which is gzip. However LZMA is more effective to reduce the size so we took it's advantage: https://github.com/omnirom/android_...mmit/885b01223a460d3f2500155ea415bdc8573679bc in order to fit recoverys compiled from recent environments (android-9.0 in my case) into our small FOTAKernel partition.
According to this change the init_sony can't handle the recovery boot anymore because it can't decompress the recovery's ramdisk so nailyk and Diewi (as far as i know) added support to decompress LZMA compressed ramdisk's with this chain: https://github.com/sonyxperiadev/device-sony-common-init/pull/20/commits
However these commits have never been merged into the LineageOS/android_device_sony_common nor the sonyxperiadev/device-sony-common-init. Since your ROM, CarbonROM, is using a fork of LineageOS/android_device_sony_common is missing these commits the recovery boot fails with a kernel panic, like this: https://del.dog/egawososux.htm
So you can either use a recovery which doesn't compress the ramdisk with LZMA (for example the one from here: https://forum.xda-developers.com/z3-compact/development/recovery-twrp-3-2-3-0-aries-t3837192 or ask your ROM developer to pick the according commits into the sony_common tree/use my fork of LineageOS's one https://github.com/z3c-pie/android_...mits/fa85dfcc07f42d73f9a1abf1f4c82d8bf0486a93 which would enable you to use recent TWRP builds with a LZMA compressed ramdisk.
I hope i presented it clearly and in the right way,
Have a nice day!
EDIT: Minimized patch for LZMA is available here: https://review.lineageos.org/c/LineageOS/android_device_sony_common/+/252923
Click to expand...
Click to collapse
Hi NeoArian,
I've been away for a while and have just gotten back to playing with the z3c. I still have problems but that may just be my misunderstanding of things.
When the phone is in the bootloader, I update FOTAKernel thus:
Code:
fastboot flash FOTAKernel twrp-3.3.1-0.3-z3c.img
target didn't report max-download-size
Sending 'FOTAKernel' (13264 KB)...
OKAY [ 0.419s]
Writing 'FOTAKernel'...
OKAY [ 0.885s]
Finished. Total time: 1.322s
And update recovery too:
Code:
fastboot flash recovery twrp-3.3.1-0.3-z3c.img
target didn't report max-download-size
Sending 'recovery' (13264 KB)...
OKAY [ 0.421s]
Writing 'recovery'...
OKAY [ 0.878s]
Finished. Total time: 1.318s
Yet I'm unable to boot into recovery.
From the bootloader, I this is what I see if I try boot directly into recovery:
Code:
fastboot boot twrp-3.3.1-0.3-z3c.img
Downloading 'boot.img'
OKAY [ 0.419s]
booting
FAILED (remote: dtb not found)
Finished. Total time: 0.499s
I've read through quite a bit of the forum notes but still am no wiser. I do however much admire your work and that of others and the time you spend helping others.

Fudgemond said:
Hi NeoArian,
I've been away for a while and have just gotten back to playing with the z3c. I still have problems but that may just be my misunderstanding of things.
When the phone is in the bootloader, I update FOTAKernel thus:
Code:
fastboot flash FOTAKernel twrp-3.3.1-0.3-z3c.img
target didn't report max-download-size
Sending 'FOTAKernel' (13264 KB)...
OKAY [ 0.419s]
Writing 'FOTAKernel'...
OKAY [ 0.885s]
Finished. Total time: 1.322s
Click to expand...
Click to collapse
I now think this isn't correct. Work I've done on another phone (Xperia Z) suggests that unpacking CarbonROM and extracting the boot.img is what I should flash to FOTAboot. Something to try.

Did you manage to get twrp to work again? I want to move away from CR6.1 to LOS16 or 17 (just to give it a try), but I'm stuck now.

Related

[RECOVERY][TWRP&CWM][Updated: 6-Feb-2013]Stock Kernel on Official Jellybean

Note: This has been deprecated in favour of LK for Xperia T
This kernel image is based on stock using the FreeXperia ramdisk method of loading stock and recovery. It also includes the new FOTA partition trick by Dees_Troy for easy updates in the future to TWRP.
Dees_Troy and I worked on figuring out the reason recovery binaries would not load on the stock kernel without patches, fixed this up in bionic, and rebuilt recovery linked against the fixed bionic.
F.A.Q
Q. The title says TWRP and CWM but when I boot recovery I only see TWRP. How do I get CWM?
A. TWRP is the default recovery, if you want CWM you should download the CWM update.zip in the second post and flash it with twrp.
Technical Info​
In 3.4 Qualcomm have changed the fb_var_screeninfo struct slightly. They have added an extra field called colorspace which increases the size of the stuct by __u32. When a binary linked against bionic tries to pass a struct the size of the old fb_var_screeninfo to kernelspace the application breaks as the kernel is expecting more data than it was given.
The patch to fix this in kernel solves the problem by removing one of the reserved fields, bringing the struct back to the same size it was prior to the new field being added. While this keeps compatibility with older recovery binaries, it does introduce the problem of needing a custom kernel to run recovery. Sony have not yet released source for 9.1.A.0.489 which means the kernel cannot be rebuilt without issues such as WiFi not working. The patch that Dees_Troy applied to the build system was to add the new colorspace field into the header for bionic which means the new recovery binary can run on an unmodified stock Sony kernel.
Flashing​
Boot device in fastboot mode:
Code:
adb reboot bootloader
Flash image with fastboot:
Code:
fastboot flash boot mint489stock.img
Source for TWRP available from here.​
Updates:
1. Updated image in first post to fix bug where creating a backup would fail and crash twrp.
2. Updated first post to show CWM in title and answer questions about how to get CWM.
Flashable zips:
In the first post it is mentioned about using the FOTAKernel trick by Dees_Troy to offer easy updates. The 2 zips attached to this post are examples of the ease of use.
flashCWM.zip - This will flash CWM to the FOTAKernel and replace TWRP as your recovery.
flashTWRP.zip - This will flash TWRP to the FOTAKernel and replace TWRP that is built into the image that was flashed to your device by fastboot, or to replace CWM with TWRP again if you used the flashCWM.zip
This also makes updates easier as you do not need to replace the kernel image you currently have flashed to your device.
Re: [RECOVERY][TWRP]Stock Kernel on Official Jellybean
Many thanks, can you just clear up one thing please, does Wi-Fi work on this image?
Sent from my LT30p xda premium app.
How do I customise the signature on xda premium app?
gregbradley said:
Many thanks, can you just clear up one thing please, does Wi-Fi work on this image?
Sent from my LT30p xda premium app.
How do I customise the signature on xda premium app?
Click to expand...
Click to collapse
Yes, wifi does work because it is just the stock kernel with TWRP added. I am running it right now with no problems.
I thought so, but I just wanted to make it obvious to all users as it was not 100% clear from the OP. I didnt have time to flash myself and check as I was just abbout to leave for work, now I am at work I will also flash it....
lilstevie said:
This kernel image is based on stock using the FreeXperia ramdisk method of loading stock and recovery. It also includes the new FOTA partition trick by Dees_Troy for easy updates in the future to TWRP.
Dees_Troy and I worked on figuring out the reason recovery binaries would not load on the stock kernel without patches, fixed this up in bionic, and rebuilt recovery linked against the fixed bionic.
Technical Info​
In 3.4 Qualcomm have changed the fb_var_screeninfo struct slightly. They have added an extra field called colorspace which increases the size of the stuct by __u32. When a binary linked against bionic tries to pass a struct the size of the old fb_var_screeninfo to kernelspace the application breaks as the kernel is expecting more data than it was given.
The patch to fix this in kernel solves the problem by removing one of the reserved fields, bringing the struct back to the same size it was prior to the new field being added. While this keeps compatibility with older recovery binaries, it does introduce the problem of needing a custom kernel to run recovery. Sony have not yet released source for 9.1.A.0.489 which means the kernel cannot be rebuilt without issues such as WiFi not working. The patch that Dees_Troy applied to the build system was to add the new colorspace field into the header for bionic which means the new recovery binary can run on an unmodified stock Sony kernel.
Flashing​
Boot device in fastboot mode:
Code:
adb reboot bootloader
Flash image with fastboot:
Code:
fastboot flash boot mint489stock.img
Source for TWRP available from here.​
Click to expand...
Click to collapse
Such a good news!I will port it to TX JellyBean firmware if you don' mind
gregbradley said:
I thought so, but I just wanted to make it obvious to all users as it was not 100% clear from the OP. I didnt have time to flash myself and check as I was just abbout to leave for work, now I am at work I will also flash it....
Click to expand...
Click to collapse
only for unlocked bl, correct?
hi,
i wanted to create with this version a backup, but it doesn't work.
it was just created the folder system,
the other folders such as data and boot not.
the created folder system, that was created after backup, is empty.
the 'backup' also takes only a few seconds, then the 'backup' is done.
what have i done?
installed the .img with instructions above.
boot xt into recovery, push backup, select system, data & boot, choose destination folder and start backup.
where is my failure?
hkjr said:
only for unlocked bl, correct?
Click to expand...
Click to collapse
Yes
MysticEnforcer said:
hi,
i wanted to create with this version a backup, but it doesn't work.
it was just created the folder system,
the other folders such as data and boot not.
the created folder system, that was created after backup, is empty.
the 'backup' also takes only a few seconds, then the 'backup' is done.
what have i done?
installed the .img with instructions above.
boot xt into recovery, push backup, select system, data & boot, choose destination folder and start backup.
where is my failure?
Click to expand...
Click to collapse
Same here....seems backup is not working
MysticEnforcer said:
the 'backup' also takes only a few seconds, then the 'backup' is done.
Click to expand...
Click to collapse
Updated first post with a fixed image.
Thank you very much, this is the best message of day.
Just flashed new image
Doing a backup and it seems to work...will update in few minutes when it is finished
EDIT:
It works
Backup complete in 385 seconds
FYI,
both times on rebooting system from recovery I initially got the grey triangle, both times it was only for 10-15 seconds before the phone rebooted...
Testing it now ....
Edit:
[Backup completed in 461 seconds] External SD card with compression on. No Grey triangle for me.
[Restore completed in 192 seconds] Restored backup without any problems. No grey triangle on second reboot either.
Seems to work great for me.
(only clock seems to be incorrect. 7 hours and 16 minutes behind)
Edit 2: thirth boot up seems to get stuck on grey triangle for about 15 seconds
Edit 3: Seems only the first time reboot after using the recovery the grey triangle is there. Rebooted the phone 4 times and only got the triangle 1 time.
Updated first and second post
USB storage does not work at all both on TWRP and CWM
tested 2nd version, works fine for me & no grey triangle :good:
romcio47 said:
USB storage does not work at all both on TWRP and CWM
Click to expand...
Click to collapse
Noticed that to
romcio47 said:
USB storage does not work at all both on TWRP and CWM
Click to expand...
Click to collapse
This appears to be more of a technical limitation.
The internal storage space is formatted ext4, so only linux would be able to mount that by default so it doesn't offer that.
With the MicroSD the issue seems to be a little more complex and may possibly need a custom kernel.
lilstevie said:
This appears to be more of a technical limitation.
The internal storage space is formatted ext4, so only linux would be able to mount that by default so it doesn't offer that.
With the MicroSD the issue seems to be a little more complex and may possibly need a custom kernel.
Click to expand...
Click to collapse
Thanks for the reply I guess we just have to wait for the kernel sources to be published
Besides another issue - in CWM wiping dalvik-cache does not work.
romcio47 said:
Besides another issue - in CWM wiping dalvik-cache does not work.
Click to expand...
Click to collapse
I can't reproduce this, if I wipe dalvik-cache in CWM it removes /data/dalvik-cache as it should.

[UNOFFICIAL] TWRP 3.0.0-0 for the Pixel C (dragon-ryu) :: Current: 02-11-2016-1

This is UNOFFICIAL TWRP for the Pixel C. That said, the TeamWin team greatly helped me in getting this working. But at the same time, neither TeamWin nor me take any responsibility whatsoever for any undesired outcome resulting from any kind of use of this project and project files! If you don't exactly know what you're doing then just walk away and do something good. Don't touch any options of which you don't exactly know what they're for!
What works:
* So far, everything; encryption support should work, but some feedback on this would be welcome
Problems:
* The GUI will be sometimes slow, sometimes super slow. This is probably due to the high screen resolution of the Pixel C.
How to install:
- Unlock bootloader
- In the bootloader, run "fastboot flash recovery <.img file>"
- Reboot into Pixel C bootloader
- Boot into recovery (or later on/from Android through "adb reboot recovery")
If the recovery doesn't stick after booting into Android:
- Do the install procedure as above
- Do NOT reboot into Android
- Press Vol-Down + Power until you see the bootloader menu
- Select "Boot into Android Recovery"
- When in TWRP, mount system
- Using TWRP's File Manager, or using adb, delete the file "/system/bin/install-recovery.sh"
- Reboot
After doing this, OTAs won't work any longer, but they wouldn't work anyway after installing TWRP. Just so you know
DOWNLOAD
twrp-3.0.0-0-dragon-ryu-02-11-2016-1.img
SHA1 hash: 3e97aae6cc18975683eda2bd3732faaecec14166
Changelog
:: 01-19-2016-1
- Removed screen timeout by default, since the GUI is very slow and the screen unlock slider is very hard to use
- Added an option to fix the Fastboot Full Cap flag directly from TWRP; you find the option in "Advanced". If the Pixel C should ever not let you flash in fastboot, boot into TWRP, select Advanced -> Fix Fastboot, swipe to confirm, and you're set.
:: 02-11-2016-1
- Rebased on twrp/android-6.0 branch (i.e. upgraded to TWRP 3.0.0-0)
The recovery is based on the Pixel C stock kernel.
Awesome! I can survive without root for the time being but being able to enable multiwindow would be amazing!
Thanks!
Edit: I am getting a FAILED (remote: unsupported command) error and cant flash this. Anyone know a work around?
Worked fine for me with "fastboot flash recovery [image name]" did you unlock your bootloader? Also root works just fine, you just have to boot from your PC.
Sent from my Pixel C using Tapatalk
brando56894 said:
Worked fine for me with "fastboot flash recovery [image name]" did you unlock your bootloader? Also root works just fine, you just have to boot from your PC.
Sent from my Pixel C using Tapatalk
Click to expand...
Click to collapse
I did unlock my bootloader but can't get anywhere. Tried updating my sdk, drivers everything. I guess I will have to keep playing with it.
Edit: I relocked my bootloader, and then unlocked it again and now it is working. If anyone else runs into this give it a try.
it successfully installed on my pixel c. is reachable as the Android Recovery option. and boots to bootloader to allow boot of boot.img
this is a good thing. thanks to all involved.
it's been 1 month since release and good way to celebrate.
Good work. Thanks you
hooray thanks! just to clarify: I need encryption disabled to use twrp or just to flash SuperSU?
I'm currently using phhusson's noverity boot-img to boot and with a modified vendor img root is working fine while encryption is enabled ... just having to boot via fastboot every time is a bit awkward. And since I don't know what happens if the device got stuck and reboots itselfe without the modfied boot it would be awesome to have at least a nandroid backup
doumer said:
hooray thanks! just to clarify: I need encryption disabled to use twrp or just to flash SuperSU?
I'm currently using phhusson's noverity boot-img to boot and with a modified vendor img root is working fine while encryption is enabled ... just having to boot via fastboot every time is a bit awkward. And since I don't know what happens if the device got stuck and reboots itselfe without the modfied boot it would be awesome to have at least a nandroid backup
Click to expand...
Click to collapse
Hey... You can use TWRP even with encryption enabled, you just can't write anything to /data.
However for the next build I'm going to enable TWRP's decryption option and see if it works with the Pixel C. If it does I'll post a new build this evening (European Time).
I tried the systemless SuperSU on a decrypted /data partition but it wouldn't work (bootloop), clearly there's a lot of ground to cover here, but like I said maybe the decryption functionality will help us here.
EDIT: I'm also working on a boot.img with disabled forced encryption. Looks like we're going to get proper root very soon.
cheep5k8 said:
This is UNOFFICIAL TWRP for the Pixel C. That said, the TeamWin team greatly helped me in getting this working. But at the same time, neither TeamWin nor me take any responsibility whatsoever for any undesired outcome resulting from any kind of use of this project and project files! If you don't exactly know what you're doing then just walk away and do something good. Don't touch any options of which you don't exactly know what they're for!
What works:
* Well, basically everything IN TWRP works, it's just that without a kernel that disables forced encryption this is not of very much use. I tried flashing SuperSU, but it wouldn't work properly.
Problems:
* The GUI will be sometimes slow, sometimes super slow. This is apparently still a problem with how TWRP uses the graphics mode that is used on the Pixel C. Best is if you immediately disable the screen lock once you boot into TWRP because the unlock slider is abysmally sluggish.
How to install:
- Unlock bootloader
- In the bootloader, run "fastboot flash recovery <.img file>"
- Reboot into Pixel C coreboot bootloader
- Boot into recovery (or later on/from Android through "adb reboot recovery")
DOWNLOAD
2.8.7.0-01082016-1
Click to expand...
Click to collapse
Hello thank you for this. Yesterday I tried to build as well twrp but it wasn't fully working.
I just imported this config with TW_INCLUDE_L_CRYPTO := true && TW_INCLUDE_CRYPTO := true
I didnt copy paste the twrp.fstab I added but added its path to BOAR_smthing.
Also I used omnirom's android-6.0 revision with dragon's device tree.
The recovery seems to boot, as
Code:
adb devices
returns XXXXXx recovery.
Also I can reach the device's shell with adb shell. Just the screen stays black.
I was wondering if I missed something. Is your device tree available online ?
Khaon said:
Hello thank you for this. Yesterday I tried to build as well twrp but it wasn't fully working.
I just imported this config with TW_INCLUDE_L_CRYPTO := true && TW_INCLUDE_CRYPTO := true
I didnt copy paste the twrp.fstab I added but added its path to BOAR_smthing.
Also I used omnirom's android-6.0 revision with dragon's device tree.
The recovery seems to boot, as
Code:
adb devices
returns XXXXXx recovery.
Also I can reach the device's shell with adb shell. Just the screen stays black.
I was wondering if I missed something. Is your device tree available online ?
Click to expand...
Click to collapse
Not yet. I'm going to upload it later on to the TWRP devs for official inclusion.
You need to merge the minui patch so TWRP can use DRM for video on the Pixel C; there is no fb0 device.
there were some new boot images out today. i flashed one of them. when i boot to recovery the sdcard is not able to be mounted. do you have any suggestions on what i need to do or look at in order to get it fixed?
dkryder said:
there were some new boot images out today. i flashed one of them. when i boot to recovery the sdcard is not able to be mounted. do you have any suggestions on what i need to do or look at in order to get it fixed?
Click to expand...
Click to collapse
Because /data is (force-)encrypted. I uploaded a new TWRP build with various fixes but decryption doesn't work.
What I also found out is that the boot image for the Pixel C is NOT an Android boot image (!), but a ChromeOS one. This puts a lot of things in doubt, for example I am not sure if systemless SuperSU can handle this.
But, I'm working on all that (working on boot img without forced encryption right now, but so far it doesn't want to boot completely)
OK, so, I'm running the device unencrypted now, but there are many issues still to resolve.
OK guys, if you really want actual SuperSU, and other root stuff, and decrypted /data, here's how it works but it's complicated and will only work tethered as far as I can tell.
First, download this boot image: dragon-boot-encryptable-01092016-1.img
Now here are the steps:
- make sure you have a stock boot.img handy in case something goes wrong (as usual I can not take responsibility but chances of bricking are extremely slim if you know what you're doing)
- boot into fastboot
- flash the above boot image to boot ("fastboot flash boot dragon-boot....")
- flash the TWRP recovery (latest version) ("fastboot flash recovery twrp-dragon-...")
- hold power+vol down pressed.. the device will turn off, keep it pressed even as it turns off, it will turn on again and you are in the coreboot menu
- select "Android Recovery" which will start TWRP
- in TWRP, select system as read only when it asks ("never write onto the system partition").. my boot image does not disable dm-verity which seems to be still in effect, so if you change /system, the Pixel will refuse to boot (even though it's unlocked... no idea)
- once in TWRP, go to "Wipe" and then choose at the bottom "Format Data" (just wiping will not work)
- when that's done stay in the recovery
- get SuperSU 2.66 from somewhere and flash it through TWRP (using sideload for example)
- when it's done, go to "Backup" in TWRP and only backup boot (the kernel) - no password - no compression
- somehow copy the backed up kernel from the device to your computer ("adb pull" for example), but in no case let the Pixel boot into Android
- when that's done, tell TWRP to boot back into the bootloader
Now get ready to be real quick...
- boot (just boot, not flash) the TWRP backed up boot image (it's 32MB large and called boot.emmc.win, but it's all good): "fastboot boot boot.emmc.win" (and now you have to be rather quick)
- It will boot up for a second and then go back to the "The OS will boot in 30 seconds screen"
- Again press power+vol down and hold it, even as the device turns off, until you're in the coreboot bootloader
- There, choose fastboot again
- And once again boot the boot.emmc.win image ("fastboot boot boot.emmc.win")
- Now let it boot up
- If everything went OK you should be in Android, with decrypted /data, and SuperSU should be installed and working
If you want to avoid being encrypted again (although SuperSU should survive that) you will have to boot tethered everytime using that boot.emmc.win image.
Known Issues: Somehow because /data is decrypted, "Security" settings in Android will crash. Hopefully you don't need anything in there. You might also want to skip setting a lock pattern or pin when doing the initial setup, it might crash too.
So far, I tried installing AdAway using root which worked just fine.
If someone figures out how make this untethered: you da real MVP!
Thank you sir!! I will report back if I encounter any undocumented issues.
OK so I've managed to install Xposed, was pretty straightforward except for the tethered boot. Still looking into making it untethered.
since your modified boot and no encryption it seems to be smoother in graphics. in any event, the thing worked in format of data and install of the supersu zip. so, well done.
cheep5k8 said:
How to install:
- Unlock bootloader
- In the bootloader, run "fastboot flash recovery <.img file>"
- Reboot into Pixel C coreboot bootloader
- Boot into recovery (or later on/from Android through "adb reboot recovery")
DOWNLOAD
2.8.7.0-01082016-2 UPDATE: Includes various fixes from first build; decryption of data does NOT yet work
Click to expand...
Click to collapse
So, followed these instructions and whenever I try to reboot into recovery I get the no command screen. Am I missing something? lol
Edit: So figured thats the stock recovery stuff. Got to the stock recovery but can't get into twrp
2nd Edit: I redownloaded the file and didnt rename it shorter this time and now it works...weird
cheep5k8 said:
Not yet. I'm going to upload it later on to the TWRP devs for official inclusion.
You need to merge the minui patch so TWRP can use DRM for video on the Pixel C; there is no fb0 device.
Click to expand...
Click to collapse
Thank you for those informations .
Thank you so much for this! Aside from the laggy UI, which isn't an issue since we got TWRP (f yes!!!), this is amazing. Do you foresee any issues flashing fonts? I am not familiar with ChromeOS and Android structure combination as it seems there is a lot of talk about. Flashing a file that replaces the stock fonts with the ones of my choosing hypothetically should not pose a problem to /system/fonts/, correct? Thank you for your work

[RECOVERY][hydrogen/helium] TWRP 3.1.0-0 for Xiaomi Mi Max

Team Win Recovery Project
This is a unified build for both the Mi Max (hydrogen) and the Mi Max Prime (helium)
WHAT IS TWRP?
Oh come on, you know what it is - don't try to fool me!
In case you're serious, though...
Team Win Recovery Project is a custom recovery for Android devices.
It allows you to back up and restore your data, flash custom ROMs to your device, repair broken file systems, and root your device.
Read more about TWRP here: https://twrp.me/about/
CHANGELOG for 3.1.0-0:
-vold decrypt on a few select HTC devices, TWRP will now attempt to use the system partition's vold and vdc binaries and libraries to decrypt the data partition (nkk71 and CaptainThrowback)
-adb backup to stream a backup directly to or from your PC, see documentation here: https://github.com/omnirom/android_bootable_recovery/commit/ce8f83c48d200106ff61ad530c863b15c16949d9 (bigbiff)
-tweak MTP startup routines (mdmower)
-support new Android 7.x xattrs for backup and restore to fix loss of data after a restore (Dees_Troy)
-support POSIX file capabilities backup and restore to fix VoLTE on HTC devices and possibly other issues (Dees_Troy)
-better indicate to users that internal storage is not backed up (Dees_Troy)
-improve automatic determination of TW_THEME (mdmower)
-minimal getcap and setcap support (_that)
-try mounting both ext4 and f2fs during decrypt (jcadduono and Dees_Troy)
-shut off backlight with power key (mdmower)
-timeout during FDE decrypt (Dees_Troy and nkk71)
-support for FBE decrypt and backing up and restoring FBE policies (Dees_Troy)
-boot slot support (Dees_Troy)
-TWRP app install prompt during reboot (Dees_Troy)
-support for AB OTA zips (Dees_Troy)
-support new Android 7.x log command (Dees_Troy)
-update recovery sources to AOSP 7.1 (Dees_Troy)
-numerous bugfixes and improvements by too many people to mention
CHANGELOG for 3.0.2-0:
-Fix a bug with the input box that affected masked inputs (passwords). This fixes decrypt of full device encryption on devices that support decrypt. This bug also impacts encrypted backups. Users are highly encouraged to stop using 3.0.1 if you use encrypted backups or if you need decrypt of data in TWRP.
-Add Greek translation to some builds.
CHANGELOG for 3.0.1-0:
-support new CM 13.0 pattern encryption (sultanqasim)
-fix slow flashing issue due to modprobe (present on only some devices) (#twrp)
-libtar updated to latest upstream and fixes (jcadduono)
-fixes for loading custom themes (_that)
-TWRP will now detect and install TWRP themes automatically through the normal zip install process (Dees_Troy)
-translation updates - added Italian, Czech and Polish and significant updates to Dutch
-progress bar improvements - progress bar updates during image flashing and better tracks progress during file system backups (tar) (Dees_Troy)
-fix input box text display (Dees_Troy)
-reboot option after zip install complete (bigbiff)
-other mostly invisible bug fixes and improvements
CHANGELOG for 3.0.0-0:
-Completely new theme - Much more modern and much nicer looking (by z31s1g)
-True Terminal Emulator - Includes arrow keys, tab and tab completion, etc. (by _that)
-Language translation - It won’t be perfect and especially some languages that require large font files like Chinese & Japanese won’t be availble on most devices. Also some languages may only be partially translated at this time. Feel free to submit more translations to OmniROM’s Gerrit. (mostly by Dees_Troy)
-Flashing of sparse images - On select devices you will be able to flash some parts of factory images via the TWRP GUI (by HashBang173)
-Adopted storage support for select devices - TWRP can now decrypt adopted storage partitions from Marshmallow
-Reworked graphics to bring us more up to date with AOSP - includes support for adf and drm graphics (by Dees_Troy)
-SuperSU prompt will no longer display if a Marshmallow ROM is installed
-Update exfat, exfat fuse, dosfstools (by mdmower)
-Update AOSP base to 6.0
-A huge laundry list of other minor fixes and tweaks
WARNING: This is our first release in a long time. We have a lot of new and somewhat aggressive changes in this new release. The changes to the graphics back-end may cause some devices to not boot up properly or have other display-related issues. If you are not in a position to reflash an older build of TWRP, then wait until you are or at least wait until others have tried the new version for your specific device. You don’t want to end up with a non-working recovery and have to wait several hours or days to get to a computer to be able to fix it.
Notes for themers: In addition to the udpated theme, we have introduced a theme version variable to the TWRP theme system. If the theme version does not match the version that TWRP expects, TWRP will reject the custom theme and load its stock theme. This change will ensure that people who update TWRP without updating their theme will still have a workable recovery. We have removed libjpeg support. The stock theme was only using a jpeg image for the splash / curtain. This change means that any custom themes will no longer be able to use jpeg images. It also means that tools used to repack recovery images with a different curtain / splash will need to be updated to use the new method.
Version number notes: For a while we’ve been using a 4 digit version number and reserved the 4th digit for device-specific updates. For instance, we find and fix a device-specific issue like decryption of data on Nexus 5, we would release that as a 2.8.7.1. After a while, some people would start asking where 2.8.7.1 was for other devices. So, going forward we have decided to change the numbering scheme to 3.0.0-2, etc. Our hope is that this version numbering scheme will more clearly identify that the 4th digit does not indicate a version change for the code base.
We need your help! The bulk of TWRP work is done by 3 people on a volunteer basis. We have pushed most of our device files to our github and we have a gerrit instance. If you have the ability, please help us maintain our official devices and/or add your device to our official device list. Thanks in advance!
DOWNLOAD:
1) Install the TWRP app from the Play Store or grab the apk from our website
2) Open the app, agree to the terms, and enable root access
3) Select TWRP Flash
4) Search for your device and select the version you wish to download
5) Once the download is complete, select the file (it's usually in your downloads folder) and then Flash Recovery
OR:
Most devices can be updated quickly and easily within TWRP if you already have version 2.8.4.0 or higher installed
1) Download the latest version from our website on your device
2) Reboot to TWRP
3) Hit Install and tap the "Images..." button in the lower right
4) Browse to the location of the TWRP image on your device and select it
5) Select recovery from the partition list and swipe to flash
OR:
You can find more information and download links on our website.
FEATURES:
MTP support
USB OTG storage support
Hardware Qualcomm-based full-disk encryption support ( ext4 & f2fs )
f2fs file system support (read, write, format, backup & restore)
Covers more partitions for nandroid backup (fstab)
ADB root
Full SELinux support
Built with android 7.1 tree
SUPPORT:
Live support is available via #twrp on Freenode with your IRC client or just click this link.[/QUOTE]
CONTRIBUTIONS:
Gerrit for TWRP: http://gerrit.omnirom.org/
Gerrit for officially supported devices: http://gerrit.twrp.me/
XDA:DevDB Information
TWRP for Mi Max, Tool/Utility for the Xiaomi Mi Max
Contributors
TheStrix
Source Code: https://github.com/TeamWin
Version Information
Status: Stable
Created 2017-03-04
Last Updated 2017-03-12
Reserved
FAQ:
WHY AM I STUCK ON THE TWRP SPLASH SCREEN FOR 8 HOURS?
Be patient, wait another 8 hours.
Just kidding, try this while stuck on the loading screen:
adb shell wipe_misc; adb shell reboot recovery
Some devices might somehow get a flag set in misc that tells the bootloader to ignore the android boot image command line.
This results in the kernel not receiving the hardware name (qcom), which then confuses recovery and causes it to wait forever. FOREVER.
Personally, I'd have tried this after 15 minutes.
WHY DOES F2FS MAKE TWRP SO SLOW?
When TWRP boots up or wipes partitions and a few other scenarios, it checks each partition to see how much disk space is used. Ext4 handles disk usage calls quite efficiently and will finish this very fast. F2FS on the other hand is very slow when it comes to checking disk usage. We're unsure why this is. Every file on the F2FS formatted partition adds a little more time, and a device that is 30 GB full could take up to 10 minutes to boot TWRP!
HOW DO I GET LOGS SO WHEN I COMPLAIN I'M NOT COMPLETELY IGNORED OR SHAMED BY OTHER USERS?
To get logs while in TWRP, you should connect your device to your PC and use adb.
adb pull /tmp/recovery.log
adb exec-out dmesg > dmesg.log
This will create 2 files in the directory your shell is currently in, recovery.log and dmesg.log. You will need to upload these somewhere such as a pastebin or Google Drive. You can also attach it to your XDA post (recommended!)
If you are having an operating system boot issue, you should gather a ramoops log instead. Do this while in TWRP after the failed boot:
adb exec-out "tar c /sys/fs/pstore 2>/dev/null" > pstore.tar
does that mean f2fs is slower than ext4 for daily usage on Max?
Will this work on the latest 8.2 global official rom?
Sent from my MI MAX using Tapatalk
no version for helium?
souravipc53 said:
no version for helium?
Click to expand...
Click to collapse
This is a unified build for both the Mi Max (hydrogen) and the Mi Max Prime (helium)
souravipc53 said:
no version for helium?
Click to expand...
Click to collapse
Title:
[RECOVERY][hydrogen/helium] TWRP for Xiaomi Mi Max
Click to expand...
Click to collapse
Second OP line:
This is a unified build for both the Mi Max (hydrogen) and the Mi Max Prime (helium)
Click to expand...
Click to collapse
Nice Work
TheStrix said:
For now, please download the build from:
v3.0.3-rc1: https://www.androidfilehost.com/?w=files&flid=155934
(...)
Last Updated 2017-03-04
Click to expand...
Click to collapse
You say this unified built for HELIUM & HYDROGEN.
However the very file from this link has name:
"twrp-3.0.3-rc1-hydrogen.img"
and thus it suggests this is HYDROGEN version,
will it work on HELIUM too indeed?
And, BTW, will it work on locked bootloader?
HELIUM 364GB locked BL, Nigel's
[ROM][UNOFFICIAL][7.1.1][HYDROGEN/HELIUM]LineageOS 14.1
Is someone able to adb backup with TWRP 3.1?
TheStrix said:
This is a unified build for both the Mi Max (hydrogen) and the Mi Max Prime (helium)
Click to expand...
Click to collapse
The file is named twrp-3.1.0-0-hydrogen.img.
Suggestion: Please rename to twrp-3.1.0-0-hydrogen-helium.img so it's 100% clear.
Unable to flash TWRP
Hi,
can anyone help, I tried installing the new TWRP 3.1 and get the Blank screen. Now the only version that I can install is " TWRP-3.0.3-MROM-hydrogen-002.img " from the Multirom
Anything else Either the screen flashes and then the Phone reboots, but no Recovery
I tried to have Log and None found
C:\Minimal ADB and Fastboot>adb pull /tmp/recovery.log
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
adb: error: remote object '/tmp/recovery.log' does not exist
I have attached the dmesg.log file
Thanks in advance
Will you update the new 1.0 also in the "Helium" device link? @TheStrix
https://twrp.me/devices/xiaomimaxpro.html
Does twrp 3.1.0.0 work with 6.0.1 ROMs or only 7+ ROMs?
Sent from my Xiaomi MI MAX using XDA Labs
Unfortunately it seems that it didn't install on my phone even flashing went well
C:\>fastboot flash recovery recovery.img
target reported max download size of 536870912 bytes
sending 'recovery' (19320 KB)...
OKAY [ 0.772s]
writing 'recovery'...
OKAY [ 0.113s]
finished. total time: 0.887s
When trying to boot on recovery I am having this (well known i think) image of a telephone with cable with pcsuite.mi.com written underneath
Any suggestions ?
thanks in advance
PS : My rom is Global Stable - V8.2.1.0.MBDMIDL. Phone is a Mi Max 128
dumbninja said:
Unfortunately it seems that it didn't install on my phone even flashing went well
C:\>fastboot flash recovery recovery.img
target reported max download size of 536870912 bytes
sending 'recovery' (19320 KB)...
OKAY [ 0.772s]
writing 'recovery'...
OKAY [ 0.113s]
finished. total time: 0.887s
When trying to boot on recovery I am having this (well known i think) image of a telephone with cable with pcsuite.mi.com written underneath
Any suggestions ?
thanks in advance
PS : My rom is Global Stable - V8.2.1.0.MBDMIDL. Phone is a Mi Max 128
Click to expand...
Click to collapse
Try another pc
Enviado desde mi Redmi Note 3 mediante Tapatalk
dumbninja said:
Unfortunately it seems that it didn't install on my phone even flashing went well
C:\>fastboot flash recovery recovery.img
target reported max download size of 536870912 bytes
sending 'recovery' (19320 KB)...
OKAY [ 0.772s]
writing 'recovery'...
OKAY [ 0.113s]
finished. total time: 0.887s
When trying to boot on recovery I am having this (well known i think) image of a telephone with cable with pcsuite.mi.com written underneath
Any suggestions ?
thanks in advance
PS : My rom is Global Stable - V8.2.1.0.MBDMIDL. Phone is a Mi Max 128
Click to expand...
Click to collapse
after the first time you flashed this,
you have to boot into recovery directly when you type fast reboot, that's means you have to hold Volume-UP while you typing that.
if you don't, then original recovery will be installed again.
tarkzim said:
after the first time you flashed this,
you have to boot into recovery directly when you type fast reboot, that's means you have to hold Volume-UP while you typing that.
if you don't, then original recovery will be installed again.
Click to expand...
Click to collapse
Thanks for tip.
I followed your operations: booting into recovery works correctly,TWRP shows up. But when booting on the system I'm stuck with the MI Logo and nothing happens.....
Any additional help ?
Thanks
dumbninja said:
Thanks for tip.
I followed your operations: booting into recovery works correctly,TWRP shows up. But when booting on the system I'm stuck with the MI Logo and nothing happens.....
Any additional help ?
Thanks
Click to expand...
Click to collapse
You need modified fstab.qcom or SuperSU which will do it for you...
please help me my MI max 32Gb has been brick its stuck and restarting at Mi logo (vibration) please help me someone to unlock my mi max bootlader so that i can complete flash the whole firmware in MiFLASH . i have tried to flash the rom through Miflashing tool (download mode) but still it stuck and restarting at Mi logo.

[Recovery][P20/Pro][Unofficial]TWRP 3.2.1-0 [18/04/2018]

Disclaimer​This software comes with no warranty,XDA staff ,myself or TeamWin stuff can't be hold responsible for any damage it may cause to your device.
Note: Currently Oreo 8.1 custom roms are not supported,only stock EMUI 8.x .
Download and Installation​
* Download twrp recovery
* Start your device in fastboot mode
* Install the recovery using the following command:
Code:
fastboot flash recovery_ramdisk [name of the file].img --> ex: fastboot flash recovery_ramdisk twrp_clt_0.1.img
* Restart with this command:
Code:
fastboot reboot
* As soon as you execute the restart command,remove the USB cable and keep pressing Volume UP,so the device will boot to TWRP.This is to avoid that the device boot to OS,overwritting TWRP recovery.
Features​
Internal storage decryption = working (if it pin/password, pattern fails then try by removing them (password, pin, pattern, fingerprint) from Android before booting to TWRP.
MTP and OTG connection = working
Backup&Restore = working
Note: This was tested only by few P20 Pro owners,so if you test it,please report back!There are no sources for this yet,because is based on the work of @zxz0O0 ,from Honor 9 forum.
Credits
**** @zxz0O0 - This wouldn't be possible without this guy,so big big thank to him.I used his base to make this recovery work ,so in sign of respect his nick will also be on the TWRP boot screen.Thank again buddy!
**** TeamWin project ,obviously.
Download links
twrp_clt_0.1.img - Decryption support (you can use the same password/pin/pattern to decrypt in TWRP), /recovery_ramdisk not available for backup./vendor not available for backup (use /vendor_image instead)
Glad to see this. Any chance of sources or a pull request on my device tree to get decryption working?
hum.. it seem that decryption working great.
See :
Internal storage decryption = working
MTP and OTG connection = working
Backup&Restore = working
Yes. I was just asking for sources or a pull request on my Github repository. IMHO the decryption method used would be useful for anybody interested in ROM/Recovery development - and also required to comply with XDA licensing / GPL requirements.
a1Pha said:
Yes. I was just asking for sources or a pull request on my Github repository. IMHO the decryption method used would be useful for anybody interested in ROM/Recovery development - and also required to comply with XDA licensing / GPL requirements.
Click to expand...
Click to collapse
This is not based 100% from sources, i have another version with working decryption, which is based on open source tree, bur it's not ready yet, just private testing.
This is not breaking any GPL/XDA rule, because it's using just a dummy kernel, not compiled or modified by me! ?
Pretoriano80 said:
This is not based 100% from sources, i have another version with working decryption, which is based on open source tree, bur it's not ready yet, just private testing.
This is not breaking any GPL/XDA rule, because it's using just a dummy kernel, not compiled or modified by me! ?
Click to expand...
Click to collapse
Thanks for clarification. Would you mind sharing some details via PM with me? I'd be glad to improve my repo
a1Pha said:
Thanks for clarification. Would you mind sharing some details via PM with me? I'd be glad to improve my repo
Click to expand...
Click to collapse
Yes, no problem! Also have a look at my Github (pretoriano80). My goal is also to make a fully open source version. ?
Quote: Note: This was tested only by few P20 Pro owners,so if you test it,please report back!
Hi Pretoriano80, Hi All,
Great job ! Just installed... I confirm that it works on my CLT-L29 8.1.0.106(C432)
Internal storage decryption, MTP and usb OTG connection, Backup& Restore (incl /vendor_image) : All working !
Many thanks & Cheers
CLT-L09 (C782) all is working as it should, successful backup and mount of my 1tb hard drive.
Absolutely fantastic work
Thanks :good:
Well this is very positive.
Less than 2 calendar weeks from release to TWRP release.
I think we can possibly have pretty high expectations for development on the P20 Pro.
Hey im getting this when I attempt to run the fastboot flash recovery command:
C:\Users\andre\Desktop\twrp>fastboot flash recovery_ramdisk twrp_clt_0.1.img
target reported max download size of 471859200 bytes
sending 'recovery_ramdisk' (23542 KB)...
OKAY [ 0.151s]
writing 'recovery_ramdisk'...
FAILED (remote: Command not allowed)
finished. total time: 0.171s
Can anyone advise please?
andrewglass3 said:
Hey im getting this when I attempt to run the fastboot flash recovery command:
C:\Users\andre\Desktop\twrp>fastboot flash recovery_ramdisk twrp_clt_0.1.img
target reported max download size of 471859200 bytes
sending 'recovery_ramdisk' (23542 KB)...
OKAY [ 0.151s]
writing 'recovery_ramdisk'...
FAILED (remote: Command not allowed)
finished. total time: 0.171s
Can anyone advise please?
Click to expand...
Click to collapse
You have to unlock bootloader first!
Pretoriano80 said:
You have to unlock bootloader first!
Click to expand...
Click to collapse
Yep - I forgot that step - had the code but missed it out lol - Im an idiot lol
whats difference between your version and a1pha?
also does this trigger safety net? (i installed magisk via patched ramdisk.img and google pay wont work) will it work with TWRP (no root)
virtyx said:
whats difference between your version and a1pha?
also does this trigger safety net? (i installed magisk via patched ramdisk.img and google pay wont work) will it work with TWRP (no root)
Click to expand...
Click to collapse
Have you made sure that the Google Pay app is selected in the Magisk Hide list in the app? It doesn't tick automatically like it used to with Android Pay. You should pass safetynet with Magisk installed. Also, after flashing TWRP still passes safetynet too.
virtyx said:
whats difference between your version and a1pha?
also does this trigger safety net? (i installed magisk via patched ramdisk.img and google pay wont work) will it work with TWRP (no root)
Click to expand...
Click to collapse
TWRP has nothing to do with SafetyNet! Maybe you installed a firmware which didn't passed Google check yet.
Is this what I actually need to do to root my P20 Pro?
I unlock the bootloader, flash the twrp recovery, then install supersu.zip via twrp recovery and I'm done, right?
Or is there something else I left out?
Thank you very much so far!
m00h said:
Is this what I actually need to do to root my P20 Pro?
I unlock the bootloader, flash the twrp recovery, then install supersu.zip via twrp recovery and I'm done, right?
Or is there something else I left out?
Thank you very much so far!
Click to expand...
Click to collapse
Try Magisk instead of SuperSU. It has better support for Oreo than the latter.
BTW anyone here tried flashing Magisk to root the device?
DJBhardwaj said:
Try Magisk instead of SuperSU. It has better support for Oreo than the latter.
BTW anyone here tried flashing Magisk to root the device?
Click to expand...
Click to collapse
I did on the other TWRP thread, worked fine.
The page for getting an unlock code seems to 404 for me. Is this happening for anyone else too?

TWRP WITH WORKING touch screen

Update for new year.
1-1-2020 Uploaded a version of twrp for Bold-N1 with working touchscreen.
thanks to the help of @vineethrp in This Post
Original thread hidden, since twrp build is fixed.
This initial version of TWRP, still has major issue. A second issue with the recovery is the screen will not turn on for about 30 seconds after boot. A time that lines up with the screen sleep timer. The touchscreen is not working. This has been a kernel issue on other devices that I am aware of.
The kernel source for th BOLD-N1 is released, and I have been reading through it. To no avail. I can't find the section that is checking for recovery mode.
For the time being, I have confirmed this version is working with the adb command line operations.
Partial list of functions found Here https://twrp.me/faq/openrecoveryscript.html
I have used the "install" and "sideload" operations.
In most cases (mods etc) sideload should be ok to try.
For the mod I was interested in (DM-Verity-No-Forceencrypt). The install does not support being done in sideload.
Because in the install script used, it checks the zip file name. Based on the file name it enables/disables options of the script.
Sideload changes the *.zip name, so more steps were necessary.
In the following steps, the device /data partition will be formatted. This will erase all your stored data, and more importantly,
it will remove the encryption.
The following steps require you to have already unlocked bootloader.
And,
As a reminder, whenever you modify your phone, you should NEVER relock the bootloader
INSTALL the attached TWRP img. Use Fastboot to install it.
Code:
fastboot flash recovery **insert-file-path-&name-here**
fastboot oem reboot-recovery
STEPS USED TO FLASH Disable_Dm-Verity_ForceEncrypt
Download zip file from developers XDA page HERE
Code:
adb shell twrp wipe data
adb shell reboot recovery
adb push Disable_Dm-Verity_ForceEncrypt_10.20.2019.zip /sdcard/Disable_Dm-Verity_ForceEncrypt_10.20.2019.zip
adb shell twrp install /sdcard/Disable_Dm-Verity_ForceEncrypt_10.20.2019.zip
STEPS USED TO SIDELOAD MAGISK
Download from Developers GitHub repo HERE
I had trouble with the newest V20. Stay on tested version V19.2, unless you can troubleshoot problems on your own.
Code:
adb shell twrp sideload
adb sideload C:\Users\(your user name HERE)\Downloads\Magisk-v19.2.zip
Device tree used
https://github.com/mrmazakblu/Bold-N1_minimum_device
Kernel source
https://github.com/mrmazakblu/Bold-N1-Kernel.git
Released twrp folder on android file host HERE
Stock recovery image HERE
.
Call for help
@vampirefo ,you had fixed touchscreen issue in recovery on other devices. You also helped me to do the same too. If you find some time , could you try point me in some direction.
mrmazak said:
@vampirefo ,you had fixed touchscreen issue in recovery on other devices. You also helped me to do the same too. If you find some time , could you try point me in some direction.
Click to expand...
Click to collapse
No luck with decrypting here
Tried to backup stock recovery with no luck. Do u have a copy ?
greeneyez15o said:
No luck with decrypting here
Tried to backup stock recovery with no luck. Do u have a copy ?
Click to expand...
Click to collapse
How did you try to backup stock recovery?
Yes do have stock images loaded on filehost as well. I will add a link in the OP.
Let's try and figure out why you had trouble decrypt.
Start by flashing that twtp image to recovery. Boot I to the twrp then follow the steps I listed
mrmazak said:
How did you try to backup stock recovery?
Yes do have stock images loaded on filehost as well. I will add a link in the OP.
Let's try and figure out why you had trouble decrypt.
Start by flashing that twtp image to recovery. Boot I to the twrp then follow the steps I listed
Click to expand...
Click to collapse
Not sure, but now Im bootlooping to twrp :/
greeneyez15o said:
Not sure, but now Im bootlooping to twrp :/
Click to expand...
Click to collapse
do you know if your phone had received the ota update. there was an update made on
Wednesday, 16-Oct-19 03:27:28 UTC not sure when it was released, though.
it is possible, but unconfirmed that this update may have made this bootloop happen. because others have said that the update made them loose there root. Unknown about the unlock status
I am still trying to fix this twrp, as it is still only one I have seen.
I also have a different phone(umidigi F1) with same soc, mt6771.
A Dev made twrp for that device that even works decrypt. @PeterCxy.
I have forked his build tree. And am trying to copy his success. Unfortunately even though devices have same soc, the encryption method is different enough that the files used to make decrypt work on F1 are not present on N1.
A made a full firmware dump of the N1 at
https://github.com/mrmazakblu/blu_n0030ww_dump
working on porting , then building old Carliv touch recovery. since it can be used with the volume rocker as well as touch.
So far i have it ooting and adb works. Of course with device encrypted , the internal storage is not accessed. but once i get the fsab and vold correctly mapped, it will be ok.
am not posting the port till sdcard is fixed, and can be built from source.
sounds great man i just oem unlocked the bold n1 how do i go far as rooting wise without the custom recovery. using magisk or do i gotta wait until the carliv recovery is available
dxpeboiiii said:
sounds great man i just oem unlocked the bold n1 how do i go far as rooting wise without the custom recovery. using magisk or do i gotta wait until the carliv recovery is available
Click to expand...
Click to collapse
Well it's up to you. In this thread I have detailed how I used ADB with twrp to flash first decrypt install package, then magisk. Or you can patch boot.img with magisk manager then flash back to phone with fastboot or sp-flash tool.
Or if you are going to use gsi AOSP, you don't need any of these options.
Any word on the touch twrp. Im rooted with magisk but need viper4android and cant seem to flash properly without twrp... I tryed all kinds of ways
dxpeboiiii said:
Any word on the touch twrp. Im rooted with magisk but need viper4android and cant seem to flash properly without twrp... I tryed all kinds of ways
Click to expand...
Click to collapse
Did you try either of the 2 ways I explained how to use adb to install zips?
1- adb sideload
2- adb twrp install. Xzxsome-zip-name
But I thought viper4android has not worked on devices higher than marshmallow
I gotten it to work on my galaxy tab a on Oreo and my galaxy s7 and different varieties of devices. And yes i tryed the command from abd in twrp to install zip.. no success yet. BUT i have a otg from a samsung devices. And am able to use twrp within the mouse and keyboard. So tryna see what my options are as far as installin zips
dxpeboiiii said:
I gotten it to work on my galaxy tab a on Oreo and my galaxy s7 and different varieties of devices. And yes i tryed the command from abd in twrp to install zip.. no success yet. BUT i have a otg from a samsung devices. And am able to use twrp within the mouse and keyboard. So tryna see what my options are as far as installin zips
Click to expand...
Click to collapse
That's good, lets us know how the otg mouse works out. I did not have one to try it.
I got viper4android workin .. i downloaded a module called "Magisk SELInux permissive Script" this basically gave me the option to be permissive thats need for viper to work. And busybox but im pretty sure thats already installed from magisk but if not just install busybox. Should be good to go for audio mods?? bout to try dolby now.. let you kno how it goes
Basically i have the device unencrypted and under magisk settings you wanna uncheck "magisk hide" you will fail safety thing but me personally idc. But anyway follow the above comment along with wat i just said you should have no issues installin viper and dolby. I also recommend a otg for custom recovery. Just easier in my opinion. I basically got device setup how i want and backed it up thru twrp. But any question feel free to ask. More then welcome to help anybody .
deleted.
dml0211 said:
deleted.
Click to expand...
Click to collapse
I think you posted in wrong stop. I see you deleted before I got reply. Oh well.
But if you need to know which type of gsi to use on your device. The best bet is to use this app, from play store.
https://play.google.com/store/apps/details?id=tk.hack5.treblecheck
mrmazak said:
@vampirefo ,you had fixed touchscreen issue in recovery on other devices. You also helped me to do the same too. If you find some time , could you try point me in some direction.
Click to expand...
Click to collapse
I got to fix the touch issue. After a bit of debugging I figured out that kernel is not able to find the firmware file for goodix:
Code:
[ 0.935177] (4)[222:goodix-parse_cf]goodix_i2c 0-005d: Direct firmware load for goodix_cfg_group.bin failed with error -2
[ 0.935177] (5)[1:swapper/0]BOOTPROF: 935.177078:probe: probe=i2c_device_probe drv=goodix_i2c(ffffff80097f7b08) 77.446154ms
[ 0.935191] (5)[1:swapper/0]i2c i2c-0: Failed to register i2c client cap_touch at 0x5d (-16)
[ 0.935191] (4)[222:goodix-parse_cf]goodix_i2c 0-005d: Falling back to user helper
[ 0.935204] (5)[1:swapper/0]i2c i2c-0: of_i2c: Failure registering /[email protected]/[email protected]
...
...
[ 2.422885] (7)[222:goodix-parse_cf]goodix_i2c 0-005d: Direct firmware load for goodix_cfg_group.bin failed with error -2
[ 2.422892] (7)[222:goodix-parse_cf]goodix_i2c 0-005d: Falling back to user helper
[ 2.423524] (4)[321:ueventd]ueventd: firmware: loading 'goodix_cfg_group.bin' for '/devices/platform/11007000.i2c/i2c-0/0-005d/firmware/goodix_cfg_group.bin'
[ 2.423633] (4)[321:ueventd]ueventd: firmware: could not find firmware for goodix_cfg_group.bin
[ 2.423664] (4)[321:ueventd]ueventd: loading /devices/platform/11007000.i2c/i2c-0/0-005d/firmware/goodix_cfg_group.bin took 0ms
[ 2.423695] (7)[222:goodix-parse_cf][GTP-ERR][goodix_read_cfg_bin:493] Cfg_bin image [goodix_cfg_group.bin] not available,error:-11, try_times:2
I digged in deeper an figured out that the firmware files are in /vendor/firmware folder and and I extracted it out and put it in
Code:
recovery/root/etc/firmware
and touch works as a result.
Code:
adb pull /vendor/firmware/goodix_cfg_group.bin
BTW, I have not yet figured out the reason for delayed screen on. I am debugging that and will let you know if I get some leads. I am also not able to get the decrypt working as of now.
Please let me know if you need any more details about how to get the touch working.
vineethrp said:
I got to fix the touch issue. After a bit of debugging I figured out that kernel is not able to find the firmware file for goodix:
Code:
[ 0.935177] (4)[222:goodix-parse_cf]goodix_i2c 0-005d: Direct firmware load for goodix_cfg_group.bin failed with error -2
[ 0.935177] (5)[1:swapper/0]BOOTPROF: 935.177078:probe: probe=i2c_device_probe drv=goodix_i2c(ffffff80097f7b08) 77.446154ms
[ 0.935191] (5)[1:swapper/0]i2c i2c-0: Failed to register i2c client cap_touch at 0x5d (-16)
[ 0.935191] (4)[222:goodix-parse_cf]goodix_i2c 0-005d: Falling back to user helper
[ 0.935204] (5)[1:swapper/0]i2c i2c-0: of_i2c: Failure registering /[email protected]/[email protected]
...
...
[ 2.422885] (7)[222:goodix-parse_cf]goodix_i2c 0-005d: Direct firmware load for goodix_cfg_group.bin failed with error -2
[ 2.422892] (7)[222:goodix-parse_cf]goodix_i2c 0-005d: Falling back to user helper
[ 2.423524] (4)[321:ueventd]ueventd: firmware: loading 'goodix_cfg_group.bin' for '/devices/platform/11007000.i2c/i2c-0/0-005d/firmware/goodix_cfg_group.bin'
[ 2.423633] (4)[321:ueventd]ueventd: firmware: could not find firmware for goodix_cfg_group.bin
[ 2.423664] (4)[321:ueventd]ueventd: loading /devices/platform/11007000.i2c/i2c-0/0-005d/firmware/goodix_cfg_group.bin took 0ms
[ 2.423695] (7)[222:goodix-parse_cf][GTP-ERR][goodix_read_cfg_bin:493] Cfg_bin image [goodix_cfg_group.bin] not available,error:-11, try_times:2
I digged in deeper an figured out that the firmware files are in /vendor/firmware folder and and I extracted it out and put it in
Code:
recovery/root/etc/firmware
and touch works as a result.
Code:
adb pull /vendor/firmware/goodix_cfg_group.bin
BTW, I have not yet figured out the reason for delayed screen on. I am debugging that and will let you know if I get some leads. I am also not able to get the decrypt working as of now.
Please let me know if you need any more details about how to get the touch working.
Click to expand...
Click to collapse
Thank you. I added the firmware to the recovery ramdisk and repacked. Just like you said. Now I have touch working. THis may have re-sparked my interest. I have more to work with now. Thanks.
Perhaps twrp is not properly mounting the /vendor and this is why we need to add that bin file to recovery/root. May also be same issue making the screen on time lag. Either way this seems like a big step forward.
I am working on adding the goodix firmware to the device tree I am building with, so will not need to do repacking. I have added the test build with working touch to the file host folder linked in OP

Categories

Resources