[DEV TOOLS] - Pack & Repack Boot.img Files - for Windows USERS

Status
Not open for further replies.
Search This thread

kagedws6

Senior Member
Nov 5, 2008
576
238
Mullica Hill, NJ
You can go ahead and upload it to the googlecode site. This one has the necessary parts compiled to work for us.


http://dl.dropbox.com/u/70264484/mkbootimg

I tested it against the info from attn1 and it worked fine. Here are the commands again.

./mkbootimg --kernel kernelname --ramdisk ramdiskname --cmdline 'console=ttyHSL0,115200,n8 androidboot.hardware=qcom loglevel=0' --board presto --base 0x40200000 --ramdiskaddr 0x41400000 --output boot.img

dd if=/dev/zero of=boot.img bs=4096 count=1 oflag=append conv=notrunc

nevermind we needed a different mkbootimg file and additional commands for the Pantech Burst
 

Mlopik

Senior Member
Jun 6, 2012
942
607
Bystřice nad Pernštejnem
Boot.img

What should I do? I have installed: Perl,cpio. Please advice. :crying: :crying:

Code:
$ ./extractboot boot.img
./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
 

jimbo77

Inactive Recognized Contributor
Nov 2, 2010
2,191
2,948
Guatemala
Samsung Galaxy S23 Ultra
What should I do? I have installed: Perl,cpio. Please advice. :crying: :crying:

Code:
$ ./extractboot boot.img
./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

Have you renamed the kernel file to boot.img?

Sent from my SGS3... Yes I have it!!!!
 

Jeet Chowdhury

Senior Member
Oct 30, 2011
120
4
Kolkata, India
www.tweakjc.com
i got this error,

48974730.png
 

djsubtronic

Senior Member
Jun 16, 2010
2,512
586
Something seems to be wrong, I am able to unpack and repack successfully, however, when flashing back to my phone, I get a bootloop on the HTC screen (before boot animation even shows) and adb logcat doesn't even start. This happens even if I simply unpack and repack even without making changes. Any ideas?
 

_polimorph_

Senior Member
Jan 23, 2012
556
1,125
Jibou, Transilvania
Thank you Jimbo for the awesome tutorial.
When doing the following: Unpack-Edit-Pack the boot.img permissions are lost.
Enyone knows how to preserve original permissions?
 

jimbo77

Inactive Recognized Contributor
Nov 2, 2010
2,191
2,948
Guatemala
Samsung Galaxy S23 Ultra
Hey Polimorph!

Nice to see you around here!

What exactly is the issue you're experiencing? What Permission did you loose after editing the boot.img?

If you could be a bit more specific I can help you with the Kernel editing since I know you're learning to do so for the i9300 and I have experience due to my Kernel for this specific phone :)

Jimbo
 

_polimorph_

Senior Member
Jan 23, 2012
556
1,125
Jibou, Transilvania
Hey Polimorph!

Nice to see you around here!

What exactly is the issue you're experiencing? What Permission did you loose after editing the boot.img?

If you could be a bit more specific I can help you with the Kernel editing since I know you're learning to do so for the i9300 and I have experience due to my Kernel for this specific phone :)

Jimbo
Thanks for the warm wellcome.
You might know already that lately in MIUI there's a new daemon that's needs to start at boot in /system/xbin folder named "shelld". It's vital to run it for the themes engine. The CM10 kernels don't have the startup script embeded so I need to add it manually in the init.rc for every new kernel version I include in the ROM.
For this to be done I'm adding these lines at the end of the init.rc file after unpacking boot.img:
Code:
service shelld /system/xbin/shelld
	class main
.
I'm using Siyah's kernel in my latest builds. As you know this has it's own tweaking utility STweaks and the problem here it comes. After altering ramdisk and repacking the STweaks app no longer wants to recognize the kernel saying it's not supported. I've learned from Gokhanmoral that this behaviour is due to losing permissions while repacking boot.img.
This is my first experience ever with kernels so that's about all the information I know for now about this issue.
Can you figure out how can we keep permissions?
 

jimbo77

Inactive Recognized Contributor
Nov 2, 2010
2,191
2,948
Guatemala
Samsung Galaxy S23 Ultra
Why don't you attach the files you are using so I can take a look?

Based on what you are saying and also based on the behavior of STweaks a probable solution might be to check on STweaks app and see where that "Check for Siyah's kernel" lies and modify it to recognize your new boot.img

That's just a thought and it might need GM permission to modify it and redistribute. I'll take a look ok :)
 
  • Like
Reactions: _polimorph_

_polimorph_

Senior Member
Jan 23, 2012
556
1,125
Jibou, Transilvania
The file is boot.img from Siyah 1.8. To reproduce the issue just unpack, repack and flash the new repacked Siyah kernel.
Good ideea about modding STweaks, i'll have a look.
 

_polimorph_

Senior Member
Jan 23, 2012
556
1,125
Jibou, Transilvania
I switched to Linux. Can you post the tools needed for working under Linux? I think besides what you posted it's also needed mkbootfs.
Thanks.

---------- Post added at 07:05 PM ---------- Previous post was at 06:31 PM ----------

I used mkbootfs from the original thread, executed the scripts but getting bootloop. Any sugestions?
 

Zebwen

Retired Recognized Developer
Jun 11, 2009
231
112
twitter.com
Theft... He did not write this... I did.

Yay! I love it when people steal my work and claim it as their own!

http://www.freeyourandroid.com/guide/extract-edit-repack-boot-img-windows

Check out the date on the post. I am newbe5, this is my article. WORD. FOR. WORD.

Cheeky bastard didn't even take the time to re-write anything, just complete copy-paste.

Thanks.

Zeb / newbe5
 

pulser_g2

Admin Emeritus / Senior Recognized Developer
Nov 27, 2009
19,544
11,630
Status
Not open for further replies.

Top Liked Posts