[Guide] LineageOS 18.1, Android 11, Magisk Root, and Passing SafetyNet - OnePlus 3T Guides, News, & Discussion

I was bored one evening, so I started poking around on XDA Forums, and found a way to fix the battery issue I had with OnePlus 3T that made me switch to another device years ago! I was surprised how usable 3T is to this day. I thought I would breathe some life into it with LineageOS 18.1 that continues to receive security updates and patches. This way I will have a backup phone ready in case something happens to my OnePlus 6. It is unlikely that 3T will receive LOS 19, so this guide should stay relevant for a long time.
1) Get back to the latest version of Oxygen OS if you are on a custom ROM. Use something like MSM Download tool and then upgrade to 9.0.6 with the built-in updater.
2) Follow the instructions on los website to install LineageOS 18.1 and google apps via MindTheGapps. If you do not need google apps, then you probably do not care about SafetyNet and do not need this guide
Now the main issue is the SafetyNet. If you install YASNAC - Yet Another SafetyNet Attestation Checker you will see that the phone is not passing the SafetyNet verification, meaning that Google Pay will not work and some other apps, like banking apps, might not work either. We are going to fix that with Magisk and MagiskHideProps. Feel free to poke around on your own. I will just present that have worked for me.
3) Go to Magisk's Github, download the latest release and follow the installation instructions. (Notes: 3T has RAM Disk, there is no separate vbmeta, boot.img is inside lineage-18.1-xxxx.zip)
4) Once you have Magisk working, got to MagiskHidePropsConf and get the latest release there. Go to Force Basic Attestation Post and follow the installation instructions under the spoiler.
5) Now, let's get Basic Integrity to pass. Go to Basic Attestation Post and make sure to add both com.google.android.gms.unstable and com.google.android.gms to deny list. Reboot. Go to YASNAC. It should say that Basic Integrity is passing. CTS profile match is not, but that's okay.
6) Install terminal app like Termux. Open it, and run su to get superuser privilages. Then run props. Follow the instructions to Edit device fingerprint (option 1).
Edit Device Fingerprint (1)
Pick a certified fingerprint (f)
Pick vendor (OnePlus is 21 at the time of writing)
Pick device (3T is 5 at the time of writing)
Pick the one with Android 9. (It does not matter that the android versions are mismatched)
Follow the instructions to apply changes and reboot.
7) Check YASNAC, everything should be passing now!
Some other suggestions:
GCam is pretty nice alternative to the original camera. I would recommend this one. (It is recommended to also install Google Photos. It is a google camera after all.)
OpenWeather is a nice weather provider.
I would also recommend going to Google's Keyboard, Messages, Phone, and Calendar Apps. AOSP ones are not great, in my opinion.
Hope somebody finds it useful! Good luck!

Ah nicely done, thanks for the effort and work you put into this. How is your 3T performing?

AndyC76 said:
Ah nicely done, thanks for the effort and work you put into this. How is your 3T?
Click to expand...
Click to collapse
Hi, thanks! I was planning to use it as a development device to pick up android app development, but life got in the way and that never got off the ground
My 3T has developed a battery issue which ultimately led to me retiring it. The battery is extremely unreliable. It can be at 1% but work for 3 hours, sometimes the phone refuses to charge and the battery percentage tends to get stuck at 50% regardless of the actual charge level. I tried replacing the battery but the same behavior persisted. I think it is something either with the motherboard or the battery connector on it :/ Still a pretty snappy phone though!

Related

New to Android, how to bypass SafetyNet?

I've come from owning iPhones my entire life. To bypass Jailbreak checks within apps all we did was install a .deb package from a repo (in most cases).
For Pokemon GO we had PokePatch.
For Snapchat we had Phantom (Phantom Lite nowadays).
And that was it.. you resprang your phone and your tweaks/apps were working. But after buying an S7 Edge (my first Android device ever) I've been getting super confused with getting Pokemon GO and Snapchat both working while being rooted. People are talking about systemless SuperSU which I understand, but also Magisk, but also suhide, but also pph super.
Could someone help me figure out how to get apps working (pass the Safetynet check) as of today? Coming from iPhone.. this is very confusing.
Note: I have latest TWRP installed for Recovery and adb is working perfectly. I also do not need Xposed. It would be nice to have, but if it makes things harder I can do without it.
You might want to check this link out.

Pokemon Go on latest Oreo with ElementalX?

Has anyone gotten latest version of PoGo working on latest Oreo with ElementalX? I've never played but my friends keep asking me to join so I figured what the heck..
Slight problem... Device Not Compatible??
I had magisk and xposed, but I tried disabling, and even fully uninstalling xposed (and all additional xposed modules), and adding PoGo to the MagiskHide options, with no luck.
It still says that my device is not compatible...I would assume that's due to the rooting?
Or is it because I'm using ElementalX kernel?
I read somewhere that there's a (not pokemon go-specific) bypass sort of thing involving SatefyNet, but you have to install Magisk *before* going through initial phone setup, but any guide I've ever read about flashing/rooting ph-1 says to go through setup and then install magisk. I tried to find the post that talks about it but I can't find it right now. Anyway, I would imagine there's some kind of checksum against system and if magisk has been added after the fact, the checksum wont match? I really have no idea, just a guess.
I haven't seen any other posts specifically mentioning Essential being incompatible, so maybe it's just me.
I was originally thinking it was because of root or magisk remnants(?), but maybe it's the non-stock kernel.
If anyone could help, I'd really appreciate it.
I feel silly asking such a noob question, I've just never play PoGo...or any Pokemon...ever.
extra info:
I have successfully created an account using their google auth option.
I get through the first Professor Willow part, then character selection.
Usually part way through character selection, I get the error in the attached image.
Its not on any one specific section, however, it can/has occur at any point during the loading.
I've cleared cache and data a hundred times because it seems to get further each time if I do a fresh data wipe and start over -- I know the next step already so I can get through faster maybe lol
--update--
I finally got through character selection and made it to the first chance to catch pokemon. I hit a squirtle and it was trying to break free, and then that error popped up.
Haven't been able to get back in far enough again to see if it actually added to my PokeDex or not.
Sorry for the late reply, but you have to hide root detection under magisk.
For Pokemon go to work, go to Magisk > MagiskHide > then search for Pokemon go and select it then reboot.

New to Android: Is safetynet still by-passable as of now?

I only got my first Android device today, the G7, in order to run LineageOS, which I have gotten set up successfully. (I can't believe I didn't brick the phone!)
The only thing not working as far as I can tell (of course) is SafetyNet apps like Google Pay. From what I have read there are various workarounds but I can not be sure whether it's supposed to be working as of today, and whether my device/ROM makes that a hard no. I followed instructions and have installed Magisk, along with thesuggested modules (Didgeridoohan, Safetypatcher), and hidden all apps using Magisk hide. Before installing those modules, the SafetyNet check failed for "basicIntegrity"; afterwards, both tests fail, so that's a step backwards.
Is it possible to get this working given my configuration?

[GUIDE] Reasonable Stock ROM Replacement

Reasonable Stock ROM Replacement
​Since our Xiaomi Mi A2 is probably going to reach its end of life soon, I tried to find a suitable replacement for the stock ROM which is as unbiased and official as possible.
This post will not be a detailed step-by-step tutorial, but a list of my findings with links to the official tutorials of each individial product.
My goal is it to create a ressource which will not get out-of-date and get slowly riddled with link rot of custom hosted files!
LineageOS
As the backbone of this "build" I chose LineageOS since it seems the most stable and official custom ROM available, with the highest chance of getting regular updates in the long term.
It also provides good tutorials on how to get started with custom ROMs in general, which can be found here:
ROM: https://download.lineageos.org/jasmine_sprout​
Installation Guide: https://wiki.lineageos.org/devices/jasmine_sprout/install​
Recovery
For the recovery I would just stick to the default that lineage uses.
( Some people recommend alternatives like TWRP, but in this case that is not really needed and for me it actually seemed to cause various random problems. )
Google Apps
If you need the Google apps it's reasonable to stick to the version that lineage recommends: https://wiki.lineageos.org/gapps.html
Another good version that I recommend is NikGApps, which is usually more up-to-date and offers extra functions (e.g. Youtube Vanced and AdAway): https://nikgapps.com/
Magisk
Magisk is the best way to root your phone and more importantly to restore the SafetyNet status.
If you google for it you will find many sketchy download sites, so make sure to download it from the official github site: https://github.com/topjohnwu/Magisk/releases
Install it according to the official guide that can be found here: https://topjohnwu.github.io/Magisk/install.html
The proper way is the "Patching Images" way. Do that with the lineage recovery image that you used earlier and just reflash it again via fastboot.
( You will find many other tutorials telling you to do the "Custom Recovery" way, but that is outdated, not recommended and didn't actually seem to work for me. )
Passing SafetyNet
Once you have Magisk installed, the first step is to make sure to enable "MagiskHide" in the Magisk settings.
After that you need to install "MagiskHide Props Config" which can be found in the default modules of Magisk.
Follow the official guide with the goal of installing a certified fingerprint for the Xiaomi Mi A2: https://github.com/Magisk-Modules-Repo/MagiskHidePropsConf/blob/master/README.md#installation
Google Camera
Since there sadly isn't a port of the stock camera app for custom ROMs, the best alternative is a Google Camera mod.
Stable versions can be found here: https://www.celsoazevedo.com/files/android/google-camera/dev-suggested/
It seems to be a bit random which version works best or at least doesn't instantly crash, so try out a couple of the newest ones.
For me personally the most stable one seems to be Nikita's 7.4 v2.0 with the correct config file loaded.
Updating LineageOS
LineageOS offers an integrated update function ( see: https://wiki.lineageos.org/devices/jasmine_sprout/update ) which works pretty well.
However sometimes the second phase of the installation ( "Finalizing package installation" ) seems to get stuck at 0%, but it's not stuck it just takes a while (~15 mins).
After the update is completed do not press the “Restart now” or “Reboot” button!
You first need to also re-install Magisk (Magisk app → Install → Install to Inactive Slot (After OTA)).

State of Custom Roms

hey there,
i was using custom roms back in the day with my oppo find 7, so android 7ish. Back than maintaining custom roms was a major pain in .... because, at least for me, i needed to full flash every time there was an update and most roms were kind of buggy as well.
Since my 9t is being annoying lately (EU 12.0.5) with shutting down apps way to often/fast, forgetting logins, making backups everywhere, switching back to light mode, no idea how to do a proper cleanup without deleting half my app settings etc. I was wondering what the state of the custom rom is nowadays.
I was thinking about getting something smaller, but since the pixel 5 is out of sale, the zenfone 8 missing wireless charge and no real alternative and all of them are more than 600 bucks, so i dont want to get a new phone tbh, prices are out of this world imho. Also iam quit pleased with the device itself, i.e. battery, performance, everyday stuff
so basically here is what i want to know:
How are updates handled in Pixelexperience or lineage?
how hard/easy is installation?
is google pay working?
is there a relyable way to make a full backup of my phone to go back to as is now?
did anybody experience the mentioned issues and maybe has a solution?
bonus qquestions
is there any major improvement in upcomming MIUI Versions(12.1, 12.5) and a roadmap of rollout?
what does SOT mean?
thanks in advance
for updates you may have to re flash the newer rom.
2. installation is easy given you know how to do it.
3. google pay is working fine.
4. twrp is the way, but believe me you won't aspire to go back.
5. I am running pixel experience rom on MI A2 device, the device is working great.
*/learn from youtube properly how to flash recovery, install rom for your device */
best of luck
I'm on Xiaomi.eu Stable (did use Weeklies for 6 months) - daily driver / business phone
If you like MIUI, you have A11, MIUI 12.5, debloated, all stable
You only flash ROM from TWRP (of course, first time, when switching to, Format Data is mandatory).
Later they have like OTA mechanism (Updater downloads ROM in zip, reboots to TWRP and upgrades)
not sure if i really like miui or not, thats why i was eyeing pixel/zenfone, i was pretty happy with my Mi A1 before the 9t
wouldnt a twrp backup break my safety net? if i remember correctly i need to unlock/root
suraj123 said:
2. installation is easy given you know how to do it.
Click to expand...
Click to collapse
well i knew it, but it has been ages
Abudinka said:
not sure if i really like miui or not, thats why i was eyeing pixel/zenfone, i was pretty happy with my Mi A1 before the 9t
wouldnt a twrp backup break my safety net? if i remember correctly i need to unlock/root
well i knew it, but it has been ages
Click to expand...
Click to collapse
For flashing any other ROM you need to unlock Bootloader - and that breaks Safety Net, not TWRP folder or so
However, Xiaomi.eu has built-in patch to pass SafetyNet with no need for Magisk, any Magisk module, anything
I.e., you switch to Xiaomi.eu (with Bootloader unlocked), no need to install Magisk and any of the modules like USNF, MHPC, etc) and you have SafetyNet, Device Certified in Google Play.
Also Widevine L1 and Netflix really plays in FullHD, HDR-10
And if you need Magisk for something else, you just enable MagiskHide and you still have SafetyNet etc.
No troubles here with SafetyNet
how much free space do i need for a twrp backup? most likely half of the internal space i guess.
so basically for every other rom besides xiami.eu i need to worry about safety net with magisk or similar?
I have TWRP Nandroid backup of 15 GB, but most of that is Data.
You don't need the backup for installing/updating the ROM.
That's only for your comfort
But I put it to PC and delete from the phone (if really needed, TWRP can also connect to PC and you can copy it back to phone before restoring)
I never needed to restore
And one more but very important thing
TWRP (backup) has NOTHING with SafetyNet. SafetyNet DOES NOT look do you have TWRP folder, or do you have Magisk app/mngr (I'm not talking about thevMagisk core/service but apk)
Unfortunately, there are too many unknowledgeable people writing that and similar nonsense elswhere
Problem is (and that's the reason why it might look 'similar' from the end user's point of view) that various banking apps, ganes and so, use VARIOUS methods and in some cases even speculative GUESSES trying to find if your device is SAFE for their apps and businesses (whatever that means for somebody), or is your phone 'rooted' (also in the very loose sense)
Those methods and guesses may include:
- Testing SafetyNet (framework provided by Google, partly in Google Play Services and partly on Google servers).
Fornally, when Bootloader is unlocked and/or with custom ROM (not certified with Google) or rooted (stock) ROM , you *should* fail SafetyNet - but there are methods to trick Google and still to pass SafetyNet.
Actually, to flash any such nod (custom ROM or recovery, or root, you first need to unlock Bootloader - and that's the first thing that SafetyNet looks for, but on some phones and ROMs it is possible to fool even the Google's SafetyNet)
That's the reason why thosre apps combine various other methods trying to find (or just to guess) if your phone is 'safe' or not
Some use sofisticated methods looking for su in the path or modified init.rc, or bypass Magisk Hide acting as isolated processes - that way finding the gllitches in MagiskHide making them possible to detect Magisk
But some use very PRIMITIVE guesses:
- If they find TWRP folder, they 'conclude' you 'must' be having TWRP, hence your Bootloader 'must' have been unlocked and you might have been flashed the root or custom ROM, hence they simply declare your phone as 'unsafe' or "rooted'.
But you could take 100% stock and not-modded phone and just create there a folder named TWRP on Internal memory - and your phone will fail their 'safety' pass (but not the Google's SafetyNet)
- Similarly, some just look if they find that the com.topjohbwu.magisk package installed (being Magisk apk, but that is not Magisk as core/service).
Again, you can take 100% stock, not-modded phone and just install there the Magisk apk (maybe, because you wantef to use its built-in SafetyNet checker), and those apps will declare your phone was 'rooted' - which is again total nonsense
On the other side, that is all about statistics. There will be let's say 0.001% of people who do have TWRP folder but not custom TWRP recovery and similarly 0.005% people who do have Magisk app but no Magisk
On the other side, 90% of people who do have custom Recovery will also have TWRP folder and 60% of people with Magisk service/core will also have Magisk app (formerly mngr) - the rest 40% of Magisk users will have hided/obfuscated/repackaged Magisk app (therefore, it cannot be found under the com.tophohnwu.magisk package name)
Hence those apps (and their developers, or better to say those who paid those developers to implemen that GUESSES) can take them rights to declare the phones with TWRP foldersor Magisk app installed as 'unsafe'
Those 1-5 users out of 100000, who by incidence do have TWRP folder (but no custom recovery) or Magisk app (but no Magisk) - bad luck, who cares about them
On the other side, that guesses (since they didn't come up with anything more sofisticated) will make them possible to catch 500 users with TWRP or Magisk, who tricked the Google's SafetyNet (but didn't even think about that primitive possibilities to 'catch' them)
thanks for the explanation, i most likely have a look this evening. Still, most app data will be lost when switching to pixel experience i assume
Abudinka said:
thanks for the explanation, i most likely have a look this evening. Still, most app data will be lost when switching to pixel experience i assume
Click to expand...
Click to collapse
Please find and read instructions for switching to the (custom) ROM - they can be found elswhere
An important and a MUST step is Formatting Data (that also formats Internal memory). Hence not 'most' but ALL user spps, their settings, your data like photos, contacts, Wifi passwords and everything will be wiped
Read and learn about what and how can be backed up. Good luck
im fully aware, that switching to another rom needs a full wipe and therefore loss of all data if not backup'ed.
I was more hoping one could provid a link and/or recommend something convienent.
And one more point. You must first unlock Bootloader - find where/how, apply for and you will need to wait 7 days
Unlocking bootloader performs Factory reset. However, at that time you are still on MIUI and you can use Xiaomi Cloud to backup and restore upon Factory resetting
(Once you unlock Bootloader, you can make Nandroid backups in TWRP but you cannot restore to custom ROM what you backed-up from MIUI, or vice versa
Once you switch to your custom ROM (and potentially root), you can use some apps for backing up and restore - but avoid the old and outdated Titanium
Hence I don't really see a point in TWRP backups, only just-in-case, for restoring the last working point in case of (soft) brick cases
zgfg said:
(Once you unlock Bootloader, you can make Nandroid backups in TWRP but you cannot restore to custom ROM what you backed-up from MIUI, or vice versa
Click to expand...
Click to collapse
Thanks alot again for the detailed explanation. This was the detail i was looking for. so basically its impossible to avoid losing app settings which are not saved in cloud and assigned to an app account.
The hint about miui backup/xiaomi cloud comes in handy as well. Also regarding the delayed bootload unlock, if it really takes up to 30 days (as stated on the pixelexperience install guide), maybe the Sony event on 26th brought something interessting
Abudinka said:
Thanks alot again for the detailed explanation. This was the detail i was looking for. so basically its impossible to avoid losing app settings which are not saved in cloud and assigned to an app account.
The hint about miui backup/xiaomi cloud comes in handy as well. Also regarding the delayed bootload unlock, if it really takes up to 30 days (as stated on the pixelexperience install guide), maybe the Sony event on 26th brought something interessting
Click to expand...
Click to collapse
It usually takes (and not from recently) exactly 168 hours = 7 days, no more or less.
There are also threads here on XDA about
Unless Xiaomi just recently changed the policy, but that could also depend on models
SOT = screen on time

Categories

Resources