Jump to content
sto1911

init.d feature to Swedish Spring

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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

[email protected]:~/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.

[email protected]:~/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):
[email protected]:~/Desktop/Swedish_Spring_RLS4b$ file boot-gen1.img-ramdisk.gz 

boot-gen1.img-ramdisk.gz: data

[email protected]:~/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

Share this post


Link to post
Share on other sites
the link to split_bootimage is dead, however i got it on my laptop:

[email protected]:~/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.

[email protected]:~/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):
[email protected]:~/Desktop/Swedish_Spring_RLS4b$ file boot-gen1.img-ramdisk.gz 

boot-gen1.img-ramdisk.gz: data

[email protected]:~/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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites
Right.... :)

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

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

OK, here's what I did:

[email protected]:~/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?


[email protected]:~/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.

[email protected]:~/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

[email protected]:~/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

[email protected]:~/dsixda-Android-Kitchen-e6e8ff5# file boot.img-ramdisk.gz

boot.img-ramdisk.gz: data

Share this post


Link to post
Share on other sites
OK, here's what I did:

[email protected]:~/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?


[email protected]:~/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.

[email protected]:~/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

[email protected]:~/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

[email protected]:~/dsixda-Android-Kitchen-e6e8ff5# file boot.img-ramdisk.gz

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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

:)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

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