From 4bb4f7cd0048c5315163f9efe060b41897435207 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 3 May 2013 00:52:32 +0300 Subject: [PATCH] wpadebug: Add a Wi-Fi debugging app for Android This tool can be used to debug Wi-Fi functionality on Android both through the Android framework and through direct access to wpa_supplicant. Signed-hostap: Jouni Malinen --- wpadebug/AndroidManifest.xml | 28 +++ wpadebug/README | 56 ++++++ wpadebug/build.xml | 17 ++ wpadebug/project.properties | 2 + wpadebug/res/layout/main.xml | 142 ++++++++++++++ .../fi/wpadebug/DisplayMessageActivity.java | 88 +++++++++ wpadebug/src/w1/fi/wpadebug/MainActivity.java | 183 ++++++++++++++++++ 7 files changed, 516 insertions(+) create mode 100644 wpadebug/AndroidManifest.xml create mode 100644 wpadebug/README create mode 100644 wpadebug/build.xml create mode 100644 wpadebug/project.properties create mode 100644 wpadebug/res/layout/main.xml create mode 100644 wpadebug/src/w1/fi/wpadebug/DisplayMessageActivity.java create mode 100644 wpadebug/src/w1/fi/wpadebug/MainActivity.java diff --git a/wpadebug/AndroidManifest.xml b/wpadebug/AndroidManifest.xml new file mode 100644 index 000000000..95ac7267d --- /dev/null +++ b/wpadebug/AndroidManifest.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/wpadebug/README b/wpadebug/README new file mode 100644 index 000000000..73ebdf32f --- /dev/null +++ b/wpadebug/README @@ -0,0 +1,56 @@ +wpadebug - wpa_supplicant and Wi-Fi debugging app for Android +Copyright (c) 2013, Jouni Malinen and contributors +All Rights Reserved. + +This program is licensed under the BSD license (the one with +advertisement clause removed). See the top level README for detailed +license text. + +If you are submitting changes to the project, please see CONTRIBUTIONS +file for more instructions. + + +NOTE! This Android app is for debugging and testing purposes only. It is +not supposed to be installed on a production use device and doing so may +result in complete loss of security protections on the device. + + + +Build +----- + +- Install Android SDK and build tools +- update project target if desired; for example: + android list targets + android update project --target 1 --path $PWD +- run: ant debug + + +Installation (with adb over USB) +------------ + +adb install bin/wpadebug-debug.apk + +NOTE: Following steps enable any app on the system to get root access! +This is not suitable for any production use. This is needed for direct +wpa_supplicant access and some networking operating in general. You can +still use rest of the wpadebug app without doing this, but those +functions will not work unless this step part of installation is +done. It should be obvious that these steps require a rooted device. In +addition, if you do not understand what the following commands do, +please do not run them. + +adb root +adb remount +adb shell chmod 6755 /system/bin/mksh-su + + + +Uninstallation +-------------- + +adb root +adb remount +adb shell rm /system/bin/mksh-su + +adb uninstall w1.fi.wpadebug diff --git a/wpadebug/build.xml b/wpadebug/build.xml new file mode 100644 index 000000000..5301e69bc --- /dev/null +++ b/wpadebug/build.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + diff --git a/wpadebug/project.properties b/wpadebug/project.properties new file mode 100644 index 000000000..7c6ac0528 --- /dev/null +++ b/wpadebug/project.properties @@ -0,0 +1,2 @@ +# Project target. +target=android-17 diff --git a/wpadebug/res/layout/main.xml b/wpadebug/res/layout/main.xml new file mode 100644 index 000000000..890d60a79 --- /dev/null +++ b/wpadebug/res/layout/main.xml @@ -0,0 +1,142 @@ + + + + +