feat(build): 新增 MX11 和 G12NL 平台支持

- 添加平台识别常量及构建变体
- 适配强制安装、USB 设置和系统属性逻辑
- 更新版本号并统一 debug 版本后缀格式
This commit is contained in:
tongtong committed 2026-09-07 16:42:34 +08:00
1 parent 3babc04942
commit a83464dd7e
8 files changed
+101 -36

No files matched your search

+70 -33
View File
@@ -18,8 +18,8 @@ android {
defaultConfig {
applicationId "com.aoleyun.sn"
versionCode 235
versionName "1.6.0815"
versionCode 236
versionName "1.6.0904"
//There are no CERT files because If the mini sdk version is 23+, the AGP will ignore the V1 scheme signature.
minSdkVersion 24
@@ -295,13 +295,50 @@ android {
v1SigningEnabled true
v2SigningEnabled true
}
MT6789 {
storeFile file("keystore/MT6789.keystore")
storePassword "123456"
keyAlias "mt6789"
keyPassword "123456"
v1SigningEnabled true
v2SigningEnabled true
}
}
buildTypes {
MX11Debug.initWith(debug)
MX11Debug {
buildConfigField "String", "platform", '"MX11"'
versionNameSuffix "_debug"
debuggable true
signingConfig signingConfigs.DX11
}
MX11Release.initWith(release)
MX11Release {
buildConfigField "String", "platform", '"MX11"'
signingConfig signingConfigs.DX11
}
G12NLDebug.initWith(debug)
G12NLDebug {
buildConfigField "String", "platform", '"G12NL"'
versionNameSuffix "_debug"
debuggable true
signingConfig signingConfigs.MT6789
}
G12NLRelease.initWith(release)
G12NLRelease {
buildConfigField "String", "platform", '"G12NL"'
signingConfig signingConfigs.MT6789
}
DX11Debug.initWith(debug)
DX11Debug {
buildConfigField "String", "platform", '"DX11"'
versionNameSuffix "-debug"
versionNameSuffix "_debug"
debuggable true
signingConfig signingConfigs.DX11
}
@@ -315,7 +352,7 @@ android {
G122Debug.initWith(debug)
G122Debug {
buildConfigField "String", "platform", '"MT6765"'
versionNameSuffix "-debug"
versionNameSuffix "_debug"
debuggable true
signingConfig signingConfigs.G122
}
@@ -329,7 +366,7 @@ android {
QualcommDebug.initWith(debug)
QualcommDebug {
buildConfigField "String", "platform", '"QualcommA"'
versionNameSuffix "-debug"
versionNameSuffix "_debug"
debuggable true
signingConfig signingConfigs.zhanRui
}
@@ -343,7 +380,7 @@ android {
G128TDebug.initWith(debug)
G128TDebug {
buildConfigField "String", "platform", '"G128T"'
versionNameSuffix "-debug"
versionNameSuffix "_debug"
debuggable true
signingConfig signingConfigs.G128T
}
@@ -357,7 +394,7 @@ android {
MT6765Debug.initWith(debug)
MT6765Debug {
buildConfigField "String", "platform", '"MT6765"'
versionNameSuffix "-debug"
versionNameSuffix "_debug"
debuggable true
signingConfig signingConfigs.MT6765
}
@@ -371,7 +408,7 @@ android {
QZ15Debug.initWith(debug)
QZ15Debug {
buildConfigField "String", "platform", '"QZA15"'
versionNameSuffix "-debug"
versionNameSuffix "_debug"
debuggable true
signingConfig signingConfigs.U1302
}
@@ -385,7 +422,7 @@ android {
iPlay50miniProDebug.initWith(debug)
iPlay50miniProDebug {
buildConfigField "String", "platform", '"miniG99"'
versionNameSuffix "-debug"
versionNameSuffix "_debug"
debuggable true
signingConfig signingConfigs.iPlay50miniPro
}
@@ -398,7 +435,7 @@ android {
seewoDebug.initWith(debug)
seewoDebug {
versionNameSuffix "-debug"
versionNameSuffix "_debug"
debuggable true
signingConfig signingConfigs.seewo
buildConfigField "String", "platform", '"seewo"'
@@ -412,7 +449,7 @@ android {
P50Debug.initWith(debug)
P50Debug {
versionNameSuffix "-debug"
versionNameSuffix "_debug"
debuggable true
signingConfig signingConfigs.P50
buildConfigField "String", "platform", '"P50TD"'
@@ -426,7 +463,7 @@ android {
G11JDebug.initWith(debug)
G11JDebug {
versionNameSuffix "-debug"
versionNameSuffix "_debug"
debuggable true
signingConfig signingConfigs.Huaruian8768
buildConfigField "String", "platform", '"aud8786"'
@@ -440,7 +477,7 @@ android {
T40AirDebug.initWith(debug)
T40AirDebug {
versionNameSuffix "-debug"
versionNameSuffix "_debug"
debuggable true
signingConfig signingConfigs.T40Air
buildConfigField "String", "platform", '"HL500"'
@@ -454,7 +491,7 @@ android {
BCM310Debug.initWith(debug)
BCM310Debug {
versionNameSuffix "-debug"
versionNameSuffix "_debug"
debuggable true
signingConfig signingConfigs.BCM310
buildConfigField "String", "platform", '"HL500"'
@@ -468,7 +505,7 @@ android {
AiUduDebug.initWith(debug)
AiUduDebug {
versionNameSuffix "-debug"
versionNameSuffix "_debug"
debuggable true
signingConfig signingConfigs.G10P
buildConfigField "String", "platform", '"AUDG104"'
@@ -482,7 +519,7 @@ android {
Huaruian8768Debug.initWith(debug)
Huaruian8768Debug {
versionNameSuffix "-debug"
versionNameSuffix "_debug"
debuggable true
signingConfig signingConfigs.Huaruian8768
buildConfigField "String", "platform", '"MT8768"'
@@ -496,7 +533,7 @@ android {
YXPD1Debug.initWith(debug)
YXPD1Debug {
versionNameSuffix "-debug"
versionNameSuffix "_debug"
debuggable true
signingConfig signingConfigs.G10P
buildConfigField "String", "platform", '"YXPD1"'
@@ -510,7 +547,7 @@ android {
c2Debug.initWith(debug)
c2Debug {
versionNameSuffix "-debug"
versionNameSuffix "_debug"
debuggable true
signingConfig signingConfigs.teclast8183
// signingConfig signingConfigs.mtk
@@ -526,7 +563,7 @@ android {
teclast8183Debug.initWith(debug)
teclast8183Debug {
versionNameSuffix "-debug"
versionNameSuffix "_debug"
debuggable true
signingConfig signingConfigs.teclast8183
buildConfigField "String", "platform", '"teclast8183"'
@@ -541,7 +578,7 @@ android {
iPlay5013Debug.initWith(debug)
iPlay5013Debug {
buildConfigField "String", "platform", '"iplay5013"'
versionNameSuffix "-debug"
versionNameSuffix "_debug"
debuggable true
signingConfig signingConfigs.iPlay50mini
}
@@ -554,7 +591,7 @@ android {
MTKAndroid12Debug.initWith(debug)
MTKAndroid12Debug {
versionNameSuffix "-debug"
versionNameSuffix "_debug"
debuggable true
signingConfig signingConfigs.mtk12
}
@@ -566,7 +603,7 @@ android {
G11Debug.initWith(debug)
G11Debug {
versionNameSuffix "-debug"
versionNameSuffix "_debug"
debuggable true
signingConfig signingConfigs.G11Userdebug
buildConfigField "String", "platform", '"MTKG11"'
@@ -580,7 +617,7 @@ android {
G10PDebug.initWith(debug)
G10PDebug {
versionNameSuffix "-debug"
versionNameSuffix "_debug"
debuggable true
signingConfig signingConfigs.G10P
buildConfigField "String", "platform", '"G10P"'
@@ -594,7 +631,7 @@ android {
G13Debug.initWith(debug)
G13Debug {
versionNameSuffix "-debug"
versionNameSuffix "_debug"
debuggable true
signingConfig signingConfigs.G10P
buildConfigField "String", "platform", '"HRAD13"'
@@ -608,7 +645,7 @@ android {
G104Debug.initWith(debug)
G104Debug {
versionNameSuffix "-debug"
versionNameSuffix "_debug"
debuggable true
signingConfig signingConfigs.G10P
buildConfigField "String", "platform", '"MTK11"'
@@ -622,7 +659,7 @@ android {
G104UserDebug.initWith(debug)
G104UserDebug {
versionNameSuffix "-debug"
versionNameSuffix "_debug"
debuggable true
signingConfig signingConfigs.G10PUserDebug
buildConfigField "String", "platform", '"MTK11"'
@@ -630,7 +667,7 @@ android {
zhanruiG10ZUserDebug.initWith(debug)
zhanruiG10ZUserDebug {
versionNameSuffix "-debug"
versionNameSuffix "_debug"
debuggable true
signingConfig signingConfigs.G10ZUserDebug
buildConfigField "String", "platform", '"ZR6016"'
@@ -638,7 +675,7 @@ android {
zhanruiG10ZDebug.initWith(debug)
zhanruiG10ZDebug {
versionNameSuffix "-debug"
versionNameSuffix "_debug"
debuggable true
signingConfig signingConfigs.zhanruiG10Z
buildConfigField "String", "platform", '"ZR6016"'
@@ -653,7 +690,7 @@ android {
TeclastP20SDebug.initWith(debug)
TeclastP20SDebug {
debuggable true
versionNameSuffix "-debug"
versionNameSuffix "_debug"
signingConfig signingConfigs.P20S
buildConfigField "String", "platform", '"P20S"'
}
@@ -667,7 +704,7 @@ android {
zhanRuiDebug.initWith(debug)
zhanRuiDebug {
debuggable true
versionNameSuffix "-debug"
versionNameSuffix "_debug"
signingConfig signingConfigs.zhanRui
buildConfigField "String", "platform", '"展锐"'
}
@@ -682,7 +719,7 @@ android {
zhanRuiUserdebug.initWith(zhanRuiDebug)
zhanRuiUserdebug {
debuggable true
versionNameSuffix "-debug"
versionNameSuffix "_debug"
signingConfig signingConfigs.zhanRuiUserdebug
buildConfigField "String", "platform", '"展锐"'
}
@@ -697,7 +734,7 @@ android {
zhanRui12Debug.initWith(debug)
zhanRui12Debug {
debuggable true
versionNameSuffix "-debug"
versionNameSuffix "_debug"
signingConfig signingConfigs.zhanRui12
buildConfigField "String", "platform", '"AH6016"'
}
@@ -710,7 +747,7 @@ android {
debug {
debuggable true
versionNameSuffix "-debug"
versionNameSuffix "_debug"
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
//Zipalign优化
Binary file not shown.
@@ -2978,7 +2978,9 @@ public class NetInterfaceManager {
private void setForceInstall(List<String> forceApp) {
Set<String> forceAppSet = new HashSet<>();
if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.DX11Platform) {
if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.DX11Platform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.MX11Platform
) {
forceAppSet.addAll(ApkUtils.DX11App);
}
if (forceApp != null) {
@@ -804,6 +804,7 @@ public class GuardService extends Service {
Intent usbIntent = new Intent(usbStatus);
if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.TeclastP20sPlatform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.DX11Platform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.MX11Platform
) {
usbIntent.setPackage("com.android.settings");
}
@@ -555,6 +555,9 @@ public class ApkUtils {
this.add("com.example.abc_qq_app");
this.add("com.yangcong345.onionschool");
this.add("com.yangcong345.zhike");
this.add("com.aidouxue.question_survivors");
this.add("com.aidouxue.learning.yinji");
}};
public static void HideAiUDuApp() {
@@ -177,6 +177,8 @@ public class JgyUtils {
public static final int G128TPlatform = 29;
public static final int QualcommTPlatform = 30;
public static final int DX11Platform = 31;
public static final int G12NLPlatform = 32;
public static final int MX11Platform = 33;
public static final String Other = "其他";
@@ -204,6 +206,8 @@ public class JgyUtils {
public static final String G128T_TAG = "G128T";
public static final String Qualcomm_TAG = "QualcommA";
public static final String DX11_TAG = "DX11";
public static final String G12NL_TAG = "G12NL";
public static final String MX11_TAG = "MX11";
private CacheHelper cacheHelper;
@@ -363,9 +367,15 @@ public class JgyUtils {
} else if (Qualcomm_TAG.equalsIgnoreCase(platform)) {
Log.i(TAG, "checkAppPlatform: " + "QualcommA");
return QualcommTPlatform;
} else if (G12NL_TAG.equalsIgnoreCase(platform)) {
Log.i(TAG, "checkAppPlatform: " + "G12NL");
return G12NLPlatform;
} else if (DX11_TAG.equalsIgnoreCase(platform)) {
Log.i(TAG, "checkAppPlatform: " + "DX11");
return DX11Platform;
} else if (MX11_TAG.equalsIgnoreCase(platform)) {
Log.i(TAG, "checkAppPlatform: " + "MX11");
return MX11Platform;
} else {
Log.i(TAG, "checkAppPlatform: " + "没有数据");
return UnknowPlatform;
@@ -434,8 +444,12 @@ public class JgyUtils {
getAppPlatformCallback.AppPlatform(G128TPlatform);
} else if (Qualcomm_TAG.equalsIgnoreCase(platform)) {
getAppPlatformCallback.AppPlatform(QualcommTPlatform);
} else if (G12NL_TAG.equalsIgnoreCase(platform)) {
getAppPlatformCallback.AppPlatform(G12NLPlatform);
} else if (DX11_TAG.equalsIgnoreCase(platform)) {
getAppPlatformCallback.AppPlatform(DX11Platform);
} else if (MX11_TAG.equalsIgnoreCase(platform)) {
getAppPlatformCallback.AppPlatform(MX11Platform);
} else {
getAppPlatformCallback.AppPlatform(UnknowPlatform);
}
@@ -1483,7 +1497,8 @@ public class JgyUtils {
if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.G11Platform) {
pkgSet.addAll(ApkUtils.G11Pkgs);
}
if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.DX11Platform) {
if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.DX11Platform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.MX11Platform) {
pkgSet.addAll(ApkUtils.DX11App);
}
if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.YXPD1Platform) {
@@ -1830,7 +1845,8 @@ public class JgyUtils {
if (ApkUtils.mJxwApp.contains(packageName)) {
continue;
}
if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.DX11Platform) {
if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.DX11Platform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.MX11Platform) {
if (ApkUtils.DX11App.contains(packageName)) {
continue;
}
@@ -150,6 +150,7 @@ public class SysSettingUtils {
if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.TeclastP20sPlatform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.AH6016Platform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.DX11Platform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.MX11Platform
) {
usbIntent.setPackage("com.android.settings");
}
@@ -254,6 +255,7 @@ public class SysSettingUtils {
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.AH6016Platform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.seewoPlatform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.DX11Platform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.MX11Platform
) {
usbIntent.setPackage("com.android.settings");
}
@@ -324,6 +326,7 @@ public class SysSettingUtils {
if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.TeclastP20sPlatform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.AH6016Platform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.DX11Platform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.MX11Platform
) {
usbIntent.setPackage("com.android.settings");
}
@@ -1239,6 +1242,7 @@ public class SysSettingUtils {
if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.TeclastP20sPlatform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.AH6016Platform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.DX11Platform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.MX11Platform
) {
usbIntent.setPackage("com.android.settings");
}
@@ -1847,6 +1847,8 @@ public class Utils {
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.G128TPlatform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.QualcommTPlatform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.DX11Platform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.G12NLPlatform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.MX11Platform
) {
return Utils.getProperty("ro.build.display.id", "获取失败");
} else {