GithubHelp home page GithubHelp logo

thyrlian / captain-adb Goto Github PK

View Code? Open in Web Editor NEW
51.0 51.0 7.0 888 KB

Providing simple web API and view for Android Debug Bridge (adb). Free your imagination, use it as the way you want.

License: MIT License

Ruby 42.70% CSS 29.32% HTML 27.99%
adb android mobile server

captain-adb's Introduction

Hits

你好 (nǐ hǎo) 👋

i.name = "Jing Li"
  • speak 🇨🇳 🇺🇸 🇩🇪
  • live in Berlin
  • come from Sichuan - hometown of 🐼, is renowned for its 🌶️🌶️🌶️ cuisine
  • play 🏀
  • Top GitHub developer 🥇
    • Top 20 Java dev in Berlin
    • Top 50 Docker dev worldwide

My GitHub Ranking

My GitHub Stats

captain-adb's People

Contributors

falkorichter avatar thyrlian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

captain-adb's Issues

Please add a license

This repo is missing a license. Without a license, all code is copyright the author and may not be used by anyone else.

Please use something like http://choosealicense.com/ to decide what license to use. I recommend MIT or GPL.

To-Do List

  • adb logcat
  • adb shell am broadcast
  • adb shell screenrecord [path_on_your_device]/[filename].mp4 # allow -bit-rate param # support convert to webm???

http://developer.android.com/tools/help/shell.html#screenrecord
adb shell screenrecord /sdcard/demo.mp4
adb pull /sdcard/demo.mp4

  • cpdir
def cpdir(remote_dir, local_dir)
  remote_dir = File.join(remote_dir, "")
  local_dir = File.join(local_dir, "")
  files = `adb shell ls #{remote_dir}`.split("\r\n")
  files.each do |f|
    `adb pull #{remote_dir}#{f} #{local_dir}/#{f};`
  end
end

Random Crap

==================================================

Default 5xx

choose a device -> then routing becomes /device/xxx
session value use selected device
(but how to handle error when device is removed/unplugged?)

reset button for chose package

adb shell screenrecord /sdcard/demo.mp4
adb pull /sdcard/demo.mp4

adb -s 192.168.56.102:5555 install app.apk

http://stackoverflow.com/questions/7789826/adb-shell-input-events
https://github.com/senzhk/ADBKeyBoard

usage: input ...
input text
input keyevent
input [touchscreen|touchpad|touchnavigation] tap
input [touchscreen|touchpad|touchnavigation] swipe [duration(ms)]
input trackball press
input trackball roll

Account management
http://www.slideshare.net/dpreussler/abgeschottete-realitt-mobile-testing-days-2014-berlin

disable select button if no radio (device) is checked
http://stackoverflow.com/questions/3196136/disable-browse-button-if-the-radio-button-isnt-selected

adb shell dumpsys meminfo <package.name>
dumpsys meminfo
dumpsys cpuinfo
dumpsys account
dumpsys activity
dumpsys window
dumpsys wifi

http://engineering.meetme.com/2014/04/android-debug-bridge-adb-command-scripting/

main.haml

  • specify package name
  • choose device (no need if only one; error message if none; give options if more)
  • disable actions (clear / uninstall) when no valid package / device is chosen

Knowledge Base
-s - directs command to the device or emulator with the given
serial number or qualifier. Overrides ANDROID_SERIAL
environment variable.
adb devices -l # human readable form
adb shell 'pm list packages -f' | sed -e 's/.=//' | grep 'ebay'
cat /data/system/packages.list | sed -e 's/.
///' | grep 'ebay'
adb shell screencap -p | ruby -EBINARY -pe '$_.gsub!(/\r\n/, "\n")' > ~/Desktop/screenshot.png
adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > ~/Desktop/screenshot.png

adb shell screenrecord /sdcard/movie.mp4
(Press Ctrl-C to stop)
adb pull /sdcard/movie.mp4
http://developer.android.com/tools/help/adb.html#screenrecord
http://stackoverflow.com/questions/5382212/capture-video-of-androids-screen

ddmlib: Library providing APIs to talk to Android devices
http://mvnrepository.com/artifact/com.android.tools.ddms/ddmlib/23.1.0

adb backup app
adb wifi

adb uninstall com.xxx.abc
1> x.log
2> x.log
echo $?

adb -s BH902VWU16 shell 'which sh; echo $?'
/system/bin/sh: which: not found
127

adb shell sqlite3
/data/data/com.android.providers.telephony/databases/telephony.db
"update carriers set proxy=''xxx', port='xx' where id=xxx "

Unit Tests:

list_devices

  • daemon not running. starting it now on port 5037 *
  • daemon started successfully *

List of devices attached
BH902VWU16 device
192.168.56.101:5555 device

Style:
.clickable {
cursor: pointer;
}

http://www.codeceo.com/article/android-adb-shell.html

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.