MicroG 0.2.22.212658

This commit is contained in:
GoldenRetro 2021-09-11 09:36:50 +02:00
commit da6399b18c
29 changed files with 202 additions and 168 deletions

View file

@ -16,7 +16,7 @@ jobs:
- name: JDK 8 Setup
uses: actions/setup-java@v1
with:
java-version: 1.8
java-version: 11.0.8
- name: Install NDK
run: echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.0.6113669"

View file

@ -36,7 +36,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.2'
classpath 'com.android.tools.build:gradle:7.0.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "com.squareup.wire:wire-gradle-plugin:$wireVersion"
}
@ -46,8 +46,8 @@ allprojects {
apply plugin: 'idea'
group = 'org.microg.gms'
version = "0.2.21.212417"
ext.appVersionCode = 212417001
version = "0.2.22.212658"
ext.appVersionCode = 212658001
ext.isReleaseVersion = false
}

View file

@ -1,6 +1,6 @@
#Sat Jul 03 09:49:43 CEST 2021
#Sat Sep 11 09:04:01 CEST 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

View file

@ -3,5 +3,5 @@ package com.google.android.gms.clearcut.internal;
import com.google.android.gms.common.api.Status;
interface IClearcutLoggerCallbacks {
void onStatus(in Status status) = 0;
oneway void onStatus(in Status status) = 0;
}

View file

@ -4,6 +4,6 @@ import com.google.android.gms.common.api.Status;
import com.mgoogle.android.gms.phenotype.Configurations;
interface IPhenotypeCallbacks {
void onRegister(in Status status) = 0;
void onConfigurations(in Status status, in Configurations configurations) = 3;
oneway void onRegister(in Status status) = 0;
oneway void onConfigurations(in Status status, in Configurations configurations) = 3;
}

View file

@ -18,6 +18,8 @@ package com.google.android.gms.clearcut;
import android.util.Base64;
import com.google.android.gms.phenotype.ExperimentToken;
import com.google.android.gms.phenotype.GenericDimension;
import com.google.android.gms.playlog.internal.PlayLoggerContext;
import org.microg.safeparcel.AutoSafeParcelable;
@ -30,30 +32,36 @@ import java.nio.charset.StandardCharsets;
import java.util.Arrays;
public class LogEventParcelable extends AutoSafeParcelable {
@SafeParceled(1)
@Field(1)
private int versionCode = 1;
@SafeParceled(2)
@Field(2)
public final PlayLoggerContext context;
@SafeParceled(3)
@Field(3)
public final byte[] bytes;
@SafeParceled(4)
@Field(4)
public final int[] testCodes;
@SafeParceled(5)
@Field(5)
public final String[] mendelPackages;
@SafeParceled(6)
@Field(6)
public final int[] experimentIds;
@SafeParceled(7)
@Field(7)
public final byte[][] experimentTokens;
@SafeParceled(8)
@Field(8)
public final boolean addPhenotypeExperimentTokens;
@Field(9)
public final ExperimentToken[] experimentTokenParcelables;
@Field(10)
public final GenericDimension[] genericDimensions;
private LogEventParcelable() {
context = null;
bytes = null;
@ -61,6 +69,8 @@ public class LogEventParcelable extends AutoSafeParcelable {
mendelPackages = null;
experimentTokens = null;
addPhenotypeExperimentTokens = false;
experimentTokenParcelables = null;
genericDimensions = null;
}
public LogEventParcelable(PlayLoggerContext context, byte[] bytes, int[] testCodes, String[] mendelPackages, int[] experimentIds, byte[][] experimentTokens, boolean addPhenotypeExperimentTokens) {
@ -71,6 +81,8 @@ public class LogEventParcelable extends AutoSafeParcelable {
this.experimentIds = experimentIds;
this.experimentTokens = experimentTokens;
this.addPhenotypeExperimentTokens = addPhenotypeExperimentTokens;
experimentTokenParcelables = null;
genericDimensions = null;
}
@Override

View file

@ -21,55 +21,49 @@ import org.microg.safeparcel.SafeParceled;
public class PlayLoggerContext extends AutoSafeParcelable {
@SafeParceled(1)
@Field(1)
private int versionCode = 1;
@SafeParceled(2)
@Field(2)
public final String packageName;
@SafeParceled(3)
@Field(3)
public final int packageVersionCode;
@SafeParceled(4)
@Field(4)
public final int logSource;
@SafeParceled(5)
public final String uploadAccount;
@SafeParceled(6)
public final int loggingId;
@SafeParceled(7)
public final boolean logAndroidId;
@SafeParceled(8)
@Field(8)
public final String logSourceName;
@SafeParceled(9)
@Field(5)
public final String uploadAccount;
@Field(6)
public final String loggingId;
@Field(7)
public final boolean logAndroidId;
@Field(9)
public final boolean isAnonymous;
@SafeParceled(10)
@Field(10)
public final int qosTier;
@Field(11)
public final Integer appMobileSpecId;
@Field(12)
public final boolean scrubMccMnc;
private PlayLoggerContext() {
packageName = uploadAccount = logSourceName = null;
qosTier = packageVersionCode = logSource = loggingId = -1;
isAnonymous = logAndroidId = false;
packageName = uploadAccount = logSourceName = loggingId = null;
qosTier = packageVersionCode = logSource = appMobileSpecId = -1;
isAnonymous = logAndroidId = scrubMccMnc = false;
}
public PlayLoggerContext(String packageName, int packageVersionCode, int logSource, String uploadAccount, int loggingId, boolean logAndroidId) {
this.packageName = packageName;
this.packageVersionCode = packageVersionCode;
this.logSource = logSource;
this.logSourceName = null;
this.uploadAccount = uploadAccount;
this.loggingId = loggingId;
this.logAndroidId = logAndroidId;
this.isAnonymous = false;
this.qosTier = 0;
}
public PlayLoggerContext(String packageName, int packageVersionCode, int logSource, String logSourceName, String uploadAccount, int loggingId, boolean isAnonymous, int qosTier) {
public PlayLoggerContext(String packageName, int packageVersionCode, int logSource, String logSourceName, String uploadAccount, String loggingId, boolean isAnonymous, int qosTier, boolean scrubMccMnc) {
this.packageName = packageName;
this.packageVersionCode = packageVersionCode;
this.logSource = logSource;
@ -79,22 +73,25 @@ public class PlayLoggerContext extends AutoSafeParcelable {
this.logAndroidId = !isAnonymous;
this.isAnonymous = isAnonymous;
this.qosTier = qosTier;
this.appMobileSpecId = null;
this.scrubMccMnc = scrubMccMnc;
}
@Override
public String toString() {
return "PlayLoggerContext[" + versionCode +
", package=" + packageName +
", packageVersionCode=" + packageVersionCode +
", logSource=" + logSource +
", uploadAccount=" + uploadAccount +
", loggingId=" + loggingId +
", logAndroidId=" + logAndroidId +
", logSourceName=" + logSourceName +
", isAnonymous=" + isAnonymous +
", qosTier=" + qosTier +
']';
final StringBuilder sb = new StringBuilder("PlayLoggerContext[").append(versionCode);
sb.append(", package=").append(packageName);
sb.append(", packageVersionCode=").append(packageVersionCode);
sb.append(", logSource=").append(logSource);
sb.append(", uploadAccount=").append(uploadAccount);
sb.append(", loggingId=").append(loggingId);
sb.append(", logAndroidId=").append(logAndroidId);
sb.append(", logSourceName=").append(logSourceName);
sb.append(", isAnonymous=").append(isAnonymous);
sb.append(", qosTier=").append(qosTier);
sb.append(']');
return sb.toString();
}
public static Creator<PlayLoggerContext> CREATOR = new AutoCreator<>(PlayLoggerContext.class);
}
public static Creator<PlayLoggerContext> CREATOR = new AutoCreator<PlayLoggerContext>(PlayLoggerContext.class);
}

View file

@ -0,0 +1,12 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.android.gms.phenotype;
import org.microg.safeparcel.AutoSafeParcelable;
public class ExperimentToken extends AutoSafeParcelable {
public static final Creator<ExperimentToken> CREATOR = new AutoCreator<>(ExperimentToken.class);
}

View file

@ -0,0 +1,17 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.android.gms.phenotype;
import org.microg.safeparcel.AutoSafeParcelable;
public class GenericDimension extends AutoSafeParcelable {
@Field(1)
public int a;
@Field(2)
public int b;
public static final Creator<GenericDimension> CREATOR = new AutoCreator<>(GenericDimension.class);
}

View file

@ -39,6 +39,6 @@ dependencies {
api project(':play-services-tasks')
api project(':play-services-base-api')
implementation 'androidx.fragment:fragment:1.3.5'
implementation 'androidx.fragment:fragment:1.3.6'
implementation 'com.google.android.gms:play-services-base:17.6.0'
}

View file

@ -4,11 +4,11 @@ import com.google.android.gms.cast.LaunchOptions;
import com.google.android.gms.cast.JoinOptions;
interface ICastDeviceController {
void disconnect() = 0;
void stopApplication(String sessionId) = 4;
void sendMessage(String namespace, String message, long requestId) = 8;
void registerNamespace(String namespace) = 10;
void unregisterNamespace(String namespace) = 11;
void launchApplication(String applicationId, in LaunchOptions launchOptions) = 12;
void joinApplication(String applicationId, String sessionId, in JoinOptions joinOptions) = 13;
oneway void disconnect() = 0;
oneway void stopApplication(String sessionId) = 4;
oneway void sendMessage(String namespace, String message, long requestId) = 8;
oneway void registerNamespace(String namespace) = 10;
oneway void unregisterNamespace(String namespace) = 11;
oneway void launchApplication(String applicationId, in LaunchOptions launchOptions) = 12;
oneway void joinApplication(String applicationId, String sessionId, in JoinOptions joinOptions) = 13;
}

View file

@ -21,9 +21,6 @@ apply plugin: 'kotlin-kapt'
dependencies {
implementation 'com.squareup.wire:wire-runtime:3.6.1'
implementation 'de.hdodenhof:circleimageview:3.1.0'
// TODO: Switch to upstream once raw requests are merged
// https://github.com/vitalidze/chromecast-java-api-v2/pull/99
// implementation "su.litvak.chromecast:api-v2:0.10.4"
implementation "info.armills.chromecast-java-api-v2:api-v2-raw-request:0.10.4-raw-request-1"
implementation project(':play-services-cronet-core')
@ -33,8 +30,8 @@ dependencies {
implementation project(':play-services-cast-api')
// AndroidX UI
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'androidx.mediarouter:mediarouter:1.2.4'
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'androidx.mediarouter:mediarouter:1.2.5'
implementation "androidx.preference:preference-ktx:$preferenceVersion"
implementation "org.microg.gms:conscrypt-gmscore:2.5.1"

View file

@ -38,7 +38,7 @@ android {
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation "androidx.preference:preference:$preferenceVersion"
}

View file

@ -91,13 +91,6 @@
android:name="fake-signature"
android:value="@string/fake_signature" />
<!-- Internal Settings -->
<provider
android:name="org.microg.mgms.settings.SettingsProvider"
android:authorities="org.microg.mgms.settings"
android:exported="false" />
<!-- Services Framework -->
<provider
@ -478,6 +471,7 @@
<action android:name="com.google.android.gms.herrevad.services.LightweightNetworkQualityAndroidService.START" />
<action android:name="com.google.android.gms.gass.START" />
<action android:name="com.google.android.gms.audit.service.START" />
<action android:name="com.google.android.mobstore.service.START" />
</intent-filter>
</service>
</application>

View file

@ -29,7 +29,10 @@ public class ClearcutLoggerServiceImpl extends IClearcutLoggerService.Stub {
@Override
public void log(IClearcutLoggerCallbacks callbacks, LogEventParcelable event) throws RemoteException {
Log.d(TAG, "log: " + event);
callbacks.onStatus(Status.SUCCESS);
// These logs are not really helpful for us, so let's just ignore it.
try {
callbacks.onStatus(Status.SUCCESS);
} catch (Exception ignored) {
}
}
}

View file

@ -50,23 +50,7 @@ public class PackageUtils {
static {
KNOWN_GOOGLE_PACKAGES = new HashMap<>();
KNOWN_GOOGLE_PACKAGES.put("com.google.android.apps.classroom", "46f6c8987311e131f4f558d8e0ae145bebab6da3");
KNOWN_GOOGLE_PACKAGES.put("com.google.android.apps.inbox", "aa87ce1260c008d801197bb4ecea4ab8929da246");
KNOWN_GOOGLE_PACKAGES.put("com.google.android.apps.playconsole", "d6c35e55b481aefddd74152ca7254332739a81d6");
KNOWN_GOOGLE_PACKAGES.put("com.google.android.apps.travel.onthego", "0cbe08032217d45e61c0bc72f294395ee9ecb5d5");
KNOWN_GOOGLE_PACKAGES.put("com.google.android.apps.tycho", "01b844184e360686aa98b48eb16e05c76d4a72ad");
KNOWN_GOOGLE_PACKAGES.put("com.google.android.contacts", "ee3e2b5d95365c5a1ccc2d8dfe48d94eb33b3ebe");
KNOWN_GOOGLE_PACKAGES.put("com.google.android.wearable.app", "a197f9212f2fed64f0ff9c2a4edf24b9c8801c8c");
KNOWN_GOOGLE_PACKAGES.put("com.google.android.apps.youtube.music", "afb0fed5eeaebdd86f56a97742f4b6b33ef59875");
KNOWN_GOOGLE_PACKAGES.put("com.google.android.vr.home", "fc1edc68f7e3e4963c998e95fc38f3de8d1bfc96");
KNOWN_GOOGLE_PACKAGES.put("com.google.vr.cyclops", "188c5ca3863fa121216157a5baa80755ceda70ab");
KNOWN_GOOGLE_PACKAGES.put("com.waze", "35b438fe1bc69d975dc8702dc16ab69ebf65f26f");
KNOWN_GOOGLE_PACKAGES.put("com.google.android.apps.wellbeing", "4ebdd02380f1fa0b6741491f0af35625dba76e9f");
KNOWN_GOOGLE_PACKAGES.put("com.google.android.apps.village.boond", "48e7985b8f901df335b5d5223579c81618431c7b");
KNOWN_GOOGLE_PACKAGES.put("com.google.android.apps.subscriptions.red", "de8304ace744ae4c4e05887a27a790815e610ff0");
KNOWN_GOOGLE_PACKAGES.put("com.google.android.apps.meetings", "47a6936b733dbdb45d71997fbe1d610eca36b8bf");
KNOWN_GOOGLE_PACKAGES.put("com.google.android.apps.dynamite", "519c5a17a60596e6fe5933b9cb4285e7b0e5eb7b");
KNOWN_GOOGLE_PACKAGES.put("com.google.android.projection.gearhead", "9ca91f9e704d630ef67a23f52bf1577a92b9ca5d");
}
public static boolean isGooglePackage(Context context, String packageName) {

View file

@ -293,8 +293,8 @@ public class McsService extends Service implements Handler.Callback {
public synchronized static long getCurrentDelay() {
long delay = currentDelay == 0 ? 5000 : currentDelay;
if (currentDelay < 60000) currentDelay += 10000;
if (currentDelay >= 60000 && currentDelay < 600000) currentDelay += 60000;
if (currentDelay < GcmPrefs.INTERVAL) currentDelay += 10000;
if (currentDelay >= GcmPrefs.INTERVAL && currentDelay < 600000) currentDelay += GcmPrefs.INTERVAL;
return delay;
}

View file

@ -8,14 +8,14 @@ object AuthPrefs {
@JvmStatic
fun isTrustGooglePermitted(context: Context): Boolean {
return SettingsContract.getSettings(context, Auth.CONTENT_URI, arrayOf(Auth.TRUST_GOOGLE)) { c ->
return SettingsContract.getSettings(context, Auth.getContentUri(context), arrayOf(Auth.TRUST_GOOGLE)) { c ->
c.getInt(0) != 0
}
}
@JvmStatic
fun isAuthVisible(context: Context): Boolean {
return SettingsContract.getSettings(context, Auth.CONTENT_URI, arrayOf(Auth.VISIBLE)) { c ->
return SettingsContract.getSettings(context, Auth.getContentUri(context), arrayOf(Auth.VISIBLE)) { c ->
c.getInt(0) != 0
}
}

View file

@ -14,7 +14,7 @@ object CheckinPrefs {
@JvmStatic
fun isEnabled(context: Context): Boolean {
val projection = arrayOf(CheckIn.ENABLED)
return SettingsContract.getSettings(context, CheckIn.CONTENT_URI, projection) { c ->
return SettingsContract.getSettings(context, CheckIn.getContentUri(context), projection) { c ->
c.getInt(0) != 0
}
}
@ -22,21 +22,21 @@ object CheckinPrefs {
@JvmStatic
fun isSpoofingEnabled(context: Context): Boolean {
val projection = arrayOf(CheckIn.BRAND_SPOOF)
return SettingsContract.getSettings(context, CheckIn.CONTENT_URI, projection) { c ->
return SettingsContract.getSettings(context, CheckIn.getContentUri(context), projection) { c ->
c.getInt(0) != 0
}
}
@JvmStatic
fun setSpoofingEnabled(context: Context, enabled: Boolean) {
setSettings(context, CheckIn.CONTENT_URI) {
setSettings(context, CheckIn.getContentUri(context)) {
put(CheckIn.BRAND_SPOOF, enabled)
}
}
@JvmStatic
fun hideLauncherIcon(context: Context, enabled: Boolean) {
setSettings(context, CheckIn.CONTENT_URI) {
setSettings(context, CheckIn.getContentUri(context)) {
put(CheckIn.HIDE_LAUNCHER_ICON, enabled)
}
}

View file

@ -48,7 +48,7 @@ data class LastCheckinInfo(
CheckIn.VERSION_INFO,
CheckIn.DEVICE_DATA_VERSION_INFO,
)
return SettingsContract.getSettings(context, CheckIn.CONTENT_URI, projection) { c ->
return SettingsContract.getSettings(context, CheckIn.getContentUri(context), projection) { c ->
LastCheckinInfo(
androidId = c.getLong(0),
digest = c.getString(1),
@ -61,7 +61,7 @@ data class LastCheckinInfo(
}
@JvmStatic
fun clear(context: Context) = SettingsContract.setSettings(context, CheckIn.CONTENT_URI) {
fun clear(context: Context) = SettingsContract.setSettings(context, CheckIn.getContentUri(context)) {
put(CheckIn.ANDROID_ID, 0L)
put(CheckIn.DIGEST, CheckIn.INITIAL_DIGEST)
put(CheckIn.LAST_CHECK_IN, 0L)
@ -71,7 +71,7 @@ data class LastCheckinInfo(
}
}
fun write(context: Context) = SettingsContract.setSettings(context, CheckIn.CONTENT_URI) {
fun write(context: Context) = SettingsContract.setSettings(context, CheckIn.getContentUri(context)) {
put(CheckIn.ANDROID_ID, androidId)
put(CheckIn.DIGEST, digest)
put(CheckIn.LAST_CHECK_IN, lastCheckin)

Some files were not shown because too many files have changed in this diff Show more