• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

Development [RECOVERY] [ALPHA] TeamWin Recovery Project

Search This thread
Hi there at XDA,

I have a few questions about my new Poco F3, which of course revolve around TWRP, flashing and rooting. I've already read a few things here on XDA, www and other boards, but I didnt found anything that made things clear nor helped me so I need some help now - please! :)

First some information about the current status:
Driver, adb + fastboot: up-to-date (v31.0.3), the device is properly addressed
PC: Win10 20H2
PocoF3: had MIUI 12.5.3 after the update, before I decided to unlock and root, bootlock is already off
What I want on the phone is:
TWRP: 3.5.2_11 Nebrassy, CustomROM: HavocOS 4.8 (20210805) plus the GApps, Magisk: 22.1 / 23

What I did:
boot-> fastboot: flash boot twrp.img............................................... works ok
boot-> recovery: I'm into twrp .......................................................... works ok
recovery twrp: advanced, install recovery_ramdisk, twrp.img....... works ok
boot-> recovery: twrp......................................................................... works ok
boot-> fastboot: twrp......................................................................... works ok

Up to now everything is fine and if I did understand things right TWRP should be permanently flashed, right?

Question 1: When flashing TWRP I always get the error E: Error getting bootctrl module twice. Why does it appear and what does it mean?
Question 2: What is the difference between the menu items Install Recovery Ramdisk and Flash current TWRP?

What I was able to infer from a post here that this A / B-Slot thing is something like a "dual BIOS", if something goes wrong in one slot, the previous or other slot (hopefully) still works. With the phone, however, it is probably not used that way, that's why
Question 3: If so, when and why are the active slots changed and how can I access them? Where is the danger if I actively change it myself?
(When I flash TWRP + OS in the inactive slot (e.g. A), A is activated during reboot and the next flash process happens in B because it is inactive now (see experiment 9: flashing OS, after reboot flashing GApps in recovery)
Question 4: Can someone please explain the partitions created in the Poco (System, system_ext, Product, Vendor, ODM, Metadata, Data, Cust, Firmware, Persist)? What they are here for and which data they contain.
Well there is a post but in fact it does not make things clear enough.

Question 5: I still know the important EFS partition from my "bacon". Does the Poco also have one and can it be backuped with twrp?

Up to this point I could still understand most of the things happend. After Stock ROM I looked at various Custom ROMs and proceeded as follows:
went into fastboot: flash twrp; went into recovery: wipe data, format data, flash rom, reboot system
It didn't bother me, but I was always amazed that after flashing the ROM, TWRP was always replaced by some recovery or fastboot menu from the ROM.
Question 6: If the above procedure should install TWRP permanently, why is it always overwritten?
Question 7: If I select Automatically reflash TWRP after flashing a ROM in TWRP - Settings, the device regularly gets stuck in the OS boot process (boot animation).

Now that I would like to keep HavocOS (and the associated GApps) and also install Magisk, the problems start with me:

If I mount all partitions, there are fewer errors when flashing the ROM (otherwise only 4 (?) incorrect / missing mount points are displayed, but mounting nearly all - except firmware, usb - is fine).

Experiment 1: TWRP flashed, HavocOS flashed, reboot into system:...............................working
Experiment 2: TWRP, Havoc + GApps in one go, reboot: endless bootanimation loop
Experiment 3: TWRP, Havoc flash, GApps flash, reboot: endless bootanimation loop
Experiment 4: TWRP, Havoc, Magisk zip, error-free, reboot: reboot loop (restart, Poco logo, vibra, restart, Poco logo, vibra, .... )
Magisk should be injected into a recovery image - AHA! - so:
Experiment 5: TWRP, Havoc flash, reboot system, install Magisk app, Magisk patches Nebrassy's TWRP -> twrp_patched
Experiment 6: twrp_patched, Havoc flash, reboot: reboot loop
Experiment 7: twrp_patched, ramdisk twrp_patched, reboot recovery: no visible change
Experiment 8: Havoc flash, reboot: reboot loop
Because nothing works now, so again step-by-step
Experiment 9: TWRP, Havoc flash, reboot recovery, GApps flash, reboot: endless bootanimation loop

Then I noticed that the GApps are installed in the other slot (see above). If this slot is activated now, the phone tries to start the GApps ..., or what?

I don't know what to do next and I hope someone can lighten the darkness!

Question 8: Why does TWRP not persist?
Question 9: What am I doing wrong when flashing multiple ZIPs?
Question 10: What am I doing wrong when flashing / patching Magisk?
Question 11: What about OTA updates and / or dirty flash?
Question 12: And how do the Magisk / EdXposed modules get flashed without TWRP or the ROM saying goodbye?

Besides this I have two more questions apart from the flash orgy:
Question 13: What is the EDL mode for Qualcomm chips and how can it be used? Does it make sense anyhow?
Question 14: TWRP does not save the settings. Is this due to software problems and / or that the device has no access to certain mounts/directories?

Thank you for persevering in reading and also for helpful thoughts and solutions.

Best regards,

I'll answer some of these when I get home, but welcome to the community, the most basic of all is that our phone doesn't have a dedicated Recovery partition


May 12, 2012
tried to install one os with this recovery, but everytime i tried to install it just rebooted into recovery everytime i pressed install
  • Like
Reactions: silentacker


Senior Member
Sep 16, 2011
Xiaomi Poco F3
great, that's what we've been waiting for (y)

layout: device
title: "Xiaomi Poco F3"
codename: alioth
oem: Xiaomi
downloadfolder: alioth
supportstatus: Current
maintainer: Nebrassy
devicetree: "https://github.com/TeamWin/android_device_xiaomi_alioth"
xdathread: "https://forum.xda-developers.com/t/recovery-alpha-teamwin-recovery-project.4272625/"

{% include disclaimer.html %}

{% include supportstatus.html %}

{% include xiaomiunlock.html %}

{% include dynamicpartitions.html %}

{% include download.html %}

{% include fastbootabinstall.html %}


Senior Member
Nov 8, 2012
@Nebrassy TWRP working great on Mi 11x (Indian variant) for the most part, so thanks for your work!
There are few misses that you can improve in the future builds.

- It's missing Busybox so commands like fstrim doesn't work through terminal.
- I made system r/w using attached zip from 4pda forum, and I can edit system partition when phone is booted but for some reason TWRP still doesn't allow modification directly through recovery even though partition is r/w. May be you can take a closer look.

PS: I believe our super partition (system, vendor, system_ext) is only "soft read-only" so, attached zip allows turning it off, without rebuilding entire super partition.

{Mod edit: Link and attachment removed!}
Last edited by a moderator:
  • Like
Reactions: silentacker
@Nebrassy TWRP working great on Mi 11x (Indian variant) for the most part, so thanks for your work!
There are few misses that you can improve in the future builds.

- It's missing Busybox so commands like fstrim doesn't work through terminal.
- I made system r/w using attached zip from 4pda forum, and I can edit system partition when phone is booted but for some reason TWRP still doesn't allow modification directly through recovery even though partition is r/w. May be you can take a closer look.

PS: I believe our super partition (system, vendor, system_ext) is only "soft read-only" so, attached zip allows turning it off, without rebuilding entire super partition.

{Mod edit: Link and attachment removed!}
@jineshpatel30 I've removed the link and the attachment from your post above. Same applies to your nearly duplicate post here.

4pda is not only another phone related website but also well known for the distribtuion of malware and warez; as such links to 4pda are not accepted on XDA at all. Please refrain from sharing of such references in future. Thanks for your cooperation.

XDA Forum Rules (excerpt):
6. Do not post or request warez.

If a piece of software requires you to pay to use it, then pay for it. We do not accept warez nor do we permit members to request, post, promote or describe ways in which warez, cracks, serial codes or other means of avoiding payment, can be obtained or used. This is a site of developers, i.e. the sort of people who create such software. When you cheat a software developer, you cheat us as a community.


11. Don’t post with the intention of selling something.
  • Don’t use XDA to advertise your product or service. Proprietors of for-pay products or services, may use XDA to get feedback, provide beta access, or a free version of their product for XDA users and to offer support, but not to post with the intention of selling. This includes promoting sites similar / substantially similar to XDA-Developers.com.
  • Do not post press releases, announcements, links to trial software or commercial services, unless you’re posting an exclusive release for XDA-Developers.com.
  • Encouraging members to participate in forum activities on other phone related sites is prohibited.
  • Off-site downloads are permitted if the site is non-commercial and does not require registration.
  • Off-site downloads from sites requiring registration are NOT encouraged but may be permitted if both of the following conditions are met:
    A) The site belongs to a member of XDA-Developers with at least 1500 posts and 2 years membership, who actively maintains an XDA-Developers support thread(s) / posts, related to the download.
    B) The site is a relatively small, personal website without commercial advertising / links (i.e. not a competitor forum-based site with purposes and aims similar to those of XDA-Developers.com.)
Oswald Boelcke
Senior Moderator
  • Like
Reactions: silentacker


Dec 11, 2015
TWRP_3.5.2 version causes bootloop at my POCO F3. When I return back to TWRP_3.5.1, everything is ok. Thx God and Nebrassy that one of them worx...
  • Like
Reactions: silentacker


Senior Member
Mar 7, 2018
Samsung Galaxy S5
Huawei P9 Lite
Can you please tell me the procedure of flashing OneOS through this recovery....as of now my BL is not unlocked yet though 5 days ago it was showing me to wait for 121Hrs but yesterday when I tried it's again asking me to wait another 168Hours....I don't understand what's wrong with Xiaomeme
You have probably logged out of the account, because if you disconnect and reconnect the hour count it restarts from 0

Top Liked Posts

  • There are no posts matching your filters.
  • 6
    I used to spend all day flashing roms and trying everything for a device. Now that has absolutely stopped. I know have to have 3 hours of time to flash a rom to go back to stock and flash the rom I came from. It's fine when I could restore in 5 minutes with Twrp but now 90 percent of roms are all the same and kernels are all stock Kernel with a gesture or something added. It's really not worth flashing roms when it takes so long for so little benefit. Damn I miss the old system layout
    So I googled twrp 3.6.0 to see what the official change log said and to my surprise there's nothing on TWRPs website. I did see updates in TWRP GitHub. I don't suppose it's able to restore A/B slots? What's sad about what I just said is people are going to take offense to it. Development is very difficult it is and people shouldn't take offense to it. This is a TWRP thread supposed to be designed for questions and help with the twrp. But what has happened is because the XDA developers think they have to uphold a image people can't ask the right questions because it will offend the people making twrp.

    This is silly none of us could do better, we know your not professionals and you don't get paid but you do do it for you. You all love the glory it brings you on here. I have gotten used to on Xda whenever I get a new device I will do a quick 5 minute search and if I don't find the answer I have the answer it doesn't work and no one is allowed to talk about it because it'll upset someone else.

    For 5 years it used to be don't flash a rom without making a backup in twrp and than a clean install. Over and over again now we don't see anything about doing a system back up or wipe and we're just supposed to be mind readers and understand that we can't do it so we don't do it.If anyone ask they will be told search the thread and I did there is no direct person saying it can't be done just people tip toeing around it.

    This is a help thread and it is almost completely unhelpful. It should be right on the opening page but it says choose what partitions you want to backup and restore. On the help thread it tells you you can restore the partitions like you have for years. That's why so many have tried it.
    Where is the download for the newest version ?
    Here. It's made for android 11, but I can install it on android 12 (without decryption). To install, there is “install current TWRP” after booting it
    I cannot find option to delete system cache only dalvik cache
    Our phone doesn't have a cache partition, or a recovery one
  • 95


    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 Poco F3/Mi 11X/Redmi K40

    touch and adb work
    flashing works
    USB OTG works
    Decryption is working

    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
    3. select the new image
    4. after that is done, if you were using a custom kernel, reflash it now
    5. if you were using magisk, reflash it now

    Send me a beer: Crypto(Preferred) | PayPal


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

    Download: https://www.androidfilehost.com/?w=files&flid=325130
    New build is up


    fixed usb config (fastbootd and adb sideload now work)
    fixed vibration
    removed partitions shown twice in menus
    data can now be safely formatted after flashing
    new flashing method, Advanced > Flash Current TWRP
    added toggle in settings to automatically flash TWRP after flashing a ROM, it will only be flashed after a payload.bin rom (custom roms only not MIUI ports)
    further fixes for flashing roms
    new build is up
    -fixed spunvm spam in log
    -fixed flashing payload roms, stock and custom AOSP roms should now flash correctly
    @Nebrassy Nice work - tested on my crDroid working-build and all ok 👍