Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
HOWTO: compile mkbootimg/mkbootfs
get Android source code: http://source.android.com/source/downloading.html
$ cd /path/to/android-src
$ cd system/core/libmincrypt/
$ gcc -c *.c -I../include
$ ar rcs libmincrypt.a *.o
$ cd ../mkbootimg
$ gcc mkbootimg.c -o mkbootimg -I../include ../libmincrypt/libmincrypt.a
$ cd ../cpio
$ gcc mkbootfs.c -o mkbootfs -I../include
copy system/core/mkbootimg/mkbootimg, system/core/cpio/mkbootfs to a directory in your path.
@sndnvaps

This comment has been minimized.

Copy link

@sndnvaps sndnvaps commented Dec 5, 2012

i do the same thing .but i don't need the hold android source code.
i just need the system_core

i make it simple .
you can view my blog. to make it easy .

Click this

@arter97

This comment has been minimized.

Copy link

@arter97 arter97 commented Jun 27, 2014

I'd rather do this at system/core(it's one line!):
gcc -o /tmp/mkbootimg libmincrypt/.c mkbootimg/mkbootimg.c -Iinclude
gcc -o /tmp/unpackbootimg libmincrypt/
.c mkbootimg/unpackbootimg.c -Iinclude

@cweiske

This comment has been minimized.

Copy link

@cweiske cweiske commented Sep 25, 2019

mkbootimg has been removed on 2019-05-28:
https://android.googlesource.com/platform/system/core/+/4952ef749478683165e24a441496b46dfe0f64bb

Debian still has it in its repositories: apt install mkbootimg

@tallero

This comment has been minimized.

Copy link

@tallero tallero commented Apr 23, 2020

You should now specify that those instructions work on android 4.x.
Made an AUR package anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment