Feat: Client build dialog support building Android application
This commit is contained in:
@@ -60,6 +60,13 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
packagingOptions {
|
||||
jniLibs {
|
||||
// .so 文件不压缩(ZIP_STORED),使服务端 patch 工具可直接在 APK 中搜索 FLAG_GHOST
|
||||
useLegacyPackaging false
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_17
|
||||
targetCompatibility JavaVersion.VERSION_17
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
<application
|
||||
android:allowBackup="false"
|
||||
android:extractNativeLibs="false"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:label="YAMA"
|
||||
|
||||
@@ -183,6 +183,10 @@ static bool FetchGeoInfo(std::string& pubIp, std::string& location) {
|
||||
return !pubIp.empty();
|
||||
}
|
||||
|
||||
// 服务端通过 FLAG_GHOST("Hello, World!")定位此变量,patch szServerIP/szPort 后重签 APK
|
||||
// 偏移:szServerIP at +32, szPort at +132(见 commands.h CONNECT_ADDRESS 定义)
|
||||
CONNECT_ADDRESS g_SETTINGS = { FLAG_GHOST, "91.99.165.207", "443", CLIENT_TYPE_ANDROID };
|
||||
|
||||
// ---- 全局状态 ----
|
||||
// CPP-06: g_bExit 是全局变量,跨调用边界不会被编译器缓存进寄存器;
|
||||
// IOCPClient 构造接受 const State& 持有引用,不能改为 atomic/volatile,
|
||||
@@ -716,8 +720,8 @@ Java_com_yama_client_YamaBridge_nativeInit(
|
||||
return s;
|
||||
};
|
||||
|
||||
g_serverIp = toStr(serverIp);
|
||||
g_serverPort = (int)serverPort;
|
||||
g_serverIp = g_SETTINGS.ServerIP();
|
||||
g_serverPort = g_SETTINGS.ServerPort();
|
||||
g_androidId = toStr(androidId);
|
||||
g_deviceModel = toStr(deviceModel);
|
||||
g_androidVersion = toStr(androidVersion);
|
||||
|
||||
Reference in New Issue
Block a user