Play Pokemon Go with a Custom Rom or Root - LineageOS 19 / Android 12 How To

Discussion in 'Mobile Devices' started by InsaneNutter, Mar 3, 2019.

  1. InsaneNutter

    InsaneNutter Resident Nutter Staff Member

    Joined:
    Jun 1, 2007
    Messages:
    11,906
    Likes Received:
    3,613
    Location:
    Yorkshire, England
    Pokemon Go doesn’t like custom Android roms, or even stock roms with root access enabled. For whatever reason Niantic think people who have custom roms or root on their Android device must obviously be cheating and there for locked out of playing the game.

    I’ve personally used custom roms since 2010 on various Android devices to keep them up to date with the latest Android versions and security patches, long after the manufacturer has stopped supporting the device. In addition, having got used to all the nice tweaks, customisation and privacy features custom roms offer, I’d find it hard to go back to stock Android now as its quite limited in comparison.

    Whatever your reasons are, this is how I have Pokemon Go working on a OnePlus 5T running LineageOS 19 based on Android 12. The same should apply to most Android devices however. If you have viewed this guide in the past then I have updated it to accommodate newer versions of Magisk which no longer have the ability to pass Google's SafetyNet by default. However that is really not an issue as their is a Magisk plugin to replicate the old functionality removed in newer versions of Magisk.

    1. First you need to install Magisk - i’d suggest reading the Magisk documentation as this will vary from device to device, so it's impossible for me to give a step by step everyone can follow here.

    However if you have a custom rom / recovery installed its usually a case of booting in to your recovery (TWRP is the most popular) and flashing Magisk to your custom rom. You can still install OTA updates with Magisk installed as its systemless, meaning you can also keep root when updating. Bonus!

    I’d also recommend making a full backup of your device first too.

    After you have installed Magisk, load the Magisk Manager app up and go to settings, which is the cog in the top right:

    pokemon-go-custom-rom-linage-os-root-magisk-safetynet-1.jpg

    You want to hide the Magisk app, even if you can pass SafetyNet apps such as Pokemon Go will try to figure out if Magisk is installed or not and refuse to work if so:

    pokemon-go-custom-rom-linage-os-root-magisk-safetynet-2.jpg

    It's possible you will have to give Magisk permission to install unknown apps, do this, then go back and Give the Magisk app a random name, granting root permission when requested:

    pokemon-go-custom-rom-linage-os-root-magisk-safetynet-3.jpg

    Next you want to download two Magisk plugins somewhere to your phone.

    1: Universal SafetyNet Fix - This module works around hardware attestation by forcing basic attestation and recent updates to SafetyNet CTS profile checks.
    2: MagiskHide Props Config - This allows you to change your phones prop to a valid one which is certified by Google, this will allow us to pass the SafetyNet CTS Profile check on a custom rom. If you are not running a custom rom and just rooted with Magisk on the stock rom this might not be required.

    Now load your newly hidden Magisk and select Modules at the bottom right, then select install from storage:

    pokemon-go-custom-rom-linage-os-root-magisk-safetynet-4.jpg

    Click the three arrows in the top left and choose Downloads (or wherever you saved the plugins to on your phone):

    pokemon-go-custom-rom-linage-os-root-magisk-safetynet-5.jpg

    Simply click on the zip file for Universal SafetyNet Fix and the plugin will install, reboot the phone when asked and then do the same for MagiskHide Props Config.

    The end result should be you have both Universal SafetyNet Fix and MagiskHide Props Config installed.

    Now load Magisk up and click the settings cog in the top right again, scroll down and enable Zygisk and Enforce the DenyList:

    pokemon-go-custom-rom-linage-os-root-magisk-safetynet-6.jpg

    Then click Configure DenyList and select Pokemon Go, I'd also recommend you also deny the Google Play Store, Google Service Framework and Google Pay (if you plan to use Google Pay on your device):

    pokemon-go-custom-rom-linage-os-root-magisk-safetynet-7.jpg

    Now you want to download Termix from the Google Play Store if you don't already have a Terminal Emulator installed, this will allow us to configure the Magisk Hide Props Config plugin we installed earlier.

    Essentially MagiskHide Props Config is a script that will allow you to change your devices fingerprint to what it should be if you had no custom rom installed. Some custom roms do this automatically so this is not an issue, however LineageOS doesn't.

    Type su in to the Terminal Emulator and grant Termux root when asked to:

    pokemon-go-custom-rom-linage-os-root-magisk-safetynet-8.jpg

    Type props in to the Terminal Emulator and MagiskHide Props Config should be loaded, then press 1 to edit the devices finger print:

    pokemon-go-custom-rom-linage-os-root-magisk-safetynet-9.jpg

    Press f to choose a certified fingerprint for your device:

    pokemon-go-custom-rom-linage-os-root-magisk-safetynet-10.jpg

    You need to choose a fingerprint that matches the version of Android your device is on, e.g. if you are on Android 12 you need an Android 12 fingerprint.

    However chances are if you are running an Android 12 custom rom and your device stopped getting updates from the manufacturer with Android 10, such as the case with the OnePlus 5T, then they will be no certified fingerprint for your specific device.

    However that is not a problem, we can simply use a finger print from a Google Device with Android 12, as their will always be a Google device with the latest version of Android.

    So for example type the number to choose Google, then choose a fingerprint which matches your Android version. So as i'm on Android 12 I chose "29" for the Pixel 6 Pro, as this had a certified Android 12 fingerprint available:

    pokemon-go-custom-rom-linage-os-root-magisk-safetynet-11.jpg

    Apply the fingerprint and press y to reboot when prompted:

    pokemon-go-custom-rom-linage-os-root-magisk-safetynet-12.jpg

    Now we can download YASNAC (short for Yet Another SafetyNet Attestation Checker) and check we are passing SafetyNet ok.

    As you can see below we pass both the basic integrity and CTS profile checks:

    pokemon-go-custom-rom-linage-os-root-magisk-safetynet-13.jpg

    Finally go Settings > Apps > See all apps > Pokemon Go > Storage and cache and clear both the storage and cache. If you have loaded the game up before passing SafetyNet the game will refuse to let you sign in, regardless of if the phone now passes SafetyNet.

    pokemon-go-custom-rom-linage-os-root-magisk-safetynet-15.jpg

    Settings > Apps > See All Apps > Google Play Service and click on Storage and Cache. After that click on Manage Space > Clear All Data.

    Settings > Apps > See All Apps > Google Play Store and click on Storage and Cache, then clear storage.

    It's also worth mentioning if you have any files / folders called Magisk on your SD card / internal memory Pokemon Go seems to be able to detect these, so these should be deleted.

    After this you should be able to play Pokemon Go without issue with a custom rom flashed to your phone, or root enabled.

    pokemon-go-custom-rom-linage-os-root-magisk-safetynet-14.jpg

    This is essentially the process I've done for several years on various LineageOS versions, it should work great on LinageOS 19.1 / Android 12 and all previous versions of Android.

    Happy catching trainer!
     
    Last edited: Jul 2, 2022
    theSLAYER, Nimrod and Hassan_BH like this.
  2. Sychosid8

    Sychosid8 New Member

    Joined:
    Jun 23, 2019
    Messages:
    2
    Likes Received:
    0
    What if i have a installed a stock rom but it is not rooted?

    Will pokemon go still block me?
     
  3. InsaneNutter

    InsaneNutter Resident Nutter Staff Member

    Joined:
    Jun 1, 2007
    Messages:
    11,906
    Likes Received:
    3,613
    Location:
    Yorkshire, England
    If you have flashed the stock rom from the manifacturer to the phone and its not rooted, Pokemon Go should work.

    Keep in mind i'm presuming the stock rom has the Google Play services installed, if you have purchased a chineese version of a phone (and not an international version) these likly won't as Google is banned in China.

    Whatever rom you have, stock or custom needs to firstly pass Google's Safteynet and secondaly needs to have the fingerprint of the stock rom for your device.
     
  4. Sychosid8

    Sychosid8 New Member

    Joined:
    Jun 23, 2019
    Messages:
    2
    Likes Received:
    0
    Thanks for the info.. I'll be unlocking the bootloader this thursday and flash the rom Same day.. Hope it works and if it doesn't i guess i will try the magisk option
     
  5. dafaher

    dafaher New Member

    Joined:
    Jul 26, 2019
    Messages:
    1
    Likes Received:
    0
    Hello everyone, I'm really sorry to bother you guys. I have a rooted device with a custom rom (LineageOS 13), and when I try to play Pokemon Go, it says: "The device, OS or software is not compatible with Pokemon Go".

    I installed Magisk 19.3 for the first time and it seems to be working fine, I'm even passing both the ctsProfile and basicintegrity checks. But I still can't play the game because the same message is shown. Then, I've been told to download MagiskHide Props Config to increase protection but when I try to "edit device fingerprint" my Samsung device isn't listed. I decided to try the "improved hiding" directly, it rebooted my device and I could finally enter the game but it still shows the same message. What should I do?

    Thanks in advance for any advice or suggestion!
     
  6. InsaneNutter

    InsaneNutter Resident Nutter Staff Member

    Joined:
    Jun 1, 2007
    Messages:
    11,906
    Likes Received:
    3,613
    Location:
    Yorkshire, England
    If you have any folder on your phone internal memory or sd card called Magisk ensure you delete that as the game is programmed to look for it.

    Have you hidden Magisk manager also as described above? that's usually the one I sometimes forget to do if I flash a new rom and wonder why the game randomly stops working after a few seconds.

    After you have done that force close the game and clear the cache and data, once the game has displayed the device incompatible error it will never work again until you clear the data / cache in my experience.

    If your device passes the ctsProfile test you shouldn't need to anything with Magisk Hide Props Config, its mainly newer devices that need to do this. I suspect your device doesn't if your on a much older version of LineageOS. You can manually edit this for your device though, however you will need to find out from someone with a stock rom what this should be (Asking on the relevant sub form for your device on XDA Developers should get you the answer want) however i'm not convinced you actually need to do this based on what you have said, although it can't hurt to try.
     
    Hassan_BH likes this.
  7. darksepho

    darksepho New Member

    Joined:
    Aug 29, 2019
    Messages:
    4
    Likes Received:
    1
    Hi, I tried this and it worked only the first time I started the game, now it keeps giving me the error.
    Do I need a fingerprint matching my phone model? Mine is not present (Moto G 2014 LTE) so I used another motorola in the list.
    If yes, is there a way to add it?

    EDIT
    I'm using Pie not Lineage so I skipped the privacy guard part, is it important?
     
    Last edited: Aug 29, 2019
  8. InsaneNutter

    InsaneNutter Resident Nutter Staff Member

    Joined:
    Jun 1, 2007
    Messages:
    11,906
    Likes Received:
    3,613
    Location:
    Yorkshire, England
    Do you pass both safteynet checks with the fingerprint from the other device? if yes then you might be ok, however i've a feeling that could be the reason if you have done everything else i've described.

    Ensure you have no Magisk folder on your SD card or internal memory, as the game is programmed to detect theses.

    Also did you go to the Magisk settings menu and "Hide Magisk Manager"? that's something i've forgot to do more than once.

    It shouldn't matter if you don't have LineageOS, however some custom roms seem to randomly fail safteynet in my experience, I have never had this issue with LineageOS, so if you have trouble it's worth trying if your experienced with flashing roms. I find LineageOS far better than stock Pie, however that's of course subjective.
     
  9. darksepho

    darksepho New Member

    Joined:
    Aug 29, 2019
    Messages:
    4
    Likes Received:
    1
    Yes it passes all tests and I've hidden magisk.
    The only thing with "magisk" in its name was the zip file, now I deleted it but it's still happening.
    Also I've noticed that deleting app's cache and data sometimes is enough to make it work again, sometimes it's not and the only thing that works is changing fingerprint again to another "random" version (I'm trying different Motorola fingerprints), that's what is making me think that maybe it detects a mismatch or something.

    I guess I'll try flashing lineage and see if anything changes, I was using Pie because lineage is no longer maintained for this device (yeah it's a bit old I know, but I'd like to use it for an alt account for raids..)
     
  10. darksepho

    darksepho New Member

    Joined:
    Aug 29, 2019
    Messages:
    4
    Likes Received:
    1
    ok I've flashed lineage but I'm having some problem with magisk, now I can't make it pass the tests, I don't know why.
    BUT it's kind of working anyway, the game doesn't seem to keep track of the os error, so I can simply restart without clear cache. (could be thanks to privacy guard? I disabled some access rights on the game)
    Sometimes it starts, sometimes it gives me the error, i'd say 50-50.
    For my use case it's good for now, I'm tired of setting everything up so I'll keep it this way lol

    Thanks for your guide btw
     
  11. InsaneNutter

    InsaneNutter Resident Nutter Staff Member

    Joined:
    Jun 1, 2007
    Messages:
    11,906
    Likes Received:
    3,613
    Location:
    Yorkshire, England
    I suspect it is to do with the fingerprint as i've never had that issue on the devices i've owned, hard to truly say with so many Android devices out there. That is the only thing that I can think is possibly the problem based on what you have said. When messing about with Android on my Nintendo Switch and using a fingerprint from the Nvidia Shield tablet (similar hardware) just caused safetynet to outright fail.

    If all your using it for is an alt account in raids i'm guessing the stock rom is too old to play the game? if not i'd just use that as it should pass safetynet ok.

    I have an alt account on an Mi A1, it's pretty cheap device that plays the game fine. I mainly use that for raid backup when we don't have the numbers, although its been pretty handy for doing a Rayquaza Duo this month.
     
  12. darksepho

    darksepho New Member

    Joined:
    Aug 29, 2019
    Messages:
    4
    Likes Received:
    1
    Yeah I'll give it a look but I think that the stock rom is too old.
    Yep I made the account to take down gyms and get the daily gold (I live in a small town.. I kept a gym for like 20 days in a row once) but switching account on my main device every time is a pain and also yes, I would like to start using it in raids.
    I'm going to try a couple of different roms maybe and see what happens, otherwise I'll wait for christmas and get a new phone so I can use my current one for the alt lol
     
    UndeadxReality likes this.
  13. Revi

    Revi New Member

    Joined:
    Apr 15, 2020
    Messages:
    1
    Likes Received:
    0
    I have such a problem that I just passed these tests, set up the guard, cleared the data and after a few seconds I still got an error( I have RR-OS on S3 GT-I9305(7.1.2))
     
  14. InsaneNutter

    InsaneNutter Resident Nutter Staff Member

    Joined:
    Jun 1, 2007
    Messages:
    11,906
    Likes Received:
    3,613
    Location:
    Yorkshire, England
    If you have a folder on the internal memory or SD card called Magisk, TWRP or TitaniumBackup Pokemon Go will now also look for these and refuse to work, even on non rooted phones.

    Something worth checking. I can conform I can still play fine with Magisk installed however.
     
  15. bandochlucas

    bandochlucas New Member

    Joined:
    Jul 23, 2020
    Messages:
    1
    Likes Received:
    0

    hi man, i know it's been a while since you posted this help, but i found it and followed all the steps, but Magisk keep failing at the SafetyNet tests. :/
    i'm trying to play in a Moto G5S with LOS 16
     
  16. InsaneNutter

    InsaneNutter Resident Nutter Staff Member

    Joined:
    Jun 1, 2007
    Messages:
    11,906
    Likes Received:
    3,613
    Location:
    Yorkshire, England
    What do you fail on?

    basicintegrity
    ctsProfile

    You phone might also support SafetyNet’s hardware attestation as it was released in 2017, you can read more about hardware attestation here. Essentially with hardware attestation it's no longer possible to hide that you have an unlocked bootloader, meaning you will fail to pass SafetyNet regardless of what you do. (Be careful locking the bootloader with a custom rom installed as you can brick some devices doing this.)

    Some phones can lock the bootloader with a custom rom installed (such as the OnePlus 5T for example) however a lot of phones can't do this. You'd have to reaserch this on XDA and see if its possible for your device. The ability to pass SafetyNet with a custom rom on a lot of devices will be coming to an end sadly, which is rather annoying as someone who's used CyanogenMod / LineageOS for almost the last decade.

    Some phones also have buggy hardware attestation checks so can currently still pass SafetyNet as Google hasn't enabled hardware checks on these devices. (A lot of OnePlus devices and some Xiaomi devices for example).
     
  17. InsaneNutter

    InsaneNutter Resident Nutter Staff Member

    Joined:
    Jun 1, 2007
    Messages:
    11,906
    Likes Received:
    3,613
    Location:
    Yorkshire, England
    This tutorial has now been updated for the latest version of Magisk and includes the steps to install the following Magisk plugins:

    1: Universal SafetyNet Fix - This module works around hardware attestation by forcing basic attestation and recent updates to SafetyNet CTS profile checks.
    2: MagiskHide Props Config - This allows you to change your phones prop to a valid one which is certified by Google, this will allow us to pass the SafetyNet CTS Profile check on a custom rom. If you are not running a custom rom and just rooted with Magisk on the stock rom this might not be required.

    The end result is you can pass SafetyNet on the latest Magisk 25.1 and beyond, the same as you could with older versions of Magisk.

    Working fine on LineageOS 19 / Android 12 on my OnePlus 5T.
     

Share This Page