You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+92-51
Original file line number
Diff line number
Diff line change
@@ -5,28 +5,81 @@ learn a model of the target app during testing, uses the learned model to genera
5
5
unexplored states of the app, and uses the execution of the app on the generated inputs to refine
6
6
the model.
7
7
8
-
The main purpose of the repository is to provide working demo of the latest version of the
9
-
*SwiftHand*. The repository provides ready-instrumented benchmakrs and back-end(testing engine) binary.
10
-
Also source code for both front-end(instrumentation) and back-end is available. Currently, maven build
11
-
script for the back-end is available. A script for the front-end will be added soon.
8
+
The main purpose of the repository is to provide working demo of the version of the
9
+
*SwiftHand* tool submited to OOPSLA'13 conference.
10
+
The repository provides ready-instrumented benchmakrs and back-end(testing engine) binary.
11
+
Also source code for both front-end (instrumentation) and back-end is available.
12
12
13
13
14
+
INSTALLATION
15
+
============
14
16
15
-
How to Use Compiled Back-End
16
-
============================
17
+
#### Step 1. Install Android Development Kit (ADK)
17
18
18
-
#### Step 1. Install Android SDK (ADK)
19
-
Download from http://developer.android.com/sdk/index.html. We recomment to use SDK 4.1.2 or higher version. After install ADK, please make sure that you have following five files.
19
+
Before playing with SwiftHand, please make sure to install the Android SDK (ADK).
20
+
You can download it from http://developer.android.com/sdk/index.html.
21
+
We recommend to use ADK then 4.1.2 or higher.
22
+
After installing ADK, please make sure that you have following six files.
20
23
21
24
- ADK_ROOT/platform-tools/adb
22
25
- ADK_ROOT/tools/lib/ddms.jar
23
26
- ADK_ROOT/tools/lib/ddmlib.jar
24
27
- ADK_ROOT/tools/lib/chimpchat.jar
25
-
- ADK_ROOT/tools/lib/guava-13.0.1.jar
28
+
- ADK_ROOT/tools/lib/guava-17.0.jar (version may vary)
29
+
- ADK_ROOT/build-tools/21.0.3/lib/dx.jar (version may vary)
26
30
31
+
Please memo your guava.jar version (17.0 in the example), your build-tools version (21.0.3 in the example),
32
+
and the path to the ADK root directory. We will need this information later.
27
33
34
+
#### Step 2. Install JDK 7
28
35
29
-
#### Step 2. Create Emulator
36
+
The SwiftHand implementation works with JDK version 6 and 7, and we recommend to use JDK version 7.
37
+
Please check the path to the JDK root directory. We will need this information later.
38
+
39
+
40
+
#### Step 3. Install Maven.
41
+
Maven (http://maven.apache.org) is a project management and comprehension tool.
42
+
Any recent version of Maven 3 will work.
43
+
44
+
45
+
#### Step 4. Clone the SwiftHand repository.
46
+
Now, it is a time to start the real job.
47
+
48
+
49
+
#### Step 5. Editing the build script.
50
+
Open *build.sh.skeleton*, a skeleton of the main build script.
51
+
You will find out following four commented lines.
52
+
Assign an appropriate values to variable and uncomment it.
53
+
54
+
```
55
+
#export ADK_ROOT=""
56
+
#export JAVA_HOME=""
57
+
#export GUAVA_VERSION=""
58
+
#export DX_VERSION=""
59
+
```
60
+
61
+
Once the editing is done, typing the following commands:
62
+
```
63
+
cp build.sh.skeleton build.sh
64
+
chmod 700 build.sh
65
+
```
66
+
67
+
#### Step 6. Build.
68
+
69
+
Now is the time to do the actual build!
70
+
```
71
+
./build.sh
72
+
```
73
+
74
+
If the build process was succesful,
75
+
you will see two new files in the directory:
76
+
*inst.sh* and *test.sh*. Voila!
77
+
78
+
79
+
Using the Back-End
80
+
====================
81
+
82
+
#### Step 1. Create an Emulator
30
83
Do following steps to create Android Vritual Device. The steps will create emulator image.
31
84
32
85
1. Luanch SDK Manager (ADK_ROOT/tools/android)
@@ -38,66 +91,54 @@ You can find the official guideline about emulator management:
-wipe-data options it to start emulator from the factory-reset state -dns-server 127.0.0.1 option is a trick to disabling internet access. <AVD_NAME> refer the name of AVD created by step 2.
47
100
48
101
49
-
#### Step 4. Download SiwftHand Tool and benchmark programs.
50
-
You can download it from /dist directory of this repository.
51
-
52
-
53
-
#### Step 5. Set environment variables. Following command will do the work.
With compiled jar, executing the testing tool is much simpler.
119
+
With a compiled front-end, you can instrument an apk file using the inst.sh script generated by the build script.
94
120
```
95
-
java -jar back-end-0.1-jar-with-dependencies.jar benchmark/mininote.modified.apk swift 3600 0 <OUTPUT_DIR>
121
+
./inst.sh <TARGET.apk>
96
122
```
97
-
We assume that a running emulator (or phone) is connected to ADB. If not, please create and boot
98
-
an emulator before start testing.
99
123
124
+
Please make sure to replace <TARGET.apk> with the path of the target apk file. You can find two example target files located in *dist/unmofidied* directory.
125
+
If the instrumentation process success, the front-end generates several files including the following two files,
126
+
in the direcory containing the source apk file.
127
+
128
+
- TARGET.modified.apk
129
+
- TARGET.json
130
+
131
+
If you have these two files, you are ready to play with the back-end. Please make sure to have these two files in the same directory.
132
+
133
+
Acknowledgements
134
+
================
135
+
- The front-end only works with ASMDEX library revision 1665 or an older version.
136
+
- The front-end only compiles with Scala compiler 2.9.1.
137
+
- The back-end only works correctly with an applicatio using a "real" screen resolution.
100
138
101
-
102
139
140
+
License
141
+
=======
142
+
The SwiftHand tool follows BSD licnese.
143
+
Please check the License.txt file for more details.
0 commit comments