Related
heres where im at now. im trying to edit the init.rc
i have extracted the boot.img using unpack-bootimg.pl and have got the follwing
empty folder called ramdisk
boot.img-ramdisk.cpio.gz
boot.img-ramdisk.gz
boot.img-kernell.gz
i am now stuck extracting the ramdisk to edit init.rc
i also get error gunzip is not a recognied command
any help??
add.thebad said:
i am trying to edit the init.rc but have problems extracting boot.img-ramdisk.gz
i have made a rom dump
then extracted boot.img
got boot.img-ramdisk.gz so extracted that
and now i have a file called boot.img-ramdisk nothing else
so how can i edit ramdisk?
thanks in advance. any help welcome
Click to expand...
Click to collapse
add.thebad,
Been a while since I've done this, lol, but these are the instructions I followed:
http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack%2C_Edit%2C_and_Re-Pack_Boot_Images
There's links to the Perl scripts in that page too.
Hope this helps.
Cheers!
thanks but the link to the scripts is broke. dont suppose you know where to get another
add.thebad said:
thanks but the link to the scripts is broke. dont suppose you know where to get another
Click to expand...
Click to collapse
Adam (that's right, right? ),
I found an XDA version of the "How To" link I posted above: http://forum.xda-developers.com/showthread.php?t=443994 and the files are at the bottom of the first post and they are still available.
By the way, I used these instructions (along with lots of help from Amon_RA himself) for unpacking and repacking Amon_RA's custom recovery .img file (I built a version that doesn't require the use of a trackball for the Eris).
I think after you unpack the ramdisk, you'll just replace / update your init.rc file and then repack everything before doing the mkbootfs on your ramdisk directory (followed by your particular mkbootimg command).
Good luck!
Cheers!
thanks for you help i have the scripts now and i can get it to extract however i get the error "gunzip is not recognised" and the files it does extract are emply
add.thebad said:
thanks for you help i have the scripts now and i can get it to extract however i get the error "gunzip is not recognised" and the files it does extract are emply
Click to expand...
Click to collapse
Are you on a Linux system?
The gzip / gunzip utilities should be on your system and/or referenced in you PATH environment variable.
Do a find / -name 'gzip' 2> /dev/null or find / -name gunzip 2> /dev/null or whereis gunzip or which gunzip (one of these should reveal the utility's location).
The unpack-bootimg.pl does use the gunzip command to extract the files, so you will need this utility.
Cheers!
after a bit of reading i think the way i have got my boot.img is wrong could this be why the folder is empty?
add.thebad said:
after a bit of reading i think the way i have got my boot.img is wrong could this be why the folder is empty?
Click to expand...
Click to collapse
Not sure... Like I said, I started with a known, good recovery.img file... I never have (yet) played with a boot.img file...
scary alien said:
Not sure... Like I said, I started with a known, good recovery.img file... I never have (yet) played with a boot.img file...
Click to expand...
Click to collapse
i managed to extract a boot.img from an official system image and tried that and got the same result. could i have anything to do with gunzip not being recognised
add.thebad said:
i managed to extract a boot.img from an official system image and tried that and got the same result. could i have anything to do with gunzip not being recognised
Click to expand...
Click to collapse
lol...I think we cross-posted a little bit ago...see above ^^^ for my post about your gunzip utility.
scary alien said:
lol...I think we cross-posted a little bit ago...see above ^^^ for my post about your gunzip utility.
Click to expand...
Click to collapse
haha so we did.
no im on windows and cant get gunzip to work. think i have gzip working tho
any ideas?
add.thebad said:
haha so we did.
no im on windows and cant get gunzip to work. think i have gzip working tho
any ideas?
Click to expand...
Click to collapse
Yeah, you'll have to grab some Windows versions of the Unix commands.
I can't remember where I got mine, but a quick search yielded this as a possible starting place:
http://www.cyberciti.biz/faq/unix-command-line-utilities-for-windows/
There's a couple of links to sets of tools. After you download and install these, make sure you point / change your Windows PATH to point to the utilities or just do all of your work in the same directory.
You really just need the utilities that are referenced in the Perl script... Not sure I'd bother with the whole Cygwin thing (your call, of course).
Cheers!
scary alien said:
Yeah, you'll have to grab some Windows versions of the Unix commands.
I can't remember where I got mine, but a quick search yielded this as a possible starting place:
http://www.cyberciti.biz/faq/unix-command-line-utilities-for-windows/
There's a couple of links to sets of tools. After you download and install these, make sure you point / change your Windows PATH to point to the utilities or just do all of your work in the same directory.
You really just need the utilities that are referenced in the Perl script... Not sure I'd bother with the whole Cygwin thing (your call, of course).
Cheers!
Click to expand...
Click to collapse
Ok will try that. I allready have cygwin to try get the commands i will try ur link tho. Think im getting a bit outa my depth but ive learnt so much so far i dont want to give up so thanks for your help
heres where im at now. im trying to edit the init.rc
i have extracted the boot.img using unpack-bootimg.pl and have got the follwing
empty folder called ramdisk
boot.img-ramdisk.cpio.gz
boot.img-ramdisk.gz
boot.img-kernell.gz
i am now stuck extracting the ramdisk to edit init.rc
i also get error gunzip is not a recognied command
any help??
add.thebad said:
heres where im at now. im trying to edit the init.rc
i have extracted the boot.img using unpack-bootimg.pl and have got the follwing
empty folder called ramdisk
boot.img-ramdisk.cpio.gz
boot.img-ramdisk.gz
boot.img-kernell.gz
i am now stuck extracting the ramdisk to edit init.rc
i also get error gunzip is not a recognied command
any help??
Click to expand...
Click to collapse
Well, I spent some time tonight trying to do this under Windows myself, but I used the split_bootimg.pl Perl script instead to create the *.img-kernel and *.img-ramdisk.gz files (with mixed success). lol, I had a hard time re-finding some good Unix commands that would run under Windows (I've got some good ones on my work PC, but that doesn't help me now).
Here's the relevant section in the original HOWTO link I sent you:
% ./split_bootimg.pl boot.img
Page size: 2048 (0x00000800)
Kernel size: 1388548 (0x00153004)
Ramdisk size: 141518 (0x000228ce)
Second size: 0 (0x00000000)
Board name:
Command line: no_console_suspend=1
Writing boot.img-kernel ... complete.
Writing boot.img-ramdisk.gz ... complete.
Now, extracting the ramdisk under Windows is a little trickier and I couldn't get the whole way there because I couldn't find the cpio command for Windows (you might have it already if you are using Cygwin). Anyway, the documentation explains that you would create a temporary "ramdisk" directory, change to it, use the gzip utility to uncompress and feed the output to the cpio command to actually extract the files and directories:
Extract the ramdisk.
% mkdir ramdisk
% cd ramdisk
% gzip -dc ../boot.img-ramdisk.gz | cpio -i
% cd ..
That should work for you (if you have appropriate utilities) and should give you the various files that comprise the ramdisk for you to modify (i.e., the init.rc).
After modifying them, you would use the mkbootfs utility (not sure if this is actually available in Windows) to re-pack the ramdisk and then use the mkbootimg command to re-pack your boot image.
It might be easier to get a Linux distro installed that you can launch from Windows just to do this.
Good luck!
scary alien said:
It might be easier to get a Linux distro installed that you can launch from Windows just to do this.
Good luck!
Click to expand...
Click to collapse
ahaa managed to get everything extracted and edit the init.rc so thank you for all your help
one the linux side of things i have ubuntu dual boot and use it from time to time im just not familiar with the commands on it so prefer windows. might try it more oftern since it can be a pain finding all the tools for windows
ne way all i need to do now is repackage it which is proving to be a bit of a problem atm.
a sleep less night and ill c how i get on lol
cheers for the help
add.thebad said:
ahaa managed to get everything extracted and edit the init.rc so thank you for all your help
one the linux side of things i have ubuntu dual boot and use it from time to time im just not familiar with the commands on it so prefer windows. might try it more oftern since it can be a pain finding all the tools for windows
ne way all i need to do now is repackage it which is proving to be a bit of a problem atm.
a sleep less night and ill c how i get on lol
cheers for the help
Click to expand...
Click to collapse
Adam,
Glad you are making progress .
Here's the last few bits that I used to re-pack my ramdisk and to rebuild the bootable recovery .img file (i.e., ramdisk + kernel):
# pack-up the ramdisk directory's files to build the new ramdisk .zip
#
mkbootfs ./ramdisk | gzip > ramdisk-new.gz
# now, repack the kernel and ramdisk to make the new recovery image
#
mkbootimg --cmdline 'no_console_suspend=1 console=null' --kernel recovery-RA-eris-v1.6.2.img-kernel --ramdisk ramdisk-new.gz --base 0x11200000 -o new-recovery.img
This is very similar to the instructions in the HOWTO thread.
Also, note the --base parameter in the mkbootimg line, this is unique/specific to each phone/bootable image since it appears to be the boot/load address, so you'll have to know or find-out what this particular value is for your situation.
Good luck and let me know how it goes.
Cheers to you, too!
scary alien said:
Adam,
Glad you are making progress .
Here's the last few bits that I used to re-pack my ramdisk and to rebuild the bootable recovery .img file (i.e., ramdisk + kernel):
# pack-up the ramdisk directory's files to build the new ramdisk .zip
#
mkbootfs ./ramdisk | gzip > ramdisk-new.gz
# now, repack the kernel and ramdisk to make the new recovery image
#
mkbootimg --cmdline 'no_console_suspend=1 console=null' --kernel recovery-RA-eris-v1.6.2.img-kernel --ramdisk ramdisk-new.gz --base 0x11200000 -o new-recovery.img
This is very similar to the instructions in the HOWTO thread.
Also, note the --base parameter in the mkbootimg line, this is unique/specific to each phone/bootable image since it appears to be the boot/load address, so you'll have to know or find-out what this particular value is for your situation.
Good luck and let me know how it goes.
Cheers to you, too!
Click to expand...
Click to collapse
ok gave up in windows cannot find a command or perl script for mkbootfs so now in ubuntu giving it a try
i can do that first bit fine. does it need to be re cpio?
on the next commannd i type
Code:
mkbootimg --cmdline 'no_console_suspend=1 console=null' --boot.img-kernel.gz --boot.img-ramdisk.gz ----base 0x10000000 -o new-boot.img
and get this
Code:
[email protected]:~/Desktop$ mkbootimg --cmdline 'no_console_suspend=1 console=null' --boot.img-kernel.gz --boot.img-ramdisk.gz ----base 0x10000000 -o new-boot.img
usage: mkbootimg
--kernel <filename>
--ramdisk <filename>
[ --second <2ndbootloader-filename> ]
[ --cmdline <kernel-commandline> ]
[ --board <boardname> ]
[ --base <address> ]
-o|--output <filename>
but nothing is outputted on my desktop
add.thebad said:
ok gave up in windows cannot find a command or perl script for mkbootfs so now in ubuntu giving it a try
Click to expand...
Click to collapse
I believe that the mkbootfs utility is available / created as a result of building / compiling the Android open source.
Like I mentioned before, its been a while since I did all this myself, but I had to download and do the base "make" for the Android open source since I was actually changing and recompiling the custom recovery.
So, you'll need to check-out / download the desired AOSP branch / version from the proper location (which eludes me at the moment). Then, I believe doing the base / generic "make" for the AOSP will create or reveal the mkbootfs utility.
One of the threads in the following forum should have a better, starter explanation for doing the above that I could post here:
http://forum.xda-developers.com/forumdisplay.php?f=613
I'd dig into this more with you tonight, but I gotta do my taxes and then go into work for a few hours tonight (ugh on both counts, lol!).
Good luck!
NOTE: I started few days ago working with the boot image.
I'm not an Android expert. If you find an error in this post, let me know.
Use this information at your own risk. If you brick your tablet, don't blame on me.
Nothing of the tools used here are written by me. I'm not taking credit for another's work.
I have rooted my tf101 with the instructions from the mashi's thread. (http://forum.xda-developers.com/showthread.php?t=1125714)
I was curious about the root process of our beloved tablet.
For add root at the stock firmware you need the su packages and a proper boot image.
I've worked for years on linux machines, so I know that you need the "su" command to become root.
But what about the boot image? What does it need for?
I've googled and found some information that I'd like to share with you:
For using adb as superuser, and push the su package, you need to flash a so called "insecure boot" on your tablet/phone.
The process is easy:
NOTE: Even if I'm on a Windows machine, I prefer to do this work in linux. The entire process has been done in an Ubuntu 11.04 virtual machine.
What you need:
- a PC running linux
- BootTools and BlobTools from Rayman84 (http://androidroot.mobi/)
- mkbootimg (mkbootfs is optional) from the android repository
I assume that you have all the above tools in your $PATH variable.
First of all you need a stock boot image; you can extract one from your tablet (with nvflash) or from the latest stock firmware (US-VERSION - WW-VERSION)
We're going for the official packages from the ASUS website. Download it on your home directory (or wherever you want).
Let's start:
Code:
mkdir stock_firmware
cd stock_firmware
unzip ../UpdateLauncher_WW_epaduser_84411.zip
unzip ASUS/Update/WW_epad-user-8.4.4.11.zip
blobunpack blob
bootunpack blob.LNX
Now we have a lot of "strange" files:
Code:
ASUS
blob
blob.APP
blob.EBT
blob.HEADER
blob.LNX
blob.LNX-config
blob.LNX-kernel.gz
blob.LNX-ramdisk.cpio.gz
blob.PT
blob.SOS
META-INF
For our work, we just need blob.LNX-ramdisk.cpio.gz
Code:
mkdir boot_img
cd boot_img
gunzip -dc ../blob.LNX-ramdisk.cpio.gz | cpio -i
vi default.prop (or "gedit default.prop" if you want a GUI)
Here you have to change the line "ro.secure=1" in "ro.secure=0"
The final file should appears as this:
Code:
#
# ADDITIONAL_DEFAULT_PROPERTIES
#
ro.secure=0
ro.allow.mock.location=0
ro.debuggable=0
persist.service.adb.enable=0
Almost done. Let's repack:
Code:
find . | cpio -o -H newc | gzip > ../newramdisk.cpio.gz
or alternatively:
Code:
mkbootfs ./ | gzip > ../newramdisk.cpio.gz
Finally make the boot.img:
Code:
cd ..
mkbootimg --kernel blob.LNX-kernel.gz --ramdisk newramdisk.cpio.gz -o boot.img
Now you have your boot.img, ready to be flashed with nvflash.
For information on what to do with this file, please refer to the mashi or brk threads.
Again, I've taken this information from google.
All the credits and many thanks to:
Rayman for the BlobTools and the BootTools - http://androidroot.mobi/
Mashi for his thread on rooting the stock kernel - http://forum.xda-developers.com/showthread.php?t=1125714
Brk for his batch script - http://forum.xda-developers.com/showthread.php?t=1185104
If you found this guide useful, hit the "Thanks" button.
For your convenience, you can find the tools used attached in this post (compiled on Ubuntu 11.04).
UPDATE: I have written a script (thanks gnufabio for the idea) that automatically modify a stock boot.img into an insecure one.
ex:
Code:
./insecure.sh boot.img
when the script finishes you will find a file called my_boot.img ready to be flashed with nvflash.
Bootunpack and mkbootimg should be in your $PATH.
This script doesn't do much error checking, so keep your eyes open.
HF
hey thanks very nice guide
Excellent. I've been looking around trying to work out how to package up a kernel build, this helps a great deal.
I'm assuming that I just replace the blob.LNX-kernel.gz with my built zImage?
SammyC said:
Excellent. I've been looking around trying to work out how to package up a kernel build, this helps a great deal.
I'm assuming that I just replace the blob.LNX-kernel.gz with my built zImage?
Click to expand...
Click to collapse
I haven't try but i guess yes.
If you really want to recompile/repackage the kernel, you can refer to this http://www.droidforums.net/forum/rescue-squad-guides/31452-how-compile-your-own-kernel.html ; it's about the Motorola Droid, but some concepts are universal for all the android devices.
HF
Good work, btw give a look to this script i made: mcpio
Unpacking and repacking the ramdisk will be easier:
Code:
mcpio -c ramdisk-folder/
mcpio -e ramdis-archive.cpio.gz
Thanks - Very useful to have this in this section. I tried the example, and it all worked fine on an old Ubuntu dist.
gnufabio said:
Good work, btw give a look to this script i made: mcpio
Unpacking and repacking the ramdisk will be easier:
Code:
mcpio -c ramdisk-folder/
mcpio -e ramdis-archive.cpio.gz
Click to expand...
Click to collapse
Well, that's a lot easier...
I didn't know your script, thanks for sharing.
Updated the first post with a bash script to automate the entire process.
Yesterday I've succesfully recompiled the stock kernel and I'm thinking on write another guide like this one on the subject.
The process is a little complicate, i'm looking for an easy way to explain but it's hard.
Anyway I'm working on it in my spare time.
That would be great if you could.
ASUS haven't (yet) released the source for the kernel in their latest 3.2 build. If you've updated to 3.2, you can still root and repackage using this method. Just use nvflash to save off the kernel from your running device as per the backup/restore thread, then use bootunpack on that and follow the rest of the instructions
raypou said:
ASUS haven't (yet) released the source for the kernel in their latest 3.2 build. If you've updated to 3.2, you can still root and repackage using this method. Just use nvflash to save off the kernel from your running device as per the backup/restore thread, then use bootunpack on that and follow the rest of the instructions
Click to expand...
Click to collapse
it's exactly the method used here: http://forum.xda-developers.com/showthread.php?t=1198303
If anyone interested, here're win32 binaries of BlobTools and BootTools
Just compiled from git repo.
I unpacked a rom with a kernelblob in the root directory, and edited init.rc. Which command should I use to repackage it? If I follow the guide (instead of boot.img I used kernelblob, no extension) I get the EEE Pad logo then scrambled, colored lines all over.
If I, however, install the base rom, then the one where I changed something in the kernelblob, it boots up.
theMIROn said:
If anyone interested, here're win32 binaries of BlobTools and BootTools
Just compiled from git repo.
Click to expand...
Click to collapse
Hi, makebootimg.exe doesn't work. It gives error saying: error: could not load kernel 'blob.LNX-kernel.gz'
Tried same files in linux and worked fine.
Can you try to fix this?
EDIT: tried to compile myself but got the same issue. I think is related with the need to change source code to make this run on windows.
Working boottools for windows available here: http://forum.xda-developers.com/showpost.php?p=17237701&postcount=443
brk said:
Hi, makebootimg.exe doesn't work. It gives error saying: error: could not load kernel 'blob.LNX-kernel.gz'
Tried same files in linux and worked fine.
Can you try to fix this?
Click to expand...
Click to collapse
yep, it's code issue
attached BootTools-Win32.zip with fixed mkbootimg.exe
is there this guide for tf201?
BR
Maframan
maframan said:
is there this guide for tf201?
BR
Maframan
Click to expand...
Click to collapse
You should probably check the TF201 forum.
Could this method be used to pack a new Splash Screen? (I want to change that annoying ASUS logo to something better) Would I go about the Flash_Image method to flash the image after compiled? (I do Not have NvFlash, but I am rooted with Cwm)
Which blobs would I modify as well, just the EBT?
rebound821 said:
NOTE: I started few days ago working with the boot image.
I'm not an Android expert. If you find an error in this post, let me know.
Use this information at your own risk. If you brick your tablet, don't blame on me.
Nothing of the tools used here are written by me. I'm not taking credit for another's work.
I have rooted my tf101 with the instructions from the mashi's thread. (http://forum.xda-developers.com/showthread.php?t=1125714)
I was curious about the root process of our beloved tablet.
For add root at the stock firmware you need the su packages and a proper boot image.
I've worked for years on linux machines, so I know that you need the "su" command to become root.
But what about the boot image? What does it need for?
I've googled and found some information that I'd like to share with you:
For using adb as superuser, and push the su package, you need to flash a so called "insecure boot" on your tablet/phone.
The process is easy:
NOTE: Even if I'm on a Windows machine, I prefer to do this work in linux. The entire process has been done in an Ubuntu 11.04 virtual machine.
What you need:
- a PC running linux
- BootTools and BlobTools from Rayman84 (http://androidroot.mobi/)
- mkbootimg (mkbootfs is optional) from the android repository
I assume that you have all the above tools in your $PATH variable.
First of all you need a stock boot image; you can extract one from your tablet (with nvflash) or from the latest stock firmware (US-VERSION - WW-VERSION)
We're going for the official packages from the ASUS website. Download it on your home directory (or wherever you want).
Let's start:
Code:
mkdir stock_firmware
cd stock_firmware
unzip ../UpdateLauncher_WW_epaduser_84411.zip
unzip ASUS/Update/WW_epad-user-8.4.4.11.zip
blobunpack blob
bootunpack blob.LNX
Now we have a lot of "strange" files:
Code:
ASUS
blob
blob.APP
blob.EBT
blob.HEADER
blob.LNX
blob.LNX-config
blob.LNX-kernel.gz
blob.LNX-ramdisk.cpio.gz
blob.PT
blob.SOS
META-INF
For our work, we just need blob.LNX-ramdisk.cpio.gz
Code:
mkdir boot_img
cd boot_img
gunzip -dc ../blob.LNX-ramdisk.cpio.gz | cpio -i
vi default.prop (or "gedit default.prop" if you want a GUI)
Here you have to change the line "ro.secure=1" in "ro.secure=0"
The final file should appears as this:
Code:
#
# ADDITIONAL_DEFAULT_PROPERTIES
#
ro.secure=0
ro.allow.mock.location=0
ro.debuggable=0
persist.service.adb.enable=0
Almost done. Let's repack:
Code:
find . | cpio -o -H newc | gzip > ../newramdisk.cpio.gz
or alternatively:
Code:
mkbootfs ./ | gzip > ../newramdisk.cpio.gz
Finally make the boot.img:
Code:
cd ..
mkbootimg --kernel blob.LNX-kernel.gz --ramdisk newramdisk.cpio.gz -o boot.img
Now you have your boot.img, ready to be flashed with nvflash.
For information on what to do with this file, please refer to the mashi or brk threads.
Again, I've taken this information from google.
All the credits and many thanks to:
Rayman for the BlobTools and the BootTools - http://androidroot.mobi/
Mashi for his thread on rooting the stock kernel - http://forum.xda-developers.com/showthread.php?t=1125714
Brk for his batch script - http://forum.xda-developers.com/showthread.php?t=1185104
If you found this guide useful, hit the "Thanks" button.
For your convenience, you can find the tools used attached in this post (compiled on Ubuntu 11.04).
UPDATE: I have written a script (thanks gnufabio for the idea) that automatically modify a stock boot.img into an insecure one.
ex:
Code:
./insecure.sh boot.img
when the script finishes you will find a file called my_boot.img ready to be flashed with nvflash.
Bootunpack and mkbootimg should be in your $PATH.
This script doesn't do much error checking, so keep your eyes open.
HF
Click to expand...
Click to collapse
Hi Sir,
First of all thankyou for you guide because I did follow you guide and created the insecure boot.image succesfully. I still have one problem, after flashing the boot.image, I still could not root the android device. Why is that? Do I need to change something else in the boot.img?
Hi, I am trying to compile my own kernel, using the CM7.1 alpha source, but have not been able to load the zImage successfully. So I have taken a step back and tried to create a boot.img with an existing working 1.
I've extracted the boot.img from the file: update-cm-7.1.0-SelfKANG10-Sensation-signed.zip and have been able to fastboot boot boot.img using the extracted file. Everything loads up fine.
I would like to simply unpack this img and repack it with no modifications. I have tried several methods:
split_bootimg.pl, then, (have also tried other scripts unpack-H.pl, unpack-bootimg.pl, unpack.sh)
mkbootimg --cmdline 'no_console_suspend=1 console=null' --kernel your-kernel-file --ramdisk newramdisk.cpio.gz -o mynewimage.img
fastboot boot mynewimage.img
The phone hangs at the HTC boot screen.
I have tried manually separating the kernel and ramdisk using a hex editor, finding the string 00 00 1F 8B and removing the bottom section to get the kernel and the top section to get the ramdisk, then creating 2 separate files.
I have also tried adding the base address 0x40400000 to the mkbootimg command.
Is there something else I am missing? Please help. I have Sensation 4G if that makes any difference.
bump. anyone can point me in the right direction?
Found my problem. Base address in the config file was wrong. It showed 0x40400000. I used a new split script that displays the base address which shows 0x48000000. Did the mkbootimg with a split boot.img of a working CM7.1 update and the new boot image is now working. Will try with compiled zImage now.
Simma87 said:
Found my problem. Base address in the config file was wrong. It showed 0x40400000. I used a new split script that displays the base address which shows 0x48000000. Did the mkbootimg with a split boot.img of a working CM7.1 update and the new boot image is now working. Will try with compiled zImage now.
Click to expand...
Click to collapse
Let's me kwown method of u? Thank
good advice guys.. thanks
I have a xoom wifi with android 3.2 on it. Kernel [email protected] #1
I'm rooted and my bootloader is unlocked. I downloaded the Timate kernel (Tiamat-Kernel-2.0.0-Katana-stockgpu.zip) and loaded it with clockwork recovery. I saw anykernel run when I applied the zip. But after I reboot the xoom still has the same kernel version on it.
Did I miss a step somewhere? How does it keep loading the stock kernel after I load the new one? The only thing I can think of is that there is a failsafe mode that loads the "last good" kernel if the current one fails.
njdevi11 said:
I have a xoom wifi with android 3.2 on it. Kernel [email protected] #1
I'm rooted and my bootloader is unlocked. I downloaded the Timate kernel (Tiamat-Kernel-2.0.0-Katana-stockgpu.zip) and loaded it with clockwork recovery. I saw anykernel run when I applied the zip. But after I reboot the xoom still has the same kernel version on it.
Did I miss a step somewhere? How does it keep loading the stock kernel after I load the new one? The only thing I can think of is that there is a failsafe mode that loads the "last good" kernel if the current one fails.
Click to expand...
Click to collapse
Do a manual Flash from recovery. or - Upgrade to ICS with -Download the EOS ICS 1.0.0 (good stable ROM/kernel)
http://forum.xda-developers.com/showthread.php?t=1484770
SOLVED:
So for whatever reason I absolutely CAN NOT get an anykernel zip to work for me and i've tried it on a few devices (xoom, nexus s, atrix, nook off the top of my head). Here is what I had to do to get my own kernel on the xoom:
(1) make a backup with CWM, and copy the boot.img to my computer.
(2) extract boot.img with unpack-bootimg.pl
(3) this gives me the boot-img-ramdisk.cpio.gz file and boot.img-kernel.gz
If you want to recpio because you changed the ramdisk/added ko's run:
cd boot.img-ramdisk/
find . | cpio -o -H newc | gzip > ../bootimg-ramdisk.cpio.gz
cd ..
(4) use command:
mkbootimg --cmdline 'androidboot.carrier=wifi-only product_type=w' --kernel zImage --ramdisk boot.img-ramdisk.cpio.gz -o boot-new.img --base 0x30000000 --pagesize 4096
adb reboot bootloader
fastboot flash boot boot-new.img
Adendium:
I figured out what the command= should be by opening a working boot-img in a hex/text editor (vi) and just copied what should be in there. That seems to do that trick for the last few devices i've tried compiling kernels for. All the "tutorials" on the internet I've seen get really sketchy when it comes to actually repacking a kernel and there is a lot of bad or just lazy information that's outdated or copied about one device for another that doesn't actually work like that.
Okay, so I have created and modified my own kernel name BionicSheep and have done couple releases (check my signature for link). My main question is how do I create a flashable zip with a boot.img I have asked a few people and they told me to use the kernel kitchen or google, but this is the only problem I haven't been able to solve after googling daily for the past 4 days. I figured I would ask here.
The reason I would like a boot.img is because I know in order to modify the kernelsplash with my own logo, I need to be able to unpack the bootimage to get the ramdisk and modify an rle file. The problem is I have no idea how to first make this bootimage. I understand to make the bootimage you need a the zImage (kernel binary) and the ramdisk. I have the zImage but I don't know how to make/get a ramdisk.
Currently I have been using this described method of packing my kernel into a flashable zip. I am pretty sure it just packs my modules and zImage into koush's AnyKernel. Thanks for any help, I need it.
Also try my kernel out and leave feedback if you are so inclined! It really is appreciated
In linux:
http://forum.xda-developers.com/showthread.php?t=1477845
In windows:
http://technopyrate.blogspot.pt/2013/04/how-to-edit-android-bootimg-in-windows.html
zamcum said:
In linux:
http://forum.xda-developers.com/showthread.php?t=1477845
In windows:
http://technopyrate.blogspot.pt/2013/04/how-to-edit-android-bootimg-in-windows.html
Click to expand...
Click to collapse
This is helpful for unpacking modifying and repacking, but I dont have a boot.img to unpack. Like I said, all I have is a zImage, i have no clue how to get a ramdisk. Can I just use one from another kernel or will that cause conflicts? Thanks for the help
aeppacher said:
This is helpful for unpacking modifying and repacking, but I dont have a boot.img to unpack. Like I said, all I have is a zImage, i have no clue how to get a ramdisk. Can I just use one from another kernel or will that cause conflicts? Thanks for the help
Click to expand...
Click to collapse
You can have it, in a stock rom:
Download a stock rom for your phone, open .tar.md5 file with winrar, extract boot.img and unpack it.
Inside you have, ramdisdk and zimage, with another name (boot.img-kernel)
rename your zimage, to boot.img-kernel, edit ramdisk if you want
repalce original boot.img-kernel with yours
and repack
Rename boot-new.img to boot.img
Enjoy
EDIT: To make a flashable Odin file, in Linux:
tar -H ustar -c boot.img > YOURKERNEL.tar
md5sum -t YOURKERNEL.tar >> YOURKERNEL.tar
mv YOURKERNEL.tar YOURKERNEL.tar.md5
That's not necessary. You can make it so that your zImage replaces the zImage inside the boot.img and the initlogo.rle at the same time.
CNexus said:
That's not necessary. You can make it so that your zImage replaces the zImage inside the boot.img and the initlogo.rle at the same time.
Click to expand...
Click to collapse
Which step is not necessary? My biggest problem here was I didn't know i could take any old boot.img to make mine
zamcum said:
You can have it, in a stock rom:
Download a stock rom for your phone, open .tar.md5 file with winrar, extract boot.img and unpack it.
Inside you have, ramdisdk and zimage, with another name (boot.img-kernel)
rename your zimage, to boot.img-kernel, edit ramdisk if you want
repalce original boot.img-kernel with yours
and repack
Rename boot-new.img to boot.img
Enjoy
EDIT: To make a flashable Odin file, in Linux:
tar -H ustar -c boot.img > YOURKERNEL.tar
md5sum -t YOURKERNEL.tar >> YOURKERNEL.tar
mv YOURKERNEL.tar YOURKERNEL.tar.md5
Click to expand...
Click to collapse
hahaha so I think that worked, I have a bootimage with my kernel!! hurrah, now how do I turn it into a flashable zip? Last question I promise
aeppacher said:
hahaha so I think that worked, I have a bootimage with my kernel!! hurrah, now how do I turn it into a flashable zip? Last question I promise
Click to expand...
Click to collapse
the easiest way, is to download a custom kernel for your phone, open the zip with winrar and replace the bott.img by your boot.img
It is important that the exact custom kernel of your phone, so that, there are no incompatibilities in the installation script
zamcum said:
the easiest way, is to download a custom kernel for your phone, open the zip with winrar and replace the bott.img by your boot.img
It is important that the exact custom kernel of your phone, so that, there are no incompatibilities in the installation script
Click to expand...
Click to collapse
Hmmm, I tried this and it didn't boot. :/ then I booted to recovery restarted, and then it booted with my boot splash (yay) went to apps updating and then just got stuck at starting apps. I couldn't get it to fully boot :/
Any ideas whats up
EDIT: I can't thank you since I only get 8 per day, sorry I do appreciate it though
aeppacher said:
Hmmm, I tried this and it didn't boot. :/ then I booted to recovery restarted, and then it booted with my boot splash (yay) went to apps updating and then just got stuck at starting apps. I couldn't get it to fully boot :/
Any ideas whats up
EDIT: I can't thank you since I only get 8 per day, sorry I do appreciate it though
Click to expand...
Click to collapse
If your kernel does not boot, is because it has a problem. It is normal to happen in the first kernel.
The process I use, is what is above. Sorry, II can not help more.
Do not worry about the gratefulness. The important thing is to help
I have a question along the same lines as this thread and I've read all over the place and can't find anything. How do you open a boot.img file to be able to replace the zimage
---------- Post added at 09:21 AM ---------- Previous post was at 08:45 AM ----------
I have a question along the same lines as this thread and I've read all over the place and can't find anything. How do you open a boot.img file to be able to replace the zimage
EDIT: i fixed this
Problem solved, figured I would post a solution:
here are the tools: https://dl.dropboxusercontent.com/u/106865720/bootimg_tools.zip
extract them into any old folder. You also need to have perl installed (just google it)
1. You need to take your built boot.img (from a rom running your kernel successfully) and drag it into the folder.
2. Open up terminal and navigate to the directory with the tools and boot.img
3. First you need to split the boot image into its 2 parts (the ramdisk and the kernel zImage)
Code:
perl split_bootimg.pl boot.img
The "boot.img" part is just the name of your boot.img (I am assuming yours is called boot.img but you can change it as needed)
4. Okay what should have happened is the boot.img should have split into a 'boot.img-ramdisk.gz' and a 'boot.img-kernel' file. The first is a specially compressed ramdisk and the second is the zImage for the kernel
5. Now you need to unpack the ramdisk so that you can modify it. BE CAREFUL AND MODIFY ONLY IF NEEDED Use this code:
Code:
perl unpack_ramdisk boot.img-ramdisk.gz ramdisk
the "boot-img-ramdisk.gz" is the name of the ramdisk, you can change this as needed but it should be named that by default
6.Okay so what should have happened is a folder ramdisk was created (this is the unpacked ramdisk which you need).
7.Okay go back to your directory and delete your boot.img, boot.img-kernel and boot.img-ramdisk.gz files (you no longer need them)
8. Now you need to repack the ramdisk folder you modified so you can rebuild the boot.img use the following:
Code:
perl repack_ramdisk ramdisk boot.img-ramdisk.cpio.gz
9. This will take the 'ramdisk' folder and pack it and name it 'boot.img-ramdisk.cpio.gz'
11. Find your built zImage for your compiled kernel and copy it into this folder with the tools. Rename it as "boot.img-kernel"
10. Sweet now you need to pack the new ramdisk file and your kernel you just stuck in into a new boot.img (this part took me forever to figure out)
11. Here is the code to rebuild
Code:
mkbootimg --kernel boot.img-kernel --ramdisk boot.img-ramdisk.cpio.gz --cmdline 'console=null androidboot.hardware=qcom user_debug=31 zcache' --base 0x80200000 --pagesize 2048 --ramdiskaddr 0x81500000 -o boot.img
12. This should create a file named boot.img in the directory that will have your kernel and modified ramdisk (whoo)
Any further help can be directed to this thread or PMing me!
aeppacher said:
11. Here is the code to rebuild
Code:
mkbootimg --kernel boot.img-kernel --ramdisk boot.img-ramdisk.cpio.gz --cmdline 'console=null androidboot.hardware=qcom user_debug=31 zcache' --base 0x80200000 --pagesize 2048 --ramdiskaddr 0x81500000 -o boot.img
Any further help can be directed to this thread or PMing me!
Click to expand...
Click to collapse
While executing above code I am getting : -bash: mkbootimg: command not found. Whether the mkbootimg file is exist there,
could you please help
mukulsoni said:
While executing above code I am getting : -bash: mkbootimg: command not found. Whether the mkbootimg file is exist there,
could you please help
Click to expand...
Click to collapse
Are you doing this is the same directory as the mkbootimg file? Otherwise you have to path it
aeppacher said:
Are you doing this is the same directory as the mkbootimg file? Otherwise you have to path it
Click to expand...
Click to collapse
Yes I am doing in same path. Its unpacking correctly, but showing error while packing the boot
Hmmm perhaps a bad download?
aeppacher said:
Hmmm perhaps a bad download?
Click to expand...
Click to collapse
but unpacking is fine, My downloaded zip file is in 66.4 Kb size. any way could you please try to compile the attached HP.zip into boot.img in your system. TIA
Edit: sorry downloaded file size is 290kb. please send me the final compiled boot.img file. Thanks so much
mukulsoni said:
but unpacking is fine, My downloaded zip file is in 66.4 Kb size. any way could you please try to compile the attached HP.zip into boot.img in your system. TIA
Edit: sorry downloaded file size is 290kb. please send me the final compiled boot.img file. Thanks so much
Click to expand...
Click to collapse
What version of linux are you running? Ubuntu? what version number, and is it 32-bit or 64-bit
EDIT: try install 32bit packages "sudo apt-get install ia32-libs"
aeppacher said:
What version of linux are you running? Ubuntu? what version number, and is it 32-bit or 64-bit
EDIT: try install 32bit packages "sudo apt-get install ia32-libs"
Click to expand...
Click to collapse
I am running these scripts on window7 using Cygwin64. I guess these script should run on window 7 64 bit too.... please guide
mukulsoni said:
I am running these scripts on window7 using Cygwin64. I guess these script should run on window 7 64 bit too.... please guide
Click to expand...
Click to collapse
I have no clue how to fix that. Mkbootimg is for 32 bit instruction so you need the appropriate libraries. No clue how to do that in windows