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…
Related
Error executing ". / Unyaffs system.img" someone can help me I can not extract system.img
I'm sorry my english
put unyaffs.exe in same dir as system.img than create shortcut from unyaffs.exe click on shortcut Propities and in first field (target) add space than system.img
it should looks: "DIR:\blablabla...\unyaffs.exe" system.img. Finally execute shortcut.
thanks! and linux ubuntu? How Do I?
Put in same folder than in Command line put adress for unyaffs than put one space than write system.img like in windows shortcut than execute
Thanks!
YES I DO, BUT APPEARS Unable to execute binary file!
I posted my questions in another thread but got no response.
http://forum.xda-developers.com/showthread.php?t=1933541
I am trying to use the ext4_utils tool to unpack the factoryfs.img in order to modify the system files (add su). No luck so far.
I am now back to square one, testing the unpacking (./simg2img) and repacking (./mkuserimg.sh) tools. All I did was to unpack factoryfs.img, mount it in a temp folder, and repacking the mounted image (with no modification) into a new image. Then I repack this into a tar with md5 checksum (apparently ODIN uses checksum to verify the file to be flashed).
First thing I notice is that, the repacked image files is about 8 MB smaller than the original image (remember all I did was unpack, mount and repack using ext4_utils tool, no modification). When I tried to flash the repacked factoryfs.img (packed into TAR) using ODIN, checksum passed and it proceeded to flashing, but flashing failed.
Anyone have any experience with using ext4_utils to unpack factoryfs.img in order to add su / superuser to the system folder in order to make a rooted Samsung ROM? I feel like I have gone as far as a noob modder can go, and I really appreciate help from the veterans.
NOTE: I know I can use Android Kitchen to root and make a custom ROM, but the modified ROM in ZIP format can only be flashed by CWM. There is no CWM in my Galaxy Player (70 Plus Korean version only). I have a copy of Samsung stock TAR firmware, and I am trying to make a rooted ROM in TAR format which can be flashed by ODIN. I tried Heimdall and it seems that my player is not compatible (device detected but gets "usblib error" when I try to flash).
The repacking command is:
./mkuserimg.sh -s ./tempdir new.img ext4 ./temp XXXmb
I adjusted the "XXXmb" to match the size of the unpacked (eg. output,img) file, and the resulting size of the repacked .img file is now similar to the original factoryfs.img file.
Unfortunately, flashing this still failed (either repacked as a TAR file by itself, or replacing the original factoryfs.img and repacking the TAR firmware).
slim_thumb said:
The repacking command is:
./mkuserimg.sh -s ./tempdir new.img ext4 ./temp XXXmb
I adjusted the "XXXmb" to match the size of the unpacked (eg. output,img) file, and the resulting size of the repacked .img file is now similar to the original factoryfs.img file.
Unfortunately, flashing this still failed (either repacked as a TAR file by itself, or replacing the original factoryfs.img and repacking the TAR firmware).
Click to expand...
Click to collapse
Instead of making the *.tar by this command: tar cvf yourfilename.tar yourdirectoryname ; enter into the directory where all the *.img files reside. then use: tar cvf yourfilename.tar system.img factoryfs.img zImage etc etc. Make sure that the *.tar being created; unpacking it will directly provide those files; not a directory where in that directory all those files reside. This solved my problem. I hope it will solve your problem also.
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.
Hello
I am working with a Nanopi Fire3 board. I need to change the boot logo and boot animation.
With this Android Lollipop :
112.124.9.243/dvdfiles/S5P6818/images-for-eflasher/android-lollipop-images.tgz
Click to expand...
Click to collapse
If I unpack with the following method, the new image has a completely different size and does not boot.
Code:
apt install android-tools-fsutils
simg2img rootfs.img r.img
mount -t ext4 -o loop r.img /mnt
… To Change Something …
umount /mnt
img2simg r.img rootfs.img
I have tried to root the device, no tool found online works.
I have tried to unpack/repack, no tool found online works.
Tools like mkbootimg just copies the img file (it doesn't extract anything)
I am also trying to compile android completely, and it fails in the middle of the build process.
Would you have any advice please? I have run out of options
Thank you :good:
Hello:
I have rooted my Samsung Galaxy Tablet S7 Plus Wifi with TWRP. I would like to dig into the files in /system so that I can enable ADP root and rebuild images in Android Studio. Following this guide: https://forum.xda-developers.com/t/guide-unpack-repack-ext4-android-system-images.1588461/
from 2012 for EXT4 .img files does not seem to work.
Code:
simg2img twrp-gts7xl-3.5.0_10-A11_3_ianmacd.img twrp-gts7xl-3.5.0_10-A11_3_ianmacd.raw
Invalid sparse file format at header magic
Failed to read sparse file
Since the links to the packager from the person who created the post no longer hosts the file, I used apt-get to get the files:
sudo apt-get install simg2img
sudo apt-get install android-sdk-ext4-utils
I am wondering if something has changed in Android 11 for these files?
Images | Android Open Source Project
source.android.com
I have read over the following from the Androoid project, but not understanding I guess. Has anyone been able to extract the image?
Nevermind I just compiled Android 11 R3 with the "make eng" option to turn on ro.debuggable for adp root.
I didn't even know that a TWRP image is an ext4 filesystem?? Very interesting!