Jump to content

Recommended Posts

Guest sto1911
Posted

Hi,

I wanted to add init.d feature to SS3/4 but the kitchen I use (dsixda) was unable to work with the boot.img. I sucessfully split the image into ramsdisk and kernel images however this did not lead to anywhere.

Can anyone help me?

Thanks in advance.

Guest t0mm13b
Posted
Hi,

I wanted to add init.d feature to SS3/4 but the kitchen I use (dsixda) was unable to work with the boot.img. I sucessfully split the image into ramsdisk and kernel images however this did not lead to anywhere.

Can anyone help me?

Thanks in advance.

This will help you :D

Guest kendon
Posted
This will help you :D

no it won't...

$ unpack-bootimg.pl boot.img 

Could not find any embedded ramdisk images. Are you sure this is a full boot image?

Guest t0mm13b
Posted
no it won't...

$ unpack-bootimg.pl boot.img 

Could not find any embedded ramdisk images. Are you sure this is a full boot image?
uhhhh.... he already extracted the boot/ramdisk from boot.img, he was asking how to extract the contents of the ramdisk... B) As per the linky above I posted...
gunzip -c ../your-ramdisk-file | cpio -i

:D

Guest kendon
Posted (edited)

the link to split_bootimage is dead, however i got it on my laptop:

kendon@nx:~/Desktop/Swedish_Spring_RLS4b$ split_bootimg.pl boot-gen1.img 

Page size: 2048 (0x00000800)

Kernel size: 3242164 (0x003178b4)

Ramdisk size: 113808 (0x0001bc90)

Second size: 0 (0x00000000)

Board name: 

Command line: 

Writing boot-gen1.img-kernel ... complete.

Writing boot-gen1.img-ramdisk.gz ... complete.

kendon@nx:~/Desktop/Swedish_Spring_RLS4b$ gunzip -c boot-gen1.img-ramdisk.gz | cpio -i


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

cpio: premature end of archive
it extracts something, but no archive (second line to show how 'file' output would look like for an actual archive):
kendon@nx:~/Desktop/Swedish_Spring_RLS4b$ file boot-gen1.img-ramdisk.gz 

boot-gen1.img-ramdisk.gz: data

kendon@nx:~/Desktop/Swedish_Spring_RLS4b$ file ../Swedish_Spring_RLS4b.zip 

../Swedish_Spring_RLS4b.zip: Zip archive data, at least v2.0 to extract

edit: very same happens for gen2 btw.

Edited by kendon
Guest t0mm13b
Posted
the link to split_bootimage is dead, however i got it on my laptop:

kendon@nx:~/Desktop/Swedish_Spring_RLS4b$ split_bootimg.pl boot-gen1.img 

Page size: 2048 (0x00000800)

Kernel size: 3242164 (0x003178b4)

Ramdisk size: 113808 (0x0001bc90)

Second size: 0 (0x00000000)

Board name: 

Command line: 

Writing boot-gen1.img-kernel ... complete.

Writing boot-gen1.img-ramdisk.gz ... complete.

kendon@nx:~/Desktop/Swedish_Spring_RLS4b$ gunzip -c boot-gen1.img-ramdisk.gz | cpio -i


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

cpio: premature end of archive
it extracts something, but no archive (second line to show how 'file' output would look like for an actual archive):
kendon@nx:~/Desktop/Swedish_Spring_RLS4b$ file boot-gen1.img-ramdisk.gz 

boot-gen1.img-ramdisk.gz: data

kendon@nx:~/Desktop/Swedish_Spring_RLS4b$ file ../Swedish_Spring_RLS4b.zip 

../Swedish_Spring_RLS4b.zip: Zip archive data, at least v2.0 to extract
edit: very same happens for gen2 btw.
Try this:
gzip -dc boot.img-ramdisk.gz | cpio -i

:D

Guest sto1911
Posted
Try this:

gzip -dc boot.img-ramdisk.gz | cpio -i
:D
I followed the link in the 2nd post but neither method worked.
# gzip -dc boot.img-ramdisk.gz | cpio -i


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

cpio: premature end of archive

Guest t0mm13b
Posted
I followed the link in the 2nd post but neither method worked.

# gzip -dc boot.img-ramdisk.gz | cpio -i


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

cpio: premature end of archive

Right.... :D

Sounds like you already have it g-unzipped....

Redo the operation again and use the above command...

Guest sto1911
Posted
Right.... :)

Sounds like you already have it g-unzipped....

Redo the operation again and use the above command...

OK, here's what I did:

root@android:~/dsixda-Android-Kitchen-e6e8ff5# ./unpack.pl boot.img #script from link found on web

Could not find any embedded ramdisk images. Are you sure this is a full boot image?


root@android:~/dsixda-Android-Kitchen-e6e8ff5# ./split_boot.pl boot.img #script found somewhere else

Page size: 2048 (0x00000800)

Kernel size: 3230060 (0x0031496c)

Ramdisk size: 113670 (0x0001bc06)

Second size: 0 (0x00000000)

Board name:

Command line:

Writing boot.img-kernel ... complete.

Writing boot.img-ramdisk.gz ... complete.

root@android:~/dsixda-Android-Kitchen-e6e8ff5# gzip -dc boot.img-ramdisk.gz | cpio -i


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

cpio: premature end of archive

root@android:~/dsixda-Android-Kitchen-e6e8ff5# gunzip -c boot.img-ramdisk.gz | cpio -i


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

cpio: premature end of archive

root@android:~/dsixda-Android-Kitchen-e6e8ff5# file boot.img-ramdisk.gz

boot.img-ramdisk.gz: data

Guest t0mm13b
Posted
OK, here's what I did:

root@android:~/dsixda-Android-Kitchen-e6e8ff5# ./unpack.pl boot.img #script from link found on web

Could not find any embedded ramdisk images. Are you sure this is a full boot image?


root@android:~/dsixda-Android-Kitchen-e6e8ff5# ./split_boot.pl boot.img #script found somewhere else

Page size: 2048 (0x00000800)

Kernel size: 3230060 (0x0031496c)

Ramdisk size: 113670 (0x0001bc06)

Second size: 0 (0x00000000)

Board name:

Command line:

Writing boot.img-kernel ... complete.

Writing boot.img-ramdisk.gz ... complete.

root@android:~/dsixda-Android-Kitchen-e6e8ff5# gzip -dc boot.img-ramdisk.gz | cpio -i


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

cpio: premature end of archive

root@android:~/dsixda-Android-Kitchen-e6e8ff5# gunzip -c boot.img-ramdisk.gz | cpio -i


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

cpio: premature end of archive

root@android:~/dsixda-Android-Kitchen-e6e8ff5# file boot.img-ramdisk.gz

boot.img-ramdisk.gz: data
Ok... LAST TRY:
cat boot.img-ramdisk.gz | cpio -i

Guest sto1911
Posted
Ok... LAST TRY:

cat boot.img-ramdisk.gz | cpio -i
Many similar lines: :)
cpio: Malformed number K?%`y

cpio: Malformed number ?%`y^

cpio: Malformed number ?%`y^

cpio: Malformed number

cpio: Malformed number

cpio: Malformed number

cpio: Malformed number

cpio: Malformed number

cpio: Malformed number

cpio: Malformed number

cpio: Malformed number

cpio: Malformed number

cpio: Malformed number

cpio: premature end of archive

Guest kallt_kaffe
Posted

Sorry for the trouble. The ramdisk is in lzma format. I switched the kernel to use lzma ramdisk when I ran into trouble with boot.img becoming to large. I think it was when experimenting with Clockwork. It's not needed to be like that anymore but I never switched back.

I propably should go back to gzip for the ramdisk if I ever make a RLS5.

Guest t0mm13b
Posted
Many similar lines: :)

cpio: Malformed number K?%`y

cpio: Malformed number ?%`y^

cpio: Malformed number ?%`y^

cpio: Malformed number

cpio: Malformed number

cpio: Malformed number

cpio: Malformed number

cpio: Malformed number

cpio: Malformed number

cpio: Malformed number

cpio: Malformed number

cpio: Malformed number

cpio: Malformed number

cpio: premature end of archive
F**kin 'ell... ok... LAST LAST TRY....
cat boot.img-ramdisk.gz | gzip -dc | cpio -i

Guest sto1911
Posted
Sorry for the trouble. The ramdisk is in lzma format. I switched the kernel to use lzma ramdisk when I ran into trouble with boot.img becoming to large. I think it was when experimenting with Clockwork. It's not needed to be like that anymore but I never switched back.

I propably should go back to gzip for the ramdisk if I ever make a RLS5.

Thanks for the info. Is there a way to extract from an lzma archive?

Posted
Thanks for the info. Is there a way to extract from an lzma archive?

lzma -d

Guest sto1911
Posted
lzma -d

# lzmainfo zImage


zImage

Uncompressed size:			 60565749774 MB (63507791635128320 bytes)

Dictionary size:			   14 MB (2^23 bytes)

Literal context bits (lc):	 0

Literal pos bits (lp):		 0

Number of pos bits (pb):	   0


# lzma -d zImage						

zImage:  unknown suffix -- unchanged

:)

Guest kallt_kaffe
Posted

Kernel is gzip, ramdisk is lzma. And btw, kernels aren't normal gzip as they are "self-decompressing". Why do you want to decompress the kernel anyway? The complete source is on my github.

Guest kendon
Posted
Kernel is gzip, ramdisk is lzma. And btw, kernels aren't normal gzip as they are "self-decompressing". Why do you want to decompress the kernel anyway? The complete source is on my github.

the task here is to modify the ramdisk to support init.d scripts. same results here with lzma, not working. are we sure that split_bootimg does its job correctly?

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.