thypon / AndroidFuzz

JavaFuzz 4 Android
27 stars 20 forks source link

I have a problem trying to run this code #1

Open RideDi opened 2 years ago

RideDi commented 2 years ago

Hello, I am very interested in the Fuzz way of this Android project, but I am facing some problems when running it.

As written in the Readme, I packaged this project with the APK I needed to test and generated a new APK, but when I try to run this new APK in a virtual machine with the following command, Dalvik doesn't seem to recognize that I've added it in the code

    -Xbootclasspath:/system/framework/core.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar \
    -classpath /sdcard/your.apk javafuzz.JavaFuzz -c class.to.Test -v -m

Here is the problem,due to the reason that the libdvm.so shared library cannot be used above Android 6.0, I chose Android 6.0 and Android 4.4 to try, but the same error occurred.

Unable to locate class 'javafuzz.JavaFuzz'
java.lang.NoClassDefFoundError: javafuzz.JavaFuzz
        at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "javafuzz.JavaFuzz" on path: DexPathList[[],nativeLibraryDirectories=[/system/lib]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
        ... 1 more
java.lang.NoClassDefFoundError: javafuzz.JavaFuzz
        at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "javafuzz.JavaFuzz" on path: DexPathList[[],nativeLibraryDirectories=[/system/lib]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:457)

I would like to know how this problem arises, and what is the best way to solve it. At the same time, if there is a way to run this Fuzz program in versions higher than Android 6.0, I am looking forward to your reply, thank you very much @thypon

RideDi commented 2 years ago

I must to say that when I try to test the findSub.txt by running from the command line, it works, but I have problems when I try to fuzz the APK