I'm trying to figure out how to unpack and repack the evo's boot image. I found the "HOWTO: Unpack, Edit, and Repack Boot Images" thread in another forum using the search function but when I tried to use the scripts to unpack the boot.img file I received an error as follows:
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.
The HOWTO thread I found mentioned that this was likely a second stage loader but indicated that it has not been seen on any system to date. This second stage loader had apparently only been defined in the mkbootimg.h file but not implemented as of the time this how to was written.
Can anyone provide a link to instructions on how to extract and repack the boot.img for the EVO? I'd like to make a few changes to the default.prop in the ramdisk of the default boot.img file and instructions would be greatly appreciated.
I use dsixda's kitchen
http://forum.xda-developers.com/showthread.php?t=633246
that allowed me to unpack it. I remember the error you speak of but I forget what script I was using
elegantai said:
I use dsixda's kitchen
http://forum.xda-developers.com/showthread.php?t=633246
that allowed me to unpack it. I remember the error you speak of but I forget what script I was using
Click to expand...
Click to collapse
This worked for me perfectly.
Thanks very much for the pointer!
I cannot find a method in Linux or Windows that will allow me to access the files in the system.img partition image from:
RUU_ENDEAVOR_U_ICS_40_hTC_Asia_SEA_WWE_1.29.728.12_Radio_1.1204.105.14_release_261350_signed.exe
I have never had a problem "unpacking" system.img files from other HTC phones using unyaffs or even in Windows with WinImage for EXT2/3/4 partitions.
Obviously many Devs have had success with the HOX system.img! Could someone please tell me what file system the system partition uses AND/OR reveal the correct approach to accessing the files within the img?
I presume the partition formats are identical in:
RUU_ENDEAVOR_U_ICS_40_hTC_Asia_SEA_WWE_1.28.728.9_Radio_1.1204.103.14_release_256493_signed.exe
...so I suppose there's no point in making an attempt with its system.img either!
Any help will be greatly appreciated!!
Thanks in advance.
BTW: I'm not one who asks for assistance as his 1st move.
I have been searching for resolution to this problem for @least a week!
Using appropriate keywords the best I have come up with is either others in this same predicament or suggested remedies which are not effective.
The overall picture I have got is that those with the solution seem reluctant to share the knowledge, which I find strange in development communities.
if you want just access to files inside the img, in windows use this jar attached to convert it to ext4 and then mount with DiskInternals Linux Reader.
or in linux use this tool to unpack.
http://forum.xda-developers.com/showthread.php?p=28837507#post28837507
don't even try to repack it will not work.
if you know how it posible to repack files to this img format please let me know.
Thanks heaps avicohh!
I solved the problem only a few hours before your post came in.
I used a slightly different approach through linux but basically same process & result.
If you follow this:
http://forum.xda-developers.com/showthread.php?t=1081239
you'll be able to unpack AND repack but it's done in linux.
I used Ubuntu 12.04 LTS (64bit) to compile & use the ext4_utils in the thread above.
Since you were so kind to answer my query please feel free to PM me if i can help you!! My use of the forum is sometimes sporadic though, unfortunately.
EDIT: Sorry, just realised we both had the same thread! So it doesn't work for repacking?? I'll see if I can find something that works.
Obviously something does but there's not as much free sharing of really useful stuff as I would have expected with this kind of thing.
Yap.. is the same thread.
probably the odin (samsung) img and the stock htc img they not exactly the same format.
i seraching after sulution to this thing because i'm trying to make custom rom to be able to flash on device with stock rom/locked bootloader from the stock recovery like the ruu firmwares.
Hi all,
I've been trying to edit a stock boot.img's ramdisk so that I can get proper rw access in USB debugging.
I've successfully
1. unpacked the img.
2. edited the default.prop file to ro.secure=0 and all other variables to 1
3. repacked the ramdisk
But I still can't repack the ramdisk and kernel into the new boot.img!
I've tried using the android kitchen, repack-bootimg.pl and mkbootimg, both in cygwin and a virtual machine running Ubuntu 12.04.
everytime mkbootimg gives an error, either "permission denied" or "no such file or directory"
I'm gonna attach the kernel gz and the edited and compiled ramdisk gz, as well as the boot.img (just in case).
Could someone please repack them into a new boot.img for me?
Many thanks!HelpingEhsan.rar
Hi Ehsan,
Here is a recompiled boot.img. and an analysis of your boot.img. I hope this works for you.
OMG
Wow! I was looking through my old posts and found your epic reply and documented study! I did eventually get it to work back then, but reading this, a year later, after having earned my salt in Android tinkering, have never read something so intriguing as the report you made. I wish I carried the weight of multiple accounts because one "thanks" isn't sufficient to express how grateful I am and how glad this has made me! You are a star!
k02a said:
Hi Ehsan,
Here is a recompiled boot.img. and an analysis of your boot.img. I hope this works for you.
Click to expand...
Click to collapse
Thanks for your encouraging words, I hope it helped you a little bit.
First, I'm not a developer... but I have compiled a few roms from scratch in the past following tutorials. I would consider myself an avid android user, not a developer.
I recently got root access for my device with a locked bootloader... thanks to @K1979C20 pointing out that kingroot v4.1 finally works on our kitkat 4.4.2 device. I then removed kingroot and installed supersu using an app called "supersu me". I now have full root access, but no custom recovery due to the locked bootloader.
I was able to use @Chainfire flashfire beta app to do a backup of all my device partitions (I did not do data or cache, but can if needed).
I'm wondering if the backup can be used to create an Odin flash able package for others to use to gain root access on their device, because the kingroot process apparently works for some, but not for others...
If not Odin flashable, what other options could my files be used for to create a rooted rom that can be installed on others sgh-i467 devices.
Would it be helpful to do a full dump of all partitions? If so, any help figuring out the partition structure and process of dumping it would be appreciated.
I'm willing to do the work on this as time permits... just looking for someone with experience to point me in the right direction.
These are the files I saved in my flashfire backup
Ok now I'm not a developer at all but I'll try to help you out! Ok below is the partitions layout for our device. Now we don't need a copy of the bootloader because in the ota-update they gave us the sboot.bin and the tz.img which is the bootloader! But what we do need is the kernel (the boot.img), the recovery.img, the modem.bin, the param.bin and the system.img. But I'm not sure that even if you manage to pull these from the system that we will be able to flash them using odin cause with us having a locked bootloader if the images aren't signed by AT&T it won't allow the device to boot. But you can do it anyways and anyone willing to try can give it a shot! I would but my wife has taken over my Note 8 to use to play her games and she won't let me risk it cuz she will loose all her data! But to do the system pulls the way I know is to download Terminal Emulator for Android from the play store and make sure you have the latest Stericson Busybox installed and open the Terminal Emulator and type su the hit enter and grant it root access. Now use the following commands to pull the files but don't use the ( ) marks ok!
(busybox dd if=/dev/block/mmcblk0p8 of=/sdcard/param.bin)
(busybox dd if=/dev/block/mmcblk0p9 of=/sdcard/boot.img)
(busybox dd if=/dev/block/mmcblk0p10 of=/sdcard/recovery.img)
(busybox dd if=/dev/block/mmcblk0p13 of=/sdcard/modem.bin
(busybox dd if=/dev/block/mmcblk0p20 of=/sdcard/system.img)
If you wanna pull the cache.img, hidden.img, and tombstones.img you can but that's up to you. When you finish if you will put the into a zip file and upload them to like drive or dropbox or whatever you use and send me a link I'll try to talk my wife into letting me test it. I'll put the sboot.bin and tz.img from the ota-update with it.
mmcblk0p1: bota0
mmcblk0p2: bota1
mmcblk0p3: efs
mmcblk0p4: m9kefs1
mmcblk0p5: m9kefs2
mmcblk0p6: m9kefs3
mmcblk0p7: carrier
mmcblk0p8: param
mmcblk0p9: boot
mmcblk0p10: recovery
mmcblk0p11: ota
mmcblk0p12: cdma
mmcblk0p13: modem
mmcblk0p14: tombstones
mmcblk0p15: tdata
mmcblk0p16: hidden
mmcblk0p17: reserved1
mmcblk0p18: reserved2
mmcblk0p19: cache
mmcblk0p20: system
mmcblk0p21: userdata
@RootSuperSU I am working on this now... THANKS will post a link in a while and pm you
EDIT: I have extracted all of the files, but it's gonna be a bit before it is all uploaded. I have 100mbps download speed, but the upload speed is a whole different issue...
EDIT #2: try this link for the files you requested https://onedrive.live.com/redir?resid=7FBDBF9B2D3ACDA5!4928&authkey=!AAiZqsqu3y_s5dk&ithint=file,zip
OR try this one if that doesn't work: https://drive.google.com/file/d/0B3w-dFE5Q3FOUlp3bVhMS2lFYjA/view?usp=sharing
@RootSuperSU
Just so I learn the process... how would I extract the sboot.bin and tz.img? Even if you don't need these from me, I'd like to do it so I can learn the process... it's the old "teach a man to fish" addage. Based on what I have read elsewhere, I taking a guess and wondering if:
Would bota0 be where to extract the sboot.bin?
Would bota1 be where to extract the tz.img?
If these are the correct locations, presumably the same type of code is used to extract them as the other files I did above?
dandroid7 said:
@RootSuperSU
Just so I learn the process... how would I extract the sboot.bin and tz.img? Even if you don't need these from me, I'd like to do it so I can learn the process... it's the old "teach a man to fish" addage. Based on what I have read elsewhere, I taking a guess and wondering if:
Would bota0 be where to extract the sboot.bin?
Would bota1 be where to extract the tz.img?
If these are the correct locations, presumably the same type of code is used to extract them as the other files I did above?
Click to expand...
Click to collapse
I'm not sure about those 2 files! I don't know which files are what that is why I didn't say to pull those mainly! I wish I knew.
Ok developer gurus... i tried using romdump via terminal emulator... i'm getting the following message... I have edited permissions on the romdump file, but cant get it to dump the files... it looks like it is opening the script, but its giving me this error...
Any advice?
I'm trying to do a full romdump vs the partial stuff i have already harvested... wanting to make sure i get everything in the right format.
@dandroid7 I'm not sure if you noticed but boot.img and recovery.img are the exact same size. From what I can tell is that we can't get a real dump of either because of the locked bootloader.
@TMartin
hmmmm, I didn't notice that. but now I see what you are saying. Could be operator error on my part in how I extracted the stuff (see post #3) - or it could be as you say because of the locked bootloader. either way - I don't have the knowledge to say which it is (if either).
I'd really like to learn more about how to properly do this stuff... I have been googling and reading a lot - but not making much progress. It would be awesome to pick the brain of a developer or two who could give me some pointers. I don't mind doing the work - I just need some direction.
I guess we will see if anyone else posts more ideas... meanwhile - I'll keep reading and experimenting.
dandroid7 said:
@TMartin
hmmmm, I didn't notice that. but now I see what you are saying. Could be operator error on my part in how I extracted the stuff (see post #3) - or it could be as you say because of the locked bootloader. either way - I don't have the knowledge to say which it is (if either).
I'd really like to learn more about how to properly do this stuff... I have been googling and reading a lot - but not making much progress. It would be awesome to pick the brain of a developer or two who could give me some pointers. I don't mind doing the work - I just need some direction.
I guess we will see if anyone else posts more ideas... meanwhile - I'll keep reading and experimenting.
Click to expand...
Click to collapse
Hey I don't know what they are talking talking about we can't do rom dumps with locked bootloader because I have unpacked the modem.bin, param.bin, boot.img and recovery.img you sent me successfully with no problems using only my Note 8! I haven't been able to find away to unpack the system.img tho cause I don't have a computer but I am working on trying to find away!
Just trying to learn here... what do you use to unpack the .bin and .img files on the tablet? Not that I know what I'm doing, but I'd like to see what's in the files for the sake of learning.
Additionally... I have a decent computer... so if given a bit of direction, I could unpack the system.img file, put it in a zip file, and post a link to whatever you need for it.
Let me know if you want me to do so.
RootSuperSU said:
Hey I don't know what they are talking talking about we can't do rom dumps with locked bootloader because I have unpacked the modem.bin, param.bin, boot.img and recovery.img you sent me successfully with no problems using only my Note 8! I haven't been able to find away to unpack the system.img tho cause I don't have a computer but I am working on trying to find away!
Click to expand...
Click to collapse
I've tried multiple ways and can't get anything to mount and extract. I'd love to know how you pulled them. Do you have them uploaded anywhere?
TMartin said:
I've tried multiple ways and can't get anything to mount and extract. I'd love to know how you pulled them. Do you have them uploaded anywhere?
Click to expand...
Click to collapse
dandroid7 managed to follow my directions in post #3 on this thread and he managed to do all the pulls. He has them on his ondrive uploaded. Check and read the posts man!
dandroid7 said:
Just trying to learn here... what do you use to unpack the .bin and .img files on the tablet? Not that I know what I'm doing, but I'd like to see what's in the files for the sake of learning.
Additionally... I have a decent computer... so if given a bit of direction, I could unpack the system.img file, put it in a zip file, and post a link to whatever you need for it.
Let me know if you want me to do so.
Click to expand...
Click to collapse
I used the ZArchiver Pro app I bought on the PlayStore to unpack the modem.bin and the param.bin. It's a file manager and has features kinda like 7zip for Windows. Jus open the app and go to the .bin files long press on them and open as archive. Here is a link to the app on my Drive storage.
https://drive.google.com/file/d/0B-Zg_yh4ytvLYkNINVBpZThQQlE/view?usp=docslist_api
For the boot.img and recovery.img I used a app called Unpack Repack Img. You have to make a folder called unpack on the root of your sdcard and place your boot.img on the root of your sdcard also then use the app to unpack. For the recovery.img same app and same way but you will have to rename it to boot.img for the app to do it. But it doesnt work on repacking the images. Here is that app. https://drive.google.com/file/d/0B-Zg_yh4ytvLQ3RLa2I1bWl2OFU/view?usp=docslist_api
Now if you wanna use Android Image Kitchen for Windows/Linux/Mobile to unpack and repack the boot.img and recovery.img then just go check out this thread below for the downloads and information on how to install and use.
http://forum.xda-developers.com/showthread.php?t=2073775&page=1
Now for the system.img since you have a computer I would check out this thread for what seems to be an easy way to unpack it.
http://forum.xda-developers.com/showthread.php?t=2294909&page=1
or
You can look here at this thread for another way to unpack the system.img. Apparently this has Chainfire's Tools he uses to:
* Extract/repacking zip/.tar.md5 ROM files
* Unpacking/mounting/repacking ext4 sparse partition image files
* Unpacking/repacking boot image files
in LINUX OS
http://forum.xda-developers.com/showthread.php?t=2600364&page=1
For a better and more complete guide with step by step and pics on how to get the list of partitions and how to get the dumps using a computer with adb commands or using a Terminal Emulator app on your device go check out this thread!
http://forum.xda-developers.com/showthread.php?t=2450045&page=1
Be sure to go to the OP of each thread. That's the short term for Original Post if you didn't know. I hope this all helps yall out on how to do this stuff! Really all you had to do was Google Search this and just look for the XDA links section. Normally they are some of the 1st links given. But I'm glad to help anybody cause I know how difficult it can be trying to figure out all this stuff. I've only been into this for the past 2 or 3 years. I wish I knew alot more. I hope to be able to get a good computer and maybe compile my own custom roms and kernels and recoveries for my devices!
Hi everyone,
I been trying to edit, unpack and repack vendor.img and vbmeta.img (or make a new one) but having trouble making the changes. After some hours of Googling, I was able to mount vendor.img in Ubuntu but it was mount in a read only state and as not being the owner I was unable to make changes.
I am attempting to enable my phone to work in China. The files exist on the phone but are not being pointed to by vendor/.../mbn_sw.txt
There doesn't seem to be any good guides for packing and unpacking these image files. I don't mind what OS I must use to do so just would like to figure this out.
Thanks in advance!
jkoch3 said:
Hi everyone,
I been trying to edit, unpack and repack vendor.img and vbmeta.img (or make a new one) but having trouble making the changes. After some hours of Googling, I was able to mount vendor.img in Ubuntu but it was mount in a read only state and as not being the owner I was unable to make changes.
I am attempting to enable my phone to work in China. The files exist on the phone but are not being pointed to by vendor/.../mbn_sw.txt
There doesn't seem to be any good guides for packing and unpacking these image files. I don't mind what OS I must use to do so just would like to figure this out.
Thanks in advance!
Click to expand...
Click to collapse
Got solution?