Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*
* SPDX-FileCopyrightText: 2026, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/

package com.google.android.gms.phenotype.internal;

interface IFlagUpdateListener {
oneway void onFlagUpdateListener(in byte[] bytes) = 1;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
* SPDX-FileCopyrightText: 2026, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.android.gms.phenotype.internal;

import com.google.android.gms.common.api.Status;

interface IGetStorageInfoCallbacks {
oneway void onGetStorageInfoed(in Status status, in byte[] bytes) = 1;
}
8 changes: 0 additions & 8 deletions play-services-base/core/package/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,5 @@
android:authorities="${applicationId}.microg.profile"
android:exported="true"
tools:ignore="ExportedContentProvider" />
<service
android:name="org.microg.gms.moduleinstall.ModuleInstallService"
android:exported="true">
<intent-filter>
<action android:name="com.google.android.gms.chimera.container.moduleinstall.ModuleInstallService.START" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</service>
</application>
</manifest>

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ private val KNOWN_GOOGLE_APP_CERT_HASHES = listOf(
"3d7a1223019aa39d9ea0e3436ab7c0896bfb4fb679f4de5fe7c23f326c8f994a"
)

/**
* All known Google signing-certificate SHA-256 hashes (the privileged platform certs + the official-apps
* cert), for callers that only need to decide whether a certificate is one of Google's, independent of the
* per-package permission model below. Stays in sync automatically as the lists above grow.
*/
val KNOWN_GOOGLE_CERT_SHA256: Set<String> =
(KNOWN_GOOGLE_PRIVILEGED_CERT_HASHES + KNOWN_GOOGLE_APP_CERT_HASHES).toSet()

// This is a subset of permissions that we grant to apps signed with an official
// Google apps certificate. Note that this has lower priority than the
// KNOWN_GOOGLE_PACKAGES list, so if any app needs more permissions than this,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,17 @@ object SettingsContract {
)
}

object DynamicModule {
const val ID = "dynamicmodule"
fun getContentUri(context: Context) = Uri.withAppendedPath(getAuthorityUri(context), ID)
fun getContentType(context: Context) = "vnd.android.cursor.item/vnd.${getAuthority(context)}.$ID"
const val DYNAMIC_MODULE_ENABLED = "dynamicmodule_enabled"

val PROJECTION = arrayOf(
DYNAMIC_MODULE_ENABLED
)
}

private fun <T> withoutCallingIdentity(f: () -> T): T {
val identity = Binder.clearCallingIdentity()
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import org.microg.gms.settings.SettingsContract.Gcm
import org.microg.gms.settings.SettingsContract.Location
import org.microg.gms.settings.SettingsContract.Profile
import org.microg.gms.settings.SettingsContract.SafetyNet
import org.microg.gms.settings.SettingsContract.DynamicModule
import org.microg.gms.settings.SettingsContract.Vending
import org.microg.gms.settings.SettingsContract.WorkProfile
import org.microg.gms.settings.SettingsContract.getAuthority
Expand Down Expand Up @@ -85,6 +86,7 @@ class SettingsProvider : ContentProvider() {
Vending.ID -> queryVending(projection ?: Vending.PROJECTION)
WorkProfile.ID -> queryWorkProfile(projection ?: WorkProfile.PROJECTION)
GameProfile.ID -> queryGameProfile(projection ?: GameProfile.PROJECTION)
DynamicModule.ID -> queryDynamicModule(projection ?: DynamicModule.PROJECTION)
else -> null
}

Expand All @@ -108,6 +110,7 @@ class SettingsProvider : ContentProvider() {
Vending.ID -> updateVending(values)
WorkProfile.ID -> updateWorkProfile(values)
GameProfile.ID -> updateGameProfile(values)
DynamicModule.ID -> updateDynamicModule(values)
else -> return 0
}
return 1
Expand Down Expand Up @@ -440,6 +443,25 @@ class SettingsProvider : ContentProvider() {
editor.apply()
}

private fun queryDynamicModule(p: Array<out String>): Cursor = MatrixCursor(p).addRow(p) { key ->
when (key) {
DynamicModule.DYNAMIC_MODULE_ENABLED -> getSettingsBoolean(key, false)
else -> throw IllegalArgumentException("Unknown key: $key")
}
}

private fun updateDynamicModule(values: ContentValues) {
if (values.size() == 0) return
val editor = preferences.edit()
values.valueSet().forEach { (key, value) ->
when (key) {
DynamicModule.DYNAMIC_MODULE_ENABLED -> editor.putBoolean(key, value as Boolean)
else -> throw IllegalArgumentException("Unknown key: $key")
}
}
editor.apply()
}

private fun MatrixCursor.addRow(
p: Array<out String>,
valueGetter: (String) -> Any?
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* SPDX-FileCopyrightText: 2026, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/

package com.google.android.gms.common.net;

import com.google.android.gms.dynamic.IObjectWrapper;

interface ISocketFactoryCreator {
IObjectWrapper newSocketFactory(in IObjectWrapper context, in IObjectWrapper keyManagers, in IObjectWrapper trustManagers, boolean useCache) = 1;
IObjectWrapper newSocketFactoryWithCacheDir(in IObjectWrapper context, in IObjectWrapper keyManagers, in IObjectWrapper trustManagers, String cacheDir) = 2;
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ import com.google.android.gms.dynamic.IObjectWrapper;

interface IDynamiteLoader {
int getModuleVersion(IObjectWrapper wrappedContext, String moduleId) = 0;
int getModuleVersion2(IObjectWrapper wrappedContext, String moduleId, boolean updateConfigIfRequired) = 2;
int getModuleVersionV2(IObjectWrapper wrappedContext, String moduleId, boolean updateConfigIfRequired) = 4;
IObjectWrapper getModuleVersionV3(IObjectWrapper wrappedContext, String moduleId, boolean updateConfigIfRequired, long requestStartTime) = 6;

IObjectWrapper createModuleContext(IObjectWrapper wrappedContext, String moduleId, int minVersion) = 1;
IObjectWrapper createModuleContextV2(IObjectWrapper wrappedContext, String moduleId, int minVersion) = 3;
IObjectWrapper createModuleContextV3(IObjectWrapper wrappedContext, String moduleId, int minVersion, IObjectWrapper cursorWrapped) = 7;

int getModuleVersion2(IObjectWrapper wrappedContext, String moduleId, boolean updateConfigIfRequired) = 2;
IObjectWrapper createModuleContextNoCrashUtils(IObjectWrapper wrappedContext, String moduleId, int minVersion) = 3;
int getModuleVersion2NoCrashUtils(IObjectWrapper wrappedContext, String moduleId, boolean updateConfigIfRequired) = 4;
int getIDynamiteLoaderVersion() = 5;
IObjectWrapper queryForDynamiteModuleNoCrashUtils(IObjectWrapper wrappedContext, String moduleId, boolean updateConfigIfRequired, long requestStartTime) = 6;
IObjectWrapper createModuleContext3NoCrashUtils(IObjectWrapper wrappedContext, String moduleId, int minVersion, IObjectWrapper cursorWrapped) = 7;
}
Loading