Skip to content

Conversation

@gudenau
Copy link
Contributor

@gudenau gudenau commented Oct 18, 2019

I have not tested the code out, but it builds as it is. (Emulator refusing to run for some reason)

@gudenau
Copy link
Contributor Author

gudenau commented Oct 25, 2019

Screenshot_20191025-174407
It seems to work, now that I have a device I can test on.

+ } catch (Throwable t) {
+ // We should never die because of any failures, this is system code!
+ Log.w("PackageManagerService.FAKE_PACKAGE_SIGNATURE", t);
+ }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you fix the indentation here?

Copy link

@chris42 chris42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used the patch on r15 Android 10 sources and found the indices to be off. Not a huge problem, however it creates .orig files when applying the patch. So changing it would be nice.

index a3fccd96f22..383c702955f 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -2628,6 +2628,13 @@
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@@ -2628,6 +2628,13 @@
@@ -2631,6 +2631,13 @@

index 0391530c483..5df70cc1bd1 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -1855,6 +1855,8 @@
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@@ -1855,6 +1855,8 @@
@@ -1871,6 +1871,8 @@

index 152b131af8f..f8d87a37064 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -827,6 +827,11 @@
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@@ -827,6 +827,11 @@
@@ -831,6 +831,11 @@

--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -827,6 +827,11 @@

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

delete

+
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permlab_statusBar">disable or modify status bar</string>
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permdesc_statusBar">Allows the app to disable the status bar or add and remove system icons.</string>

index 7469e099421..48e78eff9db 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -4092,8 +4092,9 @@ public class PackageManagerService extends IPackageManager.Stub
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@@ -4092,8 +4092,9 @@ public class PackageManagerService extends IPackageManager.Stub
@@ -4108,8 +4108,9 @@ public class PackageManagerService extends IPackageManager.Stub


if (packageInfo == null) {
return null;
@@ -4129,6 +4130,24 @@ public class PackageManagerService extends IPackageManager.Stub
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@@ -4129,6 +4130,24 @@ public class PackageManagerService extends IPackageManager.Stub
@@ -4145,6 +4146,24 @@ public class PackageManagerService extends IPackageManager.Stub

@memiks
Copy link

memiks commented Jul 17, 2020

Dear Team,

Could you please add this patch ? I would like to use it on GloDroid image in order to test MicroG with PinePhone.

BR,
Memiks.

@JonnyTech
Copy link

@memiks if your system image is built with signature spoofing enabled then this patch is not required and you just need to adb shell pm grant com.android.vending android.permission.FAKE_PACKAGE_SIGNATURE

@memiks
Copy link

memiks commented Jul 17, 2020

@memiks if your system image is built with signature spoofing enabled then this patch is not required and you just need to adb shell pm grant com.android.vending android.permission.FAKE_PACKAGE_SIGNATURE

Yes of course, sure, but GloDroid not include the signature spoofing for the moment and this project is based on Android Q https://github.com/glodroid/glodroid_manifest/

Tanhks.

@GioKas93
Copy link

how to patch this in frameworks/base ?

phhusson pushed a commit to phhusson/platform_frameworks_base that referenced this pull request Oct 31, 2020
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Change made by PHH:
- Permission is exposed as "privileged" rather than "dangerous", so that
  apps need to be in system;product's priv-app

Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
phhusson pushed a commit to phhusson/platform_frameworks_base that referenced this pull request Nov 2, 2020
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Change made by PHH:
- Permission is exposed as "privileged" rather than "dangerous", so that
  apps need to be in system;product's priv-app

Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
phhusson pushed a commit to phhusson/platform_frameworks_base that referenced this pull request Nov 3, 2020
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Change made by PHH:
- Permission is exposed as "privileged" rather than "dangerous", so that
  apps need to be in system;product's priv-app

Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
alanndz pushed a commit to BiancaProject/android_frameworks_base that referenced this pull request Nov 12, 2020
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
alanndz pushed a commit to BiancaProject/android_frameworks_base that referenced this pull request Nov 12, 2020
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
alanndz pushed a commit to BiancaProject/android_frameworks_base that referenced this pull request Nov 12, 2020
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
alanndz pushed a commit to Komodo-OS/frameworks_base_old that referenced this pull request Nov 15, 2020
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
Signed-off-by: alanndz <alanmahmud0@gmail.com>
joeyhuab pushed a commit to Evolution-X-AOSP/frameworks_base that referenced this pull request Nov 15, 2020
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
Signed-off-by: Joey Huab <joey@evolution-x.org>
alanndz pushed a commit to Komodo-OS/frameworks_base_old that referenced this pull request Nov 19, 2020
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
Signed-off-by: alanndz <alanmahmud0@gmail.com>
@iot-resister
Copy link

when I try to build for lineage 17.1, I get

error: invalid file path 'frameworks/base/core/res/res/values/config.xml.orig'.
error: invalid file path 'frameworks/base/core/res/res/values/strings.xml.orig'.

here is my local manifest

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <project path="device/lenovo/YTX703F"         name="Quallenauge/android_device_lenovo_YTX703F"        revision="lineage-17.1" />
  <project path="device/lenovo/YTX703L"         name="Quallenauge/android_device_lenovo_YTX703L"        revision="lineage-17.1" />
  <project path="device/lenovo/YTX703-common"   name="Quallenauge/android_device_lenovo_YTX703-common"  revision="lineage-17.1" />
  <project path="kernel/lenovo/msm8976"         name="Quallenauge/android_kernel_lenovo_msm8976"        revision="lineage-17.1" />
  <project path="vendor/lenovo"                 name="Quallenauge/proprietary_vendor_lenovo"            revision="lineage-17.1"/>
  <project name="LineageOS/android_hardware_sony_timekeep" path="hardware/sony/timekeep" remote="github" revision="lineage-17.1" />
</manifest>

@chris42
Copy link

chris42 commented Nov 19, 2020

when I try to build for lineage 17.1, I get

error: invalid file path 'frameworks/base/core/res/res/values/config.xml.orig'.
error: invalid file path 'frameworks/base/core/res/res/values/strings.xml.orig'.

You probably get a few index errors in the patching itself. patch then creates the orig files. Either correct the indexes (as I did once before above) or delete the .orig files before build.

@nift4
Copy link

nift4 commented Nov 20, 2020

The java part doesn't merge anymore in Lineage because they added some new code directly above it

ItsVixano pushed a commit to AOSPMinimal/platform_frameworks_base that referenced this pull request Nov 21, 2020
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
ItsVixano pushed a commit to AOSPMinimal/platform_frameworks_base that referenced this pull request Nov 21, 2020
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
abun880007 pushed a commit to 420rom/platform_frameworks_base that referenced this pull request Dec 8, 2020
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Change made by PHH:
- Permission is exposed as "privileged" rather than "dangerous", so that
  apps need to be in system;product's priv-app

Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
adithya2306 pushed a commit to Wave-Project/frameworks_base that referenced this pull request Dec 16, 2020
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
markakash pushed a commit to P-404/android_frameworks_base that referenced this pull request Dec 16, 2020
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
markakash pushed a commit to P-404/android_frameworks_base that referenced this pull request Dec 17, 2020
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
SirRGB pushed a commit to LeafOS-experimental/android_frameworks_base that referenced this pull request Sep 9, 2024
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Sat Oct 16 05:27:57 2021 -0700

    Add support for app signature spoofing

    This is needed by microG GmsCore to pretend to be the official Google
    Play Services package, because client apps check the package signature
    to make sure it matches Google's official certificate.

    This was forward-ported from the Android 10 patch by gudenau:
    microg/GmsCore#957

    Changes made for Android 11:
      - Updated PackageInfo calls
      - Added new permission to public API surface, needed for
        PermissionController which is now an updatable APEX on 11
      - Added a dummy permission group to allow users to manage the
        permission through the PermissionController UI
        (by Vachounet <vachounet@live.fr>)
      - Updated location provider comment for conciseness

    Changes made for Android 12:
      - Moved mayFakeSignature into lock-free Computer subclass
      - Always get permissions for packages that request signature spoofing
        (otherwise permissions are usually ommitted and thus the permission
        check doesn't work properly)
      - Optimize mayFakeSignature check order to improve performance

    [SamarV-121: Adapt for T]
    [Linux4: Adapt for U]

    Link: microg/GmsCore#1586
    Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88

Author: Tim Zimmermann <tim@linux4.de>
Date:   Sat Jun 18 20:21:29 2022 +0200

    Restrict signature spoofing to platform apps

    Change-Id: Id2339172635bc97fe3cd7fc6be5627ac3657f024

Change-Id: I90ad3127ba471c240152f9558750e951ea6de2c6
shutter-cat pushed a commit to VoltageOS-staging/frameworks_base_new that referenced this pull request Sep 12, 2024
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Changes made for Android 12:
  - Moved mayFakeSignature into lock-free Computer subclass
  - Always get permissions for packages that request signature spoofing
    (otherwise permissions are usually ommitted and thus the permission
    check doesn't work properly)
  - Optimize mayFakeSignature check order to improve performance

Changes made for Android 13:
  - Computer subclass is now an independent class.

Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
Signed-off-by: Dmitrii <bankersenator@gmail.com>
shutter-cat pushed a commit to VoltageOS-staging/frameworks_base_new that referenced this pull request Sep 12, 2024
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Changes made for Android 12:
  - Moved mayFakeSignature into lock-free Computer subclass
  - Always get permissions for packages that request signature spoofing
    (otherwise permissions are usually ommitted and thus the permission
    check doesn't work properly)
  - Optimize mayFakeSignature check order to improve performance

Changes made for Android 13:
  - Computer subclass is now an independent class.

Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
Signed-off-by: Dmitrii <bankersenator@gmail.com>
MJPollard pushed a commit to AltairROM/android_frameworks_base that referenced this pull request Sep 14, 2024
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Changes made for Android 12:
  - Moved mayFakeSignature into lock-free Computer subclass
  - Always get permissions for packages that request signature spoofing
    (otherwise permissions are usually ommitted and thus the permission
    check doesn't work properly)
  - Optimize mayFakeSignature check order to improve performance

Link: microg/GmsCore#1586
Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
[@neobuddy89: Adapted for A13]
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
xdevs23 pushed a commit to halogenOS/android_frameworks_base that referenced this pull request Sep 23, 2024
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Changes made for Android 12:
  - Moved mayFakeSignature into lock-free Computer subclass
  - Always get permissions for packages that request signature spoofing
    (otherwise permissions are usually ommitted and thus the permission
    check doesn't work properly)
  - Optimize mayFakeSignature check order to improve performance

Link: microg/GmsCore#1586
Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Simao Gomes Viana <simao@halogenos.org>
xdevs23 pushed a commit to halogenOS/android_frameworks_base that referenced this pull request Sep 23, 2024
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Changes made for Android 12:
  - Moved mayFakeSignature into lock-free Computer subclass
  - Always get permissions for packages that request signature spoofing
    (otherwise permissions are usually ommitted and thus the permission
    check doesn't work properly)
  - Optimize mayFakeSignature check order to improve performance

Link: microg/GmsCore#1586
Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
[@neobuddy89: Adapted for A13]
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Simão Gomes Viana <devel@superboring.dev>
MJPollard pushed a commit to AltairROM/android_frameworks_base that referenced this pull request Oct 13, 2024
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Changes made for Android 12:
  - Moved mayFakeSignature into lock-free Computer subclass
  - Always get permissions for packages that request signature spoofing
    (otherwise permissions are usually ommitted and thus the permission
    check doesn't work properly)
  - Optimize mayFakeSignature check order to improve performance

Link: microg/GmsCore#1586
Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
[@neobuddy89: Adapted for A13]
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
MJPollard pushed a commit to AltairROM/android_frameworks_base that referenced this pull request Oct 17, 2024
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Changes made for Android 12:
  - Moved mayFakeSignature into lock-free Computer subclass
  - Always get permissions for packages that request signature spoofing
    (otherwise permissions are usually ommitted and thus the permission
    check doesn't work properly)
  - Optimize mayFakeSignature check order to improve performance

Link: microg/GmsCore#1586
Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
[@neobuddy89: Adapted for A13]
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
MJPollard pushed a commit to AltairROM/android_frameworks_base that referenced this pull request Oct 23, 2024
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Changes made for Android 12:
  - Moved mayFakeSignature into lock-free Computer subclass
  - Always get permissions for packages that request signature spoofing
    (otherwise permissions are usually ommitted and thus the permission
    check doesn't work properly)
  - Optimize mayFakeSignature check order to improve performance

Link: microg/GmsCore#1586
Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
[@neobuddy89: Adapted for A13]
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
MJPollard pushed a commit to AltairROM/android_frameworks_base that referenced this pull request Nov 2, 2024
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Changes made for Android 12:
  - Moved mayFakeSignature into lock-free Computer subclass
  - Always get permissions for packages that request signature spoofing
    (otherwise permissions are usually ommitted and thus the permission
    check doesn't work properly)
  - Optimize mayFakeSignature check order to improve performance

Link: microg/GmsCore#1586
Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
[@neobuddy89: Adapted for A13]
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
MJPollard pushed a commit to AltairROM/android_frameworks_base that referenced this pull request Nov 17, 2024
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Changes made for Android 12:
  - Moved mayFakeSignature into lock-free Computer subclass
  - Always get permissions for packages that request signature spoofing
    (otherwise permissions are usually ommitted and thus the permission
    check doesn't work properly)
  - Optimize mayFakeSignature check order to improve performance

Link: microg/GmsCore#1586
Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
[@neobuddy89: Adapted for A13]
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
asterixiverz pushed a commit to asterixiverz/ProtonAOSP that referenced this pull request Nov 22, 2024
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Changes made for Android 12:
  - Moved mayFakeSignature into lock-free Computer subclass
  - Always get permissions for packages that request signature spoofing
    (otherwise permissions are usually ommitted and thus the permission
    check doesn't work properly)
  - Optimize mayFakeSignature check order to improve performance

Link: microg/GmsCore#1586
Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
MJPollard pushed a commit to AltairROM/android_frameworks_base that referenced this pull request Dec 2, 2024
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Changes made for Android 12:
  - Moved mayFakeSignature into lock-free Computer subclass
  - Always get permissions for packages that request signature spoofing
    (otherwise permissions are usually ommitted and thus the permission
    check doesn't work properly)
  - Optimize mayFakeSignature check order to improve performance

Link: microg/GmsCore#1586
Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
[@neobuddy89: Adapted for A13]
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
MJPollard pushed a commit to AltairROM/android_frameworks_base that referenced this pull request Dec 10, 2024
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Changes made for Android 12:
  - Moved mayFakeSignature into lock-free Computer subclass
  - Always get permissions for packages that request signature spoofing
    (otherwise permissions are usually ommitted and thus the permission
    check doesn't work properly)
  - Optimize mayFakeSignature check order to improve performance

Link: microg/GmsCore#1586
Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
[@neobuddy89: Adapted for A13]
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
shutter-cat pushed a commit to VoltageOS-staging/frameworks_base_new that referenced this pull request Dec 15, 2024
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Changes made for Android 12:
  - Moved mayFakeSignature into lock-free Computer subclass
  - Always get permissions for packages that request signature spoofing
    (otherwise permissions are usually ommitted and thus the permission
    check doesn't work properly)
  - Optimize mayFakeSignature check order to improve performance

Changes made for Android 13:
  - Computer subclass is now an independent class.

Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
Signed-off-by: Dmitrii <bankersenator@gmail.com>
shutter-cat pushed a commit to VoltageOS-staging/frameworks_base_new that referenced this pull request Dec 15, 2024
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Changes made for Android 12:
  - Moved mayFakeSignature into lock-free Computer subclass
  - Always get permissions for packages that request signature spoofing
    (otherwise permissions are usually ommitted and thus the permission
    check doesn't work properly)
  - Optimize mayFakeSignature check order to improve performance

Changes made for Android 13:
  - Computer subclass is now an independent class.

Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
Signed-off-by: Dmitrii <bankersenator@gmail.com>
MJPollard pushed a commit to AltairROM/android_frameworks_base that referenced this pull request Dec 17, 2024
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Changes made for Android 12:
  - Moved mayFakeSignature into lock-free Computer subclass
  - Always get permissions for packages that request signature spoofing
    (otherwise permissions are usually ommitted and thus the permission
    check doesn't work properly)
  - Optimize mayFakeSignature check order to improve performance

Link: microg/GmsCore#1586
Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
[@neobuddy89: Adapted for A13]
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
xdevs23 pushed a commit to halogenOS/android_frameworks_base that referenced this pull request Jan 18, 2025
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Changes made for Android 12:
  - Moved mayFakeSignature into lock-free Computer subclass
  - Always get permissions for packages that request signature spoofing
    (otherwise permissions are usually ommitted and thus the permission
    check doesn't work properly)
  - Optimize mayFakeSignature check order to improve performance

Link: microg/GmsCore#1586
Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
[@neobuddy89: Adapted for A13]
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Simão Gomes Viana <devel@superboring.dev>
MJPollard pushed a commit to AltairROM/android_frameworks_base that referenced this pull request Jan 27, 2025
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Changes made for Android 12:
  - Moved mayFakeSignature into lock-free Computer subclass
  - Always get permissions for packages that request signature spoofing
    (otherwise permissions are usually ommitted and thus the permission
    check doesn't work properly)
  - Optimize mayFakeSignature check order to improve performance

Link: microg/GmsCore#1586
Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
[@neobuddy89: Adapted for A13]
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
MJPollard pushed a commit to AltairROM/android_frameworks_base that referenced this pull request Feb 18, 2025
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Changes made for Android 12:
  - Moved mayFakeSignature into lock-free Computer subclass
  - Always get permissions for packages that request signature spoofing
    (otherwise permissions are usually ommitted and thus the permission
    check doesn't work properly)
  - Optimize mayFakeSignature check order to improve performance

Link: microg/GmsCore#1586
Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
[@neobuddy89: Adapted for A13]
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Kizziama pushed a commit to HorizonDroidLabs/frameworks_base-backup2 that referenced this pull request Mar 5, 2025
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Changes made for Android 12:
  - Moved mayFakeSignature into lock-free Computer subclass
  - Always get permissions for packages that request signature spoofing
    (otherwise permissions are usually ommitted and thus the permission
    check doesn't work properly)
  - Optimize mayFakeSignature check order to improve performance

Link: microg/GmsCore#1586
Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
Kizziama pushed a commit to HorizonDroidLabs/frameworks_base-backup2 that referenced this pull request Mar 5, 2025
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Changes made for Android 12:
  - Moved mayFakeSignature into lock-free Computer subclass
  - Always get permissions for packages that request signature spoofing
    (otherwise permissions are usually ommitted and thus the permission
    check doesn't work properly)
  - Optimize mayFakeSignature check order to improve performance

Link: microg/GmsCore#1586
Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
Kizziama pushed a commit to HorizonDroidLabs/frameworks_base-backup2 that referenced this pull request Mar 5, 2025
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Changes made for Android 12:
  - Moved mayFakeSignature into lock-free Computer subclass
  - Always get permissions for packages that request signature spoofing
    (otherwise permissions are usually ommitted and thus the permission
    check doesn't work properly)
  - Optimize mayFakeSignature check order to improve performance

[SamarV-121: Adapt for T]

Link: microg/GmsCore#1586
Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
MJPollard pushed a commit to AltairROM/android_frameworks_base that referenced this pull request Mar 13, 2025
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Changes made for Android 12:
  - Moved mayFakeSignature into lock-free Computer subclass
  - Always get permissions for packages that request signature spoofing
    (otherwise permissions are usually ommitted and thus the permission
    check doesn't work properly)
  - Optimize mayFakeSignature check order to improve performance

Link: microg/GmsCore#1586
Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
[@neobuddy89: Adapted for A13]
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
MJPollard pushed a commit to AltairROM/android_frameworks_base that referenced this pull request May 10, 2025
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Changes made for Android 12:
  - Moved mayFakeSignature into lock-free Computer subclass
  - Always get permissions for packages that request signature spoofing
    (otherwise permissions are usually ommitted and thus the permission
    check doesn't work properly)
  - Optimize mayFakeSignature check order to improve performance

Link: microg/GmsCore#1586
Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
[@neobuddy89: Adapted for A13]
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
freetolga pushed a commit to LeafOS-experimental/android_frameworks_base_qpr2 that referenced this pull request May 13, 2025
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Sat Oct 16 05:27:57 2021 -0700

    Add support for app signature spoofing

    This is needed by microG GmsCore to pretend to be the official Google
    Play Services package, because client apps check the package signature
    to make sure it matches Google's official certificate.

    This was forward-ported from the Android 10 patch by gudenau:
    microg/GmsCore#957

    Changes made for Android 11:
      - Updated PackageInfo calls
      - Added new permission to public API surface, needed for
        PermissionController which is now an updatable APEX on 11
      - Added a dummy permission group to allow users to manage the
        permission through the PermissionController UI
        (by Vachounet <vachounet@live.fr>)
      - Updated location provider comment for conciseness

    Changes made for Android 12:
      - Moved mayFakeSignature into lock-free Computer subclass
      - Always get permissions for packages that request signature spoofing
        (otherwise permissions are usually ommitted and thus the permission
        check doesn't work properly)
      - Optimize mayFakeSignature check order to improve performance

    [SamarV-121: Adapt for T]
    [Linux4: Adapt for U]

    Link: microg/GmsCore#1586
    Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88

Author: Tim Zimmermann <tim@linux4.de>
Date:   Sat Jun 18 20:21:29 2022 +0200

    Restrict signature spoofing to platform apps

    Change-Id: Id2339172635bc97fe3cd7fc6be5627ac3657f024

Change-Id: I90ad3127ba471c240152f9558750e951ea6de2c6
MJPollard pushed a commit to AltairROM/android_frameworks_base that referenced this pull request Jun 7, 2025
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Changes made for Android 12:
  - Moved mayFakeSignature into lock-free Computer subclass
  - Always get permissions for packages that request signature spoofing
    (otherwise permissions are usually ommitted and thus the permission
    check doesn't work properly)
  - Optimize mayFakeSignature check order to improve performance

Link: microg/GmsCore#1586
Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
[@neobuddy89: Adapted for A13]
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
MJPollard pushed a commit to AltairROM/android_frameworks_base that referenced this pull request Jun 13, 2025
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Changes made for Android 12:
  - Moved mayFakeSignature into lock-free Computer subclass
  - Always get permissions for packages that request signature spoofing
    (otherwise permissions are usually ommitted and thus the permission
    check doesn't work properly)
  - Optimize mayFakeSignature check order to improve performance

Link: microg/GmsCore#1586
Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
[@neobuddy89: Adapted for A13]
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
KernelBuilding pushed a commit to KernelBuilding/frameworks_base that referenced this pull request Jun 24, 2025
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Changes made for Android 12:
  - Moved mayFakeSignature into lock-free Computer subclass
  - Always get permissions for packages that request signature spoofing
    (otherwise permissions are usually ommitted and thus the permission
    check doesn't work properly)
  - Optimize mayFakeSignature check order to improve performance

[SamarV-121: Adapt for T]

Link: microg/GmsCore#1586
Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
OliverSyx pushed a commit to Project-Legacy-UI/frameworks_base that referenced this pull request Jan 10, 2026
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <vachounet@live.fr>)
  - Updated location provider comment for conciseness

Changes made for Android 12:
  - Moved mayFakeSignature into lock-free Computer subclass
  - Always get permissions for packages that request signature spoofing
    (otherwise permissions are usually ommitted and thus the permission
    check doesn't work properly)
  - Optimize mayFakeSignature check order to improve performance

[SamarV-121: Adapt for T]

Link: microg/GmsCore#1586
Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
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.

10 participants