Script solution for Marshmallow permissions #200

Open
dim0x69 opened this Issue Dec 22, 2015 · 10 comments

Comments

Projects
None yet
9 participants
@dim0x69

dim0x69 commented Dec 22, 2015

This problem came up as is updated my LG G3 (d855) to the latest Cyanogenmod 13 Nightly( 20151222) (from 12.1).

"play services" (and "system") crashed with the following exception:

12-22 20:23:41.267 5619 5860 E AndroidRuntime: Process: com.google.android.gms.persistent, PID: 5619
12-22 20:23:41.267 5619 5860 E AndroidRuntime: java.lang.SecurityException: "passive" location provider requires ACCESS_FINE_LOCATION permission.
[stack trace]

after i granted the needed permission to GMS "pm grant com.google.android.gms android.permission.ACCESS_FINE_LOCATION" everything worked as expected.

I hope this is the right place to address this issue.

Thank you!

@mfonville

This comment has been minimized.

Show comment
Hide comment
@mfonville

mfonville Dec 22, 2015

Member

@TheCrazyLex could you check what is the situation here? Is there a new permission from either ROM or GMS's side?

Member

mfonville commented Dec 22, 2015

@TheCrazyLex could you check what is the situation here? Is there a new permission from either ROM or GMS's side?

@TheCrazyLex

This comment has been minimized.

Show comment
Hide comment
@TheCrazyLex

TheCrazyLex Dec 22, 2015

Member

@mfonville this permission is required, this is normal and was always like that. However as Cm doesn't include my patch, things like that may happen on CM.

This won't happen on ROMs including the patch.

Alex

Member

TheCrazyLex commented Dec 22, 2015

@mfonville this permission is required, this is normal and was always like that. However as Cm doesn't include my patch, things like that may happen on CM.

This won't happen on ROMs including the patch.

Alex

@mfonville

This comment has been minimized.

Show comment
Hide comment
@mfonville

mfonville Dec 23, 2015

Member

Thanks for the explanation. I thought cm had the patch included, maybe we can request to upstream it somehow?

Also we are still looking into possible scripting solutions to handle the permissions for roms without the patch. But such a solution is not available yet for the near future.

Member

mfonville commented Dec 23, 2015

Thanks for the explanation. I thought cm had the patch included, maybe we can request to upstream it somehow?

Also we are still looking into possible scripting solutions to handle the permissions for roms without the patch. But such a solution is not available yet for the near future.

@TheCrazyLex

This comment has been minimized.

Show comment
Hide comment
@TheCrazyLex

TheCrazyLex Dec 24, 2015

Member
Member

TheCrazyLex commented Dec 24, 2015

@nixar

This comment has been minimized.

Show comment
Hide comment
@nixar

nixar Jan 1, 2016

@TheCrazyLex can you point to that patch? is there a clutch way to fix this at least temporarily with a root shell?

nixar commented Jan 1, 2016

@TheCrazyLex can you point to that patch? is there a clutch way to fix this at least temporarily with a root shell?

@polyzen

This comment has been minimized.

Show comment
Hide comment
@polyzen

polyzen Jan 2, 2016

This appears to also happen on CopperheadOS which is forked off of AOSP.

polyzen commented Jan 2, 2016

This appears to also happen on CopperheadOS which is forked off of AOSP.

@ibleedbinari ibleedbinari referenced this issue in microg/android_packages_apps_GmsCore Jan 9, 2016

Closed

GPS location permission error #68

@mfonville mfonville changed the title from com.google.android.gms missing android.permission.ACCESS_FINE_LOCATION to Script solution for Marshmallow permissions Feb 7, 2016

@mrcmunir

This comment has been minimized.

Show comment
Hide comment
@mrcmunir

mrcmunir Feb 12, 2016

@TheCrazyLex How run script with root access in init first time? because you patch not working for me user can't access grant.runtime.permissions .

@TheCrazyLex How run script with root access in init first time? because you patch not working for me user can't access grant.runtime.permissions .

@klausenbusk

This comment has been minimized.

Show comment
Hide comment
@klausenbusk

klausenbusk Feb 13, 2016

Contributor

Not sure if this is related, but I get:

02-13 11:39:01.383 31298 31355 W ctxmgr  : [AclManager]checkPermissionTypeStatus: no inject permission for { uid=10061, packageName=com.google.android.gms }. Returned permission was: PACKAGE_NOT_WHITELISTED for context name=POWER_CONNECTION, account=account#-51794xxxx#

When trying to start Endomondo on CM nightly

Contributor

klausenbusk commented Feb 13, 2016

Not sure if this is related, but I get:

02-13 11:39:01.383 31298 31355 W ctxmgr  : [AclManager]checkPermissionTypeStatus: no inject permission for { uid=10061, packageName=com.google.android.gms }. Returned permission was: PACKAGE_NOT_WHITELISTED for context name=POWER_CONNECTION, account=account#-51794xxxx#

When trying to start Endomondo on CM nightly

@cunha17

This comment has been minimized.

Show comment
Hide comment
@cunha17

cunha17 Mar 14, 2016

The issue still persists on last CM 13 Nightly (20160313) for i9300. The proposed procedure along with "pm grant com.google.android.gms android.permission.ACCESS_COARSE_LOCATION" fixed the issue.
Fixed creating (and chmoding +x) a /data/local/userinit.sh file with:

#!/system/bin/sh

#Fix permission issues with OpenGApps and CM13 (issue #200 @github)
pm grant com.google.android.gms android.permission.ACCESS_FINE_LOCATION
pm grant com.google.android.gms android.permission.ACCESS_COARSE_LOCATION

cunha17 commented Mar 14, 2016

The issue still persists on last CM 13 Nightly (20160313) for i9300. The proposed procedure along with "pm grant com.google.android.gms android.permission.ACCESS_COARSE_LOCATION" fixed the issue.
Fixed creating (and chmoding +x) a /data/local/userinit.sh file with:

#!/system/bin/sh

#Fix permission issues with OpenGApps and CM13 (issue #200 @github)
pm grant com.google.android.gms android.permission.ACCESS_FINE_LOCATION
pm grant com.google.android.gms android.permission.ACCESS_COARSE_LOCATION

@jkdf2

This comment has been minimized.

Show comment
Hide comment
@jkdf2

jkdf2 Mar 27, 2016

Contributor

Cyanogenmod now has a bug report for it: https://jira.cyanogenmod.org/browse/NIGHTLIES-2706

There is also a discussion of this on the XDA Q&A page for opengapps: http://forum.xda-developers.com/android/help/qa-gapps-android-5-1-5-0-4-4-t3124506/post66054618

Contributor

jkdf2 commented Mar 27, 2016

Cyanogenmod now has a bug report for it: https://jira.cyanogenmod.org/browse/NIGHTLIES-2706

There is also a discussion of this on the XDA Q&A page for opengapps: http://forum.xda-developers.com/android/help/qa-gapps-android-5-1-5-0-4-4-t3124506/post66054618

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment