Skip to content

Commit

Permalink
frida14 update
Browse files Browse the repository at this point in the history
  • Loading branch information
king committed Feb 20, 2022
1 parent 20e89f0 commit b83d1f7
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ MikManager是一个rom逆向工具的管理界面。该软件用于对接MikRom
### 配套ROM
> https://github.com/dqzg12300/MikRom
### 调整说明

ROM从PixelExperience调整为aosp10,后续如果有更新,不再维护PixelExperience版本

新增全局配置可以修改为默认使用frida14的gadget(仅支持aosp版本的)

### 提示
> 所有需要选择的文件都要放在对应目标的sdcard目录中,路径是`/sdcard/Android/data/<PackageName>`
> 脱壳的dump结果会保存在`/sdcard/Android/data/<PackageName>/files/dump/`目录,有些app会缺少files这个目录,需要自己手动创建一下。
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -37,34 +39,57 @@ 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;
}

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")){
binding.swSysHide.setChecked(false);
}else{
binding.swSysHide.setChecked(true);
}

}

@Override
Expand Down
22 changes: 22 additions & 0 deletions app/src/main/res/layout/fragment_global_setting.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,28 @@
android:id="@+id/swSysHide"
android:text="隐藏系统应用"
style="@style/FormMargin"/>

<RadioGroup
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<RadioButton
android:id="@+id/rdoFrida14"
android:layout_height="wrap_content"
android:layout_width="0dp"
android:layout_weight="0.5"
android:text="frida14" />
<RadioButton
android:id="@+id/rdoFrida15"
android:layout_height="wrap_content"
android:layout_width="0dp"
android:layout_weight="0.5"
android:checked="true"
android:text="frida15" />
</RadioGroup>



<Button
android:id="@+id/btnSave"
style="@style/FormMargin"
Expand Down

0 comments on commit b83d1f7

Please sign in to comment.