Projects
View on GitHub
natinusala/linux-amlogic-toolkit
natinusala/linux-amlogic-toolkit has 203 GitHub stars and 65 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-17 19:47 UTC. Last push 2022-01-01.
What you can do
- Unpack and repack any image
- Mount and edit system partition
- Unpack and repack logo partition (for bootup and upgrading logos)
- Unpack and repack boot image and initrd ramdisk
Measured star growth
- in 24h
- 0
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
About
Allows to unpack and repack AMLogic images for Android 7 without the Customization Tool
Developer ToolsREADME.md
OriginalLinux AMLogic Toolkit
Allows to unpack and repack AMLogic Android images on Linux systems without using the Customization Tool - works for Android 7.
Features
- Unpack and repack any image
- Mount and edit
systempartition - Unpack and repack
logopartition (for bootup and upgrading logos) - Unpack and repack
bootimage andinitrdramdisk - Flash the image directly to a device without repacking it (faster than using the USB Burning Tool)
- Works for Android 7
- No need to unpack the image each time you want to use the tool
What it cannot do (yet)
- Edit other partitions of the image such as
recovery(you can still replace thePARTITIONfiles by hand)
Dependencies
zlib1g-devforsimg2imgandimg2simglibblkid-devforabootimg(unpacking and repacking boot image)- the
i386packages if needed (for the logo unpacking / repacking binary)
How to use it
- Clone or download this repository
- Install the dependencies
- Move to the directory of the repository, and stay there
- (first time, or after a cleanup) Run
./bin/buildto build the required tools - (when editing a new image file) Run
./bin/unpack input.imgto unpackinput.img - The result is :
output/image: raw image files (PARTITIONfiles)output/system: system partition filesoutput/logo: logo partition filesoutput/boot: boot partition files
- From now on you can edit the files of the
outputdirectory- Note that those files will be overwritten when repacking :
output/image/system.PARTITIONoutput/image/boot.PARTITIONoutput/image/logo.PARTITIONoutput/boot/initrd.imgif using./bin/extract_initrd
- If you happen to loose the
output/systemmounting point (after a reboot for instance), just run./bin/remountto mount it again - On the other hand, you can unmount the system partition using
./bin/unmount - If you want to extract the
initrdramdisk, use the./bin/extract_initrdand./bin/recreate_initrdscripts (output inoutput/initrd)
- Note that those files will be overwritten when repacking :
- Be careful :
- Don't break everything by chmod'ing the whole
output/systemfolder, because it will be replicated in the image and it won't boot ! - Don't rename the files in
output/boot.img - If you extract and recreate the
initrdramdisk, its size will change and it will most likely break the boot image. To fix this, edit thebootimg.cfgfile inoutput/bootto replicate the change in size (you can repack the image, let it fail and read the logs to see the new size).
- Don't break everything by chmod'ing the whole
- When you have finished editing the files, run
./bin/repack output.imgto repack the image tooutput.img - Additionnaly, you can use
./bin/flashto flash the image to a device through USB (you will need the udev rule, see https://github.com/Stane1983/aml-linux-usb-burn)- The device type (
gxl) is hardcoded into the flashing script, edit it if you're not using S905, S905X or S919
- The device type (
- Done !
Troubleshooting
- If you have a
file not founderror when trying to unpack and repack the logo partition, install thei386libraries by following the accepted answer of this post : https://unix.stackexchange.com/questions/13391/getting-not-found-message-when-running-a-32-bit-binary-on-a-64-bit-system
Credits
- Thanks to Magendanz and adg for the unpacking and repacking method
- https://github.com/khadas/utils for the
aml_image_v2_packerandlogo_img_packerbinaries - https://github.com/anestisb/android-simg2img for the
simg2imgtool - https://github.com/ggrandou/abootimg for the
abootimgtool - https://github.com/Stane1983/aml-linux-usb-burn for the flashing tool