FORUMS

Analysis & Opinion

Top Forum Discussions

boot.img-ramdisk.gz: not in gzip format

6 posts
Thanks Meter: 0
 
By pepe471, Junior Member on 1st September 2012, 05:10 PM
Post Reply Subscribe to Thread Email Thread
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
 
 
2nd September 2012, 11:29 AM |#2  
ruscan.calin's Avatar
Senior Member
Thanks Meter: 283
 
More
Quote:
Originally Posted by pepe471

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

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.ph...ck_Boot_Images
Last edited by ruscan.calin; 2nd September 2012 at 11:37 AM.
2nd September 2012, 01:36 PM |#3  
OP Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by ruscan.calin

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.ph...ck_Boot_Images

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
4th October 2012, 01:26 AM |#4  
Kaskade's Avatar
Senior Member
Thanks Meter: 36
 
More
Quote:
Originally Posted by ruscan.calin

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.ph...ck_Boot_Images

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/show....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/show...&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.
Last edited by Kaskade; 4th October 2012 at 01:28 AM.
The Following 10 Users Say Thank You to Kaskade For This Useful Post: [ View ]
1st November 2012, 07:19 PM |#5  
Deadly's Avatar
Recognized Contributor
Flag Bangalore
Thanks Meter: 4,001
 
Donate to Me
More
Quote:
Originally Posted by Kaskade

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/show....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/show...&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.

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
The Following 2 Users Say Thank You to Deadly For This Useful Post: [ View ]
1st February 2013, 07:36 AM |#6  
viijay4b7's Avatar
Senior Member
Flag Chennai
Thanks Meter: 357
 
More
Quote:
Originally Posted by Kaskade

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/show....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/show...&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.

Hi,

I am on Linux.
I have installed lzma on the home dir.
I don't know why I am getting Decode error.

vramaraj@hq1-up-swe-09:~/VIJAY/andriod/work3$ ls -lrt
total 239840
[SIZE="2]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/
[/SIZE]
vramaraj@hq1-up-swe-09:~/VIJAY/andriod/work3$
vramaraj@hq1-up-swe-09:~/VIJAY/andriod/work3/out/ramdisk$ ~/lzma -dc ../../boot.img-ramdisk.gz | cpio -i
/users/home40/vramaraj/lzma: Decoder error
cpio: premature end of archive
vramaraj@hq1-up-swe-09:~/VIJAY/andriod/work3/out/ramdisk$
The Following User Says Thank You to viijay4b7 For This Useful Post: [ View ]
30th November 2013, 03:22 AM |#7  
Member
Flag Seattle, WA
Thanks Meter: 14
 
More
Quote:
Originally Posted by Deadly

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

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 ----------

Quote:
Originally Posted by swooby

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?

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
Last edited by swooby; 30th November 2013 at 03:12 AM.
5th June 2014, 09:26 AM |#8  
Davy Bartoloni's Avatar
Junior Member
Flag Cuneo
Thanks Meter: 15
 
More
Quote:
Originally Posted by pepe471

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

if you have a windows OS or Wine.. you can use my GZ fixer..
http://www.wcn.it/Fix-GZ-archives.exe
The Following User Says Thank You to Davy Bartoloni For This Useful Post: [ View ]
10th June 2014, 09:35 AM |#9  
Senior Member
Flag Madiun
Thanks Meter: 146
 
More
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 ?
8th July 2015, 08:28 PM |#10  
Senior Member
Flag Buenos Aires
Thanks Meter: 237
 
Donate to Me
More
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
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes