本帖最后由 我想找个女朋友 于 2022-5-30 15:09 编辑
求助大神,一个很简单的demo, frIDA愣是报错 Didn't find class,网上也搜不到办法。
环境:
电脑操作系统:win10
手机:redmi k30 pro, 已 root ,没解锁system分区 ,android 12,miui 13,usb连接电脑
frida 版本:
windows 上
frida 15.1.22
frida-tools 10.6.2
手机上 frida-server-15.1.22-android-arm64
apk 是我 用 android studio 初始化的一个Hello world 项目,没动过
代码如下
AndroidManifist.xml
[XML] 纯文本查看 复制代码 <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="gg.aa">
<application
android:allowBackup="true"
android:debuggable="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Demo"
tools:ignore="HardcodedDebugMode">
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
gg\aa\MainActivity.java
[Java] 纯文本查看 复制代码 package gg.aa;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
frida 的 js 脚本:
hello.js, 就只是获取了一下主类
[JavaScript] 纯文本查看 复制代码 function main() {
console.log("script load success")
var MainActivity = Java.use('gg.aa.MainActivity')
}
setImmediate(main)
操作:
frida-server 在手机上启动了,启动app,
执行 frida -UF -l hello.js
报错[Java] 纯文本查看 复制代码 script load successError: java.lang.ClassNotFoundException: Didn't find class "gg.aa.MainActivity" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/system/lib64, /system_ext/lib64, /system/lib64, /system_ext/lib64]]
at <anonymous> (frida/node_modules/frida-java-bridge/lib/env.js:124)
at <anonymous> (frida/node_modules/frida-java-bridge/lib/env.js:115)
at apply (native)
at <anonymous> (frida/node_modules/frida-java-bridge/lib/env.js:97)
at <anonymous> (frida/node_modules/frida-java-bridge/lib/class-factory.js:429)
at value (frida/node_modules/frida-java-bridge/lib/class-factory.js:813)
at _make (frida/node_modules/frida-java-bridge/lib/class-factory.js:112)
at use (frida/node_modules/frida-java-bridge/lib/class-factory.js:63)
at use (frida/node_modules/frida-java-bridge/index.js:246)
at main (/hook_zuiyou.js:4)
at apply (native)
at <anonymous> (frida/runtime/core.js:51)
报错截图
报错截图
adb shell 执行 frida-server
adb shell 执行frida-server
app 截图
|