• 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

[RECOVERY][TWRP]Unofficial TWRP Recovery for Mi A2

Search This thread

TingyiChen

Senior Member
May 28, 2016
179
1,239
Huanggang
Team Win Recovery Project 3.x, or TWRP3.x for short, is a custom recovery built with ease of use and customization in mind. Its 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.
Code:
/*
 * Your warranty is now void.
 *
 * We are not responsible for bricked devices, dead SD cards,
 * thermonuclear war, or you getting fired because the alarm app failed. Please
 * do some research if you have any concerns about features included in this ROM
 * before flashing it! YOU are choosing to make these modifications, and if
 * you point the finger at us for messing up your device, we will laugh at you.
 *
 */
Download : TWRP For Jasmine
Source Device Tree: Device Tree For Building TWRP
 

tnmsrkr

Senior Member
May 1, 2016
115
38
30
CHAKDAHA
is it work >?

Temporary using guide:
Download this TWRP,
fastboot flash boot_b TWRP-3.2.3-jasmine-20180804.img
fastboot set_active b
then reboot and hold Volume Up to boot,you will enter TWRP

Go Back to System:
Activate Slot A at TWRP Reboot Menu and reboot

If you have better way,tell me:)Thanks.

WILL THIS COMMAND ( fastboot boot twrp.img) work on this device for only boot into twrp >??
 
  • Like
Reactions: g4rrucho

TheXenons

Senior Member
Mar 29, 2014
64
7
How can I install Magisk from the TWRP of Slot B in Slot A? When trying to install it detects Slot B and installs it in it.
 

MrPhilo

Senior Member
Dec 12, 2010
2,016
646
Sheffield
No,due to some AB special thing,directly fastboot boot twrp.img will cause a reboot on splash screen and brick ur data,only wipe data can enter system again

Really, I'm assuming A2 A/B is different to OnePlus 6 but what we do is fastboot boot twrp and then flash the official twrp and all is working. A bit weird it's different on A2.
 

grzpra

Member
Aug 16, 2016
41
8
This recovery done nothing as it was installed on _b rather than _a, so it's not modifying _a partition. and if we flashed it on _a, it will get bootloop/asking to reset data, even we flashed lazypatcher. And our device get bootloop to on _b partition.

You can use this to root, just flash it on boot_a. It was made by magisk manager with patch boot image method. You still need to install magisk manager to get root.

Don't install magisk xposed or you will facing bootloop/asking to reset data. If that happen and you don't want to lose your data, flash twrp from this thread to boot_a, use magisk recovery manager to uninstall xposed module, and then flash magisk boot from me again to boot_a. reboot afterwards.

Magisk boot image on 9.6.9.0.ODIMIFE : https://drive.google.com/file/d/1sMFjQVLvj_cX_tht7-woSQQ4YlCF_i4i/view?usp=sharing
 
Last edited:

emperor8696

Senior Member
Aug 16, 2017
70
12
This recovery done nothing as it was installed on _b rather than _a, so it's not modifying _a partition. and if we flashed it on _a, it will get bootloop/asking to reset data, even we flashed lazypatcher. And our device get bootloop to on _b partition.

You can use this to root, just flash it on boot_a. It was made by magisk manager with patch boot image method. You still need to install magisk manager to get root.

Don't install magisk xposed or you will facing bootloop/asking to reset data. If that happen and you don't want to lose your data, flash twrp from this thread to boot_a, use magisk recovery manager to uninstall xposed module, and then flash magisk boot from me again to boot_a. reboot afterwards.

Magisk boot image : https://drive.google.com/file/d/1sMFjQVLvj_cX_tht7-woSQQ4YlCF_i4i/view?usp=sharing

Which version of ROM do I need to have to flash the patched boot.img? Also, are the modules working?
 

grzpra

Member
Aug 16, 2016
41
8
Thank you, you saved my day. My Mi A2 (Global) finally has Root. :)

I tried with the howtos from the internet and installing different Magisk zip files through TWRP, nothing worked.

Is it possible to get a Magisk 16.7 boot image? ;)

If your rom is updated, i can't. As mine were Mi6x not A2, but it work with cross flashing with a little modification (don't know if it from A2 to Mi6x).
You can patch it yourself with magisk manager, copy the boot image from fastboot rom to your phone, in magisk manager you need to choose install and then select patch boot image. You need to be on "unroot" condition, just flash the original boot.img rom first with fastboot.
 

Roi Danton

Senior Member
Aug 19, 2009
96
27
If your rom is updated, i can't. As mine were Mi6x not A2, but it work with cross flashing with a little modification (don't know if it from A2 to Mi6x).
You can patch it yourself with magisk manager, copy the boot image from fastboot rom to your phone, in magisk manager you need to choose install and then select patch boot image. You need to be on "unroot" condition, just flash the original boot.img rom first with fastboot.

Thank you. As I wrote here I have a patched boot.img for stock ROM V9.6.10.0.ODIMIFE and Magisk 16.7 - which works pretty good. With your boot.img I had the problem that wifi did not work anymore.

If someone needs the patched boot.img, get in contact with me.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 38
    Team Win Recovery Project 3.x, or TWRP3.x for short, is a custom recovery built with ease of use and customization in mind. Its 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.
    Code:
    /*
     * Your warranty is now void.
     *
     * We are not responsible for bricked devices, dead SD cards,
     * thermonuclear war, or you getting fired because the alarm app failed. Please
     * do some research if you have any concerns about features included in this ROM
     * before flashing it! YOU are choosing to make these modifications, and if
     * you point the finger at us for messing up your device, we will laugh at you.
     *
     */
    Download : TWRP For Jasmine
    Source Device Tree: Device Tree For Building TWRP
    20
    Temporary using guide:
    Download this TWRP,
    fastboot boot TWRP.img
    Flash installer zip
    (NEED TWRP 1020 or later)

    If you have better way,tell me:)Thanks.
    7
    Sir please make a twrp for oppo A3s....... What is the best metho?
    Start with not posting this to a random forum..
    6
    sorry for my bad English.
    I just want to share my experience with Mi A2. I just bought Mi A2 last week & firmware shown dated August 2018.
    For the fresh ROM, nothing touch on it, active boot> it's boot_a. So i flash TWRP to boot_b & remain boot_a for system booting.
    Then after OTA Rom update patching for September 2018, system automatic change to boot_b for active slot. If someone not aware on this, will bootloop your phone after play with boot, twrp, magisk, fastboot & etc.
    That's means boot_a still using original boot.img, only boot_b it's from latest patching.
    I found this way to make my phone run perfectly with no bootloop.
    Prepare this file:-
    1) Download TWRP "jasmine"
    2) Download Magisk Manager
    3) Download Fastboot v1.4.3. Run minimal_adb_fastboot_v1.4.3.exe. Make sure PC system path to fastboot v1.4.3, no clash with other fastboot.exe

    Installation:-
    My phone already unlock oem bootloader, unlock flashing, unlock flashing critical, Developer ON, USB Debugging ON, & update with Patching September 5 2018. build numb. V9.6.13.0
    1)reboot phone to bootloader, press power button, after blank screen then pres vol_down.
    2)connect phone to PC & type this:-
    Command> fastboot getvar current-slot. Check active slot, should be _b. If shown _a, that's means your phone not update yet.
    Command> fastboot flash boot_a TWRP-3.2.3-jasmine-20180804.img
    Commadn> fastboot set_active a
    Command> fastboot reboot > press enter +press vol_up button to get into TWRP Recovery.
    3)We need to extract boot_b from my phone using TWRP Recovery mode>
    goto Advanced,Terminal & type this:-
    Command> ls -all /dev/block/platform/soc/c0c4000.sdhci/by-name
    > will show all the partitions, now find where is boot_b location, my phone shown :-
    boot_b = /dev/block/mmcblk0p63
    OR
    boot_b = /dev/block/platform/soc/c0c4000.sdhci/by-name/boot_b
    Command> dd if=/dev/block/mmcblk0p63 of/=/sdcard/boot_b.img
    4)Now exit from TWRP, Press back, reboot, select SLOT B, reboot system.
    5)Install Magisk Manager, run > click INSTALL > click Patch Boot Image File > select boot_b.img, after patching, magisk will create patched_boot.img same directory with boot_b.img.
    6)connect phone with PC again, copy patched_boot.img to PC.
    7)Restart phone + press Vol_Down to get into bootloader.
    Command> fastboot flash boot_b patched_boot.img
    Command> fastboot reboot
    Done!!.
    After reboot,open Magisk, check whether it's root.
    Now my phone:-
    > boot_a is TWRP recovery
    > boot_b is Magisk Patching Boot

    if i want to go into TWRP, reboot phone to bootloader & using PC type:-
    Command> fastboot set_active a
    Command> fastboot reboot + press Vol_Up to get into TWRP recovery, then must be exit from TWRP with reboot SLOT B.

    If my phone got error or bootloop, very easy..i just flash boot_b.img to slot a & slot b:-
    Command> fastboot flash boot_a boot_b.img
    Command> fastboot flash boot_b boot_b.img
    Command> fastboot set_active a > if this bootloop then change to slot b
    Command> fastboot set_active b:laugh:
    Command> fastboot reboot

    And start play again with all that things..:laugh:hehehe..

    I need help from you all, who can help me to create a script, can change current-slot b to slot a using phone, so i no need to reboot to bootloader & using PC to access TWRP.
    Thank you very much.
    Sorry my bad english.
    6

    there is a thanks button exactly for not spamming the thread with useless posts ;)