Hello, I'm trying to modified the kernel of my phone, but I have one problem, when I try to decompile boot.img-ramdisk.gz (with ubuntu) it appear a message that put boot.img-ramdisk.gz: not in gzip format and I cant.
Regards
pepe471 said:
Hello, I'm trying to modified the kernel of my phone, but I have one problem, when I try to decompile boot.img-ramdisk.gz (with ubuntu) it appear a message that put boot.img-ramdisk.gz: not in gzip format and I cant.
Regards
Click to expand...
Click to collapse
what do you want to do ? did you compile the kernel and now maybe you want to prepare boot.img ? or what
anyway there is a .perl script to split boot.img in zImage (kernel compiled) and ramdisk also this will extract ramdisk in "out" folder so work with this folder to change things to ramdisk
search for split_bootimg.pl and you get the answer !
I think here you have a complete reference http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack%2C_Edit%2C_and_Re-Pack_Boot_Images
ruscan.calin said:
what do you want to do ? did you compile the kernel and now maybe you want to prepare boot.img ? or what
anyway there is a .perl script to split boot.img in zImage (kernel compiled) and ramdisk also this will extract ramdisk in "out" folder so work with this folder to change things to ramdisk
search for split_bootimg.pl and you get the answer !
I think here you have a complete reference http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack%2C_Edit%2C_and_Re-Pack_Boot_Images
Click to expand...
Click to collapse
I want to chage the boot logo and the g-sensor configuration.
I extract the boot.img-kernel and the boot.img-ramdisk.gz with split_bootimg.pl, but then I can't extract the files of boot.img-ramdisk.gz
Thank you
ruscan.calin said:
what do you want to do ? did you compile the kernel and now maybe you want to prepare boot.img ? or what
anyway there is a .perl script to split boot.img in zImage (kernel compiled) and ramdisk also this will extract ramdisk in "out" folder so work with this folder to change things to ramdisk
search for split_bootimg.pl and you get the answer !
I think here you have a complete reference http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack%2C_Edit%2C_and_Re-Pack_Boot_Images
Click to expand...
Click to collapse
Arrogant answer without any help. If you would care to read what people write you would have noticed that he wanted to unpack the boot.img-ramdisk.gz.
I'm trying the same with a ramdisk here but get the same error. And yeah, i did read the tutorial you've link + http://forum.xda-developers.com/showthread.php?t=1477845.
And both say nothing about how to handle the errors we got.
After some googling, and trying out two approaches, i finally found the solution.
The third one i came across worked, at least for me:
http://forum.xda-developers.com/showpost.php?p=31954123&postcount=913
The "boot.img-ramdisk.gz" was compressed in lzma format. So the correct command would be:
lzma -dc ../boot.img-ramdisk.gz | cpio -i
Ramdisk unpacked. Enjoy.
Kaskade said:
Arrogant answer without any help. If you would care to read what people write you would have noticed that he wanted to unpack the boot.img-ramdisk.gz.
I'm trying the same with a ramdisk here but get the same error. And yeah, i did read the tutorial you've link + http://forum.xda-developers.com/showthread.php?t=1477845.
And both say nothing about how to handle the errors we got.
After some googling, and trying out two approaches, i finally found the solution.
The third one i came across worked, at least for me:
http://forum.xda-developers.com/showpost.php?p=31954123&postcount=913
The "boot.img-ramdisk.gz" was compressed in lzma format. So the correct command would be:
lzma -dc ../boot.img-ramdisk.gz | cpio -i
Ramdisk unpacked. Enjoy.
Click to expand...
Click to collapse
or if you are in linux.. since you are making kernel.. you will be..
anyway.. if you are getting this error.. just rename the file with .lzma extension..
then use archive manager or Xarchiver application in linux and extract it.. then extract the file obtained again... you will get all the files and folders inside ramdisk.. no need of any kitchen/anything.. as linux can handle lzma natively
Kaskade said:
Arrogant answer without any help. If you would care to read what people write you would have noticed that he wanted to unpack the boot.img-ramdisk.gz.
I'm trying the same with a ramdisk here but get the same error. And yeah, i did read the tutorial you've link + http://forum.xda-developers.com/showthread.php?t=1477845.
And both say nothing about how to handle the errors we got.
After some googling, and trying out two approaches, i finally found the solution.
The third one i came across worked, at least for me:
http://forum.xda-developers.com/showpost.php?p=31954123&postcount=913
The "boot.img-ramdisk.gz" was compressed in lzma format. So the correct command would be:
lzma -dc ../boot.img-ramdisk.gz | cpio -i
Ramdisk unpacked. Enjoy.
Click to expand...
Click to collapse
Hi,
I am on Linux.
I have installed lzma on the home dir.
I don't know why I am getting Decode error.
[email protected]:~/VIJAY/andriod/work3$ ls -lrt
total 239840
[SIZE="2][COLOR="DarkGreen"]drwxr-xr-x 3 vramaraj sw-team 4096 Oct 9 2011 data/
-rw-r--r-- 1 vramaraj sw-team 70 May 16 2012 installbusybox
drwxr-xr-x 4 vramaraj sw-team 4096 Oct 6 19:03 sdcard/
drwxr-xr-x 16 vramaraj sw-team 4096 Nov 28 22:14 system/
-rw-r--r-- 1 vramaraj sw-team 4073472 Dec 2 22:27 boot.img
-rw-r--r-- 1 vramaraj sw-team 302938 Dec 3 21:14 logo.bin
-rw-r--r-- 1 vramaraj sw-team 236601691 Jan 31 22:18 YONIP_MP_A919_v1.zip
-rwxr-xr-x 1 vramaraj sw-team 6773 Jan 31 22:18 split_bootimg.pl*
drwxr-xr-x 3 vramaraj sw-team 4096 Jan 31 22:19 META-INF/
-rw-r--r-- 1 vramaraj sw-team 3477896 Jan 31 22:50 boot.img-kernel
-rw-r--r-- 1 vramaraj sw-team 591679 Jan 31 22:50 boot.img-ramdisk.gz
-rwxrwxrwx 1 vramaraj sw-team 229 Jan 31 22:55 extractboot*
drwxr-xr-x 3 vramaraj sw-team 4096 Jan 31 22:55 out/
drwxr-xr-x 2 vramaraj sw-team 4096 Jan 31 23:32 ramdisk/[/COLOR][/SIZE]
[email protected]:~/VIJAY/andriod/work3$
[email protected]:~/VIJAY/andriod/work3/out/ramdisk$ ~/lzma -dc ../../boot.img-ramdisk.gz | cpio -i
/users/home40/vramaraj/lzma: Decoder error
cpio: premature end of archive
[email protected]:~/VIJAY/andriod/work3/out/ramdisk$
Deadly said:
or if you are in linux.. since you are making kernel.. you will be..
anyway.. if you are getting this error.. just rename the file with .lzma extension..
then use archive manager or Xarchiver application in linux and extract it.. then extract the file obtained again... you will get all the files and folders inside ramdisk.. no need of any kitchen/anything.. as linux can handle lzma natively
Click to expand...
Click to collapse
Interesting!
I have a similar problem where gzip complained that my boot.img-ramdisk.gz is not in gzip format.
At the advice of this thread [and some others] I ran:
lzma -t boot.img-ramdisk.gz
xz -t boot.img-ramdisk.gz
Neither one worked, so at the advice of your post I copied the file to both a ".lzma" and a ".xz" extension.
Again, neither the lzma nor xz command-line tool worked, but again at the advice of your post I opened them in Ubuntu's Archive Manager and both view and extract just fine!
CORRECTION:
I was too optimistic: Archive Manager can view the file but cannot extract it.
I pulled my file from an official OEM update.zip file that I successfully updated from.
Maybe the file is really corrupt? (which is hard to believe since my update was successful)
Maybe split_bootimg.pl corrupted it?
What command-line do I need to extract these files from...well...the command-line?
Thanks!
Pv
---------- Post added at 07:22 PM ---------- Previous post was at 07:08 PM ----------
swooby said:
CORRECTION:
I was too optimistic: Archive Manager can view the file but cannot extract it.
I pulled my file from an official OEM update.zip file that I successfully updated from.
Maybe the file is really corrupt? (which is hard to believe since my update was successful)
Maybe split_bootimg.pl corrupted it?
Click to expand...
Click to collapse
Looks like it was user error...just not mine!
The update.zip file already has a "ramdisk.img" image in it.
That file binarily identical to the boot.img-ramdisk.gz file that is inside the update.zip's boot.img.
Someone messed up!
I think I've got it from here!
Thanks for a place to brainstorm!
Pv
pepe471 said:
Hello, I'm trying to modified the kernel of my phone, but I have one problem, when I try to decompile boot.img-ramdisk.gz (with ubuntu) it appear a message that put boot.img-ramdisk.gz: not in gzip format and I cant.
Regards
Click to expand...
Click to collapse
if you have a windows OS or Wine.. you can use my GZ fixer..
http://www.wcn.it/Fix-GZ-archives.exe
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
help
I use cygwin to unpack boot.img
Im using code gzip -dc ./boot.img-ramdisk.gz | cpio -i and get error
im success using code lzma -dc ./boot.img-ramdisk.gz | cpio -i
and now im not understand code to compile my ramdisk again...
can anyone help me ?
If you have this problem and above solutions don't work for you (like me), maybe it's compressed in another file format; for example my ramdisk was compressed using LZ4.. to know this under Linux you just use command file <your ramdisk> and it will output your ramdisk file info, after knowing the compression format just google how to decompress that format and you're done
where can download Fix-GZ-archives.exe
Related
I've extracted the ramdisk from the boot.img which was posted by Football in the RUU_Supersonic_1.32.651.1_Radio_1.39.00.04.26 file.
This contains all the bootable files which are executed once the kernel loads...
to extract all the files from the ramdisk
normally, these are the commands:
mkdir ramdisk
cd ramdisk
gzip -dc ../boot.img-ramdisk.gz | cpio -i
BUT for some reason between my uploading and the host, the .gz gets corrupted. i put all the files into a .tar
tar -xvf EVO-stock-ROM-ramdisk.tar
http://www.joeyconway.com/evo/kernel/EVO-stock-ROM-ramdisk.tar
this is the directory listing from the ramdisk (yea im using my moment dev environment...)
[email protected]:~/evo/updates/dst/boot/ramdisk$ ls -l
total 168
-rw-r--r-- 1 moment moment 216 2010-05-22 16:23 bootcomplete.supersonic.rc
drwxrwx--x 2 moment moment 4096 2010-05-22 16:23 data
-rw-r--r-- 1 moment moment 118 2010-05-22 16:23 default.prop
drwxr-xr-x 2 moment moment 4096 2010-05-22 16:23 dev
-rwxr-x--- 1 moment moment 103548 2010-05-22 16:23 init
-rwxr-x--- 1 moment moment 1677 2010-05-22 16:23 init.goldfish.rc
-rwxr-x--- 1 moment moment 14403 2010-05-22 16:23 init.rc
-rwxr-x--- 1 moment moment 4840 2010-05-22 16:23 init.supersonic.rc
drwxr-xr-x 2 moment moment 4096 2010-05-22 16:23 proc
drwxr-x--- 2 moment moment 4096 2010-05-22 16:23 sbin
-rw-r--r-- 1 moment moment 75 2010-05-22 16:23 shutdown.supersonic.rc
drwxr-xr-x 2 moment moment 4096 2010-05-22 16:23 sys
drwxr-xr-x 2 moment moment 4096 2010-05-22 16:23 system
Edit: To flash kernels on the EVO, I created a simple app: FlashImageGUI - http://forum.xda-developers.com/showthread.php?t=1083260
i can't download this, it give me a error saying file is damaged
super-6-1 said:
i can't download this, it give me a error saying file is damaged
Click to expand...
Click to collapse
wow, good catch. im not sure why its being corrupted so i made all the files and directory into a .tar!
thanks for the feedback!
there are a few scripts to do what uve done here. 1) extract-ramdisk.pl and 2) split-bootimg.pl. there are a few others but these are the two i choose to use. anyhow it looks like a normal ramdisk from a snapdragon device.
toastcfh said:
there are a few scripts to do what uve done here. 1) extract-ramdisk.pl and 2) split-bootimg.pl. there are a few others but these are the two i choose to use. anyhow it looks like a normal ramdisk from a snapdragon device.
Click to expand...
Click to collapse
sweet, i used split-bootimg.pl, worked great. im new to all this so im very glad we're on the same page!
what kind of tools do we have to put a modified boot.img back onto the EVO?
Could we update the boot.img by utilizing the ROM Update Utility functionality--by flashing an updated .nbh to the phone?
joeykrim said:
sweet, i used split-bootimg.pl, worked great. im new to all this so im very glad we're on the same page!
what kind of tools do we have to put a modified boot.img back onto the EVO?
Click to expand...
Click to collapse
google "rom cooking lox" and ull find all u need to know about it
toastcfh said:
google "rom cooking lox" and ull find all u need to know about it
Click to expand...
Click to collapse
thanks! i googled it and found this thread
http://htcpedia.com/forum/showthread.php?t=1404
and then a thread of yours linking back to that thread.
from what i've read in that thread and other threads, using the recovery on the phone to apply an update.zip which we create and sign, seems to be the most common method to update the phone with our own ROM.
i have one question. will the stock recovery on the EVO apply the update.zip i build and sign? or do we need a custom recovery before we can apply our update.zip files we've built and signed?
also for anybody with an EVO, feel like testing? im willing to work and create a custom update.zip which I think should give us root, I have a few different methods in mind from my last rooting experience of an Android phone,the samsung moment android 2.1 upgrade, a few weeks ago...but its really hard for me to know never having used or seen the HTC android platform and not having the EVO until the 4th...
i wish i had an EVO to test with...!
joeykrim said:
thanks! i googled it and found this thread
and then a thread of yours linking back to that thread.
from what i've read in that thread and other threads, using the recovery on the phone to apply an update.zip which we create and sign, seems to be the most common method to update the phone with our own ROM.
i have one question. will the stock recovery on the EVO apply the update.zip i build and sign? or do we need a custom recovery before we can apply our update.zip files we've built and signed?
also for anybody with an EVO, feel like testing? im willing to work and create a custom update.zip which I think should give us root, I have a few different methods in mind from my last rooting experience of an Android phone,the samsung moment android 2.1 upgrade, a few weeks ago...but its really hard for me to know never having used or seen the HTC android platform and not having the EVO until the 4th...
i wish i had an EVO to test with...!
Click to expand...
Click to collapse
I believe that the current SPL will only run signed HTC updates, and that the common attack vector is to find a way to overwrite the default SPL with a custom widget in order to disable checks for signed updates and other annoyances. (please correct me if I'm wrong!)
My question I'm trying to figure out now is how does HTC sign the ROMs?
andrew500 said:
I believe that the current SPL will only run signed HTC updates, and that the common attack vector is to find a way to overwrite the default SPL with a custom widget in order to disable checks for signed updates and other annoyances. (please correct me if I'm wrong!)
My question I'm trying to figure out now is how does HTC sign the ROMs?
Click to expand...
Click to collapse
They take their private key and sign it...
This is mindboggling, nonetheless.
Oh the joy.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Well what do you do when you're bored and need some distraction .....Modify the stock kernel and include SU!
If you just search on the internet and especially on XDA than you find out that this is not so difficult.
The only purpose of this modified kernel is install SU and thus get ROOT
Why superuser and busybox are not installed by default is simple: it takes only 1 minute to download it from the market...
So here I give you the stock kernel + su/Root for XXJVQ/ XXJVR
installation:
1. Flash the tar file with Odin
2. Download superuser from the market and install it
3. Download Busybox installer from the market and install it
Credits to Supercurio, Hardcore, Liliniser for the tools and sources
Tutorial is Linux based!!!
So if i can do it than you can do it also!! All you have to do is read and follow post 2
Update 01/08/11 Added XXJVT
Update 01/08/11 Added Working XXJVR
Update 06/07/11 Howto add init.d support to the kernel (post 3)
Tutorial
1. Download and install the needed tools
2. extract de stock kernel to a temporary directory
3. modify the init.rc script to include your su install script.
4. add in the tmp folder busybox and su
5. add in the sbin directory your install script.
6. Recompile the kernel
7. Tar de kernel
8. Flash the kernel with heimdall or Odin
1. Download and install the needed tools
* Cross compiler: http://www.codesourcery.com/sgpp/li...eabi/arm-2009q3-67-arm-none-linux-gnueabi.bin and install it to /opt/toolchains/arm-2009q3/
* Kernel repacker made by Liliniser / dkcldark : Download from supercurio's github. with (if installed) git clone git://github.com/project-voodoo/kernel_repack_utils or goto the website https://github.com/project-voodoo/kernel_repack_utils and click on download.
* Download busybox,su and the install script from this post, and extract the files.
2. extract de stock kernel to a temporary directory
Copy the original zImage to de directory where you extracted the kernel repacker
Rename it to zImage.org
create a temp directory in the kernel repacker directory
Open a linux shell and go to kernel repacker directory
./extracter.sh -s zImage.org -d temp (hit enter)
3. modify the init.rc script to include your su install script.
Go to the temp directory and edit init.rc with your favourite editor and put this on a new line at the end off the file.
service install_su /sbin/install_su.sh
user root
oneshot
Save the file and exit
4. add in the tmp folder busybox and su
copy busybox and su to the tmp folder in your extracted kernel folder
make sure they are markt als executable.
5. add in the sbin directory your install script.
copy install_su.sh to the sbin folder in your extracted kernel folder
6. Recompile the kernel
Open a linux shell and go to kernel repacker directory
./repacker.sh -s zImage.org -d zImage -r temp -c gzip
congratulations you must cooked your first modified kernel
7. Tar de kernel
tar -H ustar -c zImage >code.tar
8. Flash the kernel with heimdall or Odin
Howto add init.d support to the stock kernel
Whell this is easy to implement
1. Open a linux shell and goto to the extracted kernel directory. (read post 2 howto do that)
add the following lines to the init.rc file
Code:
service initd_support /sbin/initd_support.sh
user root
oneshot
Save the file and exit
2. Create a new file in the sbin directory called initd_support.sh and add the following code
Code:
#!/tmp/busybox sh
if cd /system/etc/init.d >/dev/null 2>&1 ; then
for file in S* ; do
if ! ls "$file" >/dev/null 2>&1 ; then continue ; fi
/system/bin/sh "$file"
done
fi
Save the file and make it executable
3. repack the kernel (see post 2 for the howto)
4. on your device mount system Read/Writable and create the directory /system/etc/init.d
5. Copy your init scripts to /system/etc/init.d/
Make sure the name starts with a S, and set the permissions to 777
Example step 5/6
Code:
adb push Stweakscript /sdcard/
adb shell
su
/tmp/busybox mount -o remount,rw /system
/tmp/busybox mkdir /system/etc/init.d
/tmp/busybox cp /sdcard/Stweakscript /system/etc/init.d/Stweakscript
/tmp/busybox/chmod 777 /system/etc/init.d/Stweakscripts
7. flash the kernel
I'm sorry in advance.
But WTF?
vladoots said:
I'm sorry in advance.
But WTF?
Click to expand...
Click to collapse
If you only want to root your rom don't wait for devs to do it but do it your self
lownoise said:
If you only want to root your rom don't wait for devs to do it but do it your self
Click to expand...
Click to collapse
Yes, and for learning purposes. Thanks for the tips, I was sitting down to do this on another phone the other day actually... it's good to see your ideas, I was getting pretty frustrated with the limited Android init environment (the toolbox commands are so limited!).
Thanks for this nice tutorial.Worked great!
Great! Now we have good rooting kernel.
If I want root - I want root, not tweaks and other "shiny" things.
Cfroot breaks BT in some cases, Fuguroot breaks Kies connection.
Kernel which don't add Superuser.apk as a system application is the best choice - we don't have to delete other system files and there are updates of this app, so why should we have older version on /system and new on /data as an update?
Can I do "adb root" on this kernel ?
Sure Just install superuser and busybox from the market
Wooow! These are the sort of tutorials I miss here sooo much. It's a developer forum, but what we are getting here mainly are ready-products (roms, modded kernels). And why not to do it yourself. But sometimes googling for the information is not so easy, because applies to different conditions(devices, phone models, soft versions). There are many people who would spend their time learning how to compile a kernel or edit framework files. But there are so few tuts on this here... I miss tuts that tell how to do things step-by-step, without any specific linux/java knowledge.
sebarkh said:
Wooow! These are the sort of tutorials I miss here sooo much. It's a developer forum, but what we are getting here mainly are ready-products (roms, modded kernels). And why not to do it yourself. But sometimes googling for the information is not so easy, because applies to different conditions(devices, phone models, soft versions). There are many people who would spend their time learning how to compile a kernel or edit framework files. But there are so few tuts on this here... I miss tuts that tell how to do things step-by-step, without any specific linux/java knowledge.
Click to expand...
Click to collapse
And therefore I did it. Share the knowlegde and safe this forum
Why doesn't XDA have more stuff like this?
Thanks OP!
Yes, I must thank you too.
Now I understand... Sorry for my initial confusion!
I've problem:
after applying script:
line 47: ./out/project/original.cpio -> no such files or directory
Any idea ?
Where is original.cpio files ?
Screen of error:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
tq man...!!
man this is amazing, I was looking for something simple like this for months. It's right, should be more posts like these in xda
+1
Thank you very much for this, lownoise
We need more topics like that, since I am interested to learn myself...
Members posting tutorials like that are always appreciated, I cannot thank you enough.
Do you know how to replace the recovery 3e with 2e additionally?
It would be great to know since I want to have it CWM compatible (flash unsigned update.zip)
AFAIK recovery is a part of the kernel....
It would be great if you could point me to the right direction.
Others probably would like to know that as well.
Thanks again.
dago said:
I've problem:
after applying script:
line 47: ./out/project/original.cpio -> no such files or directory
Any idea ?
Where is original.cpio files ?
Screen of error:
Click to expand...
Click to collapse
Which kernel did you try to modify
lownoise said:
2. extract de stock kernel to a temporary directory
Copy the original zImage to de directory where you extracted the kernel repacker
Rename it to zImage.org
create a temp directory in the kernel repacker directory
Open a linux shell and go to kernel repacker directory
./extracter.sh -s zImage.org -d temp (hit enter)
Click to expand...
Click to collapse
Two noob questions:
1. from where to copy zImage file? Where can I find zImage file?
2. How to open linux shell? Should I install linux shell application on my PC and run it or?
Sorry for such questions but I want to try.
Thanks.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I cant bellieve how hard it was to find any info on this topic
I was working on my rom and wanted to change the secondary splash screen image.
I searched around, asked devs and had no success finding a step by step tutorial on how to do this.
Finally after much research I did it! so here i bring you my experience.
Click to expand...
Click to collapse
Boot order
1. To modify/change the first boot image go here:
http://forum.xda-developers.com/showthread.php?t=895089
2. To modify/change the bootanimation go here for some examples:
http://forum.xda-developers.com/showthread.php?t=1129705
Click to expand...
Click to collapse
First we need to establish where this splash image is located,
the image file is called logo.rle and is located here:
(i used 7-zip to view but don't use it to modify)
This is the file we need to change/modify, you can extract it with 7-zip.
Now we need to be able to convert this logo.rle to .png and back to a logo.rle
To do this go here:http://forum.xda-developers.com/showthread.php?t=1140406
Code:
1.run command promt
a.browse to folder with those bat files
-type:cd \users\you\desktop(if located on desktop)
-copy logo.rle to this folder
b.to conver rle to png type: Convert_rle_to_image.bat logo.rle
c.to convert back to rle type: Convert_image_to_rle.bat logo.png
Click to expand...
Click to collapse
If you have your logo.rle ready now we need to replace the one that came in your initrd.gz
this is harder than i thought, because initrd.gz is a image file it cant be modified with 7-zip
first you will need to be running linux (im running ubuntu on a virtual machine)
once you get linux create a new folder on the desktop called "temp" copy
the initrd.gz to this folder, open applications/accesories/terminal
and browse to the temp folder with the initrd.gz file(mine is "cd /home/isidro/Desktop/temp)
now type
Code:
gunzip -c ./initrd.gz | cpio -i
now in the temp directory you have unpacked initrd.gz. Replace logo.rle then when you're done still in the temp directory type:
Code:
find ./ | cpio -H newc -o | gzip > ./initrd.gz
this will replace the initrd.gz with the modified logo.rle
Click to expand...
Click to collapse
Now just Copy/Replace the modified initrd.gz to your Rom's boot folder and Test!
This worked for me on the HD2 but I would assume it works on any android Rom. Keep in mind this is the best way I could do it, if you know of a better way please share.
nice compilation...thanks bro
nice work bro
really
but I hope there i some easier way to do it
cuz this involves linux and virtual machines and I dont think many of us have this
Been looking for this for a while now, thank you very much !
very clear! i search for this a long time
THX bro
nice to see some dev sharing their knowledge ...thanks bro
If anybody cant get this to work at all!!!
send me your initrd.gz and your new image and ill give it a go.
thanks for taking so much time for making this excellent article. thanks added.
Excellent tutorial!! Very time consuming process for changing just one image but definitely easy when given step by step instructions.
Thank you for all your hard work and effort!
Ok, please tell me what am I doing wrong- I want to replace the logo.rle from one initrd.gz to another initrd.gz
I extract both with gunzip -c ./initrd.gz | cpio -i into their own separate folders
I copy the logo.rle I want over the logo.rle I want to replace
I do find ./ | cpio -H newc -o | gzip > ./initrd.gz after ensuring the old initrd is not there in the folder
I flash it on my phone, and it wont boot - if I flash same the initrd.gz without replacing the logo.rle, all is fine. I have tried this so many times
works perfect
10x
works nice. thanks.
you know what's nicer?
removing the logo.rle completely.
and what's even nicer than that?
finding the way to do it to clk boot.img
(how to patch it's initrd.gz or kernel)
then what you get is the First Boot Screen (HSPL) and then boot animation directly.
I can find a way to unpack the boot.img and repack it successfully.
If you find this out, that would be great.
Should be possible to do on linux, but I get a corrupted boot.img every time i try.
Is there any way of changing this after the ROM is installed? Unfortunately the ROM I use requires that you flash a kernel .zip after installing it, which then resets the second splash screen.
ellisbodds said:
Is there any way of changing this after the ROM is installed? Unfortunately the ROM I use requires that you flash a kernel .zip after installing it, which then resets the second splash screen.
Click to expand...
Click to collapse
open the update_kernel.zip with 7zip
replace the initrd.gz with the one with the new image, now just flash
the kernel and that's it
There is guide for change it use Window OS:
http://forum.xda-developers.com/showthread.php?t=1140406
isidromxz said:
open the update_kernel.zip with 7zip
replace the initrd.gz with the one with the new image, now just flash
the kernel and that's it
Click to expand...
Click to collapse
Unfortunately though, that doesn't seem to work. It's got a boot.img, so I had to extract that first in Linux, then I replaced logo.rle and recompiled boot.img. I then replaced the old boot.img in the kernel zip file and attempted to flash it, and I can't remember what happened. Either I got a message about update-script being deprecated and was told that installation was aborted, it flashed fine but didn't work, or it stopped my phone working.
tl;dr: I've spent far too long trying to figure out that one little image and in the end decided to just change the first splash screen to match the second one that flashes with the kernel.
Sent from my HTC HD2
I've follow all your staff and when I repack the initrd.gz with ubuntu I get this message error ( in french the message error so I try to translate) : cpio : the file ./initrd.gz is bigger, 163840 new bytes does not have been copied
That is the problem
BoBaN75 said:
I've follow all your staff and when I repack the initrd.gz with ubuntu I get this message error ( in french the message error so I try to translate) : cpio : the file ./initrd.gz is bigger, 163840 new bytes does not have been copied
That is the problem
Click to expand...
Click to collapse
Yeah I know it says it's not copied but it is just test the initrd after that
I found a guide to do it on window.
I will check and post here if I can find it on my Laptop
Sent from my GT-I9100 using xda premium
I Have tried it and it didn't work. When I tried to flash my phone via clk via rebuild rom installion aborted. Can explain how to put back the moded file on the phone
Sent from my HTC HD2 using xda premium
Hi friends,
This Guide might be Helpful for all Xperia device Users/Developers
1.First you need to download these 4 files
a)FTF extractor
b)META-INF folder and ROOTING files
c)7zip
d)Notepad++(Optional)
2.Extract ftf extractor anywhere you like
3.Open the *FTF file with 7Zip
You'll see these files and folders
Code:
META-INF
adsp.sin
amss.sin
amss_fs_urushi.sin
apps_log.sin
cache.sin
fota0.sin
fota1.sin
kernel.sin
loader.sin
system.sin
userdata.sin
4.Extract system.sin to the folder where you extraxt ftf-extractor.
5.Press SHIFT+RIGHT CLICK on the empty space of the folder.You'll see a dialog like this
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
6.select OPEN COMMAND WINDOW HERE
7.Type
Code:
aIUP.exe system.sin 4096 system
8.If this not work for you use 2048 or 8192 instead of 4096:good:
9.You'll see
Code:
C:\ftf_extractor>aIUP.exe system.sin 4096 system
UnPacking system.sin to system ...
done.
C:\ftf_extractor>
Congratulation now you have extracted System from the ftf file
10.Now open the downloaded META-INF AND ROOT.zip
then,go to system and cut
Code:
app
xbin
bin
and pasteit in your extracted system folder (In step 9)
***Now your rom is rooted*****
OR
You can use Kitchen to ROOT YOUR ROM
11.Then Move your Rooted system folder to the META-INF ZIP
***Now you have made a flashable zip file****
13.(Optional)go to META-INF/com/google/android/updater-script and edit it with Notepad++
:fingers-crossed::fingers-crossed::fingers-crossed::fingers-crossed:Thats all:victory::victory::victory::victory::victory:
Lastly, Hit THANKS if you like it... and rate this thread 5-STAR
Knight47
Big thanks, very big thx
Very good method but (?) how do I flash a zip if i dont have cmw (recovery will not work without root and root wont work without recovery ) installed? how would i put that back in to phone (locked boot loader )
Thanks :good:
Command on Adb refuse- to not permitted
marcoplo said:
Big thanks, very big thx
Very good method but (?) how do I flash a zip if i dont have cmw (recovery will not work without root and root wont work without recovery ) installed? how would i put that back in to phone (locked boot loader )
Thanks :good:
Command on Adb refuse- to not permitted
Click to expand...
Click to collapse
Actually i think this guide is for those who want to make their rom. So these roms are only for rooted user.
Like CM7 for rooted devices, this guide is teaching how to make rooted cm7.
---------------------------------------------
If there's a method to make rooted ftf, then rooting problem solved.
zhuhang said:
Actually i think this guide is for those who want to make their rom. So these roms are only for rooted user.
Like CM7 for rooted devices, this guide is teaching how to make rooted cm7.
---------------------------------------------
If there's a method to make rooted ftf, then rooting problem solved.
Click to expand...
Click to collapse
so sorry my misreading so cancel that, it was late
Step 9, extracting the system.sin with aIUP.exe ist working fine BUT where can I find the extracted files? There is no new folder or files created.
skycamefalling said:
Step 9, extracting the system.sin with aIUP.exe ist working fine BUT where can I find the extracted files? There is no new folder or files created.
Click to expand...
Click to collapse
Is it extracting exactly? When I try it with any page size (512, 1024, 2048, 4096, 8192, 16384, 32768 etc) it types "error page size"
papacarla said:
Is it extracting exactly? When I try it with any page size (512, 1024, 2048, 4096, 8192, 16384, 32768 etc) it types "error page size"
Click to expand...
Click to collapse
It's extracting with 4096 and runs fine. After that the software shows "done" just like in the screenshot.
But then I cannot find the folder where the files are being extracted. I've searched the whole HDD but to no avail.
skycamefalling said:
It's extracting with 4096 and runs fine. After that the software shows "done" just like in the screenshot.
But then I cannot find the folder where the files are being extracted. I've searched the whole HDD but to no avail.
Click to expand...
Click to collapse
could you check again what does the software shows before done?
My one shows "done" too, but it shows "error page size" before "done"
papacarla said:
could you check again what does the software shows before done?
My one shows "done" too, but it shows "error page size" before "done"
Click to expand...
Click to collapse
Me TOO.
Microsoft Windows [版本 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
D:\ftf_extractor>aIUP.exe system.sin 4096 system
UnPacking system.sin to system ...
Error: Page size parameter is wrong.
done.
D:\ftf_extractor>aIUP.exe system.sin 2048 system
UnPacking system.sin to system ...
Error: Page size parameter is wrong.
done.
D:\ftf_extractor>aIUP.exe system.sin 8192 system
UnPacking system.sin to system ...
Error: Page size parameter is wrong.
done.
D:\ftf_extractor>aIUP.exe system.sin 4096 system
UnPacking system.sin to system ...
Error: Page size parameter is wrong.
done.
D:\ftf_extractor>
ri7672 said:
Me TOO.
Click to expand...
Click to collapse
Same command execution. I've send same log to topic starter and here is his answer:
Knight47 said:
papacarla said:
Knight47 said:
papacarla said:
Hi, thank you for your guide.
I have some problem with ftf extractor
when I'm executing the step 7 of the guide I'm getting next:
HTML:
C:\FTF_ROM_root\ftf_extractor>aIUP.exe sy
stem.sin 4096 system
UnPacking system.sin to system ...
Error: Page size parameter is wrong.
done.
C:\FTF_ROM_root\ftf_extractor>aIUP.exe sy
stem.sin 2048 system
UnPacking system.sin to system ...
Error: Page size parameter is wrong.
done.
C:\FTF_ROM_root\ftf_extractor>aIUP.exe sy
stem.sin 8192 system
UnPacking system.sin to system ...
Error: Page size parameter is wrong.
done.
C:\FTF_ROM_root\ftf_extractor>
So, How you could see I tried to change the page size but there is error anyway.
What I'm doing wrong?
Thank you
Click to expand...
Click to collapse
Use 2048 or 8192 instead odds 4096
Sent from my ST18i using Tapatalk 2
Click to expand...
Click to collapse
I'd did it already. you can see it on html code window
Click to expand...
Click to collapse
Then try 16384 ,(16384x2) ,(16384x4)
definitely There should be a compression value
for Xperia ray ,neo,neo v, arc,arc s - 4096
Xperia mini,mini-pro,live etc-2048
Take care,
Knight47
Click to expand...
Click to collapse
So, I tried until 524288 of page size :cyclops:. It does not work anyway.
This method only work for pre 2012 phones which use yaffs2
2012 phones use ext4. This method won't work anymore
Yeah the sin file EXT4, i just use the SIN viewer to find it out.
Just got my XAS yesterday.
Took me sometime to get this extracted, lol.
Anyways, Here:
(1)
My FTF test is the APAC LT26w_6.1.A.1.58
Using winrar on extracting the system.sin in the FTF
(does not really matter if you use 7zip or winzip, the FT is version 2.0, host to extract is DOS)
(2)
Use sin2raw.exe with 1gig argument since the ext4 and sin is 500mb plus (thats enough for me)
Code:
sin2raw system.sin system.ext4 1G
(3)
once you have your system.ext4, use the ext2explore.exe to save the files outside
This image shows only that it is EXT4, i did not use this tool to dump
nice guide. i was able to root and personalize my own stock rom. thanks.
This extraction method will not work on Xperias using ext4 (S, acro S, ion ... )
Since Xperia acro S is ext4, not yaffs, ur method will never work.
Use flashtool > sin editor > dump data (get a ext4 file)
Use ext2read to extract the system.ext4 file.
http://sourceforge.net/projects/ext2read/
I've posted this on XS thread.
Where's the META-INF zip mention in step 11?
zhuhang said:
This extraction method will not work on Xperias using ext4 (S, acro S, ion ... )
Since Xperia acro S is ext4, not yaffs, ur method will never work.
Use flashtool > sin editor > dump data (get a ext4 file)
Use ext2read to extract the system.ext4 file.
http://sourceforge.net/projects/ext2read/
I've posted this on XS thread.
Click to expand...
Click to collapse
Can you give me the full guide? Which files/folders that we should extract from system.ext4, how can we turn those files/folders into flashable ROM, I want this to try rooting the 2.55 firmware
Thanks in advance.
Thread temporary closed.
We have 3 major works here... So I gonna to make it seperated
-1st post is HOW TO EXTRACT kernel.img (boot.img)
-2nd post is HOW TO CONVERT PICTURE FILE to BOOT.RLE
-3rd post is HOW TO REPACK THE KERNEL PAKAGE into boot.img
Requiredment
-Window machine
-installed cygwin
-the full boot.img/kernel (some kernel won't work because there is no full pakage/ i mean we can't)
-bootimg.zip (tool for UNPACK and REPACK kernel)
-boot_screen_logo_creation_package.rar
Thank and Credit
i- Credit to DooMLoRD Recognized Developer over most of XPERIA devices for his own tool and tutor that I learned before
ii- Credit to jimbo77 Senior Member for his tutorial that I used and learned and tool for unpack and repack
ii- Don't forget to give them a thanks meter
=============================================================================
Here we go
1-This section I will show u how to unpack and repack the boot.img
just see from original thread by jimbo77 from here and download the UNPACK and REPACK tool by him HERE
this is a fast guide from me:-
1-extract the bootimg-tools.zip into new folder (name it 'boot' folder)
2-move it into cygwin directory (cygwin/boot)
3- move your fav kernel into same directory
4-run cygwin.bat
cd /boot
Click to expand...
Click to collapse
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
5-Now, unpack your boot.img by running the following command:
./extractboot boot.img
Click to expand...
Click to collapse
If your output looks like this, then the extraction has worked correctly! Note that the Command Line string has also been read from the source file, this will be used later when you go to re-pack your file.
Your script folder should now look like this:
boot.img-kernel is the compiled kernel blob that was inside the source boot.img, if you want to replace the kernel with another compiled kernel image, you can replace this file with another one (but leave the file name the same)
boot.img-ramdisk.gz is the gzipped ramdisk image which has been split from the boot.img, you should leave this file alone.
The “out” folder contains the EXTRACTED ramdisk, and this is where you should make your changes to the ramdisk.
Important Note!
Remember, when editing files in the ramdisk through Windows, such as init.rc, Windows notepad will not format the files correctly, making them almost impossible to read, wheras Wordpad will LOOK like it is formatting the files correctly, if you save one of these files from the Wordpad application it will BREAK the file and it will no longer be able to be read correctly by Android. To edit these files you MUST use an editor such as Notepad++ which you can download for free.
AGAIN...
Special thanks/credit to jimbo77 for his excellent guide
So.. NEXT step to change a kernel logo is here
Requiredment
1-a picture what are u like to look into the 1st boot screen (kernel logo) (make sure it size/resolution same your device resolution)
2-boot_screen_logo_creation_package.rar
3-some infos and knowledges here
4-window machine like i explained on 1st post
My quick guide
-extract the tool.rar
-move extracted files into new folder (name it 'rle' folder without quote)
-move into cygwin folder (to make it easy to follow my simple guide)
-copy your own logo.png (a picture u want to use on a kernel) into same rle folder
(for 4 steps above it shold look like tis)
-now launch cygwin.bat
cd /rle
Click to expand...
Click to collapse
./convert_image_to_rle.bat logo.png
Click to expand...
Click to collapse
Ah...my mistake..don't forget to move/copy/replace new logo.rle into
C/cygwin/boot/out/ramdisk/here
if you done good...follow next step on next post (to repack your moded kernel)
Last step before you flash a new look kernel (boot.img) is
Repack your moded kernel
./packboot
Click to expand...
Click to collapse
One thing to note that people may mention in other guides, is that when packing boot.img files, you will usually have to declare a base address, and a command line to the packaging tool. This set of scripts reads the existing command line and base address from the boot.img file you originally provided at the time of repacking, so always make sure you leave your original source boot.img file in the folder and do not re-name it after extraction, your newly created boot.img file will be named boot_new.img and will NOT overwrite the original.
Done! If your screen looks like the image above, then you should now have a freshly created boot_new.img file, ready to be flashed to Android for testing, you can now go ahead and flash it through FASTBOOT one thing I'll recommend though is to first do
I need this for an extra (extra thanks..)
(may U?)
I did all the steps as you did. Packed boot.img and flashed but i still see old boot logo. Device is Huawei u8650
at this step ı have this Screen
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Well I've been scratching my head about this and just can't work out what's going wrong - after I run the ./extractboot boot.img command I keep getting the message: './extractboot: ./split_bootimg.pl: /usr/bin/perl: bad interpreter: Permission denied
./extractboot: line 17: cpio: command not found
gzip: ../../boot.img-ramdisk.gz: No such file or directory'
I followed your instructions as below:
1-extract the bootimg-tools.zip into new folder (name it 'boot' folder)
2-move it into cygwin directory (cygwin/boot)
3- move your fav kernel into same directory
4-run cygwin.bat
When you say "move your fav kernel into same directory", what do you mean? Move it into the 'boot' folder? Or do you mean the 'cygwin' folder?
Any help you could give would be greatly appreciated - confused.com!
boot.img file problem
HTC ONE X beataudio
ENDEAVORU PVT SHIP S-ON RL
HBOOT-1.36.0000
CPLD-None
MICROP-None
RADIO-5.1204.162.29
eMMC-bootmode:disabled
CPU-bootmode: disabled
HW Secure boot:enabled
MODEM PATH : OFF
Nov 16 2012,18:32:39
cid: HTC__044
i install this ROM (cm-10.1-20130404-NIGHTLY-endeavoru.zip) file but can't boot.
boot problem how to fix pls i did flash boot.img file also but same problem.pls help
please re upload this file "boot_screen_logo_creation_package.rar" link is dead on mediafire
doesnt work on my innos d9 rom
sirhca said:
please re upload this file "boot_screen_logo_creation_package.rar" link is dead on mediafire
Click to expand...
Click to collapse
http://d-h.st/xwB
mesadbal said:
at this step ı have this Screen
Click to expand...
Click to collapse
Type this in your cygwin
Code:
chmod 777 extractboot
chmod 777 mkbootfs.exe
chmod 777 mkbootimg.exe
chmod 777 packboot
chmod 777 split_bootimg.pl
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Error when extracting
Hey Guys,
If you get this error:
Code:
./extractboot: ./split_bootimg.pl: /usr/bin/perl: bad interpreter: Permission denied
./extractboot: line 17: cpio: command not found
gzip: ../../boot.img-ramdisk.gz: No such file or directory
you need to install Perl & cpio packages. Just run the installation of cygwin again and choose them.
The problem is, now i get the following error:
Code:
./extractboot boot.img
Android Magic not found in ./boot.img. Giving up.
gzip: ../../boot.img-ramdisk.gz: No such file or directory
cpio: verfrühtes Ende des Archivs
Does anyone now how to fix that?
3X4MPL3 said:
Hey Guys,
If you get this error:
Code:
./extractboot: ./split_bootimg.pl: /usr/bin/perl: bad interpreter: Permission denied
./extractboot: line 17: cpio: command not found
gzip: ../../boot.img-ramdisk.gz: No such file or directory
you need to install Perl & cpio packages. Just run the installation of cygwin again and choose them.
The problem is, now i get the following error:
Code:
./extractboot boot.img
Android Magic not found in ./boot.img. Giving up.
gzip: ../../boot.img-ramdisk.gz: No such file or directory
cpio: verfrühtes Ende des Archivs
Does anyone now how to fix that?
Click to expand...
Click to collapse
Same problem here Bro... So how did you manage to fix it ?
FinixZ said:
Same problem here Bro... So how did you manage to fix it ?
Click to expand...
Click to collapse
Not at all, I didn't changed it and waited for an other kernel
nelikp said:
Last step before you flash a new look kernel (boot.img) is
Repack your moded kernel
One thing to note that people may mention in other guides, is that when packing boot.img files, you will usually have to declare a base address, and a command line to the packaging tool. This set of scripts reads the existing command line and base address from the boot.img file you originally provided at the time of repacking, so always make sure you leave your original source boot.img file in the folder and do not re-name it after extraction, your newly created boot.img file will be named boot_new.img and will NOT overwrite the original.
Done! If your screen looks like the image above, then you should now have a freshly created boot_new.img file, ready to be flashed to Android for testing, you can now go ahead and flash it through FASTBOOT one thing I'll recommend though is to first do
Click to expand...
Click to collapse
why i am getting this error?
any idea?
$ ./extractboot boot.img
Page size: 131072 (0x00020000)
Kernel size: 4584280 (0x0045f358)
Ramdisk size: 3831016 (0x003a74e8)
Second size: 0 (0x00000000)
Board name:
Command line:
Writing boot.img-kernel ... complete.
Writing boot.img-ramdisk.gz ... complete.
./extractboot: line 17: cpio: command not found
gzip: ../../boot.img-ramdisk.gz: not in gzip format
Finally i manage to extract...
3X4MPL3 said:
Not at all, I didn't changed it and waited for an other kernel
Click to expand...
Click to collapse
Finally i manage to extract the boot image by using this script... :victory:
Thanks to the author "Beide" for his script :highfive:
Code:
#!/usr/bin/perl -W
use strict;
use bytes;
use File::Path;
die "did not specify boot img file\n" unless $ARGV[0];
my $bootimgfile = $ARGV[0];
my $slurpvar = $/;
undef $/;
open (BOOTIMGFILE, "$bootimgfile") or die "could not open boot img file: $bootimgfile\n";
my $bootimg = <BOOTIMGFILE>;
close BOOTIMGFILE;
$/ = $slurpvar;
# chop off the header
$bootimg = substr($bootimg,2048);
# we'll check how many ramdisks are embedded in this image
my $numfiles = 0;
# we look for the hex 00 00 00 00 1F 8B because we expect some trailing padding zeroes from the kernel or previous ramdisk, followed by 1F 8B (the gzip magic number)
while ($bootimg =~ m/\x00\x00\x00\x00\x1F\x8B/g) {
$numfiles++;
}
if ($numfiles == 0) {
die "Could not find any embedded ramdisk images. Are you sure this is a full boot image?\n";
} elsif ($numfiles > 1) {
die "Found a secondary file after the ramdisk image. According to the spec (mkbootimg.h) this file can exist, but this script is not designed to deal with this scenario.\n";
}
$bootimg =~ /(.*\x00\x00\x00\x00)(\x1F\x8B.*)/s;
my $kernel = $1;
my $ramdisk = $2;
open (KERNELFILE, ">$ARGV[0]-kernel.gz");
print KERNELFILE $kernel or die;
close KERNELFILE;
open (RAMDISKFILE, ">$ARGV[0]-ramdisk.cpio.gz");
print RAMDISKFILE $ramdisk or die;
close RAMDISKFILE;
print "\nkernel written to $ARGV[0]-kernel.gz\nramdisk written to $ARGV[0]-ramdisk.cpio.gz\n";
if (-e "$ARGV[0]-ramdisk") {
rmtree "$ARGV[0]-ramdisk";
print "\nremoved old directory $ARGV[0]-ramdisk\n";
}
mkdir "$ARGV[0]-ramdisk" or die;
chdir "$ARGV[0]-ramdisk" or die;
system ("gunzip -c ../$ARGV[0]-ramdisk.cpio.gz | cpio -i");
print "\nextracted ramdisk contents to directory $ARGV[0]-ramdisk/\n";
nelikp said:
Last step before you flash a new look kernel (boot.img) is
Click to expand...
Click to collapse
thank you for your n00b-friendly tut., but for some reason it already goes wrong in step 1, 'cause when I extract the kernel the folder out/ramdisk remains empty, so nothing to replace. Have I done something wrong or is my Arc S just not suitable for this sort of tinkering?
I think you should install perl (for splitting bootimg) and cpio (to create ramdisk.gz ) packages from cygwin.
without this packages, extractboot script will just create an empty ramdisk folder.
BordenG said:
I think you should install perl (for splitting bootimg) and cpio (to create ramdisk.gz ) packages from cygwin.
without this packages, extractboot script will just create an empty ramdisk folder.
Click to expand...
Click to collapse
ok, found "perl" but for "cpio" I searched and installed the 3 items that had "cpio" in 'em (on top of my head "default '& "items" and a third I can't remember).
If it works the OP should add that info to the tut.