Coder Social home page Coder Social logo

korovamilk / adb-join-wifi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from laddie132/adb-join-wifi

0.0 1.0 0.0 14.73 MB

Add 802.1x support, static ip and remove actions

License: BSD 3-Clause "New" or "Revised" License

Java 96.47% Makefile 3.53%

adb-join-wifi's Introduction

adb-join-wifi

A simple app for making it possible to join a certain wifi access point from ADB without requiring a rooted device. Also supports modifying proxy settings.

Build the app, either by importing the project into Android Studio or by using the following command (make sure you have set the ANDROID_HOME environment variable if you choose the latter):

./gradlew assembleDebug

Alternatively you can also just download the latest release:

wget https://github.com/steinwurf/adb-join-wifi/releases/download/1.0.1/adb-join-wifi.apk

install the app:

adb install app/build/outputs/apk/debug/app-debug.apk

Use the Activity Manager (am) to start the application with the appropriate parameters:

To join a wifi network with no password:

adb shell am start -n com.steinwurf.adbjoinwifi/.MainActivity
     --esn connect -e ssid SSID

To join a password protected wifi network:

adb shell am start -n com.steinwurf.adbjoinwifi/.MainActivity \
    --esn connect -e ssid SSID -e password_type WEP|WPA -e password PASSWORD

To join a 802.1x protected wifi network:

adb shell am start -n com.steinwurf.adbjoinwifi/.MainActivity \
    --esn connect -e ssid SSID -e password_type PEAP -e username USERNAME -e password PASSWORD

To join a wifi network and set a static ip address:

adb shell am start -n com.steinwurf.adbjoinwifi/.MainActivity \
    --esn connect -e ssid SSID -e password_type WEP|WPA|PEAP [-e username USERNAME] -e password PASSWORD \
    -e ip IP -e gateway GATEWAY --ei prefix PREFIX -e dns1 DNS1 -e dns2 DNS2

To join a wifi network and set a static proxy (with optional bypass list):

adb shell am start -n com.steinwurf.adbjoinwifi/.MainActivity \
    --esn connect -e ssid SSID -e password_type WEP|WPA -e password PASSWORD \
    -e proxy_host HOSTNAME -e proxy_port PORT [-e proxy_bypass COMMA,SEPARATED,LIST]

To join a wifi network and set a proxy auto-configuration URL:

adb shell am start -n com.steinwurf.adbjoinwifi/.MainActivity \
    --esn connect -e ssid SSID -e password_type WEP|WPA -e password PASSWORD \
    -e proxy_pac_uri http://my.pac/url

To clear proxy settings, simply join the same network again and do not pass proxy arguments.

To remove a wifi network:

adb shell am start -n com.steinwurf.adbjoinwifi/.MainActivity \
    --esn remove -e ssid SSID

To remove all wifi network:

adb shell am start -n com.steinwurf.adbjoinwifi/.MainActivity \
    --esn remove

Note that android apps are not allowed to change the wifi configuration if it was created by another app (for example -- by the user in the Settings app). For this reason, if you try to use this app to join/modify an existing wifi network, this app will not modify it and will join it as-configured.

To get around this for testing purposes and modify any wifi configuration, you can grant this app device owner privileges:

adb shell dpm set-device-owner "com.steinwurf.adbjoinwifi/.AdminReceiver"

This requires that your device has no provisioned accounts on it. If you wish to demote this app and remove its device owner privileges, run this:

adb shell am start -n com.steinwurf.adbjoinwifi/.MainActivity --esn clear_device_admin

adb-join-wifi is available under the BSD license.

adb-join-wifi's People

Contributors

jpihl avatar justfortherec avatar korovamilk avatar laddie132 avatar liuyq avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.