• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

[DEV][TOOL] mktool unpack/repack boot & recovery images

Unpack and Repack the Android Boot & Recovery Images

This is a tool I made for unpacking, repacking, and loki patching the android boot and recovery images.

mktool is very simple to use with an interactive menu.

mktool.png


To use mktool you simply run the following command in a terminal from the mktool root directory:
Code:
java -jar mktool.jar

You can download mktool from the projects page:
https://techstop.github.io/mktool/

Note:
mktool has been tested on ubuntu & xubuntu
Must have java 8 or higher installed
 
Last edited:
Unpack and Repack the Android Boot & Recovery Images

This is a tool I made for unpacking, repacking, and loki patching the android boot and recovery images. Perfect for making a kernel developer's life a little easier or the beginner that just wants to unsecure their own boot image and/or add init.d support.

mktool is very simple to use with an interactive menu.

menu.png


These are the options mktool handles automatically:
Code:
--kernel <filename>
--ramdisk <filename>
--second <2ndbootloader-filename>
--cmdline <kernel-commandline>
--board <boardname>
--base <address>
--pagesize <pagesize>
--dt <filename>
--ramdisk_offset <address>
--tags_offset <address>
--output <filename>

To use mktool you simply run the following command in a terminal from the mktool root directory:
Bash:
./mktool

You can download mktool from the projects page on my github:
https://github.com/GameTheory-/mktool

Note:
mktool has been tested on linux (ubuntu). May possibly run on windows with cygwin (not sure).
Im new in this area of android.
Is there specific boot.img structure this works with or is it a "universal fit"? Sorry if that is a dumb question, I'm just trying to understand it better.
I didn't research it yet (the .lok image??), but I will.
 
Upvote 0
Im new in this area of android.
Is there specific boot.img structure this works with or is it a "universal fit"? Sorry if that is a dumb question, I'm just trying to understand it better.
I didn't research it yet (the .lok image??), but I will.

I tested it on a couple of devices, one running android 4.1.2 (3.4.0 kernel version) and the other android 5.1.1 (3.10.49 kernel version). It's intended to be universal, however I have not tested it on all boot images out there.

As for the ".lok" feature you will not need that unless you're working on an older device that has loki support.
 
  • Like
Reactions: HasH_BrowN
Upvote 0
I tested it on a couple of devices, one running android 4.1.2 (3.4.0 kernel version) and the other android 5.1.1 (3.10.49 kernel version). It's intended to be universal, however I have not tested it on all boot images out there.

As for the ".lok" feature you will not need that unless you're working on an older device that has loki support.
So anything above ICS, this should work with.
I'm trying to get into developing and figure out what I have available to use, for making a pleasurable experience instead of a hair-ripping one. Lol:p

Thanks for the speedy reply :)
 
  • Like
Reactions: GameTheory
Upvote 0
Going to test this tomorrow on our Tribute's 4.4.2 kernel. I'll let you know how it goes. I've been hoping to find a nice little utility like this. The only one I had previously, was for Windows and it sometimes gave a secure boot issue...(I think it doesn't pack properly.) Than you for this! I'll try my best to put it to good use, or break everything trying! :D
 
  • Like
Reactions: bkttk2
Upvote 0
New update to version 3.0

Hello everyone. Sorry it took so long to update this tool. I took a break from android development for a couple years.

This is a major update to mktool. It is now more universal with the exception of a few obscure devices. It's also more simplified now. You simply place all you're images in the input folder then choose from the menu options. Unpacked images will be in the "extracted" folder and repacked images in the "output" folder.

You can also now check for updates to mktool right from within the menu. I also added a desktop shortcut option for quick access which you can place anywhere, like a folder or a launcher or on your desktop.

I considered removing the loki patch option since that exploit was long patched in android, but I decided to leave it for the folks still having some dev fun with those older devices.

Hope you guys like the update. Happy modding.
 
  • Like
Reactions: Bg260
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones