• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

Development [RECOVERY] [ALPHA] TeamWin Recovery Project

Search This thread

pihpih95

Senior Member
Aug 23, 2016
256
20
Kuala Terengganu
i found that i cant format system partition coz it show none in partition layout . hopefully we can format system later instead of keep reformating data and lost internal storage like on pe recovery
 

nierewa

Senior Member
Jan 22, 2018
77
1
3
I had a few problems.
I had to copy the twrp image to the SD card at the very beginning. With recovery loaded the file could not be copied. Neither to the SD card nor to the internal memory.

When I started the recovery, I was asked for a password for user [0] to unlock the data partition. I canceled because I don't know what the password should be. Maybe the login password?

Then when installing the ramdisk I got the following messages:

Code:
Updating partition details...
...Fertig
Volle SELinux-Unterstützung ist vorhanden.
Entpacke Boot...
Sichere Boot...
Entpacke /external_sd/twrp.img...
Packen Boot...
[IMAGE-DATEI WIRD AUFGESPIELT]
Aufzuspielendes Image: '/tmp/repackorig//new-boot.img'
Berechne Wiederherstellungsinformationen...
[IMAGE EINSPIELEN ABGESCHLOSSEN]
E:Error getting bootctrl module.
Partitions-Informationen werden aktualisiert...
...Fertig
sichere Boot...
[IMAGE-DATEI WIRD AUFGESPIELT]
Aufzuspielendes Image: 'tmp/repackorig//new-boot.img'
Berechne Wiederherstellungsinformationen...
[IMAGE EINSPIELEN ABGESCHLOSSEN]
E:Error getting bootctrl module.
Partitions-Informationen werden aktualisiert...
...Fertig

When I boot into recovery now, twrp appears. So it seems to work.
But what does mean the error " E:Error getting bootctrl module" ?

Translated with www.DeepL.com/Translator (free version)
 

LinhBT

Senior Member
Apr 21, 2020
109
25
VietNam
Xiaomi Mi 5X
Redmi K20 Pro
What you guys all have to do is being a little patient, RMN10 is a new device, and for it to have Official Custom Recovery will takes time. And I don't know why you're facing such issues but at least until now the Alpha build is working fine for me with all the functions it has.
 

Zirila

Senior Member
Jul 31, 2015
163
59
Sure, you're right.


Have you successfully restored a backup?
Somewhere I read that would work with Xiaomi only with certain kind of tricks.

I do not dare to try it myself :giggle:

Short answer: Nope, restoring is not working with TWRP alpha currently.

I installed CrDroid and used it a bit. Made a full backup of all partitions in TWRP (~19GB) (There is like 2x a Super Partition which I guess is the same and TWRP shows it twice, though)

I wiped the phone, factory reset (not formating data).
Then TWRP-restored all partitions back. it restores all partitions (19GB) without any errors.
The phone boots, the ROM logo shows up, but then it gets stuck at "Smartphone gets started" progress bar endlessly.
The backup is useless.

I also tried only restoring Data partition, or Data, Boot and Super only.. but to no avail.

seems like for now, with Android 11, nandroid backups are a big fail and people who rely on the backups without knowing it won't work to restore, will be surprised when the day comes...

guess you need to back up with some apps, but Titanium is not working either so the options are tiny. best way for now might be OandBackupX.. but tell me better ones and way if you know them.
 

StaryMuz

Senior Member
Dec 27, 2012
266
61
If I wasn't dealing with protecting my identity, then a backup to gapps might be workable. Calls, SMS, people, program settings, app backup ...
But don't count on backing up everything.
 

Zirila

Senior Member
Jul 31, 2015
163
59
How is updating a Custom ROM working with TWRP alpha?

i really got trouble with it.

TWRP always installes the rom.zip to the inactive a/b slot.

so lets say "a" is the current running custom rom and you got an updated rom.zip for it.
you enter twrp recovery on "a" and flash the rom.zip. twrp installs it to "b".
theoretically after reboot it should switch to "b" and load updated rom. practically I got lot of troubles getting the ROM to run on "b" after that (like TWRP can't mount system partitions and/or data)

but lets assume that works, "b" is now the active slot with updated ROM.

now you get another new update for the rom and load it to the storage.
you enter twrp recovery on slot "b" and flash the newer ROM.zip.
TWRP flashes it to inactive slot "a". I would assume that works just fine and after next reboot the newer ROM just boots from "a",..yeah theoretically.

practically it doesn't even install the new ROM.zip, and throws errors:
Code:
Installing zip file '/sdcard/Download/somecustomromupdate.zip'
Unmounting System...
Flashing A/B zip to inactive slot: A
Step 1/2
Error applying update: 7 (ErrorCode::kInstallDeviceOpenError)
Updater process ended with ERROR: 1
(...)
Updating partition details...
Failed to mount '/system_exst' (No such file or directory)
Failed to mount '/product' (No such file or directory)
...done

the only thing that seems to work is slot "a". and to update the ROM it seems to be necessary to manually switch to slot "b" first and THEN initiate the TWRP .zip flash, as it always flashes to the other slot - "a" in that case, where "a" seems to work.

can't we just make twrp only use slot "a", and never use slot "b"? that would make things so much easier as long as there is not fully working a/b support from TWRP.

but back on topic: how do we apply dirty flash updates with a/b slots in the future without wiping and losing all data before? whats the current best practice?
 

Zirila

Senior Member
Jul 31, 2015
163
59
it's pretty obvious a Virtual A/B environment. Handling OTA updates on these systems is pretty new and complex if not done before. But normal dirty flashes within TWRP needs to be adjusted too. I think all the snapshotted errors, and device not switching a-b slots after flashing I experienced lately can be fixed, but it would require TWRP and probably Custom ROM install .zips to be adjusted to the new virtual a/b system.

unfortunately, that means, there is currently no safe way to upgrade Custom ROMs.. it's pretty much trial and error and it will almost certainly end up in losing data.

while the community still struggles with Android10 and 11 changes, google is already about to release the next hurdles with Android12.. -.-
 

Nebrassy

Senior Member
Sep 17, 2015
946
1,656
Lattakia
Xiaomi Poco X3 Pro
Short answer: Nope, restoring is not working with TWRP alpha currently.

I installed CrDroid and used it a bit. Made a full backup of all partitions in TWRP (~19GB) (There is like 2x a Super Partition which I guess is the same and TWRP shows it twice, though)

I wiped the phone, factory reset (not formating data).
Then TWRP-restored all partitions back. it restores all partitions (19GB) without any errors.
The phone boots, the ROM logo shows up, but then it gets stuck at "Smartphone gets started" progress bar endlessly.
The backup is useless.

I also tried only restoring Data partition, or Data, Boot and Super only.. but to no avail.

seems like for now, with Android 11, nandroid backups are a big fail and people who rely on the backups without knowing it won't work to restore, will be surprised when the day comes...

guess you need to back up with some apps, but Titanium is not working either so the options are tiny. best way for now might be OandBackupX.. but tell me better ones and way if you know them.
Backup and restore with encryption, even on a stable recovery, will not work the way you did

First you need to remove any pin/password you have set then create a backup

When you want to restore, restore backups of everything except data, then boot the rom so it sets up encryption, then reboot back to twrp and restore data
 
  • Like
Reactions: Zirila and LinhBT

Zirila

Senior Member
Jul 31, 2015
163
59
Backup and restore with encryption, even on a stable recovery, will not work the way you did

First you need to remove any pin/password you have set then create a backup

When you want to restore, restore backups of everything except data, then boot the rom so it sets up encryption, then reboot back to twrp and restore data
Thanks! I'm gonna try that next time I make a backup with twrp.

And what about the Super partition which is shown twice? one time as "Super" and one time as "Super (system, vendor, etc.)" or similar. Both the same size, about 9 GB.
Should we backup and restore both? I was assuming it is all the same super partition that TWRP just lists as two super partitions. (In the end it makes quite a difference to backup 9 GB or 18 GB+)
 

Nebrassy

Senior Member
Sep 17, 2015
946
1,656
Lattakia
Xiaomi Poco X3 Pro
Thanks! I'm gonna try that next time I make a backup with twrp.

And what about the Super partition which is shown twice? one time as "Super" and one time as "Super (system, vendor, etc.)" or similar. Both the same size, about 9 GB.
Should we backup and restore both? I was assuming it is all the same super partition that TWRP just lists as two super partitions. (In the end it makes quite a difference to backup 9 GB or 18 GB+)
It's the same just shown twice, I'll remove one next release
 
  • Like
Reactions: Zirila
AFter the first step.My phone reboot to the system and the prompt shows as below.
E:\>platform-tools\fastboot boot TWRP.img Sending 'boot.img' (131072 KB) OKAY [ 3.013s] Booting FAILED (Status read failed (Too many links)) fastboot: error: Command failed
I've tried all the usb port on my computer,the results are same.
 

Zirila

Senior Member
Jul 31, 2015
163
59
AFter the first step.My phone reboot to the system and the prompt shows as below.
E:\>platform-tools\fastboot boot TWRP.img Sending 'boot.img' (131072 KB) OKAY [ 3.013s] Booting FAILED (Status read failed (Too many links)) fastboot: error: Command failed
I've tried all the usb port on my computer,the results are same.

I would try to reflash official MIUI version with MiFlash Tool. Make sure it is the correct version for your phone and region before flashing it, check "clean" not "clean and lock". then give it a try after it is flashed clean.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 5
    3.5.2 is up

    fixed adb sideload and fastbootd
    fixed vibration
    further fixes for flashing roms
    new installation method, updated OP
    1
    help . i tried to restore to stock rom . twrp touchscreen not working.
    flash a clean stock rom with MiFlash and fastboot instead of TWRP.
    if you want to restore your data, you need to have a backup without lockscreen pin/pattern and restore only /data after flashing stock rom.
  • 30



    Introduction:

    Team Win Recovery Project or TWRP for short, is a custom recovery built with ease of use and customization in mind. We started from the ground up by taking AOSP recovery and loading it with the standard recovery options, then added a lot of our own features. It's a fully touch driven user interface , no more volume rocker or power buttons to mash. The GUI is also fully XML driven and completely theme-able. You can change just about every aspect of the look and feel.

    Key Features:

    Touchscreen driven with real buttons and drag-to-scroll
    XML-based GUI that allows full customization of the layout true theming!
    Settings are saved to the sdcard and persist through reboots
    Ability to choose which partitions to back up and which to restore
    Ability to choose to compress backups now with pigz (multi-core processor support for faster compression times)
    Onscreen keyboard
    Easy selection of internal/external storage

    In addition to the above new features, TWRP features a scripting engine that allows an app to send commands to the recovery for the recovery to perform during startup. We call this scripting engine OpenRecoveryScript. This engine will be put to use immediately in the GooManager app. GooManager will be able to install recoveries automatically for most supported devices. The app will also let you choose to install multiple zips from within Android, wipe, and run a backup.

    We are looking for other talented developers, themers, and device maintainers if they are interested in helping with a free, open source project.

    Source Code:

    GitHub - https://github.com/TeamWin/android_bootable_recovery

    Gerrit Instance - http://gerrit.twrp.me

    If you have made your own TWRP build for an unsupported device, please let us know. We might add your build to the list of unofficial builds. Bear in mind that we are working hard to add more devices and we may add your device to our official build list later.

    Hello, this is an alpha build of TWRP, for Redmi note 10 Global/India (sunny/mojito)

    Installation:
    1. fastboot boot twrp.img
    2. go to Advanced > Flash Current TWRP
    3. after that is done, if you were using a custom kernel, reflash it now
    4. if you were using magisk, reflash it now

    if Flash Current TWRP fails, go to Backup > Refresh Sizes and try Flash Current TWRP again

    Updating to a newer build:
    1. download new build to internal storage
    2. go to Advanced > Install Recovery Ramdisk
    4. select the new image
    5. after that is done, if you were using a custom kernel, reflash it now
    6. if you were using magisk, reflash it now

    Send me a beer: Crypto(Preferred) | PayPal

    Tree: https://github.com/nebrassy/device_xiaomi_mojito-TWRP

    Telegram group: https://t.me/NSSFB

    Download: https://www.androidfilehost.com/?w=files&flid=324936
    5
    new build with repacking support is up, installation instructions are in the OP
    5
    3.5.2 is up

    fixed adb sideload and fastbootd
    fixed vibration
    further fixes for flashing roms
    new installation method, updated OP
    3
    Hi. I flashed pe plus custom rom using twrp. But it gets on boot loop. But when I restarted my phone and get into recovery mode, twrp is gone and pe recovery mode came instead. Anyone knows y?
    You flash the rom.
    Rom contains boot image.
    Boot image contains recovery.
    Flashing replaces the previous recovery...¯\_(ツ)_/¯
    2
    it's pretty obvious a Virtual A/B environment. Handling OTA updates on these systems is pretty new and complex if not done before. But normal dirty flashes within TWRP needs to be adjusted too. I think all the snapshotted errors, and device not switching a-b slots after flashing I experienced lately can be fixed, but it would require TWRP and probably Custom ROM install .zips to be adjusted to the new virtual a/b system.

    unfortunately, that means, there is currently no safe way to upgrade Custom ROMs.. it's pretty much trial and error and it will almost certainly end up in losing data.

    while the community still struggles with Android10 and 11 changes, google is already about to release the next hurdles with Android12.. -.-