[GUIDE] [OTA] [TWRP] Android Pie - TWRP, Decrypt, Magisk and OTA - Asus ZenFone Max Pro M1 Guides, News, & Discussio

Post my other thread for Android Oreo with OTA with TWRP ( https://forum.xda-developers.com/as...to/rom-update-stock-firmware-keeping-t3808269 ), wanted to continue the same but found pretty good solutions to have the process more quick and seamless.
So to have rooted Pie with TWRP and to flash OTA please follow below procedure.
Files needed,
Latest Pie full OTA file from Asus website.
Latest TWRP from here.
Decrypt File for Pie (recommedned).
Magisk (optional).
Debloat File (optional).
Steps to be followed to update to latest OTA,
Flash the latest TWRP and boot into it.
Flash downloaded full OTA package (point-1 above) from Asus website then reboot to recovery from TWRP menu.
Mount /system & /vendor partitions and flash decrypt-pie.zip file (point-2 above).
Reboot to recovery again, mount /system & /vendor and flash Magisk. (point-3 above)
Reboot to recovery and mount /system & /vendor and flash Debloat zip (point-4).
Finally reboot to system and HIT THANKS if it worked for you. This helps me and also gives confidence/credibility to others to try.
Post issues if any below.

It's not working bro

This ROM package works very well but cam2api is getting disabled. Did the build.prop method after root and also the fastboot method. It works for a few days than gcam stops.

As pointed out in the guide, official Pie zip is to be DL and flashed through TWRP. However, since it is official zip, will it flash successfully through TWRP recovery instead of Stock Recovery ?
Also, can anybody confirm if the phone is now system-as-root after upgrade to Pie ? (I am on v340 Oreo and system-as-root is not mandatory for devices upgrading to Pie).
Edit: Ok, so took the plunge and successfully updated from stock rooted v340 (Oreo) to v56 (Pie). Did everything as per the guide except for 2 steps:
1) Used TWRP flashable ROM instead of stock ROM zip.
2) Did not reboot to TWRP recovery after flashing updated recovery. Instead, continued through updated recovery, flashed ROM and then rebooted to recovery.

Bugs in the update v056 (Pie):
1) Sometimes "Recent Apps" list goes blank / stops working. Workaround: Reboot to safe mode and check "Recent Apps" (it usually is working), reboot to normal mode and everything works fine again.
2) Cam2Api breaks, even if you enable <persist.camera.HAL3.enabled=1> it will not work.
Add these lines to build.prop, save and reboot:
persist.camera.HAL3.enabled=1
persist.vendor.camera.HAL3.enabled=1
persist.camera.stats.test=5
persist.vendor.camera.test=5
persist.camera.eis.enable=1
(DO NOT FORGET to backup your original build.prop !)

Related

[GUIDE] How to keep root and Xposed while still receiving OTA updates

Hey guys. I thought I'll share what I found out on this because it will help many many out there.
Requirements : TWRP on Read- only mode, Non-rooted device.
1. Take a back up of only "BOOT" partition from TWRP.
2. Download the latest system-less superSU(stable v2.76) {http://forum.xda-developers.com/showthread.php?t=1538053}
3. Flash it with TWRP(make sure you're on read-only mode, I'm stressing)
4. Reboot to system and download "System-less Xposed" ( Many don't know this. This is a mod of original xposed to fit in with system-less superSU for recieving OTAs) - http://forum.xda-developers.com/attachment.php?attachmentid=3783179&d=1465938666
5. Again, flash it with TWRP. Reboot and install the Xposed Installer - Material Version(only material detects system-less) - http://forum.xda-developers.com/xposed/material-design-xposed-installer-t3137758
6. When you see any OTA, download the incremental zip for your version.
7. Boot to TWRP and Restore the Boot Image you backed up.
8. Now, Flash the OTA zip through TWRP.
9. Repeat from step 1 for next OTA and benefit.
*** DONOT FLASH SUPERSU AND XPOSED AT ONCE. BOOT TO SYSTEM IN THE MIDDLE IS REQUIRED. SUPERSU SHOULD BE FLASHED FIRST. DONOT EDIT THE /system AFTER ROOTING
This problem prevails only for the OnePlus 3 because the boot image cannot be properly patched by SuperSU.
I cannot give a 100% surity for this to work but it will, as it did for me.
Can you upload your backup of boot image and recovery image,
I would like to try something.
Sent from my ONEPLUS A3003 using XDA-Developers mobile app
How did the backup work ?
Each time I try to back up I get fork error

[GUIDE] OOS v4.0.3 ---> FLASH & ROOT STOCK -OR- CUSTOM ROM WITH EASE & CORRECTLY

[GUIDE] OOS v4.0.3 ---> FLASH & ROOT STOCK -OR- CUSTOM ROM WITH EASE & CORRECTLY
If you think that I need to add more information to this guide, please post your request. I'm not able to guess what you want from me to add to this guide.
Thank you!
INTRODUCTION:
This guide is mainly for users who tried flashing OxygenOS v4.x.x the easy and short way (like in post #9 in this thread), which had issues in the process.
I covered the most common issues with flashing OOS v4.x.x in this guide. However, you can use this guide to flash OxygenOS (latest Stable and Beta versions)
and root them OR flash your custom ROM. Just follow the instructions.
Now, you ask “why I decided to write this guide?”. Well here’s my story:
I had FreedomOS v1.7 with Google apps installed (including Dialer and Contacts from OpenGApps), encrypted, official twrp (v3.0.2-1), Xposed (v3.1.1), framework (v87),
AdAway v3.2, YouTube AdAway and SuperSU v2.79 (stable). Also, stock kernel, no Dolby ATMOS or A.R.I.S.E apps.
So, when OOS v4.0 came out, I waited for FreedomOS v2.0 to come out too. Once it did, I downloaded the ROM, OpenGApps, modified twrp .28 and started
the flashing process (I backed up my data first).
First, I flashed twrp .28 (had no problems booting into it), and clean flashed FOS v2.0. I selected “Yes” in “Pin/Pattern backup in data partition”, so I wouldn’t have issues with encryption. I selected the regular apps (for OOS to work properly) and installed the OS.
When it was done, I rebooted the device to the OS. I was confused with the new “dm-verity” message popping from nowhere, but the OS booted successfully.
When I rebooted to the twrp (to install OpenGApps), it asked for a password. I couldn’t enter the right password, because it wouldn’t accept any and it blocked
my access to my internal storage.
I started panicking, looking for answers, and I was afraid that I bricked my phone. However, after some research, I calmed down. I realized that my bootloader was still working and could roll back to OOS v3.2.8 (with stock recovery), which I did. From there I flashed FOS v1.7 and waited for more information about the new Nougat update for OnePlus 3.
Now, I’m using Stock OygenOS v4.0.3 with Stock Kernel (see FAQ #16) and so far, no issues (no dm-verity message or password upon entering modified twrp).
I tried to repeat the dm-verity issue and fixed it (see FAQ #6). I was so frustrated that no one posted a proper guide on how to fix these issues, or they were too advanced. I didn’t want to mess around with the core of the system too much. Therefore, I decided to post a simple-to-follow guide.
DISCLAIMER & IMPORTANT:
I am not responsible for any damages done by this guide. You are tinkering with your phone and held responsible for that. This is not an advanced guide. Therefore, I will refer you to the advanced guides when needed. Furthermore, this guide is based on the issues that I and other users encountered while
flashing OOS v4.x.x ------------>***BACK UP PERSONAL DATA BEFORE PROCEEDING ANY FURTHER***
This guide is intended for owners of OnePlus 3. But, after some poking in OnePlus 3T forums, you can use this guide. The only differences the OnePlus 3T
have are a newer processor, newer front camera and a different color from OnePlus 3. Make sure to use the appropriate tools (Stock recovery, TWRP,
OxygenOS v4.0.3, etc.) for OnePlus 3T. Again, I will not be responsible for any damages caused by this guide.
Please follow this guide to get rid of: dm-verity, encrypted twrp, encrypt or decrypt your device (as OnePlus 3 comes encrypted by default), change your file system from EXT4 to F2FS (vice versa as well). Also, flash a Marshmallow or Nougat Stock OOS (Stable or Beta versions), root them OR unroot your device, OR flash a custom ROM.
As far as I know, tested and read in forums, Android v6.0.1 (OxygenOS v3.x.x) supports only EXT4 file system, and Android v7.0 (OxygenOS v4.x.x) supports both EXT4 and F2FS file systems. However, F2FS is recommended for Android v7.0 (OxygenOS v4.x.x). When you perform, a full factory reset in OxygenOS v4.x.x, the file system changes from EXT4 to F2FS. ONLY “Data (userdata)” is affected by this. If you want to go back to Marshmallow, OxygenOS v3.x.x will change your file system from F2FS to EXT4 when you sideload it.
OxygenOS v4.0.3 still comes with some issues, bugs, and some rooting services are not fully supported yet (i.e. Xposed for Nougat). Luckily, OnePlus released kernel sources of Nougat, and we need to wait a little longer for Xposed and other rooting services to be supported. Therefore, I advise staying away from it,
for a little while, until those issues are fixed, and new ones don’t pop up. Also, until rooting apps are fully supported. Follow OnePlus community forums and
XDA forums for updates, troubleshooting, and solutions for your issues. MAKE SURE TO BACK UP YOUR PERSONAL DATA, time to time.
Before posting questions or issues or requests, check FAQ and posts in this thread. Thank You!
WHAT WILL YOU NEED?
You don't need to download everything in this section, only what you prefer to roll with.
ADB drivers installed on your computer (I have version 1.0.32 installed)
Unlocked bootloader (if you haven't done it yet, follow this guide: https://forum.xda-developers.com/oneplus-3/how-to/oneplus-3-how-to-unlock-bootloader-t3398733)
DiskInfo app from the Play Store:
https://play.google.com/store/apps/details?id=me.kuder.diskinfo&hl=en
OxygenOS v3.2.8 OTA:
http://downloads.oneplus.net/oneplus-3/oneplus_3_oxygenos_3.2.8/
OxygenOS v4.0.3 OTA:
https://www.androidfilehost.com/?fid=457095661767136075 OR http://otafsc.h2os.com/patch/amazon...ygen_16_OTA_041_all_1702081756_0f1e56a75f.zip
*** Download speeds might be slow. Be patient. ***
OxygenOs Beta 11 (Nougat):
http://downloads.oneplus.net/oneplus-3/oneplus_3_oxygenos_openbeta_11/
Stock Recovery v2.0 (compatible with OOS v3.x.x and OOS v4.x.x):
http://oxygenos.oneplus.net.s3.amazonaws.com/recovery_op3.img
Official TWRP (v3.0.2-1 for OxygenOS v3.x.x ; v3.0.3-0 for OxygenOs v4.x.x):
https://twrp.me/devices/oneplusthree.html
Unreleased Official TWRP v3.0.4-1 for Nougat (OxygenOS v4.x.x): *** Recommended for Nougat ***
https://forum.xda-developers.com/oneplus-3/development/recovery-official-twrp-oneplus-3-3t-t3543391
Unofficial TWRP (v3.0.3-0 for LineageOS v14.1):
https://forum.xda-developers.com/oneplus-3/development/recovery-twrp-3-0-2-0-touch-recovery-t3402999
Modified TWRP v3.0.3-x blu_spark v16 from @eng.stk:
https://forum.xda-developers.com/devdb/project/dl/?id=23082
SuperSu v2.79 (Stable):
https://forum.xda-developers.com/apps/supersu/stable-2016-09-01supersu-v2-78-release-t3452703
OpenGApps (latest version):
http://opengapps.org/
Your desired custom ROM (I tested FreedomOS v1.7 and v2.3 and v2.4-CE, Experience ROM v10.1 [Stable and Beta 11], LineageOS v14.1):
https://forum.xda-developers.com/oneplus-3/development/rom-freedomos-1-0-t3409348 (FreedomOS - Stable [v1.7 - OOS v3.2.8 ; v2.3 - OOS v4.0.2])
https://forum.xda-developers.com/oneplus-3/development/rom-freedomos-ce-1-7-t3470660 (FreedomOS - Beta [v2.4-CE - OOS Beta 11])
https://forum.xda-developers.com/oneplus-3/development/rom-experience-rom-v1-0-t3522259 (ExperienceOS - Stable and Beta 11 [v10.1])
https://forum.xda-developers.com/oneplus-3/development/rom-cyanogenmod-14-1-oneplus-3-t3496850 (LineageOS v14.1 - based on Andriod v7.1.1)
Code:
[I][SIZE="4"][B] * I'LL BE USING OOS v4.0.3, OFFICIAL UNRELEASED TWRP v3.0.4-1 AND FreedomOS
v2.3 AS AN EXAMPLE FOR THIS GUIDE. OTHER VERSIONS OF OOS AND TWRP
(PROVIDED) ARE APPLICABLE TO BE USED IN THE GUIDE (ONLY WHAT I TESTED).
[COLOR="Red"][I] * If you don't have dm-verity issue, file system change issue or password
upon entering TWRP, then go to Section C (FLASHING YOUR CUSTOM ROM)
-OR- Section D (FLASHING AND ROOTING STOCK OOS OR UNROOT).
* If you do have dm-verity issue, file system change issue or password upon
entering TWRP, then continue to Section A (DM-VERITY).[/I][/COLOR]
[/B][/I][/SIZE]
A - PROCEDURE (DM-VERITY):
Code:
[I][SIZE="4"][CENTER][B]***** Check FAQ #5 before proceeding any further! *****[/B][/CENTER][/I][/SIZE]
Boot to bootloader by holding Volume Up and Power buttons.
Connect the phone to the computer via USB cable.
Go to your ADB folder (for me it is C:\Android\). Press “Shift” and click the right mouse button. Click on “Open command window here”.
In the console write “fastboot devices” to see if your computer recognizes your OnePlus 3.
When you could see that your device is recognized, write “fastboot flash recovery recovery_op3.img” to flash Stock Recovery of OxygenOS.
Disconnect the device, press volume up once, then press the power button once to turn off the phone.
Boot into recovery by holding Volume Down (-) and Power button down for a few of seconds.
Now, for some people, it will ask a password. If not, continue to #9 and ignore #8. If it asks you to enter a password to decrypt your data, choose “Forgot password” and let it erase all your data and let it reboot. (MAKE SURE YOU BACKED UP YOUR PERSONAL DATA BEFOREHAND). Most likely, it will reboot to the OS, so boot it to recovery again. Go to #10.
For those who doesn’t have to enter a password, press “English”. Press “Wipe data and cache” > “Erase everything (Music, pics, etc.)” > “This cannot be undone, continue?”. Moreover, let it wipe your data. Most likely, it will reboot to the OS, so boot it to recovery again. Go to #10.
Code:
[CENTER][I][SIZE="4"][B]AT THIS POINT IF YOU HAD DM-VERITY ERROR/ISSUE, IT SHOULD BE FIXED AND GONE.
IF IT STILL APPEARS, DON'T WORRY IT WILL BE GONE AFTER #12
IT CAME BACK TO ME ONE MORE TIME, BUT I GOT IT FIXED.
***** Check FAQ #6 for more information *****[/B][/I][/SIZE][/CENTER]
Select “English” > “Install from ADB” > “Ok”. Connect your phone to your computer. Go to your ADB folder (for me it is C:\Android\). Press “Shift” and click the right mouse button. Click on “Open command window here”.
In the console, write “adb devices” to see if your computer recognizes your OnePlus 3.
When you could see that your device is recognized, write “adb sideload OnePlus3Oxygen_16_OTA_041_all_1702081756_0f1e56a75f.zip”
to flash OxygenOS v4.0.3. (See FAQ #4 and #17 if you have issues)
Reboot and you have OxygenOS v4.0.3!
Sign-in into your Google account and Download the “DiskInfo” app from the Play Store. Launch it, and press “Data (userdata)”. You should see:
- Encrypted: yes
- Decrypted block device: /dev/block/dm-1
- Mount point: /data
- File system: f2fs
A. If you see that it is in F2FS file system format, proceed to Section C (FLASHING YOUR CUSTOM ROM) OR Section D (FLASHING AND ROOTING STOCK OOS OR UNROOT).
B. However, for some people (for some reason) it does not happen. You would see that your file system format (for userdata) is still on EXT4. Don’t be frustrated. A little bit more work needed to be done. Therefore, go to Section B (CHANGING FILE SYSTEM FORMAT AND ENCRYPTING OR DECRYPTING YOUR DEVICE). It will solve that problem.
Code:
[I][SIZE="4"]* Your phone needs to be encrypted by default. It comes like that from the
manufacturer. See the following links:
1. [url]https://forums.oneplus.net/threads/encrypted-oneplus-3.452572/page-2[/url]
2. [url]http://www.androidpolice.com/2015/10/19/android-6-0-will-finally-require-manufacturers-to-enable-full-disk-encryption-by-default-on-new-devices/[/url]
3. [url]http://arstechnica.com/gadgets/2015/10/android-6-0-re-implements-mandatory-device-encryption-for-new-devices/[/url]
4. [url]https://source.android.com/security/encryption/[/url]
5. [url]http://www.howtogeek.com/141953/how-to-encrypt-your-android-phone-and-why-you-might-want-to/[/url]
6. [url]http://www.extremetech.com/mobile/216560-android-6-0-marshmallow-makes-full-disk-encryption-mandatory-for-most-new-devices[/url]
[/I][/SIZE]
B - PROCEDURE (CHANGING FILE SYSTEM FORMAT AND ENCRYPTING OR DECRYPTING YOUR DEVICE):
Go to: Settings > Security & fingerprint > Encryption (located at the bottom). Make sure it says “Encrypt phone (Encrypted)”. To make sure
you will need to do a factory reset.
Now go to: Settings > Backup & reset > Factory data reset. In “Optional” select “Erase internal storage” and press “RESET PHONE”. Confirm by pressing “ERASE EVERYTHING”.
It will reboot to Stock Recovery and wipe your data. When it’s done, it will reboot to the OS.
Again, download the “DiskInfo” app from the Play Store. Launch it, press “Data (userdata)”. Now you should see (it wouldn’t show “Encrypted: yes” at all):
- Mount point: /data
- File system: f2fs
Now go to: Settings > Security & fingerprint > Encryption (located at the bottom). Make sure it says “Encrypt phone” and that you can press it. (DON’T ENCRYPT YOUR PHONE WITH THAT OPTION)
Now you successfully changed your file system to F2FS and decrypted your phone!
Code:
[I][SIZE="4"] * With Official TWRP v3.0.3-0 and modified TWRP v3.0.3-x v16 (from [user=3873953]@eng.stk[/user])
you are able to use the phone in encrypted mode, password request at
boot up and with Stock or rooted OOS v4.0.3 (Also, I tested it myself).
* Therefore, I will ask you to encrypt the phone back again. Proceed with
the following instructions:
[CENTER]***** Check FAQ #9 for more information *****[/CENTER][/I][/SIZE]
Reboot to Stock recovery v2.0
Select “English” > “Install from ADB” > “Ok”. Connect your phone to your computer. Go to your ADB folder (for me it is C:\Android\). Press “Shift” and click the right mouse button. Click on “Open command window here”.
In the console, write “adb devices” to see if your computer recognizes your OnePlus 3.
When you could see that your device is recognized, write “adb sideload OnePlus3Oxygen_16_OTA_041_all_1702081756_0f1e56a75f.zip”
to flash Oxygen OS v4.0.3. (See FAQ #4 and #17 if you have issues)
Reboot your device. Now you back to being encrypted and “userdata” was changed successfully to F2FS file format on Stock Oxygen OS v4.0.3!
Go to Section C (FLASHING YOUR CUSTOM ROM) to properly flash your custom ROM. *** IT’S YOUR CHOICE ***
OR Go to Section D (FLASHING AND ROOTING STOCK OOS OR UNROOT) to remain in stock, root or unroot. *** IT’S YOUR CHOICE ***
C - PROCEDURE (FLASHING YOUR CUSTOM ROM):
Boot to bootloader by holding Volume Up and Power buttons.
Connect the phone to the computer via USB cable.
Go to your ADB folder (for me it is C:\Android\). Press “Shift” and click the right mouse button. Click on “Open command window here”.
In the console write “fastboot devices” to see if your computer recognizes your OnePlus 3.
When you could see that your device is recognized, write “fastboot flash recovery twrp-3.0.4-1-oneplus3.img” to flash Official Unreleased TWRP v3.0.4-1.
Disconnect the device, press volume up once, then press the power button once to turn off the phone.
Boot into the TWRP by holding Volume Down (-) and Power button down for a few of seconds.
It takes a little bit more time to boot to blu_spark’s, Official and Unofficial TWRPs. Be patient.
Code:
[I][SIZE="4"] * The “PASSWORD UPON ENTERING TWRP” should not be an issue any longer (only
if you followed the whole guide). It is caused by the TWRP being modified
(has an issue with encryption), not being officially released and fully
supported for the Nougat update. Versions “.28”, “.22” and “.19” are known
for that issue. Therefore, DO NOT USE THEM. If one of them works for
you, then use it at your own risk.
[CENTER]***** Check FAQ #9 for more information *****
[/CENTER][/I][/SIZE]
Press “Wipe” > “Advanced Wipe”, and select “Dalvik / ART Cache”, “System”, “Data” and “Cache”. Then swipe “Swipe to Wipe” for a clean flash.
After it’s done, go back to the main menu. Press “Install” and look for your desired custom ROM and press on the zip file to install it.
* I used FreedomOS v2.3 as an example and I didn't have any battery drain issues. (For more information, see FAQ #10)
D - PROCEDURE (FLASHING AND ROOTING STOCK OOS OR UNROOT):
Code:
[I][SIZE="4"][COLOR="Red"][I] * If you don't have dm-verity issue, file system change issue or password
upon entering TWRP, then go to #1.
* If you came from having dm-verity issue, file system change issue or
password upon entering TWRP (solved by using Procedure A and/or B),
then go to #12.
[/I][/COLOR][/I][/SIZE]
Boot to bootloader by holding Volume Up and Power buttons.
Connect the phone to the computer via USB cable.
Go to your ADB folder (for me it is C:\Android\). Press “Shift” and click the right mouse button. Click on “Open command window here”.
In the console write “fastboot devices” to see if your computer recognizes your OnePlus 3.
When you could see that your device is recognized, write “fastboot flash recovery recovery_op3.img” to flash Stock Recovery of OxygenOS.
Disconnect the device, press volume up once, then press the power button once to turn off the phone.
Boot into recovery by holding Volume Down (-) and Power button down for a few of seconds.
Select “English” > “Install from ADB” > “Ok”. Connect your phone to your computer. Go to your ADB folder (for me it is C:\Android\). Press “Shift” and click the right mouse button. Click on “Open command window here”.
In the console, write “adb devices” to see if your computer recognizes your OnePlus 3.
When you could see that your device is recognized, write “adb sideload OnePlus3Oxygen_16_OTA_041_all_1702081756_0f1e56a75f.zip”
to flash OxygenOS v4.0.3. (See FAQ #4 and #17 if you have issues)
Reboot and you have OxygenOS v4.0.3!
A. UNROOT - At this point, if you want to unroot and go back to completely stock, then use this guide: https://forums.oneplus.net/threads/guide-how-to-unroot-your-oneplus-3-and-go-back-completely-to-stock.456232/
*** Most of the procedures for unrooting you have already done. Only locking bootloader is left. Good Luck! (YOU CAN STOP HERE)
B. ROOT - Continue to #13
Boot to bootloader by holding Volume Up and Power buttons.
Connect the phone to the computer via USB cable.
Go to your ADB folder (for me it is C:\Android\). Press “Shift” and click the right mouse button. Click on “Open command window here”.
In the console write “fastboot devices” to see if your computer recognizes your OnePlus 3.
When you could see that your device is recognized, write “fastboot flash recovery twrp-3.0.4-1-oneplus3.img” to flash Official Unreleased TWRP v3.0.4-1.
Disconnect the device, press volume up once, then press the power button once to turn off the phone.
Boot into the TWRP by holding Volume Down (-) and Power button down for a few of seconds.
It takes a little bit more time to boot to blu_spark’s, Official and Unofficial TWRPs. Be patient.
Connect you OnePlus 3 to your computer and copy the SuperSU v2.79 (Stable) to your device.
Pick up your phone. From the main menu, press “Install” and look for the SuperSU v2.79 (Stable zip file). Press it to install the root and after it's done, reboot to the OS.
That's it! Everything should be working properly
(except the bugs and issues on OxygenOS Nougat update).
ENJOY!​
CREDITS:
@NevaX1 --------------> For FreedomOS ROM
@jamal2367 -----------> For ExperienceOS ROM
@cpt.macp ------------> For in depth dm-verity remover guide
@Adithya R -----------> For in depth file system formating from EXT4 to F2FS guide
@eng.stk --------------> For modified TWRP that supports F2FS file format
@LELBOT --------------> For in depth dm-verity remover and file system formating from EXT4 to F2FS guides
@Naman Bhalla ------> For in depth bootloader unlocking, flashing TWRP, rooting, nandroid backup guide
@calvinistmac --------> For providing an unroot for OnePlus 3 guide
@Nishidh --------------> For providing OxygenOS v4.0.3 and Beta 11 OTA download links
@jcadduono ----------> For providing Official TWRP
@dianlujitao ----------> For providing Unofficial TWRP and LineageOS 14.1 ROM
@th3g1z ---------------> For providing an easy solution for Dm-verity issue
--------------------------> OnePlus Community and XDA forums for providing with issues, solutions and requests
FAQ (Q&A):​
Q: I can’t boot into TWRP! What to do?
A: Try using the previous TWRP or Stock Recovery.
[*]Q: I can’t boot into the OS! What to do?
A: Most likely some of the OS files are damaged or executed incorrectly. Try flashing or sideloading the OS again.
[*]Q: I can’t transfer files to my OP3 after wiping Internal storage OR Data folder/s in TWRP! What to do?
A: Don’t panic. Reboot to TWRP. It will create a folder so you can transfer files again.
[*]Q: I got an error sideloading the OS. Why is that?
A: Sometimes it occurs when the USB cable is wiggled side to side (the process stops at 92% with an error). Try again without touching
or moving the USB cable and the phone. Alternatively, it could be that USB debug is not enabled (not sure about that).
[*]Q: Is there an alternative way to get rid of dm-verity issue?
A: One simple command-line (enable) in bootloader can solve it. Check this post: https://forum.xda-developers.com/showpost.php?p=70698410&postcount=112
Otherwise, check this thread: https://forum.xda-developers.com/oneplus-3/how-to/fix-device-mapper-verity-simple-trick-t3530685 This guide uses the .28 twrp
(NOT RECOMMENDED, BUT USE TWRP FROM @eng.stk) to use Stock Recovery, which I think is a bit more complex.
OR: https://forum.xda-developers.com/showpost.php?p=70415499&postcount=33
My guide uses only bootloader, Stock Recovery and TWRP from @eng.stk. Either way, they are the same guides.
[*]Q: The "dm-verity issue" came back after flashing OTA of stock OOS v4.0.2 via the TWRP! What to do?
A: Simply follow "Section A" instructions until #13. After you sideloaded the OTA it will be gone. It happened the second time when I tried to
flash the OTA via TWRP. Therefore, don't flash OTA of stock OOS v4.x.x via TWRPs. Only via Stock Recovery v2.0
I got it fixed only after sideloading the OTA via Stock Recovery v2.0 (Check post #29 for more information)
If it still doesn't work check this thread and read it thoroughly: https://forum.xda-developers.com/oneplus-3/development/recovery-official-twrp-oneplus-3-t3539129
For more information, read FAQ #12
[*]Q: Your guide to change file format doesn’t work, OR I want to change “Cache” and “System” to F2FS as well. What to do?
A: Simply go to this link and at your own risk: https://forum.xda-developers.com/oneplus-one/general/guide-formatting-ext4-to-f2fs-losing-t3352116
Furthermore, @cpt.macp mentioed in post #34 in this thread that "/system and /cache need not to be f2fs . Oneplus Supports only /data
as f2fs and nothing else ."
[*]Q: I can’t log in into Snapchat after a clean flash of my desired custom ROM or after rooting my device. How to fix this?
A: I had the same issue, and it doesn’t occur to everybody. Before DIRTY flashing (wiping System, Cache and Dalvik only) the custom ROM
-OR- rooting your device, install Snapchat and log into it (on stock OOS v4.x.x). It might be a SuperSU (root) issue with Snapchat
(they enforced their security with rooted devices).
Also, OnePlus 3 has an issue with on-screen navigation bar. So, disable it in the "Buttons" menu until OnePlus fixes the glitch/bug.
[*]Q: Why did you choose TWRP v15 from @eng.stk -OR- Official TWRP v3.0.3-0 -OR- Unofficial TWRP v3.0.3-0?
A: They all work with the phone being encrypted, requesting a password on bootup to the OS and support F2FS file system.
.28 – had issues with encryption and F2FS file system, but for some users it works wonders.
.22 and .23 – I did not test, but I have read that .23 worked (decrypted).
.19 – Tested and solved the password issue, but had a mouse pointer in the middle of the TWRP (wasn’t a big deal). Worked in decrypted mode.
P.S. The official TWRP has issues with the name of the device. If you encounter those issues, then let the developer of the ROM
you're using know about it. So, he could fix it (it's a small fix). OR use TWRP v15 from @eng.stk. Unofficial TWRP is to be used
with LineageOS 14.1 & Experience v10 ROMs. Also, here is the reason why: https://forum.xda-developers.com/showpost.php?p=70593986&postcount=53
Also, Official TWRP v3.0.2-1 doesn't support Nougat. Therefore, you won't be able to boot to this TWRP. Don't use it for Nougat.
[*]Q: I am experiencing a battery drain. Why?
A: Facebook was the main issue for that, but it is now fixed (some users said that it still exists). I use Freedom OS v2.2 and no
issues so far with the battery. I got 5 hours SOT (Screen On Time) with 45% left (on the first day), and 5½ hours SOT with 26%
battery left (on the second day). Now, I think the OS is balanced because I get almost 8 hours of SOT. Try looking for a solution
in the forums. Also, disable mobile data when using WIFI and vise versa. Furthermore, battery life may vary with the applications
you use on a daily basis, screen brightness, how much and long you touch the screen, etc. (See the attached thumbnails)
[*]Q: I am experiencing issues with the Play Store app (It’s stuck on downloading). Is there a fix?
A: When you first launch it, it tries to update itself. It will crash 1-2 times. After that, everything works just fine. Also, uninstall or don’t
install Truecaller app (well known to cause this issue). It was fixed in OOS v4.0.2, but some users still experience this issue.
In addition, if nothing works, then try uninstalling the Play Store app and reinstall it via OpenGApps. For those who are not rooted,
try finding the Play Store app via the web (install it under your own risk, as I'm not responsible for the damages).
[*]Q: Why do you use stock recovery to sideload the OS?
A: First of all, you’re going to sideload OTA of Oxygen OS, which you can’t flash in the TWRP (some people can and you might get dm-verity
issue). Secondly, the stock recovery is simple and easy to use. Thirdly, If you flash the OTA from the official TWRP, you will get a dm-verity
message. Besides, OnePlus provided only with "OTA" zips and not "signed flashable" zips.
THE DM-VERITY ISSUE (CHECK THE FOLLOWING SOURCES FOR MORE INFORMATION):
https://www.xda-developers.com/qualcomm-maintains-its-dedication-to-security-with-secure-boot/ ; https://www.xda-developers.com/stri...r-correction-to-come-with-android-7-0-nougat/ ;
https://source.android.com/security/verifiedboot/ ; https://forum.xda-developers.com/oneplus-3/development/recovery-official-twrp-oneplus-3-t3539129 ;
https://forum.xda-developers.com/showpost.php?p=70574596&postcount=34 ; https://forum.xda-developers.com/showpost.php?p=70622726&postcount=97 ;
https://forum.xda-developers.com/showpost.php?p=70622760&postcount=98 ; https://forum.xda-developers.com/showpost.php?p=70622849&postcount=102 ;
https://forum.xda-developers.com/showpost.php?p=70622999&postcount=104
[*]Q: What if I want to go back using Oxygen OS v3.2.8 (Andriod v6.0.1) or custom ROMs based on it?
A: Simply instead of using Stock Oxygen OS v4.0.2 OTA in this guide, use Stock Oxygen OS v3.2.8 OTA.
It will bring back EXT4 file system and you can use Xposed.
[*]Q: After clean flashing my Custom ROM in TWRP, I get the following message: "No OS Installed. You Sure You Want
To Reboot". What to do?
A: Try dirty flashing your Custom ROM. (Source: https://forum.xda-developers.com/showpost.php?p=70622460&postcount=5291)
[*]Q: Android System WebView is disabled in the Play Store. When I try to enable it, it won't do anything. Unless I tap
it rapidly and it's still in disabled mode. What to do?
A: No need to worry here. It is normal due to Chrome being the new WebView in Android Nougat.
(Sources: http://www.androidpolice.com/2016/07/20/google-explains-chrome-will-become-webview-android-7-0/ AND https://productforums.google.com/forum/#!topic/nexus/Ni35XW6eRR0
https://www.reddit.com/r/GooglePixel/comments/5ayh5d/android_system_webview_not_enabled/ AND https://www.reddit.com/r/Nexus6P/comments/57t1hw/android_system_webview_keeps_disabling/)
[*]Q: Should I flash a custom Kernel (ElementalX or Blu_spark) on a custom ROM?
A: You can, but you might have CPUs being on max load and overheating issues (it's not caused by the kernel itself).
They work best, and only, if you have stock OOS v4.0.2 installed and rooted with SuperSU v2.79 Stable. Yes, for some
users the custom kernels work. But, for some they won't, due to firmware issues. You can try them on your Custom
ROM, but it's not guaranteed to work. The developers of FreedomOS and ExperienceOS solved this issue.
**Some users found a solution by setting SELinux to Permissive mode instead of Enforced.
I do not recommend setting your SELinux in Permissive mode! (as well as the developer of ElementalX)!
For more information, check this thread: https://forum.xda-developers.com/oneplus-3/how-to/potential-fix-cpu-battery-drain-aosp-t3543369
Also, check these articles: https://www.xda-developers.com/onep...ng-of-selinux-to-permissive-mode-in-fastboot/ ; https://www.xda-developers.com/onep...lus-33t-bootloader-vulnerability-in-next-ota/
[*]Q: I'm getting the error (cannot read "image.zip") when trying to sideload Stock OOS. Why and how to fix this?
A: For some reason, the thread added a space in the OOS file name. If you copy the file name for Stock OOS v4.0.2 from this thread,
make sure it doesn't have spaces in it (-OR- in any other file -OR- in the console).
** Also, make sure to enable USB Debugging in Developer Options.
** Follow these guidelines separately (if the first one doesn't work, use the second or third guideline):
Reinstall OnePlus Drivers using the attached zip (OnePlus_USB_Drivers_Setup.zip) and try again. In addition,
make sure your file name is not ending with ".zip.zip" or written like that in the console.
Bootup to your OS and connect the phone to the computer (make sure to choose transfer files mode).
Copy Stock OOS v4.0.2 OTA zip to the device and reboot to recovery. Select "Install from Internal Storage",
look for the OTA file and install it.
Read the following threads/posts/articles: https://forum.xda-developers.com/showthread.php?t=1990405&page=2 ;
http://www.howtogeek.com/125769/how-to-install-and-use-abd-the-android-debug-bridge-utility/ ; https://forums.oneplus.net/threads/cannot-read-ota-zip.457965/ ;
https://www.reddit.com/r/oneplus/comments/504qgv/adb_cannot_read_error/ ; https://www.androidexplained.com/fix-cannot-read-sideload-update/ ;
https://forum.xda-developers.com/android/general/guide-how-to-adb-to-push-pull-files-t3372710
[*]Q: Every second song in Google Play Music gets skipped. What to do?
A: Make sure to disable AdAway, then reboot the device. Everything should come back to normal.
P.S. I will add more questions and answers if they get repeated in the forums, or the issue can be solved.​
Updates & News:​Updates:
January 14th, 2017 ---> Reverted modified TWRP v3.0.3-x v12 from @eng.stk back to v3.0.2-0 v11
(Reason: https://forum.xda-developers.com/showpost.php?p=70556176&postcount=2540)
January 15th, 2017 ---> Added an introduction section; Modified sections A, B and C for more fluent and easier guidelines; Added one more Q&A
January 20th, 2017 ---> Added Section D (FLASHING AND ROOTING STOCK OOS OR UNROOT) ; Modified sections A, B and C ; Modified FAQ (Q&A)
and added more Q&A ; Updated to OOS v4.0.2, Beta 11, Official TWRP v3.0.3-0, Unofficial TWRP v3.0.3-0, Modified TWRP v14 from blu_spark ;
Modified Intoduction, "Disclaimer & Inportant" and "What will you need?" sections.
January 23rd, 2017 ---> Updated to latest Modified TWRP v3.0.3-x blu_spark v15 from @eng.stk
January 25th, 2017 ---> Added Unreleased Official TWRP v3.0.4-1 for Nougat ; Minor updates to the guide and FAQ.
February 9th, 2017 ---> Added and updated the thread with OxygenOS v4.0.3 ; Added one more FAQ and a new story
February 10th, 2017 ---> Updated to latest Modified TWRP v3.0.3-x blu_spark v16 from @eng.stk
News:
January 14th, 2017 ---> Oxygen OS v4.0.2 coming next week! Confirmed.
(Sources: https://forums.oneplus.net/threads/4-0-2-in-works-roll-out-by-next-week-confirmed.488348/ AND https://twitter.com/OnePlus_ITA/status/819200734067617792 AND
http://www.androidsage.com/2017/01/14/oneplus-3-and-3t-oxygen-os-4-0-2/)
January 15th, 2017 ---> We as a community of developers and users, urge OnePlus to release kernel sources by complying with GPLv2.
(Source: https://www.xda-developers.com/xda-developers-urges-oneplus-to-comply-with-gplv2-and-release-kernel-sources/)
January 18th, 2017 ---> OnePlus said that OxygenOS 4.0 doesn’t use a Debug Kernel
(Source: https://www.xda-developers.com/oneplus-oxygenos-4-0-doesnt-use-a-debug-kernel/)
January 20th, 2017 ---> Seems like OnePlus released Kernel Sources for OnePlus 3/3T. Finally!
(Sources: https://www.xda-developers.com/oneplus-releases-android-nougat-kernel-sources-for-the-oneplus-33t/ AND https://github.com/OnePlusOSS/android_vendor_qcom_thulium/commits/oneplus/QC8996_N)
January 20th, 2017 ---> The Best ROMs, Kernels, and Mods for the OnePlus 3
(Source: https://www.xda-developers.com/oneplus-3-best-stuff/)
January 21st, 2017 ---> Remap your phone’s hardware buttons with "Button Mapper" app
(Source: https://www.xda-developers.com/xda-...an-app-to-remap-your-phones-hardware-buttons/)
January 21st, 2017 ---> How to move Chrome’s address bar to the bottom without a visual bug?
(Source: https://www.xda-developers.com/psa-...ar-to-the-bottom-no-longer-causes-visual-bug/)
January 22nd, 2017 ---> Enable this Chrome Flag to Lock Rotation in Fullscreen Videos
(Source: https://www.xda-developers.com/enable-this-chrome-flag-to-lock-rotation-in-fullscreen-videos/)
January 22nd, 2017 ---> Deeply Integrated Progressive Web Apps (WebAPKs) are Live for Chrome on Android
(Source: https://www.xda-developers.com/deep...-apps-are-already-live-for-chrome-on-android/)
January 25th, 2017 ---> Open Betas updates are paused for a month for OnePlus 3/3T due to Chinese New Year
(Source: https://forums.oneplus.net/threads/...s-3-and-3t-will-be-paused-for-a-month.492623/)
January 25th, 2017 ---> Security Analysts Identify a Trojan that Quietly Purchase Apps, a Rootkit that takes over your Device,
and Ransomware that Locks your Device
(Source: https://www.xda-developers.com/secu...device-and-ransomware-that-locks-your-device/)
January 28th, 2017 ---> An update from @rovo89 about developing Xposed for Nougat
(Source: https://forum.xda-developers.com/showpost.php?p=70773752&postcount=41)
February 1st, 2017 ---> OnePlus got caught red-handed in Benchmark cheating and came clean
(Sources: https://www.xda-developers.com/benc...ght-red-handed-and-what-theyve-done-about-it/ ; http://www.androidauthority.com/oneplus-meizu-just-got-busted-benchmark-cheating-746640/)
February 9th, 2017 ---> Two Critical OnePlus 3/3T Bootloader Security Flaws Discovered, One Patched and Other being Addressed
(Source: https://www.xda-developers.com/two-...overed-one-patched-and-other-being-addressed/)
Very easy to follow guide. I ended up at B8 "Now you successfully changed your file system to F2FS and decrypted your phone!". I would like my phone to be encrypted, but if I do it through the OS, TWRP does not accept my password for the data partition?
Thanks so much, mate. This is a really good job which is gong to help to many people
Hi,
thanks :good:
For info: new twrp-3.0.3-x_blu_spark_v12-op3 is out
source: https://forum.xda-developers.com/showpost.php?p=70541197&postcount=2519
@+
Hi, i have oxygen os 4.0.1 rooted and twrp v11 bluspark...But its normal when i deletet some file i dont see immeditely the free space unti i reboot the phone...this happened sometimes and sometimes not...Its a bug?
I have flash as you post, when flash done i check file system by diskinfo, it displayed "userdata not mounted". how do i fix it. plz help me. thank you very much.
Lol this is just what I did:
1. Flash latest @eng.stk TWRP, swipe to allow modifications
2. Wipe system, data, cache
3. Install 1.4GB 4.0.1 zip
4. Wipe dalvik and cache
5. On Mount, check Mount /system as read-only
6. Reboot to system
You now have stock 4.0.1 system, kernel, and recovery.
7. Boot to recovery. TWRP is overwritten by the OOS 4.0.1 recovery.
8. Wipe everything. /data is now f2fs
Optional: flash TWRP, swipe to allow modifications, and do not check Mount /system as read-only to keep it.
No issues at all.
Sent from my OnePlus 3 using XDA Labs
Thank you! Solved my problem with Dm-Verity. Do you think, for the future *4.0.2* update or whatever number will be, that we will be able to flash OTA via TWRP or we'll need stock recovery? Only full zip with TWRP?
You might want to change that TWRP v12 back to v11. Eng.stk found some issues with v12 and pulled it.
And great guide BTW ?
Sent from my OnePlus 3 using Tapatalk
Greetings ?,
After reading this guide i just need to ask several thinks to make clear.
Recently my brothers give me his op3 as he changes to op3t ; . I want to change the phone font and afaik its to impossible to do so without root.
Im currently on 4.0 ; will this guide applicable on my phone ? Or is there a way to change font without root. Thanks in advance
laupuy said:
Hi,
thanks :good:
For info: new twrp-3.0.3-x_blu_spark_v12-op3 is out
source: https://forum.xda-developers.com/showpost.php?p=70541197&postcount=2519
@+
Click to expand...
Click to collapse
I cant't download it from that thread v12 - says file might have been deleted.
mit2nil said:
I cant't download it from that thread v12 - says file might have been deleted.
Click to expand...
Click to collapse
Go to the thread's Downloads tab, download the first file. Ugh it was just mentioned above that v12 was removed.
Sent from my Lenovo A3300 using XDA Labs
VincentJoshuaET said:
Go to the thread's Downloads tab, download the first file. Ugh it was just mentioned above that v12 was removed.
Sent from my Lenovo A3300 using XDA Labs
Click to expand...
Click to collapse
Yup my bad. I was on first page and just used reply button. Never mind.
Answers to your concerns:
I apologize for the late response. I was doing a bit of research to answer all of your questions.
Thank you for your patience!
jackiass said:
Very easy to follow guide. I ended up at B8 "Now you successfully changed your file system to F2FS and decrypted your phone!". I would like my phone to be encrypted, but if I do it through the OS, TWRP does not accept my password for the data partition?
Click to expand...
Click to collapse
Seems like "sideload"ing OOS v4.0.1 didn't change your file system, correct?
I would recommend to start over. When you are done B7, "sideload" OOS v4.0.1 to encrypt the device again. After that's done, continue to section C.
Crazyhat said:
Thanks so much, mate. This is a really good job which is gong to help to many people
Click to expand...
Click to collapse
You're welcome!
Thank you!
I tried very hard on gathering the right information and doing the testing on my OP3.
I almost got it bricked because of OOS v4.0.0, so I decided to post an easy to follow guide.
laupuy said:
Hi,
thanks :good:
For info: new twrp-3.0.3-x_blu_spark_v12-op3 is out
source: https://forum.xda-developers.com/showpost.php?p=70541197&postcount=2519
@+
Click to expand...
Click to collapse
Thank you very much! I have updated the thread.
UPDATE: Reverted back to v11 due to data corruption issues.
playerboys10 said:
Hi, i have oxygen os 4.0.1 rooted and twrp v11 bluspark...But its normal when i deletet some file i dont see immeditely the free space unti i reboot the phone...this happened sometimes and sometimes not...Its a bug?
Click to expand...
Click to collapse
I think it's not normal and you should see an immediate change in your free space.
I couldn't find any information about that.
Your best options are to follow this guide (if you didn't already) AND/OR post this issue in OnePlus 3 community forums.
yohan_xda said:
I have flash as you post, when flash done i check file system by diskinfo, it displayed "userdata not mounted". how do i fix it. plz help me. thank you very much.
Click to expand...
Click to collapse
Did you "sideload" stock OOS in stock recovery OR flash custom ROM via TWRP (I think this one)?
Also, where did you stop (section and number)?
VincentJoshuaET said:
Lol this is just what I did:
1. Flash latest @eng.stk TWRP, swipe to allow modifications
2. Wipe system, data, cache
3. Install 1.4GB 4.0.1 zip
4. Wipe dalvik and cache
5. On Mount, check Mount /system as read-only
6. Reboot to system
You now have stock 4.0.1 system, kernel, and recovery.
7. Boot to recovery. TWRP is overwritten by the OOS 4.0.1 recovery.
8. Wipe everything. /data is now f2fs
Optional: flash TWRP, swipe to allow modifications, and do not check Mount /system as read-only to keep it.
No issues at all.
Sent from my OnePlus 3 using XDA Labs
Click to expand...
Click to collapse
Yes, that might be the easy way when you have no issues. But, this guide deals with common issues (dm-verity, twrp password etc.) users face when they tried to update to OOS v4.0.x
If you'll face these issues in the future, you'll know where to find the related guide to fix them.
Hurizen said:
Thank you! Solved my problem with Dm-Verity. Do you think, for the future *4.0.2* update or whatever number will be, that we will be able to flash OTA via TWRP or we'll need stock recovery? Only full zip with TWRP?
Click to expand...
Click to collapse
You are very welcome!
You could flash OTA via TWRP (full size zip and not the small 40mb zip), but I'm afraid that it might "break your root" (you wouldn't have it anymore). It can be fixed by flashing SuperSU.
Technically, you could dirty flash (wipe System, Cache and Dalvik only) the new OTA. If you would have issues after dirty flashing, post your bugs/issues, and most likely you would have to clean flash the OTA.
Give it a try (backup your personal data and dirty flash) or wait for user feedback on the new OTA.
VincentJoshuaET said:
Go to the thread's Downloads tab, download the first file. Ugh it was just mentioned above that v12 was removed.
Sent from my Lenovo A3300 using XDA Labs
Click to expand...
Click to collapse
Thank you for replying back to him! I appriciate it!
mit2nil said:
I cant't download it from that thread v12 - says file might have been deleted.
Click to expand...
Click to collapse
I appologize about that. I have updated the thread.
Explorer23 said:
You might want to change that TWRP v12 back to v11. Eng.stk found some issues with v12 and pulled it.
And great guide BTW
Sent from my OnePlus 3 using Tapatalk
Click to expand...
Click to collapse
With a bit of delay, I've put back the link to v11.
Thank you, and I hope it helped you!
dinesh7208 said:
Greetings ,
After reading this guide i just need to ask several thinks to make clear.
Recently my brothers give me his op3 as he changes to op3t ; . I want to change the phone font and afaik its to impossible to do so without root.
Im currently on 4.0 ; will this guide applicable on my phone ? Or is there a way to change font without root. Thanks in advance
Click to expand...
Click to collapse
Personally, I don't mess around with fonts. But, this guide will be applicable for rooting your phone.
Check the following threads for the fonts: https://forum.xda-developers.com/oneplus-3/help/change-font-t3426785
https://forum.xda-developers.com/oneplus-3/help/how-to-change-font-one-plus-3-t3434351
https://forum.xda-developers.com/android/themes/fonts-flashable-zips-t3219827
https://forum.xda-developers.com/oneplus-3/help/cb7-custom-fonts-t3509759
I hope they help.
I wish I had found this guide before but never mind. I was following original rooting guide by Naman on my OP3 running stock OOS 4.0.1. I used twrp v28 of blue spark and as observed by many I ended up in encryption issues and couldn't take nandroid backup so I didn't proceed.
Now, it seems it has been fixed with latest twrp (v11) by blue spark. My /data partition is already f2fs and cache is /ext4.
What steps should I follow to get back correct recovery and hopefully root as well? I am hoping that I do not need to sideload 4.0.1.
mit2nil said:
I wish I had found this guide before but never mind. I was following original rooting guide by Naman on my OP3 running stock OOS 4.0.1. I used twrp v28 of blue spark and as observed by many I ended up in encryption issues and couldn't take nandroid backup so I didn't proceed.
Now, it seems it has been fixed with latest twrp (v11) by blue spark. My /data partition is already f2fs and cache is /ext4.
What steps should I follow to get back correct recovery and hopefully root as well? I am hoping that I do not need to sideload 4.0.1.
Click to expand...
Click to collapse
I've had all of the issues in this guide. So, I decided to post one because nobody posted in-depth guide to deal with OOS v4.0.1
Also, TWRP v28 has issues with encryption being on and F2FS issues too. It caused all of my problems. I was a bit lucky to find TWRP v19 (had a mouse pointer in the middle of the TWRP, no big deal). It worked with EXT4 and F2FS file systems but wasn't perfect due to working only in decrypted mode.
It seems like you don't have any issues. Am I correct? (No password request in TWRP, dm-verity message)
If you don't, go to section "C - PROCEDURE (FLASHING YOUR CUSTOM ROM)".
About file system - leave it be. Only "/data" should be F2FS, "/Cache" and "/System" as EXT4. To much work to change them to F2FS and TWRP formats them to EXT4 when you wipe them.
dbabaev21 said:
I've had all of the issues in this guide. So, I decided to post one because nobody posted in-depth guide to deal with OOS v4.0.1
Also, TWRP v28 has issues with encryption being on and F2FS issues too. It caused all of my problems. I was a bit lucky to find TWRP v19 (had a mouse pointer in the middle of the TWRP, no big deal). It worked with EXT4 and F2FS file systems but wasn't perfect due to working only in decrypted mode.
It seems like you don't have any issues. Am I correct? (No password request in TWRP, dm-verity message)
If you don't, go to section "C - PROCEDURE (FLASHING YOUR CUSTOM ROM)".
About file system - leave it be. Only "/data" should be F2FS, "/Cache" and "/System" as EXT4. To much work to change them to F2FS and TWRP formats them to EXT4 when you wipe them.
Click to expand...
Click to collapse
I do have both issues DM verity message as well as encryption issue. I just stopped doing any further changes and decided to keep using phone as it after I hit password encryption issue with TWRP as I couldn't take nandroid backup.
mit2nil said:
I do have both issues DM verity message as well as encryption issue. I just stopped doing any further changes and decided to keep using phone as it after I hit password encryption issue with TWRP as I couldn't take nandroid backup.
Click to expand...
Click to collapse
Then start from the beginning.
I was scared to death that I bricked my phone, but managed to get out quickly.

Why magisk doesn't work with PIE Roms ?

Hi
Since PIE roms for santoni are available, some people, including me, can't root their santoni.
I don't know why.
Flash looks ok in recovery, but after reboot, Magisk Manager says that Magisk isn't installed.
I tried every solution found in forums here, but everytime, same result : "magisk isn't installed"...
So sad !
Could you guys (and girls) centralize here your solutions, step by step, from flash the rom to root it...
It would be so nice for helping desperate people...
I also tried SuperSU and am having the same problem. I've tried Magisk 17.1, 17.2 and the Canary build along with the newest SuperSU and the result is always the same. Flashes fine but Magisk Manager and SuperSU apps can't find root.
The weird thing is that Enpass always tells me that my device is rooted and that it's a security risk even though Magisk Manager can't find root.
Also, I'm positive Magisk is patching the ramdisk. The Uninstaller always finds a Magisk-patched image. I'm assuming something has to be happening during boot that's cancelling root.
Two things I don't understand :
- why some people, with same configuration, don't have root problem ?
- why, with same recovery, same flash method, root works with nougat/oreo rom, and doesn't work with pie...?
Just like that : do you think problem could come from the sd card ?
I'm using à 128 gb samsung sd-card. Maybe I should format it before trying again root ?
I'm not sure it's the problem, since I can flash all roms, but I could try...
Or flash Magisk from internal storage ?
Really desperate...
Hi,
I´m in the same situation like you.
Yesterday I made a new experience of that without solution:
- Backuped all
- Uninstalled magisk at twrp
- Installed santoni_twrp_silent 27_treble (recommended from dev to install havoc)
- Rebooted
- Formated data with factory reset
- Wiped vendor, cache, data... (everything)
- Installed havoc (version 2018-09-08)
- Rebooted
- Installed magisk at twrp
- Rebooted
Same issue like before...
If I try to install magisk on magisk manager I get the following log:
Copying image to cache
Device platform: arm64-v8a
Existing zip found
Extracting files
boot_patch.sh[73]: can't create /proc/self/fd/: Is a directory
MagiskBoot v17.1(17100) (by topjohnwu)
Boot Image Modification Tool
Parsing boot image: [/data/user_de/0/com.topjohnwu.magisk/install/boot.img]
No boot image magic found!
boot_patch.sh[91]: can't create /proc/self/fd/: Is a directory
boot_patch.sh[91]: can't create /proc/self/fd/: Is a directory!
Installation failed
It seems magisk can´t install correct in cause of failing permissions to create new directories. But why?
Edit:
I think there´s an old magisk information written in device system who has to removed manually, cause magisk uninstaller is not able to do
Edit:
I think there´s an old magisk information written in device system who has to removed manually, cause magisk uninstaller is not able to do
Click to expand...
Click to collapse
Ok, but I wiped AND format data of internal storage, same results.
Do you think I should format/wipe micro-sd too ?
newbie_or_not_newbie said:
Ok, but I wiped AND format data of internal storage, same results.
Do you think I should format/wipe micro-sd too ?
Click to expand...
Click to collapse
I don´t think so. Well, if you like you can try, but I think it´s an internal problem, not an external
So,
I tried another wipe of internal storage, made a format data with recovery. Then I flashed another pie rom, then magisk. And after reboot : tada !! still not working...
try with version 16.6 of magisk
Great news, actually my magisk works on Pixys 2.1!
I installed this twrp:
https://drive.google.com/file/d/1RR-8WMNSQgx6QzQv5U4i-sST1Af42nrI/view
What I did:
Uninstalled old magisk, rebooted to twrp, installed magisk 17.2, rebooted, installed magisk manager 6.0 and it works.
The only thing is I didn´t rebooted until now, maybe it still works after next reboot or not...
Lemmy554 said:
Great news, actually my magisk works on Pixys 2.1!
I installed this twrp:
https://drive.google.com/file/d/1RR-8WMNSQgx6QzQv5U4i-sST1Af42nrI/view
What I did:
Uninstalled old magisk, rebooted to twrp, installed magisk 17.2, rebooted, installed magisk manager 6.0 and it works.
The only thing is I didn´t rebooted until now, maybe it still works after next reboot or not...
Click to expand...
Click to collapse
I just tried this and it didn't work for me either. I tried multiple clean flashes, flashed MIUI then back to Pie and flashing things in different orders last night and nothing worked. I'm tired of messing with it. I don't know how to get logs without root. I've come to the conclusion that for now I either have Pie or root. Not both. lol
Me too. I stop trying every day a solution.
For the moment, no root for pie roms, so I keep staying with oreo roms (nice dot OS...) I can root.
Hope next builds of pie roms will accept to be rooted on our santoni...
You can try this:
1 Flash Magisk v 17.2, Reinica in fast boot mode, turn it off and turn the phone on again
2 Install Magiskmanager V6 APK, do not open and restart in recovery
3 Flash Magisk v 16.6 and ready...
It worked for me... important, do not update magisk... The root is lost again
Best regards
Thanks for your reply.
Did you have root trouble before trying your solution ?
yes, when installing Pie only. In oreo no, I tried it in havoc and pixys
Try OrangeFox recovery for flashing magisk.
hyperkin said:
Try OrangeFox recovery for flashing magisk.
Click to expand...
Click to collapse
That's what I've been using. Also tried TWRP. Neither worked for me. The flash always looks good with no errors but when I boot the ROM Magisk says it's not installed.
I just realize to make magisk work on pie roms i realize that i need dev miui firmware not stable miui firmware the file you need is named fw_santoni_miui_HM4XGlobal_8.9.20_3219de02e5_7.1.zip i not sure why stable firmware wont work on magisk.
i used OrangeFox Recovery Project R8.1 for recovery
1. install rom PixysOS 2.1 as normal (clean flash). Note: LineageOS 16.0 also works I have tested it
2. boot up os to make sure it that everything is working
3. then reboot back to recovery
4. flash firmware zip file named fw_santoni_miui_HM4XGlobal_8.9.20_3219de02e5_7.1
5. reboot to system making sure that it still boots in os
6. reboot back to recovery
7. flash magisk 17.2 beta i think magisk 17.1 also works
8. reboot up back to system
9. installl magisk manager apk
10. done
i just uplolad screenshot just to prove it
neijzen said:
I just realize to make magisk work on pie roms i realize that i need dev miui firmware not stable miui firmware the file you need is named fw_santoni_miui_HM4XGlobal_8.9.20_3219de02e5_7.1.zip i not sure why stable firmware wont work on magisk.
i used OrangeFox Recovery Project R8.1 for recovery
1. install rom PixysOS 2.1 as normal (clean flash). Note: LineageOS 16.0 also works I have tested it
2. boot up os to make sure it that everything is working
3. then reboot back to recovery
4. flash firmware zip file named fw_santoni_miui_HM4XGlobal_8.9.20_3219de02e5_7.1
5. reboot to system making sure that it still boots in os
6. reboot back to recovery
7. flash magisk 17.2 beta i think magisk 17.1 also works
8. reboot up back to system
9. installl magisk manager apk
10. done
i just uplolad screenshot just to prove it
Click to expand...
Click to collapse
Sounds like a plan! I'll try it out when I get home from work and let you know how it goes!
Trying asap.
Thanks
neijzen said:
I just realize to make magisk work on pie roms i realize that i need dev miui firmware not stable miui firmware the file you need is named fw_santoni_miui_HM4XGlobal_8.9.20_3219de02e5_7.1.zip i not sure why stable firmware wont work on magisk.
i used OrangeFox Recovery Project R8.1 for recovery
1. install rom PixysOS 2.1 as normal (clean flash). Note: LineageOS 16.0 also works I have tested it
2. boot up os to make sure it that everything is working
3. then reboot back to recovery
4. flash firmware zip file named fw_santoni_miui_HM4XGlobal_8.9.20_3219de02e5_7.1
5. reboot to system making sure that it still boots in os
6. reboot back to recovery
7. flash magisk 17.2 beta i think magisk 17.1 also works
8. reboot up back to system
9. installl magisk manager apk
10. done
i just uplolad screenshot just to prove it
Click to expand...
Click to collapse
This post right here works, thank you so much

Android 4.2 and 4.4 Mediatek bootloop after installing Magisk 18.1

Hello everybody.
I've read that 18.1 supports 4.2+ so I've tried to install in two MTK6589T devices I've. One running 4.2, the other running 4.4
CMW/TWRP gave an error mounting system, so I mounted system manually and it started flashing. Firstly it detected old root installed and disabled the old root. But when it tried to find the boot, installation was aborted because installator claims cannot find the boot on both phones.
Then I though, okay, lets reboot back to android, I will try to install a few days later, maybe its buggy now, but both phones cannot boot.
I can easily fix them by flashing rom again I guess, but I would like to know where's the issue and also post it for more people could face the same problem.
Any idea where's the problem/how to fix without rom reflashing? I've tried magisk uninstaller but after mounting system in recovery it is also giving error.
Thanks
UPDATE: For now, if no other solution is found, bootloop can be bypassed by dirty installing the rom again. But it has to be an easier workaround...
We know now that the problem is caused because of two factors merging:
1- Using Magisk.zip installer through custom recovery
2-In the case that the custom recovery CMW/TWRP installed in the phone is very old (for instance, CMW automade for MTK6589X or TWRP 2.5.0).
While installing, Magisk tries to send commands to the custom recovery that cant be understood by it, leaving the installation incomplete after some modifications in /system (read below recovery log).
Acording to the recovery, it seems that Magisk did some modifications without running correctly survival script - Adding addon.d survival script ("Unrecognized option '-Xnodex2oat'") and .zip installer is not designed to revert actions in this case.
Also, Magisk couldn't reach the boot modification step, so boot is not damaged, therefore workarounds for restoring boot won't work.
Using Magisk Unistaller.zip is also not possible as the uninstaller is mainly designed for boot backup restoration, and again, this is not the case.
Currently needed: Find what's wrong in system due to the incomplete Magisk installation to revert it back to the original state (before faulty magisk.zip installation).
Recovery log:
************************
* Magisk v18.1 Installer
************************
- Mounting /system, /vendor
- Target image: /dev/bootimg
- Device platform: arm
- Removing system installed root
- Constructing environment
- Adding addon.d survival script
Unrecognized option '-Xnodex2oat'
up!
I' also having the same problem. My Samsung J2 Prime stuck at logo after updating to 18.1. Any tips on how to fix it without resetting my phone? Thanks.
Update: Bootloop fixed. I used TWRP to restore boot image. I then update Magisk by flashing zip file from TWRP. Everything went back to normal. Hope this help.
trol_sg said:
Hello everybody.
I've read that 18.1 supports 4.2+ so I've tried to install in two MTK6589T devices I've. One running 4.2, the other running 4.4
CMW/TWRP gave an error mounting system, so I mounted system manually and it started flashing. Firstly it detected old root installed and disabled the old root. But when it tried to find the boot, installation was aborted because installator claims cannot find the boot on both phones.
Then I though, okay, lets reboot back to android, I will try to install a few days later, maybe its buggy now, but both phones cannot boot.
I can easily fix them by flashing rom again I guess, but I would like to know where's the issue and also post it for more people could face the same problem.
Any idea where's the problem/how to fix without rom reflashing? I've tried magisk uninstaller but after mounting system in recovery it is also giving error.
Thanks
Click to expand...
Click to collapse
If you have a backup of your boot image, you can just restore it using TWRP. But in case that you have no backup of boot image, you can try to get boot image from the internet and restoring using it. In my case, this is what I did.
1. Go to TWRP and then make backup of boot image of the faulty phone*. (Folder 1)
2. I used another J2 prime to create a boot image backup. (Folder 2)
3. Once that is done, copy and replace the files inside the Folder 2 into Folder 1.
4. Reboot to TWRP again then use that to restore the boot image on my stuck J2.
Tips: make backup in SD card so you can easily swap it in between the bad and good phone.
*This is to create a folder of the backup file. I did tried to directly copy and paste the backup boot image file from another good phone but TWRP didn't detect it. So this is the workaround that I come with. And it worked for me.
Thanks for your answer but I doubt your case is mine. Your device is much newer than mine and according to your comment, you've sucesfully installed previous version of Magisk without issues. This is not a problem while updating, as Magisk v. earlier than 18.1 was not compatible with android 4.2+. I think Magisk is not compatible with MT6589T even if they run 4.2 or 4.4.
I think that it cannot be a boot problem as TWRP/CWM displayed msg 'Boot cannot be found' while installing Magisk, so that I don't think boot was replaced or modified in any ways. Moreover, the bootloop is not in the boot loading, as phone can pass boot image without any problem, but it is stuck in android loading image. I'm thinking in some script or root modification that Magisk did before trying to unpack the boot, however I'm not that deep into the Magisk install to find the proper workaround.
I can restore boot backup and also I can take boot file from the original rom and flash, because in Mediatek-based devices, boot.img is inside de zip, but I dont think it will solve the problem. Anyhow I'll get back ASAP with the answer.
Any more ideas??
Nothing, boot/uboot restoration or flashing again just the boot won't fix the problem, so it's something that Magisk installator touch in /system or /data I guess, but what?
trol_sg said:
Nothing, boot/uboot restoration or flashing again just the boot won't fix the problem, so it's something that Magisk installator touch in /system or /data I guess, but what?
Click to expand...
Click to collapse
Have you read/tried this?
didgeridoohan(dot)com/magisk/MagiskIssues
Ato09 said:
Have you read/tried this?
didgeridoohan(dot)com/magisk/MagiskIssues
Click to expand...
Click to collapse
Yes, I've read them before I made the post. I've also looked for a solution in some of the threads and using search, but couldn't find a way.
Here I attach recovery.log if someone is interested to see the detailed problem.
Also, here below I attach the lines concerning the installation. All other is uninstallation tries and so on:
************************
* Magisk v18.1 Installer
************************
- Mounting /system, /vendor
- Target image: /dev/bootimg
- Device platform: arm
- Removing system installed root
- Constructing environment
- Adding addon.d survival script
Unrecognized option '-Xnodex2oat'
dalvikvm: [options] class [argument ...]
dalvikvm: [options] -jar file.jar [argument ...]
The following standard options are recognized:
-classpath classpath
-Dproperty=value
-verbose:tag ('gc', 'jni', or 'class')
-ea[:<package name>... |:<class name>]
-da[:<package name>... |:<class name>]
(-enableassertions, -disableassertions)
-esa
-dsa
(-enablesystemassertions, -disablesystemassertions)
-showversion
-help
The following extended options are recognized:
-Xrunjdwp:<options>
-Xbootclasspath:bootclasspath
-Xcheck:tag (e.g. 'jni')
-XmsN (min heap, must be multiple of 1K, >= 1MB)
-XmxN (max heap, must be multiple of 1K, >= 2MB)
-XssN (stack size, >= 1KB, <= 256KB)
-Xverify:{none,remote,all}
-Xrs
-Xint (extended to accept 'ortable', ':fast' and ':jit')
These are unique to Dalvik:
-Xzygote
-Xdexopt:{none,verified,all,full}
-Xnoquithandler
-Xjniopts:{warnonly,forcecopy}
-Xjnitrace:substring (eg NativeClass or nativeMethod)
-Xstacktracefile:<filename>
-Xgc:[no]precise
-Xgc:[no]preverify
-Xgc:[no]postverify
-Xgc:[no]concurrent
-Xgc:[no]verifycardtable
-XX:+DisableExplicitGC
-X[no]genregmap
-Xverifyopt:[no]checkmon
-Xcheckdexsum
-Xincludeselectedop
-Xjitop:hexopvalue[-endvalue][,hexopvalue[-endvalue]]*
-Xincludeselectedmethod
-Xjitthreshold:decimalvalue
-Xjitcodecachesize:decimalvalueofkbytes
-Xjitblocking
-Xjitmethod:signature[,signature]* (eg Ljava/lang/String\;replace)
-Xjitclass:classname[,classname]*
-Xjitoffsetffset[,offset]
-Xjitconfig:filename
-Xjitcheckcg
-Xjitverbose
-Xjitprofile
-Xjitdisableopt
-Xjitsuspendpoll
Configured with: debugger profiler hprof jit(armv7-a-neon) smp show_exception=1
Failed to initialize runtime (check log for details)
- Unpacking boot image
MagiskBoot v18.1(18100) (by topjohnwu) - Boot Image Modification Tool
Parsing boot image: [/dev/bootimg]
No boot image magic found!
! Unable to unpack boot image
- Unmounting partitions
E:Error executing updater binary in zip '/sdcard/Magisk-v18.1.zip'
Error flashing zip '/sdcard/Magisk-v18.1.zip'
@trol_sg I'm gonna guess it's got to do with the absolutely ancient TWRP you're using. It just can't handle everything that the Magisk installation script is trying to do...
Your best bet (if Magisk will work at all on your device) is to patch the boot image with the Magisk Manager and then flash the patched image manually. There are new and shiny installation instructions available here: https://topjohnwu.github.io/Magisk/
Didgeridoohan said:
@trol_sg I'm gonna guess it's got to do with the absolutely ancient TWRP you're using. It just can't handle everything that the Magisk installation script is trying to do...
Your best bet (if Magisk will work at all on your device) is to patch the boot image with the Magisk Manager and then flash the patched image manually. There are new and shiny installation instructions available here: https://topjohnwu.github.io/Magisk/
Click to expand...
Click to collapse
Thank you so much for your answer. So it's the recovery, but can't find newer ones, sadly. Too old phones I know, but just curious if I could make Magisk working on them, lol.
I was going into the boot modification manually right now, but in order to patch the boot I need manager installed first, and phone couldn't boot so I did dirty flash of the rom to be able to boot into it again.
Lets see what happens then. I'll be right back.
Anyhow, this is not a solution to fix the problem of bootloop that I am requesting help in case someone could face the same and did not make a backup of the phone and didn't want to make dirty re-flash. Any idea?
Update: After I did dirty flash of the rom, and now Jiayu g3s android 4.4 booted.
UPDATE: So, after patching manually boot and installing (using restore in TWRP 2.5 as image flash is not yet implemented AFAIK), phone booted and yes Magisk is working.
Magisk installation .zip through a very old recovery is making the bootloop. So that, a thing learnt now.
But, for other people facing this bootloop, can we do a research to find what magisk.zip did to the phones to leave them in bootloop? Maybe we can revert without rom flashing easily if we knew what's the issue...
Thanks in advance!
Doing a bit more tests I found that magisk.zip did something in /system so that it is left in bootloop, but still no idea why/whats causing that...
There are delay complete boot like 4 5 second in j7 prime. I didn't love this version
any more help?? up!!
trol_sg said:
Yes, I've read them before I made the post. I've also looked for a solution in some of the threads and using search, but couldn't find a way.
Click to expand...
Click to collapse
Try this.
Quote:
Originally Posted by void74
I faced this problem too this morning.
I have a Redmi Note 5 with AOSiP ROM, I don't know if it's the right way to do it, but I solved the bootloop problem this way:
- volume up and then boot to TWRP
- copied magisk uninstall to phone memory
- installed magisk uninstall
- rebooted in fastboot/bootloader mode
- flashed original boot.img extracted from stock image zip file ("fastboot flash boot boot.img")
- rebooted to TWRP
- installed magisk 17.0 zip file
- rebooted to system, all OK!
Only problem is that I lost previous magisk configuration, but it's a snap to reconfigure it!
Quote:
Originally Posted by Mangraviti
Here is what to do, if you HAVE NOT installed the new version:
1) Do not update via Magisk Manager.
2) Do not update via TWRP using the zip you can download via Magisk Manager.
3) Uninstall Magisk using Magisk uninstaller (ZIP).
4) Boot to Android.
5) Reboot to TWRP
6) Install V17 ZIP via TWRP and boot to Android.
If you HAVE INSTALLED and got a bootloop:
1) Download the uninstaller ZIP.
2) Enter TWRP during the bootloop.
3) Uninstall using the uninstaller ZIP.
4) Boot to Android.
5) Download V17.
6) Reboot to TWRP and flash the V17.
7) Boot to Android it it should be working.
-------------
Original post. https://forum.xda-developers.com/apps/magisk/bootloop-magisk-update-t3836904
Hope it help.
Ato09 said:
Try this.
Quote:
Originally Posted by void74
I faced this problem too this morning.
I have a Redmi Note 5 with AOSiP ROM, I don't know if it's the right way to do it, but I solved the bootloop problem this way:
- volume up and then boot to TWRP
- copied magisk uninstall to phone memory
- installed magisk uninstall
- rebooted in fastboot/bootloader mode
- flashed original boot.img extracted from stock image zip file ("fastboot flash boot boot.img")
- rebooted to TWRP
- installed magisk 17.0 zip file
- rebooted to system, all OK!
Only problem is that I lost previous magisk configuration, but it's a snap to reconfigure it!
Quote:
Originally Posted by Mangraviti
Here is what to do, if you HAVE NOT installed the new version:
1) Do not update via Magisk Manager.
2) Do not update via TWRP using the zip you can download via Magisk Manager.
3) Uninstall Magisk using Magisk uninstaller (ZIP).
4) Boot to Android.
5) Reboot to TWRP
6) Install V17 ZIP via TWRP and boot to Android.
If you HAVE INSTALLED and got a bootloop:
1) Download the uninstaller ZIP.
2) Enter TWRP during the bootloop.
3) Uninstall using the uninstaller ZIP.
4) Boot to Android.
5) Download V17.
6) Reboot to TWRP and flash the V17.
7) Boot to Android it it should be working.
-------------
Original post. https://forum.xda-developers.com/apps/magisk/bootloop-magisk-update-t3836904
Hope it help.
Click to expand...
Click to collapse
Hello, thanks
This method won't work in my case as in the step:
- installed magisk uninstall = gives error
Note 5 is much newer phone with a recent recovery TWRP that allows all Magisk.zips commands, but unluckyly not this case.
Also, this method is for wrong boot installation/damaged boot. In my case what Magisk damage is /system, not boot.
I wish it could be boot, because that is very easy to fix (flashing through fastboot/SP Flash tools in the case of MTK, recovering boot twrp "backup" even if you didn't make backup...) as you mentioned.
Hope someone have a great idea to revert system to origin, then we could post the solution for those who would like to install Magisk in 4.2+ old phones, and instead of doing boot flash manually, they try to flash magisk.zip and they got bootloop.
Main post updated with all thread information. Up!
Nothing?? Up!!
trol_sg said:
Hope someone have a great idea to revert system to origin, then we could post the solution for those who would like to install Magisk in 4.2+ old phones, and instead of doing boot flash manually, they try to flash magisk.zip and they got bootloop.
Click to expand...
Click to collapse
The only part of the Magisk installation that actually touches /system is if it installs the addon.d survival script. The log you posted earlier shows that it's trying to do this, for some reason, and failiing. I'd start looking there...

how downgrade sm-a605fn from android 10 to 9

Hello, I have a Samsung Galaxy A6+ with latest fw installed.
(italian version)
A605FNXXU7CUD4
The phone is totally useless after the update to android 10, it takes AGES to perform any action, even open the Camera or open a Message.
Already tried to wipe everything, hard reset, reinstall fw. Still useless.
Since I’d like to downgrade to Android 9 to have back a useful phone, I tried to install the latest Android 9 fw with Odin.
A605FNXXS5BTB1
But it fails, saying SW REV CHECK FAIL : [aboot] Fused 7 > Binary 5
What can I do?
Is there any chance to downgrade this phone?
Thank you
1. Unlock your bootloader.
2. Flash custom recovery for your device.
3. Go to custom recovery (TWRP) and flash any downloaded custom rom (for your device), GSI or save stock firmware as flashable zip with tool like ClassyKitchen.
4. Flash Magisk or RMM-bypass-v3 in TWRP to protect your bootloader from getting locked again.
Backup your personal data at first, of course.
nqnxev said:
1. Unlock your bootloader.
2. Flash custom recovery for your device.
3. Go to custom recovery (TWRP) and flash any downloaded custom rom (for your device), GSI or save stock firmware as flashable zip with tool like ClassyKitchen.
4. Flash Magisk or RMM-bypass-v3 in TWRP to protect your bootloader from getting locked again.
Backup your personal data at first, of course.
Click to expand...
Click to collapse
Almost done, but I can't find any custom rom available for download. Can someone help? Since wwith twrp I cannot install a stock rom. Thanks in advance.
I managed to flash a so called Ari's rom, but I think the phone is now bricked. It is on bootloop on the first screen of Samsung (with phone name and so on) and with SET WARRANTY BIT : KERNEL at top left. I think it is time to trash it or does someone have any hint? Thanks
Ecto1000 said:
I managed to flash a so called Ari's rom, but I think the phone is now bricked. It is on bootloop on the first screen of Samsung (with phone name and so on) and with SET WARRANTY BIT : KERNEL at top left. I think it is time to trash it or does someone have any hint? Thanks
Click to expand...
Click to collapse
I proposed three different options: custom rom, GSI (generic system image) or conversion stock firmware to flashable form. If there's no good custom rom for A6+, then don't worry - you can still try another options. Try playing with Generic System Images:
1. Flash your current stock firmware as usual in Odin.
2. Unlock bootloader and flash TWRP.
3. Go to TWRP.
4. Wipe partitions cache, dalvik, data, system (don't wipe vendor partition - it's needed).
5. Flash GSI image (recommended will be at first phhusson's AOSP (Android 9 or 10)) as "system image". You always need to choose and download "arm32_binder64" variant of img file.
6. Reboot to your new system.
Second option is to convert stock Android 9 firmware into flashable form.
1. Download ClassyKitchen tool.
2. Import downloaded Android 9 stock firmware (for your phone) into it and save it as flashable zip.
3. Go to TWRP.
4. Wipe cache, dalvik, data, system and vendor.
5. Flash your previously done zip with Android 9 as any other flashable zip in TWRP.
6. Flash Magisk or RMM-state-bypass-v3 in TWRP to prevent your bootloader from getting locked again.
7. Reboot.
I went for the second option, in Classykitchen I loaded the stock android 9 rom and selected
BUILD ZIP ROM (for recovery).
Then installed with TWRP following your wipe indications.
Success.
But when I went to install RMM-state-bypass-v3 I got the error impossile to mount /system.
So I rebooted twrp and before anything I manually mounted SYSTEM in twrp in the dedicated MOUNT menu, and I did everything again from wipe to install.
Is this procedure correct?
Success, success also for RMM-state-bypass-v3.
I rebooted but I'm again stuck in the same loop described in my previous reply.
When I selecr REBOOT in twrp, do I have to flag anything? For example System?
Regarding the first option, if I go there:
Releases · phhusson/treble_experimentations
Notes about tinkering with Android Project Treble. Contribute to phhusson/treble_experimentations development by creating an account on GitHub.
github.com
exactly which file do I have to download among ASSETS of any release?
Thank you very much
Ecto1000 said:
I went for the second option, in Classykitchen I loaded the stock android 9 rom and selected
BUILD ZIP ROM (for recovery).
Then installed with TWRP following your wipe indications.
Success.
But when I went to install RMM-state-bypass-v3 I got the error impossile to mount /system.
So I rebooted twrp and before anything I manually mounted SYSTEM in twrp in the dedicated MOUNT menu, and I did everything again from wipe to install.
Is this procedure correct?
Click to expand...
Click to collapse
Yes, it's correct. If RMM bypass or Magisk.zip was flashed without any errors in TWRP then everything is okay. Just reboot to system in TWRP after that - there is option to reboot directly to system. First boot always can take a bit longer than next boots.
Ecto1000 said:
exactly which file do I have to download among ASSETS of any release
Click to expand...
Click to collapse
You always need to get any "arm32_binder64" (always AB) image. Gapps or vanilla is just your choice. Just get Android 9 or 10 image and flash it as "system image" (but wipe at first partitions specified in my previous post - don't wipe only Vendor partition, because it contains important things). Android 12 GSI still aren't stable. Android 11 - maybe will work properly. Android 9 and 10 should work fine. There is even short article about GSI on Galaxy A6+ with some fixes for that device attached:
Samsung Galaxy A6 Plus (2018)
Notes about tinkering with Android Project Treble. Contribute to phhusson/treble_experimentations development by creating an account on GitHub.
github.com
You can try of course other GSI's as well:
Generic System Image (GSI) list
Notes about tinkering with Android Project Treble. Contribute to phhusson/treble_experimentations development by creating an account on GitHub.
github.com
Thank you very much, appreciated.
But something weird happens: I install the ROM with success. If then I try to install Magisk (or Rmm) it fails with error 7.
And twrp says No Os installed if I reboot.
But if I try to install Magisk after rebooting into twrp after installing the ROM it goes without errors.
But anyway I have the issues of No Os installed.
Ecto1000 said:
Thank you very much, appreciated.
But something weird happens: I install the ROM with success. If then I try to install Magisk (or Rmm) it fails with error 7.
And twrp says No Os installed if I reboot.
But if I try to install Magisk after rebooting into twrp after installing the ROM it goes without errors.
But anyway I have the issues of No Os installed.
Click to expand...
Click to collapse
You need to reboot to recovery after flashing new system, because just after flashing TWRP doesn't recognize it - that is why you see that "no OS installed". Just reboot your phone to recovery again (you have such option in TWRP). In case of GSI (except maybe CAOS, LineageOS Q/R mod) Magisk or RMM bypass is not needed.
Btw, in case of any problems with hardware support on GSI flash also that patch in TWRP (it may be needed to mount "Vendor" partition in TWRP before flashing that fixes):
Fixes.zip
drive.google.com
Thank you again for your help.
I already rebooted to recovery and twrp keeps saying NO OS.
I'm using twrp 3.5.2_10-0.
I'm starting to suspect that this behaviour is due to the fact that this version of twrp could be too much new and unstable for my phone.
So I'd like to install an older version of twrp with Odin, as explained here:
TWRP for SM-A605FN Samsung Galaxy A6+
How to Install TWRP 3.2.3-1 on Galaxy A6+ SM-A605FN Android 8.0.0 Oreo. Once you installed TWRP recovery on your Samsung Galaxy A6+ SM-A605FN, you can customize it, Rooting or installing custom ROM
www.recovery-mode.com
But I cannot manage to go into download mode again, even from REBOOT menu of twrp it doesn't work, I keep staying in the loop explained before.
Moreover your first option of GSI need me to go into download mode to install the latest stock ROM with Odin.
I just manage to get into the attached screen.
Any idea?
Thank you again
It's not possible to ignore that message and just flash latest stock firmware via Odin? Odin refuses flashing latest stock firmware?
Other builds of TWRP for your devices you'll find here:
Releases · roynatech2544/TWRP_device_samsung_a6plte
Contribute to roynatech2544/TWRP_device_samsung_a6plte development by creating an account on GitHub.
github.com
But don't use TWRP older than 3.4.0, because it doesn't have support for "Vendor" partition.
Yes, I managed to ignore that screen and go in download mode again.
I tried to follow your first option since the second one was not successful.
Installed latest stock and then twrp 3.5.0-1.
Wipe as you explained, I flash the Gsi
system-quack-arm32_binder64-ab-gapps.img
The flash is very fast, but no errors, is it normal?
After that I reboot to recovery in order to flash
Disable_DM-Verity_ForceEncrypt_11.02.2020
it goes but just at the end it gives the error
failed to mount /odm no such file or directory.
And if I reboot to system the phone loops as always.
I'm losing all hope...
Ecto1000 said:
system-quack-arm32_binder64-ab-gapps.img
Click to expand...
Click to collapse
It's okay, but it's possible that you'll always need "vndklite" images for working camera.
Ecto1000 said:
The flash is very fast, but no errors, is it normal?
Click to expand...
Click to collapse
If you flashed it as "System Image" and it was successful then yes - should be fine. DM-Verity isn't needed for GSI - only RMM bypass v3 is sometimes needed (on CAOS, Lineage Q/R mod and maybe in case of some other images). On usual A600FN RMM bypass is not needed on phhusson AOSP. Just format "Data" partition (format, not only wipe) - it will remove encryption for you.
Procedure of flashing should be like that:
1. Wipe: cache, dalvik, data, system ("Vendor" partition leave untouched, because it's important for GSI - that is why you needed to flash stock firmware at first, because it adds vendor files for your phone, but it's needed only once, just don't wipe "Vendor").
2. Flash your GSI as "System Image".
3. Reboot phone (to recovery again).
4. Mount your "data", "vendor" and "system" partition.
5. Flash your zips: RMM bypass v3 (optionally Magisk).
5. Reboot to your new system now.
In case of any hardware support problems, reboot to TWRP again, mount "Vendor" partition and flash that fixes:
Fixes.zip
drive.google.com
Try to boot Android 10 or Android 9 images. If it will succeed, then you can try flashing Android 11 images and check what works, and what not. According to that article
nqnxev said:
It's okay, but it's possible that you'll always need "vndklite" images for working camera.
Click to expand...
Click to collapse
I don't know what are those images. Can you explain better?
When I proceed with RMM bypass V3 I see the errors in the attached image. It seems like there is a problem in writing to /system.
Can this be related to the hardware support problems you mentioned?
I tried with different versions of Twrp already and with Havoc Os too.
Should I try with flashing a different ROM ?
Thanks again
Ecto1000 said:
I don't know what are those images. Can you explain better?
Click to expand...
Click to collapse
Just look at filename of system images. But as I see, it's apparently important on Android 11 and newer. For now, try to boot Android 10 or 9. Let's try with that image:
https://github.com/phhusson/treble_experimentations/releases/download/v222/system-quack-arm32_binder64-ab-vanilla.img.xz
1. Decompress that image.
2. Copy to SD card or to internal storage.
3. Wipe cache, dalvik, data, system.
4. Format data partition (it's needed only once).
5. Flash downloaded and extracted file as "System Image".
6. Reboot phone to recovery (again).
7. Select in TWRP: Mount -> system, data, vendor.
8. Flash RMM bypass v3 (or Magisk).
9. Reboot now to system.
10. In case of some things not working, go back to TWRP and mount vendor partition (Mount -> tick "Vendor" -> go back to flashing zips) and flash that:
Fixes.zip
drive.google.com
11. Reboot to system again and check if now everything works properly.
Ecto1000 said:
When I proceed with RMM bypass V3 I see the errors in the attached image. It seems like there is a problem in writing to /system.
Click to expand...
Click to collapse
Yes, because you need to mount that partitions in TWRP:
Mount -> tick "system", "vendor" and "data" - and now flash whatever you want.
The only "receipt" which isn't giving installation errors is following your last instructions but avoiding to reboot to recovery after ROM flash (used Vanilla), and using Magisk v22 with unticked the line called "skip digest check" . See attached images.
Anyway, still no success to get into android.
Also tried fixes.zip.
Maybe I have to try with sideload ?
Ecto1000 said:
The only "receipt" which isn't giving installation errors is following your last instructions but avoiding to reboot to recovery after ROM flash (used Vanilla), and using Magisk v22 with unticked the line called "skip digest check" . See attached images.
Anyway, still no success to get into android.
Also tried fixes.zip.
Click to expand...
Click to collapse
Everything seems to be okay in your photos. What happens when you press "Reboot System"?
nqnxev said:
Everything seems to be okay in your photos. What happens when you press "Reboot System"?
Click to expand...
Click to collapse
The phone goes into loop with the attached screen and black screen alternatively.
On the top you can see SET WARRANTY BIT: KERNEL, it should be normal right?
Do I have to set something inside MOUNT of twrp before rebooting to system?
Ecto1000 said:
The phone goes into loop with the attached screen and black screen alternatively.
On the top you can see SET WARRANTY BIT: KERNEL, it should be normal right?
Do I have to set something inside MOUNT of twrp before rebooting to system?
Click to expand...
Click to collapse
I've never had such problem, but according to that thread it seems that it's a fault of modified kernel (so don't flash Magisk with GSI, because it patches kernel).
Try to flash stock firmware, unlock bootloader, flash TWRP, format "data" partition, wipe partitions (cache, dalvik, system, data) and flash GSI image as "system image". And reboot to system.
Don't flash RMM and Magisk for now - and check if system will run properly.

Categories

Resources