• 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,
herz.AG

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
 
  • Like
Reactions: herz.AG

varadinum

Senior Member
Sep 16, 2011
751
250
Graz-Budapest
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 %}
 

jineshpatel30

Senior Member
Nov 8, 2012
1,572
1,176
@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:
@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.)
...
Regards
Oswald Boelcke
Senior Moderator
 

foma2805

Member
Dec 11, 2015
22
4
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...
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    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 %}
    1
    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,
    herz.AG

    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
  • 85



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

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

    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
    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

    Trees:
    https://github.com/nebrassy/device_xiaomi_alioth-TWRP
    https://github.com/nebrassy/device_xiaomi_sm8250-common-TWRP

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

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

    3.5.2

    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
    23
    new build is up
    -fixed spunvm spam in log
    -fixed flashing payload roms, stock and custom AOSP roms should now flash correctly
    10
    @Nebrassy Nice work - tested on my crDroid working-build and all ok 👍