uds-se / droidmate Goto Github PK
View Code? Open in Web Editor NEWThis project forked from konrad-jamrozik/droidmate
DroidMate-2: A Platform for Android Test Generation
Home Page: http://www.boxmate.org/
License: GNU General Public License v3.0
This project forked from konrad-jamrozik/droidmate
DroidMate-2: A Platform for Android Test Generation
Home Page: http://www.boxmate.org/
License: GNU General Public License v3.0
I have added some method calls in /pcComponents/core/api/ExplorationAPI, enabled "Explorationmode.inline" and, run with physical device( Android 8.0.1) to get api actions. The inlined apk installed in the physical device but could not be opened and no result came out. Could you please help me to fix this problem? Thank you!
I have successfully built and generated the jar file from the source in a docker container. But when I run it with
java -jar build/libs/droidmate-2-2.0.0-all.jar --Output-outputDir=/tmp_out --Selectors-actionLimit=200
I got this exception.
DroidMate, an automated execution generator for Android apps.
Copyright (c) 2012 - 2019 Saarland University
This program is free software licensed under GNU GPL v3.
You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/.
email: [email protected]
web: www.droidmate.org
20:07:09.848 [main] INFO API-Command - Bootstrapping DroidMate: building ConfigurationWrapper from args and instantiating objects for ExplorationAPI.
20:07:09.850 [main] INFO API-Command - IMPORTANT: for help on how to configure DroidMate, run it with --help
20:07:10.045 [main] DEBUG org.droidmate.configuration.ConfigurationBuilder - memoizedBuildConfiguration(args, fileSystem)
available build-tools:
27.0.3
28.0.3
26.0.2
max build tools (28.0.3, 2803)
available platforms versions:
android-27
android-28
android-23
20:07:10.053 [main] DEBUG org.droidmate.configuration.ConfigurationBuilder - Using uiautomator2-daemon.apk located at /tmp_out/temp_extracted_resources/deviceControlDaemon.apk
20:07:10.053 [main] DEBUG org.droidmate.configuration.ConfigurationBuilder - Using uiautomator2-daemon-test.apk located at /tmp_out/temp_extracted_resources/deviceControlDaemon-test.apk
20:07:10.054 [main] DEBUG org.droidmate.configuration.ConfigurationBuilder - Using monitor.apk located at /tmp_out/temp_extracted_resources/monitor.apk
20:07:10.054 [main] DEBUG org.droidmate.configuration.ConfigurationBuilder - Using api_policies.txt located at /tmp_out/temp_extracted_resources/api_policies.txt
20:07:10.055 [main] DEBUG org.droidmate.configuration.ConfigurationBuilder - Reading APKs from: /home/ST/droidmate/./apks
20:07:10.067 [main] DEBUG org.droidmate.configuration.ConfigurationBuilder - --------------------------------------------------------------------------------
Working dir: /home/ST/droidmate
JVM arguments: []
Configuration dump:
aaptCommand=/android-sdk/build-tools/28.0.3/aapt
adbCommand=/android-sdk/platform-tools/adb
apiPoliciesFile=/tmp_out/temp_extracted_resources/api_policies.txt
apksDirPath=/home/ST/droidmate/./apks
cfg=com.natpryce.konfig.Override@7d8995e
coveragePortFile=
deviceSerialNumber=
droidmateOutputDirPath=/tmp_out
droidmateOutputReportDirPath=/tmp_out/report
fileSystem=sun.nio.fs.LinuxFileSystem@130d63be
monitorApk=/tmp_out/temp_extracted_resources/monitor.apk
monitorPortFile=
reportInputDirPath=/home/ST/droidmate
resourceDir=/tmp_out/temp_extracted_resources
uiautomator2DaemonApk=/tmp_out/temp_extracted_resources/deviceControlDaemon.apk
uiautomator2DaemonTestApk=/tmp_out/temp_extracted_resources/deviceControlDaemon-test.apk
20:07:10.085 [main] INFO org.droidmate.exploration.strategy.ExplorationStrategyPool - Registering strategy org.droidmate.exploration.strategy.DefaultStrategies$actionBasedTerminate$1@93d935ae.
20:07:10.085 [main] INFO org.droidmate.exploration.strategy.ExplorationStrategyPool - Registering strategy org.droidmate.exploration.strategy.DefaultStrategies$resetOnAppCrash$1@dafaf2c4.
20:07:10.085 [main] INFO org.droidmate.exploration.strategy.ExplorationStrategyPool - Registering strategy org.droidmate.exploration.strategy.DefaultStrategies$allowPermission$1@baf2c408.
20:07:10.085 [main] INFO org.droidmate.exploration.strategy.ExplorationStrategyPool - Registering strategy org.droidmate.exploration.strategy.DefaultStrategies$handleAdvertisment$1@38793dce.
20:07:10.085 [main] INFO org.droidmate.exploration.strategy.ExplorationStrategyPool - Registering strategy org.droidmate.exploration.strategy.DefaultStrategies$handleTargetAbsence$1@ced167b4.
20:07:10.085 [main] INFO org.droidmate.exploration.strategy.ExplorationStrategyPool - Registering strategy org.droidmate.exploration.strategy.DefaultStrategies$intervalReset$1@eab5a9da.
20:07:10.086 [main] INFO org.droidmate.exploration.strategy.ExplorationStrategyPool - Registering strategy org.droidmate.exploration.strategy.widget.RandomWidget@70f9dba4.
20:07:10.098 [main] INFO org.droidmate.api.ExplorationAPI - EXPLORATION start timestamp: Wed Nov 20 20:07:10 UTC 2019
20:07:10.098 [main] INFO org.droidmate.api.ExplorationAPI - Running in Android org.droidmate.configuration.ConfigurationWrapper@2925bf5b.androidApi compatibility mode (api23+ = version 6.0 or newer).
Exception in thread "main" java.lang.NullPointerException
at org.droidmate.command.ExploreCommand$cleanOutputDir$2.test(ExploreCommand.kt:162)
at org.droidmate.command.ExploreCommand$cleanOutputDir$2.test(ExploreCommand.kt:76)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.Iterator.forEachRemaining(Iterator.java:116)
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
at org.droidmate.command.ExploreCommand.cleanOutputDir(ExploreCommand.kt:165)
at org.droidmate.command.ExploreCommand.access$cleanOutputDir(ExploreCommand.kt:76)
at org.droidmate.command.ExploreCommand$execute$2.invokeSuspend(ExploreCommand.kt:92)
at org.droidmate.command.ExploreCommand$execute$2.invoke(ExploreCommand.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:91)
at kotlinx.coroutines.SupervisorKt.supervisorScope(Supervisor.kt:46)
at org.droidmate.command.ExploreCommand.execute(ExploreCommand.kt:90)
at org.droidmate.api.ExplorationAPI$explore$6.invokeSuspend(ExplorationAPI.kt:183)
at org.droidmate.api.ExplorationAPI$explore$6.invoke(ExplorationAPI.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:91)
at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:186)
at org.droidmate.api.ExplorationAPI.explore(ExplorationAPI.kt:168)
at org.droidmate.api.ExplorationAPI.explore(ExplorationAPI.kt:199)
at org.droidmate.api.ExplorationAPI$explore$4.invokeSuspend(ExplorationAPI.kt:150)
at org.droidmate.api.ExplorationAPI$explore$4.invoke(ExplorationAPI.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:91)
at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:186)
at org.droidmate.api.ExplorationAPI.explore(ExplorationAPI.kt:148)
at org.droidmate.api.ExplorationAPI.explore$default(ExplorationAPI.kt:147)
at org.droidmate.api.ExplorationAPI$main$1.invokeSuspend(ExplorationAPI.kt:76)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:233)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.kt:116)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:76)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:53)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
at org.droidmate.api.ExplorationAPI.main(ExplorationAPI.kt:66)
Could not build project because de.tud.sse:soot-infoflow-android:2.7.2-SNAPSHOT is not available at Maven repository.
> gradlew build
output:FAILURE: Build failed with an exception.
What went wrong:
Could not determine the dependencies of task ':distTar'.
Could not resolve all task dependencies for configuration ':runtimeClasspath'.
Could not resolve de.tud.sse:soot-infoflow-android:2.7.2-SNAPSHOT.
Required by:
project : > project :project:pcComponents:core > com.github.uds-se:droidmate-coverage:1.4.2-SNAPSHOT
Could not resolve de.tud.sse:soot-infoflow-android:2.7.2-SNAPSHOT.
Unable to load Maven meta-data from https://soot-build.cs.upb.de/nexus/repository/soot-release/de/tud/sse/soot-infoflow-android/2.7.2-SNAPSHOT/maven-metadata.xml.
Could not get resource 'https://soot-build.cs.upb.de/nexus/repository/soot-release/de/tud/sse/soot-infoflow-android/2.7.2-SNAPSHOT/maven-metadata.xml'.
Could not GET 'https://soot-build.cs.upb.de/nexus/repository/soot-release/de/tud/sse/soot-infoflow-android/2.7.2-SNAPSHOT/maven-metadata.xml'. Received status code 400 from server: Repository version policy: RELEASE does not allow metadata in path: de/tud/sse/soot-infoflow-android/2.7.2-SNAPSHOT/maven-metadata.xml
Could not resolve de.upb.cs.swt:heros:1.1.0-SNAPSHOT.
Required by:
project : > project :project:pcComponents:core > com.github.uds-se:droidmate-coverage:1.4.2-SNAPSHOT > ca.mcgill.sable:soot:3.3.0-SNAPSHOT:20190514.152411-8
Could not resolve de.upb.cs.swt:heros:1.1.0-SNAPSHOT.
Unable to load Maven meta-data from https://soot-build.cs.upb.de/nexus/repository/soot-release/de/upb/cs/swt/heros/1.1.0-SNAPSHOT/maven-metadata.xml.
Could not get resource 'https://soot-build.cs.upb.de/nexus/repository/soot-release/de/upb/cs/swt/heros/1.1.0-SNAPSHOT/maven-metadata.xml'.
Could not GET 'https://soot-build.cs.upb.de/nexus/repository/soot-release/de/upb/cs/swt/heros/1.1.0-SNAPSHOT/maven-metadata.xml'. Received status code 400 from server: Repository version policy: RELEASE does not allow metadata in path: de/upb/cs/swt/heros/1.1.0-SNAPSHOT/maven-metadata.xml
Hi,
I've been trying to make droidmate generate the coverage data but it doesn't happen. I mean the tool works normally but it doesn't generate anything related to coverage, even the folder named "coverage".
I followed the guide from the wiki:
Could you please help me fix this problem?
Thank you.
I have recently cloned this project yesterday and built it successfully with gradle. I've tried running droitmate and it seemed to be ok. However, when I tried instrumented apk, the problem occurred.
Exception in thread "main" java.lang.NoClassDefFoundError: org/xmlpull/v1/XmlPullParserException
at org.droidmate.coverage.Instrumenter.instrument(Instrumenter.kt:196)
...
I also dived in the project's source code and I found there's not any source code related to org.droidmate.coverage.Instrumenter. Does the last commit of this project cause this issue?
Could you please help to fix it?
Thank you.
I've read the wiki about API Monitoring and saw that "inlined apps do not work on emulators".
What are the limitations ? I've seen that the apps run, but the API related reports don't exist on my output folder.
Hi there, your project seem very useful to me. I was wondering if there is an option to adjust the frequency of the actions via a command line parameter? Looking at ConfigurationBuilder.kt
I can see deviceOperationDelay
but I am unsure if this is what I am looking for.
If such an option does not exist, could you point me to where in the codebase I could make this extension?
I am using DM2 to perform capture and replay of automatically generated test cases.
When executing DM2 to record test cases for SyncMyPix (com.nloko.android.syncmypix, downloaded from https://m.allfreeapk.com/syncmypix,4559/syncmypix,0.15.2.html) the recording stops abruptly after 92 seconds regardless the settings.
To be precise, what happens here might be related to the exploration strategy taken by DM2. When SyncMyPix is started there is a pop-up with a few links that redirect you in the browser.
Usually during test case recording DM2 clicks just on these links and not the OK button, which would instead enable DM2 to use the rest of the application. After clicking two links and the "donate" button DM2 simply ends the testing without exploring the rest of the application (but without throwing any exception). The sequence of links being clicked vary from one execution to another.
I configured DM2 to use the action limit (500 actions) and no time limit (0).
Also, to overcome this error i have tried to unbound the action limit (0) and to set the time limit to 4000000 but the test still blocks after 90 secs.
Setup: Android 7.1.1 NEXUS 9 API 25 emulator with Android Studio version 3.2.1
All the Apk has been instrumented
Thank you
I was trying to extract coverage information from the output of the tool.
I see that in the folder named “model” there is a file containing a set of statements (coverage.txt). Each statement is associated to a counter but its purpose is not clear to me.
This counter is labeled as “time” but it is not clear to me what it represents. Is it the number of times the statement has been covered? Is the time passed (millis) between the beginning of the testing session and the moment in which the statement has been covered?
Also, I have seen that the folder “coverage” contains a set of files, each one containing the uuid of some statements. Are these all the statements that have been explored for a session? In this case how does droidmate understand when a session is finished (a new file of statement is needed)?
I have tried to figure out which is the relationship between these files and the file inside the folder coverage but i wasn’t able to.
I need to know how to parse these data because i want to measure the code coverage of a testing session and extract the list of covered statements.
I am using DM2 to perform capture and replay of automatically generated test cases.
During the replay phase of a previously recorded test case I observe ApkExplorationException.
This happens for example for Version:1.2.5 (com.haringeymobile.ukweather, downloaded from https://www.apkmonk.com/app/com.haringeymobile.ukweather/).
The message logged on the console is the following:
“ERROR org.droidmate.command.ExploreCommand - java.lang.RuntimeException: ERROR: tried to click non-actable Widget interactive=true-200835f1-1eb3-3866-ba7f-3ff3512568d0_8a329da3-53b2-3818-bf66-90ca49520426: TextView[text=Tue Jan 29 , inputType=0 0:0:0:0]
org.droidmate.device.android_sdk.ApkExplorationException: java.lang.RuntimeException: ERROR: tried to click non-actable Widget interactive=true-200835f1-1eb3-3866-ba7f-3ff3512568d0_8a329da3-53b2-3818-bf66-90ca49520426: TextView[text=Tue Jan 29 , inputType=0 0:0:0:0]
at org.droidmate.tools.ApkDeployer.withDeployedApk(ApkDeployer.kt:66)
at org.droidmate.tools.ApkDeployer$withDeployedApk$1.invokeSuspend(ApkDeployer.kt)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:32)
at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:236)
at kotlinx.coroutines.EventLoopBase.processNextEvent(EventLoop.kt:123)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:69)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:45)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:35)
at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
at org.droidmate.command.ExploreCommand$deployExploreSerialize$1.invoke(ExploreCommand.kt:333)
at org.droidmate.command.ExploreCommand$deployExploreSerialize$1.invoke(ExploreCommand.kt:89)
at org.droidmate.tools.AndroidDeviceDeployer.withSetupDevice(AndroidDeviceDeployer.kt:183)
at org.droidmate.command.ExploreCommand.deployExploreSerialize(ExploreCommand.kt:332)
at org.droidmate.command.ExploreCommand.execute(ExploreCommand.kt:314)
at org.droidmate.command.ExploreCommand.execute(ExploreCommand.kt:240)
at org.droidmate.frontend.DroidmateFrontend$Companion.execute(DroidmateFrontend.kt:131)
at org.droidmate.frontend.DroidmateFrontend$Companion.execute$default(DroidmateFrontend.kt:97)
at org.droidmate.frontend.DroidmateFrontend$Companion.main(DroidmateFrontend.kt:86)
at org.droidmate.frontend.DroidmateFrontend.main(DroidmateFrontend.kt)
Caused by: java.lang.RuntimeException: ERROR: tried to click non-actable Widget interactive=true-200835f1-1eb3-3866-ba7f-3ff3512568d0_8a329da3-53b2-3818-bf66-90ca49520426: TextView[text=Tue Jan 29 , inputType=0 0:0:0:0]
at org.droidmate.exploration.actions.WidgetActionsKt.click(WidgetActions.kt:28)
at org.droidmate.exploration.actions.WidgetActionsKt.click$default(WidgetActions.kt:26)
at org.droidmate.exploration.strategy.playback.Playback.getNextAction(Playback.kt:133)
at org.droidmate.exploration.strategy.playback.Playback.chooseAction$suspendImpl(Playback.kt:249)
at org.droidmate.exploration.strategy.playback.Playback.chooseAction(Playback.kt)
at org.droidmate.exploration.strategy.playback.Playback.internalDecide$suspendImpl(Playback.kt:227)
at org.droidmate.exploration.strategy.playback.Playback.internalDecide(Playback.kt)
at org.droidmate.exploration.strategy.AbstractStrategy.decide$suspendImpl(AbstractStrategy.kt:92)
at org.droidmate.exploration.strategy.AbstractStrategy.decide(AbstractStrategy.kt)
at org.droidmate.exploration.strategy.ExplorationStrategyPool.decide(ExplorationStrategyPool.kt:131)
at org.droidmate.command.ExploreCommand.explorationLoop(ExploreCommand.kt:439)
at org.droidmate.command.ExploreCommand.run(ExploreCommand.kt:390)
at org.droidmate.command.ExploreCommand.tryExploreOnDeviceAndSerialize(ExploreCommand.kt:367)
at org.droidmate.command.ExploreCommand$deployExploreSerialize$1$1$invokeSuspend$$inlined$forEachIndexed$lambda$1.invokeSuspend(ExploreCommand.kt:344)
at org.droidmate.command.ExploreCommand$deployExploreSerialize$1$1$invokeSuspend$$inlined$forEachIndexed$lambda$1.invoke(ExploreCommand.kt)
at org.droidmate.tools.ApkDeployer.withDeployedApk(ApkDeployer.kt:58)
at org.droidmate.command.ExploreCommand$deployExploreSerialize$1$1.invokeSuspend(ExploreCommand.kt:343)
... 18 more”
The uuid changes with the test case, but i think that is related to the same widget. You can observe this behaviour if the action limit of the recorded case is >= 150.
We observe the same failure also with the following apps,related to a different widget (uuid and action changes)
Version:2.7.3, com.wikihow.wikihowapp, downloaded from https://www.apkmonk.com/app/com.wikihow.wikihowapp/ )
from F-droid Version:1.2.4 (org.billthefarmer.currency , downloaded from https://f-droid.org/en/packages/org.billthefarmer.currency)
Setup: Android 7.1.1 NEXUS 9 API 25 emulator with Android Studio version 3.2.1
All the Apk has been instrumented
I hope you will be able to reproduce the error with these information,
Thank you
I'm not able to build the current version of the project because of a dependency of droidmate-coverage not being resolvable by gradle.
It seems that grade is not able to pull "ca.mcgill.sable:soot:3.3.0".
Error message of "./gradlew build":
Execution failed for task ':startScripts'.
Could not resolve all files for configuration ':runtimeClasspath'.
Could not resolve ca.mcgill.sable:soot:3.3.0-SNAPSHOT.
Required by:
project : > project :project:pcComponents:core > com.github.uds-se:droidmate-coverage:master-SNAPSHOT:1.4.2-SNAPSHOT-g2c9a00e-3
> Could not resolve ca.mcgill.sable:soot:3.3.0-SNAPSHOT.
> Unable to load Maven meta-data from https://soot-build.cs.upb.de/nexus/repository/soot-release/ca/mcgill/sable/soot/3.3.0-SNAPSHOT/maven-metadata.xml.
> Could not get resource 'https://soot-build.cs.upb.de/nexus/repository/soot-release/ca/mcgill/sable/soot/3.3.0-SNAPSHOT/maven-metadata.xml'.
> Could not GET 'https://soot-build.cs.upb.de/nexus/repository/soot-release/ca/mcgill/sable/soot/3.3.0-SNAPSHOT/maven-metadata.xml'. Received status code 400 from server: Repository version policy: RELEASE does not allow metadata in path: ca/mcgill/sable/soot/3.3.0-SNAPSHOT/maven-metadata.xml
> Could not resolve ca.mcgill.sable:soot:3.3.0-SNAPSHOT.
> Unable to load Maven meta-data from https://jitpack.io/ca/mcgill/sable/soot/3.3.0-SNAPSHOT/maven-metadata.xml.
> Could not get resource 'https://jitpack.io/ca/mcgill/sable/soot/3.3.0-SNAPSHOT/maven-metadata.xml'.
> Could not GET 'https://jitpack.io/ca/mcgill/sable/soot/3.3.0-SNAPSHOT/maven-metadata.xml'. Received status code 401 from server: Unauthorized
Please excuse that my understanding of gradle is pretty limited so I can't give you more detailed information.
Dear,
I tried to use your ActivitySeenSummary model feature but I realized that devicelogs of all interactions are empty. Do I have to configure anything to record devicelogs for each interaction?
Thank you.
In the wiki/deploying, it says to use
gradlew shadowJar
to generate a runnable jar but apparently, this command does not run successfully. I got this error:
Task 'shadowJar' not found in root project 'droidmate-2'.
I can successfully run ./gradlew build
and ./gradlew install
. But I don't know how to actually run droidmate.
Also through the entire wiki, droidmate can be run using:
java -jar DM-2.jar.
Where is this DM-2.jar?? It is not in the repo and not mentioned in the wiki about how to generate it.
I am using DM2 to perform capture and replay of automatically generated test cases. For certain applications, when replaying the recorded test cases, DM2 crashes with “kotlin.KotlinNullPointerException”
This happens for Version: 1.10 (
com.lubosmikusiak.articuli.derdiedas, downloaded from https://www.apkmonk.com/app/com.lubosmikusiak.articuli.derdiedas/ ).
This is the stack trace
16:38:45.014 [main] ERROR org.droidmate.command.ExploreCommand - kotlin.KotlinNullPointerException
org.droidmate.device.android_sdk.ApkExplorationException: kotlin.KotlinNullPointerException
at org.droidmate.tools.ApkDeployer.withDeployedApk(ApkDeployer.kt:66)
at org.droidmate.tools.ApkDeployer$withDeployedApk$1.invokeSuspend(ApkDeployer.kt)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:32)
at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:236)
at kotlinx.coroutines.EventLoopBase.processNextEvent(EventLoop.kt:123)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:69)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:45)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:35)
at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
at org.droidmate.command.ExploreCommand$deployExploreSerialize$1.invoke(ExploreCommand.kt:333)
at org.droidmate.command.ExploreCommand$deployExploreSerialize$1.invoke(ExploreCommand.kt:89)
at org.droidmate.tools.AndroidDeviceDeployer.withSetupDevice(AndroidDeviceDeployer.kt:183)
at org.droidmate.command.ExploreCommand.deployExploreSerialize(ExploreCommand.kt:332)
at org.droidmate.command.ExploreCommand.execute(ExploreCommand.kt:314)
at org.droidmate.command.ExploreCommand.execute(ExploreCommand.kt:240)
at org.droidmate.frontend.DroidmateFrontend$Companion.execute(DroidmateFrontend.kt:131)
at org.droidmate.frontend.DroidmateFrontend$Companion.execute$default(DroidmateFrontend.kt:97)
at org.droidmate.frontend.DroidmateFrontend$Companion.main(DroidmateFrontend.kt:86)
at org.droidmate.frontend.DroidmateFrontend.main(DroidmateFrontend.kt)
Caused by: kotlin.KotlinNullPointerException
at org.droidmate.exploration.strategy.playback.Playback.getNextAction(Playback.kt:212)
at org.droidmate.exploration.strategy.playback.Playback.chooseAction$suspendImpl(Playback.kt:249)
at org.droidmate.exploration.strategy.playback.Playback.chooseAction(Playback.kt)
at org.droidmate.exploration.strategy.playback.Playback.internalDecide$suspendImpl(Playback.kt:227)
at org.droidmate.exploration.strategy.playback.Playback.internalDecide(Playback.kt)
at org.droidmate.exploration.strategy.AbstractStrategy.decide$suspendImpl(AbstractStrategy.kt:92)
at org.droidmate.exploration.strategy.AbstractStrategy.decide(AbstractStrategy.kt)
at org.droidmate.exploration.strategy.ExplorationStrategyPool.decide(ExplorationStrategyPool.kt:131)
at org.droidmate.command.ExploreCommand.explorationLoop(ExploreCommand.kt:439)
at org.droidmate.command.ExploreCommand.run(ExploreCommand.kt:390)
at org.droidmate.command.ExploreCommand.tryExploreOnDeviceAndSerialize(ExploreCommand.kt:367)
at org.droidmate.command.ExploreCommand$deployExploreSerialize$1$1$invokeSuspend$$inlined$forEachIndexed$lambda$1.invokeSuspend(ExploreCommand.kt:344)
at org.droidmate.command.ExploreCommand$deployExploreSerialize$1$1$invokeSuspend$$inlined$forEachIndexed$lambda$1.invoke(ExploreCommand.kt)
at org.droidmate.tools.ApkDeployer.withDeployedApk(ApkDeployer.kt:58)
at org.droidmate.command.ExploreCommand$deployExploreSerialize$1$1.invokeSuspend(ExploreCommand.kt:343)
... 18 more
16:38:45.015 [main] ERROR org.droidmate.frontend.ExceptionHandler - A nonempty ThrowablesCollection was thrown during DroidMate run. Each of the 1 Throwables will now be logged.
16:38:45.015 [main] ERROR org.droidmate.frontend.ExceptionHandler - A nonempty ThrowablesCollection was thrown during DroidMate run. Each of the 1 Throwables will now be logged.
16:38:45.015 [main] ERROR org.droidmate.frontend.ExceptionHandler - ========================================
16:38:45.015 [main] ERROR org.droidmate.frontend.ExceptionHandler - ========================================
16:38:45.015 [main] ERROR org.droidmate.frontend.ExceptionHandler - An ApkExplorationException was thrown during DroidMate run, pertaining to DerDieDas_v1.10_apkpure.com-instrumented.apk: org.droidmate.device.android_sdk.ApkExplorationException: kotlin.KotlinNullPointerException
16:38:45.015 [main] ERROR org.droidmate.frontend.ExceptionHandler - An ApkExplorationException was thrown during DroidMate run, pertaining to DerDieDas_v1.10_apkpure.com-instrumented.apk:
org.droidmate.device.android_sdk.ApkExplorationException: kotlin.KotlinNullPointerException
at org.droidmate.tools.ApkDeployer.withDeployedApk(ApkDeployer.kt:66)
at org.droidmate.tools.ApkDeployer$withDeployedApk$1.invokeSuspend(ApkDeployer.kt)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:32)
at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:236)
at kotlinx.coroutines.EventLoopBase.processNextEvent(EventLoop.kt:123)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:69)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:45)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:35)
at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
at org.droidmate.command.ExploreCommand$deployExploreSerialize$1.invoke(ExploreCommand.kt:333)
at org.droidmate.command.ExploreCommand$deployExploreSerialize$1.invoke(ExploreCommand.kt:89)
at org.droidmate.tools.AndroidDeviceDeployer.withSetupDevice(AndroidDeviceDeployer.kt:183)
at org.droidmate.command.ExploreCommand.deployExploreSerialize(ExploreCommand.kt:332)
at org.droidmate.command.ExploreCommand.execute(ExploreCommand.kt:314)
at org.droidmate.command.ExploreCommand.execute(ExploreCommand.kt:240)
at org.droidmate.frontend.DroidmateFrontend$Companion.execute(DroidmateFrontend.kt:131)
at org.droidmate.frontend.DroidmateFrontend$Companion.execute$default(DroidmateFrontend.kt:97)
at org.droidmate.frontend.DroidmateFrontend$Companion.main(DroidmateFrontend.kt:86)
at org.droidmate.frontend.DroidmateFrontend.main(DroidmateFrontend.kt)
Caused by: kotlin.KotlinNullPointerException: null
at org.droidmate.exploration.strategy.playback.Playback.getNextAction(Playback.kt:212)
at org.droidmate.exploration.strategy.playback.Playback.chooseAction$suspendImpl(Playback.kt:249)
at org.droidmate.exploration.strategy.playback.Playback.chooseAction(Playback.kt)
at org.droidmate.exploration.strategy.playback.Playback.internalDecide$suspendImpl(Playback.kt:227)
at org.droidmate.exploration.strategy.playback.Playback.internalDecide(Playback.kt)
at org.droidmate.exploration.strategy.AbstractStrategy.decide$suspendImpl(AbstractStrategy.kt:92)
at org.droidmate.exploration.strategy.AbstractStrategy.decide(AbstractStrategy.kt)
at org.droidmate.exploration.strategy.ExplorationStrategyPool.decide(ExplorationStrategyPool.kt:131)
at org.droidmate.command.ExploreCommand.explorationLoop(ExploreCommand.kt:439)
at org.droidmate.command.ExploreCommand.run(ExploreCommand.kt:390)
at org.droidmate.command.ExploreCommand.tryExploreOnDeviceAndSerialize(ExploreCommand.kt:367)
at org.droidmate.command.ExploreCommand$deployExploreSerialize$1$1$invokeSuspend$$inlined$forEachIndexed$lambda$1.invokeSuspend(ExploreCommand.kt:344)
at org.droidmate.command.ExploreCommand$deployExploreSerialize$1$1$invokeSuspend$$inlined$forEachIndexed$lambda$1.invoke(ExploreCommand.kt)
at org.droidmate.tools.ApkDeployer.withDeployedApk(ApkDeployer.kt:58)
at org.droidmate.command.ExploreCommand$deployExploreSerialize$1$1.invokeSuspend(ExploreCommand.kt:343)
... 18 common frames omitted
Setup: Android 7.1.1 NEXUS 9 API 25 emulator with Android Studio version 3.2.1
All the Apk has been instrumented
Thank you
I would like to reproduce ArtHook hooking process. I have a Samsung Galaxy Tab SM-T700 with Android 6.0.1.
I used DroidMate2 to create an inlined apk for built by me, simple and oriented to testing the hooking of the (commented) URL sensitive API from DroidMate. After inlining, it gives me the following error. Do you have any idea about why it is breaking? App works okay without inlining.
---------------------------- PROCESS ENDED (11916) for package com.forensicbites.sdk23_droidmate_test ---------------------------- 2024-01-01 16:42:53.980 2836-2836 SDAgentPac...teReceiver system_server E Not going to handle 'com.forensicbites.sdk23_droidmate_test'! 2024-01-01 16:42:54.335 3466-3466 Launcher.Model com.sec.android.app.launcher E onPackageRemoved :com.forensicbites.sdk23_droidmate_test 2024-01-01 16:42:56.340 2836-2836 SDAgentPac...teReceiver system_server E Not going to handle 'com.forensicbites.sdk23_droidmate_test'! 2024-01-01 16:42:56.395 2836-2924 MARsDBManager system_server E insertPackage com.forensicbites.sdk23_droidmate_test uri = content://com.samsung.android.sm/AppFreezer/261 2024-01-01 16:42:56.920 3466-3466 Launcher.Model com.sec.android.app.launcher E onPackageAdded :com.forensicbites.sdk23_droidmate_test 2024-01-01 16:42:58.410 12642-12642 SPPClientService com.sec.spp.push E [PackageInfoChangeReceiver] [handlePkgRemovedEvent] PackageName : com.forensicbites.sdk23_droidmate_test ---------------------------- PROCESS STARTED (20840) for package com.forensicbites.sdk23_droidmate_test ---------------------------- 2024-01-01 16:47:05.235 20840-20840 System.out com...sicbites.sdk23_droidmate_test I Extracting lib/armeabi-v7a/libarthook_native.so to: /data/user/0/com.forensicbites.sdk23_droidmate_test/files/appguard_monitor_libs/libarthook_native.so 2024-01-01 16:47:05.250 20840-20840 System.out com...sicbites.sdk23_droidmate_test I Extracting lib/armeabi/libarthook_native.so to: /data/user/0/com.forensicbites.sdk23_droidmate_test/files/appguard_monitor_libs/libarthook_native.so 2024-01-01 16:47:16.765 20879-20879 dex2oat dex2oat E <SS>: oat location is not valid /data/user/0/com.forensicbites.sdk23_droidmate_test/files/appguard_monitor_odex/monitor.dex 2024-01-01 16:47:16.835 20840-20840 BaseAppGuardApplication com...sicbites.sdk23_droidmate_test W Error while initializing monitor. java.lang.InstantiationException: java.lang.Class<org.droidmate.monitor.Monitor> has no zero argument constructor at java.lang.Class.newInstance(Native Method) at com.srt.appguard.loader.MonitorLoader.startAppGuardMonitor(MonitorLoader.java:39) at com.srt.appguard.loader.MonitorLoaderApplication.attachBaseContext(MonitorLoaderApplication.java:13) at android.app.Application.attach(Application.java:211) at android.app.Instrumentation.newApplication(Instrumentation.java:1021) at android.app.Instrumentation.newApplication(Instrumentation.java:1005) at android.app.LoadedApk.makeApplication(LoadedApk.java:670) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6401) at android.app.ActivityThread.access$1800(ActivityThread.java:229) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1887) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:7331) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) 2024-01-01 16:47:16.870 20840-20840 AndroidRuntime com...sicbites.sdk23_droidmate_test D Shutting down VM 2024-01-01 16:47:16.870 20840-20840 AndroidRuntime com...sicbites.sdk23_droidmate_test E FATAL EXCEPTION: main Process: com.forensicbites.sdk23_droidmate_test, PID: 20840 java.lang.NoClassDefFoundError: Failed resolution of: Lcom/forensicbites/sdk23_droidmate_test/R$layout; at com.forensicbites.sdk23_droidmate_test.MainActivity.onCreate(MainActivity.java:19) at android.app.Activity.performCreate(Activity.java:6904) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1136) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3266) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3415) at android.app.ActivityThread.access$1100(ActivityThread.java:229) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1821) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:7331) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) Caused by: java.lang.ClassNotFoundException: Didn't find class "com.forensicbites.sdk23_droidmate_test.R$layout" on path: DexPathList[[zip file "/data/app/com.forensicbites.sdk23_droidmate_test-1/base.apk"],nativeLibraryDirectories=[/data/app/com.forensicbites.sdk23_droidmate_test-1/lib/arm, /vendor/lib, /system/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at java.lang.ClassLoader.loadClass(ClassLoader.java:511) at java.lang.ClassLoader.loadClass(ClassLoader.java:469) at com.forensicbites.sdk23_droidmate_test.MainActivity.onCreate(MainActivity.java:19) at android.app.Activity.performCreate(Activity.java:6904) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1136) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3266) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3415) at android.app.ActivityThread.access$1100(ActivityThread.java:229) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1821) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:7331) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) Suppressed: java.lang.ClassNotFoundException: com.forensicbites.sdk23_droidmate_test.R$layout at java.lang.Class.classForName(Native Method) at java.lang.BootClassLoader.findClass(ClassLoader.java:781) at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) at java.lang.ClassLoader.loadClass(ClassLoader.java:504) ... 14 more Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available 2024-01-01 16:47:19.640 20840-20848 art com...sicbites.sdk23_droidmate_test I Debugger is no longer active ---------------------------- PROCESS ENDED (20840) for package com.forensicbites.sdk23_droidmate_test ---------------------------- 2024-01-01 16:52:44.935 2836-2836 SDAgentPac...teReceiver system_server E Not going to handle 'com.forensicbites.sdk23_droidmate_test'! 2024-01-01 16:52:45.245 3466-3466 Launcher.Model com.sec.android.app.launcher E onPackageRemoved :com.forensicbites.sdk23_droidmate_test 2024-01-01 16:52:57.675 31456-31456 SPPClientService com.sec.spp.push E [PackageInfoChangeReceiver] [handlePkgRemovedEvent] PackageName : com.forensicbites.sdk23_droidmate_test
Aftter inlining a very simple calendar app, it crashes when it starts. Can you give any direction to how can I debug the monitoring envirionment? You mention that arthook is responsible for monitoring. Can you clarify if arthook is still compatible with modern android os versions?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.