29 Commits

Author SHA1 Message Date
8416d85fab Add some support to image size
- 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
2015-09-07 10:44:35 -04:00
ModdingMyMind
d3a0d9d963 Manipulate shebang
- 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.
2015-09-07 00:52:15 -04:00
f476363b50 Bug fixes
- 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)
2015-09-06 16:05:32 -04:00
ModdingMyMind
6938ccb9fc Update README.md 2015-09-06 08:51:09 -04:00
ModdingMyMind
b9865bbee7 Include lzop version 1.03 binary
lzop binary is statically compiled

Busybox is not required to have lzop support anymore

Updated mkboot script to target the lzop binary
2015-09-05 16:38:23 -04:00
ModdingMyMind
41c21139ec Update file and magic.mgc
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
2015-09-05 12:37:23 -04:00
ModdingMyMind
efca29a8ca Add lzop compression support
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
2015-09-04 12:54:13 -04:00
18b04390de Fix complaint at line 77 and 78 2015-08-09 14:12:23 -04:00
ea12d89895 Bug fix
- Prevent Boot Magic output if address isn't greater than 0
- Prevent dtb offset output if dtb_addr does not exist.
2015-08-09 10:52:17 -04:00
6c538e723d Output Boot Magic Address
- 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.
2015-08-09 08:50:39 -04:00
604abc11be Fix dtb offset newline in output 2015-08-09 00:29:48 -04:00
0bc7b4f4a7 Include dtb offset support
- Cosmetic
2015-08-09 00:12:48 -04:00
7cbcb682bd Check for base warning 2015-08-04 08:49:56 -04:00
eb03cb20e5 Remove unused code 2015-08-04 08:47:11 -04:00
0118ac6e7d Bug Fix 2015-08-04 08:45:09 -04:00
Modding.MyMind
ad8b2e99dc Include Base Address Warning for non standard offsets 2015-07-24 21:27:48 -04:00
bb4feeeef7 Comment out set command. 2015-07-24 15:06:41 -04:00
9bb055bb90 Fix Board Arg:
- If board variable is empty then ignore board arg for mkbootimg
2015-07-24 15:05:29 -04:00
7b6552030e Cosmetic detailing:
- Compare original image size with new size and let user know if it's larger.
- Bug fix for usage displayed in terminal
- Other changes
2015-07-24 11:28:26 -04:00
adf30069d8 Needed update:
- 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
2015-07-24 09:37:33 -04:00
a39b2e5551 Warn user to use at own risk if busybox is not installed on the device. 2014-10-04 21:16:53 -04:00
98214800f1 Add busybox support. This is to assume that busybox is not symlinked on the device to insure the script doesn't fail. 2014-10-04 12:13:54 -04:00
73f65ac74c Fix typo in mkboot script - minor problem. 2014-10-04 10:20:54 -04:00
35ccef5bc8 Some candy:
-- 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
2014-10-03 22:25:56 -04:00
dafc83f0af Updated mkboot script:
-- 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.
2014-10-03 14:39:15 -04:00
306bfbc1a9 Fix README.md 2014-10-02 01:15:23 -04:00
92ec3a470b Awesome Update:
- Added support for non standard mkbootimg images.
- Inform user if their image is non standard and display true offsets.
- Add support for repacking non standard images.
- Updated README.md.
2014-10-02 01:08:47 -04:00
6b7a6ff097 Swap mkbootimg binary to fix repacking with dtb. 2014-09-28 11:23:56 -04:00
45701a9f11 Modifications for ARM:
-- Modifed README.md.
-- Modified mkboot script.
-- Compiled gzip, cpio, lz4, lzma, grep, od, mkbootimg, mkbootfs, and bash for ARM devices.
-- All Binaries should be in compliance with pre-jb up to Android L.

-- CPIO version 2.10.
-- GZIP version 1.6
-- LZ4 version r120
-- LZMA version 4.32.7
-- GREP version 2.19
-- OD version coreutils-8.23
-- BASH version 4.3.11

-- NOTE - Busybox is stripped and incomplete for use with mkboot. Busybox is still required to be installed on your device. This is where the above listed Binaries come in to play.
2014-09-27 21:31:19 -04:00