http://www.mediafire.com/?j0anq7kfe...ajlhunt3jras6,c92jlnxd3vdngn8,i6hqic38gc4h68d
system is ext4 image, can be mounted with mount -o loop in linux or by utilizing latest version of ext3 driver ( 0.51 ) for windows.
Can me give someone the WLAN widget with the GPS think in?
Gesendet von meinem R800i
is it the system dump from xperia s...?????
is it dump? real one?
Sent from my X10i using XDA App
works on xperia arc s ?
download, extract, sin2img, mount, get files
Sent from my X10i using XDA App
how you get this ...??????
can someone help me with this Im stuck on mounting the annoying img file
tatit1011 said:
can someone help me with this Im stuck on mounting the annoying img file
Click to expand...
Click to collapse
you can unpack it without mounting, by using unyaffs : http://code.google.com/p/unyaffs/
It says broken image file, can someone upload the xperia S system folder? Thanks
can you provide the binaries you are using to unpack this ?
1- extrating with 7zip : Ok, there are 3 .sin files
2- sin2img I already had : Crash
3- I tried an other version : Ok ... but the .img file size is exactly the same as the .sin ...
4- unyaffs : Crash !
So I think I don't have the good binaries ...
Thanks
sambastrakan said:
can you provide the binaries you are using to unpack this ?
1- extrating with 7zip : Ok, there are 3 .sin files
2- sin2img I already had : Crash
3- I tried an other version : Ok ... but the .img file size is exactly the same as the .sin ...
4- unyaffs : Crash !
So I think I don't have the good binaries ...
Thanks
Click to expand...
Click to collapse
THIS IS NOT YAFFS THIS IS EXT4
JUST MOUNT THE IMG IN LINUX AS EXT 4
(i hav not.done myself, I'm jus saying)
Sent from my X10i using XDA App
I also tried to mount the .img in DiskInternals Linux Reader without success. Until today it was working for any image available in xda-dev... so I think there is something special with these images ...
I will try directly in Linux to see ...
thx.
I can confirm it's not working.
Latest sin2img version gives a FileStream.Seek ArgumentException "Attempted seeking before the beginning of the stream.".
An older version creates an img file the same size as the sin, but unyaffs crashes with a segmentation fault / core dump and:
[email protected]:~$ dmesg | tail
[44637.019046] unyaffs[18031]: segfault at 1adb2b2c0 ip 0000000000400a08 sp 00007fffba023ca0 error 4 in unyaffs[400000+1000]
Click to expand...
Click to collapse
No mounting either, 'cause:
[email protected]:~$ sudo mount -t ext4 -o loop system.img /mnt/mountpoint/
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
[email protected]:~$ dmesg | tail
[44678.194165] EXT4-fs (loop0): VFS: Can't find ext4 filesystem
Click to expand...
Click to collapse
So, wasted time, I guess...
zdzihu has some tool to extract the package try that one. I think it's called auip.exe
ShyamSasi said:
zdzihu has some tool to extract the package try that one. I think it's called auip.exe
Click to expand...
Click to collapse
Thanks, but no luck with that one either. It keeps telling me the page size is wrong (tried with all three options)
Code:
[email protected]:~$ ./aIUP
aZuZu - Direct SIN / YAFFS Image Unpacker, v1.03.5. (c) aZuZu. 2011.
usage adiup [System.Img OR System.Sin] [Page Size] [Directory]
page size is one of 2048, 4096, 8192. - Sorry to lazy to encode auto detect. ;)
Tip: Directory - directory will be created if doesn't exist.
Supported: SE System.SIN files & Android System.IMG files.
[email protected]:~$ ./aIUP system.sin 4096 test/
UnPacking system.sin to test/ ...
Error: Page size parameter is wrong.
done.
[email protected]:~$ ./aIUP system.sin 2048 test/
UnPacking system.sin to test/ ...
Error: Page size parameter is wrong.
done.
[email protected]:~$ ./aIUP system.sin 8192 test/
UnPacking system.sin to test/ ...
Error: Page size parameter is wrong.
done.
Same for the .img file.
crimilde said:
Thanks, but no luck with that one either. It keeps telling me the page size is wrong (tried with all three options)
Code:
[email protected]:~$ ./aIUP
aZuZu - Direct SIN / YAFFS Image Unpacker, v1.03.5. (c) aZuZu. 2011.
usage adiup [System.Img OR System.Sin] [Page Size] [Directory]
page size is one of 2048, 4096, 8192. - Sorry to lazy to encode auto detect. ;)
Tip: Directory - directory will be created if doesn't exist.
Supported: SE System.SIN files & Android System.IMG files.
[email protected]:~$ ./aIUP system.sin 4096 test/
UnPacking system.sin to test/ ...
Error: Page size parameter is wrong.
done.
[email protected]:~$ ./aIUP system.sin 2048 test/
UnPacking system.sin to test/ ...
Error: Page size parameter is wrong.
done.
[email protected]:~$ ./aIUP system.sin 8192 test/
UnPacking system.sin to test/ ...
Error: Page size parameter is wrong.
done.
Same for the .img file.
Click to expand...
Click to collapse
What is your page files size? Those 3 are just examples. You need to find the page file of your PC.
ShyamSasi said:
What is your page files size? Those 3 are just examples. You need to find the page file of your PC.
Click to expand...
Click to collapse
Ah ok, sorry.
It's :
[email protected]:~$ getconf PAGESIZE
4096
Click to expand...
Click to collapse
Which I had already tried.
crimilde said:
Ah ok, sorry.
It's :
Which I had already tried.
Click to expand...
Click to collapse
I'll download it and try it today.
ShyamSasi said:
I'll download it and try it today.
Click to expand...
Click to collapse
yap please sone one fine a way to unpack it .......... ????
i am waiting too for it
Related
I tried to loop mount the file, but mount couldn't identify it?
I want to edit it, to manipulate the sd card OS
instead of the emmc OS. I understood I need
to edit /etc/recovery.fstab to point to the
right partitions.
dmesg output from mount command...
VFS: Can't find a valid FAT filesystem on dev loop3.
FAT: bogus number of FAT structure
VFS: Can't find a valid FAT filesystem on dev loop3.
EXT2-fs (loop3): error: can't find an ext2 filesystem on dev loop3.
EXT3-fs (loop3): error: can't find ext3 filesystem on dev loop3.
r8169 0000:14:00.0: eth0: link up
r8169 0000:14:00.0: eth0: link up
eth0: no IPv6 routers present
FAT: bogus number of FAT structure
VFS: Can't find a valid FAT filesystem on dev loop3.
Click to expand...
Click to collapse
Thanks
fuzzynco said:
I tried to loop mount the file, but mount couldn't identify it?
I want to edit it, to manipulate the sd card OS
instead of the emmc OS. I understood I need
to edit /etc/recovery.fstab to point to the
right partitions.
dmesg output from mount command...
Thanks
Click to expand...
Click to collapse
Just follow the directions on this page HERE because you are going to have to know how to recompile it.
Code:
cd /to/ramdisk/directory/where/uRamdisk/is
dd if=uRamdisk of=ramdisk.cpio.gz bs=64 skip=1
gunzip ramdisk.cpio.gz
cpio -i -F ramdisk.cpio
rm uRamdisk
Forever king's Guide
How to extract system.img or Data.img
Want to Extract your precious files from your Nandroid backup?
You can do this easily by following this guide.
How to unyaffs (extracting system.img/data.img)
1 Download and extract Unyaffs In any folder
2 Now place you system.img/data.img in the folder in which you extracted unyaffs files.
3 Now open your Command prompt and CD to that folder (if windows7 just press shift+right click on that folder having things )
4 For extracting system.img
Type unyaffs.exe system.img
For extracing data.img
Type unyaffs.exe data.img
5 Done.
When Done you will see 'end of the line'.
So it was easy! Press Thanks if it worked for you. Are you having any problems while following it? Please Reply to the thread, I'm here to help you.
Thanks...it helped me a lot
---------- Post added at 05:54 AM ---------- Previous post was at 05:46 AM ----------
Hi i get an error while dumping stack...any help?
This is what i am getting..
Code:
D:\\unyaffs>unyaffs.exe system.img
36 [main] unyaffs 668 _cygtls::handle_exceptions: Exception: STATUS_ACCESS_
VIOLATION
35983 [main] unyaffs 668 open_stackdumpfile: Dumping stack trace to unyaffs.ex
e.stackdump
1362463 [main] unyaffs 668 _cygtls::handle_exceptions: Exception: STATUS_ACCESS_
VIOLATION
1394073 [main] unyaffs 668 _cygtls::handle_exceptions: Error while dumping state
(probably corrupted stack)
D:\unyaffs>
Can you post some screenies of successful case.?
viijay4b7 said:
This is what i am getting..
Code:
D:\\unyaffs>unyaffs.exe system.img
36 [main] unyaffs 668 _cygtls::handle_exceptions: Exception: STATUS_ACCESS_
VIOLATION
35983 [main] unyaffs 668 open_stackdumpfile: Dumping stack trace to unyaffs.ex
e.stackdump
1362463 [main] unyaffs 668 _cygtls::handle_exceptions: Exception: STATUS_ACCESS_
VIOLATION
1394073 [main] unyaffs 668 _cygtls::handle_exceptions: Error while dumping state
(probably corrupted stack)
D:\unyaffs>
Can you post some screenies of successful case.?
Click to expand...
Click to collapse
dude! this comes only when your system.img/data.img's size is 150+ mb this is old version! i have done full decompiling! with no error!
forever king said:
dude! this comes only when your system.img/data.img's size is 150+ mb this is old version! i have done full decompiling! with no error!
Click to expand...
Click to collapse
Thanks for the info.
So, what is the solution for me? mine is about 400MB i guess. Also I hope it is ext4. Do you have a link to ext4 tools?
Exactly I need to extract my system.img so i can pull the fresh /system/build.prop from it. The file size is 500MB how do I extract it's contents?
thanks
Ext2Read its the solution for ext4 .img files on windows
Yep, it did the trick for me, thanks for the tips.
You can use Yaffe tool for extracting files sizing more than 150 MB.
http://forum.xda-developers.com/showthread.php?t=2294909
Check this topic
"The program can't start because cygwin1.dll is missing from your computer. Try reinstalling the program to fix this problem."
how to extract data.img ?
$ file data.img
data.img: data
Click to expand...
Click to collapse
I'll try
How do i extract the system.img straight from the phone? There is no available firmware for mine
[DEV_TOOL] HTC ROM EXTRACTOR
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Tools for working with firmware HTC in LINUX
fit Kenny Millington Source kmdm
(HOW TO)
PUSH THE BUTTON
! Requirements (libunshield v0.7 or higher):
Code:
$ sudo apt-get install automake
$ git clone https://github.com/kmdm/unshield.git
$ cd unshield/
$ git checkout -t origin/v18\_wip
$ ./bootstrap
$ ./configure --prefix=/usr
$ make
$ sudo make install
1. Extract from the zip and put the RUUXXXXXXXXX.exe to a folder with the tool;
2. Run in Terminal rom-extractor file and select the option:
MAIN MENU
u - UNRUU EXE TO ZIP - extract from the file rom.zip RUU.exe
d - DECRYPT MENU > DECRYPT MENU ROM.ZIP > OUTPUT.ZIP
r - REPACK MENU > REPACK MENU
e - ENCRYPT MENU >
c - CLEAN TOOL - Unmount and remove temporary files
x - exit
> DECRYPT MENU ROM.ZIP > OUTPUT.ZIP
1 ... 24 - decode the file rom.zip output.zip (select the target device)
> REPACK MENU
e - EXTRACT ZIP ROM - to extract the firmware from the ROM folder output.zip
m - MOUNT SYSTEM (EXT4 ONLY) - mount the partition image system.img in the folder system (you can add \ remove the firmware files)
d - DESPARSE SYSTEM.IMG (EXT4 ONLY) - uncompress the sparse image system.img (depending on the device - some zhaty, some not (determined EXPERIMENTAL)) and mount the partition image system.img in the folder system (you can add \ remove the firmware files)
s - MAKE SPARSE SYSTEM.IMG (EXT4 ONLY) - the creation of a sparse image sistem.img (you must specify the size of the partition XXXXM (device) - for example ONE X = 1280M)
n - UNMOUNT SYSTEM - dismount and delete the folder system
z - ADD SYSTEM.IMG > OUTPUT.ZIP - add new edited system.img into output.zip
> ENCRYPT MENU OUTPUT.ZIP > ROM.ZIP
1 ... 24 - create encrypt new rom.zip from output.zip
Thanks
as i9000 said:
[DEV_TOOL] HTC ROM EXTRACTOR
Tools for working with firmware HTC in LINUX
fit Kenny Millington Source
(HOW TO)
PUSH THE BUTTON
! Requirements (libunshield v0.7 or higher):
Code:
$ git clone https://github.com/kmdm/unshield.git
$ cd unshield/
$ git checkout -t origin/v18\_wip
$ ./bootstrap
$ ./configure --prefix=/usr
$ make
$ sudo make install
1. Extract from the zip and put the firmware. Exe to a folder with the tool;
2. Run in Terminal rom-extractor file and select the option:
u - extract from the file rom.zip RUU.exe
1 ... 21 - decode the file rom.zip output.zip (select the target device)
e - to extract the firmware from the ROM folder output.zip
m - mount the partition image system.img in the folder system (you can add \ remove the firmware files)
n - dismount and delete the folder system
c - Clean all tools
x - exit
d - uncompress the sparse image system.img (depending on the device - some zhaty, some not (determined EXPERIMENTAL)) and mount the partition image system.img in the folder system (you can add \ remove the firmware files)
s - the creation of a sparse image sistem.img (you must specify the size of the partition XXXXM (device) - for example ONE X = 1280M)
Click to expand...
Click to collapse
i can not work and i can not runnig
R: [DEV_TOOL] HTC ROM EXTRACTOR extract RUU & repack system.img
lauri_ylonen said:
i can not work and i can not runnig
Click to expand...
Click to collapse
This is only for linux
Inviato dal mio GT-I9070 con Tapatalk 2
Are there plans to add the One S?
Nm. Just looked at the source.... Oops.
bedwa said:
Are there plans to add the One S?
Nm. Just looked at the source.... Oops.
Click to expand...
Click to collapse
INFO FOR ALL...
If your device is not supported and you would like it supported please open an issue in the tracker with the device name, codename and a link to the most recent hboot file for the device. (Not a link to the full RUU!)
Click to expand...
Click to collapse
Kenny Milington https://github.com/kmdm/ruuveal
anything more?..
I promise to add new binaries in my instrument as we update source
Not as all. The oops was cause I looked at the source and noticed the unpacker was One S supported. Lol.
Fixed a typo in paragraph 21
HTC One VX (tc2) > HTC One S (ville)
add
HTC_ROM-EXTRACTOR_v.0.0.3_x64
it seems that I'm doing something wrong.
[email protected]:~$ git clone https://github.com/kmdm/unshield.git
Cloning into 'unshield'...
remote: Counting objects: 569, done.
remote: Compressing objects: 100% (208/208), done.
remote: Total 569 (delta 370), reused 545 (delta 346)
Receiving objects: 100% (569/569), 116.31 KiB | 204 KiB/s, done.
Resolving deltas: 100% (370/370), done.
[email protected]:~$ cd unshield/
[email protected]:~/unshield$ git checkout -t origin/v18\_wip
Branch v18_wip set up to track remote branch v18_wip from origin.
Switched to a new branch 'v18_wip'
[email protected]:~/unshield$ ./bootstrap
Creating configure.ac...done.
+ aclocal -I m4
./bootstrap: 29: ./bootstrap: aclocal: not found
[email protected]:~/unshield$
Click to expand...
Click to collapse
can anyone help?
Maybe a more step-bystep guide,
Sorry for been noob
andrewschumi said:
it seems that I'm doing something wrong.
can anyone help?
Maybe a more step-bystep guide,
Sorry for been noob
Click to expand...
Click to collapse
sudo apt-get install automake
Added
v.o.o.4
22 - HTC One U (m7_u)
23 - HTC One UL (m7_ul)
24 - HTC Desire SV (magnids)
ADDED v.0.0.5
REBUILD TOOL
ADDED ENCRYPT MENU!!!
as i9000 said:
ADDED v.0.0.5
REBUILD TOOL
ADDED ENCRYPT MENU!!!
Click to expand...
Click to collapse
Could you please help? unruu never completes. It gives me this
Extracting temporary files...
Extracting rom zip files...
./unruu_exe: line 8: 4379 Aborted (core dumped) ./unruu ruu.exe
failed to open source zip: No such file or directory
That last line fails because decrypt is looking for a zip that was never made.
If i do ./unruu ruu.exe , I am given the following
[email protected]:~/Desktop/HTC_ROM-EXTRACTOR_v.0.0.5/tools$ ./unruu ruu.exe
Extracting temporary files...
Extracting rom zip files...
Aborted (core dumped)
Click to expand...
Click to collapse
this was done as root with the same result.
Perhaps I need to switch to all i386 binaries? Ill try that, but i was trying to avoid it, as it will break my current nvidia driver setup. ohwell
Tilde88 said:
Could you please help? unruu never completes. It gives me this
Extracting temporary files...
Extracting rom zip files...
./unruu_exe: line 8: 4379 Aborted (core dumped) ./unruu ruu.exe
failed to open source zip: No such file or directory
That last line fails because decrypt is looking for a zip that was never made.
If i do ./unruu ruu.exe , I am given the following
this was done as root with the same result.
Perhaps I need to switch to all i386 binaries? Ill try that, but i was trying to avoid it, as it will break my current nvidia driver setup. ohwell
Click to expand...
Click to collapse
Did you do this?
! Requirements (libunshield v0.7 or higher):
Code:
$ sudo apt-get install automake
$ git clone https://github.com/kmdm/unshield.git
$ cd unshield/
$ git checkout -t origin/v18\_wip
$ ./bootstrap
$ ./configure --prefix=/usr
$ make
$ sudo make install
Added version 0.0.6 x86-64
25 - HTC One WLS (m7_wls)
26 - HTC One SV (k2_u)
27 - HTC One SV (k2_plc_cl)
as i9000 said:
Did you do this?
! Requirements (libunshield v0.7 or higher):
Code:
$ sudo apt-get install automake
$ git clone https://github.com/kmdm/unshield.git
$ cd unshield/
$ git checkout -t origin/v18\_wip
$ ./bootstrap
$ ./configure --prefix=/usr
$ make
$ sudo make install
Click to expand...
Click to collapse
lol yes of course
Tilde88 said:
lol yes of course
Click to expand...
Click to collapse
OK, try to extract some different rom, may be you has problem from invalid ruu.exe..
and more, what size have your ruu.exe? - x32 systems, can't handle files largest 2GB...
as i9000 said:
OK, try to extract some different rom, may be you has problem from invalid ruu.exe..
and more, what size have your ruu.exe? - x32 systems, can't handle files largest 2GB...
Click to expand...
Click to collapse
im running x64, tried with x64 binaries, and i also tried using 32bit binaries. furthermore, my RUU is onlt 1.15GB. Also, x86 (there is not such thing as x32) can handle 3gb files.
thanks so much for the tool though, everything else workes, I juse used a script I found from another developer to get the .zip, then used your tool for all the other features.
Tilde88 said:
im running x64, tried with x64 binaries, and i also tried using 32bit binaries. furthermore, my RUU is onlt 1.15GB. Also, x86 (there is not such thing as x32) can handle 3gb files.
thanks so much for the tool though, everything else workes, I juse used a script I found from another developer to get the .zip, then used your tool for all the other features.
Click to expand...
Click to collapse
Well then stay one variant - you doesn't installed "Unshield", try run terminal and input 'unsield'
here the correct conclusion:
Code:
~$ unshield
No action provided on command line.
Syntax:
unshield [-c COMPONENT] [-d DIRECTORY] [-D LEVEL] [-g GROUP] [-i VERSION] [-GhlOrV] c|g|l|t|x CABFILE [FILENAME...]
Options:
-c COMPONENT Only list/extract this component
-d DIRECTORY Extract files to DIRECTORY
-D LEVEL Set debug log level
0 - No logging (default)
1 - Errors only
2 - Errors and warnings
3 - Errors, warnings and debug messages
-g GROUP Only list/extract this file group
-h Show this help message
-i VERSION Force InstallShield version number (don't autodetect)
-j Junk paths (do not make directories)
-L Make file and directory names lowercase
-O Use old compression
-r Save raw data (do not decompress)
-V Print copyright and version information
Commands:
c List components
g List file groups
l List files
t Test files
x Extract files
Other:
CABFILE The file to list or extract contents of
FILENAME... Optionally specify names of specific files to extract (wildcards are supported)
hi is there any chance to add the Desire HD. As i am trying to merge a Orange UK RUU for Desire DHD and they never released the last RUU with all the OTA's to make a New RUU with all the OTA's included.
I have made a Nandroid backup after all the OTA's was installed to the phone i even have all the OTA's just need a way to extract the rom.zip (easy from exe file not a issue) add the changed .img files such as radio, system, hboot recovery rcdata lib.img and make a new rom.zip and ruu.exe any way this can be done just tried with your tool and got invalid htc aes encrypted zip.
Thanks in advance
Hello XDA, I was attempting to do some experimentation with what I could do on the device via modifying init.rc files and the like. Rather than building and flashing a custom ROM for each run which is time consuming I thought I could just mess with the existing system images.
What I was hoping would work:
1. Download the October 007 (patch) stock binaries from Google
2. Extract the flame_xxxxx.zip image file
3. Convert the sparse system image file to a raw image file
- $ simg2img system.img system.raw
4. Mount the ext2 filesystem to a loopback device
- $ mount -o loop -t ext2 system.raw temp_dir
5. Edit the init file (e.g. init.rc) and save it
6. Unmount the ext2 filesystem
7. Create sparse system image
- Still don't quite know how to do this
8. Flash the sparse image from fastboot
- $ fastboot flash system system.img
So my question to the community at large is, is this track of work even logically correct. If so, how does one do it?
I have been trying to run these steps against image-flame-qd1a.190821.007.zip
My machine is running Ubuntu 19.10
For example Step 4 (mounting the ext2 system is failing for me)
Code:
$ losetup --list
....
/dev/loop8 0 0 1 1 /path/system.raw 0 512
....
$ sudo mount /dev/loop8 sys_mount
mount: /pathsys_mount: wrong fs type, bad option, bad superblock on /dev/loop8, missing codepage or helper program, or other error.
Also not working for Step 4
Code:
$ file system.raw
system.raw: Linux rev 1.0 ext2 filesystem data, UUID=4729639d-b5f2-5cc1-a120-9ac5f788683c (extents) (large files) (huge files)
$ sudo mount -o loop -t ext2 system.raw sys_mount
mount: /pathsys_mount: wrong fs type, bad option, bad superblock on /dev/loop8, missing codepage or helper program, or other error.
Thanks for the help.
I have since built my own AOSP build and have the same issue in that I can't mount the resulting system.img file from the AOSP build either.
Not sure if that matters or not, but I found it odd.
Disclaimer: I'm not responsible for any result of these operations. Please be careful and well prepared. Always have your important data backed up safely on other place.
Hello everyone!
As far as 2022 and Xiaomi gets their new phones updated to MIUI13 and Android 12, they implement the new read-only filesystem "EROFS" on the logical partitions inside super partition. EROFS is a filesystem initial developed by Huawei and then Google select it as a new standard to use in read only logical partition inside super partition from Android 12. The "EROFS", is the short for "Extendable (or Enhanced?) Read-Only Filesystem", conveying that this filesystem is a one-time cooked filesystem and cannot be changed without extracting and re-cooking. With erofs we cannot modify the logical partition anymore so I found a new way to unlock these partitions.
I just faced and managed to solve the "lock" and I would like to share the solution, which may help more people.
My device: Xiaomi 12 (cupid).
System: Stock MIUI13 (Android 12).
Logical partitions with read-only lock inside super partition: system, vendor, product, system_ext, odm, vendor_dlkm. All of them are erofs filesystem.
Be aware that this device is virtual a/b and the _b partitions inside super are 0k blank files. No need to do anything with them.
In theory, all devices shipping with erofs partitions inside super are compatible with this method. Feedbacks are always welcome!
Before we start: This guide is for Android power users that wish to make their Android 12+ read-only system/vendor.... partitions with EROFS filesystem inside super read-writeable again to remove the bloatware and do more customizations to their device.
Credits:
@Yuki1001 - EROFS Guide, research, new rw discoveries.
@lebigmac - a couple of rw slogans, some binaries, inspiration.
Requirements:
1. Your phone must be unlocked as you must flash your new super.img through fastboot command. Root is required to run any command in a terminal (win cmd or linux terminal).
2. 20GB+ free space on your phone and PC.
3. The toolkit needed.
4. A clever brain and courage.
So in short, the tutorial contains these part:
(1) Dump and extract your super image.
(2) Pull the folder with partition images extracted from super image to the PC.
(3) Convert these erofs images to ext4 images (Extract and Rebuild). These new images are in the same folder.
(4) Push the folder to the phone and fix any errors of new generated ext4 images.
(5) Merge them into a new single sparse super image and pull it to the PC.
(6) Flash the new image through fastboot command.
(7) Check the rw capability of the logical partitions and do anything you want!
Let's start now!
1. Get your super image by dumping your current super partition. We can find our super partition in this way:
Code:
su
cd /dev/block/bootdevice/by-name
ls -al | grep "super"
You will get the output like this:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Then we knows the super partition block number and path immediately. Let's dump its data to a file.
Code:
dd if=%PATH_TO_SUPER_BLOCK% of=/data/local/tmp/super_orig.img bs=4096
Wait for the data transfer done and we can get the super image. DO NOT forget to replace "%PATH_TO_SUPER_BLOCK%" with your own super block path!
2. Now we can do things with the super_orig.img: Extract logical partitions inside super partition to a folder. I will use Google's official tool: lpunpack. For example, I extract these partitions inside super to "sup_unpack" folder. Give all binaries in tools folder with executive permission in advance.
Code:
./tools/lpunpack ./super_orig.img sup_unpack
Now check with the folder to confirm whether these partitions insider super are extracted. If so, we can transmit the folder to the PC with adb pull. Extract my unlock-super folder in advance and we need to place the pulled out folder in it.
Code:
adb pull /data/local/tmp/sup_unpack
Now the "sup_unpack" folder exists in the platform-tools folder. Move it to the "unlock-super" folder.
3. Extract these erofs images one by one with erofsUnpackRust.exe and repack them into ext4 image. Check the folders' size to determine how big space does the new ext4 filesystem need. I'd like to recommend you to preset some free space for every new ext4 images for further modifications.
You are required to remove all _a suffix for the images in order to make the following program works properly. For example: system_a.img --> system.img. You have been warned!
For example:
Code:
erofsUnpackRust sup_unpack/system.img system
erofsUnpackRust sup_unpack/vendor.img vendor
erofsUnpackRust sup_unpack/product.img product
.... (and so on)
You will get the output like these screenshots:
For building a new image, we need to set a timestamp for all files included. I use 1230764400 as it equals the original file timestamp in erofs image. DO NOT forget to replace %FS_SIZE% with your real fs size you want. So go with the following command:
Code:
***DO NOT COPY!***
Example:
System:
make_ext4fs -J -T 1230764400 -S system/config/system_file_contexts -l %FS_SIZE% -C system/config/system_fs_config -L system -a system system_a.img system/system
Vendor:
make_ext4fs -J -T 1230764400 -S vendor/config/vendor_file_contexts -l %FS_SIZE% -C vendor/config/vendor_fs_config -L vendor -a vendor vendor_a.img vendor/vendor
For odm, product, system_ext, vendor_dlkm...... and other partitions, use the same step.
You should get the output like these screenshots:
When you completed the steps above you should have the images in ext4 format. Then make a folder named "new_ext4" and move the new image files (_a suffix) to the new_ext4 folder. Make sure all partitions' images are correctly rebuilt.
Copy the _b blank files toghether with new built _a images:
4. Push the folder that contains your image to /data/local/tmp again. In my case use this command:
Code:
adb push new_ext4 /data/local/tmp/new_ext4
Then check whether the new folder exists in the correct place. DO NOT forget to use e2fsck -yf to fix any errors of the new images before joining them into a super image.
5. Now we have all partitions unlocked and corrected but we need to join them into a single "super_new.img" for flashing. Use the lpmake tool to create the new "super_new.img". Again, DO NOT forget to replace %SUPER_SIZE% with your super partition's physical size (the size of super_orig.img) , and replace mulitiple %SIZE% with the real size of your new built ext4 images (with _a suffix) .
Code:
***DO NOT COPY!***
cd /data/local/tmp/new_ext4
../tools/lpmake --output super_new.img --sparse --metadata-size 65536 --super-name super --metadata-slots 2 --device super:%SUPER_SIZE% --group slot_a:%SUPER_SIZE% --group slot_b:0 --partition system_a:none:%SIZE%:slot_a --image system_a=./system_a.img --partition vendor_a:none:%SIZE%:slot_a --image vendor_a=./vendor_a.img --partition product_a:none:%SIZE%:slot_a --image product_a=./product_a.img --partition system_ext_a:none:%SIZE%:slot_a --image system_ext_a=./system_ext_a.img --partition odm_a:none:%SIZE%:slot_a --image odm_a=./odm_a.img --partition vendor_dlkm_a:none:%SIZE%:slot_a --image vendor_dlkm_a=./vendor_dlkm_a.img --partition odm_b:none:0:slot_b --image odm_b=./odm_b.img --partition system_b:none:0:slot_b --image system_b=./system_b.img --partition vendor_b:none:0:slot_b --image vendor_b=./vendor_b.img --partition product_b:none:0:slot_b --image product_b=./product_b.img --partition system_ext_b:none:0:slot_b --image system_ext_b=./system_ext_b.img --partition vendor_dlkm_b:none:0:slot_b --image vendor_dlkm_b=./vendor_dlkm_b.img
In the command we use --sparse parameter to let the new joined super image sparse, for the following fastboot flash.
6. Pull the new super_new.img to the computer. Do the fastboot flash. Erase the super partition and flash the new image.
Code:
adb pull /data/local/tmp/new_ext4/super_new.img
fastboot erase super
fastboot flash super super_new.img
Now the partitions inside super should already have full r/w capability. Reboot the phone to check whether they can be mounted as r/w.
Voila!
All tools are provided as attachments.
Password: super-rw
If you think it's useful, please click the "Like" button. Thanks!
Reserved floor #2.
Reserved floor #3.
\unlock-super>erofsUnpackRust Download/product.img product
erofsUnpack 1.3.211216
<E> erofs: cannot find valid erofs superblock
thread '<unnamed>' panicked at 'read erofs super block failed', src\lib.rs:168:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
getting this error in vendor extracting
C:\unlock-super>erofsUnpackRust Download/product.img product
erofsUnpack 1.3.211216
<E> erofs: cannot find valid erofs superblock
thread '<unnamed>' panicked at 'read erofs super block failed', src\lib.rs:168:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
now this is
unlock-super>make_ext4fs -J -T 1230764400 -S system/config/system_file_contexts -l 626733056 -C system/config/system_fs_config -L system -a system system_a.img system/system
loaded 3141 fs_config entries
Creating filesystem with parameters:
Size: 626733056
Block size: 4096
Blocks per group: 32768
Inodes per group: 7664
Inode size: 256
Journal blocks: 0
Label: system
Blocks: 153011
Block groups: 5
Reserved block group size: 39
error: ext4_allocate_best_fit_partial: failed to allocate 4720 blocks, out of space?
Failed to create image system_a.img, removing it
Mr Hassan said:
now this is
unlock-super>make_ext4fs -J -T 1230764400 -S system/config/system_file_contexts -l 626733056 -C system/config/system_fs_config -L system -a system system_a.img system/system
loaded 3141 fs_config entries
Creating filesystem with parameters:
Size: 626733056
Block size: 4096
Blocks per group: 32768
Inodes per group: 7664
Inode size: 256
Journal blocks: 0
Label: system
Blocks: 153011
Block groups: 5
Reserved block group size: 39
error: ext4_allocate_best_fit_partial: failed to allocate 4720 blocks, out of space?
Failed to create image system_a.img, removing it
Click to expand...
Click to collapse
The size setting of your new ext4 img is too small. Consider a larger value.
EDIT: Normally, your files maybe 2GB+ larger than the erofs img. Check your files' real size and give a good value to -l parameter.
Yuki1001 said:
The size setting of your new ext4 img is too small. Consider a larger value.
EDIT: Normally, your files maybe 2GB+ larger than the erofs img. Check your files' real size and give a good value to -l parameter.
Click to expand...
Click to collapse
My ext have around 900mb
And vendor something like 1400mb
And both are getting same error
I thought maybe big size i just try remove some file but still same
If its small size issue then how can increase or large it?
Or should i merge both partitions on same but i don't think it'll be possible
Mr Hassan said:
My ext have around 900mb
And vendor something like 1400mb
And both are getting same error
I thought maybe big size i just try remove some file but still same
If its small size issue then how can increase or large it?
Or should i merge both partitions on same but i don't think it'll be possible
Click to expand...
Click to collapse
Would you like to take some screenshots of your extracted folder's size and the original image's size?
PS: After calculating all your files' total size, I recommend you to reserve at least 500MB+ free space inside your new ext4 image.
Mr Hassan said:
My ext have around 900mb
And vendor something like 1400mb
And both are getting same error
I thought maybe big size i just try remove some file but still same
If its small size issue then how can increase or large it?
Or should i merge both partitions on same but i don't think it'll be possible
Click to expand...
Click to collapse
You on oos 11 ?oos 11 have no erofs
Oos 12 have erofs
ChrisFeiveel84 said:
You on oos 11 ?oos 11 have no erofs
Oos 12 have erofs
Click to expand...
Click to collapse
Ofcourse I'm in os12
Yuki1001 said:
Would you like to take some screenshots of your extracted folder's size and the original image's size?
PS: After calculating all your files' total size, I recommend you to reserve at least 500MB+ free space inside your new ext4 image.
Click to expand...
Click to collapse
Sure tomorrow I'll send you the screen shot of unpack and img both images
Yuki1001 said:
Before we start: This guide is for Android power users that wish to make their Android 12+ read-only system/vendor.... partitions with EROFS filesystem inside super read-writeable again to remove the bloatware and do more customizations to their device.
Click to expand...
Click to collapse
Yuki1001 said:
Now the partitions inside super should already have full r/w capability. Reboot the phone to check whether they can be mounted as r/w.
Click to expand...
Click to collapse
Hi @Yuki1001
Please keep up the great work! The more people have RW access to their own devices the better for the open source community!
If you want to integrate your erofs fix into my script please contact me! Of course you will be properly credited!
Well its not looks like yours kind of
But you know better
But its good thing if he helping people's with a different way
I personally like this thread becoz i just want to make one vendor rw
And then I'm able to boot after flash
edited remove quote on @
Yuki1001 request
and today its not even unpack dont know where doing mistake
unlock-super>erofsUnpackRust Download/vendor.img vendor
erofsUnpack 1.3.211216
<E> erofs: cannot find valid erofs superblock
thread '<unnamed>' panicked at 'read erofs super block failed', src\lib.rs:168:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Reserved floor#16.
Mr Hassan said:
and today its not even unpack dont know where doing mistake
unlock-super>erofsUnpackRust Download/vendor.img vendor
erofsUnpack 1.3.211216
<E> erofs: cannot find valid erofs superblock
thread '<unnamed>' panicked at 'read erofs super block failed', src\lib.rs:168:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Click to expand...
Click to collapse
I had problems extracting my vendor.img using others' erofs unpack tools. Only the erofsunpackrust.exe works. Maybe your vendor.img is special? (which means you need to try other erofs unpack tools for luck)
Yuki1001 said:
I had problems extracting my vendor.img using others' erofs unpack tools. Only the erofsunpackrust.exe works. Maybe your vendor.img is special? (which means you need to try other erofs unpack tools for luck)
Click to expand...
Click to collapse
but same thing i used before and works for me and you see upper results
anyway now is there any other erofs avaliable to test?
Yuki1001 said:
Would you like to take some screenshots of your extracted folder's size and the original image's size?
PS: After calculating all your files' total size, I recommend you to reserve at least 500MB+ free space inside your new ext4 image.
Click to expand...
Click to collapse
here,s the size of vendor unpack and repack
Mr Hassan said:
View attachment 5716687View attachment 5716689
here,s the size of vendor unpack and repack
Click to expand...
Click to collapse
So you could to set the ext4 vendor image to 2G. 2G = 2147483678 bytes. Try to set the -l parameter to 2147483648.