Skip to content

Commit

Permalink
6.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rushiranpise committed Jan 29, 2024
1 parent 8b1058e commit dbf3891
Show file tree
Hide file tree
Showing 3 changed files with 205 additions and 123 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ android {
minSdkVersion 28
targetSdkVersion 33
versionCode 4
versionName "5.0.0"
versionName "6.0.0"
}

buildTypes {
Expand Down
317 changes: 197 additions & 120 deletions app/src/main/java/io/github/rushiranpise/gameunlocker/GAMEUNLOCKER.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,192 +19,269 @@
public class GAMEUNLOCKER implements IXposedHookLoadPackage {

private static final String TAG = GAMEUNLOCKER.class.getSimpleName();
private static final String[] PACKAGE_ROG1 = {"com.madfingergames.legends"};
private static final String[] PACKAGE_ROG3 = {"com.pearlabyss.blackdesertm","com.pearlabyss.blackdesertm.gl"};
private static final String[] PACKAGE_OP8P = {"com.miHoYo.GenshinImpact", "com.netease.lztgglobal","com.pubg.krmobile","com.rekoo.pubgm","com.riotgames.league.wildrift","com.riotgames.league.wildrifttw","com.riotgames.league.wildriftvn","com.tencent.tmgp.pubgmhd","com.vng.pubgmobile"};
private static final String[] PACKAGE_OP9P = {"com.epicgames.fortnite","com.epicgames.portal","com.tencent.lolm"};
private static final String[] PACKAGE_M11TP = {"com.ea.gp.apexlegendsmobilefps","com.levelinfinite.hotta.gp","com.mobile.legends","com.mobilelegends.mi","com.supercell.clashofclans","com.vng.mlbbvn"};
private static final String[] PACKAGE_ROG6 = {"com.ea.gp.fifamobile","com.gameloft.android.ANMP.GloftA9HM"};
private static final String[] PACKAGE_F5 = {"com.dts.freefiremax","com.dts.freefireth"};
private static final String[] PACKAGE_NEO7 = {"com.pubg.imobile"};
private static final String[] PACKAGE_M11U = {"com.tencent.ig"};
private static final String[] PACKAGE_Y700 = {"com.vng.codmvn","com.activision.callofduty.shooter","com.garena.game.codm","com.tencent.tmgp.kr.codm"};
private static final String[] PACKAGE_V2254A = {"com.tencent.tmgp.sgame","com.levelinfinite.sgameGlobal"};
private static final String[] PACKAGE_NX729J = {"com.YoStar.AetherGazer"};
// Packages to Spoof as Asus Rog 1
private static final String[] PACKAGE_ROG1 = {
"com.madfingergames.legends"
};
// Packages to Spoof as Asus Rog 3
private static final String[] PACKAGE_ROG3 = {
"com.pearlabyss.blackdesertm",
"com.pearlabyss.blackdesertm.gl"
};
// Packages to Spoof as Asus Rog 6
private static final String[] PACKAGE_ROG6 = {
"com.epicgames.fortnite",
"com.ea.gp.fifamobile",
"com.gameloft.android.ANMP.GloftA9HM"
};

// Packages to Spoof as iQOO Neo 7
private static final String[] PACKAGE_NEO7 = {
"com.pubg.imobile"
};
// Packages to Spoof as iQOO 11 Pro
private static final String[] PACKAGE_V2254A = {
"com.tencent.tmgp.sgame",
"com.levelinfinite.sgameGlobal",
"com.mojang.minecraftpe"
};

// Packages to Spoof as Nubia Red Magic 8 Pro
private static final String[] PACKAGE_NX729J = {
"com.YoStar.AetherGazer"
};

// Packages to Spoof as Poco F5
private static final String[] PACKAGE_F5 = {
"com.dts.freefiremax",
"com.dts.freefireth"
};

// Packages to Spoof as OnePlus 8 Pro
private static final String[] PACKAGE_OP8P = {
"com.miHoYo.GenshinImpact",
"com.netease.lztgglobal",
"com.pubg.krmobile",
"com.rekoo.pubgm",
"com.tencent.tmgp.pubgmhd",
"com.vng.pubgmobile"
};
// Packages to Spoof as OnePlus 9 Pro
private static final String[] PACKAGE_OP9P = {
"jp.konami.pesam",
"com.epicgames.portal",
"com.riotgames.league.wildrift",
"com.riotgames.league.wildrifttw",
"com.riotgames.league.wildriftvn",
"com.tencent.lolm"
};

// Packages to Spoof as Samsung Galaxy S23 Ultra
private static final String[] PACKAGE_DM3Q = {
"com.vng.codmvn",
"com.activision.callofduty.shooter",
"com.garena.game.codm",
"com.tencent.tmgp.kr.codm",
"com.garena.game.kgvn"
};

// Packages to Spoof as Xiaomi Mi 11T Pro
private static final String[] PACKAGE_M11TP = {
"com.ea.gp.apexlegendsmobilefps",
"com.levelinfinite.hotta.gp",
"com.mobile.legends",
"com.mobilelegends.mi",
"com.supercell.clashofclans",
"com.vng.mlbbvn",
"com.tencent.ig"
};

// Packages to Spoof as Black Shark 4
private static final String[] PACKAGE_BS4 = {
"com.proximabeta.mf.uamo"
};

@Override
public void handleLoadPackage(XC_LoadPackage.LoadPackageParam loadPackageParam) {

String packageName = loadPackageParam.packageName;


// Asus
if (Arrays.asList(PACKAGE_ROG1).contains(packageName)) {
ROG1();
XposedBridge.log("Spoofed " + packageName + " as Asus ROG 1");

}

if (Arrays.asList(PACKAGE_ROG3).contains(packageName)) {
ROG3();
XposedBridge.log("Spoofed " + packageName + " as Asus ROG 3");

}

if (Arrays.asList(PACKAGE_OP8P).contains(packageName)) {
OP8P();
XposedBridge.log("Spoofed " + packageName + " as OnePlus 8 Pro");

}

if (Arrays.asList(PACKAGE_OP9P).contains(packageName)) {
OP9P();
XposedBridge.log("Spoofed " + packageName + " as OnePlus 9 PRO");

}

if (Arrays.asList(PACKAGE_M11TP).contains(packageName)) {
M11TP();
XposedBridge.log("Spoofed " + packageName + " as Mi 11T Pro");

}

if (Arrays.asList(PACKAGE_ROG6).contains(packageName)) {
ROG6();
XposedBridge.log("Spoofed " + packageName + " as Asus ROG 6");

}

if (Arrays.asList(PACKAGE_F5).contains(packageName)) {
POCOF5();
XposedBridge.log("Spoofed " + packageName + " as Poco F5");

// Blackshark
if (Arrays.asList(PACKAGE_BS4).contains(packageName)) {
BS4();
XposedBridge.log("Spoofed " + packageName + " as Blackshark 4");
}

// iQOO
if (Arrays.asList(PACKAGE_NEO7).contains(packageName)) {
NEO7();
XposedBridge.log("Spoofed " + packageName + " as iQOO Neo 7");

}

if (Arrays.asList(PACKAGE_M11U).contains(packageName)) {
M11U();
XposedBridge.log("Spoofed " + packageName + " as Mi 11 Ultra");

}

if (Arrays.asList(PACKAGE_Y700).contains(packageName)) {
Y700();
XposedBridge.log("Spoofed " + packageName + " as Lenovo Legion Y700");

}

if (Arrays.asList(PACKAGE_V2254A).contains(packageName)) {
V2254A();
XposedBridge.log("Spoofed " + packageName + " as iQOO 11 Pro");

}

// Nubia
if (Arrays.asList(PACKAGE_NX729J).contains(packageName)) {
NX729J();
XposedBridge.log("Spoofed " + packageName + " as Nubia Red Magic 8 Pro");
}

// OnePlus
if (Arrays.asList(PACKAGE_OP8P).contains(packageName)) {
OP8P();
XposedBridge.log("Spoofed " + packageName + " as OnePlus 8 Pro");
}
if (Arrays.asList(PACKAGE_OP9P).contains(packageName)) {
OP9P();
XposedBridge.log("Spoofed " + packageName + " as OnePlus 9 PRO");
}

// Poco
if (Arrays.asList(PACKAGE_F5).contains(packageName)) {
POCOF5();
XposedBridge.log("Spoofed " + packageName + " as Poco F5");
}

// Samsung
if (Arrays.asList(PACKAGE_DM3Q).contains(packageName)) {
DM3Q();
XposedBridge.log("Spoofed " + packageName + " as Samsung Galaxy S23 Ultra");
}

// Xiaomi
if (Arrays.asList(PACKAGE_M11TP).contains(packageName)) {
M11TP();
XposedBridge.log("Spoofed " + packageName + " as Xiaomi Mi 11T Pro");
}

}

// Asus
// Props to Spoof as Asus Rog 1
private static void ROG1() {
setBuildField("MANUFACTURER", "Asus");
setBuildField("MODEL", "ASUS_AI2201");
setPropValue("MANUFACTURER", "Asus");
setPropValue("MODEL", "ASUS_AI2201");
}

// Props to Spoof as Asus Rog 3
private static void ROG3() {
setBuildField("MANUFACTURER", "Asus");
setBuildField("MODEL", "ASUS_I003D");
setPropValue("MANUFACTURER", "Asus");
setPropValue("MODEL", "ASUS_I003D");
}

private static void XP5() {
setBuildField("MANUFACTURER", "Sony");
setBuildField("MODEL", "SO-52A");
// Props to Spoof as Asus Rog 6
private static void ROG6() {
setPropValue("BRAND", "asus");
setPropValue("MANUFACTURER", "asus");
setPropValue("DEVICE", "AI2201");
setPropValue("MODEL", "ASUS_AI2201");
}

private static void OP8P() {
setBuildField("BRAND", "OnePlus");
setBuildField("MANUFACTURER", "OnePlus");
setBuildField("DEVICE", "OnePlus8Pro");
setBuildField("MODEL", "IN2023");
// Blackshark
// Props to Spoof as Blackshark 4
private static void BS4() {
setPropValue("MANUFACTURER", "blackshark");
setPropValue("MODEL", "2SM-X706B");
}

private static void OP9P() {
setBuildField("BRAND", "OnePlus");
setBuildField("MANUFACTURER", "OnePlus");
setBuildField("DEVICE", "OnePlus9Pro");
setBuildField("PRODUCT", "OnePlus9Pro_EEA");
setBuildField("MODEL", "LE2123");
// iQOO
// Props to Spoof as iQOO Neo 7
private static void NEO7() {
setPropValue("MANUFACTURER", "iQOO");
setPropValue("MODEL", "I2214");
}

private static void M11TP() {
setBuildField("MANUFACTURER", "Xiaomi");
setBuildField("MODEL", "21081111RG");
// Props to Spoof as iQOO 11 Pro
private static void V2254A() {
setPropValue("MANUFACTURER", "vivo");
setPropValue("MODEL", "V2254A");
}

private static void POCOF4() {
setBuildField("MANUFACTURER", "Xiaomi");
setBuildField("MODEL", "22021211RG");
// Nubia
// Props to Spoof as Nubia Red Magic 8 Pro
private static void NX729J() {
setPropValue("BRAND", "nubia");
setPropValue("MANUFACTURER", "nubia");
setPropValue("DEVICE", "NX729J");
setPropValue("MODEL", "NX729J");
}

private static void ROG6() {
setBuildField("BRAND", "asus");
setBuildField("MANUFACTURER", "asus");
setBuildField("DEVICE", "AI2201");
setBuildField("MODEL", "ASUS_AI2201");
// Lenovo
// Props to Spoof as Lenovo Legion Y700
private static void Y700() {
setPropValue("MANUFACTURER", "lenovo");
setPropValue("MODEL", "Lenovo TB-9707F");
}

private static void POCOF5() {
setBuildField("MANUFACTURER", "Xiaomi");
setBuildField("MODEL", "23049PCD8G");
// OnePlus
// Props to Spoof as OnePlus 8 Pro
private static void OP8P() {
setPropValue("BRAND", "OnePlus");
setPropValue("MANUFACTURER", "OnePlus");
setPropValue("DEVICE", "OnePlus8Pro");
setPropValue("MODEL", "IN2020");
}

private static void NEO7() {
setBuildField("MANUFACTURER", "iQOO");
setBuildField("MODEL", "I2214");
// Props to Spoof as OnePlus 9 Pro
private static void OP9P() {
setPropValue("BRAND", "OnePlus");
setPropValue("MANUFACTURER", "OnePlus");
setPropValue("DEVICE", "OnePlus9Pro");
setPropValue("PRODUCT", "OnePlus9Pro_EEA");
setPropValue("MODEL", "LE2123");
}

private static void M11U() {
setBuildField("MANUFACTURER", "Xiaomi");
setBuildField("MODEL", "M2102K1G");
//Poco
// Props to Spoof as Poco F5
private static void POCOF5() {
setPropValue("BRAND", "Xiaomi");
setPropValue("MANUFACTURER", "Xiaomi");
setPropValue("MODEL", "23049PCD8G");
}

private static void Y700() {
setBuildField("MANUFACTURER", "lenovo");
setBuildField("MODEL", "Lenovo TB-9707F");
// Samsung
// Props to Spoof as Samsung S23 Ultra
private static void DM3Q() {
setPropValue("BRAND", "Samsung");
setPropValue("MANUFACTURER", "Samsung");
setPropValue("DEVICE", "dm3q");
setPropValue("MODEL", "SM-S918B");
}

private static void V2254A() {
setBuildField("MANUFACTURER", "vivo");
setBuildField("MODEL", "V2254A");
// Xiaomi
// Props to Spoof as Xiaomi Mi 11T Pro
private static void M11TP() {
setPropValue("BRAND", "Xiaomi");
setPropValue("MANUFACTURER", "Xiaomi");
setPropValue("MODEL", "21081111RG");
}

private static void NX729J() {
setBuildField("BRAND", "nubia");
setBuildField("MANUFACTURER", "nubia");
setBuildField("DEVICE", "NX729J");
setBuildField("MODEL", "NX729J");
// Props to Spoof as Xiaomi Mi 11 Ultra
private static void M11U() {
setPropValue("BRAND", "Xiaomi");
setPropValue("MANUFACTURER", "Xiaomi");
setPropValue("MODEL", "M2102K1G");
}

private static void setBuildField(String key, String value) {
private static void setPropValue(String key, Object value) {
try {
// Unlock
Log.d(TAG, "Defining prop " + key + " to " + value.toString());
Field field = Build.class.getDeclaredField(key);
field.setAccessible(true);
// Edit
field.set(null, value);
// Lock
field.setAccessible(false);

Log.d(TAG, "Spoofed" + key + " with value: " + value);

} catch (NoSuchFieldException | IllegalAccessException e) {
Log.e(TAG, "Failed to spoof App." + key, e);
XposedBridge.log("Failed to set prop: " + key + "\n" + Log.getStackTraceString(e));
}
}

}
}
Loading

0 comments on commit dbf3891

Please sign in to comment.