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

Installing to /system/priv-app causes boot loop on CrDroid #1869

Closed
elastic-rock opened this issue Jan 15, 2023 · 9 comments
Closed

Installing to /system/priv-app causes boot loop on CrDroid #1869

elastic-rock opened this issue Jan 15, 2023 · 9 comments
Labels

Comments

@elastic-rock
Copy link

Describe the bug
When GmsCore is put into the /system/priv-app folder, the phone bootloops. When removed, the phone boots without a problem.

To Reproduce
Steps to reproduce the behavior:

  1. Boot to recovery (TWRP in my case)
  2. Copy GmsCore to /system/priv-app
  3. Try to boot
  4. Get stuck in a bootloop

System
Android Version: [e.g. 13]
Custom ROM: [e.g. CrDroid 9.1]
Device: ginkgo (I don't know if that helps)

I can also confirm it not working on CrDroid 8.1 so Android 12.1

Additional context
I am trying to make an OTA zip file to speed-up the process of installing MicroG and all it's components properly by using the F-Droid privileged extension OTA zip and this Lineage for MicroG repo as a template. I have tried installing all other components except for GmsCore and no issues occur, from which I deduce that the problem is caused by GmsCore. I have no problems using the same steps on ArrowOS 12.1 and 13.

My repo is https://github.com/elastic-rock/microg-unofficial-ota-zip.

@mar-v-in
Copy link
Member

Might be because you're missing android.permission.MANAGE_USB in your privapp-permission file.

@ildar
Copy link

ildar commented Jan 16, 2023 via email

@elastic-rock
Copy link
Author

Might be because you're missing android.permission.MANAGE_USB in your privapp-permission file.

Fixed the issue. Thanks.

@cracket
Copy link

cracket commented Mar 19, 2023

Might be because you're missing android.permission.MANAGE_USB in your privapp-permission file.

Fixed the issue. Thanks.

Not sure how did you fixed the issue - any suggestions or link with more detailed instructions?
I'm using crDroid (Android 10) installed.
Issue #986 suggests I should edit file
/system/etc/permissions/privapp-permissions-com.google.android.gms.xml

but this file is missing in my crDroid installation. Should I create it empty and put only single permission there (MANAGE_USB) ?

@ale5000-git
Copy link
Member

ale5000-git commented Mar 20, 2023

The file may have any name and may be in many folders.

It may be in:

  • /system/etc/permissions
  • /product/etc/permissions
  • Maybe others

The name can be:
privapp-permissions-ANYTHING IS FINE HERE.xml

@cracket
Copy link

cracket commented Mar 21, 2023

The file may have any name and may be in many folders.

It may be in:

* /system/etc/permissions

* /product/etc/permissions

* Maybe others

The name can be: privapp-permissions-ANYTHING IS FINE HERE.xml

sorry for asking stupid question, but my build of crDroid does not have this file, if you search through github crdroid sources ( org:crdroidandroid privapp-permissions gms ) you will realize crDroid has privapp-permissions defined only for couple of vendors, which means that I need:

  • either to build this file from scratch (or copy existing/working one) for my image
  • or search for older microG build which does not require USB permission nor bootloop without it

If rebuilding from scratch I might miss many other necessary permissions, and my goal is to make running NLP backend from microG. So any saving time suggestions will be highly appreciated

@ale5000-git
Copy link
Member

ale5000-git commented Mar 21, 2023

Maybe many devices use a common privapp-permission xml file, or it is automatically generated during build but it must exist somewhere.
You can use find (via adb) to search it directly on the device (with root or recovery).

@cracket
Copy link

cracket commented Mar 29, 2023

Maybe many devices use a common privapp-permission xml file, or it is automatically generated during build but it must exist somewhere. You can use find (via adb) to search it directly on the device (with root or recovery).

Thank you for hint, tried to search both my device image, running system and available sources of crDroid, but didnt find anything related to these permissions settings.
Currently I don't have much time to try out blindly settings or configuration from other devices so I have configured legacy NLP according to this document - https://blog.eowyn.net/unifiednlp/ and I am not capable to use microg on my crDroid by now.

@ale5000-git
Copy link
Member

ale5000-git commented Mar 29, 2023

If you want to do it in a simpler way then you can try my flashable zip.
PS: Be sure to backup your data first.

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

5 participants