Skip to content

Commit a349fbd

Browse files
committed
🔖 Initial v1.0 release
1 parent faafb34 commit a349fbd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+956
-0
lines changed

app/build.gradle

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
plugins {
2+
id 'com.android.application'
3+
id 'org.jetbrains.kotlin.android'
4+
}
5+
6+
android {
7+
namespace 'com.google.android.projection.gearhead.xunlocked'
8+
compileSdk 33
9+
10+
defaultConfig {
11+
applicationId "com.google.android.projection.gearhead.xunlocked"
12+
minSdk 24
13+
targetSdk 33
14+
versionCode 1
15+
versionName "1.0"
16+
17+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
18+
}
19+
20+
buildTypes {
21+
release {
22+
minifyEnabled false
23+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
24+
}
25+
}
26+
compileOptions {
27+
sourceCompatibility JavaVersion.VERSION_1_8
28+
targetCompatibility JavaVersion.VERSION_1_8
29+
}
30+
kotlinOptions {
31+
jvmTarget = '1.8'
32+
}
33+
}
34+
35+
dependencies {
36+
implementation 'androidx.core:core-ktx:1.7.0'
37+
implementation 'androidx.appcompat:appcompat:1.6.1'
38+
implementation 'com.google.android.material:material:1.8.0'
39+
testImplementation 'junit:junit:4.13.2'
40+
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
41+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
42+
compileOnly 'de.robv.android.xposed:api:82'
43+
}

app/proguard-rules.pro

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package com.google.android.projection.gearhead.xunlocked
2+
3+
import androidx.test.platform.app.InstrumentationRegistry
4+
import androidx.test.ext.junit.runners.AndroidJUnit4
5+
6+
import org.junit.Test
7+
import org.junit.runner.RunWith
8+
9+
import org.junit.Assert.*
10+
11+
/**
12+
* Instrumented test, which will execute on an Android device.
13+
*
14+
* See [testing documentation](http://d.android.com/tools/testing).
15+
*/
16+
@RunWith(AndroidJUnit4::class)
17+
class ExampleInstrumentedTest {
18+
@Test
19+
fun useAppContext() {
20+
// Context of the app under test.
21+
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22+
assertEquals("com.google.android.projection.gearhead.xunlocked", appContext.packageName)
23+
}
24+
}

app/src/main/AndroidManifest.xml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools">
4+
5+
<application
6+
android:allowBackup="true"
7+
android:dataExtractionRules="@xml/data_extraction_rules"
8+
android:fullBackupContent="@xml/backup_rules"
9+
android:icon="@mipmap/ic_launcher"
10+
android:label="@string/app_name"
11+
android:supportsRtl="true"
12+
android:theme="@style/Theme.AndroidAutoXposedUnlocked"
13+
tools:targetApi="31">
14+
15+
<meta-data
16+
android:name="xposedmodule"
17+
android:value="true" />
18+
<meta-data
19+
android:name="xposeddescription"
20+
android:value="Unlock more 3th party Android Auto apps! Module by Rikj000" />
21+
<meta-data
22+
android:name="xposedminversion"
23+
android:value="54" />
24+
<meta-data
25+
android:name="xposedscope"
26+
android:resource="@array/xposedscope" />
27+
</application>
28+
29+
</manifest>

app/src/main/assets/xposed_init

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
com.google.android.projection.gearhead.xunlocked.AAXUnlock
37.6 KB
Loading
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
package com.google.android.projection.gearhead.xunlocked;
2+
3+
import static de.robv.android.xposed.XposedBridge.log;
4+
5+
import android.content.pm.InstallSourceInfo;
6+
import android.content.pm.PackageManager;
7+
import android.os.Build;
8+
9+
import de.robv.android.xposed.IXposedHookLoadPackage;
10+
import de.robv.android.xposed.XC_MethodHook;
11+
import de.robv.android.xposed.XposedHelpers;
12+
import de.robv.android.xposed.callbacks.XC_LoadPackage;
13+
14+
public class AAXUnlock implements IXposedHookLoadPackage {
15+
private static final String AA_PKG = "com.google.android.projection.gearhead";
16+
private static final String GPLAY_PKG = "com.android.vending";
17+
18+
@Override
19+
public void handleLoadPackage(XC_LoadPackage.LoadPackageParam lpparam) {
20+
if (!AA_PKG.equals(lpparam.packageName)) return;
21+
log("Hooking package " + AA_PKG);
22+
23+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
24+
XposedHelpers.findAndHookMethod(
25+
InstallSourceInfo.class, "getInitiatingPackageName", new XC_MethodHook() {
26+
27+
@Override
28+
protected void afterHookedMethod(MethodHookParam param) {
29+
param.setResult(GPLAY_PKG);
30+
}
31+
});
32+
} else {
33+
XposedHelpers.findAndHookMethod(
34+
PackageManager.class, "getInstallerPackageName", new XC_MethodHook() {
35+
36+
@Override
37+
protected void afterHookedMethod(MethodHookParam param) {
38+
param.setResult(GPLAY_PKG);
39+
}
40+
});
41+
}
42+
}
43+
}
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<vector
3+
android:height="108dp"
4+
android:width="108dp"
5+
android:viewportHeight="108"
6+
android:viewportWidth="108"
7+
xmlns:android="http://schemas.android.com/apk/res/android">
8+
<path android:fillColor="#3DDC84"
9+
android:pathData="M0,0h108v108h-108z"/>
10+
<path android:fillColor="#00000000" android:pathData="M9,0L9,108"
11+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
12+
<path android:fillColor="#00000000" android:pathData="M19,0L19,108"
13+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
14+
<path android:fillColor="#00000000" android:pathData="M29,0L29,108"
15+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
16+
<path android:fillColor="#00000000" android:pathData="M39,0L39,108"
17+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
18+
<path android:fillColor="#00000000" android:pathData="M49,0L49,108"
19+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
20+
<path android:fillColor="#00000000" android:pathData="M59,0L59,108"
21+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
22+
<path android:fillColor="#00000000" android:pathData="M69,0L69,108"
23+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
24+
<path android:fillColor="#00000000" android:pathData="M79,0L79,108"
25+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
26+
<path android:fillColor="#00000000" android:pathData="M89,0L89,108"
27+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
28+
<path android:fillColor="#00000000" android:pathData="M99,0L99,108"
29+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
30+
<path android:fillColor="#00000000" android:pathData="M0,9L108,9"
31+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
32+
<path android:fillColor="#00000000" android:pathData="M0,19L108,19"
33+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
34+
<path android:fillColor="#00000000" android:pathData="M0,29L108,29"
35+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
36+
<path android:fillColor="#00000000" android:pathData="M0,39L108,39"
37+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
38+
<path android:fillColor="#00000000" android:pathData="M0,49L108,49"
39+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
40+
<path android:fillColor="#00000000" android:pathData="M0,59L108,59"
41+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
42+
<path android:fillColor="#00000000" android:pathData="M0,69L108,69"
43+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
44+
<path android:fillColor="#00000000" android:pathData="M0,79L108,79"
45+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
46+
<path android:fillColor="#00000000" android:pathData="M0,89L108,89"
47+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
48+
<path android:fillColor="#00000000" android:pathData="M0,99L108,99"
49+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
50+
<path android:fillColor="#00000000" android:pathData="M19,29L89,29"
51+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
52+
<path android:fillColor="#00000000" android:pathData="M19,39L89,39"
53+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
54+
<path android:fillColor="#00000000" android:pathData="M19,49L89,49"
55+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
56+
<path android:fillColor="#00000000" android:pathData="M19,59L89,59"
57+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
58+
<path android:fillColor="#00000000" android:pathData="M19,69L89,69"
59+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
60+
<path android:fillColor="#00000000" android:pathData="M19,79L89,79"
61+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
62+
<path android:fillColor="#00000000" android:pathData="M29,19L29,89"
63+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
64+
<path android:fillColor="#00000000" android:pathData="M39,19L39,89"
65+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
66+
<path android:fillColor="#00000000" android:pathData="M49,19L49,89"
67+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
68+
<path android:fillColor="#00000000" android:pathData="M59,19L59,89"
69+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
70+
<path android:fillColor="#00000000" android:pathData="M69,19L69,89"
71+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
72+
<path android:fillColor="#00000000" android:pathData="M79,19L79,89"
73+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
74+
</vector>

0 commit comments

Comments
 (0)