- Previously, when running, mkboot recovery.img recovery, the second argument can't be stat when attempting to determine it's original size.
- I included a file check for the path to properly handle this situation which also allows the ability to unpack an image from a separate directory rather than having the image inside the project directory.
- Following commands have been tested to work for the second command argument:
mkboot /sdcard/recovery.img recoveryfolder
mkboot recovery.img recoveryfolder
mkboot ./recovery.img recoveryfolder
mkboot ~/sdcard/recovery.img recoveryfolder
- This project will work on linux. Confirmed working on Ubuntu 15.04.
I have added a wrapper script which manipulates the limited usage of a shebang that allows the real mkboot script to be executed by the bash binary from within the project directory.
This eliminates the previous requirement of having to place bash at /system/xbin.
- file reports lzma, xz, and lz4 in all uppercase so fixed cases in script to detect and verify properly.
- lz4 ramdisks were not being handled properly when unpacking so this too is also fixed.
- Fixed up new ramdisk extensions to be lowercase instead of uppercase when repacking for xz, lzma, and lz4 compressions. (cosmetic)
file is statically compiled and bumped to version 5.24
Updated mkboot script to use file and magic.mgc for handling lzop compression types and removed previous workaround.
TODO - still need to compile lzop statically and include binary with project
Busybox lzop is still being used so if your busybox does not support lzop then it will not work
file and magic error out when handling lzop compression types
Workaround is to find lzop header first if it exists by searching for its hex value
TODO - fix file and magic to read lzop compression types properly and eliminate this workaround
Currently this method uses busybox for handling lzop compressions. Insure busybox supports lzop or else this will fail
TODO - compile lzop statically and eliminate the need for busybox having lzop support
- Check if magic address is not at 0x0.
- If magic is found elsewhere in image then output it's location in hex and dec, otherwise ignore.
- User needs to know it's location as some OEM images require that location in order to boot.
- The magic output is only cosmetic and the user is responsible for the location after image is built.
- Statically compiled mkbootfs and mkbootimg
- Project will work on Lollipop
- Update mkboot script accordingly
- Fix escaping double quotes and keeping double quotes intact for command line
- Add support for dumping and repacking second image if it exists.
- Few other changes
Previously img_info was created using double quotes and that
allows a lot of shell interpretation that can cause problems.
Switch to using ' to avoid most of the shell interpretation
(all that is left is '). Make sure that works well by escaping
single quotes properly.
For example, the command line:
boo='ya' androidboot.selinux=permissive hi='there'
would be escaped in img_info as
cmd_line='boo='"'"'ya'"'"' androidboot.selinux=permissive hi='"'"'there'"'"''
Added some additional support for detecting the ramdisk compression as well as some other things such as a hazard warning if the ramdisk compression is currently not supported eith using the ARM tool.
-- Added support for xz (statically compiled)
-- Added support for properly determing file type with file (statically compiled)
-- Added support with magic
-- Some minor cosmetic changes to the script
-- Completely rewrote the handling support of ramdisks
-- Added Hazard warning for compression formats currently not supported using this tool (Please contact me if you are one of them)
-- And more I am sure lol
-- Compress new ramdisk based on the old ramdisk compression. If gzip then compress as gzip, if lzma then compress as lzma and if lz4 then compress as lz4.
-- Some minor cleanup and cosmetic changes.