GeezerVison is showing github.com — feat: Pro版本更新4.4.8,解决一加越狱被Oppo内部接口侦测,导致泄露痕迹的问题。 · pigadmin/SKRoot-linuxKernelRoot@f892827
File treeExpand file treeCollapse file tree Open diff view settings java/com/linux/permissionmanager
third_party/____DO_NOT_EDIT____
module_fake_device/阿灵的机型模拟 module_tricky_store/resources/TS/modules/tricky_store
Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboard Collapse file Copy file name to clipboardExpand all lines: Pro(众测开放中)/src/PermissionManager/app/build.gradle +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -10,7 +10,7 @@ android { | 10 | 10 | minSdk 26 | 11 | 11 | targetSdk 31 | 12 | 12 | versionCode 1 | 13 | | - versionName "4.4.5" | | 13 | + versionName "4.4.8" | 14 | 14 |
| 15 | 15 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | 16 | 16 | externalNativeBuild { | |
Collapse file Copy file name to clipboardExpand all lines: Pro(众测开放中)/src/PermissionManager/app/src/main/cpp/native-lib.cpp +5-5Lines changed: 5 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 13 | 13 |
| 14 | 14 | #include "urlEncodeUtils.h" | 15 | 15 | #include "sysNodeHelper.h" | 16 | | -#include "oneplusDeviceDetect.h" | | 16 | +#include "oplusDeviceDetect.h" | 17 | 17 | #include "cJSON.h" | 18 | 18 |
| 19 | 19 | using namespace std; | @@ -47,7 +47,7 @@ static cJSON * moduleDescToJsonObj(module_desc & desc) { | 47 | 47 | string encodeVer = urlEncodeToStr(desc.version); | 48 | 48 | string encodeDesc = urlEncodeToStr(desc.desc); | 49 | 49 | string encodeAuthor = urlEncodeToStr(desc.author); | 50 | | - string encodeUuid = urlEncodeToStr(desc.uuid); | | 50 | + string encodeId32 = urlEncodeToStr(desc.id32); | 51 | 51 | string encodeUpdateJson = urlEncodeToStr(desc.update_json); | 52 | 52 | stringstream ss; | 53 | 53 | ss << desc.min_sdk_ver.major << "." << desc.min_sdk_ver.minor << "." << desc.min_sdk_ver.patch; | @@ -56,7 +56,7 @@ static cJSON * moduleDescToJsonObj(module_desc & desc) { | 56 | 56 | cJSON_AddStringToObject(item, "ver", encodeVer.c_str()); | 57 | 57 | cJSON_AddStringToObject(item, "desc", encodeDesc.c_str()); | 58 | 58 | cJSON_AddStringToObject(item, "author", encodeAuthor.c_str()); | 59 | | - cJSON_AddStringToObject(item, "uuid", encodeUuid.c_str()); | | 59 | + cJSON_AddStringToObject(item, "id32", encodeId32.c_str()); | 60 | 60 | cJSON_AddStringToObject(item, "update_json", encodeUpdateJson.c_str()); | 61 | 61 | cJSON_AddBoolToObject(item, "web_ui", desc.web_ui); | 62 | 62 | cJSON_AddStringToObject(item, "min_sdk_ver", encodeMiniSDK.c_str()); | @@ -514,7 +514,7 @@ KModErr oneplus_bypass_stage1_and_2(const char* root_key, void (*cb)(const char* | 514 | 514 | extern "C" JNIEXPORT jstring JNICALL Java_com_linux_permissionmanager_bridge_NativeBridge_oneplusBypassWriteStage1( | 515 | 515 | JNIEnv* env, jclass /* this */, jstring rootKey) { | 516 | 516 | string strRootKey = jstringToStr(env, rootKey); | 517 | | - if(!device_detect::is_oneplus_device()) return env->NewStringUTF("not oneplus device"); | | 517 | + if(!device_detect::is_oplus_device()) return env->NewStringUTF("not oplus device"); | 518 | 518 | thread_local std::string tls_result; | 519 | 519 | auto cb = [](const char* out_str) { tls_result = out_str; }; | 520 | 520 | oneplus_bypass_stage1_and_2(strRootKey.c_str(), cb); | @@ -525,6 +525,6 @@ bool oneplus_bypass_is_work_normal(const char* root_key); | 525 | 525 | extern "C" JNIEXPORT jboolean JNICALL Java_com_linux_permissionmanager_bridge_NativeBridge_oneplusBypassIsWorkNormal( | 526 | 526 | JNIEnv* env, jclass /* this */, jstring rootKey) { | 527 | 527 | string strRootKey = jstringToStr(env, rootKey); | 528 | | - if(!device_detect::is_oneplus_device()) return false; | | 528 | + if(!device_detect::is_oplus_device()) return false; | 529 | 529 | return oneplus_bypass_is_work_normal(strRootKey.c_str()); | 530 | 530 | } |
Collapse file Copy file name to clipboardExpand all lines: Pro(众测开放中)/src/PermissionManager/app/src/main/java/com/linux/permissionmanager/adapter/SkrModInstalledAdapter.java +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -89,11 +89,11 @@ public void onBindViewHolder(ViewHolder holder, int position) { | 89 | 89 | }); | 90 | 90 | } | 91 | 91 |
| 92 | | - public void updateModuleUpdateInfo(String uuid, SkrModUpdateInfo updateInfo) { | 93 | | - if (uuid == null) return; | | 92 | + public void updateModuleUpdateInfo(String id32, SkrModUpdateInfo updateInfo) { | | 93 | + if (id32 == null) return; | 94 | 94 | for (int i = 0; i < skrmods.size(); i++) { | 95 | 95 | SkrModInstalledItem item = skrmods.get(i); | 96 | | - if (uuid.equals(item.getUuid())) { | | 96 | + if (id32.equals(item.getId32())) { | 97 | 97 | item.setUpdateInfo(updateInfo); | 98 | 98 | notifyItemChanged(i); | 99 | 99 | break; | |
Collapse file Copy file name to clipboardExpand all lines: Pro(众测开放中)/src/PermissionManager/app/src/main/java/com/linux/permissionmanager/adapter/SkrModPrinter.java +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -12,7 +12,7 @@ public static String buildModuleMeta(SkrModInstalledItem m) { | 12 | 12 | sb.append("版本:").append(nvl(m.getVer())).append('\n'); | 13 | 13 | sb.append("描述:").append(nvl(m.getDesc())).append('\n'); | 14 | 14 | sb.append("作者:").append(nvl(m.getAuthor())).append('\n'); | 15 | | - sb.append("UUID:").append(nvl(m.getUuid())).append('\n'); | | 15 | + sb.append("ID32:").append(nvl(m.getId32())).append('\n'); | 16 | 16 | sb.append("最低SDK要求:").append(nvl(m.getMiniSdk())).append('\n'); | 17 | 17 |
| 18 | 18 | boolean onlineUpdate = !TextUtils.isEmpty(m.getUpdateJson()); | |
Collapse file Copy file name to clipboardExpand all lines: Pro(众测开放中)/src/PermissionManager/app/src/main/java/com/linux/permissionmanager/model/SkrModInstalledItem.java +7-7Lines changed: 7 additions & 7 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -6,7 +6,7 @@ public class SkrModInstalledItem { | 6 | 6 | private String name; | 7 | 7 | private String desc; | 8 | 8 | private String ver; | 9 | | - private String uuid; | | 9 | + private String id32; | 10 | 10 | private String author; | 11 | 11 | private String updateJson; | 12 | 12 | private String miniSdk; | @@ -18,7 +18,7 @@ public class SkrModInstalledItem { | 18 | 18 | public SkrModInstalledItem(String name, | 19 | 19 | String desc, | 20 | 20 | String ver, | 21 | | - String uuid, | | 21 | + String id32, | 22 | 22 | String author, | 23 | 23 | String updateJson, | 24 | 24 | String miniSdk, | @@ -27,7 +27,7 @@ public SkrModInstalledItem(String name, | 27 | 27 | this.name = name; | 28 | 28 | this.desc = desc; | 29 | 29 | this.ver = ver; | 30 | | - this.uuid = uuid; | | 30 | + this.id32 = id32; | 31 | 31 | this.author = author; | 32 | 32 | this.updateJson = updateJson; | 33 | 33 | this.miniSdk = miniSdk; | @@ -60,12 +60,12 @@ public void setVer(String ver) { | 60 | 60 | this.ver = ver; | 61 | 61 | } | 62 | 62 |
| 63 | | - public String getUuid() { | 64 | | - return uuid; | | 63 | + public String getId32() { | | 64 | + return id32; | 65 | 65 | } | 66 | 66 |
| 67 | | - public void setUuid(String uuid) { | 68 | | - this.uuid = uuid; | | 67 | + public void setId32(String id32) { | | 68 | + this.id32 = id32; | 69 | 69 | } | 70 | 70 |
| 71 | 71 | public String getAuthor() { | |
Collapse file Copy file name to clipboardExpand all lines: Pro(众测开放中)/src/PermissionManager/app/src/main/java/com/linux/permissionmanager/model/SkrModMarketItem.java +7-7Lines changed: 7 additions & 7 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -5,7 +5,7 @@ public class SkrModMarketItem { | 5 | 5 | private String engName; | 6 | 6 | private String desc; | 7 | 7 | private String ver; | 8 | | - private String uuid; | | 8 | + private String id32; | 9 | 9 | private String author; | 10 | 10 | private String updateDate; | 11 | 11 | private String sourceUrl; | @@ -45,12 +45,12 @@ public void setVer(String ver) { | 45 | 45 | this.ver = ver; | 46 | 46 | } | 47 | 47 |
| 48 | | - public String getUuid() { | 49 | | - return uuid; | | 48 | + public String getId32() { | | 49 | + return id32; | 50 | 50 | } | 51 | 51 |
| 52 | | - public void setUuid(String uuid) { | 53 | | - this.uuid = uuid; | | 52 | + public void setId32(String uuid) { | | 53 | + this.id32 = uuid; | 54 | 54 | } | 55 | 55 |
| 56 | 56 | public String getAuthor() { | @@ -101,12 +101,12 @@ public void setDownloadEngAlert(String downloadEngAlert) { | 101 | 101 | this.downloadEngAlert = downloadEngAlert; | 102 | 102 | } | 103 | 103 |
| 104 | | - public SkrModMarketItem(String chnName, String engName, String desc, String ver, String uuid, String author, String updateDate, String sourceUrl, String downloadUrl, String downloadChnAlert, String downloadEngAlert) { | | 104 | + public SkrModMarketItem(String chnName, String engName, String desc, String ver, String id32, String author, String updateDate, String sourceUrl, String downloadUrl, String downloadChnAlert, String downloadEngAlert) { | 105 | 105 | this.chnName = chnName; | 106 | 106 | this.engName = engName; | 107 | 107 | this.desc = desc; | 108 | 108 | this.ver = ver; | 109 | | - this.uuid = uuid; | | 109 | + this.id32 = id32; | 110 | 110 | this.author = author; | 111 | 111 | this.updateDate = updateDate; | 112 | 112 | this.sourceUrl = sourceUrl; | |
Collapse file Copy file name to clipboardExpand all lines: Pro(众测开放中)/src/PermissionManager/app/src/main/java/com/linux/permissionmanager/page/SkrModInstalledPage.java +8-8Lines changed: 8 additions & 8 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -117,7 +117,7 @@ private List<SkrModInstalledItem> parseSkrModList(String jsonStr) { | 117 | 117 | String ver = URLDecoder.decode(descObj.optString("ver", "")); | 118 | 118 | String desc = URLDecoder.decode(descObj.optString("desc", "")); | 119 | 119 | String author = URLDecoder.decode(descObj.optString("author", "")); | 120 | | - String uuid = URLDecoder.decode(descObj.optString("uuid", "")); | | 120 | + String id32 = URLDecoder.decode(descObj.optString("id32", "")); | 121 | 121 | String updateJson = URLDecoder.decode(descObj.optString("update_json", "")); | 122 | 122 | boolean webUi = descObj.optBoolean("web_ui", false); | 123 | 123 | String minSdkVer = URLDecoder.decode(descObj.optString("min_sdk_ver", "")); | @@ -127,7 +127,7 @@ private List<SkrModInstalledItem> parseSkrModList(String jsonStr) { | 127 | 127 | name, | 128 | 128 | desc, | 129 | 129 | ver, | 130 | | - uuid, | | 130 | + id32, | 131 | 131 | author, | 132 | 132 | updateJson, | 133 | 133 | minSdkVer, | @@ -177,7 +177,7 @@ private void onDeleteSkrMod(SkrModInstalledItem skrMod) { | 177 | 177 | DialogUtils.showCustomDialog(mActivity, "确认", "确定要删除 " + skrMod.getName() + " 模块吗?", null, "确定", | 178 | 178 | (dialog, which) -> { | 179 | 179 | dialog.dismiss(); | 180 | | - String tip = NativeBridge.uninstallSkrootModule(mRootKey, skrMod.getUuid()); | | 180 | + String tip = NativeBridge.uninstallSkrootModule(mRootKey, skrMod.getId32()); | 181 | 181 | if(tip.indexOf("OK") != -1) tip += ",重启后生效"; | 182 | 182 | DialogUtils.showMsgDlg(mActivity, "执行结果", tip, null); | 183 | 183 | refreshPage(); | @@ -192,15 +192,15 @@ private void onShowDetailsSkrMod(SkrModInstalledItem skrMod) { | 192 | 192 | } | 193 | 193 |
| 194 | 194 | private void onOpenSkrModWebUI(SkrModInstalledItem skrMod) { | 195 | | - String tip = NativeBridge.openSkrootModuleWebUI(mRootKey, skrMod.getUuid()); | | 195 | + String tip = NativeBridge.openSkrootModuleWebUI(mRootKey, skrMod.getId32()); | 196 | 196 | DialogUtils.showMsgDlg(mActivity, "执行结果", tip, null); | 197 | 197 | } | 198 | 198 |
| 199 | 199 | private void onUpdateSkrMod(SkrModInstalledItem skrMod) { | 200 | 200 | mUpdateManager.requestModuleUpdate( | 201 | 201 | skrMod, | 202 | 202 | (item, info) -> { | 203 | | - if (info != null) mAdapter.updateModuleUpdateInfo(item.getUuid(), info); | | 203 | + if (info != null) mAdapter.updateModuleUpdateInfo(item.getId32(), info); | 204 | 204 | if (info == null || !info.isHasNewVersion()) { | 205 | 205 | DialogUtils.showMsgDlg(mActivity, "提示", "当前已是最新版本", null); | 206 | 206 | return; | @@ -227,13 +227,13 @@ private void checkAllModulesUpdate(List<SkrModInstalledItem> listAll) { | 227 | 227 | mUpdateManager.getAllModulesUpdateCache( | 228 | 228 | listAll, | 229 | 229 | (mod, info) -> { | 230 | | - if (info != null && mAdapter != null) mAdapter.updateModuleUpdateInfo(mod.getUuid(), info); | | 230 | + if (info != null && mAdapter != null) mAdapter.updateModuleUpdateInfo(mod.getId32(), info); | 231 | 231 | } | 232 | 232 | ); | 233 | 233 | mUpdateManager.checkAllModulesUpdate( | 234 | 234 | listAll, | 235 | 235 | (mod, info) -> { | 236 | | - if (info != null && mAdapter != null) mAdapter.updateModuleUpdateInfo(mod.getUuid(), info); | | 236 | + if (info != null && mAdapter != null) mAdapter.updateModuleUpdateInfo(mod.getId32(), info); | 237 | 237 | }, | 238 | 238 | (mod, e) -> Log.w("SkrMod", "check update failed: " + mod.getName(), e) | 239 | 239 | ); | @@ -246,7 +246,7 @@ private void onDownloadNewSkrMod(SkrModInstalledItem skrMod, SkrModUpdateInfo up | 246 | 246 | return; | 247 | 247 | } | 248 | 248 | SkrModDownloader downloader = new SkrModDownloader(mActivity); | 249 | | - downloader.downloadToCache(url, skrMod.getUuid() + "_" + updateInfo.getLatestVer() + ".zip", SkrModDownloader.AutoDelete.ON_BOTH, | | 249 | + downloader.downloadToCache(url, skrMod.getId32() + "_" + updateInfo.getLatestVer() + ".zip", SkrModDownloader.AutoDelete.ON_BOTH, | 250 | 250 | new SkrModDownloader.Callback() { | 251 | 251 | @Override | 252 | 252 | public void onSuccess(File file) { onAddSkrMod(file.getAbsolutePath(), false); } | |
Collapse file Copy file name to clipboardExpand all lines: Pro(众测开放中)/src/PermissionManager/app/src/main/java/com/linux/permissionmanager/page/SkrModMarketPage.java +4-4Lines changed: 4 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -104,7 +104,7 @@ private void downloadAndInstallModule(SkrModMarketItem skrMod) { | 104 | 104 | String url = skrMod.getDownloadUrl(); | 105 | 105 | if (TextUtils.isEmpty(url)) return; | 106 | 106 | SkrModDownloader downloader = new SkrModDownloader(mActivity); | 107 | | - downloader.downloadToCache(url, skrMod.getUuid() + "_" + skrMod.getVer() + ".zip", SkrModDownloader.AutoDelete.ON_BOTH, | | 107 | + downloader.downloadToCache(url, skrMod.getId32() + "_" + skrMod.getVer() + ".zip", SkrModDownloader.AutoDelete.ON_BOTH, | 108 | 108 | new SkrModDownloader.Callback() { | 109 | 109 | @Override | 110 | 110 | public void onSuccess(File file) { onAddSkrMod(file.getAbsolutePath()); } | @@ -211,7 +211,7 @@ private List<SkrModMarketItem> parseMarketJson(String jsonStr) throws JSONExcept | 211 | 211 | String engName = it.optString("eng_name", ""); | 212 | 212 | String desc = it.optString("desc", ""); | 213 | 213 | String ver = it.optString("ver", ""); | 214 | | - String uuid = it.optString("uuid", ""); | | 214 | + String id32 = it.optString("id32", ""); | 215 | 215 | String author = it.optString("author", ""); | 216 | 216 | String updateDate = it.optString("update_date", ""); | 217 | 217 | boolean ban = it.optBoolean("ban", false); | @@ -225,7 +225,7 @@ private List<SkrModMarketItem> parseMarketJson(String jsonStr) throws JSONExcept | 225 | 225 | engName, | 226 | 226 | desc, | 227 | 227 | ver, | 228 | | - uuid, | | 228 | + id32, | 229 | 229 | author, | 230 | 230 | updateDate, | 231 | 231 | sourceUrl, | @@ -255,7 +255,7 @@ private boolean match(SkrModMarketItem it, String k) { | 255 | 255 | || contains(it.getEngName(), k) | 256 | 256 | || contains(it.getAuthor(), k) | 257 | 257 | || contains(it.getDesc(), k) | 258 | | - || contains(it.getUuid(), k) | | 258 | + || contains(it.getId32(), k) | 259 | 259 | || contains(it.getVer(), k); | 260 | 260 | } | 261 | 261 |
| |
Collapse file Copy file name to clipboardExpand all lines: Pro(众测开放中)/src/PermissionManager/app/src/main/java/com/linux/permissionmanager/update/SkrModUpdateCache.java +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 10 | 10 | import java.util.function.BiConsumer; | 11 | 11 |
| 12 | 12 | public class SkrModUpdateCache { | 13 | | - private static String getModuleUpdateKey(SkrModInstalledItem item) { return "module_update_" + item.getUuid(); } | | 13 | + private static String getModuleUpdateKey(SkrModInstalledItem item) { return "module_update_" + item.getId32(); } | 14 | 14 |
| 15 | 15 | public static SkrModUpdateInfo getModuleUpdateResponseCache(SkrModInstalledItem item) { | 16 | 16 | if (item == null) return null; | |
|