Alldocube iplay 20 (Unisoc) - Creating Magisk patched boot.img and then vmbeta.img
Alldocube iplay 20 (Unisoc) - Creating Magisk patched boot.img and then vmbeta.img
python avbtool add_hash_footer --image magisk_patched.img --partition_name boot --partition_size 33554432 --key rsa4096_vbmeta.pem --algorithm SHA256_RSA4096
Footer version: 1.0
Image size: 36700160 bytes
Original image size: 17532928 bytes
VBMeta offset: 17534976
VBMeta size: 2176 bytes
--
Minimum libavb version: 1.0
Header Block: 256 bytes
Authentication Block: 576 bytes
Auxiliary Block: 1344 bytes
Algorithm: SHA256_RSA4096
Rollback Index: 0
Flags: 0
Release String: 'avbtool 1.1.0'
Descriptors:
Hash descriptor:
Image Size: 17532928 bytes
Hash Algorithm: sha256
Partition Name: boot
Salt: 8feba2520e631978e35fcb28882d2021efd5e9015a477221a610c7d17209bb24
Digest: af48266b29dfa98b13aa1a78907e43b382f51e04d5fc2638300d46cc585ab13d
Flags: 0
Prop: com.android.build.boot.os_version -> '10'
Minimum libavb version: 1.0
Header Block: 256 bytes
Authentication Block: 576 bytes
Auxiliary Block: 13568 bytes
Algorithm: SHA256_RSA4096
Rollback Index: 0
Flags: 0
Release String: 'avbtool 1.1.0'
Descriptors:
Chain Partition descriptor:
Partition Name: boot
Rollback Index Location: 1
Public key (sha1): ea410c1b46cdb2e40e526880ff383f083bd615d5
ea410c1b46cdb2e40e526880ff383f083bd615d5
Chain Partition descriptor:
Partition Name: dtbo
Rollback Index Location: 10
Public key (sha1): ea410c1b46cdb2e40e526880ff383f083bd615d5
Chain Partition descriptor:
Partition Name: recovery
Rollback Index Location: 2
Public key (sha1): d9093b9a181bdb5731b44d60a9f850dc724e2874
Chain Partition descriptor:
Partition Name: socko
Rollback Index Location: 11
Public key (sha1): bc688cacacd959cfaafbf0549d080d6fc2d50a08
Chain Partition descriptor:
Partition Name: odmko
Rollback Index Location: 12
Public key (sha1): 425215859f49f31809f16491c2a67e04df79baaf
Chain Partition descriptor:
Partition Name: vbmeta_system
Rollback Index Location: 3
Public key (sha1): e2c66ff8a1d787d7bf898711187bff150f691d27
Chain Partition descriptor:
Partition Name: vbmeta_vendor
Rollback Index Location: 4
Public key (sha1): 9885bf5bf909e5208dfd42abaf51ad9b104ee117
Chain Partition descriptor:
Partition Name: l_modem
Rollback Index Location: 6
Public key (sha1): e93e7d91ba1a46b81a5f15129b4dc5769bf41f26
Chain Partition descriptor:
Partition Name: l_ldsp
Rollback Index Location: 7
Public key (sha1): e93e7d91ba1a46b81a5f15129b4dc5769bf41f26
Chain Partition descriptor:
Partition Name: l_gdsp
Rollback Index Location: 8
Public key (sha1): e93e7d91ba1a46b81a5f15129b4dc5769bf41f26
Chain Partition descriptor:
Partition Name: pm_sys
Rollback Index Location: 9
Public key (sha1): e93e7d91ba1a46b81a5f15129b4dc5769bf41f26
python avbtool make_vbmeta_image --key rsa4096_vbmeta.pem --algorithm SHA256_RSA4096 --flag 2 --chain_partition boot:1:keys/key_boot.bin --chain_partition system:3:keys/key_system.bin --chain_partition vendor:4:keys/key_vendor.bin --chain_partition product:10:keys/key_product.bin --chain_partition dtbo:9:keys/key_dtbo.bin --chain_partition recovery:2:keys/hovatek.bin --chain_partition l_modem:5:keys/key_l_modem.bin --chain_partition l_ldsp:6:keys/key_l_ldsp.bin --chain_partition l_gdsp:7:keys/key_l_gdsp.bin --chain_partition pm_sys:8:keys/key_pm_sys.bin --chain_partition dtb:11:keys/key_dtb.bin --padding_size 16384 --output vbmeta-sign-custom.img
python avbtool make_vbmeta_image --key rsa4096_vbmeta.pem --algorithm SHA256_RSA4096 --flag 2 --chain_partition boot:1:keys/rsa4096_vbmeta.bin --chain_partition dtbo:10:keys/key_dtbo.bin --chain_partition recovery:2:keys/key_recovery.bin --chain_partition socko:11:keys/key_socko.bin --chain_partition odmko:12:keys/key_odmko.bin --chain_partition vbmeta_system:3:keys/key_vbmetasystem.bin --chain_partition vbmeta_vendor:4:keys/key_vbmetavendor.bin --chain_partition l_modem:6:keys/key_l_modem.bin --chain_partition l_ldsp:7:keys/key_l_ldsp.bin --chain_partition l_gdsp:8:keys/key_l_gdsp.bin --chain_partition pm_sys:9:keys/key_pm_sys.bin --include_descriptors_from_image phone/dtbo.img --padding_size 16384 --output vbmeta-sign-custom.img
(26-09-2020, 08:48 AM)JamesAt15 ...Should I use image size "36700160" for the partition_size value?
(26-09-2020, 08:48 AM)JamesAt15 ...What is the --flag setting for and what will I need to set it to?
(26-09-2020, 08:48 AM)JamesAt15 ...I assume the numbers after the partition name (like "boot:1") will need to match the "Rollback Index Location" numbers?
(26-09-2020, 08:48 AM)JamesAt15 ...The other thread for the iplay 20 said that I'll need to include the flag "--include_descriptors_from_image phone/dtbo.img" so I will plan to do that as well (substituting the folder where I have the dtbo.img file saved). I still need to check the padding size, but otherwise does the below seem to be correct?
(26-09-2020, 08:48 AM)JamesAt15 ...There's no dtb.img in my dump from the PAC file, and no dtb partition in my info_image output - is this correct?
(26-09-2020, 08:48 AM)JamesAt15 I have a new Alldocube iplay 20 tablet
(29-09-2020, 01:52 AM)JamesAt15 X3non and Hovatek, thanks so much for your suggestions. I'll go through them to make sure I understand the process and will give it a try soon.
Hovatek, the link you posted seems to be suggesting that I try Magisk patching the recovery.img first and check if booting to recovery will boot up with root. I'll give that a try, since it seems like it will let me leave the current system in place and be easier to recover from if something goes wrong. It will also be practice for signing the new recovery image and compiling the vbmeta.img values. Do I need to use Magisk Manager Canary version to do this, or will the standard version work? I'm not sure if I'm looking at github right, but I see an app-debug.apk and stub-release.apk for the canary version but not an app-release.apk.