Related
Hello everybody, this is my first post on XDA!
I have a OnePlus 5T previously on OxygenOS (Pie). I wiped then flashed ResurrectionRemix 7 (also Pie). Almost everything work well, Magisk needed additionnal files to work but is now OK.
But the Lineage "Trust" menu tell me that SELinux is set to permissive. And the SafetyNet does not pass (CTS Profile false, basicIntegrity OK), so I can't use my phone to pay with Google Pay anymore.
So, after hours of searching and testing solutions, I created the file "08setperm" into /etc/init.d folder, with the command "setenforce 0".
It worked, "Trust" show that SELinux is enabled but the SafetyNet check were still the same. And my fingerprints were not recognized anymore (the pression is detected but does not match). Same after setting SELinux to permissive mode as it was since ResurrectionRemix were installed. I tried to delete the saved fingerprints. Then, I was not able to use the fingers that I use before, but with another finger it was OK. I resolved the problem by deleting the folder /data/system/users/fpdata and settings_fingerprint.xml.
I'm stuck on this point, if someone know where the problem is..
(My apologies for my approximate english, i'm french)
Thank you all for taking time to read and help me
My company is now enforcing and managing BYOD with AirWatch. I'm trying to enrol my Magisk-rooted Pixel 2 XL. I've searched around XDA and other sites and I was able to enrol the phone when I use Magisk Hide to hide from the AirWatch agent, aka now the Intelligent Hub. It creates a Work profile and installed several work related apps. The only other app aside from Intelligent Hub I've tested so far is Boxer and it works for the few minutes during my test.
When I say Boxer works for a few minutes, that is because next I attempted to open Workspace One. As it loads, I'm guessing it checks other details about the phone, then it would popup a message saying Work apps and profile removing because the device is "compromised" and uninstall the work apps and Word profile.
I would like to use Magisk Hide and hide from Workspace One app, but Magisk Hide doesn't even list that and other apps in the Work profile. An admin at work checked the AirWatch server and it shows the device compromised detection with the status "Malicious file found - Check files in system or exec folder".
So my question is, outside of troubleshooting step by step from wiping phone and setting up each thing from scratch, anyone else have an insight on what else I can check?
FYI, these are the following setup I have on my phone
- Pixel 2 XL
- Rooted with latest version of Magisk and Manager
- Latest Pie 9.0 Aug 2019 Update
- Magisk Modules Installs: Busybox, Viper4Android
- Apps with Root Access: AdAway, BetterBatteryStats, Franco Kernel Manager, Material Terminal, Titanium Backup
s0l1dsn8k3 said:
My company is now enforcing and managing BYOD with AirWatch. I'm trying to enrol my Magisk-rooted Pixel 2 XL. I've searched around XDA and other sites and I was able to enrol the phone when I use Magisk Hide to hide from the AirWatch agent, aka now the Intelligent Hub. It creates a Work profile and installed several work related apps. The only other app aside from Intelligent Hub I've tested so far is Boxer and it works for the few minutes during my test.
When I say Boxer works for a few minutes, that is because next I attempted to open Workspace One. As it loads, I'm guessing it checks other details about the phone, then it would popup a message saying Work apps and profile removing because the device is "compromised" and uninstall the work apps and Word profile.
I would like to use Magisk Hide and hide from Workspace One app, but Magisk Hide doesn't even list that and other apps in the Work profile. An admin at work checked the AirWatch server and it shows the device compromised detection with the status "Malicious file found - Check files in system or exec folder".
So my question is, outside of troubleshooting step by step from wiping phone and setting up each thing from scratch, anyone else have an insight on what else I can check?
FYI, these are the following setup I have on my phone
- Pixel 2 XL
- Rooted with latest version of Magisk and Manager
- Latest Pie 9.0 Aug 2019 Update
- Magisk Modules Installs: Busybox, Viper4Android
- Apps with Root Access: AdAway, BetterBatteryStats, Franco Kernel Manager, Material Terminal, Titanium Backup
Click to expand...
Click to collapse
The following works but I am not sure if all the steps are crucial and which ones may be superfluous. Those instructions in (parentheses) may be not necessary).
I am not a programmer (Basic on a C-64 doesn't count, I take it), don't know anything about computer architectures etc., just able to follow instructions and wrap my mind around them to tweak my devices.
The main part is to "Hide Magisk Manager" after Boxer is installed (but before it is opened/setup) as that also creates another Magisk app (instance?) with the new name for the work profile where Boxer etc. show up and can be hidden with Magisk Hide.
The other (first) part is to hide anything that would alert and conflict with Hub before or during setting up the work profile - I pretty much hid everything under Magisk Hide...
I don't know BYOD nor Workspace One, so the solution below may not work.
- uninstall Hub (that's the only app remaining after the auto-uninstall, right?)
- if Magisk Manager is already hidden: go to Settings\Restore Magisk Manager "with original package and app names" - that seems to be important, as hiding it later and with another name will then also create a Work Profile where one can see and click and hide the work profile apps such as Boxer (not sure if it works the other way around, i.e. starting off hidden with a different name and then later restoring to original will create a Magisk work profile)
- Magisk Hide: click almost every system app, not just the Google ones, but almost everything, camera, calendar, contacts etc. and your phone maker's versions as well (not sure what is necessary, but only Google system apps didn't seem to do it...), also all root and SU related apps like BusyBox etc. (not sure what Hub looks for)
(- System\Apps > clear storage data for Google Play Store and other Play Apps, also make sure Hub is really uninstalled. If not or having problems at least clear data storage as well)
- reboot (can also go into TWRP and wipe cache/Dalvik, not sure if necessary)
- install Hub, don't open it
- open Magisk, go to Magisk Hide: click Hub
(- close Magisk)
(- reboot)
- open Hub, let setup run its course creating the work profile
- if there are conflicts showing in Hub (and/or on your employer's MDM website for your device), e.g. root certificate not installed, don't install any apps yet such as Boxer etc. and reboot instead
- Are those conflicts resolved after reboot?
- install Boxer and other apps (trough Hub itself, MDM website push (or Google Play)) but don't open/start them
(- reboot)
- open Magisk, go to Settings\Hide Magisk Manager and click on it, pick a name and confirm: this will then change the name of Magisk AND create a another Magisk app (with the new name) for the work profile.
- open that new Magisk work profile and go to Magisk Hide: click Boxer (and other apps controlled by Hub); Hub itself and everything already hidden in the private (= non-work) profile Magisk app should show up here as already hidden. Double and triple check.
(- reboot)
- open Boxer and start set-up
That's it. Stable, even after another reboot.
Did this solution work for you @s0l1dsn8k3?
I am in a similar boat. @s0l1dsn8k3 please let me know if you found an alternate solution.
I am in a similar boat. @s0l1dsn8k3 please let me know if you found an alternate solution.
I can't use a credit card via google pay. Google pay writes that I have a root device even though it is marked in magisk in exceptions.
Magisk show - safety net verification error.
Please help.
Thanks
jkmaxfli said:
I can't use a credit card via google pay. Google pay writes that I have a root device even though it is marked in magisk in exceptions.
Magisk show - safety net verification error.
Okrasné help.
Thanks
Click to expand...
Click to collapse
You have to hide it fully in magisk. And then reboot
Are you using stock rom? Or any other custom rom? If you can't pass safetynet, Magisk hide doesn't "hide", so we have to locate the error.
I using Stock Rom.
Fully hide, reboot And nothing change.
Flash magisk module and you will be ok
https://github.com/kdrag0n/safetynet-fix/releases/download/v1.1.1/safetynet-fix-v1.1.1.zip
In Google Play:
Certification play protect - the device is not certified.
what should I do with it now
hexisg said:
Flash magisk module and you will be ok
https://github.com/kdrag0n/safetynet-fix/releases/download/v1.1.1/safetynet-fix-v1.1.1.zip
Click to expand...
Click to collapse
Thanks ill try it
after flashing the module test your safetunet status.
after clear data of Goole Play Store , google Services and google Pay.And you should be good to use Google Pay.
Safety net is successful, Google play is also successful, but the payment card cannot be added - error:
request failed - transaction could not be performed. When adding a credit card.
Edit:
...the current credit card cannot be removed, it is said to be associated with some one payment method. I wanted to try removing it completely and signing in again. :-(
jkmaxfli said:
Safety net is successful, Google play is also successful, but the payment card cannot be added - error:
request failed - transaction could not be performed. When adding a credit card.
Edit:
...the current credit card cannot be removed, it is said to be associated with some one payment method. I wanted to try removing it completely and signing in again. :-(
Click to expand...
Click to collapse
Try deleting all data a of Google Play Services and Google Pay app, restart the phone, and try if you u can do it now
I tried that, unfortunately no change.
Try this:
Working: Magisk with Google Pay as of gms 17.1.22 on Pie
Ok. I tried this and it worked on gms 17.1.22, allowing one to add cards and pay in store. Warning YMMV, but this is the process I did to get this working. One caveat is that I suspect users will have to reverse some step if gms is updated and...
forum.xda-developers.com
Release GPay SQLite Fix v2.4 · stylemessiah/GPay-SQLite-Fix
Changes to service.sh: -Fixed broken/mangled pipes that left the log file blank - dont ask me why If you need logging (only useful if youre having an issue and want to troubleshoot) you can choose ...
github.com
UnderscoreKer said:
Try this:
Working: Magisk with Google Pay as of gms 17.1.22 on Pie
Ok. I tried this and it worked on gms 17.1.22, allowing one to add cards and pay in store. Warning YMMV, but this is the process I did to get this working. One caveat is that I suspect users will have to reverse some step if gms is updated and...
forum.xda-developers.com
Release GPay SQLite Fix v2.4 · stylemessiah/GPay-SQLite-Fix
Changes to service.sh: -Fixed broken/mangled pipes that left the log file blank - dont ask me why If you need logging (only useful if youre having an issue and want to troubleshoot) you can choose ...
github.com
Click to expand...
Click to collapse
Dont work :-(
So for now, to sum it up:
magisk safety net is pass-ok.
In magisk I have two fix modules (screenshots) and google pay adding a credit card still not working. Still error OR-TAPSH-08.
I also read on the net that it helped someone wait 1 day and then the payment card went to add.
Next:
when I run clean and select the security check, it turns out to me that there is a problem in the payment environment.(screenshots)
jkmaxfli said:
Dont work :-(
So for now, to sum it up:
magisk safety net is pass-ok.
In magisk I have two fix modules (screenshots) and google pay adding a credit card still not working. Still error OR-TAPSH-08.
I also read on the net that it helped someone wait 1 day and then the payment card went to add.
Next:
when I run clean and select the security check, it turns out to me that there is a problem in the payment environment.(screenshots)
Click to expand...
Click to collapse
Not trying to be mean or anything but, have you enabled magisk hide?
Uninstall universal safety net fix first and restart.
IMPORTANT: Make sure that you are running the latest version of magisk.
Make sure hide is on and you have selected all core Google services and gpay.
Then install magiskhide props config and restart.
Install an command terminal from the play store and type "props". You may have to enter "su" first.
Type "1" then “f”
Then follow the steps to select your phone model.
Then apply the fingerprint and restart.
If you cannot find your phone model, then ignore this step.
Go into magisk settings and click on the option to hide the magisk app. The app should reinstall itself under the "settings" name.
Restart again.
Then, turn data and WiFi off, go into settings and clear the storage/data of all Google apps and especially Google play services. Then just reflash the gpay fix (DON'T RESTART). Turn connection back on and try to add your cards as well as any nfc setup for those cards.
Then restart your phone.
Then go into Google play store, and into settings, and ensure that the device is certified.
This allowed me to get gpay working, however, I'm running a custom rom though.
You may want to carry your cards physically in case the phone doesn't work for the first month or so.
Hello.
I have a magisk hide.
For the item google services framework, if I check, after leaving and re-entering the already checked google services framework is not, the check mark does not hold.(screenshot)
jkmaxfli said:
Hello.
I have a magisk hide.
For the item google services framework, if I check, after leaving and re-entering the already checked google services framework is not, the check mark does not hold.(screenshots)
Click to expand...
Click to collapse
Hi, sorry, I had to edit my reply several times.
Just enable them all just in case. For the 2nd screenshot, enable the hide thing. I have it enabled so the option says to restore it.
For the services framework bugthing, ignore it. The gpay fix was the one that added it. Just expand it and ensure its on
I'll try it all, thank you. I'll get back to you today
I'm tangled in it, you wrote a lot. Please send me one more steps 1 to ..... Thank you very much
!!!!!!!!!!!!!!!!!!!!!!!!! Dude, you're really a giant, it all works !!!!!!!!!!!!!!!!!!!!!!!
Safety net in magisk PASS.
Google play store - device is certified.
Credit card added successfully.
Tomorrow I will try payment using a mobile phone and NFC and see if it is fully functional.
I'll let you know tomorrow if the payments are working.
BIG BIG thanks
UnifiedNlp enabler for stock ROM (Magisk module)What's this and what does it do?
It's a Magisk module. You need to have Magisk working to use it. This thread can help with that.
It installs UnfiedNlp 1.6.8 as a system app and also does the magic that allows it to work as a location provider alongside Google Apps (aka GApps).
I've only tested it on the stock Sony ROM (firmware 62.0.A.3.163 to be more exact). Reports of whether it works on other versions are welcome.
It can in theory work on other ROMs but it depends a lot on the ROM. ROM variations is actually what makes it so fiddly and why such a deceptively simple module is so hard to find for your device. I don't intend to install other ROMs to test it but again reports are welcome. Please see below for explanations about how it works if you want to tackle it.
No but seriously, what's UnifiedNlp and why do I care?Your location provider (on a stock ROM from an established vendor like Sony) is Google. Elephant in the room, Google spies on you. They watch your location 24/7 and they learn things about you: where you work, where you live, where you shop, where you go to school, where you go in your spare time. They use this information to serve you ads. All vendors that want to be able to carry the Android trademark and be friends with Google are forced to put Google's location provider on their phone.
But Android actually has the ability to install multiple location providers, and switch them on and off at will. Except most stock ROMs come with this ability deactivated.
UnifiedNlp is an open source location provider with very cool features. It uses modules which let you use more privacy-oriented location services when you're online, and also let you determine your location offline, which gives you better privacy and also is very useful when you don't have a data connection. This Magisk module installs UnifiedNlp and tells the stock Sony ROM to let you use it.
But GPS already works fine on my phoneThis isn't about GPS. Every phone/ROM has built-in GPS as a basic location provider. GPS doesn't depend on Google or anything else. You either get direct visibility to 4+ GPS satellites or you don't, and the AGPS (Assisted GPS) data that speeds up GPS fix is freely available online.
This is about being able to use WiFi spots and mobile cell towers for location. This works faster than GPS and also works indoors.
In order to use something to determine your location you need to know its position. The positions of GPS satellites are well known, but the positions of wifi spots and cell towers isn't. To get those positions you need to go to someone who has walked all around your street and has used GPS to determine the exact position of the spots and towers.
Google has cars that go everywhere in the world doing that, but every time you ask Google for this information they also use your location to track you. This module will give you access to that information from sources other than Google.
How do I use this?
Install UnifiedNlp:
Download the attached ZIP on your phone (preferably under Download/).
Open Magisk, go to the modules tab, hit "install from storage" and pick the ZIP, then reboot.
After reboot you should have a UnifiedNlp system app installed. Some launchers will show it in their app drawer or even put it directly on the home screen for you, but regardless you can always open it from Settings > Location > Advanced >UnifiedNlp Settings. If it's not in the settings something is wrong.
Open UnifiedNlp settings and hit "Self Check".This gives you a screen with several checkmarks that should be on so everthing will work fine:
Permissions check: most of this will have been taken care of by the Magisk module, but you still need to tap it at least once. Grant location access if prompted.
Android version supported: will most likely never be checked, but like it says it doesn't mean much.
System supports this location provider: must be already checked. If it isn't, reboot once more after you've granted the location permission.
UnifiedNlp is registered in system: same as above, must be already checked. If it isn't, try a reboot. If this and the above check still don't enable something is wrong and this module doesn't seem to work on your ROM. See below for possible tinkering solutions.
Location backends set up: this will only become enabled after you install some modules. It's ok if it's off for now.
Network based location enabled: if this isn't checked, go to Settings > Location > Advanced > Google Location Accuracy and turn it on. In spite of the name it has nothing to do with Google, this enables/disables the use of wifi and mobile cells for location.
The last two checks ("has known location" and "provides location updates") may or may not show a check, but it doesn't matter, the real test will be getting your apps to work.
Install some modules. UnifiedNlp won't do anything without them. If you have F-Droid installed you can get these modules from it, otherwise you can grab the APKs from the F-Droid website.
NominatimNlpBackend: this is a must-have. It's an address backend, not a location backend. It matches a position to a postal address (city, street, number, that sort of thing).
MozillaNlpBackend or Apple UnifiedNlp Backend: at least one of these must be installed. These are the main location providers, equivalent to Google's. They need a data connection. They send information about nearby wifi spots and cell towers to Mozilla or Apple, and they get back an exact position. Both work equally well. Apple's has slightly higher precision, but Mozilla's privacy policy is better.
Modules below this point are optional. If you just wanted UnifiedNlp to be functional you can skip them, but they can be very useful when you don't have a data connection.
Deja Vu: when you have a GPS fix, this module saves/updates the position of nearby wifi spots and cell towers. When you don't have a GPS fix, it uses previously saved spot/tower positions to give you an approximate location. Doesn't need a data connection, doesn't need you to do anything, and it never needs any external service.
GSM Location Service: this module will offer to download a database of cell tower locations for your area. Then it will use it to determine your location based on cell towers detected nearby. Only needs data connection for the initial database download or for updates, after that it works offline.
WiFi Location Service: same as above, but for wifi spots.
After you install a module you must activate it in the UnifiedNlp settings, under "Configure location backends" or "Configure address backends".
Some of them may have additional settings available in there (gear icon). The GSM and WiFi location modules will need you to indicate your area and download a database.
If you can't enable location modules you've most likely missed a step (Network based location enabled) in Self-check.
If you're using XPrivacyLua you may want to either extempt these modules from restrictions or allow them location access.
Remember to grant Internet access in your firewall, if you have one, to the modules that need a data connection.
Verify that UnifiedNlp works:
Some app suggestions:
The NLP Test app lets you explicitly use "LM" (network-location like wifi/cells) or "GMS" (GPS) and also shows you lots of useful information, accuracy, different map markers for high/low precision etc.
The Gmaps WV app is a lightweight alternative to the Google Maps app (it uses the Google Maps website wrapped in a webview).
The OsmAnd app is a feature-rich map and navigation app that uses open map data from sources completely independent from Google.
The GPS Test app by Chartcross is very good for checking whether you're getting a GPS signal or not.
For testing that network-based location works you want to be indoors and you want GPS positioning to not work.
Disable all location modules in UnifiedNlp and check that NLP Test can't determine "LM" location.
Enable only one module, Mozilla or Apple, and check that NLP Test can get a "LM" location and also what accuracy you get.
The following tests are optional and results will also vary depending on your area and what cell/wifi coverage you get.
Enable only one module in turn between the GSM or WiFi service and see if you can get a "LM" fix with it.
Activate Mozilla or Apple module and Deja Vu, get a GPS fix, wait a minute or two, go indoors, check that you no longer get a GPS fix, disable Mozilla/Apple, and see if you get a "LM" fix in NLP Test with just the Deja Vu module activated.
I don't like it, how do I uninstall and go back to Google location?
Uninstall the module in Magisk and reboot. That's it.
Optionally you can uninstall the UnifiedNlp modules. They don't do anything without UnifiedNlp. Consider keeping them in case you change your mind and reinstall UnifiedNlp later. If you uninstall the modules you also lose the databases that they've created and you'll have to re-download them or let them recreate them (in Deja Vu's case).
How does this work (and how can I make it work on other ROMs)?There are three things needed to make this work:
The UnifiedNlp app needs to be installed as a system app in /system/priv-app/UnifiedNlp/UnifiedNlp.apk. You want the version with GAPPS. Can get it from F-Droid or GitHub.
UnifiedNlp (org.microg.nlp) needs a bunch of system-level permissions. They can be granted manually, but the more elegant method is to put them in /system/etc/permissions/org.microg.nlp.xml.
Overwrite several location provider-related settings in framework-res.apk by using Runtime Resource Overlays (RROs), to allow UnifiedNlp to act as location provider.
Which packages are allowed to act as a location provider is set inside framework-res.apk in the config_locationProviderPackageNames array. This array typically only lists Google packages and org.microg.nlp needs to be added in there. There's also some string settings that indicate the "master" location provider which need to be set to org.microg.nlp.
In the olden days the only way to do this was to unpack framework-res.apk, modify the values, repack it with a custom signature, put it back on the ROM and hope for the best. Often this would fail if the ROM was checking that the apk was not tampered with.
At some point a better method came along: RROs. These are APKs that overwrite values in framework-res.apk. Sounds pretty simple, but it's complicated by the fact that different ROMs have different rules about what overlays can overwrite what settings. The Xperia 10 III (XQ-BT52) /system/build.prop gives the following priority order for RRO locations: odm,vendor,product,system_ext,system. Therefore this module installs the /system/product/overlays/UnifiedNlpOverlay/UnifiedNlpOverlay.apk RRO.
You will need to accomplish all three things above to make this work on another ROM. The 3rd one is the tricky one because there are multiple places where a RRO can go and not all of them work. Some custom ROMs already take care of step 3 for you. Otherwise, check the documentation I linked. You may want to try other dirs instead of /system/product (alternatives are listed in the docs). Or you may need to change the overlay XML files, in which case it gets more complicated, and you'll also need apktool to unpack and repack the overlay.
Credits
The microg project for making UnifiedNlp.
TontyTon for the overlay.
Misaka4e21 for the Magisk module and the permissions XML.
I added the UnifiedNlp.apk to the module and figured out where the overlay needs to be placed on the stock Sony ROM to make it work.
Doesn't seem to install in Magisk. But I'm very interested in this module though ideally I'd want stock rom with microg.
lufei said:
Doesn't seem to install in Magisk. But I'm very interested in this module though ideally I'd want stock rom with microg.
Click to expand...
Click to collapse
What version of Magisk are you using? I'm on v24. Are you getting any errors, or are you just not seeing the zip in the Magisk installer?
wirespot said:
What version of Magisk are you using? I'm on v24. Are you getting any errors, or are you just not seeing the zip in the Magisk installer?
Click to expand...
Click to collapse
When trying to install the zip in Magisk I just get "copying zip to temp directory ! Unzip error" installing other modules work and I use Magisk 24.2
Can you also check that the zip was downloaded correctly? You can do this with md5sum from a terminal or adb shell, it should have checksum a54c4de46ecdbb228c496c59bc2cf275.
You can also try to install the zip from the command line like this: magisk --install-module filename.zip
Found the problem, I was putting the files inside another directory instead of putting them directly in the root of the zip. I've swapped the attachment in the first post with a correct file. Added a MD5 in the filename too, just in case. Thanks @lufei !
wirespot said:
Found the problem, I was putting the files inside another directory instead of putting them directly in the root of the zip. I've swapped the attachment in the first post with a correct file. Added a MD5 in the filename too, just in case. Thanks @lufei !
Click to expand...
Click to collapse
Now it installs and I was able to get all boxes checked, let's see how it works!
Thank you for the detailed explanation.
The topic of finding a location provider other than Google had interested me for a long time.
Until now, however, I had not yet dealt with it.
With this excellent tutorial I am now not only wiser, but can also confirm that everything as described also runs with the LOS18.1 GSI Rom and latest Sony Firmware.
Don't know if it's the GSI lineageOS or because I flashed the OpenGapps via Magisk, but I had trouble getting the current location in certain apps via both "LM" and "GMS".
The error was exactly as described here:
No GPS fix for most apps
With the solution described there, the problem could then be solved:
Code:
adb shell pm grant com.google.android.gms android.permission.ACCESS_COARSE_LOCATION
adb shell pm grant com.google.android.gms android.permission.ACCESS_FINE_LOCATION
Do you still get a LM fix if you disable all location modules in UnifiedNlp, or if you disable this Magisk module? Because I suspect you're actually using the Google location provider.
This Magisk module relies on the assumption that the UnifiedOverlay.apk file is placed in a location that will override the values provided by /system/framework/framework-res.apk. For the stock ROM it seems to work with /system/product but if that's not true for Lineage you may want to try modifying the zip and also copying system/product/overlay as system/vendor/overlay, system/oem/overlay, system/odm/overlay, system/system_ext/overlay and system/overlay.
wirespot said:
Do you still get a LM fix if you disable all location modules in UnifiedNlp
Click to expand...
Click to collapse
No, if I disable the location modules LM fix is not possible anymore.
psychofaktory said:
No, if I disable the location modules LM fix is not possible anymore.
Click to expand...
Click to collapse
Ah that's cool then. It's interesting that it requires .gms to also have location rights even if it's not using it. I guess as long as it's installed and listed as an official location provider it needs to have the permissions that go with it too.
@wirespot
Is there anything against using this Magisk module on a device other than the Xperia 10 III?
It won't break anything, it just won't work if the folders aren't good. UnifiedNlp settings will complain that the service could not be registered.
See post #10 for a list of folders. If it doesn't work as is, duplicate the system/product folder with all those other names, repack the zip, and try with that.
What ROM are you planning to try it on?
wirespot said:
What ROM are you planning to try it on?
Click to expand...
Click to collapse
Offical LineageOS 18.1 von Sony Xperia XA2 an unofficial LineageOS 18.1 on Xiomi Mi 9 lite.
On LineageOS you don't need the overlays (so none of the /system/*/overlay/* files or dirs) because its framework-res.apk already allows you to use UnifiedNlp (it lists org.microg.nlp as an approved location provider). This actually solves a major headache.
You can still use a Magisk module to install the UnifiedNlp apk to /system/priv-app and the permissions file to /etc/permissions/ systemlessly if you want (as opposed to actually mounting the root partition read-write and copying them there). This makes it easier for these modifications to survive LineageOS updates. (If you need to install them physically you will either need to copy them again after every update, or you can use a script that protects them during updates as described here.)
Please note that the actual apk you need to install depends on whether you install with Gapps or without. My module is made for a stock Sony ROM with Google Apps so of course there's already a location provider from Google (com.google.android.gms), so I need to use the UnifiedNlp.apk, package name org.microg.nlp, which is designed to work alongside Gapps. If you plan on installing Gapps on LineageOS then you need to do the same so you can use my module with just the */overlay/* stuff removed.
If you plan to use LineageOS without Gapps then you need to get the NetworkLocation.apk version of UnifiedNlp, which has package name same as the original Google package (com.google.android.gms). You will need to replace /system/priv-app/UnifiedNlp/UnifiedNlp.apk with /system/priv-app/UnifiedNLP/NetworkLocation.apk in the module zip, and also edit /system/etc/permissions/org.microg.nlp.xml and change the package name from "org.microg.nlp" to "com.google.android.gms". (The actual file name of the .xml doesn't matter, the system loads all the .xml files in that dir anyway, but you can change that too if you want to be tidy.)
Thank you very much for your answer.
Whenever possible, I prefer the systemless variant.
Therefore, your Magisk module would be a good way.
For all LineageOS installations I have installed the OpenGApps.
That means I simply remove the system\product\overlay\ folder and its contents from the zip file and can then flash the module directly with Magisk?
Is it enough to adjust the values in the module.prop to change the display name of the module, or is there anything else that needs to be considered here?
Tried with the steps I described in my post above.
Everything worked so far.
Except UnifiedNlp didn't register in system.
What's wrong with my setup?
Does it say "system supports location provider" in UnifiedNlp self-check?
Two common gotchas:
In the Self-check list, tap "permission to access location" at least once. It may be needed to grant additional location permission.
Make sure that using network-based location is enabled in the settings. I don't know what it's called on Lineage. On stock ROM it's called "Google location accuracy" which of course isn't useful.
Reboot once after doing all of the above.
Wait a couple of minutes after restart before you do Self-check, sometimes it takes a bit longer.
If none of this works try copying system/product/overlay as system/vendor/overlay, system/oem/overlay, system/odm/overlay, system/system_ext/overlay and system/overlay, in the zip, reinstall the module and reboot.
Self-check says that system supports location provider. Permissions are set and every mark is checked.
Network-based location is also active.
Phone was rebootet several times and I waited bevore testing with NLP TEST app.
I have created and installed a new ZIP file based on your recommendation. That seemed to did the trick.
Got a location wie LM NLP test. But far from my actually position.
But then I figured out, that the problem came from somewhere else:
Mozilla NLP gave me wrong Informations about my position. So I disabled it and enabled Apple NLP instead.
Since then everything works find.
If I see this correctly, the newly created Magisk module should then work on all LineageOS roms with GApps installed. Regardless of the device type.
Am I correct here?
Hi,
I installed microG Lineage 20 on my Moto G 5G Plus. Everything works fine except that one (banking) app that complains that "Google Play Services are not Installed".
I assume that means SafetyNet?
I tried to get it to work using the path depicted here: https://forum.xda-developers.com/t/safetynet-on-lineageos-20-microg.4558065/, but no luck on this phone.
Is there anyway to get safety net to pass, ideally without rooting the phone/using magisk?
EDIT: there's a switch in the microG settings "Allow Device Attestation" but it's greyed out ...
Best,
N
Ok, first of all, you have to enable "Device Registration" in the microG settings. Didn't know that.
That way, I got to the point where I can check for device attestation, and get the notorious "CTS Profile Doesn't Match" error.
I've tried using Magisk and Zygisk, and the Univesal SafetyNet fix, but to no avail, still not passing.
EDIT: tried the modded universal safety net fix by displax, not the check says "integrity check failed" ... not sure whether I sould count that as progress or not
Hi,
I had the same problem, but I found the solution and now I successfully pass safetynet with LOS 20 microG.
You have to do 3 steps:
Enable zygisk in Magisk and configure denylist to hide root from 'microG Services Core'
Enable 'Device Registration' and 'Google SafetyNet' at microG settings
Install Magisk module MagiskHidePropsConf, reboot, then configure it in any Terminal Emulator as follows:
su (start root shell)
props (run props command line tool)
1 (edit device fingerprint)
f (choose from the list)
select any fingerprint you like, then proceed and reboot
This third step solves CTS profile mismatch error by changing the device's fingerprint to one trusted by Google.
It should work.
Edit: I did not use any 'Universal SafetyNet fix' module.
Hmm ok, I have read about it but never tried, as the page states is a deprecated project ... That'd probably mean I'd have to install an older version of Magisk, right ?
Hmm... I haven't noticed yet. Good to know.
It's working fine for me with the latest Magisk version.