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

Post your great articles here :)
Post Reply
bumerc
Administrator & Developer
Posts: 1551
Joined: Tue Oct 02, 2018 6:19 pm
Answers: 0
Has thanked: 211 times
Been thanked: 334 times

#1

bc-tool
A small tool for repacking the main partitions system, vendor, odm and product.

- In this project make_ext4fs has been replaced by e2fsdroid and mke2fs
Advantages over make_ext4fs - reduced sparse-image size

- This tool is only intended for Linux users
- Windows support is not provided

Full integration of the bc-tool (Android 9) in afck

preparation
  • Install git

Code: Select all

sudo apt update
sudo apt install git
  • clone afck-Project

Code: Select all

git clone https://github.com/anpaza/afck.git
  • Install dependencies

Code: Select all

sudo apt install android-tools-fsutils
sudo apt install device-tree-compiler
update *-02b
- Android 10-Q support (experimental)
- added cleanup menu
- added mod-inspect
- added encrypted IMG support
- fixed negative partition size
- other bug fixes
- automatic detection of incompatibility sepolicy
(This function is indispensable when working with faulty custom ROMs, or combine/port two different ROMs)

how to install
  • Download bc-tool-update-pie-q-02b
bc-tool-update-pie-q-02b.tar.xz
  • Extract bc-tool to afck

Code: Select all

tar xvJf bc-tool-update-pie-q-02b.tar.xz -C ~/afck
  • Download ingredients

Code: Select all

cd ~/afck/ingredients
./01-get-it-all
cd ..
How to use
(Read bc-tool/readme.md file for more information)
- List of available mod's

Code: Select all

make mod-help
Image
User avatar
ricklar
Moderator
Posts: 889
Joined: Fri Nov 30, 2018 10:30 pm
Answers: 0
Has thanked: 139 times
Been thanked: 249 times

#2

bumerc wrote: Tue Mar 17, 2020 8:38 am Full integration of the bc-tool (Android 9) in afck
Update works great! It's fabulous that it is integrated now. Thank you so much!

And actually reading the ReadMe files does actually help for understanding the usage of the Tool. So, for others that want to use the Tool read the README files!
BE KIND, BE NICE, BE RESPECTFUL TO OTHERS, RESPECT THE MODERATORS,
*IMPORTANT NOTE* ONLY PM MODERATORS OR DEVELOPERS AS A LAST RESORT!!!

☢️ My test device: H96 Pro+ 3gb/32gb DDR4 ☢️ Plus own Tanix, Beelink, Alfawise, X96S, Odroid-N2, Khadas VIM3L, X3, ADT-3, X96-Air
GEARBEST.com
PLEASE ENJOY ATVX!
mohy
Posts: 1
Joined: Mon Nov 11, 2019 8:26 am
Answers: 0
Has thanked: 3 times

#3

the download link of bc-tool is not correct, it says File is in owner's trash...
User avatar
em3ka
Moderator
Posts: 1835
Joined: Sun Jul 15, 2018 11:43 am
Answers: 0
Has thanked: 108 times
Been thanked: 370 times

#4

mohy wrote: Mon May 18, 2020 6:49 am the download link of bc-tool...
https://forum.freaktab.com/forum/tv-pla ... epack-tool
bumerc
Administrator & Developer
Posts: 1551
Joined: Tue Oct 02, 2018 6:19 pm
Answers: 0
Has thanked: 211 times
Been thanked: 334 times

#5

mohy wrote: Mon May 18, 2020 6:49 am the download link of bc-tool is not correct, it says File is in owner's trash...
is updated, thanks for the hint
ath156
Posts: 5
Joined: Thu Nov 21, 2019 11:27 pm
Answers: 0

#6

I try to only alter the language/region parameters for this custom rom https:...............
It unpacks OK. When trying to run "mod-partition-all" it stops with an error about sepolicy. Running "make mod-sepolicy" fixes the error.
But when finally trying to burn it by USB burning tool, although it seems to load successfully until some point, it always gives me a boot loop (returning constantly to TWRP).
The original custom rom burns always successfully.
Is there something I can do about it?
Last edited by ath156 on Tue Jun 02, 2020 10:59 am, edited 1 time in total.
bumerc
Administrator & Developer
Posts: 1551
Joined: Tue Oct 02, 2018 6:19 pm
Answers: 0
Has thanked: 211 times
Been thanked: 334 times

#7

[mention]ath156[/mention]
this has nothing to do with the bc tool anymore, partitions that you want to combine are not compatible with each other.
ath156
Posts: 5
Joined: Thu Nov 21, 2019 11:27 pm
Answers: 0

#8

bumerc wrote: Thu May 28, 2020 8:46 am [mention]ath156[/mention]
this has nothing to do with the bc tool anymore, partitions that you want to combine are not compatible with each other.
Thank you for your reply.
I am sorry but I was not able to fully understand what you are saying. Are you saying that the original custom rom is made in a "special" way (not according to specifications) therefore bc tool isn't able to combine them in the same way? If in some way I was able to not make the sepolicy check, would it be possible to get a functionig rom as the original?
Sorry but I am just trying to understand what "make mod-sepolicy" actually does and under what circumstances this function leads to properly made images (as by finishing this action successfully I got the impression that the rom wil be OK to burn).
Thank you in advance.
bumerc
Administrator & Developer
Posts: 1551
Joined: Tue Oct 02, 2018 6:19 pm
Answers: 0
Has thanked: 211 times
Been thanked: 334 times

#9

I have described mod-sepolicy in the readme.md file, this function compiles and replaces precompiled_sepolicy binary if one of the two sha256sum files, which are located in the odm and system partitions, does not match. However, this does not mean that the partitions are coordinated with each other, as a ROM developer you have to do this yourself if necessary.
ath156
Posts: 5
Joined: Thu Nov 21, 2019 11:27 pm
Answers: 0

#10

bumerc wrote: Thu May 28, 2020 6:06 pm I have described mod-sepolicy in the readme.md file, this function compiles and replaces precompiled_sepolicy binary if one of the two sha256sum files, which are located in the odm and system partitions, does not match. However, this does not mean that the partitions are coordinated with each other, as a ROM developer you have to do this yourself if necessary.
Thank you very much for clarifying it.
Post Reply