Questions around Encryption (root, OTA, backups) - OnePlus 5 Questions & Answers

Hello,
I just ordered my first OnePlus and should receive it by the end of the month. Like all my previous (and quite old) phones, I would like to root it for several reasons and I found the native encryption needs to be disabled in order to be able to root the phone. Fair enough.
Since I never had to deal with encryption on my previous phones, I was wondering if you could tell me more about the consequences:
1) once the phone is rooted, can I enable the encryption again without hassles?
2) once rooted and (hopefully) encrypted, how will I have to update my phone? Flash the full OTA everytime (no partial updates allowed on rooted phones if I understood correctly)? Can I do this without disabling/re-enabling the encryption? After the full flash, will the data & cache be wiped or will it be hassle-free?
3) I generally use Titanium Backup to backup my apps (hence the need for root access) and copy the files on a network drive. Am I correct to assume that native encryption of the OP5 will not affect this process (either during backup or when the files are copied to the network drive (encrypted)?
Thanks for your help

GeeM said:
Hello,
I just ordered my first OnePlus and should receive it by the end of the month. Like all my previous (and quite old) phones, I would like to root it for several reasons and I found the native encryption needs to be disabled in order to be able to root the phone. Fair enough.
Since I never had to deal with encryption on my previous phones, I was wondering if you could tell me more about the consequences:
1) once the phone is rooted, can I enable the encryption again without hassles?
2) once rooted and (hopefully) encrypted, how will I have to update my phone? Flash the full OTA everytime (no partial updates allowed on rooted phones if I understood correctly)? Can I do this without disabling/re-enabling the encryption? After the full flash, will the data & cache be wiped or will it be hassle-free?
3) I generally use Titanium Backup to backup my apps (hence the need for root access) and copy the files on a network drive. Am I correct to assume that native encryption of the OP5 will not affect this process (either during backup or when the files are copied to the network drive (encrypted)?
Thanks for your help
Click to expand...
Click to collapse
First of all native encryption will still work when rooted. When you root using supersu or Magisk the encryption will stay. When you get your phone you first must boot to fastboot and unlock the bootloader. Doing so will erase data so do it as soon as you get the phone. Second you will need to flash TWRP. Wipe factory settings and flash Supersu or Magisk 13.3. I prefer Magisk. Once in setup you will need to put a password and fingerprint to get the encryption started. After that your all set. To update the rom just head to downloads.oneplus.net and download the correct rom for Oneplus 5 and flash it over TWRP then flash Magisk/Supersu after. I prefer using [ROM] xXx NoLimits 2.0 [OOS][OP5] ☆ Speed/RAM optimized ☆ because it uses stock oxygen os rom with better performance and battery life. Plus extra features like debloating. But other than that you will not lose encryption when rooting. Only when you want to install custom roms for right now like (LineageOS, RR, AOSP).

Related

[Q] safely remove encryption

After receiving my beloved 1+2, I rooted it, installed TWRP and flashed Xposed. Then I encrypted the phone. After wanting to update the rom, I realized TWRP doesn't yet support encryption. I reflashed the stock recovery, which I found here. This didn't help either, no encryption supported.
How can you safely remove the encryption? Does anyone have a functioning setup with stock recovery an encrypted device? Or is it possible to flash new firmware throught fastboot leaving it encrypted?
I made my Htc M7 useless trying to remove it's encryption, so i'm really careful one the 1+2...
Does really nobody know how to reverse this prominent feature in android???
A simple factory reset from the settings menu completely removed the encryption

Stock rooted Lollipop with TWRP - Is this the best method to upgrade to MM?

There are a few threads that deal with upgrading lollipop to marshmallow, but they seem to raise as many questions as they answer - mainly since they were usually written before rooted images were distributed.
Basically, I am on an unlocked, rooted stock XT1575 with TWRP 2.8.7.0. It sounds like it's less efficient and has lots of potential problems to go back to stock, unroot, install OTA, do new system root, and re-add TWRP.
Instead, it sounds like the simplest method to get to stock rooted MM, with least steps and potential problems, should be this:
Update TWRP to 2.8.7.1 using IMG file here from within TWRP Recovery (TWRP Manager did not install it when I tried via Android proper - I was still at 2.8.7.0)
Do a full TWRP backup of my current Lollipop stock rooted installation (I assume this means I can restore without problems if the MM install goes awry)
*Optional: Use Titanium Backup to backup settings of important apps, and text messages/MMS.
In TWRP, Wipe->Swipe to Factory Reset
Transfer to phone and Flash via TWRP the stock rooted odexed ROM from this thread (not sure if there is a good argument for deodexed? I've never gotten a clear answer why one should be better, but would stick with odexed just because I believe it is "stock" so maybe less problems?)
Install SuperSU 2.62 from this thread by simply flashing it as normal in TWRP 2.8.7.1.
Reinstall all programs on initial setup. [*Optional: Reinstall via Titanium backup]
I assume if I do this I will: have marshmallow; have root; have working TWRP.
Does anyone see any obvious problems with this method? Thanks, I really appreciate any comments.
EDIT: Yes, I tried this method. It all worked, except I've added SuperSU installation steps that worked for me, since the "Stock Rooted" ROM is NOT actually rooted when I flash it. Also, used Titanium Backup successfully for some programs, so added that as an option.
Sorry to bump, but any response from someone with experience would be very helpful. I just want to make sure I don't have to go through the whole unroot/OTA/reinstall TWRP/reinstall root procedure that every thread says seems to cause problems...
Answered my own question - edited the main post to show the method used successfully.
Thank you for this answer thread. I was looking for the simplest answer for upgrading to MM without having to unroot and reflash everything. Looks like this is the easiest for now (I have having to reinstall everything, since some games I play to NOT react nicely to data being restored via titanium).
Have a brand new XT1575 with 5.1.1, Does the MM Update break root ability. I primarily want it for xposed, adaway. No ROMing
Should I update and then root? or root and then update?
I personally have found that following this method breaks root possibilities. MM is rooted, but when I got to the point of installing SuperSU via these steps, it broke EVERYTHING (settings stopped working, Motorola Services stopped working, etc).
I have to start from scratch again now.

Device Encryption not possible?

My x727 fails to encrypt itself. After the reboot it did not start the encryption but got stuck for several hours.
Has anyone managed to encrypt the phone? Thank you.
(On my phone, Magisk v8, TWRP, PHH's Superuser and xposed is installed.)
Now that more people have the phone and more ROM versions (including first custom ROMs) are available: has anyone managed to encrypt the phone?
(Device encryption is very important to me because my employer does not allow me to connect an unecrypted phone to the firm network. Therefore, the phone is currently almost useless to me.)
Thanks!
I suppose x727 data partition it's already factory encrypted because during unlocking tests some users said the device asks for a key.
I have now managed to encrypt the phone with the latest ROM: http://forum.xda-developers.com/le-pro3/how-to/5-9-020s-update-x720-t3506829
are you using airwatch ?

Re-encrypt Data?

I'm rooted using Magisk and I'm using ElementalX kernel, I do not have TWRP installed as I want to get OTAs... my question is, can I re-ecrypt my data without losing Magisk? I remember TWRP having problems decrypting the partition when I first tried to install Magisk/EX so, in case I lose Magisk, can I reinstall Magisk/EX in TWRP or Fashfire once I re-encrypt my device? (i.e. can TWRP decrypt "user encrypted" data partitions? and/or can Magisk run from an encrypted data partition?)
jhonyrod said:
I'm rooted using Magisk and I'm using ElementalX kernel, I do not have TWRP installed as I want to get OTAs... my question is, can I re-ecrypt my data without losing Magisk? I remember TWRP having problems decrypting the partition when I first tried to install Magisk/EX so, in case I lose Magisk, can I reinstall Magisk/EX in TWRP or Fashfire once I re-encrypt my device? (i.e. can TWRP decrypt "user encrypted" data partitions? and/or can Magisk run from an encrypted data partition?)
Click to expand...
Click to collapse
You have a premise incorrect here... If you are not 100% stock, you CANNOT take an OTA, even if you have stock recovery... you have modified the kernel, ramdisk image (Magisk), and likely the system partition (if not, why did you bother to root?), so OTA updates will FAIL. Even with FlashFire they are less there is less than a 50% success rate with this device when rooted.
Although I haven't tried in a long time, TWRP should handle encryption fine, as long as you know the password/PIN... I can't speak for ElementalX specifically, but it is a mainline kernel so I think it should be fine.
The point is that once you have unlocked the bootloader, your device security is pretty much zero... that is kind of a given, encryption helps safeguard your private information, but unlocked bootloader negates FRP and anyone could just fastboot TWRP, wipe and enjoy using your device. This is one of the reasons (of several) that I have stopped unlocking the bootloader and rooting anymore.
My question was mainly about Magisk and TWRP working with encrypted partitions.
About the security, I'm aware of the implications and I just want to keep my data safe, which is more important than the device itself.
As for the device modifications, AFAIK ElementalX uses the ramdisk just as Magisk does, it doesn't write anything to the kernel partition, also, I haven't modified /system at all; all possible modifications I've done have been through Magisk modules and Xposed (which I installed systemlessly of course). The main reason I rooted is indeed Xposed so I can use stuff like NeoPowerMenu, Whatsapp Extensions, ActivityForceNewTask, etc.
Given the fact that I've only modified the ramdisk so far, are you sure that I can't accept OTAs? (I know they'll break my current setup, but it should be easy to fix)
jhonyrod said:
My question was mainly about Magisk and TWRP working with encrypted partitions.
About the security, I'm aware of the implications and I just want to keep my data safe, which is more important than the device itself.
As for the device modifications, AFAIK ElementalX uses the ramdisk just as Magisk does, it doesn't write anything to the kernel partition, also, I haven't modified /system at all; all possible modifications I've done have been through Magisk modules and Xposed (which I installed systemlessly of course). The main reason I rooted is indeed Xposed so I can use stuff like NeoPowerMenu, Whatsapp Extensions, ActivityForceNewTask, etc.
Given the fact that I've only modified the ramdisk so far, are you sure that I can't accept OTAs? (I know they'll break my current setup, but it should be easy to fix)
Click to expand...
Click to collapse
Positive... 99% sure they will fail. And although Xposed may be installed systemless, it's modules still modify /system.

H918 Rooted and Encrypted on Stock?

Is there any way to have this phone rooted with encryption working? I would use Lineage, but it doesn't support VoLTE. I'm aware that TWRP will very likely never work again once the phone is encrypted, but that just means that I would have to flash everything I need before encrypting.
I'm on AO 20h ROM currently. My idea was (after making sure I never need TWRP again)
1. Flash stock 20h kernel zip without dm-verity and forced encryption disabled
2. Flash stock 20h boot.img (not sure if this step is necessary)
3. Reboot into system
Does this have the possibility of working? If not, what do I need to do to make this work?
Also, where can I find the stock kernel and boot.img?
I attempted to just flash the boot.img I extracted from the 20h kdz. This didn't work, because when I rebooted it just brought me to fastboot every time.
Edit: Second attempt was to extract the 20h kdz to get both the boot.img and the system.bin files. Then I patched the boot.img with Magisk Manager on my other phone, and moved it back to the sd card. To get the system.img from the 52 binary files, I used the KDZ Extractor which has an option to merge system files into an image. My plan was to flash from TWRP the system.img and then the patched boot.img, but when I went to install the system image, I got a warning message that the image was too big. It shows as 6GB on my computer, and the system partition is 5.4GB.
The only other idea I had in mind was to flash the 20h kdz, but interrupt the installation before it boots for the first time and "encrypts", then go into fastboot and flash the modified boot.img, but this seems excessively risky.
Edit Again: I DID IT!
And I'm not even locked out from using TWRP! Though I'm stuck on Nougat - 10p - with the method I used.
1. Patch extracted 10p boot image with Magisk app
2. Flash 10p with LGUP
3. Flash TWRP to recovery with Lafsploit, reboot to recovery
4. Factory reset from TWRP
5. While still in TWRP, flash the patched boot.img from 1.
Now my next goal is to deodex and try to get signature spoofing working so I can use MicroG. I've tried the Smali Patcher, which appeared to work, but it gets stuck on the T-Mobile splash screen. Same thing happens when I try to install Xposed with any method.
Hi there Pineapple!
Not too many people do care about H918 anymore. I am just like you trying to get something done, so reading everything I can find. I will point out the things I've learned already, but do remember I am not a dev, nor a senior member, not even a very experienced one.
So, above you were saying :
1. Flash stock 20h kernel zip without dm-verity and forced encryption disabled
2. Flash stock 20h boot.img (not sure if this step is necessary)
Well, the "boot.img" contains the Kernel and the Ram Disk, or at least this is what I've read in Android Internals - Jonathan Levin [1st Ed] free on his site. So, now it should be clear that if you'd do 2, it will overwrite 1.
About Encryption and Root:
ENCRYPTION:
Encrypt your phone before rooting, -> root, -> apply ROM. Not the other way around! Tested on Android 4-6.
Once you root or install various ROMs you lose the ability to encrypt your device.
You will have either hanging, rebooting, or the animation stalling
Discussed: http://forum.xda-developers.com/showthread.php?t=2791587 and
http://androidforums.com/threads/how-to-encrypt-a-rooted-device.866968/
Un-root if already rooted. Encrypt. Re-root.
If you Root with SuperSu, you have to manually kick start SuperSU when rooting after the encryption is in effect
Also see about issues with TWRP and Encryption in some devices
(Unable to decrypt the data partition on boot due to bug in TWRP)
(yep, H918, and it seems to be happening on stock ROMs as opposed to AOSP)
not sure if on H918 it is related or not to TWRP bug
Secure Boot (aka dm-verity) also complicates persistent rooting. <- look like you already took measures here
Xposed:
Xposed now also exists as a MAGISK MODULE, so no longer DETECTED if installed thru MAGISK <-try this
Had some issues with Android 7 (Nougat) but most were fixed. <-maybe try different version?
De-Odex
Why? Are you going to be theming your apps? AFAIK,
ODEX = (pre) Optimized Dalvik Exe file format (compressed, not fully compiled yet), separate from .apk
android apps are stored in .apk packages, not as easy nor fast to run as if already Odex-ed
De-Odexing just means having your apps on ROM sort of "collected" back to ".apk". You need that where you want to have an easy access to app resources, i.e. for theming.
QUESTIONS:
1. Could you, please, post the versions of all the components you've used? Like TWRP, Magisk..
2. So, microG doesn't work on rooted stock Nougat on H918? (Damn, I wanted to de-google)
Descent2 said:
So, above you were saying :
1. Flash stock 20h kernel zip without dm-verity and forced encryption disabled
2. Flash stock 20h boot.img (not sure if this step is necessary)
Well, the "boot.img" contains the Kernel and the Ram Disk, or at least this is what I've read in Android Internals - Jonathan Levin [1st Ed] free on his site. So, now it should be clear that if you'd do 2, it will overwrite 1.
About Encryption and Root:
ENCRYPTION:
Encrypt your phone before rooting, -> root, -> apply ROM. Not the other way around! Tested on Android 4-6.
Once you root or install various ROMs you lose the ability to encrypt your device.
You will have either hanging, rebooting, or the animation stalling
Discussed: http://forum.xda-developers.com/showthread.php?t=2791587 and
http://androidforums.com/threads/how-to-encrypt-a-rooted-device.866968/
Un-root if already rooted. Encrypt. Re-root.
If you Root with SuperSu, you have to manually kick start SuperSU when rooting after the encryption is in effect
Also see about issues with TWRP and Encryption in some devices
(Unable to decrypt the data partition on boot due to bug in TWRP)
(yep, H918, and it seems to be happening on stock ROMs as opposed to AOSP)
not sure if on H918 it is related or not to TWRP bug
Secure Boot (aka dm-verity) also complicates persistent rooting. <- look like you already took measures here
Click to expand...
Click to collapse
Yes, while doing this I did learn that the boot image contains the kernel. Looking back, that statement seems silly now that I know that. You are correct about encrypting before root. I did boot into the ROM and did the initial setup, then went back to TWRP (which thankfully had no error decrypting) to flash Magisk via the patched boot image. I did get rid of secure boot too, but I don't know if it was necessary in this case.
Descent2 said:
Xposed:
Xposed now also exists as a MAGISK MODULE, so no longer DETECTED if installed thru MAGISK <-try this
Had some issues with Android 7 (Nougat) but most were fixed. <-maybe try different version?
Click to expand...
Click to collapse
I tried three different ways of installing Xposed. First was through the Magisk Module, but this just made me get stuck on the T-Mobile screen. Had to remove the module from TWRP. Second was "systemlessly" as described here: https://magiskroot.net/install-systemless-xposed-framework-nougat/ . This had the same result. Third was by using only the Xposed Installer 3.1.5 apk, which didn't seem to do anything at all.
Descent2 said:
De-Odex
Why? Are you going to be theming your apps?
Click to expand...
Click to collapse
Deodexing the ROM is necessary to add signature spoofing, which is necessary to install MicroG, so it can pretend to be the real Google Play Services. Usually in the past I've done this with the Nanodroid patcher https://nanolx.org/nanolx/nanodroid but it didn't work here, which was odd because it did work on the Alpha Omega Oreo ROM (which didn't have working encryption).
Descent2 said:
QUESTIONS:
1. Could you, please, post the versions of all the components you've used? Like TWRP, Magisk..
2. So, microG doesn't work on rooted stock Nougat on H918? (Damn, I wanted to de-google)
Click to expand...
Click to collapse
1. The TWRP that's on the laf partition is the one that FWUL 2.7 installed. The TWRP that's on my recovery is 3.5.2_9-0-h918.img. This is the latest official release. To unpack the boot image from the stock kdz, I used LG Firmware Extract 1.2.6.1. I moved the boot image onto another phone which had the latest Magisk Manager app on it (23.0) to patch it with Magisk.
2. Not so far it hasn't. I've deleted everything Google with System App Uninstaller, /d/gapps, and adb. So I'm going without Google Services or MicroG for now. I'd like to change that though, since MicroG makes it far more livable.
So, you have the same end goal as I do - privacy. Have you considered buying the de-googled phone from Brax?
Honestly, this never ending enigma with H918 has me wondering if I should just do that. I mean, I don't sweat some learning and work, but now that the V20 forum is basically dead....
Descent2 said:
Have you considered buying the de-googled phone from Brax?
Honestly, this never ending enigma with H918 has me wondering if I should just do that. I mean, I don't sweat some learning and work, but now that the V20 forum is basically dead....
Click to expand...
Click to collapse
That reminds me of the people on ebay who try to sell 12 year old Thinkpads for 3-4x what they're worth just because they flashed coreboot on them. Except it's way easier to install a custom ROM on a Pixel than it is to flash coreboot. The Pixels are also very different phones than the V20 - no removable battery, ir blaster, 3.5mm jack, good DAC - but if you want the most private and secure smartphone, a Pixel with GrapheneOS (not Lineage) is what you want. Flash it yourself, it's way easier to do it to Pixels than LG's.
Same here.
May-be not that crazy, 3-4 times, but yeah, he sells Google Pixel 4 XL 128 GB with lineage for over $700 where that same phone is $380 on Swappa, lol. It's not as drastic as you memory of e-bay, but it is twice the worth, still.
But then again, considering how much Rob is doing for the community to propagate the awareness, may-be this isn't all that high of a price. Some busy people won't even blink at his prices, but would never invest this much time to decipher everything. Sadly, I, myself is a sucker for the know how, instead of focusing on making money.
You are right in that I did pick this phone as "last phone with removable battery" myself. I actually do remove the battery from time to time when I don't want to be tracked, and drop the phone in the steel covered glove compartment, where no weaker field communication can ever reach it.
Hey, thank you so much for the version numbers, if I decide to go that way, I'll use those exact ones! (So far, do not want to cross into ARB1, but it seems that the lafsploit only works with 10p...)
You know, the Patcher is also available from NanoDroid installed as a Magisk module. Their (Nano) description here:
GitHub - Nanolx/NanoDroid: [MIRROR] See https://gitlab.com/Nanolx/NanoDroid for main repository
[MIRROR] See https://gitlab.com/Nanolx/NanoDroid for main repository - GitHub - Nanolx/NanoDroid: [MIRROR] See https://gitlab.com/Nanolx/NanoDroid for main repository
github.com
states that NanoDroid includes:
on-device framework-patcher for microG support (signature spoofing), with automatic de-odexing up to Android 8.1
Is that the method you tried?
Nanolx says that his patcher patches the sig spoofing support into one of the three locations: Magisk NanoDroid module, Magisk itself and /system. When you were using the patcher, did you see any of these choices?
Also, do you know that the dev of Magisk now works for Google? Now, I know that absolute majority of people would not see anything weird here, but I do, cause I don't trust Google, and thus want to de-google my phone. Specifically, a small conflict of interest while working for google and developing a software that supposed to oversee and support the escape from that same Google by de-googling the phone. Some stockholders might find this quite funny and demand that something is done about this.
I would try older Magisk. I know from other threads, that on 10p, some of the versions of Magisk that did work were: 16.0, 21.0, 21.4 ...
Descent2 said:
You know, the Patcher is also available from NanoDroid installed as a Magisk module. Their (Nano) description here:
GitHub - Nanolx/NanoDroid: [MIRROR] See https://gitlab.com/Nanolx/NanoDroid for main repository
[MIRROR] See https://gitlab.com/Nanolx/NanoDroid for main repository - GitHub - Nanolx/NanoDroid: [MIRROR] See https://gitlab.com/Nanolx/NanoDroid for main repository
github.com
states that NanoDroid includes:
on-device framework-patcher for microG support (signature spoofing), with automatic de-odexing up to Android 8.1
Is that the method you tried?
Nanolx says that his patcher patches the sig spoofing support into one of the three locations: Magisk NanoDroid module, Magisk itself and /system. When you were using the patcher, did you see any of these choices?
Also, do you know that the dev of Magisk now works for Google? Now, I know that absolute majority of people would not see anything weird here, but I do, cause I don't trust Google, and thus want to de-google my phone. Specifically, a small conflict of interest while working for google and developing a software that supposed to oversee and support the escape from that same Google by de-googling the phone. Some stockholders might find this quite funny and demand that something is done about this.
I would try older Magisk. I know from other threads, that on 10p, some of the versions of Magisk that did work were: 16.0, 21.0, 21.4 ...
Click to expand...
Click to collapse
As long as Magisk itself is FOSS and hasn't been proven to be spyware, I'll trust it. The later versions actually have gotten better about privacy, since it now doesn't require internet. And the goal of the Magisk project isn't to de-google your phone. It can aid in de-googling, because you can uninstall system apps, but Magisk is just to gain root.
As for how I tried to use the patcher, I tried from TWRP, which gave me the error "failed to mount /system unsupported a/b device," and then if I tried to flash it from Magisk Manager it gave the error "failed to deodex services.jar"
When you say you tried to flash it from TWRP / Magisk Manager, it is not clear to me if you understand that Nano Patcher is also available as a Magisk module, and if you have tried to add that Magisk nano module or used the Patcher by itself as provided by NanoDroid in a stand alone installer. Since I haven't used Magisk yet myself, I do not know if has the flashing capability and that is what you referred to, or if that meant you added the module. Like I said, still learning here.
I do understand that Magisk is only a systemless root , not a patcher or microG.
The H918 is not an A/B device. Not on Nougat nor Oreo in any case. Obviously, you know that.
So, your device is being misidentified as a much newer device.
I think that if you had tried a version of Magisk or the Patcher that is not YET aware of A/B devices, then possibly such mis-identification would not happen.
Of course the fact that it happens thru TWRP, gives Magisk somewhat an alibi.
I still think it is worth trying. May-be older Patcher first, then with older Magisk.
I keep holding Magisk in my attention because without it doing its job correctly, you could not take the next step, the one that isn't working.
Finally, Try some of these: https://download.lineage.microg.org/h918/ ROMs, they already have signature spoofing handled. I would think an older one might work, as I saw several threads mentioning that the later versions of LOS don't run well on H918.
Also, here is thread you might want to read and post your situation into:
[MODULE/SYSTEM] NanoDroid 23.1.2.20210117 (microG, pseudo-debloat, F-Droid + apps)
NanoDroid NanoDroid is a installer for various OpenSource related things, most noticably microG and F-Droid. It supports direct /system installation, both devices with or without A/B partition scheme, aswell as Magisk Mode (module) installation...
forum.xda-developers.com
That thread discusses NanoDroid used as a Magisk Module, and there are few users experiencing a similar situation (with different errors) and some advices.
Descent2 said:
When you say you tried to flash it from TWRP / Magisk Manager, it is not clear to me if you understand that Nano Patcher is also available as a Magisk module, and if you have tried to add that Magisk nano module or used the Patcher by itself as provided by NanoDroid in a stand alone installer. Since I haven't used Magisk yet myself, I do not know if has the flashing capability and that is what you referred to, or if that meant you added the module. Like I said, still learning here.
Click to expand...
Click to collapse
I'm taking the nanodroid patcher zip from their website and attempting to flash in TWRP, which I've successfully done before on other phones. I also tried using the same zip and installing it as a module in Magisk. I don't think there's a separate file meant specifically for use as a Magisk module. I believe the a/b error in TWRP has something to do with the fact that when I'm in TWRP and I go into the "Mount" menu and select System, the check box only remains ticked for about 5 seconds, then it automatically unmounts again. No idea what the problem is there. I suspect if that weren't an issue, I'd get the same exact error that I get when trying to use the patcher with Magisk.
As for LineageOS for MicroG, that's what I was using before going back to stock, and it was great. But it's sadly unusable as a phone because of the lack of VoLTE. If not for that, this could easily be my "forever phone" with the huge battery.
I'm also now having a strange issue where many system functions (recents, settings menus, autorotate, second screen, statusbar) are running unusably slow, while any other app runs perfectly fine. I have to do more testing to figure out what this is, though. Edit: stuck at T-Mobile logo again. Gonna try to do all this with stock Oreo.
Oops, I am sorry, I forgot, you have said that in your first post that you already tried LOS, man. So, we are stuck? It gets stuck on T-Mobile splash, meaning this is a bootloop, or rather a bootfreeze. I think your other issues must be related to this issue that is preventing you from patching for signature spoofing.
I've been reading up trying to find what is going on with your phone, and I stumbled against this:
You simply swipe the bar to allow TWRP to make modifications to your /system partition. Swiping on this particular screen, you are giving TWRP permission to mount your /system partition as R/W (Read & Write) as opposed to the default of /system being mounted as R/O (Read Only). However, please beware and know what you are doing. If you so much as mount /system as R/W via TWRP, regardless if you actually make changes, a kernel secured with dm-verity (device mapping verification) will prevent your device from booting into the Android OS. Never mount /system as R/W without first verifying whether your kernel has dm-verity enabled. If dm-verity or AVB 2.0 (Android Verified Boot) is enabled, flashing a systemless root script like Magisk 16.0 will patch dm-verity to disabled, as well as disable force encryption in the fstab.
You said you disabled the secure boot. This is aka dm-verity .
Now in your case, you are using the encryption, which needs dm-crypt to be active, correct? These two are related because they both are managed by a DM - device mapper.
When you said you have disabled the secure boot (dm-verity), do you mean that you have maybe chose some options when patching the boot.img with Magisk ? Or did you do it thru some other method?
I keep seeing references to "No Verity Opt Encrypt" without a good explanation of what it is or how to use it or when to use it. I am curious if you have applied that or not, and if you did, where did you read about it.
So, my current thinking is that if you actually failed to disable the dm-verity, this should take you to the bootloop or freeze. May-be DM failed to separate the two and kept both enabled?
The fact that you have touched the /system as r/w according to green above, should trip the dm-verity to bootloop you, if dm-verity is somehow still enabled.
I still do not understand though, why you are receiving a failure to patch.
Also, you have mentioned that you have used a "Smali Patcher". Knowing nothing about nothing, I of course assumed you meant to type "Small Patcher" , i.e. some patcher. Now cleaning up the details I looked it up. Oops. It is actually a real thing. It supposed to examine your system in step 1, and generate a Magisk module, and in step 2, you add that module to Magisk and check it as enabled. I just want to confirm that this is exactly what you have done and this brought you to T-mobile splash screen.
I actually may try LOS for microG, what version did you have that was great?
Because from what I was reading the LOS for 918 has many issues (no 5G tether, no 2nd screen, no WiFi call, etc)
Descent2 said:
Oops, I am sorry, I forgot, you have said that in your first post that you already tried LOS, man. So, we are stuck? It gets stuck on T-Mobile splash, meaning this is a bootloop, or rather a bootfreeze. I think your other issues must be related to this issue that is preventing you from patching for signature spoofing.
I've been reading up trying to find what is going on with your phone, and I stumbled against this:
You simply swipe the bar to allow TWRP to make modifications to your /system partition. Swiping on this particular screen, you are giving TWRP permission to mount your /system partition as R/W (Read & Write) as opposed to the default of /system being mounted as R/O (Read Only). However, please beware and know what you are doing. If you so much as mount /system as R/W via TWRP, regardless if you actually make changes, a kernel secured with dm-verity (device mapping verification) will prevent your device from booting into the Android OS. Never mount /system as R/W without first verifying whether your kernel has dm-verity enabled. If dm-verity or AVB 2.0 (Android Verified Boot) is enabled, flashing a systemless root script like Magisk 16.0 will patch dm-verity to disabled, as well as disable force encryption in the fstab.
You said you disabled the secure boot. This is aka dm-verity .
Now in your case, you are using the encryption, which needs dm-crypt to be active, correct? These two are related because they both are managed by a DM - device mapper.
When you said you have disabled the secure boot (dm-verity), do you mean that you have maybe chose some options when patching the boot.img with Magisk ? Or did you do it thru some other method?
I keep seeing references to "No Verity Opt Encrypt" without a good explanation of what it is or how to use it or when to use it. I am curious if you have applied that or not, and if you did, where did you read about it.
So, my current thinking is that if you actually failed to disable the dm-verity, this should take you to the bootloop or freeze. May-be DM failed to separate the two and kept both enabled?
The fact that you have touched the /system as r/w according to green above, should trip the dm-verity to bootloop you, if dm-verity is somehow still enabled.
I still do not understand though, why you are receiving a failure to patch.
Also, you have mentioned that you have used a "Smali Patcher". Knowing nothing about nothing, I of course assumed you meant to type "Small Patcher" , i.e. some patcher. Now cleaning up the details I looked it up. Oops. It is actually a real thing. It supposed to examine your system in step 1, and generate a Magisk module, and in step 2, you add that module to Magisk and check it as enabled. I just want to confirm that this is exactly what you have done and this brought you to T-mobile splash screen.
I actually may try LOS for microG, what version did you have that was great?
Because from what I was reading the LOS for 918 has many issues (no 5G tether, no 2nd screen, no WiFi call, etc)
Click to expand...
Click to collapse
The "No Verity Opt Encrypt" is a file that disables verity and forced encryption. If you rename the zip, though, you can make it only disable verity or only disable forced encryption. I did flash it with no-dm-verity, but from what you found it looks like Magisk does this for us so it's probably not necessary.
The fact that it bootlooped isn't due to me mounting it. I did that several times before without bootlooping. The issue I had with it was that it automatically unmounted /system after a few seconds, which is why I believe I can't deodex from TWRP.
For the Smali patcher, I don't remember how I attempted to use it. So far my attempts to root and encrypt stock Oreo haven't gotten very far, so I'm going to try this again.
I just used the latest version. I don't use 5G tether so I wouldn't know. The 2nd screen "works" but it just extends the main screen, making the cameras into a notch type thing. I can live without wifi calling, but lte calling won't work, which is, again, the only thing keeping me from using Lineage MicroG.
DUH !
I can't believe sometimes how dumb I actually am. Of course, it says right in the name of the file: "No Verity + Optional Encryption" ! [slamming my forehead into the table] I swear I read it thousand times, but for some reason it did not make any sense to me. I knew it does something about this subject, but I never took it literally!
Thank you for letting me know.
It is cool how the arguments are sent by renaming the patch instead of using the optional parameters. I like that. Magisk does that as well. You flash Magisk.zip and it installs Magisk. You rename it to unistall.zip and flash that, and it uninstalls Magisk.
Please, keep posting if anything changes. If I read something that makes me think I've picked up the scent again, I will let you know. For now I don't know what else to read.
PineappleMousepad said:
I've deleted everything Google with System App Uninstaller, /d/gapps, and adb.
Click to expand...
Click to collapse
You uninstalled Android Device Bridge? I am curious as to why? I mean, yeah, it's Google, but it's most likely harmless, and very useful. Does it call home or something? At some level the entire Android is Google. Yeah it comes from HA, but Google pays. And money talks. I am curious why.
Anyway, I might have found something , I am not sure, but it looks interesting:
So, I am reading this:
Internal Details
The Magic Mask for Android
topjohnwu.github.io
It says:
Paths in /data​
Some binaries and files should be stored on non-volatile storages in /data. In order to prevent detection, everything has to be stored somewhere safe and undetectable in /data. The folder /data/adb was chosen...
Click to expand...
Click to collapse
Did removing ADB, somehow messed up the /data/adb folder, and then that messed up Magisk? Is this why some of the operations you have attempted have failed? Like you'd install a module and it would be like you didn't even do anything?
I didn't remove adb. I debloated using System App Uninstaller. For some things that didn't work I used /d/gapps. For other things that didn't work I used adb.
Been messing around with Oreo the past couple days.
I *can* get stock Oreo to work with root and even MicroG - everything works great. Except it refuses to encrypt. The option is there in the menu to "Encrypt Phone". The battery was above 80% and plugged in, I tap the button, and it just takes me to the T-Mobile splash screen and quickly to the lock screen. I know MicroG isn't causing it, since it has this issue with or without MicroG. I get the same result whether I installed 20h from a TWRP flashable zip or if I installed 20h from the kdz with the kdz writer tool https://forum.xda-developers.com/t/tool-kdz-writer.3649818/. It isn't an issue with the recovery partition, as I left that stock and just use TWRP from LAF.
The less ideal option for Oreo at the moment is to have it completely stock from LGUP and just debloat with adb. This means no root or MicroG, but those are the least of the issues. It looks like if you uninstall Google Play Services without also installing MicroG, you get constant error messages saying "Messages has stopped working." No problem, just remove the messages app and use QKSMS, right? Well removing Messages breaks Contacts, which is also the dialer. Removing the dialer and contacts, replacing them with Simple Dialer and Simple Contacts works, but then you get the constant error message "LG IMS has stopped working." Removing LG IMS gets rid of the error messages but, predictably, breaks VoLTE.
Edit: It may not have been Google Play Services that broke the Messages app.
Quick reaction. You are likely right. It probably wasn't the removal of GPS that broke Messaging. There are so many different fixes for that error on the net (which you probably have already mostly tried), that it suggests many different causes for the error.
But, interesting how all that stuff is chained. Almost looks as if intended that way. Don't deny them saying a good bye to google outright, just make it an incredibly deep rabbit hole.
This comes to mind: try "freezing" messaging or anything lower on this chain, in hopes that it is the uninstall that removes some shared dependency and that they haven't thought of you trying to freeze them. I know you wouldn't care all that much if the chain didn't end with VoLTE.

Categories

Resources