Sorry for the totally newbie question (for both android and linux).
I've rom images from legend ruu: android-info.txt, boot.img, hboot_legend_7227_1.01.0000_101108.nb0, radio.img, rcdata.img, recovery.img, splash1.nb0, system.img, userdata.img.
Is there any way to mount them (especially boot.img, recovery.img and system.img) on a linux box using a loop device?
The files boot.img and recovery.img are starting with magic word "ANDROID!°¨#", while I cannot recognize any string in system.img. What kind of file systems are these?
Thank you in advance,
TiceRex
system.img should just be a yaffs image and can be mounted loopback if you have the yaffs drivers installed. boot.img and recovery.img are ramdisk images which consist of a kernel and a cpio archive (containing the files for the root filesystem) bundled together in a package. HBOOT loads the kernel first, then unzips the cpio archive into a newly created ramdisk. Once all is loaded, execution is passed off to the kernel which has a nice ramdisk full of the init files needed for the remainder of the boot process. system and data images are then mounted to mountpoints in the ramdisk.
To extract and manipulate boot.img and recovery.img, see this thread:
http://forum.xda-developers.com/showthread.php?t=551711
Thank you very much.
Seeing into dsixda's rom kitchen scripts I was able to extract the boot.img and recovery.img files (and found the kernel and initrd).
I will look for the yaffs drivers.
Regards, TiceRex
Related
This tool i came across when i was working on the Ubuntu for Eris.
Code:
It copies your bootimage to a temp file so it has a space to work in
It then unpack the boot.img
Replaces the zImage you included ith the original one
Repacks the boot.img
Flashes the new boot.img with your kernel in it.
All you need to do is rename your kernel zimage, and place it in the kernel folder and re-sign it. MUCH easier than fastboot or baking up a custom boot.img each time you have to swap the kernel.
All thanks to Koush, i just found the thing
Hi everyone.
I'm trying to increase data partition storage by using ph03n!x walkthru on Paranoid Android 1.992 and 2.0. I'm stuck at extracting boot.img in Working folder. The rom.zip itself don't have boot.img or boot folder so after extracting PA rom in dsixda kitchen i copied boot.img from Nandroid backup on SD. But while im trying to extract that boot.img there's an error
Code:
Working folder found
Android 'magic' header not found at start of boot.img
Cheching if it exists elsewhere ...
Warning: Android header not found in boot.img (unsupported format)
Error: kernel offset (page size) is 0
Press Enter to continue
So i took recovery.img from nandroid backup, renamed it to boot.img and extracting went fine, but there was some problems: could not find init.htcleo.rc file and "on fs" lines in init.rc file
Any suggestions how to do it? I think that real init.rc is placet in boot.img (not recovery.img), but how to extract it?
Do you have a working folder setup? If you do, then forget about the boot.img, just place the 'boot' directory from the ROM's zip (under /kernel/). If you do not have a Working folder setup, then follow my instructions to create a temporary ROM zip with the required folders - meta-inf, system and boot.
ph03n!x said:
just place the 'boot' directory from the ROM's zip (under /kernel/)
Click to expand...
Click to collapse
Thanks a lot ph03n!x. It worked And also thanks for this great mod (Initrd.gz was great, now its time for this new method )
I downloaded and compiled code that is supposed to communicate with the Android OS. The instructions stated to put the .img file on a different partition from the Android OS. How can I accomplish this please? I have SM-N900P. I compiled Samsung Source, and AOSP. I also have a copy of the stock firmware, and used unmkbootimg to extract the ramdisk. I do not have access to fastboot. Can I put my .img file in the ramdisk with zImage and dt.img and flash with Odin? I think I tried this once and it failed towards the end. Can I just put my desired .img file in the ramdisk and flash with Odin? Do I have to add the boot and dt.img every time I flash?
Hi all,
Is there a tool that can unpack system.img for the Pixel 4 (that actually works..) ?
What I want is to create a system.img that will have the following change:
Replace the below apex zip file:
`/system/apex/com.android.runtime.release.apex`
to an extracted version of it:
`/system/apex/com.android.runtime.release`
I've tried most of the online tools and tutorials with no luck.
So I unzip the ` flame-qd1a.190821.007` factory image, and then unzip the `image-flame-qd1a.190821.007` within in.
This gives me many .img files, including system.img, system_other.img, and super_empty.img.
I guess in some phones super.img had included the system.img, but that's not the case with `flame`.
imjtool can extract the `system.img` using:
Code:
imjtool system.img extract
With the below warning:
Warning: system.img is likely truncated or still compressed
Sparse image v1.0 detected, 196053 blocks of 4096 bytes
196053 blocks of 4096 bytes compressed into 15 chunks (1% compressed)
Click to expand...
Click to collapse
Then `extract/image.img` cannot be further recognized by the tool:
Code:
imjtool extracted/image.img
extracted/image.img is not a recognized image. Sorry
Click to expand...
Click to collapse
I've also tried simg2img to convert a sparse android img to a normal one,
but then mounting failed, in both Linux and mac.
Paschalis said:
Hi all,
Is there a tool that can unpack system.img for the Pixel 4 (that actually works..) ?
What I want is to create a system.img that will have the following change:
Replace the below apex zip file:
`/system/apex/com.android.runtime.release.apex`
to an extracted version of it:
`/system/apex/com.android.runtime.release`
I've tried most of the online tools and tutorials with no luck.
So I unzip the ` flame-qd1a.190821.007` factory image, and then unzip the `image-flame-qd1a.190821.007` within in.
This gives me many .img files, including system.img, system_other.img, and super_empty.img.
I guess in some phones super.img had included the system.img, but that's not the case with `flame`.
imjtool can extract the `system.img` using:
Code:
imjtool system.img extract
With the below warning:
Then `extract/image.img` cannot be further recognized by the tool:
Code:
imjtool extracted/image.img
I've also tried simg2img to convert a sparse android img to a normal one,
but then mounting failed, in both Linux and mac.
Click to expand...
Click to collapse
I use SuperR Kitchen
It unpacks everything. You must then use Apktool or third party software (ticklemyandroid) to decompile and recompile apks for editing. I don't have a way to edit a .apex file.
Here is the file in question. Just rename it by taking off the .zip. only way I could upload it.
https://www.androidfilehost.com/?fid=8889791610682898672
The full Android SDK. But it's definitely not a beginner friendly process. If you have to ask how to do it then you probably shouldn't try it until you learn more. ?
Hi,
I have some experience modifying rookchip Firmware. Unpacking, modifying repacking and flashing. Was a long way but finally I got it to work.
Now I have a X96Q device and downloaded it's stock firmware. I can open the archive with 7zip.
If I try to extract the super.img from the firmware.img with 7zip or other tools I get error "unexpected end of archive" at 78% progress.
Some ideas how to unpack the super.img to modify the system-dir?
Thanks!
PS: if it would help I can provide this Firmware-file.
super.img?
or system.img?
if system.img try this tool Multi Image Kitchen
I got it finally to work using imgRePacker and simg2img.
Fage91 said:
I got it finally to work using imgRePacker and simg2img.
Click to expand...
Click to collapse
can you share simg2img to me?
i try unpack and repack system.img on multi image kitchen but something bug like wifi can't on after flash the repack system.img
ijrx001 said:
can you share simg2img to me?
i try unpack and repack system.img on multi image kitchen but something bug like wifi can't on after flash the repack system.img
Click to expand...
Click to collapse
Try this:
GitHub - anestisb/android-simg2img: Tool to convert Android sparse images to raw images
Tool to convert Android sparse images to raw images - GitHub - anestisb/android-simg2img: Tool to convert Android sparse images to raw images
github.com
The steps I got it to work:
First step: unpack with imgRePacker
Second step: unpack super with simg2img
Third step: loop mount it with offset in debian
Forth step: make modifications and !! Umount!!
Fifth step: Pack super with img2simg
Sixth step: Pack it all togeher with imgRePacker
I cant Flash it using phoenix usbpro oder phoenix suit. Do you have some Tips for me? After connectng my Box in downloadmode it seems to Start flashing but nothing happens.