chore: 整理文档目录并清理冗余 JNI 与布局文件

This commit is contained in:
tongtong committed 2026-10-22 16:32:04 +08:00
1 parent e95490b5ce
commit dfd43a167b
14 files changed
+49 -89

No files matched your search

+6 -4
View File
@@ -5,19 +5,21 @@
cmake_minimum_required(VERSION 3.4.1)
project(aoleyun CXX)
# Creates and names a library, sets it as either STATIC
# or SHARED, and provides the relative paths to its source code.
# You can define multiple libraries, and CMake builds them for you.
# Gradle automatically packages shared libraries with your APK.
add_library( # Sets the name of the library.
jgy
aoleyun
# Sets the library as a shared library.
SHARED
# Provides a relative path to your source file(s).
src/main/jni/jgy.cpp )
src/main/jni/aoleyun.cpp)
# Searches for a specified prebuilt library and stores the path as a
# variable. Because CMake includes system libraries in the search path by
@@ -37,10 +39,10 @@ find_library( # Sets the name of the path variable.
# build script, prebuilt third-party libraries, or system libraries.
target_link_libraries( # Specifies the target library.
jgy
aoleyun
# Links the target library to the log library
# included in the NDK.
${log-lib} )
set_target_properties(jgy PROPERTIES LINK_FLAGS "-Wl,-z,max-page-size=16384")
set_target_properties(aoleyun PROPERTIES LINK_FLAGS "-Wl,-z,max-page-size=16384")
+13 -13
View File
@@ -18,8 +18,8 @@ android {
defaultConfig {
applicationId "com.aoleyun.sn"
versionCode 252
versionName "1.6.1021"
versionCode 253
versionName "1.6.1022"
//There are no CERT files because If the mini sdk version is 23+, the AGP will ignore the V1 scheme signature.
minSdkVersion 24
@@ -45,7 +45,7 @@ android {
buildConfigField "String", "WEBSOCKET_URL", '"wss://led.aoleyun.cn/wss/"'
// 百度定位 AK:统一在构建期注入,所有 buildType / flavor 共用同一份固定值。
// 严禁事后修改 APK(反编译重打包会破坏 liblocSDK8b.so 的未压缩与页对齐,导致 162 / .dynamic section header was not found)
// 注意:liblocSDK8b.so 不能被 strip 或重打包(见下方 packaging 配置),否则定位返回 162。
}
@@ -76,6 +76,14 @@ android {
}
}
packaging {
jniLibs {
// liblocSDK8b.so 使用自定义 ELF 布局,AGP 的 strip 会重写其节头表并丢失 .dynamic,
// 导致运行时请求串解密失败(getLocType() 返回 162)。必须原样打包。
keepDebugSymbols += ['**/liblocSDK8b.so']
}
}
// Disable release builds for now
android.variantFilter { variant ->
// // Icon recents is Go only
@@ -354,7 +362,6 @@ android {
G122JDebug.initWith(debug)
G122JDebug {
manifestPlaceholders = [BAIDU_LBS_API_KEY: "qyYyTD4ahoebPRY2oRxyiw5Xw1T6ikxJ"]
buildConfigField "String", "platform", '"G122J"'
versionNameSuffix "_debug"
debuggable true
@@ -363,14 +370,12 @@ android {
G122JRelease.initWith(release)
G122JRelease {
manifestPlaceholders = [BAIDU_LBS_API_KEY: "qyYyTD4ahoebPRY2oRxyiw5Xw1T6ikxJ"]
buildConfigField "String", "platform", '"G122J"'
signingConfig signingConfigs.G122J
}
G12NLDebug.initWith(debug)
G12NLDebug {
manifestPlaceholders = [BAIDU_LBS_API_KEY: "CjFhFE1UP5G14tMBz1kWs7ca92bgHuLr"]
buildConfigField "String", "platform", '"G12NL"'
versionNameSuffix "_debug"
debuggable true
@@ -379,14 +384,12 @@ android {
G12NLRelease.initWith(release)
G12NLRelease {
manifestPlaceholders = [BAIDU_LBS_API_KEY: "CjFhFE1UP5G14tMBz1kWs7ca92bgHuLr"]
buildConfigField "String", "platform", '"G12NL"'
signingConfig signingConfigs.MT6789
}
DX11Debug.initWith(debug)
DX11Debug {
manifestPlaceholders = [BAIDU_LBS_API_KEY: "CjFhFE1UP5G14tMBz1kWs7ca92bgHuLr"]
buildConfigField "String", "platform", '"DX11"'
versionNameSuffix "_debug"
debuggable true
@@ -395,14 +398,12 @@ android {
DX11Release.initWith(release)
DX11Release {
manifestPlaceholders = [BAIDU_LBS_API_KEY: "CjFhFE1UP5G14tMBz1kWs7ca92bgHuLr"]
buildConfigField "String", "platform", '"DX11"'
signingConfig signingConfigs.DX11
}
G122Debug.initWith(debug)
G122Debug {
manifestPlaceholders = [BAIDU_LBS_API_KEY: "CjFhFE1UP5G14tMBz1kWs7ca92bgHuLr"]
buildConfigField "String", "platform", '"MT6765"'
versionNameSuffix "_debug"
debuggable true
@@ -411,14 +412,12 @@ android {
G122Release.initWith(release)
G122Release {
manifestPlaceholders = [BAIDU_LBS_API_KEY: "CjFhFE1UP5G14tMBz1kWs7ca92bgHuLr"]
buildConfigField "String", "platform", '"MT6765"'
signingConfig signingConfigs.G122
}
QualcommDebug.initWith(debug)
QualcommDebug {
manifestPlaceholders = [BAIDU_LBS_API_KEY: "qyYyTD4ahoebPRY2oRxyiw5Xw1T6ikxJ"]
buildConfigField "String", "platform", '"QualcommA"'
versionNameSuffix "_debug"
debuggable true
@@ -427,7 +426,6 @@ android {
QualcommRelease.initWith(release)
QualcommRelease {
manifestPlaceholders = [BAIDU_LBS_API_KEY: "qyYyTD4ahoebPRY2oRxyiw5Xw1T6ikxJ"]
buildConfigField "String", "platform", '"QualcommA"'
signingConfig signingConfigs.SM8150
}
@@ -476,6 +474,7 @@ android {
iPlay50miniProDebug.initWith(debug)
iPlay50miniProDebug {
manifestPlaceholders = [BAIDU_LBS_API_KEY: "CjFhFE1UP5G14tMBz1kWs7ca92bgHuLr"]
buildConfigField "String", "platform", '"miniG99"'
versionNameSuffix "_debug"
debuggable true
@@ -484,6 +483,7 @@ android {
iPlay50miniProRelease.initWith(release)
iPlay50miniProRelease {
manifestPlaceholders = [BAIDU_LBS_API_KEY: "CjFhFE1UP5G14tMBz1kWs7ca92bgHuLr"]
buildConfigField "String", "platform", '"miniG99"'
signingConfig signingConfigs.iPlay50miniPro
}
-143
View File
@@ -1,143 +0,0 @@
应用签名 SHA1 汇总(来源:app/build.gradle signingConfigs)
生成时间:2026-10-21 18:34:04
signingConfig: zhanRui
keystore: zhanxun.keystore
别名: zhanxun
SHA1: F1:A5:4A:3F:02:4A:8D:1B:74:D1:FF:1F:74:D3:BE:66:ED:79:31:2E
signingConfig: zhanRuiUserdebug
keystore: zhanxunUserdebug.keystore
别名: zhanxunuserdebug
SHA1: 27:19:6E:38:6B:87:5E:76:AD:F7:00:E7:EA:84:E4:C6:EE:E3:3D:FA
signingConfig: zhanRui12
keystore: zhanrui12.jks
别名: zhanrui12
SHA1: 00:CF:12:B7:18:7F:6D:9E:5A:62:6C:61:8E:F5:E2:72:88:E7:01:36
signingConfig: mtk
keystore: xueshibaoos.jks
别名: xueshibaoos
SHA1: 27:19:6E:38:6B:87:5E:76:AD:F7:00:E7:EA:84:E4:C6:EE:E3:3D:FA
signingConfig: G10P
keystore: G10PMTK11.jks
别名: g10pmtk11
SHA1: D0:A7:1B:AE:9C:FF:86:25:A1:28:13:3E:F3:1E:1A:99:E5:B5:17:6B
signingConfig: G11Userdebug
keystore: G11Userdebug.keystore
别名: g11userdebug
SHA1: 33:C0:99:B3:96:81:4C:33:5F:C8:0A:AB:1E:B9:95:86:C2:C7:03:00
signingConfig: G10PUserDebug
keystore: G10PUserDebug.jks
别名: g10puserdebug
SHA1: 27:19:6E:38:6B:87:5E:76:AD:F7:00:E7:EA:84:E4:C6:EE:E3:3D:FA
signingConfig: zhanruiG10Z
keystore: zhanruiG10Z.keystore
别名: zhanruig10z
SHA1: F1:A5:4A:3F:02:4A:8D:1B:74:D1:FF:1F:74:D3:BE:66:ED:79:31:2E
signingConfig: G10ZUserDebug
keystore: G10zUserDebug.keystore
别名: g10zuserdebug
SHA1: 27:19:6E:38:6B:87:5E:76:AD:F7:00:E7:EA:84:E4:C6:EE:E3:3D:FA
signingConfig: mtk12
keystore: mtkAndroid12.keystore
别名: mtk12
SHA1: 4B:8C:A5:4E:A4:A2:33:2B:ED:27:36:DF:15:F5:39:9B:9F:B5:02:40
signingConfig: P20S
keystore: MTKP20S.keystore
别名: mtkp20s
SHA1: 48:03:96:C6:0B:6B:70:CA:03:1F:43:EF:55:DC:6F:E1:FD:AE:2F:56
signingConfig: iPlay50mini
keystore: iPlay50Mini.keystore
别名: platform
SHA1: C7:0A:5D:ED:5A:47:27:FD:EC:93:6C:4E:A3:D0:55:AB:08:F6:4F:1A
signingConfig: teclast8183
keystore: TeclastMTK12.jks
别名: teclastmtk12
SHA1: 27:19:6E:38:6B:87:5E:76:AD:F7:00:E7:EA:84:E4:C6:EE:E3:3D:FA
signingConfig: Huaruian8768
keystore: Huaruian8768.jks
别名: huaruian8768
SHA1: 33:C0:99:B3:96:81:4C:33:5F:C8:0A:AB:1E:B9:95:86:C2:C7:03:00
signingConfig: T40Air
keystore: T40Air.jks
别名: t40air
SHA1: AB:56:8F:41:E8:20:20:4D:5F:4C:1F:8E:11:58:17:C8:C9:42:4C:B0
signingConfig: BCM310
keystore: BCM310.keystore
别名: bcm310
SHA1: AB:56:8F:41:E8:20:20:4D:5F:4C:1F:8E:11:58:17:C8:C9:42:4C:B0
signingConfig: P50
keystore: P50TD.jks
别名: p50td
SHA1: EC:84:AB:FA:7D:53:AB:12:23:61:12:49:7C:A6:09:FF:B1:75:66:19
signingConfig: seewo
keystore: aiud.keystore
别名: androidreleasekey
SHA1: 21:2D:1A:D8:4A:A8:65:AD:90:42:D1:40:CF:30:CE:6C:BC:EA:63:4F
signingConfig: iPlay50miniPro
keystore: iPlay50miniPro.jks
别名: iplay50minipro
SHA1: 78:71:78:2A:CF:E9:83:97:92:7C:56:0B:58:2C:96:C2:BA:17:BB:3A
signingConfig: U1302
keystore: U1302.keystore
别名: u1302
SHA1: 70:C8:F5:02:D9:FB:53:E3:28:3B:11:03:2F:3D:60:ED:BA:D1:97:6C
signingConfig: MT6765
keystore: MT6765.keystore
别名: mt6765
SHA1: 4B:8C:A5:4E:A4:A2:33:2B:ED:27:36:DF:15:F5:39:9B:9F:B5:02:40
signingConfig: G128T
keystore: HuaruianG128T.jks
别名: g128t
SHA1: 33:C0:99:B3:96:81:4C:33:5F:C8:0A:AB:1E:B9:95:86:C2:C7:03:00
signingConfig: G122
keystore: 6789U.p12
别名: 6789u
SHA1: 3C:E5:B0:D8:24:AF:BC:5B:23:3D:AE:20:04:A5:7A:24:15:F9:93:E2
signingConfig: DX11
keystore: DX11.p12
别名: dx11
SHA1: 27:19:6E:38:6B:87:5E:76:AD:F7:00:E7:EA:84:E4:C6:EE:E3:3D:FA
signingConfig: MT6789
keystore: MT6789.keystore
别名: mt6789
SHA1: 78:71:78:2A:CF:E9:83:97:92:7C:56:0B:58:2C:96:C2:BA:17:BB:3A
signingConfig: SM8150
keystore: sm8150.jks
别名: platformkey
SHA1: 15:18:76:80:C2:32:60:E7:27:3F:45:D8:EE:40:F6:E0:9E:D6:01:5D
signingConfig: G122J
keystore: G122J.p12
别名: g122j
SHA1: 33:C0:99:B3:96:81:4C:33:5F:C8:0A:AB:1E:B9:95:86:C2:C7:03:00
signingConfig: crosshatch
keystore: AospCrosshatch.keystore
别名: aospcrosshatch
SHA1: 27:19:6E:38:6B:87:5E:76:AD:F7:00:E7:EA:84:E4:C6:EE:E3:3D:FA
-118
View File
@@ -1,118 +0,0 @@
一:对接方式: aidl
1.导入jar包依赖
2.绑定aidl服务:
Intent intent = new Intent("com.kte.interfacesettings.aidl");
intent.setPackage("com.kte.interfacesettings");
context.bindService(intent, aidlConnection, Context.BIND_AUTO_CREATE);
3.解绑服务:
unbindService(mConnection);
二:接口说明
// 启用/禁用MTP数据传输功能 :
void setMtpEnable(boolean enable);
// 启用/禁用Camera功能 :
void setCameraEnable(boolean enable);
// 启用/禁用蓝牙功能 :
void setBluetoothEnable(boolean enable);
// 启用/禁用wifi :
void setWifiAdvanceEnable(boolean enable);
// 设置默认浏览器:
void setDefaultBrowser(String packageName);
// 关机功能:
void shutdownDevice();
// 睡眠/唤醒功能(熄屏亮屏):
void lockNow(boolean on);
// 设置背光亮度(屏幕亮度-1,0-255 ):
void setBackLightBrightness(int brightness);
// 禁用/启用 飞行模式:
void setAirplaneDisable(boolean disable);
// 重启功能:
void rebootDevice();
// 清除最近任务:
void clearRecentTask();
// 清除应用数据:
void clearAppData(String packageName);
// 恢复出厂设置:
void wipeData();
// 静默安装apk功能
void silentInstall(String path,boolean autoLa);
// 静默卸载apk功能
void silentUninstall(String pkgName);
// 获取硬件MAC地址:
String getMACaddress();
// 静默截图功能(截屏)
Bitmap captureScreen(String savePath);
// 设置默认输入法
boolean setDefaultInputMethod(String ime);
// 设置默认播放器
boolean setDefaultVideoPlayer(String packageName,String className);
// 获取root状态
boolean isRooted();
// 设置锁屏壁纸
void setLockWallPaper(String filePath);
// 显示/隐藏下拉状态栏图标
void showNotificationItems(int item, boolean visible);
// 显隐系统设置项:
void setSettingOptionGoneorVisible(int item ,boolean visible);
// 获取当前所有正在运行的第三方应用进程接口
List<String> getThirdAppPkgList();
/**
* 打开/关闭护眼模式(夜间模式)
* @param state
* true 关闭;false 打开;默认是关闭状态;
**/
void setProtectEyeModeClosed(boolean state);
/**
* 获取护眼模式状态(夜间模式)
* @return state
* true 打开;false 关闭;
**/
boolean getProtectEyeMode();
/**
* 打开/关闭阅读模式(黑白屏)
* @param state
* true 关闭;false 打开;默认是关闭状态;
**/
void setReaderModeClosed(boolean state);
/**
* 获取阅读模式(黑白屏)
* @return state
* true 打开;false 关闭;
**/
boolean getReaderMode();
+1 -1
View File
@@ -395,7 +395,7 @@
<meta-data
android:name="com.baidu.lbsapi.API_KEY"
android:value="${BAIDU_LBS_API_KEY}" />
android:value="CjFhFE1UP5G14tMBz1kWs7ca92bgHuLr" />
<!-- 请填写你自己的- appKey -->
<meta-data
@@ -193,6 +193,11 @@ public class MainActivity extends BaseMvvmActivity<MainViewModel, ActivityMainBi
// startActivity(new Intent(Settings.ACTION_SECURITY_SETTINGS));
JgyUtils.getInstance().getAllRunningAppProcessInfo();
JgyUtils.getInstance().getAllRunningServices();
try {
Log.e(TAG, "initView jni: " + JgyUtils.getJniInfo());
} catch (Exception e) {
Log.e(TAG, "initView: jni Exception: " + e.getMessage());
}
}
String defaultDesktop = mMMKV.decodeString(CommonConfig.DEFAULT_DESKTOP_PACKAGE_NAME, "");
@@ -388,8 +388,13 @@ public class MapManager {
mMMKV.encode("MapError", "无法获取有效定位依据导致定位失败,一般是由于手机的原因,处于飞行模式下一般会造成这种结果,可以试着重启手机");
break;
case BDLocation.TypeServerDecryptError:
Log.e(TAG, "onReceiveLocation: 服务端解密错误(162),通常是 AK 校验失败/包名或 SHA1 与 AK 不匹配");
mMMKV.encode("MapError", "服务端解密错误,请检查 AK 与该包名、签名的绑定关系");
Log.e(TAG, "onReceiveLocation: 请求串密文解析失败(162),通常是 liblocSDK8b.so 加载或打包异常");
mMMKV.encode("MapError", "定位失败(162):liblocSDK8b.so 加载异常,请检查 SO 是否缺失、被 strip 或被改动");
break;
case 502:
case BDLocation.TypeServerCheckKeyError:
Log.e(TAG, "onReceiveLocation: AK 校验失败(" + location.getLocType() + ")");
mMMKV.encode("MapError", "AK 校验失败(" + location.getLocType() + "),请检查 AK 与包名、签名 SHA1 的绑定关系");
break;
default:
}
@@ -216,7 +216,7 @@ public class JgyUtils {
private CacheHelper cacheHelper;
static {
System.loadLibrary("jgy");
System.loadLibrary("aoleyun");
}
private JgyUtils(Context context) {
@@ -271,7 +271,7 @@ public class JgyUtils {
return sInstance;
}
public static native String getAuthorization();
public static native String getJniInfo();
private static final String EBAIFEN_PACKAGE = "com.kte.interfacesettings";
private static final String EBAIFEN_CLASS_NAME = "com.kte.interfacesettings.ToolsImplService";
+15
View File
@@ -0,0 +1,15 @@
#include <jni.h>
#include <string>
#include <sys/system_properties.h>
// 日志打印
#include <android/log.h>
#define LOG_TAG "TAG_LOG"
#define LOGI(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__)
extern "C"
JNIEXPORT jstring JNICALL
Java_com_aoleyun_sn_utils_JgyUtils_getJniInfo(JNIEnv *env, jclass clazz) {
std::string info = "form cpp";
return env->NewStringUTF(info.c_str());
}
-50
View File
@@ -1,50 +0,0 @@
#include <jni.h>
#include <string>
#include <sys/system_properties.h>
// 日志打印
#include <android/log.h>
#define LOG_TAG "TAG_LOG"
#define LOGI(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__)
extern "C"
JNIEXPORT jstring JNICALL
Java_com_aoleyun_sn_utils_JgyUtils_getAuthorization(JNIEnv *env, jclass clazz) {
// TODO: implement getAuthorization()
std::string hello;
// 1. 获取 SDK 版本号 , 存储于 C 字符串 sdk_verison_str 中
char sdk[128] = "0";
// 获取版本号方法
__system_property_get("ro.build.version.sdk", sdk);
//将版本号转为 int 值
int sdk_verison = atoi(sdk);
jclass cls = env->FindClass("com/aoleyun/sn/BuildConfig");
jfieldID jfieldId_text = env->GetStaticFieldID(cls, "FLAVOR", "Ljava/lang/String;");
jstring text = (jstring) env->GetStaticObjectField(cls, jfieldId_text);
const char *char_name = env->GetStringUTFChars(text, JNI_FALSE);
std::string s = char_name;
if (s.compare("newly") == 0) {
LOGI("newly");
hello = "Basic NzljNjRlZjQxYjg3MjhhZDZhYTI5YWY6YWJjNjQ3NzRiYjc2YzMyZDVkZTg0Yzk3==";
} else if (s.compare("MTKnewly") == 0) {
LOGI("MTKnewly");
hello = "Basic NzljNjRlZjQxYjg3MjhhZDZhYTI5YWY6YWJjNjQ3NzRiYjc2YzMyZDVkZTg0Yzk3==";
} else if (s.compare("beta") == 0) {
LOGI("beta");
hello = "Basic NTJkODE2NDM2NjViYjJjYWRhY2YwZTllOmI5N2RkZTYwNjdhY2ZhMjY5MDlhZjQ1Nw==";
}
// LOGI("%s", char_name);
// LOGI("dasdasd");
// LOGI("%s", hello.c_str());
return env->NewStringUTF(hello.c_str());
}
extern "C"
JNIEXPORT jstring JNICALL
Java_com_aoleyun_sn_activity_main_MainAPresenter_getAeskey(JNIEnv *env, jobject thiz) {
std::string key = "0123456789ABCDEF";
return env->NewStringUTF(key.c_str());
}
@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:orientation="vertical"
tools:context="com.aoleyun.sn.activity.MainActivity1">
<TextView
android:id="@+id/tv_show"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>