Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standalone unifiednlp #1776

Closed
wants to merge 2 commits into from
Closed

Standalone unifiednlp #1776

wants to merge 2 commits into from

Conversation

git-bruh
Copy link

@git-bruh git-bruh commented Sep 12, 2022

https://github.com/git-bruh/GmsCore (I messed up this PR with a force push)

I have no idea WTF I'm doing (never dealt with android dev) but I needed to build unifiednlp standalone and with a different package name than com.google.android.gms as it breaks some apps that assume a functional gms (which is non functional if flashed on a rom without sig spoofing support). Eg whatsapp works fine without gms but if a broken (no sig spoof) gms is installed it gets stuck on the restoring backups screen

Just dropping this here in case anyone else wants to use it - not meant to merge

Uses build.sh to build since I don't know how to exclude files from building

Screenshot_20220912-194450_UnifiedNlp Services Core
Screenshot_20220912-194454_UnifiedNlp Services Core
Screenshot_20220912-194459_UnifiedNlp Services Core

Flashed by creating minmicrog zip with this patch

diff --git a/conf/defconf-unlp.txt b/conf/defconf-unlp.txt
index e019e0c..c84c19c 100644
--- a/conf/defconf-unlp.txt
+++ b/conf/defconf-unlp.txt
@@ -18,17 +18,10 @@ minMagisk=1900
 ";
 
 stuff="
-  /system/app/AppleNLPBackend/AppleNLPBackend.apk
-  /system/app/DejaVuNLPBackend/DejaVuNLPBackend.apk
-  /system/app/LocalGSMNLPBackend/LocalGSMNLPBackend.apk
-  /system/app/LocalWiFiNLPBackend/LocalWiFiNLPBackend.apk
-  /system/app/MozillaUnifiedNLPBackend/MozillaUnifiedNLPBackend.apk
-  /system/app/NominatimNLPBackend/NominatimNLPBackend.apk
-
   /system/bin/npem
 
   /system/etc/default-permissions/microg-permissions-unlp.xml
-  /system/etc/permissions/com.google.android.gms.xml
+  /system/etc/permissions/org.microg.nlp.app.xml
   /system/etc/sysconfig/nogoolag-unlp.xml
 
   /system/priv-app/MicroGUNLP/MicroGUNLP.apk
diff --git a/res/system/bin/npem b/res/system/bin/npem
index b381929..fb669b1 100644
--- a/res/system/bin/npem
+++ b/res/system/bin/npem
@@ -18,7 +18,7 @@ perm_gacc="android.permission.GET_ACCOUNTS"
 perm_rsms="android.permission.RECEIVE_SMS"
 
 # Packages
-microG="com.google.android.gms"
+microG="org.microg.nlp.app"
 PlayStore="com.android.vending"
 GCalSync="com.google.android.syncadapters.calendar"
 GConSync="com.google.android.syncadapters.contacts"
diff --git a/res/system/etc/default-permissions/microg-permissions-unlp.xml b/res/system/etc/default-permissions/microg-permissions-unlp.xml
index 82caa1e..ac951f0 100644
--- a/res/system/etc/default-permissions/microg-permissions-unlp.xml
+++ b/res/system/etc/default-permissions/microg-permissions-unlp.xml
@@ -30,7 +30,7 @@
 -->
 <exceptions>
 
-    <exception package="com.google.android.gms">
+    <exception package="org.microg.nlp.app">
         <!-- Location -->
         <permission name="android.permission.ACCESS_FINE_LOCATION" fixed="false"/>
         <permission name="android.permission.ACCESS_COARSE_LOCATION" fixed="false"/>
diff --git a/res/system/etc/permissions/org.microg.nlp.app.xml b/res/system/etc/permissions/org.microg.nlp.app.xml
new file mode 100644
index 0000000..c552023
--- /dev/null
+++ b/res/system/etc/permissions/org.microg.nlp.app.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<permissions>
+    <privapp-permissions package="org.microg.nlp.app">
+        <permission name="android.permission.INSTALL_LOCATION_PROVIDER" />
+    </privapp-permissions>
+</permissions>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant