├── .classpath ├── .project ├── .settings └── org.eclipse.jdt.core.prefs ├── AndroidManifest.xml ├── README.md ├── bin ├── AndroidManifest.xml ├── MyFirstApp.apk ├── classes.dex ├── classes │ └── com │ │ └── example │ │ └── myfirstapp │ │ ├── BuildConfig.class │ │ ├── DisplayMessageActivity.class │ │ ├── MainActivity.class │ │ ├── R$attr.class │ │ ├── R$dimen.class │ │ ├── R$drawable.class │ │ ├── R$id.class │ │ ├── R$layout.class │ │ ├── R$menu.class │ │ ├── R$string.class │ │ ├── R$style.class │ │ └── R.class ├── dexedLibs │ ├── android-support-v4-53a062800f063f991d48f983cd3fc14e.jar │ ├── android-support-v4-737ccaac967eda36ea139aad137af2ea.jar │ └── android-support-v4-c918fb20779bb2b9c47aaabf9bd7c738.jar ├── jarlist.cache ├── res │ └── crunch │ │ ├── drawable-hdpi │ │ └── ic_launcher.png │ │ ├── drawable-mdpi │ │ └── ic_launcher.png │ │ ├── drawable-xhdpi │ │ └── ic_launcher.png │ │ └── drawable-xxhdpi │ │ └── ic_launcher.png └── resources.ap_ ├── gen └── com │ └── example │ └── myfirstapp │ ├── BuildConfig.java │ └── R.java ├── ic_launcher-web.png ├── libs └── android-support-v4.jar ├── lint.xml ├── proguard-project.txt ├── project.properties ├── res ├── drawable-hdpi │ └── ic_launcher.png ├── drawable-mdpi │ └── ic_launcher.png ├── drawable-xhdpi │ └── ic_launcher.png ├── drawable-xxhdpi │ └── ic_launcher.png ├── layout │ ├── activity_display_message.xml │ └── activity_main.xml ├── menu │ ├── display_message.xml │ └── main.xml ├── values-sw600dp │ └── dimens.xml ├── values-sw720dp-land │ └── dimens.xml ├── values-v11 │ └── styles.xml ├── values-v14 │ └── styles.xml └── values │ ├── dimens.xml │ ├── strings.xml │ └── styles.xml └── src └── com └── example └── myfirstapp ├── DisplayMessageActivity.java └── MainActivity.java /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | MyFirstApp 4 | 5 | 6 | 7 | 8 | 9 | com.android.ide.eclipse.adt.ResourceManagerBuilder 10 | 11 | 12 | 13 | 14 | com.android.ide.eclipse.adt.PreCompilerBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.jdt.core.javabuilder 20 | 21 | 22 | 23 | 24 | com.android.ide.eclipse.adt.ApkBuilder 25 | 26 | 27 | 28 | 29 | 30 | com.android.ide.eclipse.adt.AndroidNature 31 | org.eclipse.jdt.core.javanature 32 | 33 | 34 | -------------------------------------------------------------------------------- /.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 3 | org.eclipse.jdt.core.compiler.compliance=1.6 4 | org.eclipse.jdt.core.compiler.source=1.6 5 | -------------------------------------------------------------------------------- /AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 22 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 35 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Behavior-Based-Malware-Detection-System-for-Android 2 | =================================================== 3 | 4 | This is an android app for malware detection based on anomaly using dynamic analysis. 5 | Capitalize on earlier approaches for dynamic analysis of application behavior as a means for detecting malware in the Android platform. 6 | The detector is embedded in a overall framework for collection of traces from an unlimited number of real users based on crowdsourcing. Our 7 | framework has been demonstrated by analyzing the data collected in the central server using two types of data sets: 8 | those from arti cial malware created for test purposes, and 9 | those from real malware found in the wild. 10 | 11 | for further description read the below link paper 12 | (http://www.ida.liu.se/labs/rtslab/publications/2011/spsm11-burguera.pdf) 13 | 14 | 15 | 16 | 17 | The implementation consists of two main programs: client and server. 18 | 19 | Working of client 20 | Client program is a daemon process that runs in background on Android platform. It's responsible for collecting system call data and communicating with server. It is designed to be lightweight with small code to conserve battery consumption on smartphones. 21 | 22 | **Steps followed by client: 23 | 24 | *System call tracing using strace 25 | 26 | Android at its core has a process they call the “Zygote”, which starts up at init. It gets its name from dictionary definition: "It is the initial cell formed when a new organism is produced". This process is a “Warmed-up” process, which means it’s a process that’s been initialized and has all the core libraries linked in. 27 | The only mission of Zygote is to launch application. This means that Zygote is the parent of all apps process. Whenever Zygote receives request to launch a new application, it forks a new process (replicates itself). Thereafter application code replaces Zygote and starts execution. 28 | Client requires to capture system call requested by all application. One way to do that is to attach strace to Zygote process. This way we can capture system call of all application process because Zygote is the parent of all other application. 29 | At this stage output of strace is stored in one file. 30 | 31 | *Parsing data according to application 32 | 33 | Strace will log system call data of process and all its child process and so on in one file. Following example shows strace output for multiple (parent child) application: 34 | [pid 28772] select(4, [3], NULL, NULL, NULL 35 | [pid 28779] clock_gettime(CLOCK_REALTIME, {1130322148, 939977000}) = 0 36 | [pid 28772] <... select resumed> ) = 1 (in [3]) 37 | 38 | Each process is differentiated from other by the pid in the log. 39 | Using the pid, we can trace back to the application running the given process. Thus, we are able to obtain system call data for that application. In this stage, we collect system call data for each application (that we're interested) in separate file. Each file also contains additional information regarding the application. This additional information is used by the server to decode back the application. 40 | 41 | *Establish connection with server 42 | 43 | Once sufficient data has been collected and client has it networking turned on, client establish connection with server process to transfer data. 44 | Transfer of data can be scheduled to happen at specific intervals to prevent power consumption. 45 | 46 | *Transfer data to server 47 | 48 | In the next step, client sends the system call data to server. A particular format is setup, which helps server identifies which application does that system call data belongs to. 49 | 50 | *React to the threat 51 | 52 | Server will in turn process on the data, identify whether the application is benign or malicious and return the result back to client. Client will then warn the user about threat and/or prompt user to uninstall/remove the malicious application. 53 | 54 | **Working of server 55 | 56 | Server process is responsible for detecting malicious application based on the data send by the client and informing client of the results. Main design goal is performance and concurrency (ability to handle multiple request). Thus server process is implemented in C language for faster execution. 57 | 58 | *Listen for client request 59 | 60 | Client initiates connection with server. Server can handle multiple clients at same time. 61 | 62 | *Process client request 63 | 64 | Server, then, forks a new process to handle the incoming client request. Transfer of system call data from client takes place. 65 | 66 | *Identify application 67 | 68 | Next, server identifies the application using the additional information stored along with system call data. If application has not been stored in server's application database, a new entry is created. 69 | 70 | *Parse system call data to vector form 71 | 72 | System call data is then converted in to vector form, which essentially is an array of numbers, each representing the frequency of particular system call, in predefined order of system calls. A simple bash based shell script is used for parsing. This vector is the passed to subsequent malware detection analysis. 73 | 74 | *Clustering 75 | 76 | The vector obtained from previous step is used as an input to simple clustering algorithm (K-means clustering algorithm). This clustering algorithm is then able to cluster this application data to either benign or malicious. The exact steps taken are: 77 | i. Obtain the centroid values from the database 78 | ii. Find the cluster which is closest to the input vector 79 | iii. Calculate the new centroid obtained after insertion and store the result to the database 80 | iv. Save the cluster number of the input vector for future use. 81 | v. Find whether application is malicious or not based on the comparison of count of data vectors in current cluster number and the alternate cluster. It is assumed that the cluster with more vectors is not malicious. 82 | 83 | *Deliver the results to the client 84 | 85 | The result of the clustering algorithm is then communicated to the client. Appropriate action is then taken by the client. 86 | -------------------------------------------------------------------------------- /bin/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 22 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 35 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /bin/MyFirstApp.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kapilkchaurasia/Behavior-Based-Malware-Detection-System-for-Android/3b097ae032ba7a703c0b0f56f9322c1b9c6c261c/bin/MyFirstApp.apk -------------------------------------------------------------------------------- /bin/classes.dex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kapilkchaurasia/Behavior-Based-Malware-Detection-System-for-Android/3b097ae032ba7a703c0b0f56f9322c1b9c6c261c/bin/classes.dex -------------------------------------------------------------------------------- /bin/classes/com/example/myfirstapp/BuildConfig.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kapilkchaurasia/Behavior-Based-Malware-Detection-System-for-Android/3b097ae032ba7a703c0b0f56f9322c1b9c6c261c/bin/classes/com/example/myfirstapp/BuildConfig.class -------------------------------------------------------------------------------- /bin/classes/com/example/myfirstapp/DisplayMessageActivity.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kapilkchaurasia/Behavior-Based-Malware-Detection-System-for-Android/3b097ae032ba7a703c0b0f56f9322c1b9c6c261c/bin/classes/com/example/myfirstapp/DisplayMessageActivity.class -------------------------------------------------------------------------------- /bin/classes/com/example/myfirstapp/MainActivity.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kapilkchaurasia/Behavior-Based-Malware-Detection-System-for-Android/3b097ae032ba7a703c0b0f56f9322c1b9c6c261c/bin/classes/com/example/myfirstapp/MainActivity.class -------------------------------------------------------------------------------- /bin/classes/com/example/myfirstapp/R$attr.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kapilkchaurasia/Behavior-Based-Malware-Detection-System-for-Android/3b097ae032ba7a703c0b0f56f9322c1b9c6c261c/bin/classes/com/example/myfirstapp/R$attr.class -------------------------------------------------------------------------------- /bin/classes/com/example/myfirstapp/R$dimen.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kapilkchaurasia/Behavior-Based-Malware-Detection-System-for-Android/3b097ae032ba7a703c0b0f56f9322c1b9c6c261c/bin/classes/com/example/myfirstapp/R$dimen.class -------------------------------------------------------------------------------- /bin/classes/com/example/myfirstapp/R$drawable.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kapilkchaurasia/Behavior-Based-Malware-Detection-System-for-Android/3b097ae032ba7a703c0b0f56f9322c1b9c6c261c/bin/classes/com/example/myfirstapp/R$drawable.class -------------------------------------------------------------------------------- /bin/classes/com/example/myfirstapp/R$id.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kapilkchaurasia/Behavior-Based-Malware-Detection-System-for-Android/3b097ae032ba7a703c0b0f56f9322c1b9c6c261c/bin/classes/com/example/myfirstapp/R$id.class -------------------------------------------------------------------------------- /bin/classes/com/example/myfirstapp/R$layout.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kapilkchaurasia/Behavior-Based-Malware-Detection-System-for-Android/3b097ae032ba7a703c0b0f56f9322c1b9c6c261c/bin/classes/com/example/myfirstapp/R$layout.class -------------------------------------------------------------------------------- /bin/classes/com/example/myfirstapp/R$menu.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kapilkchaurasia/Behavior-Based-Malware-Detection-System-for-Android/3b097ae032ba7a703c0b0f56f9322c1b9c6c261c/bin/classes/com/example/myfirstapp/R$menu.class -------------------------------------------------------------------------------- /bin/classes/com/example/myfirstapp/R$string.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kapilkchaurasia/Behavior-Based-Malware-Detection-System-for-Android/3b097ae032ba7a703c0b0f56f9322c1b9c6c261c/bin/classes/com/example/myfirstapp/R$string.class -------------------------------------------------------------------------------- /bin/classes/com/example/myfirstapp/R$style.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kapilkchaurasia/Behavior-Based-Malware-Detection-System-for-Android/3b097ae032ba7a703c0b0f56f9322c1b9c6c261c/bin/classes/com/example/myfirstapp/R$style.class -------------------------------------------------------------------------------- /bin/classes/com/example/myfirstapp/R.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kapilkchaurasia/Behavior-Based-Malware-Detection-System-for-Android/3b097ae032ba7a703c0b0f56f9322c1b9c6c261c/bin/classes/com/example/myfirstapp/R.class -------------------------------------------------------------------------------- /bin/dexedLibs/android-support-v4-53a062800f063f991d48f983cd3fc14e.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kapilkchaurasia/Behavior-Based-Malware-Detection-System-for-Android/3b097ae032ba7a703c0b0f56f9322c1b9c6c261c/bin/dexedLibs/android-support-v4-53a062800f063f991d48f983cd3fc14e.jar -------------------------------------------------------------------------------- /bin/dexedLibs/android-support-v4-737ccaac967eda36ea139aad137af2ea.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kapilkchaurasia/Behavior-Based-Malware-Detection-System-for-Android/3b097ae032ba7a703c0b0f56f9322c1b9c6c261c/bin/dexedLibs/android-support-v4-737ccaac967eda36ea139aad137af2ea.jar -------------------------------------------------------------------------------- /bin/dexedLibs/android-support-v4-c918fb20779bb2b9c47aaabf9bd7c738.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kapilkchaurasia/Behavior-Based-Malware-Detection-System-for-Android/3b097ae032ba7a703c0b0f56f9322c1b9c6c261c/bin/dexedLibs/android-support-v4-c918fb20779bb2b9c47aaabf9bd7c738.jar -------------------------------------------------------------------------------- /bin/jarlist.cache: -------------------------------------------------------------------------------- 1 | # cache for current jar dependency. DO NOT EDIT. 2 | # format is 3 | # Encoding is UTF-8 4 | -------------------------------------------------------------------------------- /bin/res/crunch/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kapilkchaurasia/Behavior-Based-Malware-Detection-System-for-Android/3b097ae032ba7a703c0b0f56f9322c1b9c6c261c/bin/res/crunch/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /bin/res/crunch/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kapilkchaurasia/Behavior-Based-Malware-Detection-System-for-Android/3b097ae032ba7a703c0b0f56f9322c1b9c6c261c/bin/res/crunch/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /bin/res/crunch/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kapilkchaurasia/Behavior-Based-Malware-Detection-System-for-Android/3b097ae032ba7a703c0b0f56f9322c1b9c6c261c/bin/res/crunch/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /bin/res/crunch/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kapilkchaurasia/Behavior-Based-Malware-Detection-System-for-Android/3b097ae032ba7a703c0b0f56f9322c1b9c6c261c/bin/res/crunch/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /bin/resources.ap_: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kapilkchaurasia/Behavior-Based-Malware-Detection-System-for-Android/3b097ae032ba7a703c0b0f56f9322c1b9c6c261c/bin/resources.ap_ -------------------------------------------------------------------------------- /gen/com/example/myfirstapp/BuildConfig.java: -------------------------------------------------------------------------------- 1 | /** Automatically generated file. DO NOT MODIFY */ 2 | package com.example.myfirstapp; 3 | 4 | public final class BuildConfig { 5 | public final static boolean DEBUG = true; 6 | } -------------------------------------------------------------------------------- /gen/com/example/myfirstapp/R.java: -------------------------------------------------------------------------------- 1 | /* AUTO-GENERATED FILE. DO NOT MODIFY. 2 | * 3 | * This class was automatically generated by the 4 | * aapt tool from the resource data it found. It 5 | * should not be modified by hand. 6 | */ 7 | 8 | package com.example.myfirstapp; 9 | 10 | public final class R { 11 | public static final class attr { 12 | } 13 | public static final class dimen { 14 | /** Default screen margins, per the Android Design guidelines. 15 | 16 | Customize dimensions originally defined in res/values/dimens.xml (such as 17 | screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here. 18 | 19 | */ 20 | public static final int activity_horizontal_margin=0x7f040000; 21 | public static final int activity_vertical_margin=0x7f040001; 22 | } 23 | public static final class drawable { 24 | public static final int ic_launcher=0x7f020000; 25 | } 26 | public static final class id { 27 | public static final int action_settings=0x7f080001; 28 | public static final int edit_message=0x7f080000; 29 | } 30 | public static final class layout { 31 | public static final int activity_display_message=0x7f030000; 32 | public static final int activity_main=0x7f030001; 33 | } 34 | public static final class menu { 35 | public static final int display_message=0x7f070000; 36 | public static final int main=0x7f070001; 37 | } 38 | public static final class string { 39 | public static final int action_settings=0x7f050001; 40 | public static final int app_name=0x7f050000; 41 | public static final int button_send=0x7f050003; 42 | public static final int edit_message=0x7f050002; 43 | public static final int hello_world=0x7f050006; 44 | public static final int title_activity_display_message=0x7f050005; 45 | public static final int title_activity_main=0x7f050004; 46 | } 47 | public static final class style { 48 | /** 49 | Base application theme, dependent on API level. This theme is replaced 50 | by AppBaseTheme from res/values-vXX/styles.xml on newer devices. 51 | 52 | 53 | Theme customizations available in newer API levels can go in 54 | res/values-vXX/styles.xml, while customizations related to 55 | backward-compatibility can go here. 56 | 57 | 58 | Base application theme for API 11+. This theme completely replaces 59 | AppBaseTheme from res/values/styles.xml on API 11+ devices. 60 | 61 | API 11 theme customizations can go here. 62 | 63 | Base application theme for API 14+. This theme completely replaces 64 | AppBaseTheme from BOTH res/values/styles.xml and 65 | res/values-v11/styles.xml on API 14+ devices. 66 | 67 | API 14 theme customizations can go here. 68 | */ 69 | public static final int AppBaseTheme=0x7f060000; 70 | /** Application theme. 71 | All customizations that are NOT specific to a particular API-level can go here. 72 | */ 73 | public static final int AppTheme=0x7f060001; 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kapilkchaurasia/Behavior-Based-Malware-Detection-System-for-Android/3b097ae032ba7a703c0b0f56f9322c1b9c6c261c/ic_launcher-web.png -------------------------------------------------------------------------------- /libs/android-support-v4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kapilkchaurasia/Behavior-Based-Malware-Detection-System-for-Android/3b097ae032ba7a703c0b0f56f9322c1b9c6c261c/libs/android-support-v4.jar -------------------------------------------------------------------------------- /lint.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /proguard-project.txt: -------------------------------------------------------------------------------- 1 | # To enable ProGuard in your project, edit project.properties 2 | # to define the proguard.config property as described in that file. 3 | # 4 | # Add project specific ProGuard rules here. 5 | # By default, the flags in this file are appended to flags specified 6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt 7 | # You can edit the include path and order by changing the ProGuard 8 | # include property in project.properties. 9 | # 10 | # For more details, see 11 | # http://developer.android.com/guide/developing/tools/proguard.html 12 | 13 | # Add any project specific keep options here: 14 | 15 | # If your project uses WebView with JS, uncomment the following 16 | # and specify the fully qualified class name to the JavaScript interface 17 | # class: 18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 19 | # public *; 20 | #} 21 | -------------------------------------------------------------------------------- /project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | 13 | # Project target. 14 | target=android-19 15 | -------------------------------------------------------------------------------- /res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kapilkchaurasia/Behavior-Based-Malware-Detection-System-for-Android/3b097ae032ba7a703c0b0f56f9322c1b9c6c261c/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kapilkchaurasia/Behavior-Based-Malware-Detection-System-for-Android/3b097ae032ba7a703c0b0f56f9322c1b9c6c261c/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kapilkchaurasia/Behavior-Based-Malware-Detection-System-for-Android/3b097ae032ba7a703c0b0f56f9322c1b9c6c261c/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kapilkchaurasia/Behavior-Based-Malware-Detection-System-for-Android/3b097ae032ba7a703c0b0f56f9322c1b9c6c261c/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/layout/activity_display_message.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 11 | 12 | 18 |