-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Add patch for Android Q #957
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
Conversation
| + } catch (Throwable t) { | ||
| + // We should never die because of any failures, this is system code! | ||
| + Log.w("PackageManagerService.FAKE_PACKAGE_SIGNATURE", t); | ||
| + } |
There was a problem hiding this comment.
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?
chris42
left a comment
There was a problem hiding this 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 @@ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| @@ -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 @@ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| @@ -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 @@ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| @@ -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 @@ | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <!-- 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| @@ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| @@ -4129,6 +4130,24 @@ public class PackageManagerService extends IPackageManager.Stub | |
| @@ -4145,6 +4146,24 @@ public class PackageManagerService extends IPackageManager.Stub |
|
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 if your system image is built with signature spoofing enabled then this patch is not required and you just need to |
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. |
|
how to patch this in frameworks/base ? |
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
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
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
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
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
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
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>
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>
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>
|
when I try to build for lineage 17.1, I get here is my local manifest |
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. |
|
The java part doesn't merge anymore in Lineage because they added some new code directly above it |
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
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
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
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
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
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
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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
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
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
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>
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>
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
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>
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>
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
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

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