grml-android is a lightweight version of grml-live built with apktool, android-sdk, img2simg, sdat2img, img2sdat, and instructions.
The included tools allow on-the-fly development to extract the contents of system.dat from Android OS, edit the contents, then repackage them for installation. This guide will show you how to place tools in /root/ of the final operating system.
Download and run the standard version of GRML and run grml-network for internet access. Then install the live system tools with the command, apt-get install grml-live
Edit /etc/grml/fai/config/package_config/GRML_SMALL and add,
android-sdk apktool img2simg acpi bc
Create directory /etc/grml/fai/chroot_install/root/ and move custom files (download copies of sdat2img and img2sdat) to that folder.
Copy /etc/grml/grml-live.conf to /etc/grml/grml-live.local and then edit grml-live.local to include the following:
Next mount the image file you created to /mnt by issuing the following command:
mount [OUTPUT FILE].img /mnt && cd /mnt
To examine an apk, use apktool d [appname].apk and to repack an apk, use apktool b [appname] -o [new_appname].apk. To run a rebuilt application, you must re-sign the application. See Android Documentation (1, 2) for details.
Use the umount /mnt command to unmount your image, then issue the following commands to convert your image back into a dat file. Use the zip command to compress your files.