[LINUX][TOOL] Android 9.0 partition repack tool!

Post your great articles here :)
justin10
Verified Member
Posts: 19
Joined: Sat Nov 07, 2020 4:56 pm
Has thanked: 5 times

#21

bumerc wrote: Fri Nov 20, 2020 9:54 pm
justin10 wrote: Fri Nov 20, 2020 5:39 pm Did I missed any steps?
Yes, you missed the main step

Code: Select all

make mod-partition-all
then

Code: Select all

make mod-IMG
Hi, thanks for reply.

I did try with that flow
make mod-partition-all

Code: Select all

output:
mkdir -p "bc-tool/stamp"
cd bc-tool/odm && ./build
check source folder...
ok
sepolicy sha256sum: don't match, please apply mod-sepolicy!
make: *** [build/mod.mak:62:bc-tool/stamp/.stamp.mod-partition-all] 错误 1
*错误 means error

Then i used
make mod-sepolicy
output:

Code: Select all

mkdir -p "bc-tool/stamp"
cd bc-tool/ && ./compile_sepolicy
1c1
< 4fe3b0b94c355ced4181fffad8a2a16e7991ddcee95904a0581ed9ad2690211b
---
> 6f435c8b8979b10f428e2d9446eb2b3d1fbc87a2331356d640869494fbc2c66b
 
compile sepolicy...
 
new sha256sum:
4fe3b0b94c355ced4181fffad8a2a16e7991ddcee95904a0581ed9ad2690211b
done!
touch "bc-tool/stamp/.stamp.mod-sepolicy"
Lastly
make mod-IMG
But still not updated after unpack the img from out folder.
I think the issue happen when i use make mod-partition-all failed, and didn't apply the new changes. What could be the issues? since I am not editing any .rc or .so or files. I am just replacing wallpaper and add new IR files/preinstall apks.. ':)

Appreciate the help
bumerc
Administrator & Developer
Posts: 1649
Joined: Tue Oct 02, 2018 6:19 pm
Has thanked: 254 times
Been thanked: 342 times

#22

justin10 wrote: Sat Nov 21, 2020 7:22 am I think the issue happen when i use make mod-partition-all failed, and didn't apply the new changes. What could be the issues?
You are apparently trying to add the files and do not pay attention to the actual partition size, because as soon as you exceed the size by adding the files, the changes cannot of course take place :)
justin10
Verified Member
Posts: 19
Joined: Sat Nov 07, 2020 4:56 pm
Has thanked: 5 times

#23

bumerc wrote: Sat Nov 21, 2020 10:21 am
justin10 wrote: Sat Nov 21, 2020 7:22 am I think the issue happen when i use make mod-partition-all failed, and didn't apply the new changes. What could be the issues?
You are apparently trying to add the files and do not pay attention to the actual partition size, because as soon as you exceed the size by adding the files, the changes cannot of course take place :)
Thx for the help. Tried just remove a preinstall apk or replace a wallpaper, both will get me the same result. I figured this is not just a replace files or add files sort of easy work...
Thanks again for the time, I should probally go read off AOSP from the beginning
justin10
Verified Member
Posts: 19
Joined: Sat Nov 07, 2020 4:56 pm
Has thanked: 5 times

#24

[mention]bumerc[/mention]
Sorry to summon you again. Just found a werid thing about repacking.
I've unpack without any problem, then remove Netflix.apk from vendor/preinstall, and then use 'make mod-system' or 'make mod-partition-all'
both will get me error.
So this time, i've just unpack, and 'make mod-system' or 'make mod-partition-all' will still get me error...

please see error log here: https://pastebin.com/0hXT0Ef9

How come with removing APK (less img size), or not changing anything will still get me this error?
bumerc
Administrator & Developer
Posts: 1649
Joined: Tue Oct 02, 2018 6:19 pm
Has thanked: 254 times
Been thanked: 342 times

#25

[mention]justin10[/mention]
./build:行73: fdtget:未找到命令
size: 0
You read readme.md badly.. install DTC

Code: Select all

sudo apt update && sudo apt install device-tree-compiler
bumerc
Administrator & Developer
Posts: 1649
Joined: Tue Oct 02, 2018 6:19 pm
Has thanked: 254 times
Been thanked: 342 times

#26

ThomasNen wrote: Wed Dec 09, 2020 4:03 am All partitioning tutorials are similar because there only really is one way to partition using the GUI. Had a quick look and it doesnt look like a copypasta.
Please give precise reasons for your answer.
Oh yes, and what does this have to do with bc-tool? We're only talking about repacking the IMG file here. In this case nothing is partitioned. With AML Devices this is done internally via the bootloader and dtb file with the corresponding pre-control of this process, e.g. via UBT or uart.
Copypasta?
blackra1n
Posts: 1
Joined: Thu Dec 24, 2020 8:32 am

#27

Hello
i have amlogic s905y2 firmware, after convert the system.img by simg2img tool i can get the ext4 but its not ext4 image.

The header of original system part is ( 3AFF26ED01 ).


How can i get the files inside system.img ?
bumerc
Administrator & Developer
Posts: 1649
Joined: Tue Oct 02, 2018 6:19 pm
Has thanked: 254 times
Been thanked: 342 times

#28

justin10 wrote: Sat Nov 21, 2020 7:22 am How can i get the files inside system.img ?
Make an effort and read readme.md
cchumi
Posts: 6
Joined: Wed Jan 06, 2021 6:06 am

#29

Hi just try to unpack and got an error which I don't understand can someone help me ?

Code: Select all

cchumi@ubuntu20lts:~/afck$ make mod-unpack
make: *** No rule to make target 'ingredients/aml_upgrade_package.img', needed by 'out/amlogic/device/1-2g/img-unpack/.stamp.unpack'.  Stop.
bumerc
Administrator & Developer
Posts: 1649
Joined: Tue Oct 02, 2018 6:19 pm
Has thanked: 254 times
Been thanked: 342 times

#30

cchumi wrote: Fri Jan 15, 2021 11:33 am Hi just try to unpack and got an error which I don't understand can someone help me ?

Code: Select all

cchumi@ubuntu20lts:~/afck$ make mod-unpack
make: *** No rule to make target 'ingredients/aml_upgrade_package.img', needed by 'out/amlogic/device/1-2g/img-unpack/.stamp.unpack'.  Stop.
Before you run make mod-unpack, you have to copy aml_upgrade_package.img to afck/ingredients
Post Reply