This project hosts the implementation of the controller of AimDroid.
The internal name of the controller is monidroid
- Install
golang
.- Mac OS:
brew install go
- Mac OS:
- Create the workspace for
go
following https://golang.org/doc/code.html. The following is a list of simplified steps.- Create the default go workspace at
$HOME/go/
. - Setup env variable
GOPATH
:export GOPATH=$HOME/go
- Create the default go source code folder at
$HOME/go/src
.
- Create the default go workspace at
- Change directory to
$HOME/go/src
and clone the source code of Monidroid:git clone git@github.com:icsnju/AimDroid-controller.git monidroid
.- The folder name must be
monidroid
.
- Change directory to
$HOME/go/src/monidroid
and rungo build
. - You will see an executable tool named
monidroid
at$HOME/go/src/monidroid/
Here is a sample of configuration file.
{
"PackageName":"com.google.android.apps.photos",
"MainActivity":"com.google.android.apps.photos.home.HomeActivity",
"SDKPath":"/Users/tianxiaogu/Library/Android/sdk/",
"Epsilon":0.2,
"Alpha":0.6,
"Gamma":0.5,
"MaxSeqLen":100,
"MinSeqLen":20,
"Time":3600
}
Here is the explanation of each option.
PackageName
: the app name of the app under test.MainActivity
: the entry activity of the app.SDKPath
: the path to the Android SDK- We need to run the command
adb
to communicate with the phone.
- We need to run the command
Epsilon
,Alpha
,Gamma
: the parameters for the reinforcement learning module. See the paper for more details.MaxSeqLen
,MinSeqLen
: the length of actions in a single activity. See the paper for more details.Time
: the total testing time in seconds.
AimDroid was first evaluated on real table devices.
We have encountered problems of invoking su -c
on the emulator.
Apply the following patch if you want to build a version for emulator.
cd $HOME/go/src/monidroid
find . -name "*.go" -exec sed -i "s/su -c//" {} \;