Guide to fixing x2 lockscreen crash - LeEco Le Max 2 Guides, News, & Discussion

Heyyo, update on the lockscreen crashing bug! I figured out the REAL culprit!
Backup EVERYTHING important off of your device, as this WILL completely wipe your userdata (internal storage).
(optional) Remove the lockscreen security from the system and then create a TWRP backup of data.
Reboot to boot loader
Please ensure you have adb and fastboot installed on your PC's OS.
fastboot format -w userdata
Reboot to system
(optional) Reboot to recovery and in Settings enable "Use rm -rf instead of formatting" and restore a TWRP data backup.
Setup lockscreen security and reboot a lot of times and see if it works ok and then report back your results.
If you wish, you can then change device firmware via TWRP installation with one of these:
https://sourceforge.net/projects/lineageos-for-x2/files/Firmware Updates/
You can also change splash screen to something like the official LeEco ones via TWRP installation with one of these:
https://sourceforge.net/projects/lineageos-for-x2/files/Mods and Tweaks/
NOTES:
please use the official platform tools for Android adb and fastboot from here:
https://developer.android.com/studio/releases/platform-tools
I think the issue could be stemming from TWRP and the broken format function from the encryption footer days... Which could also explain why only some users who did format data were affected by this bug.
I know this fix has worked for both myself and lanciaogden
https://forum.xda-developers.com/showpost.php?p=79280116&postcount=652
Revisions:
Apr7, 2019 - switched to just fastboot format command since it turns out that's the real fix, no need for fastboot EUI ROM
Apr9, 2019 - added optional step to restore TWRP data backup
Apr11, 2019 - removed TWRP install step
Apr25, 2019 - droped "-u" from format instructions as older versions of fastboot doesn't seem to have it
Sept6, 2019 - added recommended version of platform tools for adb and fastboot from Google
Jan 30, 2022 - added removal of lockscreen security before creating a TWRP backup in that optional step

Works! Great job @ThE_MarD

Heyyo @kanagawaben , Yay! Bro I'm super glad it works for you too! Looks like we can put this nightmare of a bug in the past! :good:
pallavjparikh from X2 Telegram and Jorge from zl1 Telegram groups both confirmed it works for them too!

Amazing job @ThE_MarD , it worked for me as well!
My fastboot didn't know "-u" parameter, was it a typo?
I can also confirm it is possible to do it without having to do a fresh OS install. I copied Internal Storage files to a PC and made TWRP backup of Data partition and moved it to PC as well. After fastboot format -w userdata I did a another format inside TWRP to get my data partition back to f2fs I was using earlier. Then used TWRP to restore Data partition and copied back files that were in Internal Storage. Everything is as it was before, minus the dreaded lockscreen bug!
Can someone confirm we can get back to using hardware encryption now, without loosing all data after a lockscreen crash?

mjoach said:
Amazing job @ThE_MarD , it worked for me as well!
My fastboot didn't know "-u" parameter, was it a typo?
I can also confirm it is possible to do it without having to do a fresh OS install. I copied Internal Storage files to a PC and made TWRP backup of Data partition and moved it to PC as well. After fastboot format -w userdata I did a another format inside TWRP to get my data partition back to f2fs I was using earlier. Then used TWRP to restore Data partition and copied back files that were in Internal Storage. Everything is as it was before, minus the dreaded lockscreen bug!
Can someone confirm we can get back to using hardware encryption now, without loosing all data after a lockscreen crash?
Click to expand...
Click to collapse
Heyyo, indeed it works perfectly fine (please ensure you're using the provided TWRP version from the first post to be safe though). I've been encrypted, rebooted 20 times, changed firmware to x820 30s, rebooted another 10 times fine... then I formatted data with that TWRP 3.3.0 version from first post, encrypted again and rebooted another 30 times fine.
I did observe that when testing Pie OP3 Open Beta blobs for DRM/SEE/Gatekeeper/Keystore though? Our current TWRP based on 8.1 with Oreo blobs cannot decrypt Pie blobs haha oops... so I guess before I release a LineageOS test build with pie OP3 blobs? I'll also release an updated TWRP Pie build. :silly:

hello, for some reason I can't do this
Code:
C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot format -u userdata
CreateProcess failed: Impossibile trovare il file specificato. (2)
error: Cannot generate image for userdata
Code:
C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot format -w userdata
CreateProcess failed: Impossibile trovare il file specificato. (2)
error: Cannot generate image for userdata

Thanks
Ths

Heyyo @mariosbbs , please use official adb and fastboot.
https://developer.android.com/studio/releases/platform-tools

Questions
@ThE_MarD what is the best firmwire for le max 2 ? shall i flash firmwire as normal zips in recovery?
is the lockscreen fix trick needs to apply every time i change rom/twrp?
is it a better idea to move to f2fs if rom supports?which partitions supports f2fs?
sorry for a lots of questions

Heyyo @nageswarswain ,
The best device firmware is a bit subjective... Some say 466D is the best, some say 30s. I haven't really noticed much difference, so as long as your device firmware is 19s or newer? You're fine. Technically though, 466D is the latest as the time stamp is a newer date than 30s.
This lockscreen fix should only be a one-time thing. The cause seems to have been a faulty build of TWRP from a while back. I've formatted data on my x2 with the latest official TWRP and have not encountered the lockscreen crash bug.
F2fs tbh on kernel 3.18 isn't super great, as it suffers from long term performance degradation. I'd still recommend sticking with ext4. At most, maybe cache as f2fs since it isn't long term storage, but that's as far as I've gone on x2.

Related

Can't get back to Stock ROM (what am I doing wrong?)

History of what I did:
I first installed the first small OTA Update to 4.5.1 then unlocked the Bootloader and flashed TWRP v46 from xdvs23. And made a full TWRP Backup and flashed Magisk afterwards.
Everything worked fine until I debloated the System and wanted to make the OTA Update to 4.5.2 (1,5 GB), which didn't work. After I flashed it, the phone didnt boot anymore. So I restored the TWRP Backup, which doesn't work either.
Current status:
TWRP v58 is flashed and works. I can flash ExcperienceOS from Jamal, which works fine, too. But flashing the OTA file doesn't work and restoring my backup wont work either -_-
I would really appreciate help to get back to an OTA updatable version of OxygenOS!
If you still have the TWRP installed I would download the full 4.5.2 zip (Listed elsewhere on these forums) and use adb sideload to install it, then proceed again from there.
djsubterrain said:
If you still have the TWRP installed I would download the full 4.5.2 zip (Listed elsewhere on these forums) and use adb sideload to install it, then proceed again from there.
Click to expand...
Click to collapse
I did that several times. It doesn't work sadly... I get into a bootloop
You didn't erase your userdata partition by mistake did you? You could try going into fastboot mode and use the command:
fastboot format userdata
Obviously this will wipe the userdata partition but the phone is acting like there's no userdata partition anyway
djsubterrain said:
You didn't erase your userdata partition by mistake did you? You could try going into fastboot mode and use the command:
fastboot format userdata
Obviously this will wipe the userdata partition but the phone is acting like there's no userdata partition anyway
Click to expand...
Click to collapse
I might have, I will try that, thanks
Or just wipe everything, flash stock recovery, and flash Full OxygenOS zip.
https://forum.xda-developers.com/showpost.php?p=72799046&postcount=2
I formated the userdata and flashed the .zip from the link, but I still get a bootloop...
I still don't understand what I am doing wrong...
How about trying to wipe everything from wipe menu except internal storage and then flash the oos zip followed by lazy flasher zip from here - bit.ly/lazyflasher
If this doesn't work then try changing to a different version of TWRP!
Casual_Max said:
I formated the userdata and flashed the .zip from the link, but I still get a bootloop...
I still don't understand what I am doing wrong...
Click to expand...
Click to collapse
You didn't do these steps wrong by any chance?
Steps To Disable Forced Encryption i.e, Decrypt Data
1. At first time when you open twrp, it will ask you to allow system modification.
2. Allow it and then flash the no-verity-opt-encrypt.zip file .
3. Then Go to Wipe-->Format Data.
4. Type Yes to confirm wiping of Internal Storage.
5. Now you have decrypted the data sucessfully.
Note: Dont try to restore the nanodroid backup which you have taken before. It may end in bootloop.
Click to expand...
Click to collapse
From here:
https://forum.xda-developers.com/on...der-intall-t3626122/post72777899#post72777899
ok, there I see what caused my first bootloop. Thanks
But why doesn't flashing the Stock ROM .ZIP work on an wiped (fastboot format userdata) phone? What else do I have to do?
EDIT:
*** solved ***
I failed hard. Luckily the OnePlus Support is excellent and was able to fix my issue with a remote session using their official tools. The Phone and I are both happy again.
Thanks for all the help, though. I learned quite a lot while dealing with this issue. It's a very kind and nice community here

Treble ROMs and flashing, on a Oneplus 6 (Treble A/B), my constant fight

First I have a One Plus 6 (so Treble A/B) configuration, been using it since 5.1.5 (as I bought it the first day)
TWRP 2.3.3.0 currently being used.
Note as stated the partitions are decrypted, AKA no need to decrypt when entering TWRP.
1. The foremost issue I have is that flashing a new pair of system's system_a, system_b should not result in being unable to boot every time (now I have decrypted internal storage so that is not what is the cause of the failures), there is simply no chance of upgrading when encrypted which I can understand.
2. Re-flashing the previous working System_a and System_b should boot even if the newer flash failed (assuming you clear cache), it will not do so.
3. Restoring TWRP (system and data) should also work, to restore a working state (heck as nothing here has touched data, but restoring it anyways to be safe) we should be able to simply restore system (again it will not boot after restore). Simply put restoring system via TWRP seems nearly impossible.
4. I've never seen this device boot after installing TWRP to the system partition using custom ROM, (I got it to work once and only once with Oxygen), so the only way to safely boot twrp is via fastboot.
Basically on my OnePlus 6 the only way I can update from v1 to v2 say for a monthly security update is to wipe restore the phone to the default OS (Oxygen in this case), this destroys all Data, then flash my way back to the custom ROM. In my case normally this means re-flashing system_a and system_b, formatting data (again), flashing no encrypt, then magisk and finally restoring backups made in Titanium Backup (zip's), this takes me hours and is not something one can just do.
While at it all Treble instructions say flash system_a and system_b , but upgrading from v1 to v2 should only require updating the system currently in not use (say system_b if booting from system_a) and clearing data then switching to system_b as the boot from TWRP. If the boot fails on upgrade I should then simple be able to switch back to booting from system_a, clear cache and boot as if nothing changed, why is this nor supported or even commented on? Is this not the reasoning behind treble?
Basically I think Treble has much promise, but at least my experience with the Oneplus 6 is that is it is not safe for use, far too often I simply find I have no way to upgrade to even restore the phone on failure (a computer which is what a phone is) without a restore-able backup is untrustworthy, and not even being able to flash TWRP makes it worse (or would if TWRP backups actually worked).
This post is the result of 3 months of fighting with the phone and Treble and trying many different ways to ensure clean upgrades and backups all without any success. Simply put I'm tried and unable to come up with a valid method which works with this phone and Treble to allow for upgrades (for security fixes, something I've done for years prior to Treble without issue) or even backups I can safely restore using TWRP.
Thanks,
ERIC
I have the same issues. I also did another mistake and updated to pie beta 3. Now everytime I do something wrong, it goes directly to qualcomm crash dump mode and to be able to revert it back, I need to flash all partitions from fastboot once again to make it work... I don't like A/B partitions... It seems to cause more issues than what it offers.
twrp restore
I am having the same issues you described also when simply restoring from TWRP, even if I have been thinkering with my phones for a while.
Do you have any suggestion about restoring?
Thank you
Fabio

[KERNEL][RECOVERY][LOS15.1] F2FS upstreamed Kernel + TWRP for Lineage 15.1

WARNING: I am not responsible if you brick your device or lose any data. I personally heavely tested these releases myself and have not encountered any problems.
These are built on official sources and nothing more should be broken but remember to always make backups before installing any mods, kernels etc.!
You should read everything I wrote in this thread before taking any steps unless you know exactly what are doing.
About:
Okay, so I was tired of almost not usable Magisk on official builds because of outdated Moto F2FS implementation, so I built new LOS15.1 kernel and Treble-compatible TWRP with newer version of it for myself and I want to share this with you.
You may ask why I did it and what does it change, so here's the list of features:
This combo may be solution for smooth transition from 15.1 --> 16 without losing data (Without this you will need to reformat your /data partition before flashing when the day of 16 comes - confirmed by Mike). I cannot say 100% that it give you this ability but I'm pretty sure it will!
This Kernel and TWRP applies to LineageOS 15.1, all LOS15.1-based ROMs (like RRemix) and all Treble GSI's.
F2FS loopback fix module is not needed anymore, you can directly install modules from Magisk Manager app.
Magisk modules are persistent now. They will never disappear, even when cache is cleared.
Magisk hide settings are persistent now. They will not reset after reboot.
You can now use systemless hosts properly (No ads and SafetyNet is still passing!).
Filesystem R/W speeds may and should be slightly better (I haven't tested this myself so feel free to do before-after benchmark comparisions).
Don't need to start from zero. You can restore your /data backup after formatting device and it will work just fine.
TWRP is updated to version 3.2.3-0 so it may fix OTA's on "enter pin to boot" encrypted devices.
In TWRP there's written "Lineage" next to it's version to avoid confusion, especially for newbs (Lineage because everyone's talking about LOS TWRP and it's also built on Lineage source)
"Format Data" button in "Wipe" screen is temporarily removed until I/we find fix to make it work. This feature is still broken and causing bootloops (Like on TWRP from LOS Wiki). You still need to use official one for decryption.
That's all I think. I will edit this thread If missed something.
Instructions:
* This instruction applies to new and existing LOS-based ROMs users *
* This tutorial I wrote for someone may be useful if you need help with bootloader mode(fastboot) *
Important: If you don't care about porting your /data to newer F2FS (not talking about Internal data) and willing to start from "zero" then you just should typical LOS installation steps + changing kernel (Steps 1 - 8 and 14 eventually if you're going to restore some pictures or something)
1. Do /data partition and/or Internal Storage backups if you didn't already. Pull them to your computer or SD card.
2. Flash TWRP 3.2.3-0 Lineage build (lineagetwrp.img) from the download section using method you want (fastboot one is recommended).
3. Flash latest official build of LOS15.1 (If you have it already then you can skip this step).
4. Flash bootimage (f2fs_boot.img): Install > Install Image > f2fs_boot.img and check "Boot"
5. Download latest official TWRP from HERE
6. Boot to bootloader mode (fastboot) and use this command "fastboot boot [OFFICIAL_TWRP_IMAGE.img]" to boot into official TWRP without flashing it.
7. When in official TWRP: Wipe > Format Data > type "yes". If it fails then reboot to bootloader mode (Main menu > Reboot > Bootloader) and boot it once again as in point 3 (It happens very often).
8. If formatting went fine then go to: Reboot > Recovery to boot to recovery flashed before. After it boots just make sure that it says "3.2.3-0 Lineage" on top bar like in attachment screnshot
9. Wipe > Advanced Wipe > check "Data" > Repair or Change File System > Change File System > F2FS (This step is not really necessary but it confirms that everything is set up if no errors was throwed here).
10. Reboot to recovery and put your TWRP /data backup on your Internal Storage via PC - Skip if on SD card.
11. Restore your TWRP backup.
12. Don't exit yet if you haven't restored from SD card. There's a little bug(?) where your data from Internal Storage will stay in /data/media directory but MTP will switch to /data/media/0/ after first boot so you will be not able to see that data via PC. Make sure you've deleted these files before rebooting to system. You can do this after first start too but these files will extend encypting time at least twice.
13. Finally you can reboot. In case you were using any lockscreen when doing a backup you should check THIS
14. You can put back your internal storage data right when ROM successfully booted.
Download:
DOWNLOAD - 12.01.2019
Troubleshooting:
If you encounter any problems in any of these steps you will probably need to start from step 6.
Still not able to do this or messed something up very badly so u can't enter TWRP? Try entering bootloader mode and type "fastboot erase userdata", then proceed to step 6.
Remember: After doing an OTA you will need to flash "f2fs_boot.img" once again before booting into system. Else you will end in constant reboots until you do this. Kernel will be updated when some changes will be pushed into it (not often)
Any support for this will be probably instantly dropped after first stable enough release of LineageOS 16.
Have Fun!​
All thanks goes to @mikeioannina for commiting to kuntao sources which I used here.
Kernel source
Recovery source​
Thx, I was looking for this.
---------- Post added at 10:11 AM ---------- Previous post was at 09:20 AM ----------
I reread the whole article again and better to wait for lineage os 16 and fixes. I am fine with ext4 now. No need to mess with twrp and bootloops
Well, the most complicated flashing orgy so far...
Why making another kernel for putting just 1 commit that fixes f2fs? Recovery was needed because for treble we are still using 3.2.2-0, but kernel is useless, @mikeioannina could merge that commit in official lineage kernel.
mahmutpekkara said:
Thx, I was looking for this.
---------- Post added at 10:11 AM ---------- Previous post was at 09:20 AM ----------
I reread the whole article again and better to wait for lineage os 16 and fixes. I am fine with ext4 now. No need to mess with twrp and bootloops
Click to expand...
Click to collapse
There's almost no changes in that kernel compared to stock. The same for TWRP. The real difference between this procedure and re-installing LOS15.1 is installing the kernel file. Resetting lockscreen settings (because your pins will not work) was always the case when restorong nandroid backup.
If you're on ext4 then just stay on it. Not worth doing it in your case
RayDeemer said:
Well, the most complicated flashing orgy so far...
Click to expand...
Click to collapse
It's not that complicated even if it looks like that. It's very detailed, step by step comparing to typical flashing instructions. I did this because I know that a lot of users from this forum have problems even with simple things. Like I said before: the only difference between this and reinstalling ROM with restoring /data partition is flashing boot.img. Not my fault that this treble TWRP formatting feature is broken and nandroid backups are breaking login when PIN is set.
matteo0026 said:
Why making another kernel for putting just 1 commit that fixes f2fs? Recovery was needed because for treble we are still using 3.2.2-0, but kernel is useless, @mikeioannina could merge that commit in official lineage kernel.
Click to expand...
Click to collapse
This will not gonna happen and that's why I compiled it myself. He reverted this change before it came live and I just readded it (https://github.com/LineageOS/androi...it/48c639c3581eb04693ae0771d8e85ce1151550b4).
You will probably find his post around page 50 of LOS thread about that.
He said that he will be not push this change to build since it will break LOS14 -> LOS15.1 transition when doing an OTA (user data will be corrupted if I remember correctly).
If you wondered why this tutorial is long and "complicated" like people said before then as you can see it turns out that data transition could be done with simply doing nandroid backup and then restoring it. These step are 90% of this tutorial due to bugs which are in lineage TWRP and "bugs" because that TWRP is backing up ROM with lockscreen settings which are breaking every time when restoring from backup. Also removing backup data step is necessary because these files will slow down encryption and will be not placed in /sdcard so people will forget about it probably and wonder what is eating so much space.
EDIT: I forgot to add that Mike refused my opinion about this but at the end you will still need to format your data anyway when going from 15.1 to 16. This kernel with TWRP may be solution for smooth transition to 16.
Kielbek said:
This will not gonna happen and that's why I compiled it myself. He reverted this change before it came live and I just readded it (https://github.com/LineageOS/androi...it/48c639c3581eb04693ae0771d8e85ce1151550b4).
You will probably find his post around page 50 of LOS thread about that.
He said that he will be not push this change to build since it will break LOS14 -> LOS15.1 transition when doing an OTA (user data will be corrupted if I remember correctly).
If you wondered why this tutorial is long and "complicated" like people said before then as you can see it turns out that data transition could be done with simply doing nandroid backup and then restoring it. These step are 90% of this tutorial due to bugs which are in lineage TWRP and "bugs" because that TWRP is backing up ROM with lockscreen settings which are breaking every time when restoring from backup. Also removing backup data step is necessary because these files will slow down encryption and will be not placed in /sdcard so people will forget about it probably and wonder what is eating so much space.
Click to expand...
Click to collapse
Ok, I understand. I think that some things in lineage wiki for p2 must be more clear. Starting from the guide for going from stock ROM to lineage 15.1...
matteo0026 said:
Ok, I understand. I think that some things in lineage wiki for p2 must be more clear. Starting from the guide for going from stock ROM to lineage 15.1...
Click to expand...
Click to collapse
Yeah, wiki instructions are a big mess. You actually need to perform most of steps I've written and described here if coming from another ROM (Steps 1 - 8) and you can do this few different ways
Maybe I will shorten this tutorial by fixing some aspects of TWRP and then request it to be included in the wiki so it will be easier for everyone.
Kielbek said:
Yeah, wiki instructions are a big mess. You actually need to perform most of steps I've written and described here if coming from another ROM (Steps 1 - 8) and you can do this few different ways
Maybe I will shorten this tutorial by fixing some aspects of TWRP and then request it to be included in the wiki so it will be easier for everyone.
Click to expand...
Click to collapse
Yes, for example for going from stock to los15.1 the right steps are:
- unlock bootloader and install official twrp 3.2.3-0
- (in case, do a backup)
- wipe system, data, cache and dalvik
- format data in ext4 (with official kernel, with yours I think it's not needed)
- install treble twrp
- wipe system, data, cache and dalvik another time
- install los15.1 (+ in case your kernel) + gapps and eventually addonsu or magisk
- reboot system
matteo0026 said:
Yes, for example for going from stock to los15.1 the right steps are:
- unlock bootloader and install official twrp 3.2.3-0
- (in case, do a backup)
- wipe system, data, cache and dalvik
- format data in ext4 (with official kernel, with yours I think it's not needed)
- install treble twrp
- wipe system, data, cache and dalvik another time
- install los15.1 (+ in case your kernel) + gapps and eventually addonsu or magisk
- reboot system
Click to expand...
Click to collapse
Yep, the only difference is that I suggest to use "fastboot boot recovery.img" with official twrp instead of flashing it directly to /recovery partition to prevent meaningless excessive data writing here. NAND will last for longer.
Kielbek said:
Yep, the only difference is that I suggest to use "fastboot boot recovery.img" with official twrp instead of flashing it directly to /recovery partition to prevent meaningless excessive data writing here. NAND will last for longer.
Click to expand...
Click to collapse
You are right, but I think NAND is not a problem, we are going to flash recovery maybe 10-20 times in all the device's life, no more
I am now on los15.1 with ext4 data partition which is encrypted. So can I direclty update recovery to this one or I need to do something else ?
Mrinmay Medhi said:
I am now on los15.1 with ext4 data partition which is encrypted. So can I direclty update recovery to this one or I need to do something else ?
Click to expand...
Click to collapse
Yes, of course you can directly update it. If you're on EXT4 it will work for you just fine like version from LOS wiki and maybe even better. Assuming to changelog this version fixes OTAs on encrypted devices. Only F2FS users need to reformat their data.
Hopefully when lineage os 16 released, treble twrp can format data properly, and decrypt/format/use right f2fs system...
mahmutpekkara said:
Hopefully when lineage os 16 released, treble twrp can format data properly, and decrypt/format/use right f2fs system...
Click to expand...
Click to collapse
There's no doubt that it will use newer F2FS version. Not sure about TWRP tho. Maybe I will look into it.
Kielbek said:
There's no doubt that it will use newer F2FS version. Not sure about TWRP tho. Maybe I will look into it.
Click to expand...
Click to collapse
Please do, we need one dedicated TWRP. Also thx again.:angel:
@Kielbek hi does it fix 1689mhz stuck speed bug?
Cuvillier said:
@Kielbek hi does it fix 1689mhz stuck speed bug?
Click to expand...
Click to collapse
What do you mean by this? I don't have such problems.
@Kielbek
How can we disable force encrypt from the kernel?

Disable [DM-Verity]/[Force Encryption] [OnePlus 3T/3] for [PIE] Oxygen OS

Oneplus has released the PIE Oxygen OS for Oneplus 3T and 3.
This thread is only for OOS PIE. For disabling Dm-Verity and force Encryption in NOUGAT OOS ROMs refer to my thread here:https://forum.xda-developers.com/oneplus-3t/how-to/rom-dm-verity-force-encryption-disabled-t3618232 and for OREO OOS refer to my thread here:https://forum.xda-developers.com/oneplus-3t/how-to/disable-dm-verity-force-encryption-op3t-t3688748
Disclaimer: I am not responsible for any damage or data loss that happens to your device on embarking this procedure. This is a just released version of OOS and so expect the unexpected. Back up all your data and valuables before you go on and don't blame me if you or your device commits suicide..
THE DETAILS....
After a thororugh initial analysis of the PIE installation zip file for Oneplus 3/3T, I found that there has not been much hell of a difference in the protection schema related to Dm-verity and force encryption. Hence most of the procedure remains the same...As mentioned this is relatively new build and probably existing Twrp may need upstream fixes or other changes to accommodate PIE related commits before encrypting, decrypting and flashing...I have no intention of flashing the PIE build unless it gets stable and have a lot of time to spare so that if things get rough i can dive into it..So its untested from my side but its ought to work same as before. ..
So in a nut shell, to disable DM-Verity you will need to flash the patched Boot Images and to disable force encryption you will have to flash the force encryption disabler zip - The links of which are provided below. Do refer to the correct procedure explained in detail before attempting to do anything...
For all those who need an in-depth reading of the nature of patching the fstab in dtb file and my work you can refer here:
https://forum.xda-developers.com/showpost.php?p=74326761&postcount=3
THIS METHOD WILL WORK FOR BOTH ONEPLUS 3 T AND ONEPLUS 3...
FOR THOSE WHO HAVE ALREADY TRIGGERED DM-VERITY ON OOS PIE FOLLOW THE STEPS IN POST 2 IN THIS THREAD TO GET RID OF DM-VERITY BEFORE PROCEEDING...
Nothing has been changed....
It is 100% stock boot image except that the DM-Verity Flag has been patched...
Links:
For ONEPLUS 3T
STABLE OOS Boot Images
Patched Boot Image Stable OOS 9.0.6
https://www.mediafire.com/file/mgdc7fga7ypemon/boot-patched-9.0.6-OP3T.img/file
Patched Boot Image Stable OOS 9.0.5
http://www.mediafire.com/file/xuea2pjk7iebo7y/boot-patched-9.0.5-OP3T.img/file
Patched Boot Image Stable OOS 9.0.4
http://www.mediafire.com/file/dzbe1djwlc24h0q/boot-patched-9.0.4-OP3T.img/file
Patched Boot Image Stable OOS 9.0.3
http://www.mediafire.com/file/432r3vew6786pga/boot-patched-9.0.3-OP3T.img/file
Patched Boot Image Stable OOS 9.0.2
https://www.mediafire.com/file/fj2offc35sa0zo7/boot-patched-9.0.2-OP3T.img/file
BETA OOS Boot Images
Patched Boot Image Beta OOS 9.0.1
http://www.mediafire.com/file/bf32s2mf2c7y66o/boot-patched-9.0.1-OP3T.img/file
Patched Boot Image Beta OOS 9.0
http://www.mediafire.com/file/kesaqq2q8dgi43p/boot-patched-9.0.0-OP3T.img/file
For OnePlus 3
STABLE OOS Boot Images
Patched Boot Image Stable OOS 9.0.6
http://www.mediafire.com/file/huxj64syp8l1o58/boot-patched-9.0.6-OP3.img/file
Patched Boot Image Stable OOS 9.0.5
http://www.mediafire.com/file/mkv6swi72pruafy/boot-patched-9.0.5-OP3.img/file
Patched Boot Image Stable OOS 9.0.4
http://www.mediafire.com/file/7d9k4nytqa7nqjv/boot-patched-9.0.4-OP3.img/file
Patched Boot Image Stable OOS 9.0.3
http://www.mediafire.com/file/z7dckvcztskes53/boot-patched-9.0.3-OP3.img/file
Patched Boot Image Stable OOS 9.0.2
http://www.mediafire.com/file/3rzae15wf25l72w/boot-patched-9.0.2-OP3.img/file
BETA OOS Boot Images
Patched Boot Image Beta OOS 9.0.1
http://www.mediafire.com/file/v36cxtcnao23bc3/boot-patched-9.0.1-OP3.img/file
Patched Boot Image Beta OOS 9.0
http://www.mediafire.com/file/a9gq8koevpra9bh/boot-patched-9.0.0-OP3.img/file
STEPS: This is applicable only to people who have their data currently ENCRYPTED and needs the procedure only for NOT TRIGGERING DM-VERITY
USAGE FOR STOCK OOS:
1. Flash the downloaded boot-patched.img file corresponding to the Model and OOS version in TWRP immediately after flashing the Stock ROM zip in TWRP before doing anything (even before restarting or applying any patches, root, kernels, etc.)
2. Restart back to TWRP Recovery.
3. Done.
4. Now do whatever you want like usual.. Flash root, kernel, mods or anything as usual
5. You dont have to worry about triggering DM-Verity again and any changes made to system via TWRP will not be reverted back..
The 2 Prodeures given below: This is applicable only to those people who needs the procedure for getting rid of FORCE ENCRYPTION AND PREVENT TRIGGERING DM-VERITY
PROCEDURE 1: This is applicable only to people who have their data currently NOT ENCRYPTED AND KEEP IT DECRYPTED
First of all Backup your data preferably to and usb otg or a PC for later restore. You may lose your data from your phone following this procedure...
1. Format SYSTEM, DALVIK, CACHE and then only Flash the Full Rom Pie OOS zip file in TWRP.
2. DON'T REBOOT
3. Flash the downloaded boot-patched.img file corresponding to the Model and OOS version in TWRP immediately after flashing the Stock ROM zip.
4. DON'T REBOOT TO SYSTEM
5. REBOOT TO TWRP.
6. In TWRP, MOUNT SYSTEM, GO TO ADVANCED > TERMINAL and Type "df system"(without quotes) and enter. The details of the system partition will be shown. Look at the Use% and Free Space. Make sure you have atleast 100MB free space in System before you go to the next step. If you don't have enough free space then mount system in TWRP, go to file manager and free some space in system by deleting some unwanted apps (in system/app folder like duo, google drive, hangouts,etc. which you can later reinstall via google play as it is not mandatory for them to run as system apps)...If there is low space on your system partition that fstab file flashing fails resulting in blank fstab file and you will end up in bootloop.
7. Once you have confirmed that you have atleast 100MB of free space left in system partition. REBOOT BACK TO TWRP.
8. Flash "Force Encryption Disabler For OOS Pie v1.zip" in TWRP.
9. Flash SuperSuSR5 / Magisk 18+
10. Done.
11. Reboot to System.
NB:f you have bootloop go back to TWRP by keep holding the power button to power off and powering on and rebooting to TWRP via the volume buttons, mount system, go to file manager and free some space in system by deleting some unwanted apps (in system/app folder like duo, google drive, hangouts,etc. which you can later reinstall via google play as it is not mandatory for them to run as system apps) and reflash the disabler zip and reboot..It is due to low space on your system partition that fstab file flashing fails resulting in blank fstab file. But if you followed Steps 6 and 7 carefully you wont end up here.
PROCEDURE 2: This is applicable only to people who have their data currently ENCRYPTED AND NEEDS TO GET IT DECRYPTED and PREVENT TRIGGERING DM-VERITY
First of all Backup your data preferably to and usb otg or a PC for later restore. You will lose your data from your phone following this procedure...
1. Go to Bootloader...
2. Connect to your PC..Type "fastboot format userdata" without quotes and press enter. (You will lose your data, do back up if you need something.)
3. Don't reboot to system...Using volume buttons select boot to recovery and Reboot to TWRP.....(Very Important)
4. Flash the downloaded boot-patched.img file corresponding to the Model and OOS version in TWRP immediately after flashing the Stock ROM zip.
5. DON'T REBOOT TO SYSTEM
6. REBOOT TO TWRP
7. In TWRP, MOUNT SYSTEM, GO TO ADVANCED > TERMINAL and Type "df system"(without quotes) and enter. The details of the system partition will be shown. Look at the Use% and Free Space. Make sure you have atleast 100MB free space in System before you go to the next step. If you don't have enough free space then mount system in TWRP, go to file manager and free some space in system by deleting some unwanted apps (in system/app folder like duo, google drive, hangouts,etc. which you can later reinstall via google play as it is not mandatory for them to run as system apps)...If there is low space on your system partition that fstab file flashing fails resulting in blank fstab file and you will end up in bootloop.
8. Once you have confirmed that you have atleast 100MB of free space left in system partition. REBOOT BACK TO TWRP.
9. Flash "Force Encryption Disabler For OOS Pie v1.zip" in TWRP.
10. Flash SuperSuSR5 / Magisk 18+
11. Done.
12. Reboot to System.
NB: If you have bootloop go back to TWRP by keep holding the power button to power off and powering on and rebooting to TWRP via the volume buttons, mount system, go to file manager and free some space in system by deleting some unwanted apps (in system/app folder like duo, google drive, hangouts,etc. which you can later reinstall via google play as it is not mandatory for them to run as system apps) and reflash the disabler zip and reboot..It is due to low space on your system partition that fstab file flashing fails resulting in blank fstab file. But if you followed Steps 7 and 8 carefully you won't end up here.
Rooting:
For Rooting use only SuperSu 2.82 SR5 or Magisk 18 or above seems to work for root...
FAQs:
Q: Is the boot.img file altered in anyway?
A: As mentioned above its 100% stock boot image except that the DM-Verity Flag has been patched in the device tree blobs (dtb)...
Q: My phone is already encrypted, will I lose encryption on flashing the zip?
A: No. It only disables force encryption. That means if you have already disabled encryption in your phone it will prevent the phone from getting encrypted when you flash a stock OOS ROM..
Q: I happen to lose TWRP and revert to stock recovery every time I update OOS, I happen to lose changes made to system via TWRP or lose data/apps accidentally while updating OOS...Can this be corrected by using this method?
A: Definitely. Follow the steps correctly. Each time while updating the OOS, after flashing the Full OOS ROM.zip, immediately flash the patched boot.img of the corresponding OOS given in this thread and then restart back to TWRP recovery. Done. You will never lose TWRP again..
Q: I am Rooting my phone using Magisk/Supersu then why do i need this?
A: Its optional.. If you are rooting phone using Magisk/Supersu it patches the stock boot.img. But in case you have problems flashing Magisk/Supersu after flashing the STOCK ROM zip this can come in handy or as an insurance policy just flash this patched boot.img before doing anything. But is very helpful to those people out there who doesn't root their phone but has unlocked their phone or installed TWRP for other purposes..
Q: How to flash the patched boot.img in TWRP?
A: Default flash option is for zip files in TWRP. Select the flash image option in TWRP. Then select the downloaded patched boot.img file and among from the partition option (boot, recovery and system) select the boot option and then flash it.
Q: What is "-Xn" seen after the OOS Version in the settings menu?
A: That's just my signature -Xn that I had put there to make sure that you have correctly done the procedure and the boot image that is currently in use is my patched boot image and to ensure you that you are 100% safe from DM verity...
Q: Where to find downloads and queries regarding the Stock OOS ROM and Beta OOS?
A: @Siddk007 has been maintaining Stock and Beta OOS threads were you can find relevant information.
Hope you find it useful...
Will update this OP as newer OOS versions come....
HIT THANKS IF I HELPED YOU. IT DOESN'T COST YOU ANYTHING, BUT IT MEANS A LOT TO ME...
AND IF YOU DO APPRECIATE MY WORK DONATIONS ARE ALWAYS WELCOME...
THIS IS FOR PEOPLE WHO HAVE TRIGGERED DM-VERITY AND NEEDS TO GET RID OF THE DM-VERITY MESSAGE PERMANENTLY ON OOS PIE ROMs. ...
THIS IS FOR ONEPLUS 3T AND FOR ONEPLUS 3 but be careful in using the correct files corresponding to the OOS version and your MODEL
READ ALL THE STEPS AND DOWNLOAD ALL REQUIRED FILES BEFORE PROCEEDING. FOLLOW THE STEPS EXACTLY AND 100% THE DM-VERITY MESSAGE WILL BE GONE WITHOUT ANY DATA LOSS OR ANY OTHER HARM!!!
Prerequisite : Install ADB for windows from here: [url]https://forum.xda-developers.com/showthread.php?t=2588979[/URL]
1)
Download 4.0.2 Firmware for Oneplus 3T from here: [url]http://www.mediafire.com/file/cx568em66025p5b/4.0.2_firmware_OnePlus_3T.zip[/URL]
Download 4.0.2 Firmware for Oneplus 3 from here: [url]http://www.mediafire.com/file/8tt5x4xxy4m488t/4.0.2_firmware_OnePlus3.zip[/URL]
2) Flash the downloaded 4.0.2 firmware OnePlus 3.zip or 4.0.2 firmware OnePlus 3T.zip file in TWRP.
3) DONT REBOOT TO SYSTEM. REBOOT TO BOOTLOADER FROM OPTION IN TWRP.
4) Connect your phone to the pc
5) Press windows button + X
6) Open Command prompt
7) Type "fastboot oem disable_dm_verity" without quotes and press enter
8) Type "fastboot oem enable_dm_verity" without quotes and press enter
9) DONT REBOOT TO SYSTEM. REBOOT TO TWRP RECOVERY.
10)
In case of Oneplus3T, Flash the required firmware files for PIE OOS corresponding to your current OOS (current OOS is the version of OOS which you are using now on your phone) in TWRP from this post: https://forum.xda-developers.com/oneplus-3t/how-to/firmware-beta-10-t3631166(Courtesy: @kamilmirza)
In case of Oneplus3, Flash the required firmware files for PIE OOS corresponding to your current OOS (current OOS is the version of OREO OOS which you are using now on your phone) in TWRP from this post: [url]https://forum.xda-developers.com/oneplus-3/how-to/radio-modem-collection-flashable-zips-t3468628[/URL] (Courtesy: @jamal2367)
11) DONT REBOOT!!!!
12) VERY IMPORTANT: WITHOUT REBOOTING, Flash the downloaded boot-patched.img file corresponding to the OOS version and phone model(either stable or beta) in TWRP from post 1...
13) Reboot..The DM-verity message is gone forever...
VERY IMPORTANT:
1. If you need to keep your phone un-encrypted flash Force Encryption Disabler For OOS PIE.zip immediately after step 12 and then only reboot.
2.If you are attempting this method on a a CUSTOM ROM then after Step 12 flash the full CUSTOM ROM zip file + latest gapps again without doing any sort of wipes in TWRP immediately and then only reboot....
Enjoy!!!
FAQs...
Q: Will I lose any data after I do these steps?
A: Never. There will be no data loss or any untoward effects of the procedure. Your data and phone will be in the exact same state as it was a before except for the fact that the damn dirty Dm-Verity message will be gone forever!!!
Q: Will this work on CUSTOM ROMs?
A: Of course. It has been tested to be perfectly working on even CUSTOM ROMs. Just follow the instructions in this post carefully where specific steps for CUSTOM ROMs are mentioned.
HIT THANKS IF I HELPED YOU. IT DOESN'T COST YOU ANYTHING, BUT IT MEANS A LOT TO ME...
Reserved..
Reserved...
Thanks for your work!
I have a question. Is there anyway to prevent OOS Pie Community Build from corrupting the /data partition on Unlocked Bootloaders with Encrypted /data partition? They specifically designed the builds to do so. It doesn't cause it if the device is locked. Can the boot image be patched for that too?
Sent from my #FlagshipKiller3T using Tapatalk
DarkSJ1998 said:
Thanks for your work!
I have a question. Is there anyway to prevent OOS Pie Community Build from corrupting the /data partition on Unlocked Bootloaders with Encrypted /data partition? They specifically designed the builds to do so. It doesn't cause it if the device is locked. Can the boot image be patched for that too?
Click to expand...
Click to collapse
That is the duty of twrp (recovery) I suppose because with stock recovery it doesn't seem to happen and it probably doesn't have anything to do with boot image as such...but u can very well try with the patched boot image..either u can flash the patched boot image immediately after flashing the zip file and try rebooting back to twrp and see
Or replace the boot image in the OOS zip file with mine and try flashing...but no guarantees buddy...
ALWAYS BACKUP BEFORE DOING ANYTHING...THIS IS A NEW OS ANS WE ARE STILL LEARNING...
Xennet said:
That is the duty of twrp (recovery) I suppose because with stock recovery it doesn't seem to happen and it probably doesn't have anything to do with boot image as such...but u can very well try with the patched boot image..either u can flash the patched boot image immediately after flashing the zip file and try rebooting back to twrp and see
Or replace the boot image in the OOS zip file with mine and try flashing...but no guarantees buddy...
ALWAYS BACKUP BEFORE DOING ANYTHING...THIS IS A NEW OS ANS WE ARE STILL LEARNING...
Click to expand...
Click to collapse
Alright thanks!
Let's see if anyone tries it out [emoji14]
I'm not in the urge of risking getting my /data wiped as of now
Sent from my #FlagshipKiller3T using Tapatalk
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
thanks @Xennet ...:good:
I followed all the steps from procedure 1 ( PROCEDURE 1: This is applicable only to people who have their data currently NOT ENCRYPTED AND KEEP IT DECRYPTED ) and for everyone out there who are confused or fear of loosing data , I successfully booted OOS Pie beta/community build without loosing any of my data/internal storage (everything regarding data is intact).
DarkSJ1998 said:
Alright thanks!
Let's see if anyone tries it out [emoji14]
I'm not in the urge of risking getting my /data wiped as of now
Sent from my #FlagshipKiller3T using Tapatalk
Click to expand...
Click to collapse
Don't try because if your data is encrypted and you follow the old steps with pie files for just not triggering dm-verity
Twrp cannot decrypt the data if you reboot after flashing oos community beta and then immediately patched boot image for pie
Luckily i saved myself (from loosing data) by not booting into system and again dirty flashing stable oreo rom using the guide for oreo and patched oreo boot image.
I had to dirty flash OREO Rom patched boot image and magisk all using OTG since i couldn't access data partition.
a0879 said:
thanks @Xennet ...:good:
I followed all the steps from procedure 1 ( PROCEDURE 1: This is applicable only to people who have their data currently NOT ENCRYPTED AND KEEP IT DECRYPTED ) and for everyone out there who are confused or fear of loosing data , I successfully booted OOS Pie beta/community build without loosing any of my data/internal storage (everything regarding data is intact).
Click to expand...
Click to collapse
Did u have your bootloader unlocked and on what OOS were u on, before u upgraded...
Yudh said:
Don't try because if your data is encrypted and you follow the old steps with pie files for just not triggering dm-verity
Twrp cannot decrypt the data if you reboot after flashing oos community beta and then immediately patched boot image for pie
Luckily i saved myself (from loosing data) by not booting into system and again dirty flashing stable oreo rom using the guide for oreo and patched oreo boot image.
I had to dirty flash OREO Rom patched boot image and magisk all using OTG since i couldn't access data partition.
Click to expand...
Click to collapse
That's in line....
Hmmmmmm it's a Twrp problem...the problem is with decryption of pie data by twrp...as stated earlier by @a0879, the patched boot image works perfectly with already decrypted data partitions without losing data...
But @Yudh, the patched boot image did it's work by not letting twrp being overwritten by the stock recovery or else you would have been in trouble...
Xennet said:
Did u have your bootloader unlocked and on what OOS were u on, before u upgraded...
Click to expand...
Click to collapse
Yes, my bootloader is unlocked from time immemorial and i was on havoc 2.4, twrp 3.2.3-10, magisk v18.1 just before flashing oos pie beta today.
Earlier i tried the leaked version and the one3tos also a few days back which ultimately wiped whole of my data/internal (though i backed it on pc) and replaced it with the stock recovery, i was unable to do anything other than just using it as it was but then also my bootloader was unlocked.
So i was searching for how to use pie by remaining non encrypted and not formatting internal storage and saving then Finally after going through your post i decided to follow each and every step as told, and "B A N G" !! , it worked as told by you !
thanks again..:good:
Xennet said:
Did u have your bootloader unlocked and on what OOS were u on, before u upgraded...
Click to expand...
Click to collapse
I had my bootloader unlocked.
I was on oos 5.0.8 latest stable build.
Also i discovered a workaround.
Steps below to keep your app data, unlocked bootloader and update to pie.
1)First upgrade the twrp to latest 3.3.0-1
2)remove any kind of lock in the system.
{otherwise it creates issues at the last point by not allowing us to enter the phone past lock screen.
[ If forgot to do so like me Workaround(perform after step 14 only) is to reboot to twrp and deleting the file located at /data/system/locksettings.db using twrp file manager (trick picked from OnePlus official rooting guide).
Then reboot into system and create the same locking method to retain fingerprints and facelock]
But for some people it would be better to remove locks in the first place from system before taking a full backup using twrp because you can always forget which file needs to be deleted or bymistakely if wrong file is deleted then it will cause issues}
3) reboot to twrp and take a COMPLETE BACKUP IN AN EXTERNAL DEVICE . Internal backup won't help.
It would be better if you don't compress it.(in rare cases it led me to corrupted backup in the past with previous twrp versions)
4)after taking backup don't go out of twrp and using MTP
Copy the whole internal storage to pc .
Bellow part isn't necessary but it would be better if you do it.
Also check the twrp backups digest for each created partition just to be on safer side.( It's better to be safe than sorry.)
So that you can make sure that your backup isn't corrupted.
5) download the community pie beta build and patched boot image for pie on the external storage like an otg (which i used).
Sha256 for OnePlus 3T beta build is
837d0f972ce7a10e422ddbf4d96d37cf3d84422ee5717c37a0ee5c3e1419d3c0
Also sha256 for OnePlus 3T patched boot image is
e2619b029e2f14f8cbe3c3b9306181e6688f038f39e8fcd4d5dea823360dcce0
6)wipe everything in twrp using format data option.
7) reboot to recovery again immediately using twrp otherwise twrp won't be able to access data partition afterwards.
8)flash the community beta build and immediately after that the patched pie boot image.
9) reboot to twrp again
10)flash magisk if you want.
11) reboot to system. After the system is started don't enter anything.
Instead again reboot to twrp.
12)while in twrp connect the mobile to pc and delete all the new folders and files in new internal storage.
After that copy the old internal storage contents to your mobile.
Just wait even i was exhausted. But it worked out well.
13)after that restore only the data partition from the nandroid backup which you made using twrp in the start of this guide
14) reboot to system and your data is still there in your mobile with pie community beta build and also unlocked bootloader
Proof that i succeeded
Now its time for me to enjoy my pie and go to sleep.
For you it's time to prepare your own pie
Xennet said:
That's in line....
Hmmmmmm it's a Twrp problem...the problem is with decryption of pie data by twrp...as stated earlier by @a0879, the patched boot image works perfectly with already decrypted data partitions without losing data...
But @Yudh, the patched boot image did it's work by not letting twrp being overwritten by the stock recovery or else you would have been in trouble...
Click to expand...
Click to collapse
The problem isn't with twrp i think because
After rebooting to recovery after flashing the pie beta and patched boot image
Even the system couldn't access the data partition it asked me to reset my phone by saying the data partition is corrupted (which in reality wasn't because i was able to recover the data)
So after i formatted it via twrp and rebooted again into twrp
Both the system and twrp were able to decrypt it.
I think something about encryption is changed in pie in oos
I successfully flash the open beta pie following the op's instruction.! Decrypted with no dm-verity message! Thank you Xennet!
I was on Aosip before and I didn't loose my data!
Sent from my OnePlus 3T using XDA Labs
As @a0879 and @xarrismoto have provided proof it's 100% clear that the patched boot image and force encryption disabler zip is able to update Oreo to pie without losing data if the phone is in DECRYPTED STATE ...
Now the problem is for encrypted phones...
Now as @Yudh mentioned it is definitely due to a change in the encryption in pie the data wipe is happening..that's sure..
But the question is if you have a locked bootloader and stock recovery, you are able to update from Oreo to pie without lose of data??...but with twrp you can't....
So the question is, whether the problem of encryption is not handled by twrp or by the system in pie itself....
xarrismoto said:
I successfully flash the open beta pie following the op's instruction.! Decrypted with no dm-verity message! Thank you Xennet!
I was on Aosip before and I didn't loose my data!
Click to expand...
Click to collapse
Can you please elaborate a bit more and it will be most helpful post of the day. As i was on closed beta and lost my data on flashing closed beta however afterwards i flashed custom roms and now my device is encrypted and locked bootloader having TWRP running Colt PIE OS. If i flashed decryption zip and modified boot then my data will be wiped or not? If not then please share your steps. Thanks
Sent from my ONEPLUS A3003 using Tapatalk
MirzaAwais said:
Can you please elaborate a bit more as its most helpful post of the day. As i was on closed beta and lost my data on flashing closed beta however afterwards i flashed custom roms and now my device is encrypted and locked bootloader having TWRP running Colt PIE OS. If i flashed decryption zip and modified boot then my data will be wiped or not? If not then please share your steps. Thanks
Click to expand...
Click to collapse
I don't think it will work for you as you are encrypted!
I was decrypted before and I stay decrypted after I flash Pie rom. I use latest TWRP 3.3.0.1 and magisk v19.0,also my bootloader is unlock
I followed the instruction from Op which is PROCEDURE 1: This is applicable only to people who have their data currently NOT ENCRYPTED AND KEEP IT DECRYPTED
Sent from my OnePlus 3T using XDA Labs

[Q] [HELP] Odin/TWRP Flash successful, BUT not changing anything after reboot

TLDR : I Cannot MODIFY ANYTHING IN SYSTEM or USERDATA(i.e. internal storage) partitions. Files Deleted via twrp in System/internal storage comeback after reboot and new files added from computer vanish after reboot. Also NOW, different flashes are successful through both methods via -
1. twrp recovery-(Boot/recovery/CustomROMs flashes) and
2. ODIN-(boot/recovery/Stock ROM flashes)
but again dont change anything after reboot (previously both methods worked, so no issue with twrp or odin according to me). So, Whole storage (System+Internal Storage) is intact after Reboot as it is. Now I feel it has something to do with magisk. I can see exact file names both in internal storage and /system and do delete, move, rename i.e. any operations in twrp so i guess storage is not encrypted. I can boot into system for hardly 10-15 seconds after that it bootloops again, so i cannot do anything there. Only options to me is twrp recovery or odin, both are not helping for now.
--------------------------------- DETAILED EXPLANATION : ------------------------------------
[PROBLEM 1] DELETION:
Anything deleted via TWRP recovery in system partition or "EVEN in sdcard, i.e. internal storage" deletes successfully in twrp, without any error but comes back in the same state after the reboot. When i delete error causing file or folder via TWRP file manager, it gets deleted, and if you check again it's not there wherever it was present, but just after reboot every file and folder comes back to previous state like if nothing was done. This is true for any file present in any of the partitions. Newly inserted file in internal storage vanishes after reboot, and deleted file comes back after reboot - true for any partition. Status quo maintained !!
[PROBLEM 2] FLASHING:
To solve above problem, i thought it might be an issue with Magisk or the new twrp recovery, so i tried flashing Magisk Uninstaller zip in twrp, which again flashes successfully, SECONDLY- tried zackptg-(dmverity,forceencrypt Disabler) zip file, that also flashes successfully(i thought might be an issue of dmverity or encryption), and THIRD thing i tried flashing older twrp version recovery, that also flashes successfully but after reboot same currently installed twrp boots, not the newly "successfully flashed" older version. So i cannot change twrp-(tried both recovery.img flash in (1) twrp itself and (2) also through ODIN) - both returns flash successful and pass(in Green). FOURTH, tried dirty flash both (1) other ROM and (2) SAME ROM on top of current ROM- everything returns successful but after reboot boots the current erroneous ROM that i want to change. FIFTH, tried Clean Flashing i.e. wiped everything (selected 1. dalvik cache, 2. data, 3. cache, 4. system, 5. Internal Storage in wipe section) and also tried Factory RESET and FORMAT DATA option and after all this flashed Custom ROM zip file only (no gapps or magisk flash), but every wipe operation returns successful and ROM flash also successful, but when reboot into system again that bootlooping erroneous ROM that was present before all of these "successfully done" operations.
[PROBLEM 3] ODIN FLASH:
As all above failed, i thought flashing STOCK ROM through ODIN is my last resort. I did (1) Stock recovery flash through Odin- it was green pass (successful), but when booted returned that same twrp recovery not stock recovery. Tried (2) flashing Stock BOOT.img flash through ODIN, again it was successful but actual boot resulted the same Magisk Patched Boot.img. Third (3) tried flashing whole STOCK FIRMWARE - Official latest Stock firmware that was extracted from Samsung Smart Switch, with default options turned on in Odin, flash was again green-pass(successful) but auto reboot after successful flash through ODIN resulted same old erroneous ROM booting up like a VAMPIRE (I'm not dead, I'm Alive!!)... Fourth (4) tried flashing Stock Firmwave of step 3 with NAND ERASE and RE-PARTITION options turned on by inserting pit file to do BANG BANG, nuking my phone with these options that many people on internet advise not to use, screenshot attached below( it took 42 minutes to complete ), again using these options nand erase and re-partition also resulted successful(green-pass) and resulting that same untouched state as it was before.. Boots into twrp recovery not the stock rom or stock recovery with that same old erroneous ROM present in system with data partition intact. (Tried using different ODIN versions, different USB ports on my laptop, different non-official firmwares(but these non-official firmwares of SM-G530H resulted in some errors in ODIN, i.e. it was not green pass like that of official firmware, but resulted RED FAIL.))
[PROBLEM 4] SYSTEM_ROOT Created:
This i saw for the first time i guess, in my phone, and maybe the cause of this whole problem. Now my root directory in twrp '/ ' contains /system_root along with /system, /data, /cache. One more thing /system_root contains system folder ,i.e. /system_root/system results same things as /system . When checked in twrp>wipe section> Repair system> There System Mount Point is shown as : /system_root instead of previously used to be "/system" normal directory when /system_root was not present at all.
Another thing /system_root contains files like default.prop , init files, sepolicy which are also present in root directory ' / ' . This whole /system_root should not have existed at all when /system exists. Maybe /system_root or the init files or other thing present inside /system_root are preventing all the changes - deletion , flashing changes etc. described in this post and maybe this folder was created by step(3) flashing procedure below , i.e. due to magisk. Also formatting system in twrp>wipe>system returns successful msg but nothing is deleted when checked in twrp file manager or twrp>Backup (system partition backup size shows 1456 mb even after formating)
[OTHER THINGS I TRIED] to solve this -
- Deleting twrp folder to make it to default state, again it's successfull deleted but doesn't loads default configuration after reboot due to PROBLEM 1 above as deletion reverts back after reboot
- Fixing contexts in twrp
- reboot disemmcwp
- mount -o remount,rw /system commands in twrp terminal (again to mention every command that is possible to enter runs without any error, hence successful but problem persists even after that )
- flashing stock boot.img and recovery.img (both successful no changes observed after reboot, but after stock boot or recovery.img flash, if you flash magisk uninstaller zip it still says "magisk patched image detected", and next thing written after it is " ! (Exclamation mark) Boot image backup unavailable" , then "Restoring ramdisk with internal backup" again magisk uninstaller also returns successful. after reboot again runing uninstaller detects magisk again. and boots twrp only instead of stock recovery
- repair, resize system partition in twrp>wipe section results Twrp error 1 (might be due to that /system_root folder that contains now /system which is also present in ' / ' root
- Changing "system partition" file-system with all 6 options returns successful but filesystem stays ext4 only when checked again.
WHAT IS WORKING-
Odin is working. - i once flashed my first twrp recovery on this device through the same version
TWRP is working - Although this is new twrp version 3.6.1_9-0 that i flashed just few time before all this catastrophe happened (maybe it might be the cause or it may be magisk)
Current Configuration:
Device: Samsung Galaxy Grand Prime
Model: SM-G530H (fortuna3g)
ROM: [STABLE][10] LineageOS 17.1 GO by DarkDroidDev from xda
GApps: Customised OpenGapps package (this caused erroneous bootlooping ROM) - i can boot into ROM but it is very lagging, and reboots again after some time, ranging from 10-20 seconds to max 3 minutes. Launcher is not working. And Keyboard is crashing. I can go into settings to change something but change doesn't persists after reboot
Magisk: Magisk 23.0
What was my FLASH PROCEDURES before this happened-
- Cleaned dalvikcache, data, cache, system
- After this, Data and Cache showed 0mb in Backup option in twrp, system showed 2mb containing only usr folder, boot showed 13mb
- (1) Cleaned Flashed above ROM
- (2) Customized OpenGapps flash
- (3) Magisk Patched Boot.img flash - - (not magisk.zip installer, its magisk-patched-boot.img flash through twrp only)
- (4) Dalvik Cache Wipe
- Booted into System.
I was actually testing the customised OpenGapps package,
Before this flashed customised package 10-20 times. i was editing, flashing, seeing the changes... > then again editing, flashing. So this was not the first time.
If any error occured, like launcher not working, i again booted into twrp wiped system data or deleted particular launcher file in twrp, all worked, changes were successful then i again continued my testing.. editing packages > flashing > seeing the changes by booting into actual rom.
But this whole case happened during the iteration of my testing when i introduced Gboard apk, downloaded from Play Store from fortuna3g(this device), into the Custom Gapps Package.
So, the cause of all this according to my knowledge where i doubt maybe one of the following-
(1) - That Keyboard apk installation as system app (most probably permissions problem, as apk was fine as tested before on this device and resulted in keyboard related folders created in that /system/usr folder which always contained only one folder, but only this time contained this keyboard related stuff there)
(2) - That magisk-patched-boot.img flashing procedure, step(3) above, just after openGapps flash "without booting into system first" - this was done first time in my testing iterations, so might be incorrect procedure
(3) - Due to step (3), issue might be related to magisk related stuff - dm-verity, Force encryption
(4) - Creation of /system_root folder in root directory '/ ' maybe due to step (3), there used to be only /system there before
(5) - Hardware Problem, maybe that's why all those successful twrp and ODIN flashes not doing anything
Please suggest something that i have not tried and could solve this PROBLEM of NOT BEING ABLE TO CHANGE ANYTHING ON SYSTEM or USERDATA partition.
I know people here know a lot more than me, and can help me with their valuable suggestions and solutions, if any.
Thanks.
I found one xda thread almost with same issue as mine titled -
[Q] Weirdest problem - flashing anythin thru ODIN does not change anything in my S4​But no working solution there also
LinhBT said:
Need to know exactly if it's Snap or not. If it is, then there're 2 options you can try.
1. Ask some one have the same device model as you, do a ROM dump ( you can google for more detail ). Once you got that, I can share with you the tool needed for restore your device from that dump.
2. Try find your device's Factory Images ( similar to Fastboot ROM, but a little different ), and an authenticated prog of your SoC ( this I can share too if you choose this option ) then boot your device into EDL mode by using fastboot2EDL script ( on Git, you can google too ) then use QFIL ( one tool in QPST Tools by Qualcomm ) and force flash the images into the device.
So far as my experience and understanding, there're only these 2 solutions to fix your device ( if it's Snap powered ).
Click to expand...
Click to collapse
Hi mate, My phone is Snapdragon powered..
My problem is almost similar.. But not exactly.. After almost 2 months I am not able to find a solution.. But after this period of researching and googling about things related to my problem.. I feel now, either any one of the following is the cause of problem:
1. Emmc is stuck or locked in read-only mode (Can move files from pc , delete already present files anywhere in any directory, but all changes vanish after reboot... all file and directory structure remain intact- moved files from pc gets deleted.. and deleted files which were already present come back after reboot )
2. Corrupted /data and /cache partition, as e2fsck in twrp terminal results shows "filesystem still has errors" and "e2fsck: unable to set superblock flags on /dev/block/mmcblk0p** ) in both these file system (I think they are preventing flashing procedures- Odin stock firmware flashes and twrp custom ROM flashes both are successful, but after reboot no changes can be seen... - Even Recovery.img and boot.img flashes don't seem to work even both are shown successfully flashed in twrp) After reboot current version twrp boots again instead of newly flashed different version recovery.img ... same with boot.img even after running magisk uninstaller zip files.. running uninstall.zip 2nd or 3rd time also shows magisk patched image detected in log which should be removed in 1st iteration itself..
3. Might be magisk is preventing these changes to be made.. or It might be the /System_root creation as mountpoint for system partition which used to be previously /system normally. This might be the superblock creation which not used to be there. You can see my attachments in my thread to see my directory structure of system_root and my download mode picture
My Samsung's twrp and Download Mode seems to be working but no changes made by them even after successful operations by both.
Can you suggest anything @LinhBT ?

Categories

Resources