Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
wintel_mac
Old
(Last edited by wintel_mac; 26th April 2012 at 06:59 PM.) Reason: abootimg reference
#1  
wintel_mac's Avatar
Senior Member - OP
Thanks Meter 179
Posts: 450
Join Date: Jun 2011
Location: Nuremberg

 
DONATE TO ME
Talking [9001] Kernel - Extracting initrd.img from zImage and package again

Disclaimer: Do only use this information if you know what you're doing!

PATH=$PATH:/home/markus/android/sdk/platform-tools

Get kernel from phone:
adb shell
su
dd if=/dev/block/mmcblk0p8 of=/sdcard/external_sd/stockboot.img
Exit adb shell

adb pull /sdcard/external_sd/stockboot.img

Separate the zImage from the ramdisk (see below for abootimg):
abootimg -x stockboot.img


unpacks the archive and copies contents to working directory:
gunzip -c initrd.img | cpio -i

Do your edits, e.g. default.prop, add:
debug.performance.tuning=1
video.accelerate.hw=1
windowsmgr.max_events_per_sec=150

--> move all files to new folder, cd into this folder:
repacks files from working directory into an archive (MAKE SURE NO OTHER FILES ARE IN THE WORKING DIRECTORY!!)
find . | cpio -o -H newc | gzip > ../myinitrd.img

New boot.img:
./mkbootimg --kernel zImage --ramdisk myinitrd.img --cmdline "console=null androidboot.hardware=qcom androidboot.emmc=true hw=6" -o myBuiltBoot.img --base 0x00400000 --pagesize 4096

You can also use abootimg to create your new .img file, it has an easier syntax as it exports the commandline to a .cfg file and you can use that while creating the package.

Push your new kernel.img to the phone:
adb push myBuiltBoot.img /sdcard/external_sd/myBuiltBoot.img

Write kernel to kernel-partition in phone:
adb shell
su
dd if=/sdcard/external_sd/myBuiltBoot.img of=/dev/block/mmcblk0p8
adb reboot

< pray >

Sources:
http://forums.androidcentral.com/lg-...-nandroid.html
http://forum.xda-developers.com/show....php?t=1227269
http://forum.xda-developers.com/show....php?t=1292557

Also quite handy: http://packages.debian.org/de/sid/abootimg
Current Device: Google Galaxy Nexus GSM i9250, XenonHD JB

Siemens A50 -> Siemens M65 -> Sony Ericsson Z710i -> Sony Ericsson W595 -> HTC Desire (SLCD) -> Palm Pre (Minus) -> Samsung Galaxy S Plus (GT-I9001) -> Huawei Honor U8860 (returned b.c. of bad touchscreen) -> Samsung Galaxy S Plus (GT-I9001) -> Google Galaxy Nexus

The Following 2 Users Say Thank You to wintel_mac For This Useful Post: [ Click to Expand ]
 
sakindia123
Old
#2  
sakindia123's Avatar
Recognized Developer
Thanks Meter 7128
Posts: 3,797
Join Date: May 2011
Location: Noida
wouldnt just editing build.prop in /system without touching kernel do the same job? ^_^
Haters gonna hate
Software is like sex: it's better when it's free : Linus Torvalds

Samsung Galaxy S2 i9100 : Yippikayeh
HTC Explorer A310e : CyanogenMod10.1,Linux 3.0
 
wintel_mac
Old
#3  
wintel_mac's Avatar
Senior Member - OP
Thanks Meter 179
Posts: 450
Join Date: Jun 2011
Location: Nuremberg

 
DONATE TO ME
Yep. I just wanted to describe the whole process of extracting and packing the needed files. The edit was just an example. And in fact, i made a typo, it's called default.prop.
Current Device: Google Galaxy Nexus GSM i9250, XenonHD JB

Siemens A50 -> Siemens M65 -> Sony Ericsson Z710i -> Sony Ericsson W595 -> HTC Desire (SLCD) -> Palm Pre (Minus) -> Samsung Galaxy S Plus (GT-I9001) -> Huawei Honor U8860 (returned b.c. of bad touchscreen) -> Samsung Galaxy S Plus (GT-I9001) -> Google Galaxy Nexus

 
Post Reply+
Tags
abootimg, boot.img, extract ramdisk from kernel, initrd.img, mkbootimg
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...