[GUIDE]Failed OTA update installation with root/TWRP - Xiaomi Mi A3 Guides, News, & Discussion

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!

Related

[Q] After restart doesnt start

Hi,
About a month I used rom AR and I was aware of her faults (which yesterday revealed that it is not true), that when I restart, phone must be connected to the pc, and start bootloader via fastboot and the Command Promt flash boot.img dissected from ROM. Fortunately ROM, stable, so I followed all the time does not restart.
Yesterday I got a taste for change (and I wanted to get rid of the problem) and I downladed at first 4.4 ROM from xda taktik then 4.3JB and finally cyangen mod 7.2 Problem unfortunately stayed at all the same. When restarting HTC logo flashes and then turns off the display and starts "black" will flash this is over, unless we do the above procedure via the bootloader.
Does anyone an idea how to fix it?
Thnx
Have you format system + data + cache in mount and storage after wipe data cache and dalvik cache? Try this, if not success I think the only way is download the latest ruu and run it. You will be go back to stock. And we can use tools to root and flash custom recovery.
Sent from my Desire HD using Tapatalk
@Pilsner12 what the state of your phone bootloader..?, is that just unlocked with s-on..?, or already s-off..?, and what a custom recovery you used..?
if your phone is just unlocked with still s-on...did you already flashing a boot.img from the rom.zip that you already installed..?
to JJeamy:
bootloader is s-on, with touched clockworkmod 5.8.1.5, ROM cyanogen mod 7.2
if I standartly restart phone, didnt start. I must connect phone to pc, run bootloader, than fastboot and from pc via command prompt "send" boot.img (prepared from cm7.2) than phone restart and start correctly.
to pauleversham:
I will try it again (but I thing everythning expect SD card was formated, wiped, etc..) If I run RUU rom, I lost root permision, or is it possible get rooted RUU?
Pilsner12 said:
to JJeamy:
bootloader is s-on, with touched clockworkmod 5.8.1.5, ROM cyanogen mod 7.2
if I standartly restart phone, didnt start. I must connect phone to pc, run bootloader, than fastboot and from pc via command prompt "send" boot.img (prepared from cm7.2) than phone restart and start correctly.
to pauleversham:
I will try it again (but I thing everythning expect SD card was formated, wiped, etc..) If I run RUU rom, I lost root permision, or is it possible get rooted RUU?
Click to expand...
Click to collapse
so...you mean that you've already/ always flashing boot.img from the rom.zip itself after installing the rom from recovery...and that's mean your phone already can booting normally..right...?, so where's the problem exactly..?
anyway..if the problem you asked is...why you must always do a flashing boot.img manually after installing any new custom rom to boot normally is bacause you're still had s-on flag on your bootloader..that's why bootloader can't give permission to a custom recovery for flashing boot partition..
if you wanna running RUU...then you should be relocked your bootloader first..and that's mean your will return to the stock..so to rooting it again...you must unlocking your bootloader again..
Everytime, when I flash new rom, I have to flash boot.img. I know that. But problem is when I only restart phone, I need to flash boot.img otherwise phone doesnt start.
Today I find out:
- in clockworkmod I try to make a backup. Everything went great (back up boot image, recovery, system, data, android secure, cache) , but at the end I got a message: "No sd-ext found. Skipping backup of sd-ext."
Before AR rom I had many other roms and backing up and restarting without flashing wors fine.
The last hint which you give me is my last solution. I wouldnt lose my root privileges. I had a lot of trouble to get it..
Pilsner12 said:
Everytime, when I flash new rom, I have to flash boot.img. I know that. But problem is when I only restart phone, I need to flash boot.img otherwise phone doesnt start.
Today I find out:
- in clockworkmod I try to make a backup. Everything went great (back up boot image, recovery, system, data, android secure, cache) , but at the end I got a message: "No sd-ext found. Skipping backup of sd-ext."
Before AR rom I had many other roms and backing up and restarting without flashing wors fine.
The last hint which you give me is my last solution. I wouldnt lose my root privileges. I had a lot of trouble to get it..
Click to expand...
Click to collapse
maybe you can try it to installing and using a different custom recovery..like 4ext or twrp..
I would like to try use another custom recovery, but how I can Unistall cwm ? I didnt find any manual..
Pilsner12 said:
I would like to try use another custom recovery, but how I can Unistall cwm ? I didnt find any manual..
Click to expand...
Click to collapse
you don't need to uninstall it..just flashing a new one (like twrp or 4ext) through fastboot..then cwm will be replaced with that..
JJeamy said:
you don't need to uninstall it..just flashing a new one (like twrp or 4ext) through fastboot..then cwm will be replaced with that..
Click to expand...
Click to collapse
could you please post link, where is .zip file. I found only programs on market or .apk..
Are you booting the boot.img or flashing it? Also, recoveries are not zips, they are imgs.
Pilsner12 said:
could you please post link, where is .zip file. I found only programs on market or .apk..
Click to expand...
Click to collapse
This is a link for 4ext touch recovery here.., extract this zip file first to get recovery.img file
This is a link for TWRP touch recovery here..
just flash this recovery.img file through fastboot.. "fastboot flash recovery the_name_of_recovery.img"
JJeamy said:
This is a link for 4ext touch recovery here.., extract this zip file first to get recovery.img file
This is a link for TWRP touch recovery here..
just flash this recovery.img file through fastboot.. "fastboot flash recovery the_name_of_recovery.img"
Click to expand...
Click to collapse
Thank you for links, recovery is alerady fleshed, but problem is not fixed.
(btw: 4ext looks gorgeous )
here is log:
Starting recovery on Thu Feb 20 20:57:47 2014
framebuffer: fd 3 (480 x 800)
Welcome to 4EXT Recovery Touch
by madmaxx82
Preparing boot.. 0I:start load volumes..
Preparing boot.. 0 Preparing boot.. 0 Preparing boot.. 0I:st.f_bsize: 4096
Preparing boot.. 0 Preparing boot.. 1I:st.f_bsize: 4096
Preparing boot.. 1I:st.f_bsize: 4096
Preparing boot.. 1 Preparing boot.. 1 Preparing boot.. 1I:st.f_bsize: 4096
Preparing boot.. 2recovery filesystem table
=========================
0 /tmp ramdisk (null) (null)
1 /recovery emmc /dev/block/mmcblk0p21 (null)
2 /boot emmc /dev/block/mmcblk0p22 (null)
3 /cache ext3 /dev/block/mmcblk0p27 (null)
4 /data ext3 /dev/block/mmcblk0p26 (null)
5 /sdcard vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1
6 /system ext4 /dev/block/mmcblk0p25 (null)
7 /system_lib ext3 /dev/block/mmcblk0p28 (null)
I:end load volumes..
I:Completed outputting fstab.
Irocessing arguments.
Preparing boot.. 2I:Checking arguments.
Command: "/sbin/recovery"
ro.build.date=Sat Nov 10 16:53:16 CET 2012
ro.build.date.utc=0
ro.product.model=Desire HD
ro.product.brand=htc_wwe
ro.product.name=htc_ace
ro.product.device=ace
ro.product.board=spade
ro.product.cpu.abi=armeabi-v7a
ro.product.cpu.abi2=armeabi
ro.product.manufacturer=HTC
ro.product.locale.language=hdpi
ro.product.locale.region=
ro.board.platform=msm7x30
ro.build.product=ace
ro.com.android.dateformat=MM-dd-yyyy
net.bt.name=Android
ro.serialno=SH18KRX02893
ro.baseband=26.14.04.28_M
ro.carrier=HTC-GER
ro.bootloader=2.00.0029
init.svc.choice_fn=stopped
init.svc.offmode_charging=running
init.svc.detect_key=running
init.svc.adbd=running
init.svc.recovery=running
ext.version="1005.8.0"
ext.feature.version_check=yes
ext.build=0
ext.edition=ng
Ireparing..
Preparing boot.. 2Irep sys1: 0
Preparing boot.. 2Ireparing.. fin
Preparing boot.. 2 Configuring settings..
Your configuration settings:
Using button backlights level: 80
Restore: MD5Sum checks: enabled
Backups: generate MD5Sums: enabled
Backups: mode: tar
Backups: exclude /cache: disabled
Backups: exclude dalvik-cache: disabled
Backups: include lib: enabled
Preserve theme: enabled
Hide useless directories: disabled
Haptic feedback: enabled
Haptic feedback strength: 28
Timezone: configured
Using 24h-hour time format
I:theme propok
Recovery is ready..
I:have tz_data
I:Checking for extendedcommand...
I:Skipping execution of extendedcommand, file not found...
Irocessing 4EXT Control file...
4EXT Recovery Updater v2.4.6b
Processing..
Mounting sdcard..
I:Backup path: /sdcard/clockworkmod/backup/2014-02-20-00.05.02_CyanogenMod7.2.0ace
I:Backup mode: custom
Calculating space needed..
Space needed to complete: 654 MiB
Free space on your sdcard: 8264 MiB
Backing up boot image...
Including /system/lib
Backing up system_lib...
backup mode: tar
Backing up system...
Writing 4EXT info for filesystem ext4
Backing up data...
Writing 4EXT info for filesystem ext3
Backing up .android_secure...
Backing up cache...
Writing 4EXT info for filesystem ext3
Generating md5 sums...
tar: removing leading '/' from member names
-- Installing: /sdcard/Download/4EXT_Recovery_Touch_v1.0.0.6_RC1.zip
Finding update package...
I:Update location: /sdcard/Download/4EXT_Recovery_Touch_v1.0.0.6_RC1.zip
Opening update package...
Installing update...
Installation aborted.
Critical error! Installation aborted!
Canceling pending actions and booting UI
Pilsner12 said:
Thank you for links, recovery is alerady fleshed, but problem is not fixed.
(btw: 4ext looks gorgeous )
here is log:
Click to expand...
Click to collapse
what do you mean problem is not fixed..?, is that you mean you can't installing 4ext recovery..?, or problem about installing custom rom..?
JJeamy said:
what do you mean problem is not fixed..?, is that you mean you can't installing 4ext recovery..?, or problem about installing custom rom..?
Click to expand...
Click to collapse
Problem is if I want restart, or Start phone, I have to connect phone to pc, go to fastboot, and via command prompt send to phone boot.img prepared from my custom rom.
Othervise phone didnt start.
Pilsner12 said:
Problem is if I want restart, or Start phone, I have to connect phone to pc, go to fastboot, and via command prompt send to phone boot.img prepared from my custom rom.
Othervise phone didnt start.
Click to expand...
Click to collapse
that's weird thing..i think there's something wrong with your phone partition..
maybe you wanna try it to return your phone to the stock first by running a RUU..to fix that problem...after that
you can tried to fully rooting again for gaining s-off using AAHK2 script by Phiber2000 from here..
JJeamy said:
that's weird thing..i think there's something wrong with your phone partition..
maybe you wanna try it to return your phone to the stock first by running a RUU..to fix that problem...after that
you can tried to fully rooting again for gaining s-off using AAHK2 script by Phiber2000 from here..
Click to expand...
Click to collapse
Thank you for help, and link with this rooting instruction. I will do that in next week, becouse of time and I will let you know how it ends.
Pilsner12 said:
Thank you for help, and link with this rooting instruction. I will do that in next week, becouse of time and I will let you know how it ends.
Click to expand...
Click to collapse
So yesterday I ran RUU and now restart bug is fixed. I am happy for it!
But I have respect from rooting process. Last time it takes me a lot of weeks..
Please help me!!! i'm italian and i don't speak very well english Language
My HTC Desire hd don't start!!!!!!!!
I have CWM TOUCH 5.8.0.0
In starting my HTC Desire HD is blocked in white screen with green logo HTC
When i start RUU....... .exe (much version) the installation fail: error 140
I hope in you!!!!!!!!!
I have too Asus Padfone 2: with FRAMAROOT :good::good::good::good::good:
Please help me for my HTC Desire HD
I append in this post 4 images of my HTC DHD
Bacchione said:
Please help me!!! i'm italian and i don't speak very well english Language
My HTC Desire hd don't start!!!!!!!!
I have CWM TOUCH 5.8.0.0
In starting my HTC Desire HD is blocked in white screen with green logo HTC
When i start RUU....... .exe (much version) the installation fail: error 140
I hope in you!!!!!!!!!
I have too Asus Padfone 2: with FRAMAROOT :good::good::good::good::good:
Please help me for my HTC Desire HD
I append in this post 4 images of my HTC DHD
Click to expand...
Click to collapse
Please help me

Cannot boot to system - Always boot to TWRP

I've recently tried out some Generic System Images (or Project Treble ROMs). I did this by flashing the system.img and then doing a factory reset after every image. Some images later I wanted to go back to my daily system.img but It stopped working.
I don't know which step cause this error, but since I flashed my daily system.img again and wanted to boot it, it would always boot into TWRP.
I really don't know how to handle this error since I don't have the knowledge but I'll try to supply as much information as possible, starting with TWRP Logs
One strange thing I noticed is this:
Code:
ro.product.name=omni_berlin
ro.product.board=hi6250
ro.product.brand=Honor
ro.product.model=HONOR-6X
ro.product.device=berlin
ro.product.locale=en-US
ro.product.platform=hi6250
It says Honor-6X although I'm using the 7X and didn't flash anything for the 6X, but it seems like I must have overlooked something...
recovery.log
dmesg.log (1/2)
dmesg.log (2/2)
I'll provide any information needed as soon as possible and I'll be very thankful for any help!
Edit: I usually use [ROM][8.1][OpenKirin's RROS Oreo v6.0.0 - For Honor 7X], but today I've tries these:
[8.1.0][TREBLE] Pixel Experience [AOSP][r26][2018/05/27]
[Resurrection Remix] [Unofficial] [2018-05-19] Phh-Treble
[Lineage] [Unofficial] [2018-05-19] Phh-Treble
supervis0r said:
I've recently tried out some Generic System Images (or Project Treble ROMs). I did this by flashing the system.img and then doing a factory reset after every image. Some images later I wanted to go back to my daily system.img but It stopped working.
I don't know which step cause this error, but since I flashed my daily system.img again and wanted to boot it, it would always boot into TWRP.
I really don't know how to handle this error since I don't have the knowledge but I'll try to supply as much information as possible, starting with TWRP Logs
One strange thing I noticed is this:
Code:
ro.product.name=omni_berlin
ro.product.board=hi6250
ro.product.brand=Honor
ro.product.model=HONOR-6X
ro.product.device=berlin
ro.product.locale=en-US
ro.product.platform=hi6250
It says Honor-6X although I'm using the 7X and didn't flash anything for the 6X, but it seems like I must have overlooked something...
recovery.log
dmesg.log (1/2)
dmesg.log (2/2)
I'll provide any information needed as soon as possible and I'll be very thankful for any help!
Edit: I usually use [ROM][8.1][OpenKirin's RROS Oreo v6.0.0 - For Honor 7X], but today I've tries these:
[8.1.0][TREBLE] Pixel Experience [AOSP][r26][2018/05/27]
[Resurrection Remix] [Unofficial] [2018-05-19] Phh-Treble
https://forum.xda-developers.com/project-treble/trebleenabled-device-development/lineage-phh-treble-t3767690
Click to expand...
Click to collapse
The recovery was borrowed. or ported from Honor 6x, so that line is not a concern.
As far as the logs, I browsed through them. Nothing jumps out to me. There is some selinux permissive = 0 type errors, but dont think that is causing your problem.
I had to use stock recovery to do wipes (factory reset) between different treble rom installs. Without i had bootloop. I never had forced boot to recovery. .
as long as frp is not locked i would suggest flashing stock recovery to try a reset. And if it boots, put twrp back.
mrmazak said:
The recovery was borrowed. or ported from Honor 6x, so that line is not a concern.
As far as the logs, I browsed through them. Nothing jumps out to me. There is some selinux permissive = 0 type errors, but dont think that is causing your problem.
I had to use stock recovery to do wipes (factory reset) between different treble rom installs. Without i had bootloop. I never had forced boot to recovery. .
as long as frp is not locked i would suggest flashing stock recovery to try a reset. And if it boots, put twrp back.
Click to expand...
Click to collapse
Thanks for your fast response.
I've tried installing the stock recovery but I either get a 'Software install failed!' message and can only choose to reboot out of the recovery or it fails to flash through fastboot with this error message 'FAILED (remote: partition length get error)'
I've tried the recovery I can download through the Huawei Multi-Tool 8.0.4.9 'SR_BND-L21_B3xx_EMUI8.img' <- This flashed successfully but I get the Software install failed message.
And I've tried the recovery from this Google Drive folder 'BND-RECOVERY-NoCheck.img' but here I'll get the partition length error while trying to flash it through fastboot.
I think I caused the Software install failed through trying to reset my phone using these instructions
Code:
- Type in these commands:
dd if=/external_sd/BND-RECOVERY-NoCheck.img of=/dev/block/bootdevice/by-name/recovery
dd if=/external_sd/BND-RECOVERY-NoCheck.img of=/dev/block/bootdevice/by-name/recovery2
- If those went well type these as next:
echo --update_package=/sdcard/update.zip > /cache/recovery/command
echo --update_package=/sdcard/update_data_full_public.zip >> /cache/recovery/command
echo --update_package=/sdcard/update_full_BND-L21C_hw_eu.zip >> /cache/recovery/command
I've replaced 'external_sd' and 'sdcard' with 'usbotg' since I had the files on a usbotg device and not on an external sd card.
supervis0r said:
Thanks for your fast response.
I've tried installing the stock recovery but I either get a 'Software install failed!' message and can only choose to reboot out of the recovery or it fails to flash through fastboot with this error message 'FAILED (remote: partition length get error)'
I've tried the recovery I can download through the Huawei Multi-Tool 8.0.4.9 'SR_BND-L21_B3xx_EMUI8.img' <- This flashed successfully but I get the Software install failed message.
And I've tried the recovery from this Google Drive folder 'BND-RECOVERY-NoCheck.img' but here I'll get the partition length error while trying to flash it through fastboot.
I think I caused the Software install failed through trying to reset my phone using these instructions
Code:
- Type in these commands:
dd if=/external_sd/BND-RECOVERY-NoCheck.img of=/dev/block/bootdevice/by-name/recovery
dd if=/external_sd/BND-RECOVERY-NoCheck.img of=/dev/block/bootdevice/by-name/recovery2
- If those went well type these as next:
echo --update_package=/sdcard/update.zip > /cache/recovery/command
echo --update_package=/sdcard/update_data_full_public.zip >> /cache/recovery/command
echo --update_package=/sdcard/update_full_BND-L21C_hw_eu.zip >> /cache/recovery/command
I've replaced 'external_sd' and 'sdcard' with 'usbotg' since I had the files on a usbotg device and not on an external sd card.
Click to expand...
Click to collapse
I have been trying to get usbotg to work, with that method. Twrp recognize s it but the no-check recovery does not.
And the partition you are calling for recovery are wrong for emui8
Both the recovery file you are using and the partition name are nougat.
Oreo partition name is "recovery_ramdisk"
Do not do it to recovery2, "erecovery". It is not needed, or advised.
I have made this manual install process into an install zip. For twrp.
You can see it here
https://forum.xda-developers.com/honor-7x/how-to/guide-honor-7x-flash-oreo-update-t3781649
mrmazak said:
I have been trying to get usbotg to work, with that method. Twrp recognize s it but the no-check recovery does not.
And the partition you are calling for recovery are wrong for emui8
Both the recovery file you are using and the partition name are nougat.
Oreo partition name is "recovery_ramdisk"
Do not do it to recovery2, "erecovery". It is not needed, or advised.
Click to expand...
Click to collapse
Just before I read this message I retried it, I used these commands through TWRP
Code:
echo --update_package=/sdcard/update.zip > /cache/recovery/command
echo --update_package=/sdcard/update_data_full_public.zip >> /cache/recovery/command
echo --update_package=/sdcard/update_full_BND-L21C_hw_eu.zip >> /cache/recovery/command
and then flashed the recovery through Huawei Multi-Tool on recovery_ramdisk.
After a reboot the stock recovery showed up, and did something like verifying the update package (i couldn't read it since it passed very fast) and then stayed at 5% installing.
I now managed to get eRecovery to work but when i choose 'Wipe data/factory reset' it reboots back into eRecovery where it stops at exactly 5%, showing Reset failed!
Edit: I am now downloading a FullOTA-MF-PV for BND-L21 8.0.0.330(C432CUSTC432D2) and will try to follow your tutorial for updates while on Oreo.
supervis0r said:
Just before I read this message I retried it, I used these commands through TWRP
Code:
echo --update_package=/sdcard/update.zip > /cache/recovery/command
echo --update_package=/sdcard/update_data_full_public.zip >> /cache/recovery/command
echo --update_package=/sdcard/update_full_BND-L21C_hw_eu.zip >> /cache/recovery/command
and then flashed the recovery through Huawei Multi-Tool on recovery_ramdisk.
After a reboot the stock recovery showed up, and did something like verifying the update package (i couldn't read it since it passed very fast) and then stayed at 5% installing.
I now managed to get eRecovery to work but when i choose 'Wipe data/factory reset' it reboots back into eRecovery where it stops at exactly 5%, showing Reset failed!
Click to expand...
Click to collapse
Did install go past 5% ?
If not did you force it reboot to get out.
Do you have those update files on your sdcard?
If you have those files are they the correct ones for your region device?
mrmazak said:
Did install go past 5% ?
If not did you force it reboot to get out.
Do you have those update files on your sdcard?
If you have those files are they the correct ones for your region device?
Click to expand...
Click to collapse
I was thinking about forcing it to reboot since it stayed at 5% for some time, but eventually it rebooted by itself but as it did that it was still at 5%.
I might have used the wrong files since I already tried out a lot of things and didn't organize all those files at all :/
I will now retry this using the files I have stated in the update of my previous post and also using your zip file.
I put the files into the root directory of my sd card. So the root directory looks like this
Code:
PS J:\> ls
Verzeichnis: J:\
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 29.05.2018 22:09 21276664 update_data_full_public.zip
-a---- 29.05.2018 22:18 1834159779 update.zip
-a---- 29.05.2018 22:11 715530773 update_full_BND-L21C_hw_eu.zip
-a---- 29.05.2018 22:08 37144576 BND-RECOVERY-NoCheck.img
-a---- 06.04.2018 09:37 33554432 SR_BND-L21_B3xx_EMUI8.img
-a---- 29.05.2018 22:36 15024128 complete_twrp_ramdisk.img
supervis0r said:
I was thinking about forcing it to reboot since it stayed at 5% for some time, but eventually it rebooted by itself but as it did that it was still at 5%.
I might have used the wrong files since I already tried out a lot of things and didn't organize all those files at all :/
I will now retry this using the files I have stated in the update of my previous post and also using your zip file.
I put the files into the root directory of my sd card. So the root directory looks like this
Code:
PS J:\> ls
Verzeichnis: J:\
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 29.05.2018 22:09 21276664 update_data_full_public.zip
-a---- 29.05.2018 22:18 1834159779 update.zip
-a---- 29.05.2018 22:11 715530773 update_full_BND-L21C_hw_eu.zip
-a---- 29.05.2018 22:08 37144576 BND-RECOVERY-NoCheck.img
-a---- 06.04.2018 09:37 33554432 SR_BND-L21_B3xx_EMUI8.img
-a---- 29.05.2018 22:36 15024128 complete_twrp_ramdisk.img
Click to expand...
Click to collapse
They need to be in folder "HWOTA8" on sdcard
mrmazak said:
They need to be in folder "HWOTA8" on sdcard
Click to expand...
Click to collapse
Thank you
Edit: I now installed TWRP and copied the files onto the SD Card
The directory now looks like this
Code:
PS J:\HWOTA8> ls
Verzeichnis: J:\HWOTA8
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 30.05.2018 13:54 82757105 update_data_full_public.zip
-a---- 30.05.2018 13:59 769778671 update_full_BND-L21C_hw_eu.zip
-a---- 30.05.2018 14:02 1803590616 update.zip
-a---- 23.05.2018 02:42 1241 hwota8_update-auto-rename.zip
-a---- 15.04.2018 22:22 26314752 RecoveryNoCheckOreoHi6250.img
Update 1: EMUI Recovery is now 'Installing update...' at 25% and rising. This really looks promising! Im so hyped right now
Update 2: Honor Boot animation came up and now I'm waiting for the first use setup to prompt me.
Update 3: So I was at the first use setup but I couldn't activate Wifi and my internal memory was 0B. I'm now doing another Factory Reset from eRecovery
I am now back at EMUI 8 with the Build-Number BND-L21 8.0.0.330(C432) but I'm still unsure if C432 is from my device or from the files I flashed.
Nevertheless my phone is now working again and I am very happy about that! Internal storage is showing up correctly and I can use mobile data as well as WiFi.
Thank you so much for your help!

Small Utilities for Realme C12

Here I will share some of the zips/scripts I made for some specific things
You are only responsible for what you do to your things. You have been warned.​
Flash GSI in TWRP​As we all know from Android 10, Google introduced dynamic partitions. That is system, vendor, product and other partitions are now contain in single partition called *super*. The logical partitions in this super partition are resizable according to requirements.
We can flash GSI to system partition with `dd if=gsi.img of=/dev/block/mapper/system bs=10M`.
But it will fail if the size of partition is less than size of GSI. To increase the size, there is no normal way to resize in TWRP I know as of now.
To resize it to have more space, I used the trick that is used by custom ROMs. I made system.new.dat.br, system.transfer.list, system.patch.dat as empty and used dynamic_partitions_op_list to resize system.
We can do the same with `fastbootd` with `fastboot resize-logical-partition system <size-in-bytes>`, but it requires PC.
Usage:-
- Download below GSI_FLASHER.zip
- Place GSI.img/xz and the downloaded zip in same folder
- Flash the zip
- Wipe Dalvik, Data, Internal and Cache
- Reboot
Resize System​When we want to flash GApps in vanilla GSI that is flashed with fastbootd, it will resize system to the size of GSI keeping no space left to add something. So I used the same above trick to resize system for making space in it.
We can do the same with `fastbootd` with `fastboot resize-logical-partition system <size-in-bytes>`, but it requires PC.
Usage:-
- Download below SystemResizer_RealmeC12.zip
- Flash the zip before flashing GApps
- Enjoy
Custom Recovery Keep​When in Realme UI, if any recovery than stock recovery is detected then it will replace it with the stock recovery using /vendor/recovery-from-boot.p file. On every boot, /vendor/bin/oppo-install-recovery.sh is executed in UI 1.0 and /vendor/bin/install-recovery.sh is executed in UI 2.0. It will patch recovery. So replacing it will stop this process.
Usage:-
- Download below RealmeRecoveryKeep.zip for UI1 or RealmeRecoveryKeepUI2.zip for UI2
- Flash it in Magisk app as Magisk module
- Flash custom recovery
- Enjoy persistent recovery
Reference:- https://forum.xda-developers.com/t/...m-howto-downgrade-howto.4014773/post-81108309
Flash Stock ROM .ozip in TWRP​Note:- Realme C12 TWRP has 'Skip Treble Compatibility error' option in Settings. So no need of this.
When we flash a .ozip in TWRP by renaming it to .zip(since it is not encrypted), we will get Treble Compatibility error. It is because of compatibility.zip in the .ozip. If we remove it, then flashing will be fine.
But if we flash manually by executing update-binary with .ozip as argument, TWRP will not do any checks. So we can flash without removing compatibility.zip in .ozip.
Usage:-
- Download below Flash_OZIP_in_TWRP.zip
- Place .ozip and the downloaded zip in same folder
- Flash the zip(not .ozip)
- Enjoy
Sparse Data To Super Partition converter​Realme is not providing flashtool or fastboot flashable firmwares. So only .ozip is the solution for us. It has all the .img files that can be flashed with fastboot except super.img.
To get this, we have to dump the super partition from device or convert .dat.br files to raw images and join them as super partition with `lpmake` tool.
I made a Shell Script to automate this.
Usage:-
- Download below sdat2super.zip in your Linux distribution
- Execute sdat2super.sh with path to ozip as argument
bash sdat2super.sh RealmeC12.ozip
- After sometime you will get super.img in same folder as script
Spoiler
Downgrade to UI 1.0 from UI 2.0 with locked bootloader​Download Roll back package from https://c.realme.com/in/post-details/1391964925517193216 and flash in stock recovery and Format Data.
Another method:-
It is possible with SP Flash Tool, but it is somewhat scary for novice. To do this we have a small trick.
Realme recovery has ADB Root access. That is we can execute commands as SuperUser(root). So we can execute update-binary manually for flashing .ozip in stock recovery too.
Usage:-
- Extract META-INF/com/google/android/update-binary from .ozip to somewhere in External SDCard
- Place .ozip to same External SDCard
- Boot to Recovery mode
- See if .ozip is there are not in stock recovery file manager when installing .ozip
- Connect device to PC and run below commands in PC
Code:
adb devices
adb root
adb shell
cp /path/to/update-binary /sbin
chmod 755 /sbin/update-binary
/sbin/update-binary 3 1 /path/to/ozip
exit
- Format Data in recovery
- Enjoy
Thank you very much for your work sir, you're awesome!
Thanks, I will try it soon.
This zip will fix NVRAM Warning Err = 0x10 in WiFi section. Please backup nvdata partition before using this, since it will modify /mnt/vendor/nvdata/APCFG/APRDEB/WIFI to write MAC address taken from /sys/class/net/wlan0/address
Thanks

[Fixed] FireTV Stick 2nd Gen (tank) stuck on logo. Potentially broken file system/partitions. (Unlocked + TWRP available)

Hey folks! I unlocked my FireTV stick and was able to install TWRP following the amazing guide by @k4y0z (https://forum.xda-developers.com/t/unlock-root-twrp-unbrick-fire-tv-stick-2nd-gen-tank.3907002/).
I can boot into TWRP just OK.
I am using adb shell to issue TWRP commands. (I don't have an OTG cable with power input).
I began by flashing stock ROMs by @0815hoffi from here (https://forum.xda-developers.com/t/...-7-ota-zip-launcher-replacement-root.4155489/).
Then I tried installing pre-rooted images by @rbox (https://forum.xda-developers.com/t/fire-tv-stick-2-tank-prerooted-stock-images-5-2-7-3_r1.3912271/) along with magisk.
Here are the general steps I followed while flashing these images :
1. wiping everything. I suspect my first issue here :
Code:
$ adb shell
$ twrp wipe cache
$ twrp wipe data
$ twrp wipe dalvik
$ twrp wipe /system
~ # twrp wipe cache
Formatting Cache using make_ext4fs...
Failed to mount '/cache' (No such device)
Done processing script file
Click to expand...
Click to collapse
~ # twrp wipe /system
Formatting System using make_ext4fs...
Failed to mount '/system' (No such device)
Done processing script file
Click to expand...
Click to collapse
~ # mount /cache
mount: mounting /dev/block/mmcblk0p12 on /cache failed: No such device
Click to expand...
Click to collapse
~ # stat /dev/block/mmcblk0p12
File: '/dev/block/mmcblk0p12'
Size: 0 Blocks: 0 IO Block: 4096 block special file
Device: ch/12d Inode: 5332 Links: 1 Device type: b3,c
Access: (0600/brw-------) Uid: ( 0/ root) Gid: ( 0/ root)
__bionic_open_tzdata: couldn't find any tzdata when looking for localtime!
__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
Access: 2010-01-01 00:17:58.000000000
Modify: 2010-01-01 00:17:57.000000000
Change: 2010-01-01 00:17:57.000000000
Click to expand...
Click to collapse
2. push images to /sdcard
Code:
$ adb push update-kindle-full_tank-288.6.6.4_user_664657620.bin /sdcard/firm.zip
update-kindle-full_tank-288.6.6.4_user... 6.1 MB/s (532252995 bytes in 83.009s)
3. Install image
adb shell
~ # twrp install /sdcard/firm.zip
Installing zip file '/sdcard/firm.zip'
Checking for Digest file...
Skipping Digest check: no Digest file found
[amonet] Remove boot patch...
[amonet] OK
Patching system image unconditionally...
Copying preloader_prod.img to boot partition 0 for secure device...
script succeeded: result was [][amonet] Install boot patch...
[amonet] OK
[amonet] Install recovery patch...
[amonet] ALREADY_INSTALLED
Done processing script file
Click to expand...
Click to collapse
4. `adb shell reboot`
They all install just OK. But in all cases, every time I do `reboot` in `adb shell` after `adb install` commands, it boots and gets stuck on 'fireTV Stick' logo.
At first I thought maybe it takes time to boot for first time, but I let it go for as long as half an hour and still no good.
I tried wiping cache and dalvik before rebooting too, no avail (had same could not mount /cache prompt).
I am pretty sure I am doing something stupid, I'd really appreciate any help. I'll be happy if I get it back to a working state, I do not really need root. This all started because the stick went into bootloop outta nowhere. My initial finding pointed at a failed update, see :
https://twitter.com/i/web/status/1393963756426698756
Maybe try with 5.2.7.7
ftvs2k-5.2.7.7
MediaFire is a simple to use free service that lets you put all your photos, documents, music, and video in a single place so you can access them anywhere and share them everywhere.
www.mediafire.com
0815hoffi said:
Maybe try with 5.2.7.7
ftvs2k-5.2.7.7
MediaFire is a simple to use free service that lets you put all your photos, documents, music, and video in a single place so you can access them anywhere and share them everywhere.
www.mediafire.com
Click to expand...
Click to collapse
Thanks @0815hoffi , that's actually the very first image I tried with from your thread.
Looking back, I think there's something wrong with my partitions.
If I see logs of other people from these threads, it says
script succeeded: result was [ALL DONE][amonet] Install boot patch...
Click to expand...
Click to collapse
Whereas for me, it says
script succeeded: result was [][amonet] Install boot patch...
Click to expand...
Click to collapse
This may mean that my flash is not successful, right? It's same everytime I flash.
I wonder, is there a way to bring everything to a clean state?
Given your expertise in amonet, @k4y0z from the thread and this comment, do you have a suspicion of what could be going wrong?
It looks like like it indeed were messed up partitions. My initial plan was to flash GPT fix in DL mode (by @k4y0z : link). But I thought might as well play with few things if am anyway going to re-do everything.
I started by going deleting directories manually (e.g. `rm -rf /system`). My plan was to manually flash each partition through fastboot.
Before that I attempted
Code:
fastboot format all
and received a bunch of errors, specifically
Code:
Formatting is not supported for file system with type ''.
Though format didn't work, I decided to wipe anyway
Code:
fastboot -w
It finished with few errors, but looked like it created those directories which I deleted earlier. So I rebooted to TWRP and did
Code:
twrp wipe data
Re-flashed @0815hoffi 's image and luckily it booted into "Optimising storage" screen. Post boot-up it appears to be working OK so far. Had an issue with wifi, but restart fixed it.
tl;dr
Code:
rm -rf /cache
rm -rf /data/dalvik
rm -rf /system
fastboot format userdata # errors
fastboot -w # completed but some errors
twrp wipe data
twrp install <img.zip>
reboot
EDIT : Looks like @Sus_i and @racega went through a similar journey and ended up with a similar fix. Good to know the fix is reproducible. Here's their posts : https://forum.xda-developers.com/t/...ck-2nd-gen-tank.3907002/page-61#post-83031003
saurabhshri said:
It looks like like it indeed were messed up partitions. My initial plan was to flash GPT fix in DL mode (by @k4y0z : link). But I thought might as well play with few things if am anyway going to re-do everything.
I started by going deleting directories manually (e.g. `rm -rf /system`). My plan was to manually flash each partition through fastboot.
Before that I attempted
Code:
fastboot format all
and received a bunch of errors, specifically
Code:
Formatting is not supported for file system with type ''.
Though format didn't work, I decided to wipe anyway
Code:
fastboot -w
It finished with few errors, but looked like it created those directories which I deleted earlier. So I rebooted to TWRP and did
Code:
twrp wipe data
Re-flashed @0815hoffi 's image and luckily it booted into "Optimising storage" screen. Post boot-up it appears to be working OK so far. Had an issue with wifi, but restart fixed it.
tl;dr
Code:
rm -rf /cache
rm -rf /data/dalvik
rm -rf /system
fastboot format userdata # errors
fastboot -w # completed but some errors
twrp wipe data
twrp install <img.zip>
reboot
EDIT : Looks like @Sus_i and @racega went through a similar journey and ended up with a similar fix. Good to know the fix is reproducible. Here's their posts : https://forum.xda-developers.com/t/...ck-2nd-gen-tank.3907002/page-61#post-83031003
Click to expand...
Click to collapse
Usually when this corrupted partitions happen you may try the command:
fastboot format userdata
followed by :
adb shell
(to call twrp#)
Then :
twrp wipe data
twrp wipe system
twrp wipe cache
twrp wipe dalvik
Then adb push the rom, gapps/magisk to /sdcard
twrp install nameofyourrom.zip
twrp install gappsxx.zip
Let it boot once and go back and update magisk via recovery.
(adb reboot recovery once permissions set or use powermenu little vic apk for quickness)
Another method I found which works good with fireos is :
When faced with corrupted/encrypted partition issues and/or unable to mount/format data issues
goto advanced wipe
select change file system
change it to EXT2
it will format data and data should appear become mount
hit back and change to EXT4 Filesystem again.
Then push rom and any other zips etc to /sdcard and install in usual way.
Good you got it working
Regards
Thank you for writing this down @Bertonumber1, I am sure it'll be very helpful to people who will encounter such situation in future.
Bertonumber1 said:
select change file system
change it to EXT2
it will format data and data should appear become mount
hit back and change to EXT4 Filesystem again.
Click to expand...
Click to collapse
I sincerely wish I could have done this. But I don't have an OTG with power input and deliveries are closed due to the pandemic. I was issuing TWRP commands through adb. I'll keep this in mind for future!
Thanks!
saurabhshri said:
Thank you for writing this down @Bertonumber1, I am sure it'll be very helpful to people who will encounter such situation in future.
I sincerely wish I could have done this. But I don't have an OTG with power input and deliveries are closed due to the pandemic. I was issuing TWRP commands through adb. I'll keep this in mind for future!
Thanks!
Click to expand...
Click to collapse
Ah I see, I'm sure the twrp can be commanded to repair change file systems. However, you are correct it is much easier via otg mouse or keyboard.
Regards

How To Guide How to backup your partitions with command line (requires root)

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?

Categories

Resources