I have TWRP installation file in img format ready to be loaded with
Code:
fastboot boot twrp-unofficial.img
.
I don't have the source and want to have a look at what is packaged with it.
Is it possible to mount this img file on linux or extract the contents somehow?
Code:
file twrp-unofficial.img
twrp-unofficial.img: Android bootimg, kernel, ramdisk, page size: 2048, cmdline (console=null androidboot.console=ttyHSL0 androidboot.hardware=q)
I tried with simg2img but failed
Code:
simg2img twrp-unofficial.img twrp.raw
Invalid sparse file format at header magi
Failed to read sparse file
Furius ISO mount creates a mount point but it is an empty directory.
Related
I have Zenfone 5 phone, and i want to flashable system.img for the fastboot.
I tried dump system.img with help of this topic: http://forum.xda-developers.com/showthread.php?t=2450045
I used this code for the know what devblock is system for the zenfone:
Code:
adb shell
ls -al /dev/block/platform/intel/by-label/
And the mmcblk0p9 showed as system. Than I dumped system image with this command:
Code:
adb shell
su
dd if=/dev/block/mmcblk0p9 of=/sdcard/system.img
After dump of system.img, I tried flash it via fastboot with this command:
Code:
fastboot flash system system.img
But the flashing process is aborted with this error:
Code:
invalid sparse file format at header magi [I]-> This error appeared in Windows CMD, others in the below, appeared in the fastboot screen[/I]
e:unknowing chunk type
failed: bad file number
In summary; I dumped system.img and flashed it via fastboot and, it wasn't flashed, and give error.
I tried to convert system.img to system.raw via Ubuntu with simg2img file, I took this error:
Code:
invalid sparse file format at header magi
How to solve this "invalid sparse file format error"? Please help me? I'm making a rom, but this error blocked me
i have a system.img file
file system.img command shows
system.img: Linux rev 1.0 ext4 filesystem data, UUID=57f8f4bc-abf4-655f-bf67-946fc0f9f25b (extents) (large files)
so when i tried to convert it to ext4 using simg2img,following error comes
simg2img system.img sys.ext4.img
Invalid sparse file format at header magi
Failed to read sparse file
please help me to convert it to ext4
joel george alex said:
i have a system.img file
file system.img command shows
system.img: Linux rev 1.0 ext4 filesystem data, UUID=57f8f4bc-abf4-655f-bf67-946fc0f9f25b (extents) (large files)
so when i tried to convert it to ext4 using simg2img,following error comes
simg2img system.img sys.ext4.img
Invalid sparse file format at header magi
Failed to read sparse file
please help me to convert it to ext4
Click to expand...
Click to collapse
ok solved ,just mounted it in ubuntu:cyclops::cyclops::cyclops:
Can anyone help me out with the correct Syntax and binary required to create a sparse image from a raw image for a Spreadtrum device.
I'm trying to create an ODIN flashable cache.img , but no matter what Syntax I use the image fails in ODIN.
I have tried: ext2simg -v cache.raw.img cache_new.img
Also mounting as a loop device: make_ext4fs -s -l 32M cache_new.img cache_mnt
The image gets created just fine, but is just fails in ODIN. I don't kinow if its a missing header or what?
I followed this tutorial to merge many system_№.img file, to one, but I get a system.raw file. If I rename it to system.img, how can I verify if it can be flashed via fastboot?
The file can be explored with ext2explore
I followed the tutorial on Windows, but I can also switch to Ubuntu.
alessio89g said:
I followed this tutorial to merge many system_№.img file, to one, but I get a system.raw file. If I rename it to system.img, how can I verify if it can be flashed via fastboot?
The file can be explored with ext2explore
I followed the tutorial on Windows, but I can also switch to Ubuntu.
Click to expand...
Click to collapse
On Ubuntu I used the command
Code:
file system.raw
and the output was that the file is in ext4 format.
Executing the same command on a system.img file, extracted from a Google Factory Image, the output was that the file is an Android Sparse Image, so my hope wrote in OP has been annihilated.
After some searches, luckily I found a way to convert an ext4 image in an Android Sparse Image:
Type in Terminal
Code:
img2simg system.raw system.img
(if img2simg isn't installed, the Terminal should prompt to install it)
and executing this time the file command on the output file, the result is Android Sparse Image!
I followed the entire process also for userdata and cache partitions.
But unfortunately, the first part of the process for generating the .raw file works only on Windows for me. I've posted the issue on the related thread (linked in OP), but I don't received any answer yet, so for the moment for merging many .img files in an only one, you need to split the job in Windows and Ubuntu…
Hello,
I am trying to investigate the contents of the stock rom. I have downloaded the zip and extracted it, and also converted the sparse image files to nonsparse ones with simg2img. Unfortunately, I am still unable to mount the images. No matter whether I try to mount the converted image as ext2, ext4 or f2fs, I am getting the error:
mount: /mnt/temp: wrong fs type, bad option, bad superblock on /dev/loop0, missing codepage or helper program, or other error.
Click to expand...
Click to collapse
Does anybody know if/how can the oreo stock images for griffin be mounted? The issue seems to be specific to motorola or oreo as I was able to mount files from nexus 5x oreo stock images without issues. Thank you for the advice.
It turns out motorola images have 128kb header which needs to be removed before they can be mounted. Assuming dd's default block size of 512 bytes this gives the following:
Code:
$ dd if=system.raw.img of=system.raw.img.fixed skip=256
After that the images can be mounted.