saswatanand / ella

Binary Instrumentation of Android Apps
70 stars 17 forks source link

FileNotFoundException ella.runtime.dex #5

Open ebudianto opened 9 years ago

ebudianto commented 9 years ago

Hi,

When instrumenting the app using "ella.sh i" command, I got an error saying java.io.FileNotFoundException: /home/myname/ella/bin/ella.runtime.dex (No such file or directory). After checking for "ella.runtime.dex" on the respected directory on my PC and on github, I couldnt find the file. An APK was created in the ella-out, although i'm not sure if that was properly instrumented or not.

Can I ignore this error or is there something that I missed?

Thanks EB

saswatanand commented 9 years ago

You cannot ignore this error. "ella.runtime.dex" is the dex version of the runtime classes that gets injected into the instrumented APK.

Do you have "dx" in your "PATH"? If not, you have to set the "ella.buildtools.dir" variable in ella.settings as follows.

android.buildtools.dir=/Users/saswat/software/android-sdk-macosx/build-tools/20.0.0/

nicoostendorf commented 2 years ago

Hello,

if have the same problem. I tried various versions of build tools and the error is still there.

My settings file is:

ella.use.emulator.host.loopback=true

ella.server.ip=1.2.3.4

ella.server.port=23745 ella.outdir=ella-out

ella.instrumentor=com.apposcopy.ella.MethodCoverageInstrumentor

ella.instrumentor=com.apposcopy.ella.CallArgInstrumentor,com.apposcopy.ella.MethodParamInstrumentor

ella.android.debug=false ella.exclude=ella-exclude.txt ella.instrumentor.max.heapsize=2g ella.server.max.heapsize=2g ella.android.buildtools.dir=/Users/nicoostendorf1/Library/Android/sdk/build-tools/25.0.0 ella.android.jar=/Users/nicoostendorf1/Library/Android/sdk/platforms/android-25/android.jar ella.jarsigner.keystore=.android/debug.keystore ella.jarsigner.storepass=android ella.jarsigner.keypass=android ella.jarsigner.alias=androiddebugkey

The log file gives the output: Exception in thread "main" java.lang.Error: java.lang.reflect.InvocationTargetException at com.apposcopy.ella.Instrument.mergeEllaRuntime(Instrument.java:395) at com.apposcopy.ella.Instrument.instrument(Instrument.java:42) at com.apposcopy.ella.Main.main(Main.java:42) Caused by: java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at com.apposcopy.ella.Instrument.mergeEllaRuntime(Instrument.java:386) ... 2 more Caused by: java.io.FileNotFoundException: /Users/nicoostendorf1/Desktop/ella/bin/ella.runtime.dex (No such file or directory) at java.base/java.io.FileInputStream.open0(Native Method) at java.base/java.io.FileInputStream.open(FileInputStream.java:216) at java.base/java.io.FileInputStream.(FileInputStream.java:157) at com.android.dex.Dex.(Dex.java:113) at com.android.dx.merge.DexMerger.main(DexMerger.java:1118) ... 7 more

I don't have any Idea how to solve this problem.. If anyone could help me I would be very thankful!!