Last active
December 14, 2015 08:59
-
-
Save positlabs/5061437 to your computer and use it in GitHub Desktop.
Starts an Android Debug Bridge server and opens a web page with a list of debuggable pages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# @author - positlabs | |
# @github - https://github.com/positlabs/ | |
# @blog - http://pixel-fiend.positlabs.com/ | |
# | |
# Debugger for Android running Chrome. | |
# | |
# First, set up your device and computer to work with adb: http://developer.android.com/tools/help/adb.html | |
# | |
# @note - to stop the server, call adb kill-server | |
# @note - if you get "error: device not found," try a different port number, or restart your device. You can check device connection status with Android File Transfer | |
import webbrowser | |
import os | |
portnumber = 1337; | |
#this thing fails the first time, every time. Killing and restarting the server fixes it. | |
os.system("adb forward tcp:1337 localabstract:chrome_devtools_remote") | |
os.system("adb kill-server") | |
os.system("adb forward tcp:1337 localabstract:chrome_devtools_remote") | |
webbrowser.open("http://localhost:" + str(portnumber)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment