Skip to content

Instantly share code, notes, and snippets.

@shuangjj
Last active December 15, 2015 13:28
Show Gist options
  • Save shuangjj/5267203 to your computer and use it in GitHub Desktop.
Save shuangjj/5267203 to your computer and use it in GitHub Desktop.
Build custom kernel for nexus 4
http://nosemaj.org/howto-build-android-nexus-4
http://forum.xda-developers.com/showthread.php?t=2131953
http://forum.xda-developers.com/showthread.php?t=1772894
http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images#Unpacking.2C_Editing.2C_and_Re-Packing_the_images
http://www.mydroidworld.com/topic/9778-how-to-create-an-insecure-boot-image/
===== Using abootimg
abootimg -x boot.img | to extract kernel config file, kernel image and ramdisk image from official boot image
vim bootimg.cfg | remove bootsize
abootimg --create myboot.img -f myboot.cfg -k makeout/zImage -r abootout/initrd.img | create new boot image using custom kernel image and ramdisk
===== change ramdisk
gunzip -c ../abootout/initrd.img | cpio -i | un-gzip and un-cpio original ramdisk image
find . | cpio -o -H newc | gzip > ../myramdisk.gz | re-gzip and re-cpio ramdisk archive
===== Crosstool version arm-linux-androideabi-4.6
When insert module, you'll get error "Unknown symbol _GLOBAL_OFFSET_TABLE_"
add CFLAGS_MODULE = -fno-pic when compiling kernel module
http://rpinfosec.blogspot.com/2012/06/hooking-linux-system-call-table-in-2012.html
http://www.ibm.com/developerworks/linux/library/l-33linuxkernel/
http://syprog.blogspot.com.au/2011/10/hijack-linux-system-calls-part-iii.html
http://www.gilgalab.com.br/hacking/programming/linux/2013/01/11/Hooking-Linux-3-syscalls/
http://stackoverflow.com/questions/5605678/android-how-to-telnet-a-phone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment