From b83d1f73ffae6ab22df92b4db3b726182304d7c7 Mon Sep 17 00:00:00 2001 From: king Date: Sun, 20 Feb 2022 16:33:58 +0800 Subject: [PATCH] frida14 update --- README.md | 6 +++++ .../ui/global/GlobalSettingFragment.java | 27 ++++++++++++++++++- .../res/layout/fragment_global_setting.xml | 22 +++++++++++++++ 3 files changed, 54 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 96dadce..fe95ce8 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,12 @@ MikManager是一个rom逆向工具的管理界面。该软件用于对接MikRom ### 配套ROM > https://github.com/dqzg12300/MikRom +### 调整说明 + +ROM从PixelExperience调整为aosp10,后续如果有更新,不再维护PixelExperience版本 + +新增全局配置可以修改为默认使用frida14的gadget(仅支持aosp版本的) + ### 提示 > 所有需要选择的文件都要放在对应目标的sdcard目录中,路径是`/sdcard/Android/data/`。 > 脱壳的dump结果会保存在`/sdcard/Android/data//files/dump/`目录,有些app会缺少files这个目录,需要自己手动创建一下。 diff --git a/app/src/main/java/com/mik/mikmanager/ui/global/GlobalSettingFragment.java b/app/src/main/java/com/mik/mikmanager/ui/global/GlobalSettingFragment.java index 793654d..d03b3ba 100644 --- a/app/src/main/java/com/mik/mikmanager/ui/global/GlobalSettingFragment.java +++ b/app/src/main/java/com/mik/mikmanager/ui/global/GlobalSettingFragment.java @@ -1,5 +1,7 @@ package com.mik.mikmanager.ui.global; +import android.app.AlertDialog; +import android.content.DialogInterface; import android.content.SharedPreferences; import android.os.Bundle; import android.os.RemoteException; @@ -37,12 +39,29 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Override public void onClick(View view) { ConfigUtil.sysHide=binding.swSysHide.isChecked(); - FileHelper.writeTxtToFile(binding.txtBreakClass.getText().toString(),"/dev/mikrom/config/breakClass.config"); + try { + ServiceUtils.getiMikRom().writeFile("/data/system/break.conf",binding.txtBreakClass.getText().toString()); + if(binding.rdoFrida14.isChecked()){ + ServiceUtils.getiMikRom().writeFile("/data/system/fver14.conf","1"); + }else{ + ServiceUtils.getiMikRom().writeFile("/data/system/fver14.conf","0"); + } + String res=ServiceUtils.getiMikRom().readFile("/data/system/fver14.conf"); + Log.i(ConfigUtil.TAG,"fver14.conf data:"+res); + } catch (RemoteException e) { + e.printStackTrace(); + } + SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(binding.getRoot().getContext()); SharedPreferences.Editor editor = sharedPreferences.edit(); String sysHide=binding.swSysHide.isChecked()?"1":"0"; editor.putString("sysHide", sysHide); editor.apply(); + + AlertDialog.Builder builder = new AlertDialog.Builder(root.getContext()); + builder.setTitle("提示"); + builder.setMessage("保存成功"); + builder.show(); } }); return root; @@ -50,14 +69,19 @@ public void onClick(View view) { public void initUi(){ String res=""; + String fver=""; try { res=ServiceUtils.getiMikRom().readFile(ConfigUtil.breakConfigPath); + fver=ServiceUtils.getiMikRom().readFile("/data/system/fver14.conf"); } catch (RemoteException e) { Log.e(ConfigUtil.TAG,e.getMessage()); } if(res!=null&&res.length()>0){ binding.txtBreakClass.setText(res); } + if(fver.contains("1")){ + binding.rdoFrida14.setChecked(true); + } SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(binding.getRoot().getContext()); String sysHide = sharedPreferences.getString("sysHide", ""); if(sysHide.equals("0")){ @@ -65,6 +89,7 @@ public void initUi(){ }else{ binding.swSysHide.setChecked(true); } + } @Override diff --git a/app/src/main/res/layout/fragment_global_setting.xml b/app/src/main/res/layout/fragment_global_setting.xml index b3ce54c..360938c 100644 --- a/app/src/main/res/layout/fragment_global_setting.xml +++ b/app/src/main/res/layout/fragment_global_setting.xml @@ -21,6 +21,28 @@ android:id="@+id/swSysHide" android:text="隐藏系统应用" style="@style/FormMargin"/> + + + + + + + +