Related
just wondering if anyone can help me out here, i was trying to flash the cyanogen hero recovery image to my phone using fastboot so i erased my stock recovery image, only to get the message "remote: signature verify fail" so im now stuck with no recovery image and dont know how to get it back, can anyone help me out please?
ok so i managed to mount my system as read write in fastboot and put the recovery.img from the wwe version in to system which has gave me my recovery back but when i boot it just stays on the hero screen and says fastboot usb at the top if i have it plugged into my pc. i have no idea how to reset the original files and i didnt back up, can anyone help me pleas?
Well after trying for hours to fix this, I give up. I can't install the system.img from wwe rom posted on here it says verify failed or something similar so I stupidly tried to flash the magic 32a heroski port hoping it would work and still nothing. Is there anyway someone could post there nandroid backup file and help me flash it to see if that works? Or should I just give up. I'm really stuck now lol
you can't flash anything from fastboot because the images need to be signed.
what version of hero do you have?
if you have the wwe hero(it's not needed ) i can send you (later, now i'm at work) my nandroid backup (system,boot,recovery, splash...) so you can restore them
I have the orange hero. I used fastboot to load cyanogens recovery image then flashed the heroski rom hoping it might work lol so I ended up using fastboot to erase system. Question is do you think your nandroid backup would work? I sure hope so it would be a great help!!! Thanks.
i have the unlocked wwe hero. i'm uploading now the system, boot and recovery to rapidshare . it'll be up in a couple of minutes. if you find a orange hero backup you can restore in the same way ;-)
restoring hero wwe
download the backup from(it's better if you verify the md5):
http://rapidshare.com/files/263636068/bkp.rar.html
MD5: BEAE167BCBB1FF6D3D2701FB64604203
Put the contents on sdcard (i'm assuming that you put the images in a folder named bkp on the sdcard)
so:
download the recovery from here: http://rapidshare.com/files/262621147/cm-hero-recovery.img.zip and extract it
put your phone in fastboot mode (with the phone off, press the back key then turn the phone on).
then:
boot with the downloaded recovery
Code:
fastboot boot cm-hero-recovery.img
0) mount the partitions
Code:
adb shell mount /system
adb shell mount /sdcard
1) do a wipe
select the wipe option from the recovery menu
2) restore boot
Code:
adb shell flash_image boot /sdcard/bkp/boot.img
3) restore recovery
Code:
adb shell flash_image recovery /sdcard/bkp/recovery.img
4)restore system
Code:
adb shell
cd /system
rm -rf * (ignore the errors)
unyaffs /sdcard/bkp/system.img
5) unmount the partitions
Code:
umount /system
6) reboot
Code:
reboot
hope it helps
Ok thanks. Have to wait 4 hours to try it as I'm in work lol, what is an md5 for, just out of curiosity?
A MD5sum is a checksum to verifiy that your downloaded file isn't corrupt.
maxisma said:
A MD5sum is a checksum to verifiy that your downloaded file isn't corrupt.
Click to expand...
Click to collapse
Ok dude makes sense thanks.
thanks
enlightener said:
download the backup from(it's better if you verify the md5):
http://rapidshare.com/files/263636068/bkp.rar.html
MD5: BEAE167BCBB1FF6D3D2701FB64604203
Put the contents on sdcard (i'm assuming that you put the images in a folder named bkp on the sdcard)
so:
download the recovery from here: http://rapidshare.com/files/262621147/cm-hero-recovery.img.zip and extract it
put your phone in fastboot mode (with the phone off, press the back key then turn the phone on).
then:
boot with the downloaded recovery
Code:
fastboot boot cm-hero-recovery.img
0) mount the partitions
Code:
adb shell mount /system
adb shell mount /sdcard
1) do a wipe
select the wipe option from the recovery menu
2) restore boot
Code:
adb shell flash_image boot /sdcard/bkp/boot.img
3) restore recovery
Code:
adb shell flash_image recovery /sdcard/bkp/recovery.img
4)restore system
Code:
adb shell
cd /system
rm -rf * (ignore the errors)
unyaffs /sdcard/bkp/system.img
5) unmount the partitions
Code:
umount /system
6) reboot
Code:
reboot
hope it helps
Click to expand...
Click to collapse
ok so i finally got time to fix my phone and just did what you said and can now happily say it worked. thanks enlightener you enlightened me lol. in future i will refrain from doing random terminal stuff without researching first lol.
Bad new : My hero is out of service area
Hello,
Sorry for my english, i'm french
I made a big mistake in my files system ... A too long story
My Hero :
HBOOT-1?76.0004
Radio-6.35.04.25
July, 3 2009
Well, now, my htc hero do not work 'first page, out of service area"... I would like to make your post, but i had error :
First, fastboot Ok, Adb shell mount system and sdcard ok, wipe ok
Second, when i do this code" adb shell flash_image boot /sdcard/bkp/boot.img", my hero "said" : "header is the same, note flashing boot". Same thing for restore recovery
Can you help me ?
pitou21 said:
Hello,
Sorry for my english, i'm french
I made a big mistake in my files system ... A too long story
My Hero :
HBOOT-1?76.0004
Radio-6.35.04.25
July, 3 2009
Well, now, my htc hero do not work 'first page, out of service area"... I would like to make your post, but i had error :
First, fastboot Ok, Adb shell mount system and sdcard ok, wipe ok
Second, when i do this code" adb shell flash_image boot /sdcard/bkp/boot.img", my hero "said" : "header is the same, note flashing boot". Same thing for restore recovery
Can you help me ?
Click to expand...
Click to collapse
in this case, you don't have to restore boot or recovery because they are the same as the images posted here.
proceed with system
Ok thanks, now it's goog !
so...i'm behide the curve on on this hero stuff (being a rom cook for the s200 i'm not complete clueless...but thats winmo)
Anyway i'm playing around and would love an answer on these from one of the resident dev's on here
1. i took boot.img from the RUU rom.zip of wwe 2.73.405.61, took the system.img, did the magic to create an update.zip, which seems to flash fine from a recovery rom BUT on reboot it's stuck on the Hero boot screen/logo, any clue as to where to look/debug (yes I did the wipe etc. etc. it must be something about the update.zip / boot.img i'm missing)
2. i assume there is still no way to re-sign the a changed RUU rom.zip ?
Thanks for your time !
1: extract the system with unyaffs
2: zip the contents of the extracted system
3: sign the resulting zip (androsign or whatever)
boot into recovery
4: copy over to sdcard
5: copy over boot.img also to sdcard
6: cat /dev/zero > /dev/mtd/mtd2
or
dd if=/dev/zero of=/dev/mtd/mtd2
whichever you prefer
7: flash_image boot /sdcard/boot.img
8: flash your update.zip or whatever you called it
9: wipe system (format DATA: & CACHE
OR
flash_image system system.img (might not work)
adwinp said:
1: extract the system with unyaffs
2: zip the contents of the extracted system
3: sign the resulting zip (androsign or whatever)
boot into recovery
4: copy over to sdcard
5: copy over boot.img also to sdcard
6: cat /dev/zero > /dev/mtd/mtd2
or
dd if=/dev/zero of=/dev/mtd/mtd2
whichever you prefer
7: flash_image boot /sdcard/boot.img
8: flash your update.zip or whatever you called it
9: wipe system (format DATA: & CACHE
OR
flash_image system system.img (might not work)
Click to expand...
Click to collapse
Thanks, i got that far, but rolling the whole thing (so boot.img + extracted system.img) into update.zip and flashing that from a recovery image is where it goes all tits up and doesn't boot, even tried without any changes and just taking the boot.img and system.img from a offical htc rom and creating an update.zip
so i must be doing something wrong but can't put my finger where it goes wrong.
anycase, i'll keep trying
thx
1: Did you sign your update.zip?
2: An update.zip usually contains an update script; did you write one too?
This is why I suggested you flash manually.
adwinp said:
1: Did you sign your update.zip?
2: An update.zip usually contains an update script; did you write one too?
This is why I suggested you flash manually.
Click to expand...
Click to collapse
both answers yes
still digging, but it could be that "something" in the update script isn't working, however i've copied one from a working rom, with the same results...
going through the script now....i'm sure it's something stupid and i'll smack my head later, but for now no go......thanks for your tips and time !
Edit:
is there something special you need to do with the boot.img if you just copy (unzip thats it) from a rom.zip and put it in the update.zip ??
Jesterz said:
Edit:
is there something special you need to do with the boot.img if you just copy (unzip thats it) from a rom.zip and put it in the update.zip ??
Click to expand...
Click to collapse
Either you push it to sdcard and
#flash_image boot /sdcard/boot.img
or
in the update.zip:
META-INF\com\google\android\update-script
where META-INF is a folder in the root, and update-script is a text file without file extension; its contents should be:
show_progress 0.1 0
write_raw_image PACKAGE:boot.img BOOT:
show_progress 0.1 10
So, the contents should be:
\META-INF\
com\
google\
android\update-script
\boot.img
zip all that into update.zip, and sign the zip.
Hi,
As you probably know, ext4 image can be extracted from system.sin but cannot be mounted. When trying to mount it, it fails with :
[ 1476.821582] EXT4-fs (loop0): bad geometry: block count 262144 exceeds size of device (144631 blocks)
I open this thread just to share what I did around the issue and maybe have some helpful quotes about it
Here is what I did (under linux)
# First create an zero filled file. Size is system partition size (262144 blocks of 4096 each)
dd if=/dev/zero of=/home/xperia/virtualfs bs=4096 count=262144
# Attach file to loopback
sudo losetup /dev/loop0 /home/xperia/virtualfs
# Format it with same features as system partition on phone
sudo mkfs.ext4 -O has_journal,^ext_attr,^dir_index,^flex_bg,^huge_file,resize_inode,filetype,extent,sparse_super,large_file,^uninit_bg,^dir_nlink,^extra_isize -v /dev/loop0
# Write extracted system.sin.ext4 extracted image to loopback
sudo dd if=system.sin.ext4 of=/dev/loop0
# Mount filesystem
sudo mount /dev/loop0 /mnt
It can be mounted and I can have folder structure but I can't work with files. Editing default.prop gives me a non readable file.
But we can go a step ahead as we can now mount the image.
Still some issues have to be worked out.
The poit is, why we cant mount system.img on ICS but we can on GB?
maybe someone can contact with sony t oask
im extracting the .sin to .img like always but its impossible to mount.. what are you using to extract the .sin to a .ext4?
BTW, thanks for the info, i've been trying to modify system.img since ICS appeared.
EDIT: of, ext4 can be extracte with flashtool ~.~
maybe we need to read something from system.partinfo
Yakandu said:
The poit is, why we cant mount system.img on ICS but we can on GB?
maybe someone can contact with sony t oask
im extracting the .sin to .img like always but its impossible to mount.. what are you using to extract the .sin to a .ext4?
BTW, thanks for the info, i've been trying to modify system.img since ICS appeared.
EDIT: of, ext4 can be extracte with flashtool ~.~
maybe we need to read something from system.partinfo
Click to expand...
Click to collapse
Yes Flashtool can extract image from system.sin.
partinfo is partition information used by loader in flashmode to identify where to flash image on phone. (Something like start nand address of system partition)
so, any ideas why ext4 cant be mounted? maybe its encrypted or something..
Sorry for double post, i found a solution
Flash the system through a .ftf with flashtools
Flash a custom kernel with recovery (or the nozomi recovery)
Backup nandroid
We get a system.ext4.tar ··· move it to your developement folder
Create a folder (mkdir system)
Enter nautilus with root acces
Extract system files to the created folder
Modify whatever you want
Make a flashable system.img with: "./mkuserimg.sh -s /system ./system.img ext4 ./temp 1024M"
AND ITS WORKING!
Yakandu said:
Sorry for double post, i found a solution
Flash the system through a .ftf with flashtools
Flash a custom kernel with recovery (or the nozomi recovery)
Backup nandroid
We get a system.ext4.tar ··· move it to your developement folder
Create a folder (mkdir system)
Enter nautilus with root acces
Extract system files to the created folder
Modify whatever you want
Make a flashable system.img with: "./mkuserimg.sh -s /system ./system.img ext4 ./temp 1024M"
AND ITS WORKING!
Click to expand...
Click to collapse
This solution is already known
But my goal is to be able to mod a system partition without having to flash it before. And more, understand why extracted system image cannot be mounted and how to work this out
oh, ok xD
i didnt know that solution, its new for me
Yakandu said:
Sorry for double post, i found a solution
Flash the system through a .ftf with flashtools
Flash a custom kernel with recovery (or the nozomi recovery)
Backup nandroid
We get a system.ext4.tar ··· move it to your developement folder
Create a folder (mkdir system)
Enter nautilus with root acces
Extract system files to the created folder
Modify whatever you want
Make a flashable system.img with: "./mkuserimg.sh -s /system ./system.img ext4 ./temp 1024M"
AND ITS WORKING!
Click to expand...
Click to collapse
Have you already tried flashing this img on your device? I have already tried this solution twice but didn't succeed (@Spectre51 that's why I haven't replied your PM yet). system.img was succesfully created but I got boot loop when I flashed it on my device.
Hi Androxyde,
I figured it out, basically we have to dig further in sin format as new ext4 sins skips part of the file. See my thread for more details.
PS: Thanks for flashtool, it's a great tool!
LeTama
letama said:
Hi Androxyde,
I figured it out, basically we have to dig further in sin format as new ext4 sins skips part of the file. See my thread for more details.
PS: Thanks for flashtool, it's a great tool!
LeTama
Click to expand...
Click to collapse
:good:
As this questions pops up every single month, I'm putting this information into a separate topic. It is for everyone who followed the Magisk A/B OTA update guide and OTA update still fails to install. https://github.com/topjohnwu/Magisk/blob/master/docs/tutorials.md
The usual culprit is TWRP - if you booted into TWRP and allowed system modifications (even once), OTA update won't install. The second common suspect is one of apps with root access, which might have tampered the system partition (AdAway or some other old apps).
Use these commands as root from ADB shell or terminal emulator on the phone and look for mount count (has to be 0) and last mount time (must be n/a). Anything else means that system partition has been mounted as R/W and you MUST reflash stock system.img manually.
Code:
[I][B]tune2fs -l /dev/block/sda12
tune2fs -l /dev/block/sda13[/B][/I]
sda12 is system_a, sda13 is system_b
Example of untouched system:
Code:
Filesystem created: Wed Dec 31 17:00:00 2008
Last mount time: n/a
Last write time: Wed Dec 31 17:00:00 2008
Mount count: 0
Maximum mount count: -1
Last checked: Wed Dec 31 17:00:00 2008
How to fix - reflash system.img with the same version as currently running (or reflash everything with newer ROM):
Option #1
- download full OTA zip (not the incremental one, size must be above 1gb)
- and this Windows tool https://androidfilehost.com/?fid=818070582850510260
- extract both and put payload.bin into payload_input folder. Then run payload_dumper.exe. Once it completes the job, you'll find all images which can be flashed via fastboot.
- flash system.img to the active partition
- install OTA update
Option #2
- set A as active partition
- download, extract and run flash_all_except_data_storage.bat from stock Fastboot ROM
- root with Magisk patched boot.img and apply OTA with the usual Magisk A/B OTA procedure
Before flashing, backup your important data, one can be never sure enough.
flash_all_except_storage.bat = flash_all_except_data_storage.bat
I have a few questions about this method of yours.
1) I downloaded the fastboot rom from this thread but I can't find the payload.bin mentioned in the first method. Did I download the right thing? All I can see are *.img files and system.img is there too. Can I flash that one?
2) I have both TWRP and magisk installed currently. Will I lose them if I follow your method? How should I go if I wanted to keep them?
3) Of course you advice us to make a backup beforehand. Can you tell me or link me a guide about how to backup and restore properly with the new A/B partion in the way?
I'm sorry for asking this much, but all the guides I'm following are either confusing or with conflicting info.
Thank you for the help, I just can't wrap my head around this dual partion thing :s
SirAugustin said:
I have a few questions about this method of yours.
1) I downloaded the fastboot rom from this thread but I can't find the payload.bin mentioned in the first method. Did I download the right thing? All I can see are *.img files and system.img is there too. Can I flash that one?
2) I have both TWRP and magisk installed currently. Will I lose them if I follow your method? How should I go if I wanted to keep them?
3) Of course you advice us to make a backup beforehand. Can you tell me or link me a guide about how to backup and restore properly with the new A/B partion in the way?
I'm sorry for asking this much, but all the guides I'm following are either confusing or with conflicting info.
Thank you for the help, I just can't wrap my head around this dual partion thing :s
Click to expand...
Click to collapse
1. Fastboot ROM can be used straight away (Option #2).
2. Well, the point of this guide is to restore phone to stock images, so you can install OTA update. TWRP can't be kept. You can flash Magisk without TWRP though.
3. Titanium backup pro is my #1 backup tool for years, except very few exceptions it can backup and restore all apps and their settings. Data partition is only one, so you might have luck using TWRP backup - I haven't tried it.
Thank you kindly for all the info. These days I will try the method you described. ?
_mysiak_ said:
As this questions pops up every single month, I'm putting this information into a separate topic. It is for everyone who followed the Magisk A/B OTA update guide and OTA update still fails to install. https://github.com/topjohnwu/Magisk/blob/master/docs/tutorials.md
The usual culprit is TWRP - if you booted into TWRP and allowed system modifications (even once), OTA update won't install. The second common suspect is one of apps with root access, which might have tampered the system partition (AdAway or some other old apps).
Use these commands as root from ADB shell or terminal emulator on the phone and look for mount count (has to be 0) and last mount time (must be n/a). Anything else means that system partition has been mounted as R/W and you MUST reflash stock system.img manually.
Code:
[I][B]tune2fs -l /dev/block/sda12
tune2fs -l /dev/block/sda13[/B][/I]
sda12 is system_a, sda13 is system_b
Example of untouched system:
Code:
Filesystem created: Wed Dec 31 17:00:00 2008
Last mount time: n/a
Last write time: Wed Dec 31 17:00:00 2008
Mount count: 0
Maximum mount count: -1
Last checked: Wed Dec 31 17:00:00 2008
How to fix - reflash system.img with the same version as currently running (or reflash everything with newer ROM):
Option #1
- download full OTA zip (not the incremental one, size must be above 1gb)
- and this Windows tool https://androidfilehost.com/?fid=818070582850510260
- extract both and put payload.bin into payload_input folder. Then run payload_dumper.exe. Once it completes the job, you'll find all images which can be flashed via fastboot.
- flash system.img to the active partition
- install OTA update
Option #2
- set A as active partition
- download, extract and run flash_all_except_data_storage.bat from stock Fastboot ROM
- root with Magisk patched boot.img and apply OTA with the usual Magisk A/B OTA procedure
Before flashing, backup your important data, one can be never sure enough.
Click to expand...
Click to collapse
I tried method 1, OTA installation still shows Error message
What next?
oseraphaels said:
I tried method 1, OTA installation still shows Error message
What next?
Click to expand...
Click to collapse
If you are running custom kernel, flash the stock boot.img to boot partition as well.
oseraphaels said:
I tried method 1, OTA installation still shows Error message
What next?
Click to expand...
Click to collapse
Was your system partition mounted as RW in the first place? Is it still untouched? Some apps with root access can still mount it as RW, even if you reflash system.img.
Frank.G said:
If you are running custom kernel, flash the stock boot.img to boot partition as well.
Click to expand...
Click to collapse
I have stock boot img running, still ota install failed
---------- Post added at 10:25 AM ---------- Previous post was at 10:22 AM ----------
_mysiak_ said:
Was your system partition mounted as RW in the first place? Is it still untouched? Some apps with root access can still mount it as RW, even if you reflash system.img.
Click to expand...
Click to collapse
I fastboot flash_all.bat , I think this should mount all ROM segments, including system partitions
I fast boot flashed the latest ROM v11.0.15 and it works perfectly.
_mysiak_ said:
Was your system partition mounted as RW in the first place? Is it still untouched? Some apps with root access can still mount it as RW, even if you reflash system.img.
Click to expand...
Click to collapse
I can't find any apps that may be mounting system partition.
Is there a way to find out?
oseraphaels said:
I can't find any apps that may be mounting system partition.
Is there a way to find out?
Click to expand...
Click to collapse
Yes, compare the last mount timestamp and Magisk log. You will see which app used root access at that time.
oseraphaels said:
As this questions pops up every single month, I'm putting this information into a separate topic. It is for everyone who followed the Magisk A/B OTA update guide and OTA update still fails to install. https://github.com/topjohnwu/Magisk/blob/master/docs/tutorials.md
The usual culprit is TWRP - if you booted into TWRP and allowed system modifications (even once), OTA update won't install. The second common suspect is one of apps with root access, which might have tampered the system partition (AdAway or some other old apps).
Use these commands as root from ADB shell or terminal emulator on the phone and look for mount count (has to be 0) and last mount time (must be n/a). Anything else means that system partition has been mounted as R/W and you MUST reflash stock system.img manually.
sda12 is system_a, sda13 is system_b
Example of untouched system:
I tried method 1, OTA installation still shows Error message
What next?
Click to expand...
Click to collapse
Flash ota ROM in recovery
Rajendran Rasa said:
Flash ota ROM in recovery
Click to expand...
Click to collapse
Thank you very much
I fastboot flashed the latest ROM and my device works perfectly
Hi,
I have similar issue. My current version is V11.0.1.0.QFQEUXM. The system update show can't install update.
I get the stock version of V11.0.1.0.QFQEUXM fastboot room, and get the system.img. Then I flash it into my current active slot - b. After reboot, I still get can't install update.
The specific error is W update_engine: [0615/084826.432657:WARNING:mount_history.cc(66)] Device was remounted R/W 1 times. Last remount happened on 2020-05-15 10:30:34.000 UTC.
The remount is cause by TWRP.
Is there other suggestion?
Flash ota ROM in recovery
Click to expand...
Click to collapse
Tried to sideload V11.0.2.0.QFQEUXM OTA.zip, but error also.
Thanks.
JackVoo said:
Hi,
I have similar issue. My current version is V11.0.1.0.QFQEUXM. The system update show can't install update.
I get the stock version of V11.0.1.0.QFQEUXM fastboot room, and get the system.img. Then I flash it into my current active slot - b. After reboot, I still get can't install update.
The specific error is W update_engine: [0615/084826.432657:WARNING:mount_history.cc(66)] Device was remounted R/W 1 times. Last remount happened on 2020-05-15 10:30:34.000 UTC.
The remount is cause by TWRP.
Is there other suggestion?
Tried to sideload V11.0.2.0.QFQEUXM OTA.zip, but error also.
Thanks.
Click to expand...
Click to collapse
You've found the culprit already.. Do NOT use TWRP to flash images, it must be done via fastboot.
_mysiak_ said:
You've found the culprit already.. Do NOT use TWRP to flash images, it must be done via fastboot.
Click to expand...
Click to collapse
Hi, the remount is at 15-May. Which I try to fix this issue.
I use fastboot to flash the system.img, but it still mentioned about "remount R/W".
After that, I boot into stock recovery and sideload the OTA.zip, still fail
Thanks
JackVoo said:
Hi, the remount is at 15-May. Which I try to fix this issue.
I use fastboot to flash the system.img, but it still mentioned about "remount R/W".
After that, I boot into stock recovery and sideload the OTA.zip, still fail
Thanks
Click to expand...
Click to collapse
You probably forgot to flash something (or used incorrect image). Just download the latest fastboot image, switch to slot A and flash it all (except storage).
Try flashing with V11.0.1.0.QFQEUXM boot.img and system.img at slot A and B, still couldn't update.
Will try to flash all with the V11.0.2.0.QFQEUXM.
Update status:
I finally solve this issue.
I flash the new fastboot ROM into slot A, my current active is slot B.
Thanks for help.
help please
doing these steps will erase my data like factory reset?
if yes, then how can i install ota without losinig any data
_mysiak_ said:
As this questions pops up every single month, I'm putting this information into a separate topic. It is for everyone who followed the Magisk A/B OTA update guide and OTA update still fails to install. https://github.com/topjohnwu/Magisk/blob/master/docs/tutorials.md
The usual culprit is TWRP - if you booted into TWRP and allowed system modifications (even once), OTA update won't install. The second common suspect is one of apps with root access, which might have tampered the system partition (AdAway or some other old apps).
Use these commands as root from ADB shell or terminal emulator on the phone and look for mount count (has to be 0) and last mount time (must be n/a). Anything else means that system partition has been mounted as R/W and you MUST reflash stock system.img manually.
Code:
[I][B]tune2fs -l /dev/block/sda12
tune2fs -l /dev/block/sda13[/B][/I]
sda12 is system_a, sda13 is system_b
Example of untouched system:
Code:
Filesystem created: Wed Dec 31 17:00:00 2008
Last mount time: n/a
Last write time: Wed Dec 31 17:00:00 2008
Mount count: 0
Maximum mount count: -1
Last checked: Wed Dec 31 17:00:00 2008
How to fix - reflash system.img with the same version as currently running (or reflash everything with newer ROM):
Option #1
- download full OTA zip (not the incremental one, size must be above 1gb)
- and this Windows tool https://androidfilehost.com/?fid=818070582850510260
- extract both and put payload.bin into payload_input folder. Then run payload_dumper.exe. Once it completes the job, you'll find all images which can be flashed via fastboot.
- flash system.img to the active partition
- install OTA update
Option #2
- set A as active partition
- download, extract and run flash_all_except_data_storage.bat from stock Fastboot ROM
- root with Magisk patched boot.img and apply OTA with the usual Magisk A/B OTA procedure
Before flashing, backup your important data, one can be never sure enough.
Click to expand...
Click to collapse
Thanks for the post.
When i ran flash system.img is says partition unknown!
How to backup partition images with dd on the command line (root required)
We don't currently have a working custom recovery for the Xperia 10 III, but if you have root there's a simple method to dump partition images.
This is a very good idea and you should do it at least once, especially if you like to mess around the device a lot.
You won't be able to do this before you root, so by the time you do some partitions will not be stock anymore. Use XperiFirm instead to get the clean stock images.
Special partitions:
The userdata partition holds all your personal files and system settings. It's huge (about 105 GB) and obviously you can't dump it into itself. You can dump it on an SD card if it's 128+ GB.
The super partition is a physical partition that contains several logical partitions (including system and vendor) That's why you won't find those in the partition list. This is done on Android 10+ devices to allow those logical partitions to be resized or rearranged as needed. You don't need to split out the internal logical partitions, you can flash back the entire super partition. The stock firmware also comes with a super image, not individual logical partitions.
Using a helper script:There's a Magisk module called Backup (by Draco) which gives you a command line shell script you can use if you prefer. It mostly does the same things I described above. The script is here if anybody wants to just grab it directly.
On the plus side, the script knows to dump only the active A/B image (which is the one that interests you most). On the flip side, it doesn't have a feature to skip userdata.
So here is a shell command that will use the backup script to dump all partitions, but only those matching your device's active A/B slot, and skips userdata:
Code:
backup $(ls /dev/block/bootdevice/by-name/ | grep -v userdata | sed 's/_[ab]$//')
And here's one that also skips super:
Code:
backup $(ls /dev/block/bootdevice/by-name/ | grep -v userdata | grep -v super | sed 's/_[ab]$//')
How to dump partitions manually:If you can't/won't use the helper script you can do it by hand. All the following commands need root:
Find the names of all the partitions:
Code:
ls /dev/block/bootdevice/by-name/
Dump one specific partition identified by NAME:
Code:
dd if=/dev/block/bootdevice/by-name/NAME of=NAME.img
Dump all partitions except userdata:
Code:
ls /dev/block/bootdevice/by-name/ | grep -v userdata | while read NAME; do echo dd if=/dev/block/bootdevice/by-name/${NAME} of=${NAME}.img; done
Find the active slot:
Code:
getprop ro.boot.slot_suffix
Get checksums for all the images after the dump:
Code:
md5sum *.img
Confused about _a and _b partitions?You should read about A/B Seamless Updates.
Long story short, some partitions have two copies eg. boot_a and boot_b. When you boot up the device you use the partitions in one slot (eg. the _a partitions). When an OTA update is being downloaded, it writes into the partitions for the other slot (eg. the _b partitions). Your phone can stay in use while this happens. If the OTA fails nothing is broken, you just keep using the good slot partitions. After the OTA is successful you switch to the other slot and also have the previous version in the other slot in case you need to switch back.
This means that some of the _a and _b images for the same partition can be different for you! So it's strongly recommended to do the checksums, and also to find out which is your active slot, so you know which partitions you're using right now.
I used a 128 GB card to take a backup of userdata. The backup script had some trouble with the backup location being on the storage card for some reason and I didn't have time to figure it out, but the dd command I gave above worked fine.
Code:
# time dd if=/dev/block/bootdevice/by-name/userdata of=userdata.img
112111374336 bytes (104 G) copied, 2342.274225 s, 46 M/s
39m02.31s real 1m11.78s user 14m44.72s system
Code:
# adb pull /storage/1234-ABCD/backup/userdata.img ./
/storage/1234-ABCD/backup/userdata.img: 1 file pulled, 0 skipped.
87.2 MB/s (112111374336 bytes in 1225.663s)
So that's 104 GB that took 39 minutes to be written to a new Samsung Evo U3/V30 microSDXC (46 MB/sec real write speed) and 20 minutes to be read to the PC (Samsung Evo M.2) with adb pull over USB (87 MB/sec read speed). Just so you know what you're in for.
I was looking into whether I could speed up the process of taking userdata snapshots by dumping the partition directly to the PC, but you need to be root to access the device block. The stock ROM doesn't allow the command adb root, but I found this blog post which made me realize you can run a su -c command that asks dd to write to stdout and just pipe the output to a file. The post author has also made this helpful Python script which lets you do pulls and pushes with root-only files.
If you want to run the command directly (I've only tested on Linux, no idea if it works on PowerShell but it might):
Code:
# adb shell "su -c" "dd if=/dev/block/bootdevice/by-name/userdata" > userdata.img
If you want to use the Python script:
Code:
# adb-root.py pull /dev/block/bootdevice/by-name/userdata userdata.img
Using the same fast SSD on the PC side as above, I now get:
Code:
218967528+0 records in
218967528+0 records out
112111374336 bytes (104 G) copied, 1077.681097 s, 99 M/s
real 17m57.910s
So that's roughly 15 minutes compared to 1 hour total with the previous method and you don't need to have a 128 GB SD card anymore.
Are you able to switch to a different backup location? Say a USB OTG if possible.
mikeshutte said:
Are you able to switch to a different backup location? Say a USB OTG if possible.
Click to expand...
Click to collapse
With dd yes, simply move to the directory you want before you call dd.
The backup script is bugged and seems to ignore the -d parameter for the backup location so it always uses /sdcard/backup. (I think it might be expecting a different version of getopts...) Normally I would say to try creating a symlink from /sdcard/backup to the OTG storage but the ln utility is also behaving strangely and I can't make any symlinks (even with root).
wirespot said:
With dd yes, simply move to the directory you want before you call dd.
The backup script is bugged and seems to ignore the -d parameter for the backup location so it always uses /sdcard/backup. (I think it might be expecting a different version of getopts...) Normally I would say to try creating a symlink from /sdcard/backup to the OTG storage but the ln utility is also behaving strangely and I can't make any symlinks (even with root).
Click to expand...
Click to collapse
Ok I'll give it a try and see what happens. Thanks for your help.
Hi, I'm used to TWRP backups, so I don't really understand this tool. I've backedup everything except the massive userdata partition. If needed, how would I restore this? Is the userdata partition required when I have all the others?
Thanks!
jakito said:
Hi, I'm used to TWRP backups, so I don't really understand this tool. I've backedup everything except the massive userdata partition. If needed, how would I restore this? Is the userdata partition required when I have all the others?
Thanks!
Click to expand...
Click to collapse
This is basically the same thing that TWRP does, dd is a command line Linux tool that makes a "raw" copy of a partition.
Restoration is a bit more tricky. In theory you can simply dump the raw backup copy over the partition. The problem is that it's not ok to do it while the system is running. Typically it's done by booting into recovery (TWRP) and overwriting the partition from there.
Another method for restore is to use fastboot, which is an alternative tool you can boot into that only does one thing, write partitions. But fastboot is typically locked by the vendor to only write signed images, so it can only be used to write official release ROMs.
There are some limited uses for fastboot, such as overwriting the boot partition, which is not checked for signature anymore once you've unlocked the bootloader. So if you want to experiment with unofficial kernels and mess something up you can always restore a good boot partition with fastboot.
TLDR: for the time being until we get a working TWRP recovery the most you can do is take backups, but not restore them.
wirespot said:
This is basically the same thing that TWRP does, dd is a command line Linux tool that makes a "raw" copy of a partition.
Restoration is a bit more tricky. In theory you can simply dump the raw backup copy over the partition. The problem is that it's not ok to do it while the system is running. Typically it's done by booting into recovery (TWRP) and overwriting the partition from there.
Another method for restore is to use fastboot, which is an alternative tool you can boot into that only does one thing, write partitions. But fastboot is typically locked by the vendor to only write signed images, so it can only be used to write official release ROMs.
There are some limited uses for fastboot, such as overwriting the boot partition, which is not checked for signature anymore once you've unlocked the bootloader. So if you want to experiment with unofficial kernels and mess something up you can always restore a good boot partition with fastboot.
TLDR: for the time being until we get a working TWRP recovery the most you can do is take backups, but not restore them.
Click to expand...
Click to collapse
I see. Thank you nonetheless!
wirespot said:
This is basically the same thing that TWRP does, dd is a command line Linux tool that makes a "raw" copy of a partition.
Restoration is a bit more tricky. In theory you can simply dump the raw backup copy over the partition. The problem is that it's not ok to do it while the system is running. Typically it's done by booting into recovery (TWRP) and overwriting the partition from there.
Another method for restore is to use fastboot, which is an alternative tool you can boot into that only does one thing, write partitions. But fastboot is typically locked by the vendor to only write signed images, so it can only be used to write official release ROMs.
There are some limited uses for fastboot, such as overwriting the boot partition, which is not checked for signature anymore once you've unlocked the bootloader. So if you want to experiment with unofficial kernels and mess something up you can always restore a good boot partition with fastboot.
TLDR: for the time being until we get a working TWRP recovery the most you can do is take backups, but not restore them.
Click to expand...
Click to collapse
I don't know how I ended up but making a backup you can't restore is completely pointless.
Techguy777 said:
I don't know how I ended up but making a backup you can't restore is completely pointless.
Click to expand...
Click to collapse
No, it's not. All your data is in there. You can mount your backup on a linux computer and pull out apks as well as app data. You can then restore these folder by folder with adb and a root shell on your phone.
That beeing said, does anyone know a proper backup software like Titanium Backup for Android 11 and above? Sometimes I read recommendations, but looking at the ratings it seems that no software manages to achieve the same level of comfort and control. Also they all seem to suffer from the same limitations.
Let's be honest: Google wants to make your life hard, so they can lock you in.
@xperinaut
I'm using Titanium on Android 11. Is it not working for you?