As you know, CM Recovery is useless for now. So i make Twrp Recoveries for our device.
It works on any kernel with extract_elf_ramdisk utility (it's built in mostly all kernels for custom ROMs, but I am not sure).And don't forget, that you are doing on your own risk, I am not responsible for bricked devices, acid rains or thermonuclear war.
Known Issues
-Nothing.
Installation:
Download z3fotatwrpv5
- Extract z3fotatwrpv5.img and place it to the root of your internal SD-card
- Type su and grant root access
- Type
Code:
dd if=/sdcard/z3fotatwrpv5.img of=/dev/block/platform/msm_sdcc.1/by-name/FOTAKernel
- Reboot to recovery to test if it works (if not, try again and check if you are doing it correctly).
Warning
- Don't flash it on stock roms. It will work on custom roms.
Download:
http://www97.zippyshare.com/v/25vBjwMU/file.html
Old Links
Z3fotatwrp- http://www.mediafire.com/download/batu9oc2hzx8d4p/z3fotatwrp.rar
Z3fotatwrpv2- https://www.mediafire.com/?f1pyuh2ac4ucmmd
Z3fotatwrpv3- https://mega.co.nz/#!FswhhLBT!SOBMiNuq6A9waYU8E7YeVVWr-39MCN01OSPYHzqOoeo
Z3fotatwrpv4- https://mega.nz/#!Bl5iTA4Y!j7hkGF5Gk4HT_COW0Gb4O_LCdC8rtX1KJouzkuMAb3U
Z3 DUAL TWRP 2.8.7.0
Many thanks to @rodrigoger for creating this image! https://www.dropbox.com/s/czwgrjjv7g29mpq/z3dualfotatwrpv4.img?dl=0
Some info:
Sony Xperia devices don't have recovery partition. Instead of this in custom kernels is used recovery-in-boot conception with two-stage boot (ramdisk-recovery is packed inside main ramdisk). And there is partition called FOTAKernel that is used for installing official FOTA (firmware-over-the-air) updates. After unlocking your bootloader it partition becomes redundant, because you cannot use OTA function anymore. So it may be used for storing recovery ramdisk. And this very useful future was implemented by a xda member, he developed utility extract_elf_ramdisk (it is merged to almost all kernels for Sony devices), it extracts recovery ramdisk from FOTA partition instead of using regular one from boot image. So even after updating or changing your kernel or ROM you don't lose your current recovery!
BTW, I don't own any of this work, recoveries are not compiled by me.
Update Z3FotaTWRPV5 (TWRP 3.0.0-0)
What's new in 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
Great work, works fine. Ill have to apply theme due to the fact it does not go full screen lol
Sent from my Xperia Z3 using XDA Free mobile app
Works fine....thx
Odoslané z Xperia Z3 pomocou Tapatalku
TigerrrRawr said:
When installing from external SD the path needs to be corrected to /storage/sdcard1/z3fotatwrpv2.img. The path you posted is for internal SD.
Thanks for creating this image!
Click to expand...
Click to collapse
I'm sorry. I was pensive while i was writing this.
Can you not just go into Fastboot and flash recovery with this file instead of method listed above?
Many thanks
Markieboy said:
Can you not just go into Fastboot and flash recovery with this file instead of method listed above?
Many thanks
Click to expand...
Click to collapse
No, because sony phones do not have a recovery partition
Most xperia recoveries are either in system or in the boot.img, this is the exception
Im a bit confused now, as i swear i flashed 2.8.4.0 and then Cyanogen recovery that way .... ??????
I'm rooted with unlocked bootloader using the exploit so have DRM keys backed up. UK GSM Unbranded
Markieboy said:
Im a bit confused now, as i swear i flashed 2.8.4.0 and then Cyanogen recovery that way .... ??????
I'm rooted with unlocked bootloader using the exploit so have DRM keys backed up. UK GSM Unbranded
Click to expand...
Click to collapse
2.8.4.0 ?
But you cannot flash a recovery in fastboot like on other phones. Cyanogenmod recovery is a boot img is that is flashed to the boot partition on fastboot, hence the code
Code:
fastboot flash BOOT boot.img
Its a kernel not a recovery, but recovery is incorporated in it.
gregbradley said:
2.8.4.0 ?
But you cannot flash a recovery in fastboot like on other phones. Cyanogenmod recovery is a boot img is that is flashed to the boot partition on fastboot, hence the code
Code:
fastboot flash BOOT boot.img
Its a kernel not a recovery, but recovery is incorporated in it.
Click to expand...
Click to collapse
So you can not do:
Code:
fastboot flash recovery fotakernel.img
?
Edit:
Turns out you can.
Verbato said:
So you can not do:
Code:
fastboot flash recovery fotakernel.img
?
Edit:
Turns out you can.
Click to expand...
Click to collapse
That's strange, as the OP says sony phones do not have a recovery partition to flash to... You may be able to
Code:
fastboot flash FOTAkernel fotakernel.img
Markieboy said:
Im a bit confused now, as i swear i flashed 2.8.4.0 and then Cyanogen recovery that way .... ??????
I'm rooted with unlocked bootloader using the exploit so have DRM keys backed up. UK GSM Unbranded
Click to expand...
Click to collapse
Which Nightly Version do u use? It must work. Give me your terminal's screenshot.
gregbradley said:
That's strange, as the OP says sony phones do not have a recovery partition to flash to... You may be able to
Code:
fastboot flash FOTAkernel fotakernel.img
Click to expand...
Click to collapse
Code:
$ fastboot flash FOTAkernel z3fotatwrpv2.img
sending 'FOTAkernel' (10728 KB)...
OKAY [ 0.353s]
writing 'FOTAkernel'...
FAILED (remote: Command not allowed)
finished. total time: 0.356s
Code:
$ fastboot flash recovery z3fotatwrpv2.img
sending 'recovery' (10728 KB)...
OKAY [ 0.353s]
writing 'recovery'...
OKAY [ 0.719s]
finished. total time: 1.072s
Well, what do you know, turns out the command really is:
Code:
fastboot flash recovery fotakernel.img
Verbato said:
Code:
$ fastboot flash FOTAkernel z3fotatwrpv2.img
sending 'FOTAkernel' (10728 KB)...
OKAY [ 0.353s]
writing 'FOTAkernel'...
FAILED (remote: Command not allowed)
finished. total time: 0.356s
Code:
$ fastboot flash recovery z3fotatwrpv2.img
sending 'recovery' (10728 KB)...
OKAY [ 0.353s]
writing 'recovery'...
OKAY [ 0.719s]
finished. total time: 1.072s
Well, what do you know, turns out the command really is:
Code:
fastboot flash recovery fotakernel.img
Click to expand...
Click to collapse
I stand corrected, but that is a new one to me.
EDIT
After talking with some devs it seems we are both correct...
It's both true
Fota IS the recovery partition, but the recovery trigger does nothing to make S1 boot from it...
So it's perfectly possible to store the recovery on the fota partition and trigger the boot to it from there with a small change in the init.
and reading the message
I can conclude fastboot does not know FOTAkernel, but assumes it to be 'recovery'
Click to expand...
Click to collapse
So basically your command is flashing to the FOTAkernel partition because fastboot does not recognise it... Schrodinger's cat... we are both correct and both wrong at the same time.
Sources Please?
hey I was wondering about the sources you used to compile this, I've tried by building with cm breakfast and omni's branch of android bootable but I get multiple errors..
Code:
bootable/recovery/gui/resources.hpp:48: error: undefined reference to 'gr_getMaxFontHeight'
bootable/recovery/gui/resources.hpp:48: error: undefined reference to 'gr_getMaxFontHeight'
bootable/recovery/gui/scrolllist.cpp:205: error: undefined reference to 'gr_clip'
bootable/recovery/gui/scrolllist.cpp:315: error: undefined reference to 'gr_noclip'
bootable/recovery/gui/resources.hpp:48: error: undefined reference to 'gr_getMaxFontHeight'
bootable/recovery/gui/resources.hpp:48: error: undefined reference to 'gr_getMaxFontHeight'
bootable/recovery/gui/console.cpp:198: error: undefined reference to 'gr_maxExW'
bootable/recovery/gui/resources.cpp:186: error: undefined reference to 'gr_freeFont'
Any help please?
I am running the latest CM12 nightly.
Can I fast boot flash the recovery and not worry about my system bricking?
Yes, it's working without any issues. Using fastboot flash recovery on twrp 2.8.5.0. It's great not to use that CM-Recovery.
Any chance we can get 2.8.5.0 for FOTA ? Stock recovery for CM12 Sucks but 2.8.4.0 does not play well with flashing CM12 Roms
Ignore as I just saw your edited OP. You may want to update your title
Sent from my Xperia Z3 using XDA Free mobile app
HaoZeke said:
hey I was wondering about the sources you used to compile this, I've tried by building with cm breakfast and omni's branch of android bootable but I get multiple errors..
Code:
bootable/recovery/gui/resources.hpp:48: error: undefined reference to 'gr_getMaxFontHeight'
bootable/recovery/gui/resources.hpp:48: error: undefined reference to 'gr_getMaxFontHeight'
bootable/recovery/gui/scrolllist.cpp:205: error: undefined reference to 'gr_clip'
bootable/recovery/gui/scrolllist.cpp:315: error: undefined reference to 'gr_noclip'
bootable/recovery/gui/resources.hpp:48: error: undefined reference to 'gr_getMaxFontHeight'
bootable/recovery/gui/resources.hpp:48: error: undefined reference to 'gr_getMaxFontHeight'
bootable/recovery/gui/console.cpp:198: error: undefined reference to 'gr_maxExW'
bootable/recovery/gui/resources.cpp:186: error: undefined reference to 'gr_freeFont'
Any help please?
Click to expand...
Click to collapse
Recoveries are not compiled by me.
Mattadome02 said:
I am running the latest CM12 nightly.
Can I fast boot flash the recovery and not worry about my system bricking?
Click to expand...
Click to collapse
I haven't tried this yet. You can flash this with my codes.
Related
Hi everyone,
I have recently been trying to port Ubuntu Touch to our beloved surnia.
I'm using the phablet-5.1 tree with AOSP-5.1 device, vendor, kernel and other repositories.
I managed to finish the build with the kernel config adapted to work with Ubuntu. (using jamino's phablet-porting-scripts (on github) and patching some files about uid/gid errors). But this isn't the problem, the default defconfig causes the same problems.
I can confirm my kernel/e3 recovery both work and can mount partitions etc, but only when I'm using the
Code:
fastboot boot recovery.img
command AND my custom boot.img isn't flashed to the device.
When trying to boot the recovery directly from the phone I get a
Code:
Error: Failed to load kernel!
error message in the bootloader log.
If my boot.img is flashed to the phone, whatever file I try to load with
Code:
fastboot boot
, I get an error from my computer :
Code:
booting...
FAILED (remote failure)
but no error from the phone
I had to replace the prebuilt gcc toolchains in the android source tree with my system's ones, could it cause the problem?
I'm quite new to android development and all so please don't blame me if the fix is obvious.
Thanks in advance
Hey guys,
I made a python script to flash custom logo images as boot logos / charging logos / fastboot logos. This will replace the default Xiaomi startup logos when you reboot or charge your phone.
Requirements:
- Linux/Mac/Win with Python3 installed
- TWRP on your MiMix3
Instructions:
- Go to https://github.com/travisjayday/logo-patcher-mix3
- Download the repo and find logogen.py (this is the python script that patches the logo img)
- Run it with python3 logogen.py and follow the instructions to generate a logo_patched.img
- Move the logo_patched.img to your phone and reboot into TWRP
- Flash it in TWRP onto the Logo partition
- Profit
For more detailed instructions, please read the README.md in the GitHub repo or execute python3 logogen.py --help
Hope you like custom logos!
Have fun!
Thanks for this.
There's something wrong when I tried to patch fastboot image.
Log is below.
C:\logo-patcher-mix3-master>python logogen.py -b new_boot.bmp -f new_fastboot.bmp
Unpacking vendor logo.img file for MiMix3...
Reading bitmap image from new_boot.bmp
Succesfully read bitmap with dimensions (1080x1920x24)
Patching boot image at: 0x5000
Original size: 6220854 bytes
Replacement size: 6220856 bytes
Patched boot logo successfully...
Patching unlocked image at: 0x7b8000
Original size: 6220854 bytes
Replacement size: 6220856 bytes
Patched unlocked logo successfully...
Reading bitmap image from new_fastboot.bmp
Succesfully read bitmap with dimensions (558x992x24)
Traceback (most recent call last):
File "logogen.py", line 155, in <module>
main()
File "logogen.py", line 44, in main
if dim != dimens["fast"][1]:
KeyError: 'fast'
Click to expand...
Click to collapse
Ah~ Find it!You should type fastboot instead of fast in line 44&45.XD
@Seraph_X thanks for finding and letting me know of this error!
Anyone have any already modded boot logos, that i can just flash?
Hi, I have the phone at MIUI 11, I tried to do this, and it didn't work, luckily I don't have a brick now, hahahahaha.
I got an error message, I didn't know what it said exactly, and it continued with the normal start.
The error appeared, because in twrp the logo partition doesn't appear, so I did it from ADB.
Any ideas?
Thank you.
Done.
It was just a procedural error.
To avoid this, the ideal is that whoever makes this kind of script, make the step-by-step tutorials for donkeys, like me.
I've found a lot of "tutorials" to flash all kinds of things, and unfortunately most of them don't explain almost anything -
We newcomers must beg for help, which in most cases is denied because it is taken for granted what most people do not know.
While it is true that you should not do anything you do not know, it is also true that those who share should be more talkative, and leave everything prepared for those who wish to enjoy their work.
Greetings.
I just realized that my mi mix 3 boot logo become apple logo, i never have bootloader unlocked and just upgraded to miui 11 weeks ago
Is there some kind of virus that did this?
Recently purchased an iplay 7t after reading the xda review. This is replacing an LG v400 tablet that I had rooted. I updated the iplay to build T701_V1.20_20191112, enabled developer options, enabled oem unlock bootloader, found the corresponding firmware pac, installed magisk and used it to patch boot.img. So far so good.
I entered fastboot, then I attempted to flash the modified boot.img and was told:
Code:
target didn't report max-download-size
sending 'boot' (18584 KB)...
OKAY [ 0.593s]
writing 'boot'...
FAILED (remote: Flashing Lock Flag is locked. Please unlock it first!)
finished. total time: 0.608s
I tried various options to unlock the bootloader:
Code:
> fastboot getvar unlocked
unlocked:
finished. total time: -0.000s
> fastboot oem unlock
...
FAILED (remote: unknown cmd.)
finished. total time: -0.000s
> fastboot oem unlock-go
...
FAILED (remote: unknown cmd.)
finished. total time: 0.002s
> fastboot flashing get_unlock_ability
...
FAILED (remote: Not implement.)
finished. total time: -0.000s
> fastboot flashing unlock
...
FAILED (remote: Not implemet.)
finished. total time: -0.000s
> fastboot flashing unlock_critical
...
FAILED (remote: Not implement.)
finished. total time: 0.016s
> fastboot flashing unlock_bootloader
fastboot: usage: unknown 'flashing' command unlock_bootloader
> fastboot flashing unlock_bootloader_nonce
fastboot: usage: unknown 'flashing' command unlock_bootloader_nonce
Okay ... fine. I fired up SPD Research tool and attempted to use it to flash the modified boot.img. It transfers the image and then times out.
As a sanity check I used SPD Research tool to flash the original boot.img and that worked fine.
I'll note the modified image is smaller than the original, however padding the modified image with zeros to the same size didn't seem to help. Using SPD Research tool to flash the padded image still timed out.
I am looking to open a request up on the Alldocube support site (currently their registration form is giving me an error), in the meantime ... suggestions? Has anyone successfully flashed a modified boot.img on this device / rooted this device?
in the "developer option" on your phone, you should enable the "allow unlock bootloader" option.
DR.Doyle said:
in the "developer option" on your phone, you should enable the "allow unlock bootloader" option.
Click to expand...
Click to collapse
Yes ... I have that enabled.
Okay I was able to unlock the bootloader by using the procedure documented for the Qin 2 Pro. With the bootloader unlocked on reboot the device notes:
Code:
INFO: LOCK FLAG IS : UNLOCKED!!!
followed by:
Code:
WARNING: LOCK FLAG IS : UNLOCKED, SKIP VERIFY!!!
Using fastboot I can now reflash the stock vbmeta and the stock recovery without any problems and the stock recovery boots fine.
Also if I re-sign the stock recovery, then I can't flash it (fastboot flash hangs) until I've flashed a modified vbmeta containing the new public key for the re-signed recovery. Meaning flashing vbmeta is "working".
All this seems like I'm on the right track.
However attempting to boot into the re-signed stock recovery results in:
Code:
INFO: LOCK FLAG IS : UNLOCKED!!!
followed by the device hanging (without displaying the WARNING message) so there is still something that's unhappy.
Any thoughts on how to get to the point that I can flash a useable re-signed stock recovery? If I can get that to work, then I should be in good shape to install magisk.
jwehle said:
Okay I was able to unlock the bootloader by using the procedure documented for the Qin 2 Pro. With the bootloader unlocked on reboot the device notes:
Code:
INFO: LOCK FLAG IS : UNLOCKED!!!
followed by:
Code:
WARNING: LOCK FLAG IS : UNLOCKED, SKIP VERIFY!!!
Using fastboot I can now reflash the stock vbmeta and the stock recovery without any problems and the stock recovery boots fine.
Also if I re-sign the stock recovery, then I can't flash it (fastboot flash hangs) until I've flashed a modified vbmeta containing the new public key for the re-signed recovery. Meaning flashing vbmeta is "working".
All this seems like I'm on the right track.
However attempting to boot into the re-signed stock recovery results in:
Code:
INFO: LOCK FLAG IS : UNLOCKED!!!
followed by the device hanging (without displaying the WARNING message) so there is still something that's unhappy.
Any thoughts on how to get to the point that I can flash a useable re-signed stock recovery? If I can get that to work, then I should be in good shape to install magisk.
Click to expand...
Click to collapse
Dear jwehle:
good job, i have also modify the pac firmware file which based on chinese vesion firmware:T701-1101-vbmetapri-vennofbe-systemnore-recpri01.pac
What's modified:
1.resgin the vbmeta img
2.delete fbe Force encryption in vendor partitions
3.delete the script in system.img to prevent factory recovery restore
4.modify recovery.img to a magisk build-in recovery
please use SPD_Research_Tool to flash the pac,change the android os language from chinese to english ,install magiskmanager app ,and the use adb command (adb reboot recovery)to let tablet reboot to recovery.
after tablet reboot to android os again ,open magiskmanager app,you can see the magisk can get root authority .
how to change language from chinese to english,please see attach png file.
Considering that the Android os you are using is in English version(including Google services),according to the modification points above, you can try to use the vbmeta and recovery (built in magisk) modified by your own signature , and then delete the fbe Force encryption、 recovery restoration in the system and vendor images , then use the SPD_Research_Tool to package the imgs into a pac image, flash the pac image, install the magiskmanager app, and use the adb command to restart the machine into recovery mode, so you can use magisk to get root permissions.
twrp egg:https://mega.nz/#!YZ9VDZbT!1ptlOI6g3FS_ES-cLGhLy9ybGtdHQ8vzVHaasAXglXo
and last thanks PeterCxy on xda 、the other masters sifu on 4pda agian.
wangyiling said:
Dear jwehle:
good job, i have also modify the pac firmware file which based on chinese vesion firmware:T701-1101-vbmetapri-vennofbe-systemnore-recpri01.pac
What's modified:
1.resgin the vbmeta img
2.delete fbe Force encryption in vendor partitions
3.delete the script in system.img to prevent factory recovery restore
4.modify recovery.img to a magisk build-in recovery.
Click to expand...
Click to collapse
Thanks for supplying the modified PAC and for explaining the changes.
Your PAC seemed to work fine and now that I have a better understanding
of things I should be able build my own PAC when I have a chance.
Your time and effort in explaining things is appreciated.
What's the significance of removing the encryption for the vendor partitions?
jwehle said:
What's the significance of removing the encryption for the vendor partitions?
Click to expand...
Click to collapse
the vendor img in my pac,just use ext4 format.i have use simg2img convert the oringin vendor img to ext4 format,and modify the fstab file in vendor/etc folder.
fstab.sp9832e_1h10:
Code:
/dev/block/platform/soc/soc:ap-ahb/20600000.sdio/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,inline_xattr,inline_data wait,check,[COLOR="DarkOrange"]fileencryption[/COLOR]=aes-256-xts,reservedsize=128M
/dev/block/platform/soc/soc:ap-ahb/20600000.sdio/by-name/userdata /data ext4 noatime,nosuid,nodev,nomblk_io_submit,noauto_da_alloc wait,check,[COLOR="darkorange"]fileencryption[/COLOR]=aes-256-xts
---------->
Code:
/dev/block/platform/soc/soc:ap-ahb/20600000.sdio/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,inline_xattr,inline_data wait,check,[COLOR="darkorange"]encryptable[/COLOR]=aes-256-xts,reservedsize=128M
/dev/block/platform/soc/soc:ap-ahb/20600000.sdio/by-name/userdata /data ext4 noatime,nosuid,nodev,nomblk_io_submit,noauto_da_alloc wait,check,[COLOR="darkorange"]encryptable[/COLOR]=aes-256-xts
wangyiling said:
the vendor img in my pac,just use ext4 format.i have use simg2img convert the oringin vendor img to ext4 format,and modify the fstab file in vendor/etc folder.
Click to expand...
Click to collapse
Actually, I was more curious as to why it was necessary / desirable to remove the encryption from the vendor partitions.
jwehle said:
Actually, I was more curious as to why it was necessary / desirable to remove the encryption from the vendor partitions.
Click to expand...
Click to collapse
Just for twrp to read the data partition, convenient for personal use。
It looks like the issue on this tablet is similar to what the magisk documentation mentions regarding the new Samsung tablets. Meaning after the bootloader is unlocked when rooting you should flash newly signed versions of the following:
Code:
vbmeta
boot
recovery
What was happening is when the system started normally it saw that recovery image had been modified so it checked if the boot image was the factory standard image. Since I hadn't touched the boot image the OS went ahead and attempted to replace the recovery image I flashed with a standard recovery image generated on the fly from the factory standard boot image. This caused a soft-brick when I rebooted into recovery since that recovery image wasn't signed using the public key specified by my replacement vbmeta.
By also flashing a newly signed boot image because the signature is different from what's it knows about the system no longer attempts to use it to refresh the recovery image.
Here's an outline of what I did to successfully root the device:
Use the Qin 2 Pro instructions / tools to unlock the boot loader.
Flash the appropriate factory standard firmware to establish a know starting point. I used iplay7t(T701)-Android9.0-ALLDOCUBE-191112 from the Alldocube web site.
Use SPD Rsearch Tool to extract vbmeta-sign.img, boot.img, and recovery.img.
Use avbtool (with the below patch) to extract the public keys from vbmeta-sign.img like so:
Code:
avbtool info_image --image vbmeta-sign.img.
Use make (with the below makefile) to sign vbmeta, boot, and recovery using a new key.
Flashed vbmeta, boot, and recovery.
Booted into recovery, saw that it worked, and did a factory reset.
Used magisk to patch recovery.img in the normal fashion, signed the patched recovery using the new key, and flashed the patched recovery.
Proceed to finish installing magisk in the normal fashion.
Notes:
rsa4096_vbmeta.pem is the private key mentioned in the Qin 2 Pro article.
The dhtbsign-vbmeta command is basically the dhtb signing python script from Qin 2 Pro article.
Here's the trival patch for avbtool to dump the public keys.
Code:
--- avbtool 2020-02-22 22:11:55.107787032 -0500
+++ avbtool.dumpkeys 2020-02-22 22:15:36.046283077 -0500
@@ -1657,6 +1657,10 @@ class AvbChainPartitionDescriptor(AvbDes
Arguments:
o: The object to write the output to.
"""
+ kfd = open(self.partition_name, "w");
+ kfd.write(self.public_key);
+ kfd.close();
+
o.write(' Chain Partition descriptor:\n')
o.write(' Partition Name: {}\n'.format(self.partition_name))
o.write(' Rollback Index Location: {}\n'.format(
Here's the makefile I used for signing the images.
Code:
all: boot-sign.img recovery-sign.img vbmeta-sign.img
vbmeta-sign.img: Makefile avb4096_pkmd.bin keys/*
avbtool make_vbmeta_image --output vbmeta.img --padding_size 16384 \
--key ../rsa4096_vbmeta.pem --algorithm SHA256_RSA4096 --flag 0 \
--chain_partition boot:1:avb4096_pkmd.bin \
--chain_partition system:3:keys/system \
--chain_partition vendor:4:keys/vendor \
--chain_partition product:10:keys/product \
--chain_partition dtbo:9:keys/dtbo \
--chain_partition recovery:2:avb4096_pkmd.bin \
--chain_partition l_modem:5:keys/l_modem \
--chain_partition l_ldsp:6:keys/l_ldsp \
--chain_partition l_gdsp:7:keys/l_gdsp \
--chain_partition pm_sys:8:keys/pm_sys \
--chain_partition dtb:11:keys/dtb
dhtbsign-vbmeta vbmeta.img vbmeta-sign.img
@rm -f vbmeta.img
avb4096_pkmd.bin: avb4096.pem
avbtool extract_public_key --key avb4096.pem --output avb4096_pkmd.bin
avb4096.pem:
openssl genrsa -out avb4096.pem 4096
boot-sign.img: boot.img avb4096.pem
cp boot.img boot-sign.img
avbtool add_hash_footer --image boot-sign.img \
--partition_name boot --partition_size 36700160 \
--key avb4096.pem --algorithm SHA256_RSA4096
recovery-sign.img: recovery.img avb4096.pem
cp recovery.img recovery-sign.img
avbtool add_hash_footer --image recovery-sign.img \
--partition_name recovery --partition_size 36700160 \
--key avb4096.pem --algorithm SHA256_RSA4096
@ jwehle,Very grateful for your detailed sharing
Did you have any trouble getting the tablet to populate the fastboot devices list?
I have USB drivers installed and can view the tablet's internal storage when it's not in fastboot mode. She's plugged directly into the mobo and I've tried two cables.
When in fastboot mode, it comes up in the Windows Device Manager as fastboot Gadget and drivers are apparently not available. I've tried using Zadig to feed it a driver of some kind, but still nothing.
MissAyako said:
Did you have any trouble getting the tablet to populate the fastboot devices list?
I have USB drivers installed and can view the tablet's internal storage when it's not in fastboot mode. She's plugged directly into the mobo and I've tried two cables.
When in fastboot mode, it comes up in the Windows Device Manager as fastboot Gadget and drivers are apparently not available. I've tried using Zadig to feed it a driver of some kind, but still nothing.
Click to expand...
Click to collapse
Seems the issue was with Windows. I thought I would be able to get the unlock token with Windows and then use WSL to do the rest of the signing, but apparently not.
Luckily I had an old laptop lying around. I threw Linux Mint on it and it worked just fine.
It didn't seem to work just using a live USB; I had to install Linux to the hard disk, but YMMV.
jwehle said:
It looks like the issue on this tablet is similar to what the magisk documentation mentions regarding the new Samsung tablets. Meaning after the bootloader is unlocked when rooting you should flash newly signed versions of the following:
Click to expand...
Click to collapse
This was wonderful, thank you! I've added some of my own notes below as an experience of what I encountered when attempting this process myself (spoiler'd because it is a lot).
I do not have enough post count to add links, but titles to the relevant articles has been added.
Follow steps in Article "Guide: How to Unlock Xiaomi Qin 2 (Pro) and Install Custom ROMs" from step 1 to (and including) step 10 (Unlocking section).
Notes:
- A Linux PC is necessary.
- You'll have to mark the "fastboot" file from the "Android_device_unlock.rar" archive as executable (chmod +x).
- Run the "fastboot" file as root.
- Getting the "SPD Research Tool" to pick up the tablet and not let the tablet try to move to either the charging
screen or the bootlogo is difficult, but do-able. Press and hold Power+Vol_Up and release when Windows does its
USB device detected chime.
- Flashing takes a few minutes (I think around 300 seconds).
- The SPD Research Tool extracts the PAC file contents into a folder. Grab the system images from there.
- The "avbtool" is available to be cloned via git from Google's repo
- The avbtool is a python script that is patched with three lines of code at line 1776:
Code:
kfd = open(self.partition_name, "w");
kfd.write(self.public_key);
kfd.close();
- When you use the patched avbtool on the vbmeta-sign.img file you copied (avbtool info_image --image vbmeta-sign.img)
it will produce several partitions with relative public keys that need to be stored in separate files for the next step.
The contents of the files are simply the public key and the partition name as the file name. Store the files in a folder named "keys".
- When creating the makefile, ensure that proper indentation is used. The code segment below is properly formatted (hopefully). If you get make errors, remove and re-indent the lines.
- If your "rsa4096_vbmeta.pem" keyfile is not placed alongside the makefile, ensure the --key flag points to this file.
- The makefile exists in the same directory as the system images.
- I had to insert local paths to the avbtool, as it was not installed to the system PATH.
- The dhtbsign-vbmeta.py command is located below. Make sure to mark this as executable as well.
Everything else is rather straightforward.
# makefile
Code:
all: boot-sign.img recovery-sign.img vbmeta-sign.img
vbmeta-sign.img: makefile avb4096_pkmd.bin keys/*
avbtool make_vbmeta_image --output vbmeta.img --padding_size 16384 \
--key rsa4096_vbmeta.pem --algorithm SHA256_RSA4096 --flag 0 \
--chain_partition boot:1:avb4096_pkmd.bin \
--chain_partition system:3:keys/system \
--chain_partition vendor:4:keys/vendor \
--chain_partition product:10:keys/product \
--chain_partition dtbo:9:keys/dtbo \
--chain_partition recovery:2:avb4096_pkmd.bin \
--chain_partition l_modem:5:keys/l_modem \
--chain_partition l_ldsp:6:keys/l_ldsp \
--chain_partition l_gdsp:7:keys/l_gdsp \
--chain_partition pm_sys:8:keys/pm_sys \
--chain_partition dtb:11:keys/dtb
./dhtbsign-vbmeta.py vbmeta.img vbmeta-sign.img
@rm -f vbmeta.img
avb4096_pkmd.bin: avb4096.pem
avbtool extract_public_key --key avb4096.pem --output avb4096_pkmd.bin
avb4096.pem:
openssl genrsa -out avb4096.pem 4096
boot-sign.img: boot.img avb4096.pem
cp boot.img boot-sign.img
avbtool add_hash_footer --image boot-sign.img \
--partition_name boot --partition_size 36700160 \
--key avb4096.pem --algorithm SHA256_RSA4096
recovery-sign.img: recovery.img avb4096.pem
cp recovery.img recovery-sign.img
# dhtbsign-vbmeta.py file (from "How I Unlocked Xiaomi Qin 2 Pro and Installed Phh GSI")
Code:
#!/usr/bin/env python
import hashlib
import sys
f = open(sys.argv[1], "rb")
b = f.read()
sha = hashlib.sha256(b).digest()
f.close()
f = open("vbmeta_signed.img", "wb")
f.write(b)
f.seek(1048576 - 512)
f.write(b'\x44\x48\x54\x42\x01\x00\x00\x00')
f.write(sha)
f.write(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00')
f.seek(1048576 - 1)
f.write(b'\x00')
f.close()
wuxianlin has build a twrp device for T701.
i think this will be a help .
Help me
Sir help pliz same problem my device ,same chipset , Symphony i95 ,pliz sir modify my pac file pliz....
wangyiling said:
Dear jwehle:
good job, i have also modify the pac firmware file which based on chinese vesion firmware:T701-1101-vbmetapri-vennofbe-systemnore-recpri01.pac
What's modified:
1.resgin the vbmeta img
2.delete fbe Force encryption in vendor partitions
3.delete the script in system.img to prevent factory recovery restore
4.modify recovery.img to a magisk build-in recovery
please use SPD_Research_Tool to flash the pac,change the android os language from chinese to english ,install magiskmanager app ,and the use adb command (adb reboot recovery)to let tablet reboot to recovery.
after tablet reboot to android os again ,open magiskmanager app,you can see the magisk can get root authority .
how to change language from chinese to english,please see attach png file.
Considering that the Android os you are using is in English version(including Google services),according to the modification points above, you can try to use the vbmeta and recovery (built in magisk) modified by your own signature , and then delete the fbe Force encryption、 recovery restoration in the system and vendor images , then use the SPD_Research_Tool to package the imgs into a pac image, flash the pac image, install the magiskmanager app, and use the adb command to restart the machine into recovery mode, so you can use magisk to get root permissions.
twrp egg:https://mega.nz/#!YZ9VDZbT!1ptlOI6g3FS_ES-cLGhLy9ybGtdHQ8vzVHaasAXglXo
and last thanks PeterCxy on xda 、the other masters sifu on 4pda agian.
Click to expand...
Click to collapse
can i just flash the pac without unlocking the bootloader.
thanks in advances
hidroela said:
can i just flash the pac without unlocking the bootloader.
thanks in advances
Click to expand...
Click to collapse
yes,just falsh pac
wangyiling said:
yes,just falsh pac
Click to expand...
Click to collapse
i did unlocked the bootloader and flash the pac and follow the instructions for magisk to work, but after a third reboot Root was gone.
i don't know what I am missing.
Hi everyone, I recently ported postmarketOS to the Moto G6.
I do not recommend installing this if the device is your daily driver. Not much works besides the screen. This is more of a proof-of-concept.
https://wiki.postmarketos.org/wiki/Motorola_Moto_G6_(motorola-ali)
If you would like to try it, you can follow the instructions here for "motorola" and "ali" : https://wiki.postmarketos.org/wiki/Installation_guide
Kernel source: https://github.com/msm8953-mainline/linux
Updates
6/3/2020:
64-bit support has been added, thanks to the work of the the RevengeOS project.
11/21/2022:
Firmware has been added (meaning things like wifi and GPU acceleration are now working)
The RevengeOS kernel has been replaced by a recent Linux fork (version 5.18.3)
A patch has been submitted to upstream Linux to add initial support for our device (only the PVT2 variant)
Uclydde said:
Hi everyone, I recently ported postmarketOS to the Moto G6.
I do not recommend installing this if the device is your daily driver. Not much works besides the screen. This is more of a proof-of-concept.
https://wiki.postmarketos.org/wiki/Motorola_Moto_G6_(motorola-ali)
If you would like to try it, you can follow the instructions here for "motorola" and "ali" : https://wiki.postmarketos.org/wiki/Installation_guide
Kernel source: https://github.com/Uclydde/kernel-msm/tree/lineage-16.0
Click to expand...
Click to collapse
Does wifi work?
vibraniumdroid said:
Does wifi work?
Click to expand...
Click to collapse
no
MarlonBrZ said:
no
Click to expand...
Click to collapse
It's still pretty cool though! We're seeing some development on a device I though was dead.
On the wiki it states:
"As of 8/10/2021, the Moto G6 is able to boot the msm8953 mainline kernel fork. It works fairly well, with features like display, touchscreen, and wifi working."
Where do I find that kernel and how do I install it. If I could get wifi to work this could actually be quite useful.
JPutz said:
On the wiki it states:
"As of 8/10/2021, the Moto G6 is able to boot the msm8953 mainline kernel fork. It works fairly well, with features like display, touchscreen, and wifi working."
Where do I find that kernel and how do I install it. If I could get wifi to work this could actually be quite useful.
Click to expand...
Click to collapse
Have you found a way yet?
I've seen many repos named msm8953, but had no clue it was for this device, I'll look up my browser history and post back here if I find any helpful instructions.
adhamnasr said:
Have you found a way yet?
I've seen many repos named msm8953, but had no clue it was for this device, I'll look up my browser history and post back here if I find any helpful instructions.
Click to expand...
Click to collapse
GitHub - brunorolak/kernel_motorola_msm8953
Contribute to brunorolak/kernel_motorola_msm8953 development by creating an account on GitHub.
github.com
This is the most up to date kernel we use, I have no Idea how you can implement it for postmarketos tho.
I remember seeing that blurb mentioning how it was working better on the mainline kernel and assumed they literally meant the mainline Linux kernel.
I assume that is the case, or maybe their own tree they are calling "close to mainline":
(Close to) Mainline - postmarketOS
wiki.postmarketos.org
In any case, I haven't tried installing PostmarketOS in a while, so I've no idea the actual status.
Any progress on this? Would love to have another mobile Linux device besides my Pinephone!
J-Mizzle said:
Any progress on this? Would love to have another mobile Linux device besides my Pinephone!
Click to expand...
Click to collapse
Yes, I've submitted an update to postmarketOS to use a close-to-mainline fork of the Linux kernel for our device.
Also, firmware support has been added, meaning that things like wifi and GPU acceleration are now working.
However, the display backlight isn't working, as well as several other things like audio, battery data, and camera.
adhamnasr said:
Have you found a way yet?
I've seen many repos named msm8953, but had no clue it was for this device, I'll look up my browser history and post back here if I find any helpful instructions.
Click to expand...
Click to collapse
Mainline kernel development for all devices with this SoC is happening here: https://github.com/msm8953-mainline/linux
vibraniumdroid said:
Does wifi work?
Click to expand...
Click to collapse
With the most recent update, now it does. You'll need to enable firmware when installing postmarketOS.
Uclydde said:
Yes, I've submitted an update to postmarketOS to use a close-to-mainline fork of the Linux kernel for our device.
Also, firmware support has been added, meaning that things like wifi and GPU acceleration are now working.
However, the display backlight isn't working, as well as several other things like audio, battery data, and camera.
Mainline kernel development for all devices with this SoC is happening here: https://github.com/msm8953-mainline/linux
With the most recent update, now it does. You'll need to enable firmware when installing postmarketOS.
Click to expand...
Click to collapse
I thought this was for the Moto G6 Play. I'm far less excited now. Good progress for those with the normal G6.
J-Mizzle said:
I thought this was for the Moto G6 Play. I'm far less excited now. Good progress for those with the normal G6.
Click to expand...
Click to collapse
You can find the Moto G6 Play's forum here: https://forum.xda-developers.com/c/moto-g6-play.8553/
By the way, the G6 Play has some postmarketOS support - but not from me. Here's the wiki page for it: https://wiki.postmarketos.org/wiki/Motorola_Moto_G6_Play_(motorola-aljeter)
Uclydde said:
You can find the Moto G6 Play's forum here: https://forum.xda-developers.com/c/moto-g6-play.8553/
By the way, the G6 Play has some postmarketOS support - but not from me. Here's the wiki page for it: https://wiki.postmarketos.org/wiki/Motorola_Moto_G6_Play_(motorola-aljeter)
Click to expand...
Click to collapse
Yes, I've got both those pages bookmarked. For some reason I failed to notice I ended up in the G6 forum vs the G6 Play. The Play variant doesnct seem to get much attention Android development. I follow PostmarketOS' Mastodon account as well as a handful of device maintainers and the G6 Play doesn't seem very active. I've got a Pinephone and have been considering picking up a OnePlus 6(T) as a more powerful alternative.
Hello, I tried to install this using
pmbootstrap init and pmbootstrap install to setup the installation with xfce4 and the commands from the wiki
it installs /system successfully but i can't boot to it and booting to boot.img fails, what can I do?
Code:
[20:49:45] DONE!
[email protected]:~$ pmbootstrap flasher flash_rootfs
[20:50:02] (native) flash rootfs image
[20:50:07] (native) install android-tools
< waiting for any device >
(bootloader) is-logical:system: not found
Sending sparse 'system' 1/2 (519524 KB)
OKAY [129.331s]
Writing 'system' OKAY [ 6.951s]
Sending sparse 'system' 2/2 (456977 KB) OKAY [114.314s]
Writing 'system' OKAY [ 6.170s]
Finished. Total time: 264.514s
[20:54:53] NOTE: chroot is still active (use 'pmbootstrap shutdown' as necessary)
[20:54:53] DONE!
[email protected]:~$ pmbootstrap flasher boot
[20:55:29] (rootfs_motorola-ali) install device-motorola-ali
[20:55:37] (rootfs_motorola-ali) install postmarketos-mkinitfs
[20:55:41] (rootfs_motorola-ali) mkinitfs postmarketos-qcom-msm8953
[20:55:51] (native) boot postmarketos-qcom-msm8953 kernel
[20:55:51] (native) install android-tools
Sending 'boot.img' (10858 KB) OKAY [ 2.589s]
Booting FAILED (remote: '')
fastboot: error: Command failed
[20:55:56] NOTE: The failed command's output is above the ^^^ line in the log file: /home/t/.local/var/pmbootstrap/log.txt
[20:55:56] ERROR: Command failed (exit code 1): (native) % fastboot --cmdline boot /mnt/rootfs_motorola-ali/boot/boot.img
[20:55:56] See also: <https://postmarketos.org/troubleshooting>
now i can't even mount '/system' through twrp (invalid argument) xd, please help
to the lack of information i got, i've thought i could install it overwriting a android custom rom i was using (Lineage 19.1, arm64)
gabriela-fazoli said:
Hello, I tried to install this using
pmbootstrap init and pmbootstrap install to setup the installation with xfce4 and the commands from the wiki
it installs /system successfully but i can't boot to it and booting to boot.img fails, what can I do?
Code:
[20:49:45] DONE!
[email protected]:~$ pmbootstrap flasher flash_rootfs
[20:50:02] (native) flash rootfs image
[20:50:07] (native) install android-tools
< waiting for any device >
(bootloader) is-logical:system: not found
Sending sparse 'system' 1/2 (519524 KB)
OKAY [129.331s]
Writing 'system' OKAY [ 6.951s]
Sending sparse 'system' 2/2 (456977 KB) OKAY [114.314s]
Writing 'system' OKAY [ 6.170s]
Finished. Total time: 264.514s
[20:54:53] NOTE: chroot is still active (use 'pmbootstrap shutdown' as necessary)
[20:54:53] DONE!
[email protected]:~$ pmbootstrap flasher boot
[20:55:29] (rootfs_motorola-ali) install device-motorola-ali
[20:55:37] (rootfs_motorola-ali) install postmarketos-mkinitfs
[20:55:41] (rootfs_motorola-ali) mkinitfs postmarketos-qcom-msm8953
[20:55:51] (native) boot postmarketos-qcom-msm8953 kernel
[20:55:51] (native) install android-tools
Sending 'boot.img' (10858 KB) OKAY [ 2.589s]
Booting FAILED (remote: '')
fastboot: error: Command failed
[20:55:56] NOTE: The failed command's output is above the ^^^ line in the log file: /home/t/.local/var/pmbootstrap/log.txt
[20:55:56] ERROR: Command failed (exit code 1): (native) % fastboot --cmdline boot /mnt/rootfs_motorola-ali/boot/boot.img
[20:55:56] See also: <https://postmarketos.org/troubleshooting>
now i can't even mount '/system' through twrp (invalid argument) xd, please help
to the lack of information i got, i've thought i could install it overwriting a android custom rom i was using (Lineage 19.1, arm64)
Click to expand...
Click to collapse
Reinstall stock with partitons commands
Hello.
I have the same problem as @gabriela-fazoli .
I have reinstalled stock as advised by @brunogroa but even after this I get the same error as shown above.
Do I need to install lk2nd maybe?
If I do then can someone please advise as to how I compile it.
I am using debian 11 and have installed the required dependencies including:
gcc-arm-none-eabi
device-tree-compiler
build-essential
I do not know what is meant by "Replace TOOLCHAIN_PREFIX with the path to your tool chain." when issuing the make command ie: make TOOLCHAIN_PREFIX=arm-none-eabi- <SoC>-secondary
Also is <SOC> meant to be replaced with sdm450-motorola-ali
I am a major newb when it comes to cross compiling.
Thank you for any assistance. I am very excited to give PostmarketOS a whirl on the G6.
Cheers
Bill
For any one else who might have issues compiling lk2nd I can highly recommend this website:
GCC Cross-Compiler - OSDev Wiki
wiki.osdev.org
Have compiled successfully using above instructions and the following make command:
make TOOLCHAIN_PREFIX=~/opt/cross/bin/arm-none-eabi- msm8953-secondary
Haven't tried it yet but fingers crossed.
No good.
I installed lk2nd with the following response:
fastboot flash boot lk2nd.img
(bootloader) is-logical:boot: not found
Sending 'boot' (288 KB) OKAY [ 0.178s]
Writing 'boot' (bootloader) Image not signed or corrupt
OKAY [ 0.028s]
Finished. Total time: 0.208s
Click to expand...
Click to collapse
Couldn't get lk2nd to boot though with Volume-Down pressed at varying intervals.
Then did the following:
[email protected]:~/pmbootstrap$ pmbootstrap flasher flash_rootfs
[10:33:14] (native) flash rootfs image
[10:33:16] (native) install android-tools
(bootloader) is-logical:system: not found
Sending sparse 'system' 1/3 (522136 KB) OKAY [ 19.229s]
Writing 'system' OKAY [ 5.087s]
Sending sparse 'system' 2/3 (517848 KB) OKAY [ 18.848s]
Writing 'system' OKAY [ 4.920s]
Sending sparse 'system' 3/3 (135789 KB) OKAY [ 4.943s]
Writing 'system' OKAY [ 1.128s]
Finished. Total time: 54.896s
[10:34:11] NOTE: chroot is still active (use 'pmbootstrap shutdown' as necessary)
[10:34:11] DONE!
[email protected]:~/pmbootstrap$ pmbootstrap flasher boot
[10:34:23] (rootfs_motorola-ali) install device-motorola-ali
[10:34:28] (rootfs_motorola-ali) install postmarketos-mkinitfs
[10:34:30] (rootfs_motorola-ali) mkinitfs postmarketos-qcom-msm8953
[10:34:38] (native) boot postmarketos-qcom-msm8953 kernel
[10:34:38] (native) install android-tools
Sending 'boot.img' (10858 KB) OKAY [ 0.397s]
Booting OKAY [ 0.587s]
Finished. Total time: 0.993s
[10:34:39] You will get an IP automatically assigned to your USB interface shortly.
[10:34:39] Then you can connect to your device using ssh after pmOS has booted:
[10:34:39] ssh [email protected]
[10:34:39] NOTE: If you enabled full disk encryption, you should make sure that osk-sdl has been properly configured for your device
[10:34:39] NOTE: chroot is still active (use 'pmbootstrap shutdown' as necessary)
[10:34:39] DONE!
Click to expand...
Click to collapse
It then reboots and shows the blue screen with the yellow Motorola 'M' and Powered By Android in white at the bottom.
Then it does nothing else.
I hold the power button in and it does the reboot loop thing but without the blue Motorola screen.
I can get into fastboot and TWRP without problem.
Any ideas?
Hi, I have a build problem when building AOSP kernel using Vim3Pro for AOSP kernel development with android kernel 5.10.
I cloned AOSP kernel images following the below command.
git clone https://android.googlesource.com/kernel/hikey-linaro -b android-amlogic-bmeson-5.10
Then, I inserted some additional kernel functions and commands like ‘printk’ and rebuilt it.
The size of recovery.img file increased 32 MB → 32.X MB, and I modified BOARD_RECOVERYIMAGE_PARTITION_SIZE 32MB to 64MB in ‘device/amlogic/yukawa/BoardConfigCommon.mk’ file.
However, when using uboot and fastboot, I still get the below message.
target reported max download size of 117440512 bytes
sending 'recovery' (33412 KB)...
OKAY [ 1.832s]
writing 'recovery'...
FAILED (remote: too large for partition)
finished. total time: 1.845s
Which file or option should I modify other files or options?
JWChoi1996 said:
I modified BOARD_RECOVERYIMAGE_PARTITION_SIZE 32MB to 64MB in ‘device/amlogic/yukawa/BoardConfigCommon.mk’ file.
Click to expand...
Click to collapse
Why? That will make recovery larger than 32mb
aIecxs said:
Why? That will make recovery larger than 32mb
Click to expand...
Click to collapse
I added some additional kernel functions and operations to the original aosp source code for debugging.
Then, the build program generated recovery.img larger than 32MB.
So, I had to fix that variable. if not the build program makes a failure.
Is the increased recovery image file wrong?
Had I some mistakes on aosp source code?
your recovery partition is 32mb, you must not create file larger than 32mb. use another toolchain, clang compiler will half the kernel size compared to gcc.
aIecxs said:
your recovery partition is 32mb, you must not create file larger than 32mb. use another toolchain, clang compiler will half the kernel size compared to gcc.
Click to expand...
Click to collapse
Thank you, I'll try it.
Can I ask you a question?
Is it normal for recovery.img size to increase when I add printk?
Idk, but if recovery is build on edge full 32gb, of course any addition will exceed size I guess.