Skip to content

Correct way of installing microG as system-app #2844

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

Open
meinintelligenterfreund opened this issue Apr 1, 2025 · 11 comments
Open

Correct way of installing microG as system-app #2844

meinintelligenterfreund opened this issue Apr 1, 2025 · 11 comments
Labels

Comments

@meinintelligenterfreund
Copy link

Hello everyone,

I know that there are modules for Magisk that do the installation for you and I also know about LineageOS for microG. I tried those an they work great. I only got into problems when trying to update to a newer microG version. But I think I screwed this up.

But my question is not about the above its about how to correctly install microG on Android 15 from scratch. I installed it out of F-Droid but because it installs microG as an user app the phone won’t wake up when a push message comes in. At least that’s what I read. The installation instructions describe the process with the footnote to use adb push but without any further explanation.

Is this the correct procedure?

  • Naked phone without any microG installation but Magisk installed (LineageOS 22.1)
  • Enable adb debugging in developer settings
  • Enable adb root in developer settings
  • Connect phone
  • adb root
  • adb remount (makes /system/ write-able)
  • adb push com.google.android.gms-244735012.apk /system/app/
  • adb shell chmod 644 /system/app/com.google.android.gms-244735012.apk
  • adb push com.google.android.gsf-8.apk /system/app/
  • adb shell chmod 644 /system/app/com.google.android.gsf-8.apk
  • adb push com.android.vending-84022612.apk /system/app/ (optional)
  • adb shell chmod 644 /system/app com.android.vending-84022612.apk (optional)
  • adb reboot

I would like to understand the correct way and would appreciate any help.
Thanks in advance.

@ale5000-git
Copy link
Member

ale5000-git commented Apr 1, 2025

Premise: it is almost impossible to install microG manually in the system partition and set everything correctly.

microG Services need privileged permissions so it must be in /system/priv-app (not app) and you should create the xml files in /system/etc/permissions to grant them.
Then you must also extract the libraries (the correct one for your phone CPU) and also place them in the system partition (otherwise you will see microG crash randomly).
Then you should also create the xml in sysconfig to grant various things to microG.
All the xml are not provided by this repo and you must create them.

If you want you can also use my installer (https://github.com/micro5k/microg-unofficial-installer).
Unlike others, it directly modifies the system partition (it is not a Magisk module).

@meinintelligenterfreund
Copy link
Author

Thank you for your fast reply.

Wow, that sounds complicated (until you’ve done it once or twice). I thought that would be much easier. Thank you for the hint with the /priv-app/ folder.
So, the install instructions are based on an older Android system then, I guess.

Thank you for the link to your installer, too. I’ll give it a shot. I used this one so far (Magisk module) until I tried to update.
link or newer releases link

I also read something about setting up a xml-file. I think when the xml-file is correctly configured it is not even necessary to move micorG into the /system/priv-app/ folder. Do you know if that is true and if that might be an easier way?

Installing microG as user app using F-Droid, setting up a xml-file with privileged permission, reboot and done?

@ale5000-git
Copy link
Member

ale5000-git commented Apr 1, 2025

I also read something about setting up a xml-file. I think when the xml-file is correctly configured it is not even necessary to move micorG into the /system/priv-app/ folder. Do you know if that is true and if that might be an easier way?

I don't know where you read it but it is wrong.

  • apk in /system/app (privileged permissions are NOT granted but other things still works)
  • apk in /system/priv-app withOUT xml files (Android no longer boot correctly, it isn't just a problem with microG)
  • apk in /system/priv-app with xml files (all is working)
  • xml files alone do nothing, a user app will never become a privileged app

All installers should work more or less unfortunately most installers include an old version of microG, and to replace the apk with the new one you also need a different xml (my installer already included the latest microG).

@ale5000-git
Copy link
Member

So, the install instructions are based on an older Android system then, I guess.

Probably.

@gitrashad
Copy link

gitrashad commented Apr 18, 2025

you don't need adb remount, adb remount / or adb remount /system (which is correct in your case) is enough. You don't need to remount every partition as rw

@gitrashad
Copy link

Also you don't need to move all of 3 apps to /system/app, only moving GmsCore.apk to /system/priv-app and xmls are enough

@ale5000-git
Copy link
Member

Also you don't need to move all of 3 apps to /system/app, only moving GmsCore.apk to /system/priv-app and xmls are enough

In the next version it may be required also for microG Companion (maybe not on all Android versions).

@ale5000-git
Copy link
Member

@meinintelligenterfreund
Reading again the first post you say that com.android.vending is optional, this is wrong.
If com.android.vending is not installed, all apps will ignore microG and behave like it isn't installed.

@gitrashad
Copy link

gitrashad commented Apr 18, 2025

Also you don't need to move all of 3 apps to /system/app, only moving GmsCore.apk to /system/priv-app and xmls are enough

In the next version it may be required also for microG Companion (maybe not on all Android versions).

can I ask why it may be required in the next version? What will be changed?

@ale5000-git
Copy link
Member

ale5000-git commented Apr 18, 2025

Also you don't need to move all of 3 apps to /system/app, only moving GmsCore.apk to /system/priv-app and xmls are enough

In the next version it may be required also for microG Companion (maybe not on all Android versions).

can I ask why it may be required in the next version? What will be changed?

In this PR microG Companion may install apps: #2553
To be able to do it without enabling the option to install apps from unknown sources it need privileged permisssions (not on all Android versions, but on some it is needed).
Also as features got implemented additional things may be needed in the future.

@gitrashad
Copy link

Also you don't need to move all of 3 apps to /system/app, only moving GmsCore.apk to /system/priv-app and xmls are enough

In the next version it may be required also for microG Companion (maybe not on all Android versions).

can I ask why it may be required in the next version? What will be changed?

In this PR microG Companion may install apps: #2553 To be able to do it without enabling the option to install apps from unknown sources it need privileged permisssions (not on all Android versions, but on some it is needed). Also as features got implemented additional things may be needed in the future.

This makes sense, thank you.

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

No branches or pull requests

3 participants