Announcement
Collapse
No announcement yet.
Announcement
Collapse
No announcement yet.
Android 9 partition repack tool!
Collapse
X
-
Hi bumerc ! I'm trying to resize partitions of the SlimBox Pie AOSP rom for my Tanix TX3 S905X3 4GB/32GB QZ box, using your wonderful tool. I think there is a problem decompiling / extracting the DTB file. Here is the screen output when I attempt to "make mod-resize":
Code:/afck$ make mod-resize mkdir -p "bc-tool/stamp" cd bc-tool/ && ./part_resize detected gzip compressed file... awk: line 2: function strtonum never defined awk: line 2: function strtonum never defined awk: line 2: function strtonum never defined awk: line 2: function strtonum never defined dtb offsets: extract multi-dtb... ****************************************** * Welcome to the selection menu! * * Change your Android 9 partition size * ****************************************** (1) change ODM size (2) change PRODUCT size (3) change VENDOR size (4) change SYSTEM size chose partition number: 4 Couldn't open blob from '2048.img': No such file or directory Current odm partition size: 0 Couldn't open blob from '2048.img': No such file or directory Current product partition size: 0 Couldn't open blob from '2048.img': No such file or directory Current vendor partition size: 0 Couldn't open blob from '2048.img': No such file or directory Current system partition size: 0 enter system size in hex: 0 system size changed to 0 byte cleanup... DTB combiner: Input directory: './' Output file: 'DTB' => Found 0 unique DTB(s) replace old dtb... rm out/amlogic/device/1-2g/img-unpack/_aml_dtb.PARTITION cp bc-tool/DTB out/amlogic/device/1-2g/img-unpack/_aml_dtb.PARTITION && sync cp: cannot stat 'bc-tool/DTB': No such file or directory make: *** [build/mod.mak:62: bc-tool/stamp/.stamp.mod-resize] Error 1
Please help!
DTB_TX3.zip
Comment
-
thanghn90
Is secure boot activated? Please show the contents of the image.cfg file
EDIT:
Code:bumerc@bumerc-linux-server:/SSD2/afck-test$ make mod-resize mkdir -p "bc-tool/stamp" cd bc-tool/ && ./part_resize dtb offsets: 2048 79872 157696 245760 extract multi-dtb... 1+0 Datensätze ein 1+0 Datensätze aus 79872 Bytes (80 kB, 78 KiB) kopiert, 0,000554872 s, 144 MB/s 1+0 Datensätze ein 1+0 Datensätze aus 79872 Bytes (80 kB, 78 KiB) kopiert, 0,000357297 s, 224 MB/s 38+0 Datensätze ein 38+0 Datensätze aus 77824 Bytes (78 kB, 76 KiB) kopiert, 0,000728422 s, 107 MB/s 1+0 Datensätze ein 1+0 Datensätze aus 157696 Bytes (158 kB, 154 KiB) kopiert, 0,00100065 s, 158 MB/s 1+0 Datensätze ein 1+0 Datensätze aus 157696 Bytes (158 kB, 154 KiB) kopiert, 0,000511083 s, 309 MB/s 76+0 Datensätze ein 76+0 Datensätze aus 155648 Bytes (156 kB, 152 KiB) kopiert, 0,00116596 s, 133 MB/s 1+0 Datensätze ein 1+0 Datensätze aus 245760 Bytes (246 kB, 240 KiB) kopiert, 0,00135236 s, 182 MB/s 0+1 Datensätze ein 0+1 Datensätze aus 88064 Bytes (88 kB, 86 KiB) kopiert, 0,000530289 s, 166 MB/s 119+0 Datensätze ein 119+0 Datensätze aus 243712 Bytes (244 kB, 238 KiB) kopiert, 0,00177692 s, 137 MB/s ****************************************** * Welcome to the selection menu! * * Change your Android 9 partition size * ****************************************** (1) change ODM size (2) change PRODUCT size (3) change VENDOR size (4) change SYSTEM size chose partition number: 4 Current odm partition size: 0x8000000 Current product partition size: 0x8000000 Current vendor partition size: 0x14000000 Current system partition size: 0x50000000 enter system size in hex: 6c000000 system size changed to 1811939328 byte cleanup... DTB combiner: Input directory: './' Output file: 'DTB' Found file: 245760.dtb ... chipset: sm1, platform: ac213, rev: 4g Found file: 157696.dtb ... chipset: sm1, platform: ac213, rev: 2g Found file: 2048.dtb ... chipset: g12a, platform: u212, rev: 2g Found file: 79872.dtb ... chipset: g12a, platform: u212, rev: 4g => Found 4 unique DTB(s) Generating master DTB... completed replace old dtb... rm out/amlogic/device/1-2g/img-unpack/_aml_dtb.PARTITION cp bc-tool/DTB out/amlogic/device/1-2g/img-unpack/_aml_dtb.PARTITION && sync touch "bc-tool/stamp/.stamp.mod-resize"
What is the output on file command, with compressed DTB?
Code:file bc-tool/DTB
Code:which awk
Code:awk --version
Last edited by bumerc; 08 April 2021, 11:09.
Comment
-
bumerc for some reason, I could not see your reply to my post in freaktab. I'm contacting the site admin to see what the issue is.
Anyway, here is the image.cfg file you asked for. There are several image.cfg in ~/afck, but I think you mean the one in ~/afck/out/amlogic/device/1-2g/img-unpack/
image_cfg.zip
How do I know if secure boot is activated?Attached FilesLast edited by thanghn90; 08 April 2021, 15:32.
Comment
-
Originally posted by thanghn90 View Post...
How do I know if secure boot is activated?
You can also see it in the image.cfg file. In your case it is an ordinary IMG unencrypted. Your main problem is AWK, which does not appear to be working properly or not installed on your PC. Please answer my questions about this above
Comment
-
bumerc : found the culprit: it was because I'm using Ubuntu 20.04.1 LTS, and the default awk is pointing to mawk, not gawk (GNU awk). A quick googling on the "line 2" error of awk reveals that I need to install gawk. So I typed:
sudo apt install gawk
And since then, I was able to extract the DTB and resize the partition.
By the way, I was also having some trouble installing
android-tools-fsutils
Instead, apt suggests me to install the followings two packages, and I followed it:
android-sdk-libsparse-utils android-sdk-ext4-utils
So far, no problem (aside from the awk, which is not related to the above package).
Please update the first post for people with the latest Ubuntu focal release. Thanks!
Comment
What's Going On
Collapse
There are currently 5157 users online. 2 members and 5155 guests.
Most users ever online was 37,478 at 04:14 on 26 June 2024.
Comment