Sample Header Ad - 728x90

Unpack/Repack ROM for SM-G930S (Samsung Galaxy S7)

4 votes
0 answers
524 views
I want to unpack/repack the Samsung Galaxy S7 (SM-G930S) ROM. I downloaded the ROM from this link . I use simg2img to unpack/repack on Ubuntu. I execute these commands:
lz4 system.img.lz4 system.img
pc@pc-virtual-machine:~$ ./android-simg2img/simg2img system.img system.raw.img
pc@pc-virtual-machine:~$ ./android-simg2img/img2simg system.raw.img system.new.img
Result: the file system.img loaded successfully, but the file system.new.img received a FAIL result when using Odin. I noticed something unusual when comparing 2 files: 1. Check file info:
pc@pc-virtual-machine:~$ file system*
   system.img:     Android sparse image, version: 1.0, Total of 1075200 4096-byte output blocks in 5625 input chunks.
   system.new.img: Android sparse image, version: 1.0, Total of 1075200 4096-byte output blocks in 3469 input chunks.
   system.raw.img: Linux rev 1.0 ext4 filesystem data, UUID=57f8f4bc-abf4- 655f-bf67-946fc0f9f25b (extents)
2. Check simg_dump.py:
pc@pc-virtual-machine:~$ ./android-simg2img/simg_dump.py system.img
   simg_dump.py: system.img: The file header size was expected to be 28, but is 32.
   pc@pc-virtual-machine:~$ ./android-simg2img/simg_dump.py system.new.img
   system.new.img: Total of 1075200 4096-byte output blocks in 3469 input chunks.
3. Open with 7z: - File system.img > ![](https://i.sstatic.net/0AqH9.png) - File system.new.img ![](https://i.sstatic.net/AHpCD.png) I used many tools: ext2simg, make_ext4fs to repack, but it didn't work. How to unpack/repack the ROM?
Asked by Quang Nguyen (41 rep)
Jan 18, 2023, 03:38 AM
Last activity: Mar 31, 2024, 09:03 AM