Installing Magisk on Redmi Note 8T (Willow) with Lineage OS and recovery - Redmi Note 8 Questions & Answers

I am trying to get Magisk to work on my Xiaomi Redmi Note 8T with Lineage OS, but the step where I am patching the boot.img is failing. I am using LOS recovery, and I followed the instructions provided by topjohnwu [1]: because the 8T doesn't appear to have ramdisk (I don't know what that means btw), I need to patch an image (my recovery image?) with the magisk app - this is what I did:
1. Install Magisk App and check status: "Ramdisk: No"
2. Download Lineage recovery image [2] and patch in Magisk
3. Install patched recovery image using fastbook [3]
4. Wipe device and Install LOS + GApps
5. Reboot to system => still says "Ramdisk: No"
What am I doing wrong? How did everyone else root their Note 8T?
[1] https://topjohnwu.github.io/Magisk/install.html
[2] https://download.lineageos.org/ginkgo
[3] https://wiki.lineageos.org/devices/ginkgo/install#installing-a-custom-recovery-using-fastboot
---
EDIT: I just found this: https://github.com/topjohnwu/Magisk/issues/3239 - does that mean it worked? Doesn't look it did...I don't think I have root

lueromat said:
I am trying to get Magisk to work on my Xiaomi Redmi Note 8T with Lineage OS, but the step where I am patching the boot.img is failing. I am using LOS recovery, and I followed the instructions provided by topjohnwu [1]: because the 8T doesn't appear to have ramdisk (I don't know what that means btw), I need to patch an image (my recovery image?) with the magisk app - this is what I did:
1. Install Magisk App and check status: "Ramdisk: No"
2. Download Lineage recovery image [2] and patch in Magisk
3. Install patched recovery image using fastbook [3]
4. Wipe device and Install LOS + GApps
5. Reboot to system => still says "Ramdisk: No"
What am I doing wrong? How did everyone else root their Note 8T?
[1] https://topjohnwu.github.io/Magisk/install.html
[2] https://download.lineageos.org/ginkgo
[3] https://wiki.lineageos.org/devices/ginkgo/install#installing-a-custom-recovery-using-fastboot
---
EDIT: I just found this: https://github.com/topjohnwu/Magisk/issues/3239 - does that mean it worked? Doesn't look it did...I don't think I have root
Click to expand...
Click to collapse
install OrangeFox recovery
rename Magisk22.APK to Magisk22.ZIP
install it like any zip in recovery
reboot
(i suggest you do a clean flash to avoid problems)
(yess, RN8 have ramdisk but that's not required for root to work)

After clean flashing the official LOS 17.1, I re-tried to install Magisk giving it every request permission and following steps detailed above by loopypalm but (as before) I'm still seeing "Requires Additional Setup" followed by a "Setup failed" message...
I unlocked the phone recently, set up the latest OrangeFox recovery and flashed new RN8 global firmware v12.0.4.0, Lineage v17.1 nightly 20210405 and pico OpenGapps 20210406. The phone isn't even encrypted (i.e., I've set no fingerprint, pin or pattern).
I tried removing Magisk v22 with the official uninstaller and downgrading to v21.4 with the same result. Then I used the Manager facilities to upgrade both Manager and the underlying Magisk, but still no dice.
I'm scratching my head here about what else to try. Something I noticed that may or may not be related is, while it was working alright before I started setting up Magisk, advanced reboot became really sluggish and failed to reboot to recovery after this (only buttons work).
I'll keep searching and will maybe try a different ROM but this is a real bummer.

loopypalm said:
install OrangeFox recovery
rename Magisk22.APK to Magisk22.ZIP
install it like any zip in recovery
reboot
(i suggest you do a clean flash to avoid problems)
(yess, RN8 have ramdisk but that's not required for root to work)
Click to expand...
Click to collapse
after installing LOS, GApps and Magisk in OrangeFox, and then booting to system, the phone is stuck at the sim PIN entry - I can enter it, but it doesn't advance afterwards. this is what I did:
1. Install TWRP
2. Use TWRP to install OF
3. in OF, wipe everything except usbstorage and sdcard
4. create installation queue with latest LOS, GApps, and Magisk, and install
5. boot to system => stuck at sim PIN entry
any suggestions?

i have the same with the latest LOS 17.1 tried also 21.4 both not working, I flashed again without Magisk so far

cali.s said:
i have the same with the latest LOS 17.1 tried also 21.4 both not working, I flashed again without Magisk so far
Click to expand...
Click to collapse
I hit "Emergency", went back to the PIN mask, and then it would accept my SIM pin. So far so good...

pnin said:
After ...
Click to expand...
Click to collapse
please follow instruction and do not add/remove a step
-flash OFox (if you already have it = no need)
-reboot to recovery
-flash latest A10 stable FW RN8 Ginkgo / RN8T Willow
-format data (not wipe) (this will erase internal storage!)
-reboot to recovery
-wipe 5 (cache/dalvik/system/vendor/data)
-flash the rom you want
-flash kernel (if you have any)
-flash DFE
-format data again
-reboot to recovery
-reboot to system
-reboot to recovery and flash magisk
done

lueromat said:
after installing LOS, GApps and Magisk in OrangeFox, and then booting to system, the phone is stuck at the sim PIN entry - I can enter it, but it doesn't advance afterwards. this is what I did:
1. Install TWRP
2. Use TWRP to install OF
3. in OF, wipe everything except usbstorage and sdcard
4. create installation queue with latest LOS, GApps, and Magisk, and install
5. boot to system => stuck at sim PIN entry
any suggestions?
Click to expand...
Click to collapse
i heard about that bug
remove the pin from the sim in another phone

loopypalm said:
-flash the rom you want
-flash kernel
-flash DFE
Click to expand...
Click to collapse
The ROM I want is the official Lineage -- I'm no hardcore flasher, just want to take it easy with a tried and tested custom ROM. But the kernel and DFE got me stumped: do I really need them? Which ones?

pnin said:
The ROM I want is the official Lineage -- I'm no hardcore flasher, just want to take it easy with a tried and tested custom ROM. But the kernel and DFE got me stumped: do I really need them? Which ones?
Click to expand...
Click to collapse
i think you should try RRos (it's based on LOS and updated)
i said kernel, so if you have one in mind, that's the step (correct order) you flash it in
(people use "sixteen" for battery,or default "quicksilver" ,or ryzen or ...)
DFE is "Disables dm-verity, forced encryption"

lueromat said:
after installing LOS, GApps and Magisk in OrangeFox, and then booting to system, the phone is stuck at the sim PIN entry - I can enter it, but it doesn't advance afterwards. this is what I did:
1. Install TWRP
2. Use TWRP to install OF
3. in OF, wipe everything except usbstorage and sdcard
4. create installation queue with latest LOS, GApps, and Magisk, and install
5. boot to system => stuck at sim PIN entry
Click to expand...
Click to collapse
lueromat said:
I hit "Emergency", went back to the PIN mask, and then it would accept my SIM pin. So far so good...
Click to expand...
Click to collapse
so in the end this worked, LOS + root, and no complaints so far.
other users were also successful with not sticking to the official magisk installation instruction, but just flashing the zip in recovery: https://github.com/topjohnwu/Magisk/issues/3239#issuecomment-816164610
guess this is the way to go for willow

loopypalm said:
please follow instruction and do not add/remove a step
-flash OFox (if you already have it = no need)
-reboot to recovery
-flash latest A10 stable FW RN8 Ginkgo RN8T Willow
-format data (not wipe) (this will erase internal storage!)
-reboot to recovery
-wipe 5 (cache/dalvik/system/vendor/data)
-flash the rom you want
-flash kernel (if you have any)
-flash DFE
-format data again
-reboot to recovery
-reboot to system
-reboot to recovery and flash magisk
done
Click to expand...
Click to collapse
Hi loopypalm, only for curiosity: is there a reason why to wipe /data "again" in step 6 after having formatted /data already in step 4? And furthermore why to format /data for a second time in step 10? What happens to /data after the first formatting that makes these steps recommendable? Thx if you find a minute to explain...

HI , this is what devs been recommending since the beginning (on ginkgo)
Uluru25 said:
is there a reason why to wipe /data "again" in step 6 after having formatted /data already in step 4?
Click to expand...
Click to collapse
no
Uluru25 said:
And furthermore why to format /data for a second time in step 10? What happens to /data after the first formatting that makes these steps recommendable?
Click to expand...
Click to collapse
me personally i don't think formatting data a 2nd time is necessary
but as for what i think could be the reason is after formatting data you will get a "raw" file system , so the OS will choose the situable file system for it "EXT2" or "EXT4" or ...
that's why sometimes the system wont boot even if you flash DFE
(which (i think) is the case on all ports like ONEUI or OOS ...)

loopypalm said:
please follow instruction and do not add/remove a step
-flash OFox (if you already have it = no need)
-reboot to recovery
-flash latest A10 stable FW RN8 Ginkgo / RN8T Willow
-format data (not wipe) (this will erase internal storage!)
-reboot to recovery
-wipe 5 (cache/dalvik/system/vendor/data)
-flash the rom you want
-flash kernel (if you have any)
-flash DFE
-format data again
-reboot to recovery
-reboot to system
-reboot to recovery and flash magisk
done
Click to expand...
Click to collapse
loopypalm,
- Orange Fox, should "Allow modifications" be enabled OR "keep read-only"?
- will latest A11 (anrdoid 11) stable FW (Firmware) also be ok, or is this guide specifically for A10?
Other notes of mine:
- OrangeFox requires device to be unlocked with MiFlash unlocking software first. (It's a type A device it seems, NOT a/b)

jddcef said:
- Orange Fox, should "Allow modifications" be enabled OR "keep read-only"?
Click to expand...
Click to collapse
allow Read & write
jddcef said:
- will latest A11 (anrdoid 11) stable FW (Firmware) also be ok, or is this guide specifically for A10?
Click to expand...
Click to collapse
this guide is for all rom, if you are using A11 then use A11 FW
jddcef said:
- OrangeFox requires device to be unlocked with MiFlash unlocking software first. (It's a type A device it seems, NOT a/b)
Click to expand...
Click to collapse
The Ofox i linked is for Ginkgo/Willow if you have this device + unlocked BL = just flash

Related

Please Help me intall Lineage OS (constant Softbrick)

Hi,
I used Lineage for a long time on my Nexus 4 (mako) without a problem. But for some reason I could not flash it on this phone if my life would depend on it. I updated the stock rom to OPXS27.109-49-5 (XT1789-06) and tried all the following combinations TWRP 3.2.1-1 and 3.2.2-2 with Lineage 15.1 2018/07/03 | 2018/07/10 | 2018/07/17.
I follow this steps:
- start developer mode and push twrp-3.2.2-2 to sdcard
- reboot bootloader
- fastboot boot twrp 3.2.2-2 image
- install twrp 3.2.2-2.zip
- reboot to recovery
- reboot to bootloader
- fastboot -w
- until this point everything works like a charm
- fast setup no connects etc.
- activate developer mode
- push os (lineage-15.1-20180717-nightly-nash-signed.zip)
- push twrp 3.2.2-2.zip
- reboot to recovery
- optional: wipe Dalvik/ART Cache | System | Data
- install OS.zip
- optional: reinstall twrp.zip
- reboot system
- Softbrick
The phone will now constantly reboot and it is even impossible to turn it off. I can get to bootloader if I connect the phone to a PC and hold the key combination for bootloader. In bootloader I can't choose anything using the phone itself and I can't call recovery from fastboot either. I can however allfalsh back to stock or use reboot and reboot bootloader command.
I would be most grateful for some help or suggestions what might be the problem here.
Thanks in advance.
Regards.
After 07-17, the process is much simpler.
Start with a Flashall at this point.
Reboot, confirm you're on at least 27.1.2
Go to bootloader, boot TWRP 3.2.2 image.
Then follow the steps given by npjohnson(https://forum.xda-developers.com/z2-force/development/official-lineage-os-15-1-t3816540)
In TWRP, click "Wipe", "Format Data", then type "yes" as prompted.
(Optionally) Flash the newest TWRP Installer also found at the Official TWRP Project Site if you wish to maintain TWRP, though please note that it will need to be re-installed on update.
ADB sideload the newest weekly
Click "Reboot, then choose "Recovery", this will boot you to either Lineage Recovery or TWRP depending on your choice to install TWRP or not. It is necessary to reboot between ROM flash and GApps/Addon flash due to verity/slot-swap logic.
(Optionally) Flash GApps - Only MindTheGApps arm64 are compatible, OpenGApps are not compatible with A/B yet: MindTheGApps.
(Optionally) Flash SU - you'll need to turn it on from in developer settings after first boot Lineage OS SU Addon. - Magisk works fine, though is not supported.
Reboot
Unseeablething said:
After 07-17, the process is much simpler.
Start with a Flashall at this point.
Reboot, confirm you're on at least 27.1.2
Go to bootloader, boot TWRP 3.2.2 image.
Then follow the steps given by npjohnson(https://forum.xda-developers.com/z2-force/development/official-lineage-os-15-1-t3816540)
In TWRP, click "Wipe", "Format Data", then type "yes" as prompted.
(Optionally) Flash the newest TWRP Installer also found at the Official TWRP Project Site if you wish to maintain TWRP, though please note that it will need to be re-installed on update.
ADB sideload the newest weekly
Click "Reboot, then choose "Recovery", this will boot you to either Lineage Recovery or TWRP depending on your choice to install TWRP or not. It is necessary to reboot between ROM flash and GApps/Addon flash due to verity/slot-swap logic.
(Optionally) Flash GApps - Only MindTheGApps arm64 are compatible, OpenGApps are not compatible with A/B yet: MindTheGApps.
(Optionally) Flash SU - you'll need to turn it on from in developer settings after first boot Lineage OS SU Addon. - Magisk works fine, though is not supported.
Reboot
Click to expand...
Click to collapse
+1000 - Thanks for letting him know. This is the right process to follow.
npjohnson said:
+1000 - Thanks for letting him know. This is the right process to follow.
Click to expand...
Click to collapse
Thank you both for your replies and the guide.
I tried this method, but sadly it failed in Step 2/2 install ( ADB sideload the newest weekly) with the error "Unable to find partition for path '/cache'.
I see you list OCSX-version in your guide which points to the US-Version of the phone (Single-SIM) whereas the rest of the world including me got dual-Sim.
Is it really only for the US-phone (I would guess that is not the case.) or is my error completely unrelated to that?
Thanks in advance.
HorstA said:
Thank you both for your replies and the guide.
I tried this method, but sadly it failed in Step 2/2 install ( ADB sideload the newest weekly) with the error "Unable to find partition for path '/cache'.
I see you list OCSX-version in your guide which points to the US-Version of the phone (Single-SIM) whereas the rest of the world including me got dual-Sim.
Is it really only for the US-phone (I would guess that is not the case.) or is my error completely unrelated to that?
Thanks in advance.
Click to expand...
Click to collapse
Our phone does not have a cache partition.
If it helps, take a tour to the guides: https://forum.xda-developers.com/z2-force/how-to/guides-bootloader-twrp-custom-roms-root-t3805737

Question Latest Twrp pros and cons

Today the unlock time for bootloader to unlock will complete and I Intend to install TWRP. I have found the latest officially supported twrp-3.6.1_11-0-alioth.img at https://eu.dl.twrp.me/alioth/. How does it compare to TWRP-3.5.1 https://forum.xda-developers.com/t/recovery-unofficial-twrp-3-5-1-20210702.4300189/.
Can anyone guide me what are the pros and cons of using twrp-3.6.1_11-0-alioth.img and its limitations as compared to TWRP-3.5.1 as I can not find any documentation on twrp-3.6.1_11-0-alioth.img. Any help will be appreciated.
Also does the following limitations of TWRP-3.5.1 also apply to twrp-3.6.1_11-0-alioth.img ?
KNOWN LIMITATIONS:
The following are some known limitations due to either the design nature of Virtual A/B or a problem with ROM themselves. Please read carefully :-
You cannot format data after flashing a ROM zip (Limitation of Virtual A/B). If you want to format, then reboot recovery after flashing ROM. Additionally, if you are encrypted, the newly flashed ROM must be able to decrypt your device. If not, then you have to format data before flashing the ROM It appears, you can actually format data after reboot even if the new ROM cannot decrypt.
You can flash only one ROM in one boot. If you wanna flash another ROM, you must boot to system once. This is again a limitation of Virtual A/B.
Once you have rebooted after flashing a ROM, you cannot write to the data partition until you boot successfully to the new ROM. Android seals the data partition after a ROM flash to prevent any accidental brick since the newly flashed ROM is actually stored in /data. Only data format is allowed in this case. Once you successfully boot to the new ROM, your storage becomes ready for writing again.
Ideally, after flashing a new ROM, you should only need to wipe your data rather than format. But, due to a problem in the device trees current ROMs are using, you will have to format data if you are currently on miui and want to switch to a custom ROM. Specifically, the roms need this commit and to set vendor security patch level to fix this issue. Switching between custom ROMs should not need format, except for hentai OS.
If you are currently on hentai OS, then before using TWRP, you must flash vendor_boot from the link provided in every hentai OS release. Otherwise, you will get black screen. This is only needed when you boot to TWRP for the first time. Do not repeat this step again. Also, do not try this with beta version of the ROM. Use it only with stable.
If you reboot to older slot after flashing new ROM, the new ROM will be cancelled and you will have to reflash again. This is because of how Virtual A/B works.
If you must flash magisk via recovery (it's not recommended now), please uncheck "Inject TWRP after install" else TWRP will remove magisk.
Do not flash magisk after flashing a ROM before reboot. Magisk's zip detects slot in a different way that will cause issues.
Backuptool (used to persist magisk and gapps across ROM updates) will also not work in recovery due to A/B. You will have to flash gapps (or any other zips) everytime after flashing a ROM.
you dont search enough...
this is latest A12 TWRP....
https://dl.akr-developers.com/?dir=skkk/TWRP
Installation:
activateUSB DEBUGGIN and OEM unlocked on Poco
(copy all files in Adb folder) rename the long TWRP file to twrp.img
Disable all security settings like PIN, pattern, fingerprint
start Poco in fastboot
fastboot boot twrp.img"
copy twrp.img to Poco or "adb push twrp.img /sdcard/"
TWRP Menü -> Advanced -> Flash Current TWRP or Install Recovery Ramdisk -> you must test it... both should work
TWRP Menü -> Reboot -> recovery
Magisk and safety net working great...
see also....
Xiaomi devices on Android 12 via Fastboot only:
- Download our ROM zip file
- Unpack downloaded zip file in the PC using WinRAR
- Reboot your device to fastboot mode (press volume down + power)
- Connect to PC via USB cable
- Run fastboot installation script from unpacked zip according your PC operating system:
--- For Windows OS - windows_fastboot_update_rom.bat
--- For Linux - linux_fastboot_update_rom.sh
--- For MacOS - macos_fastboot_update_rom.sh
greeting
hofi01 said:
you dont search enough...
this is latest A12 TWRP....
https://dl.akr-developers.com/?dir=skkk/TWRP
Installation:
activateUSB DEBUGGIN and OEM unlocked on Poco
(copy all files in Adb folder) rename the long TWRP file to twrp.img
Disable all security settings like PIN, pattern, fingerprint
start Poco in fastboot
fastboot boot twrp.img"
copy twrp.img to Poco or "adb push twrp.img /sdcard/"
TWRP Menü -> Advanced -> Flash Current TWRP or Install Recovery Ramdisk -> you must test it... both should work
TWRP Menü -> Reboot -> recovery
Magisk and safety net working great...
see also....
Xiaomi devices on Android 12 via Fastboot only:
- Download our ROM zip file
- Unpack downloaded zip file in the PC using WinRAR
- Reboot your device to fastboot mode (press volume down + power)
- Connect to PC via USB cable
- Run fastboot installation script from unpacked zip according your PC operating system:
--- For Windows OS - windows_fastboot_update_rom.bat
--- For Linux - linux_fastboot_update_rom.sh
--- For MacOS - macos_fastboot_update_rom.sh
greeting
Click to expand...
Click to collapse
I know where the lastest TWRP for Poco F3 is and how to install it as I have already installed it. That was not the question. The question was that "does limitations of TWRP-3.5.1 also apply to twrp-3.6.1_11-0'? Limitattions like being forced to reboot TWRP after flashing a every single zip file and other limitations like it as mentioned above. Thanks for your reply anyways.
so for me, TWRP does not start again, after installing a file.
I install TWRP, boot into TWRP again and install Magisk. after that I boot into the ROM.
TWRP does not restart itself
So, still no decryption on A12?
I wanted to test new custom roms but i dont want to have to reinstall everything from scratch if i go back to my current rom (.EU).
Can twrp make a full backup and restore it despite not having decryption?
If it cant, can I make a full back up of my phone from cmd in fastboot mode? (so i can just flash it from fastboot to restore everything as it is now)

[ROM FIX] [GSI FIX] Fix for the widespread A71 problem of not being able to flash GSI / GSI won't boot / after flashing GSI, boots into Fastboot mode

Here's the steps on how to fix it, because Samsung's treble implementation is kinda crap.
(note: might not work for everyone, steps must be done correctly)
These steps assumes that you have your phone bootloader unlocked, rooted,flashed with a custom Recovery, and encryption removed.
Method 1 (easy, no need to download large flash files)
- Go to your custom recovery and then wipe
- Flash the boot.img file given below (note: Flash only on A71 4G. I am not responsible if your device bricked because you flashed this img on A71 5G or other devices. EVEN IF IT IS SIMILAR, IT WON'T WORK!)
- Reboot to recovery (important)
- Your device might boot to a stock recovery as of now. Don't panic if it does. Power off then boot to download mode
- Select "reboot to download"
- Use Odin to flash twrp-3.6.2_11-3_afaneh92-a71.tar (AP slot) that is given below.
- When the device reboots, immediately boot into the custom recovery by pressing volume up + power button.
- Flash Multidisabler, file given below
- Flash your GSI of choice (select install image then flash as system image)
- Flash any fix zips that need to be flashed (if there are any)
- Wipe again just to make sure
- Reboot
Bugs: This TWRP build's encryption/decryption not fully working. Make sure your device storage is already decrypted, as formatting data will not decrypt your device storage.
Method 2 (hard, but almost guaranteed will work)
Thank you @Zainullahk1234 for this fix
install Stock ROM (4 files, search on Samfw or Sammobile for the flash firmware for the A71. I recommend to flash the latest binary, as flashing older builds will not work sometimes) boot into the stock rom and then change date to 3 months from now
check for updates, make sure you're connected to the internet for this
boot into download mode
flash twrp 3.6.2 (file given above) and vbmeta tar file
boot into twrp
do format data
flash multidisabler
flash GSI ROM
flash GSI Fixes (if there are any)
do factory reset
reboot
if it boots you into fastboot again, shutdown then reboot to recovery, flash twrp 3.6.2 via Odin and try another factory reset and reboot (In twrp)
Credits: @ShaDisNX255 for the stock boot.img, extracted from RayOS
@afaneh92 for the TWRP recovery.
Thread - https://forum.xda-developers.com/t/recovery-unofficial-twrp-for-galaxy-a71-snapdragon.4350893/
@ianmacd for the multidisabler
TigerLake said:
Here's the steps on how to fix it, because Samsung's treble implementation is kinda crap.
(note: might not work for everyone, steps must be done correctly)
These steps assumes that you have your phone bootloader unlocked, rooted,flashed with a custom Recovery, and encryption removed.
- Go to your custom recovery and then wipe
- Flash the boot.img file given below.
- Reboot to recovery (important)
- Your device might boot to a stock recovery as of now. Don't panic if it does. Power off then boot to download mode
- Select "reboot to download"
- Use Odin to flash twrp-3.6.2_11-3_afaneh92-a71.tar (AP slot) that is given below.
- When the device reboots, immediately boot into the custom recovery by pressing volume up + power button.
- Flash Multidisabler, file given below
- Flash your GSI of choice (select install image then flash as system image)
- Flash any fix zips that need to be flashed (if there are any)
- Wipe again just to make sure
- Reboot
Bugs: This TWRP build's encryption/decryption not fully working. Make sure your device storage is already decrypted, as formatting data will not decrypt your device storage.
Credits: @ShaDisNX255 for the stock boot.img, extracted from RayOS
@afaneh92 for the TWRP recovery.
@ianmacd for the multidisabler
Click to expand...
Click to collapse
It was simple if you linked my twrp thread, and please drop the image and direct link to my host.
afaneh92 said:
It was simple if you linked my twrp thread, and please drop the image and direct link to my host.
Click to expand...
Click to collapse
Okay, I'll link your TWRP thread.
afaneh92 said:
It was simple if you linked my twrp thread, and please drop the image and direct link to my host.
Click to expand...
Click to collapse
Also btw, TWRP 3.7 caused my phone to not boot, so I reflashed twrp 3.6.2 and this build is what I put here.
TigerLake said:
Also btw, TWRP 3.7 caused my phone to not boot, so I reflashed twrp 3.6.2 and this build is what I put here.
Click to expand...
Click to collapse
Thanks, will try to fix it soon

Development [RECOVERY][3.7.0_12-8][UNOFFICIAL][UNIFIED] TWRP with A12/A13 encryption support

This is an unofficial build of TWRP, based on the Android 12.1 branch, that supports encryption used by Android 12 and 13 ROMs. This build is tested on OP9 pro, but it was confirmed to work on regular OP9 too.
As always I'm not responsible for any bricked device or data loss resulting from the use of this TWRP builds. You use this at your own risk.
For ROMs using FBEv1 encryption aka A11 encryption, please use the official builds by @Nebrassy from:
[RECOVERY] [11] [OFFICIAL] TeamWin Recovery Project
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...
forum.xda-developers.com
Download:
twrp-3.7.0-12.1 - Google Drive
drive.google.com
Installation:
Permanent installation is not possible with TMO stock ROM installed.
Installation overwrites all boot partition changes done previously (e.g. by Magisk or custom kernel). So you have to reflash all zips that change the boot partition after TWRP is installed.
For permanent installation, you have three options depending on your current system.
1. Option for rooted devices:
Download the twrp-installer zip
Flash it with Magisk manager or some other kernel flash utility
Reflash your custom kernel and Magisk.apk if previously installed (see example of how to install with Magisk manager below). Or alternatively flash zips in TWRP.
Don't reboot
Rename downloaded Magisk.apk to Magisk.zip
Open Magisk app
Select Modules tab
Click "Install from storage"
Select Magisk.zip
2. Option for users with other custom recoveries but without root:
Download the twrp-installer zip
Reboot to recovery
Flash it with "adb sideload twrp-installer*.zip"
Reboot to recovery
Reflash your custom kernel and Magisk.apk if previously installed
3. Option is universal:
Download boot.img
Reboot to bootloader
Run "fastboot boot boot.img" with the TWRP boot image on your PC
Go to Advanced > Flash Current TWRP
Reflash your custom kernel and Magisk.apk if previously installed
Try without installation:
Download boot.img
Reboot to bootloader
Run "fastboot boot boot.img" with the TWRP boot image on your PC
Uninstall:
Just flash the boot partition with your current ROMs boot image with the following steps.
Replace "YOUR ROM BOOTIMAGE" with the filename of the extracted boot image of your current ROM.
Reboot to bootloader
Run "fastboot flash boot_a YOUR ROM BOOTIMAGE"
Run "fastboot flash boot_b YOUR ROM BOOTIMAGE"
Alternatively you can flash your currently installed OTA zip, which overwrites boot on the unused slot, but not on the currently used one.
TWRP Updates:
Download and flash the twrp-installer zip
After that reflash your custom kernel and Magisk if previously installed
ROM Updates:
Please follow the official update instructions for your ROM!
If they give an option to update via recovery you have to substitute adb sideload commands with zip installations. Also use the "Automatically reflash TWRP after flashing a ROM" option, if you are going to install a ROM zip to preserve TWRP installation.
In case your ROM does not provide a recovery update instruction you can try to update via recovery but you are on the safe side if you follow the official instructions. They always have a reason for their particular update instructions!
Instructions that work for me (on LOS based ROMs):
Flash ROM zip with "Automatically reflash TWRP after flashing a ROM" checked
Flash your previously installed zips (custom kernel, Gapps, Magisk, etc)
Reboot to system
If Gapps packages keep crashing:
Reboot to TWRP
Flash Gapps again
Reboot to system
For OOS updates should work out of the box, but if you have issues you can follow these steps (I haven't tested them):
[RECOVERY][3.7.0-12.1][UNOFFICIAL][UNIFIED] TWRP with A12/A13 encryption support
This is an unofficial build of TWRP, based on the Android 12.1 branch, that supports encryption used by Android 12 and 13 ROMs. This build is tested on OP9 pro, but it was confirmed to work on regular OP9 too. As always I'm not responsible for...
forum.xda-developers.com
About backups/restore:
Restore data only WITHOUT pin/pattern set.
If you restore a backup made from another ROM, then the currently installed, you may have to format data. So please manually copy all contents from /sdcard to a PC or flash drive.
Backups can be made with or without pin/pattern set. It is always good practice to copy your backups to your PC or an USB drive. Also after you restored your data partition you have to reboot to system and do a second reboot to get a working system.
To make first boot faster and eliminate the need to reboot again, additionally use the step mandatory for OOS users.
If you want to copy your backup to PC, but it doesn't show up, flash change_backup_selinux_context.zip, which is available in download folder.
For OOS users:
When data is restored, you have to delete "/data/system/users/0/package-restrictions.xml" before rebooting to system.
In case you restore a backup with pin/pattern set or have some other issues I have a guide that works for me:
[RECOVERY][3.7.0-12.1][UNOFFICIAL][UNIFIED] TWRP with A12/A13 encryption support
This is an unofficial build of TWRP, based on the Android 12.1 branch, that supports encryption used by Android 12 and 13 ROMs. This build is tested on OP9 pro, but it was confirmed to work on regular OP9 too. As always I'm not responsible for...
forum.xda-developers.com
How to use MTP, adb and fastbootD:
Windows:
Install official Google USB drivers and select the right USB drivers. For MTP and adb, the WinUSB driver is sufficient on Windows 11. For fastbootD, Google drivers (Android Bootloader interface) has to be chosen.
You may have to select WinMTP for MTP and Google USB drivers for adb, if you run Windows 10.
To use adb on Windows, MTP has to be disabled with "Mount->Disable MTP" in TWRP.
Steps for choosing a specific driver (no the exact wording):
Connect phone in specific mode
Open device manager
Right click on phone either under "Android device" or "USB device", depending on mode
Select "update driver"
Select 2. option "browse my computer"
Select "pick from available drivers"
Pick driver according to above description
Linux:
Intall the fastboot and adb packages for your distribution
Set udev rules. There might be a package for your distro or use this gh repo: https://github.com/M0Rf30/android-udev-rules
Add user to the group used in udev rules. Most common are "plugdev" and "adbusers"
Source Code:
TWRP: https://github.com/TeamWin/android_bootable_recovery
Kernel: https://github.com/nilz3000/kernel_oneplus_sm8350-twrp
Device Tree:
https://github.com/nilz3000/device_oneplus_sm8350-common-TWRP
https://github.com/nilz3000/device_oneplus_lemonadep-TWRP
https://github.com/nilz3000/android_hardware_oplus
Bugs:
Permanent installation alongside TMO stock isn't possible
Error message regarding vendor_dlkm in fastbootD for OOS users (just cosmetic and not problematic)
In case you notice anything else please let me know.
If you encounter any bug, please give me description with logcat.txt and recovery.log output attached. You can copy those to your data folder in TWRP, if you go to Advanced->Copy Logs.
Thanks to:
@Nebrassy for the original device tree
@osm0sis for the zip installer
TWRP team
LineageOS
Thank you for this! Will try tomorrow.
Ah man this is dope. Thank you bud!!!
It seems to boot and decrypt very well, but backup always fails with error createtarfork 255
EugenStanis said:
It seems to boot and decrypt very well, but backup always fails with error createtarfork 255
Click to expand...
Click to collapse
EugenStanis said:
It seems to boot and decrypt very well, but backup always fails with error createtarfork 255
Click to expand...
Click to collapse
Can you send me the logcat and recovery.log output of the failing backup? You find that option in Advanced -> Copy Log -> Include Logcat. I will look into it.
Hi Guys,
Can the latest TWRP be used to flash A13 ROMs like we used to do with older devices? I am fed up with wiping the entire storage for every ROM installation using sideloading...
vipinpvarghese said:
Hi Guys,
Can the latest TWRP be used to flash A13 ROMs like we used to do with older devices? I am fed up with wiping the entire storage for every ROM installation using sideloading...
Click to expand...
Click to collapse
Updating A13 ROMs, in my case crdroid 13, works fine. I have not tested clean installation of a different ROM after factory reset with user data preservation.
der_akinator said:
Updating A13 ROMs, in my case crdroid 13, works fine. I have not tested clean installation of a different ROM after factory reset with user data preservation.
Click to expand...
Click to collapse
You meant to say you just wiped data, cache and dalvik and flashed the ROM zip via TWRP ? Or without data wipe?
vipinpvarghese said:
You meant to say you just wiped data, cache and dalvik and flashed the ROM zip via TWRP ? Or without data wipe?
Click to expand...
Click to collapse
Yes, but it was the same ROM I reinstalled after wipe.
der_akinator said:
Can you send me the logcat and recovery.log output of the failing backup? You find that option in Advanced -> Copy Log -> Include Logcat. I will look into it.
Click to expand...
Click to collapse
der_akinator said:
Can you send me the logcat and recovery.log output of the failing backup? You find that option in Advanced -> Copy Log -> Include Logcat. I will look into it.
Click to expand...
Click to collapse
Sorry i forgot about recovery log
EugenStanis said:
Sorry i forgot about recovery log
Click to expand...
Click to collapse
recovery.log
Zippyshare.com - Free File Hosting
www1.zippyshare.com
Anyone tested it with stock OOS13?
der_akinator said:
This is an unofficial build of TWRP, based on the Android 12.1 branch, that supports encryption used by most Android 12 and 13 ROMs.
As always I'm not responsible any bricked device or data loss resulting from the use of this TWRP version. You use this at your own risk.
For ROMs using FBEv1 encryption aka A11 encryption, please use the official builds by @Nebrassy from:
[RECOVERY] [11] [OFFICIAL] TeamWin Recovery Project
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...
forum.xda-developers.com
Download:
twrp-3.7.0-12.1 - Google Drive
drive.google.com
Installation:
Get your rom's vendor_boot image. For most ROMs this can usually be downloaded. For OOS based ROMs you can get it for example by extracting it from the official payload.bin with payload-dumper-go. A third universal option, if you have root, is to use the command "dd if=/dev/block/by-name/vendor_boot_SLOT of=/sdcard/vendor_boot.img" on your device. This writes the vendor_boot image to your sdcard folder, but you have to substitute SLOT with either a or b, depending on your currently active slot.
Reboot to bootloader.
Run "fastboot flash vendor_boot vendor_boot.img" with the TWRP vendor_boot image.
Run "fastboot boot boot.img" with the TWRP boot image.
Go to Advanced > Flash Current TWRP.
After that is done, if you were using a custom kernel, reflash it now.
If you were using magisk, reflash it now.
Reboot to bootloader.
Run "fastboot flash vendor_boot vendor_boot.img" with the ROM vendor_boot image from step one.
In the case you just want to test TWRP without installation, please skip steps 5-7.
Permanent installation works fine for me with crdroid 13 and magisk installed. I have not tested any other ROMs or custom kernels. After permanent installation you can at any time reboot to recovery without reflashing vendor_boot. During a ROM update use the "Automatically reflash TWRP after flashing a ROM" option in the install zip menu to preserve TWRP.
Source Code:
TWRP: https://github.com/TeamWin/android_bootable_recovery
Kernel: https://github.com/LineageOS/android_kernel_oneplus_sm8350
Device Tree:
https://github.com/nilz3000/device_oneplus_sm8350-common-TWRP
https://github.com/nilz3000/device_oneplus_lemonadep-TWRP
https://github.com/LineageOS/android_hardware_oplus
Bugs:
Please let me know. I have not encountered anything major yet.
Thanks to:
Nebrassy
TWRP team
LineageOS
Click to expand...
Click to collapse
For the cRDroid 13, which OOS Base are you using? I used C66, with own rec fine, if use your TWRP 3.7.0, can't boot.
Update
Hi everyone,
I just uploaded a new build. It fixes some missing firmware files and kernel module loading.
USB OTG, vibration and battery status is now working.
Download:
29.11.22 - Google Drive
drive.google.com
EugenStanis said:
It seems to boot and decrypt very well, but backup always fails with error createtarfork 255
Click to expand...
Click to collapse
Your problem seems to be a general TWRP problem, that oftentimes happens in multiuser system. And I couldn't access your recovery.log. In this file you find conflicting files, that are the reason for the error.
Here is a link to the github issue, maybe it helps you solving the problem.
createTarFork() process ended with ERROR: 255 when trying to back up data with multiple users · Issue #1373 · TeamWin/Team-Win-Recovery-Project
Yes, I am running an official build of TWRP, downloaded from https://twrp.me/Devices/ (Oneplus 6) Yes, I am running the latest version of TWRP (3.2.3-1) Yes, I have read the FAQ (https://twrp.me/FA...
github.com
tnchng said:
For the cRDroid 13, which OOS Base are you using? I used C66, with own rec fine, if use your TWRP 3.7.0, can't boot.
Click to expand...
Click to collapse
I use C.63 and have not tested with other firmware versions.
der_akinator said:
Your problem seems to be a general TWRP problem, that oftentimes happens in multiuser system. And I couldn't access your recovery.log. In this file you find conflicting files, that are the reason for the error.
Click to expand...
Click to collapse
Strange, i have never ever in my life used multiuser

How To Guide [Recovery] [13] [12] TWRP & OrangeFox

Since recoveries play a crucial role in flashing firmwares, custom ROMs and offline updates, it is of importance to have access to them. This post is about sources and instructions to working versions of recoveries for Alioth. Platform Tools (aka ADB) and USB drivers should be set beforehand. Latest versions are reliable enough. PixelExperience, PixelOS and MIUI (official and Xiaomi.eu) ROMs have been tested. Before proceeding to flash, make sure about your ROM type (standard or vendor_boot) to avoid not desired consequences. Blew are the most recent versions.
_________________________________________________________________________
TWRP (standard)
Android 12:
twrp-3.7.0_12-v7.7_A12-alioth-skkk.img
Android 13:
twrp-3.7.0_12-v7.8_A13-alioth-skkk.img
[Instructions]
1. Reboot to fastboot mode.
2. Execute command below in ADB on PC:
fastboot boot "recovery.img"
Click to expand...
Click to collapse
"recovery.img" being your downloaded recovery file address.
3. Choose "Flash current TWRP" from TWRP's "Advanced" option.
4. Reboot.
_________________________________________________________________________
OrangeFox (standard)
Android 12+:
[email protected]_3_A12.zip
[Instructions]
1. Reboot to TWRP.
2. Choose "ADB Sideload" from TWRP's "Advanced" option.
3. Execute command below in ADB on PC:
adb sideload "recovery.zip"
Click to expand...
Click to collapse
"recovery.zip" being your downloaded recovery file address.
4. Reboot.
_________________________________________________________________________
OrangeFox (vendor_boot)
Read this thread for a detailed explanation and list of vendor_boot ROMs.
This is beta release. Treat it as such.
Android 13:
[email protected]_1_vendor_boot_vBaR.zip
[Instructions]
1. Reboot to your ROM's recovery.
2. Choose "ADB Sideload" from recovery's "Advanced" option.
3. Execute command below in ADB on PC:
adb sideload "recovery.zip"
Click to expand...
Click to collapse
"recovery.zip" being your downloaded recovery file address.
4. Reboot.
OR
1. Reboot to fastboot mode.
2. Extract downloaded recovery zip file.
3. Execute command below in ADB on PC:
fastboot flash vendor_boot "recovery.img"
Click to expand...
Click to collapse
"recovery.img" being your extracted recovery image address.
4. Reboot.
OR
1. Reboot to fastboot mode.
2. Extract downloaded recovery zip file.
3. Run "flash-whole-image.bat" file.
4. Reboot
_________________________________________________________________________
Ps: though there are some glitches, both recoveries can install Magisk to root the device.
_________________________________________________________________________
Sourceforge archive page
OrangeFox homepage
Platform Tools download page
Google USB Driver download page
Last time I tried installing lineageos using latest twrp it failed miserably
heybaybee said:
Last time I tried installing lineageos using latest twrp it failed miserably
Click to expand...
Click to collapse
Me too, better use its recovery.
New versions available. Links have been updated.
rashazad said:
New versions available. Links have been updated.
Click to expand...
Click to collapse
Thanks for the thread. Does the latest version support flashing MIUI Global ROMs? Im having a hard time flashing them via TWRP SKK 3.7.0_A12_V6.7_A13.
I tried to flash TWRP 3.7.0_7.7_13 and now my phone is in bootloop.
panjgoori said:
I tried to flash TWRP 3.7.0_7.7_13 and now my phone is in bootloop.
Click to expand...
Click to collapse
Which ROM are you using?
DarthJabba9 said:
Which ROM are you using?
Click to expand...
Click to collapse
MIUI EU 13.0.9
panjgoori said:
MIUI EU 13.0.9
Click to expand...
Click to collapse
So, you have flashed an A13 recovery on an A12 ROM? Of course you will have issues. You need to flash the correct recovery.
DarthJabba9 said:
So, you have flashed an A13 recovery on an A12 ROM? Of course you will have issues. You need to flash the correct recovery.
Click to expand...
Click to collapse
I accidently bricked my phone and its in EDL Mode now. Can you help me please
panjgoori said:
I accidently bricked my phone and its in EDL Mode now. Can you help me please
Click to expand...
Click to collapse
Sorry, I know nothing about EDL mode for this device. But I'm sure there are lots of tutorials on XDA or in a general Google search.
Vendor_Boot recovery links and instructions added.
Small changes made in instructions.
New version (7.8) for TWRP A13 (standard).
New version (11.1_1) for OFox (vendor_boot).
New version (11.1_3) for OFox (standard).
DarthJabba9 said:
So, you have flashed an A13 recovery on an A12 ROM? Of course you will have issues. You need to flash the correct recovery.
Click to expand...
Click to collapse
For those who want to.. I too thought as do @DarthJabba9 but...
I've bought a new poco F3, wich was with A12 MIUI. I tried to flash skkk twrp A12, then flash FW V14.xxx (A13), then skkk twrp A13 (trough twrp itself, or in fastboot) => bootloop, with or without rebooting in between..
It finally worked with only flashing skkk twrp A13 (on A12 MIUI), then FW V14.xx, then rom etc.
Hope it can help
néonaloj said:
For those who want to.. I too thought as do @DarthJabba9 but...
I've bought a new poco F3, wich was with A12 MIUI. I tried to flash skkk twrp A12, then flash FW V14.xxx (A13), then skkk twrp A13 (trough twrp itself, or in fastboot) => bootloop, with or without rebooting in between..
It finally worked with only flashing skkk twrp A13 (on A12 MIUI), then FW V14.xx, then rom etc.
Hope it can help
Click to expand...
Click to collapse
That's a very atrange way to have latest fw.
How did you flash twrp through twrp?
Please describe what you have done clearly.
Restarts are necessary.
Also if you plan to have a clean flash, which is recommended, there are much easier and straight forward methods.
rashazad said:
1. Reboot to fastboot mode.
2. Extract downloaded recovery zip file.
3. Execute command below in ADB on PC:
"recovery.img" being your extracted recovery image address.
4. Reboot.
Click to expand...
Click to collapse
Tried using this method but I am getting the following error on AOSPA: FAILED (remote: 'Error flashing partition : Volume Full')
nehalchoy said:
Tried using this method but I am getting the following error on AOSPA: FAILED (remote: 'Error flashing partition : Volume Full')
Click to expand...
Click to collapse
That error does not seem to be related to the process.
Something (probably free apace) is wrong about your pc or phone.
What ROM were you using?
rashazad said:
That's a very atrange way to have latest fw.
How did you flash twrp through twrp?
Please describe what you have done clearly.
Restarts are necessary.
Also if you plan to have a clean flash, which is recommended, there are much easier and straight forward methods.
Click to expand...
Click to collapse
Well I didn't want to make a complete tutorial ...
To flash twrp trough twrp, 'install' > change with "image" > install the recovery.img.. It has always worked, for long years..
About flashing a A13 rom (++) coming from MIUI A12 (I each time restarted from scratch, re-installing global MIUI) : I've tried a lot of ways.
I began to install A12 twrp skkk in fastboot mode (1st 'boot' then flash), reboot to recovery, then upgrade to A13 twrp through twrp (reboot to recovery), then A13 FW > bootloop ;
I tried flash A12 twrp (fastboot)(reboot to recovery), then A13 twrp (fastboot too)(reboot to recovery), flash FW > bootloop ;
I also tried A12 twrp (reboot to recovery), then FW (reboot to recovery ok), A13 twrp (reboot to recovery) > bootloop...
I won't list all what i did ! but finally I flashed A13 twrp directly on A12 MIUI (reboot to recovery ok), flash FW (reboot to recovery ok) and that worked. I then flashed my A13 rom (without rebooting system first) > reboot to recovery +reboot system, and finally flashed Gapps, magisk and other stuff. I do know it's not a common way, but the one that worked.
EDIT : I do know it can work (maybe even easier) to flash the MIUI A13 fastboot rom, but had a other device hard bricked some time ago doing this. That's why i tried to only flash the FW
PS : if you can help, I've only one issue to solve yet : I've flashed magisk 26.1, i could have bank & pro apps to work correctly, the only app that I cannot is the FAI tv (error P531 'can't reach my account' (even if i'm well connected), probably root detected.. thanks ! (ofc it's on the deny list, with magisk modules such as Universal Safetynet Fix, zygisk ....)
And edit 2 : I forgot to thank you for this thread !
Common way to flash rom with upgrade (not update) is clean install.
Also, magisk handles safetynet with no problem. No need for that. And zygisk is not module.
For that specific application, check that it is fully selected in zygisk since sometimes all checkboxes for application is not selected.
You're welcome

Categories

Resources