[RECOVERY][3.4.0_10][UNOFFICIAL]TWRP Xiaomi POCO X3 [Decryption fix][surya] - Xiaomi Poco X3 NFC ROMs, Kernels, Recoveries, & Ot

Team Win Recovery Project 3.x, or twrp3 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:
#include <std_disclaimer.h>
/*
*
* 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.
*
*/
This is TWRP build from the current android-10 branch with the device tree by mahajant99 (see here), but with an additional patch to fix the decryption of the data partition with a PIN code or password as lock pattern under Android 11.
Features:
- Touch Works in all states (No matter about lockscreen there or not)
- Decryption works (Even with PIN or password and Android 11)
- Otg works
- Flash Rom works
- F2FS support
- Fastboot boot command support
Not working:
- Fastbootd
- Adb sideload
- Backup restore and image flash (system-vendor-product)
Download:
twrp-3.4.0_10-surya-animux.img
Installation:
Download the TWRP image file to your PC.
Put your device into fastboot.
Type the following command to flash the recovery:
Code:
fastboot flash recovery twrp-3.4.0_10-surya-animux.img
Then reboot in TWRP manually or using a fastboot command:
Code:
fastboot boot twrp-3.4.0_10-surya-animux.img
or
Code:
fastboot reboot recovery
Enjoy!
Source code:
https://github.com/TeamWin/android_bootable_recovery
https://github.com/mahajant99/device_xiaomi_surya_twrp
https://gerrit.twrp.me/c/android_bootable_recovery/+/3104
Donation:
PayPal
Credits:
- Thanks to mahajant99
Created 2020-12-15

Is this real? Or just fanta sea ?

Hi,
What's the difference between this one and the other one available here ?

Howell said:
Hi,
What's the difference between this one and the other one available here ?
Click to expand...
Click to collapse
Decryption of the data partition does not work with the linked recovery, if you have a PIN or password with Android 11 (because Android slightly changed the way the lock pattern information is stored). And I've read something about problems with the touch input there. (But I do not know it the touch input problems are already fixed.)

Thanks!

Can we flash as recovery.img using orangefox?

@raymondsanusi yes you can - i just did

It works perfectly! Thank you!

jeryll said:
@raymondsanusi yes you can - i just did
Click to expand...
Click to collapse
thanks bro...
Also thanks OP

Thanks dev for the recovery!
In terms of using the backup functionality. Which settings do you recommend to use?

@gersp none, read carefully OP:
Not working:
- Fastbootd
- Adb sideload
- Backup restore and image flash (system-vendor-product)

.

Is it not necessary to flash Disable_DM-Verity additionally?

xianvr said:
Is it not necessary to flash Disable_DM-Verity additionally?
Click to expand...
Click to collapse
No. Do the first boot to TWRP. TWRP does all necessary patches by itself.

Alin45 said:
No. Do the first boot to TWRP. TWRP does all necessary patches by itself.
Click to expand...
Click to collapse
That sounds great. Thanks for explaining.

First of all "Happy Christmas" @All and thanks for your hard work, Dev
Does this Recovery have the "Wipe System" - Option?
Greets

Can anyone please help?
But I am stuck in a TWRP loop with the error "unable to decrypt FBE device" after flashing TWRP by Animux + Xiaomi EU stable rom.
These are the steps I have performed:
"fastboot flash recovery twrp(animux).img
"fastboot boot twrp(animux).img" - was this a mistake? better to reboot to TWRP that was flashed to the phone?
wipe > format data - looked good, no error message
Rebooted to TWRP - maybe unnecessary
Rebooted to system - booted to stock MIUI 12 without error
Copied xiaomi.eu_multi_POCOX3NFC_V12.0.6.0.QJGMIXM_v12-10.zip into internal storage
"adb reboot" with "volume down" button pressed - was this a mistake??
I got into the STOCK recovery, not TWRP! - did DM-verity restore the stock recovery?
I rebooted into fastboot
Again I performed "fastboot flash recovery twrp(animux).img
This time: "fastboot reboot" and holding "volume up" button to get into the TWRP that I had just flashed to the phone
I got into the flashed TWRP
In TWRP I installed the xiaomi.eu_multi_POCOX3NFC_V12.0.6.0.QJGMIXM_v12-10.zip - it looked alright, but without ZIP verification
I tapped "Wipe Cache/Dalvik"
I rebooted to System
But I got to TWRP again
Again rebooted to System, but got to TWRP
I tried again wipe > format data
Then I got the error:
Unable to decrypt FBE device!
I tried to fix this problem by flashing the TWRP by mauronofrio:
Reboot into fastboot
"fastboot flash recovery twrp(mauronofrio).img
"fastboot reboot" and holding "volume up" button to get into TWRP on the phone
I got into TWRP on the phone
I performed wipe > format data
Then I got even more error messages:
Unable to update logical partition: /odm
Unable to decrypt FBE device
Help Is my phone already bricked? What did I do wrong?
How can I restore any working rom?
Could I flash the fastboot rom "xiaomi.eu_multi_POCOX3NFC_V12.0.2.0.QJGMIXM_v12-10-fastboot.zip" via fastboot?
Can I restore/flash the stock recovery + stock rom?

thanks

xianvr said:
Can anyone please help?
But I am stuck in a TWRP loop with the error "unable to decrypt FBE device" after flashing TWRP by Animux + Xiaomi EU stable rom.
These are the steps I have performed:
"fastboot flash recovery twrp(animux).img
"fastboot boot twrp(animux).img" - was this a mistake? better to reboot to TWRP that was flashed to the phone?
wipe > format data - looked good, no error message
Rebooted to TWRP - maybe unnecessary
Rebooted to system - booted to stock MIUI 12 without error
Copied xiaomi.eu_multi_POCOX3NFC_V12.0.6.0.QJGMIXM_v12-10.zip into internal storage
"adb reboot" with "volume down" button pressed - was this a mistake??
I got into the STOCK recovery, not TWRP! - did DM-verity restore the stock recovery?
I rebooted into fastboot
Again I performed "fastboot flash recovery twrp(animux).img
This time: "fastboot reboot" and holding "volume up" button to get into the TWRP that I had just flashed to the phone
I got into the flashed TWRP
In TWRP I installed the xiaomi.eu_multi_POCOX3NFC_V12.0.6.0.QJGMIXM_v12-10.zip - it looked alright, but without ZIP verification
I tapped "Wipe Cache/Dalvik"
I rebooted to System
But I got to TWRP again
Again rebooted to System, but got to TWRP
I tried again wipe > format data
Then I got the error:
Unable to decrypt FBE device!
I tried to fix this problem by flashing the TWRP by mauronofrio:
Reboot into fastboot
"fastboot flash recovery twrp(mauronofrio).img
"fastboot reboot" and holding "volume up" button to get into TWRP on the phone
I got into TWRP on the phone
I performed wipe > format data
Then I got even more error messages:
Unable to update logical partition: /odm
Unable to decrypt FBE device
Help Is my phone already bricked? What did I do wrong?
How can I restore any working rom?
Could I flash the fastboot rom "xiaomi.eu_multi_POCOX3NFC_V12.0.2.0.QJGMIXM_v12-10-fastboot.zip" via fastboot?
Can I restore/flash the stock recovery + stock rom?
Click to expand...
Click to collapse
----------------------------------------------------------------
Updated:
NEVER go back to your original system after the "Format Data" step!!! (your step 5)
That will rebuild the FBE as far as I know...
Since that "Format Data" will also clean all things in your internal storage, you have to copy a new ROM into your phone after formatting data.
If you have problems copying ROMs into your device using PC, then you can try Mount -> USB-OTG and use other USB drives (with type-C) to upload the new ROM to the Phone, which is the method I used without any error.
----------------------------------------------------------------
Original Post:
Have you unlocked your phone already?
You can try to totally "Format Data" Again...(TWRP -> Wipe -> Format Data -> enter "yes") firstly to clean the FBE decryption. Especially when you are making ROM-level changes (e.g. from MIUI-global to MIUI-eu).
I have changed from global rom to EU stable rom which is the same as yours and no errors...

xmsjshou said:
----------------------------------------------------------------
NEVER go back to your original system after the "Format Data" step!!! (your step 5)
That will rebuild the FBE as far as I know...
Since that "Format Data" will also clean all things in your internal storage, you have to copy a new ROM into your phone after formatting data.
If you have problems copying ROMs into your device using PC, then you can try Mount -> USB-OTG and use other USB drives (with type-C) to upload the new ROM to the Phone, which is the method I used without any error.
Click to expand...
Click to collapse
You mean after formatting data I should not boot the system before I have flashed a new ROM? I thought I could boot the system in order to copy the EU ROM into the internal storage. But instead, after "Format Data" I have to stay in TWRP in order to copy a new ROM into the internal storage?
xmsjshou said:
----------------------------------------------------------------
Have you unlocked your phone already?
You can try to totally "Format Data" Again...(TWRP -> Wipe -> Format Data -> enter "yes") firstly to clean the FBE decryption. Especially when you are making ROM-level changes (e.g. from MIUI-global to MIUI-eu).
I have changed from global rom to EU stable rom which is the same as yours and no errors...
Click to expand...
Click to collapse
Yes, I had already unlocked the bootloader. The "Format Data" itself brought the error "Unable to decrypt FBE device" several times. So, I cannot use it to solve the problem.

Related

TWRP - No OS Installed After Installing ROM

Hi,
I'm currently trying to install CyanogenMod onto my HTC One X+, but keep running into problems.
I unlocked the bootloader, and installed TWRP v2.8.7.0.
I went into recovery fine, and used "adb push" to push cm-11-20150906-NIGHTLY-enrc2b.zip onto the device and install it through TWRP.
I then tap "reboot" but it always tells me that "No OS Installed", and rebooting into the bootloader to flash the boot.img and erase the cache doesn't seem to fix this issue.
I've tried a few different versions of recoveries, like CyanogenMod's recovery, but still can't seem to get it to install any OS. Always just get stuck on the HTC logo.
Am I missing an important step, or something? Thanks for your time.
hmm...sounds correct. just try it again.
1. boot into bootloader
2. flash the boot.img from the zip you want to install (for cm11 i recommend to flash nik3rs kernel http://forum.xda-developers.com/showthread.php?t=2012320)
3. reboot into recovery
4. select wipe from twrp menu
5. install the zip
6. reboot
why dont you try cm12? much better performance!
.
el-Loko said:
hmm...sounds correct. just try it again.
1. boot into bootloader
2. flash the boot.img from the zip you want to install (for cm11 i recommend to flash nik3rs kernel http://forum.xda-developers.com/showthread.php?t=2012320)
3. reboot into recovery
4. select wipe from twrp menu
5. install the zip
6. reboot
Click to expand...
Click to collapse
Ok, I tried again.
I went into the bootloader and flashed boot.img.
Then went into recovery, and did a factory reset via the wipe menu.
Then used "adb push" to push cm-11.zip to my /sdcard/.
Then I installed the zip without any issues.
But then when restarting, it still warned me no OS was installed.
Booting anyways just got me stuck at the HTC logo.
I then tried again, this time flashing the kernel with Nik3r's file.
And then doing all the same stuff as before, but still getting the no OS was installed message and stuck on the HTC logo.
Perhaps it's the ROM I'm using? I'm not sure why it's telling me "no OS is installed" right after installing one.
el-Loko said:
why dont you try cm12? much better performance!
Click to expand...
Click to collapse
I actually can't find a ROM for CM12. I just grabbed the latest from http://download.cyanogenmod.org/?device=enrc2b.
KindDino said:
Ok, I tried again.
I went into the bootloader and flashed boot.img.
Then went into recovery, and did a factory reset via the wipe menu.
Then used "adb push" to push cm-11.zip to my /sdcard/.
Then I installed the zip without any issues.
But then when restarting, it still warned me no OS was installed.
Booting anyways just got me stuck at the HTC logo.
Click to expand...
Click to collapse
I never used "adb push" to push the ROM installation .zip onto my phone.
If you've made a nandroid backup, then go back to stock and give it a try to transfer the .zip in normal USB/Phone mode.
Afterwards repeat the process as described above.
When I flashed my last CM11 ROM, I used CWM as recovery and I flashed the boot.img after full wipe and rom/gapps installation.
After flash process I restarted the phone into bootloader and flashed the boot.img via adb. Then first normal reboot of the phone.
Worked without any issues...
KindDino said:
I actually can't find a ROM for CM12. I just grabbed the latest from http://download.cyanogenmod.org/?device=enrc2b.
Click to expand...
Click to collapse
http://forum.xda-developers.com/htc...ent/rom-cyanogenmod-12-international-t2948462
Njoatun said:
I never used "adb push" to push the ROM installation .zip onto my phone.
If you've made a nandroid backup, then go back to stock and give it a try to transfer the .zip in normal USB/Phone mode.
Afterwards repeat the process as described above.
Click to expand...
Click to collapse
Sadly, I didn't know to make a backup when I started, so I cannot go back to stock at this time.
Njoatun said:
When I flashed my last CM11 ROM, I used CWM as recovery and I flashed the boot.img after full wipe and rom/gapps installation.
After flash process I restarted the phone into bootloader and flashed the boot.img via adb. Then first normal reboot of the phone.
Worked without any issues...
http://forum.xda-developers.com/htc...ent/rom-cyanogenmod-12-international-t2948462
Click to expand...
Click to collapse
I tried with TWRP again and actually decided to write down the entire log for installing the zip, maybe that'll help. It does say some things about errors, unsure if they're actual bad, or not, as it does succeed.
Of course after installing the zip, I selected 'Reboot' then 'Reboot into Bootloader', then used 'fastboot flash' to flash the boot.img with the boot.img from within the cm-12.zip.
Code:
Installing '/sdcard/cm-12.zip'..
Check for MD5 file..
Skipping MD5 check: no MD5 file found
could not detect filesystem for /dev/block/platform/sdhci-tegra.3/by-name/APP, assuming ext4
mount: failed to mount /dev/block/platform/sdhci-tegra.3/by-name/APP at /system: Invalid argument
unmount of /system failed; no such volume
Patching system image unconditionally...
could not detect filesystem for /dev/block/platform/sdhci-tegra.3/by-name/APP, assuming ext4
mount: failed to mount /dev/block/platform/sdhci-tegra.3/by-name/APP at /system: Invalid argument
unmount of /system failed: no such volume
script succeeded: result was [0.200000]
Updating partition details...
E:unable to mount '/system'
E:unable to mount '/cache'
...done
I tried CWM a few days ago while attempting this ( as it's linked in the CyanogenMod wiki ), and I just attempted it again with it and still cannot get past the logo.
Here is the log from CWM.
Code:
-- Installing: /sdcard/cm-12.zip
Finding update package...
OPening update package...
Installing update...
detected filesysystem extr4 for /dev/block/platform/sdhci-tegra.3/by-name/APP
Patching system image unconditionally...
detected filesysystem extr4 for /dev/block/platform/sdhci-tegra.3/by-name/APP
script succeeded: result was [0.200000]
Install from sdcard complete.
When rebooting back into the bootloader, I got an error about lost root access. I selected yes.
Code:
Root access possibly lost. Fix? THIS CAN NOT BE UNDONE.
- No
- Yes - Fix root (/system/xbin/su)
Seems like you've wiped your internal SD card partition, if it's unable to detect the ext4 format.
It's mentioned under Post 2 http://forum.xda-developers.com/showthread.php?t=2066390
If so... Search the forum for a solution. Never had this issue. Good luck
Njoatun said:
Seems like you've wiped your internal SD card partition, if it's unable to detect the ext4 format.
It's mentioned under Post 2 http://forum.xda-developers.com/showthread.php?t=2066390
If so... Search the forum for a solution. Never had this issue. Good luck
Click to expand...
Click to collapse
I read the post, and maybe I did wipe my SD Card. I have no idea on how to fix that, and I'll have to research more.
I would like to just use Hasoon2000's toolkit but sadly can't find a working download for it.
Same problem here! Nothing is working. It is saying no OS. Always booting into fastboot mode. Someone help. I have a Moto G3 1540
---------- Post added at 11:27 AM ---------- Previous post was at 11:18 AM ----------
Follow these steps and recover your device.
1. Unlock your bootloader if you have it locked
2. Boot into TWRP
3. Go to Wipe
4. Go to Advanced
5. Select everything except USB - OTG and SD Card
6. Boot into fastboot
7. Download the stock image of your phone
8. Flash it to your phone ( Please find it online)
9. After flashing do not reboot!!!
10. Download Cyanogenmod recovery and flash it to your device.
11. Boot into the newly installed recovery.
12. Go into Apply Update
13. Go into Apply Update from ADB
14. Sideload the Cyanogenmod using the command adb sideload filename.zip ( Replace filename with the name of your zip)
15. After Sideloading, boot into fastboot mode.
16. In fastboot mode, Select BP Tools.
17. Boom! Your device will start booting
Hope this helps you:good::good:
I had the same issue - here's how I went about this...
KindDino said:
Hi,
I'm currently trying to install CyanogenMod onto my HTC One X+, but keep running into problems.
I unlocked the bootloader, and installed TWRP v2.8.7.0.
I went into recovery fine, and used "adb push" to push cm-11-20150906-NIGHTLY-enrc2b.zip onto the device and install it through TWRP.
I then tap "reboot" but it always tells me that "No OS Installed", and rebooting into the bootloader to flash the boot.img and erase the cache doesn't seem to fix this issue.
I've tried a few different versions of recoveries, like CyanogenMod's recovery, but still can't seem to get it to install any OS. Always just get stuck on the HTC logo.
Am I missing an important step, or something? Thanks for your time.
Click to expand...
Click to collapse
I have a Nexus 7 2013 that I commonly use as both my daily driver (tablet-only) and as my ROM-testing guinea-pig. I had AOSP Android 7 installed before I wiped everything, due to an issue with Google Play (which I just couldn't fix for the life of me). When I went to flash a new ROM (AOSP Android 7.1.1), TWRP claimed that there was 'No OS'. This would mean that you definitely wiped everything - possibly including the partitions. My guess is:
If there are no partitions (esp. System, Recovery, Boot, Cache, etc.), the data meant for them may still get written to the device's storage. But the bootloader/kernel won't recognize where to pass the torch to when it's time for the system/userspace to come in.
In order to get this back , you may need either:
A) a ROM that has images for at least the System, Cache, and Boot partitions (add your own recovery if need-be).
B) a Stock ROM from the manufacturer's website, which tends to come with all of these images ready in the .zip
Once you flash one of those, you should confirm that your bootloader is unlocked. Once that is done, flash the ROM of your dreams
I hope this helped...
TWRP bootloop
el-Loko said:
hmm...sounds correct. just try it again.
1. boot into bootloader
2. flash the boot.img from the zip you want to install (for cm11 i recommend to flash nik3rs kernel http://forum.xda-developers.com/showthread.php?t=2012320)
3. reboot into recovery
4. select wipe from twrp menu
5. install the zip
6. reboot
why dont you try cm12? much better performance!
.
Click to expand...
Click to collapse
I have quite same issue.
I have TWRP 3.0.3 (that's the only version that i found and works) on my Doogee X9 Pro (MTK chip inside).
But after flashing successfully a ROM it still reboots to the recovery. (I tried it with 3 different ROMs.)
Any idea what else should/could try?

Restore Xperia Z2 - Only Have Fastboot

Hello, I tried to install the latest paranoid android but now have a system that only freezes on boot or turns on into fastboot mode. The following is what I have done:
unlock bootloader
(system 23.1.A.1.28)
root using exploit for 5.0.2 with super su
installed recovery apk which installed some NDR tool as well to switch between recoveries
some phills touch ui was the default and teamwin only worked if selected from the NDR app and rebooted
booted into teamwin, did a full wipe
mtp wasn't working to copy ROM so did a reboot, also tried to sideload before reboot but the stupid twrp said the device was 'leo' instead of D6503 or whatever so it didn't want to work
phone stuck so tried to use fastboot to flash system pa-sirrius-rom.zip
also tried to flash system backup from twrp but it's a win.000 and win.001 file and not sure how to join them to get a working system.img??
why won't recovery boot and how do i get a working system again. how do i convert a twrp backup to one that fastboot recognises and isn't split in 2?
If you have an unlocked bootloader just download a kernel with recovery built in. Flash the kernel 'fastboot flash boot boot.img'. Your phones not booting anyway so it really doesn't matter what kernel, as long as it has built in recovery. Boot into TWRP and recovery your backup.
Edit:
I'd you have an unlocked bootloader, don't wast your time with apks that install recovery. I'm my experience they're always hacky. Just get a recovery for fota partition or a boot image with one built in.
Sent from my D6503 using Tapatalk
Thanks for the reply.
I finally found a boot.img with TWRP built in (from the cyanogen project). I also found out that I had to flash it (fastboot boot command doesn't seem to work).
I can boot the recovery just fine but it will not mount any partitions and the only thing listed in the wipe menu is "Dalavik Cache".
I have attached a screenshot of the TWRP log.
It won't let me post links because my experience is low.
i.imgur dot com cXBv1Y8.png
Edit:
I can format the system partition and even mount it from the command line, it just doesn't appear in the TWRP UI.
In the mount menu, it has a checkbox which I cannot uncheck that says "Only mount system read-only".
Edit:
Booted from the cyanogen recovery image which had its own adb sideload which I used to load cyanogen and now it's working!

Encryption Unseccesful, Bootloop to TWRP

Hi,
I accidently flash CM14.1 (dirty flash from CM13), after flash finished a notification appear said "Encryption Unsuccessful" and there is only one option "Reset Phone".
After that my Kenzo bootloop to TWRP.
I have tried :
- wipe/factory reset
- clean flash CM13 offcial
- restore backup from CM13
But my Kenzo keep bootloop to TWRP.
Please help,
Thanks in advance.
You must use fastboot command fastboot format userdata
Oscilator said:
You must use fastboot command fastboot format userdata
Click to expand...
Click to collapse
fastboot command fastboot format userdata, it's give me an error, internal memory not mounted, it said 0MB. I think TWRP has corrupted.
So, I flashed new TWRP
- fastboot flash recovery new-twrp.img
- fastboot format userdata
- fastboot boot new-twrp.img
Now I'm able to restore twrp backup.

[Guide] How to root Moto G4 with Magisk on stock Nougat

*Download all necessary files*
Magisk v15.0 or newest available
Download ElementalX kernel @ elementalx.org
Download latest Magisk Manager from official xda thread
Download TWRP for Moto G4 (Athene)
from twrp.me
Unlock bootloader (Go to Motorola's official site)
Check Unknown Sources in Android settings under security tab.
Download and install ADB & Fastboot on your PC
Boot into fastboot by holding down vol down and power.
Once you see Android robot with text at the bottom, on your computer in cmd type "fastboot boot TWRP image path" ex: fastboot boot D:/TWRPimages/twrp.athene.img
Once phone boots to TWRP, TWRP will ask to make modifications to system. Keep read only. (Note: if is asks to install, always say no.) Next go to backup, and make backup. (Just backup what is selected by default: system, data, and most importantly, boot.img) Note: make sure to tell it to backup to SD, and make sure the SD card is formatted as portable, not adoptable. Note: you might need mount the card under Mount tab first before being able to select it.
Next, go to mount, and uncheck "keep system read only", and swipe to allow modifications. Go to install, and flash ElementalX, and set it up in the following screen. As we already have the turbopower charger, you don't need to enable USB fast charging.
Wipe dalvik cache, and flash Magisk. Then, wipe dalvik again, and power off.
Boot into Android to make sure everything works. Install Magisk app if it didn't appear in your apps drawer from the .apk you downloaded earlier.
Hope this helps! Good luck!
Note: If you would like to flash TWRP instead, use "fastboot flash recovery TWRP.img" instead of fastboot boot.
Thank you for this tutorial! Is it required to install the ElementalX kernel?
Romano2K said:
Thank you for this tutorial! Is it required to install the ElementalX kernel?
Click to expand...
Click to collapse
It appears to be. I tried it without ElementalX first and got to the point of installing Magisk then rebooting before my G4 went to brick with the flashing light. Same behavior occurred when installed SuperSU. After installing ElementalX everything worked fine.
To supplement this guide, here are a few more links and notes of what I did.
Links
The December 2017 Nougat ROM from here
G4 compatible Shreps TWRP from here
Current Magisk here
ElementalX for G4 is here
If needed, install Platform Tools and Android File Transfer
Steps
Install the ROM using these commands (on Mac):
./fastboot flash partition gpt.bin
./fastboot flash bootloader bootloader.img
./fastboot flash logo logo.bin
./fastboot flash boot boot.img
./fastboot flash recovery ./twrp-3.1.1-athene_shreps.img
./fastboot flash dsp adspso.bin
./fastboot flash oem oem.img
./fastboot flash system system.img_sparsechunk.0
./fastboot flash system system.img_sparsechunk.1
./fastboot flash system system.img_sparsechunk.2
./fastboot flash system system.img_sparsechunk.3
./fastboot flash system system.img_sparsechunk.4
./fastboot flash system system.img_sparsechunk.5
./fastboot flash system system.img_sparsechunk.6
./fastboot flash system system.img_sparsechunk.7
./fastboot flash modem NON-HLOS.bin
./fastboot erase modemst1
./fastboot erase modemst2
./fastboot flash fsg fsg.mbn
./fastboot erase cache
./fastboot erase userdata
./fastboot erase customize
./fastboot erase clogo
Click to expand...
Click to collapse
After running commands, restart bootloader w/o rebooting
Go into recovery w/o rebooting
Reboot
After booting into the OS, turn on Developer Mode (tap About / Build Number 8 times)
Go to Developer Options and turn on OEM unlocking and USB debugging
Copy Magisk and ElementX kernel to / using Android File Transfer (if AFT doesn't connect select USB config, change to charging then back to MTP to enable file transfer)
Reboot into Recovery, then Install Magisk and ElementX from TWRP
Performed on an G4 XT-1625, resulted was a rooted Nougat.
@Sanras, I followed your instructions and they went great on a republic wireless xt1625, thank you! But your post just says to boot into twrp, which means if I ever want to use twrp I have to connect my computer. Is there a special way to flash twrp instead of just booting to it? Because I tried flashing twrp but the phone wouldn't boot afterward. So I had to flash the stock rom and redo everything. Let me know and thanks!
supermaxkato said:
@Sanras, I followed your instructions and they went great on a republic wireless xt1625, thank you! But your post just says to boot into twrp, which means if I ever want to use twrp I have to connect my computer. Is there a special way to flash twrp instead of just booting to it? Because I tried flashing twrp but the phone wouldn't boot afterward. So I had to flash the stock rom and redo everything. Let me know and thanks!
Click to expand...
Click to collapse
You should be able to flash TWRP. That's actually the most used method. I simply recommended booting and not flashing because it is easier to revert to stock for an update. However, you should be able to flash TWRP if you want with "fastboot flash recovery D:/TWRPimages/twrp.athene.img"
(Replace last part with image path on your computer)
Thanks Sanras,
Great guide, worked for me with no problems.
Anyone know how to approach security updates after rooting via this method?
Currently on Dec17 looking to update to Apr18 security patch just don't want to brick device.
Thanks in advance. :good:
Thanks. Sanras.
I got my phone bricked after restore my stock rom and try to install magisk to it. This solved my case also.
I just have to pay attention that just installing the kernel after try the magisk is not enough. Like you said:
* Install ElementalX kernel; wipe caches
* then install Magisk (again), and wipe caches again
Is this safe for Qualcomm variants like the Boost Mobile version?
chuman72486 said:
Is this safe for Qualcomm variants like the Boost Mobile version?
Click to expand...
Click to collapse
Yes, my own G4 is a Snapdragon 617 (unlocked US Variant) XT-1625
SD Card Configured Adoptable
Sanras said:
*Download all necessary files*
Magisk v15.0 or newest available
Download ElementalX kernel @ elementalx.org
Download latest Magisk Manager from official xda thread
Download TWRP for Moto G4 (Athene)
from twrp.me
Unlock bootloader (Go to Motorola's official site)
Check Unknown Sources in Android settings under security tab.
Download and install ADB & Fastboot on your PC
Boot into fastboot by holding down vol down and power.
Once you see Android robot with text at the bottom, on your computer in cmd type "fastboot boot TWRP image path" ex: fastboot boot D:/TWRPimages/twrp.athene.img
Once phone boots to TWRP, TWRP will ask to make modifications to system. Keep read only. (Note: if is asks to install, always say no.) Next go to backup, and make backup. (Just backup what is selected by default: system, data, and most importantly, boot.img) Note: make sure to tell it to backup to SD, and make sure the SD card is formatted as portable, not adoptable. Note: you might need mount the card under Mount tab first before being able to select it.
Next, go to mount, and uncheck "keep system read only", and swipe to allow modifications. Go to install, and flash ElementalX, and set it up in the following screen. As we already have the turbopower charger, you don't need to enable USB fast charging.
Wipe dalvik cache, and flash Magisk. Then, wipe dalvik again, and power off.
Boot into Android to make sure everything works. Install Magisk app if it didn't appear in your apps drawer from the .apk you downloaded earlier.
Hope this helps! Good luck!
Note: If you would like to flash TWRP instead, use "fastboot flash recovery TWRP.img" instead of fastboot boot.
Click to expand...
Click to collapse
My Moto G4 has an SD card formatted adoptable. Is there a work around in step 6 to accommodate an adoptable SD card?
Thanks
rwruck said:
My Moto G4 has an SD card formatted adoptable. Is there a work around in step 6 to accommodate an adoptable SD card?
Thanks
Click to expand...
Click to collapse
Sure. Instead of making a backup to the card, backup to internal storage. Then, before doing anything else, on your pc copy the files from the newly created TWRP folder on your internal storage. These are your backups. You can then proceed with the rest of the steps. Honestly, the backup isn't even necessary, it's just good to have in case something goes wrong.
Hi
I know it's a bit old now, but I'm unable to root my Nougat XT1641
I already have the whole stuff :
- BL unlocked ;
- TWRP installed ;
- all backups done.
But everytime I try to flash ElementalX/Magisk, it fails and ends in a bootloop.
Can someone have an advice to help me ?
Well, I used this : https://topjohnwu.github.io/Magisk/install.html#patching-images
Patching my boot.img did the trick !

Question I broke my OnePlus Nord 2 while updating TWRP? Any help ?

Twrp updated from 3.5 to 3.6. I'm on A19. Rooted with Magisk 24.3. I flashed TWRP 3.6.img with Twrp 3.5. Flash OK, reboot in recovery mode OK. System reboot OK. Reboot in recovery mode to test Ok. Reboot system and there bootlooped with red point and white point turning.
I can reboot in TWRP. Il fastboot boo.img, vbmeta.img. Same pb Bootlooped.
I have a nandroid backup (data/boot/cache/DTBO/NVCFG/NVDATA/NVRAM/Persist/Persist Image/Protect F/protect S/Recovery/VBMeta).
I tried ti restore these partitions without erasing partitions. Restore OK but noway to boot. Bootlooped
I wipe all partitions. Restore without Data partition (with data, I have an error). Same bootlooped
I am trying to restore the data partition only. I have this error "Failed to mount '/data' (Invalid argument)
I have no more idea, I'm a little desperate. No solution ? Return the smartphone for repair?
1) flash stock recovery and stock boot via fastboot
2) flash patched vbmeta via fastboot with fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
2) format data via stock recovey
3) let it reboot to system
4) flash twrp via fastboot
5) restore only /data via twrp
6) reboot to system
7) UI will be broken, reboot again to fix it
8) remove any pin / password / pattern form the settings, and redo it.
9) Re flash twrp and magisk to root.
Thank you very much for this procedure Raygen. I was indeed able to recover my phone and restart it but it is very unstable. I had bootloopers again after reinstalling TWRP and Magisk. Now I have a problem with my security code or my fingerprints. Looks like they don't take them into account when I want to hand over a security code. Another problem is the camera no longer works. The app does not start. I tried to install the oneplus camera app loaded on Telegram v 3.422.2 but the installation failed.
A proposal to solve these problems ? Reinstall a partition other than Data that I backed up by Nandroid or is it back to OnePlus?
Try to restore the /persist partition from the twrp backup.
take a read here: https://forum.xda-developers.com/t/...rprint-to-become-completely-disabled.4363067/
Thanks very much. By restoring the "persist" partition, I recovered the camera and the fingerprints function. I hope the bootloops will stop there. Thank you very much, you are my saviour.
My OnePlus Nord 2 Indian version got hard bricked and I can't go in recovery or fastboot mode it is in a bootloop on OnePlus logo .
Any help???

Categories

Resources