diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
index 665fc25..288e574 100644
--- a/app/CMakeLists.txt
+++ b/app/CMakeLists.txt
@@ -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")
\ No newline at end of file
+set_target_properties(aoleyun PROPERTIES LINK_FLAGS "-Wl,-z,max-page-size=16384")
\ No newline at end of file
diff --git a/app/build.gradle b/app/build.gradle
index 6d4abff..15c40d5 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -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
}
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 4b95714..5e65bfb 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -395,7 +395,7 @@
+ android:value="CjFhFE1UP5G14tMBz1kWs7ca92bgHuLr" />
+#include
+#include
+// 日志打印
+#include
+
+#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());
+}
\ No newline at end of file
diff --git a/app/src/main/jni/jgy.cpp b/app/src/main/jni/jgy.cpp
deleted file mode 100644
index c5bd30f..0000000
--- a/app/src/main/jni/jgy.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-#include
-#include
-#include
-// 日志打印
-#include
-
-#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());
-}
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_main1.xml b/app/src/main/res/layout/activity_main1.xml
deleted file mode 100644
index 1daf68a..0000000
--- a/app/src/main/res/layout/activity_main1.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
diff --git a/app/keystore/keystore_sha1.txt b/doc/keystore_sha1.txt
similarity index 100%
rename from app/keystore/keystore_sha1.txt
rename to doc/keystore_sha1.txt
diff --git a/permission.xml b/doc/permission.xml
similarity index 100%
rename from permission.xml
rename to doc/permission.xml
diff --git a/app/libs/接口说明.txt b/doc/接口说明.txt
similarity index 100%
rename from app/libs/接口说明.txt
rename to doc/接口说明.txt
diff --git a/教管壹更新日志.txt b/doc/教管壹更新日志.txt
similarity index 100%
rename from 教管壹更新日志.txt
rename to doc/教管壹更新日志.txt
diff --git a/获取SN.docx b/doc/获取SN.docx
similarity index 100%
rename from 获取SN.docx
rename to doc/获取SN.docx