Display Android process' CPU usage on graph in the browser.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore Beta version. Mar 10, 2013
ajax.php
corechart.js
cpu-tool.sh
favicon.ico Beta version. Mar 10, 2013
index.php
jquery.min.js Beta version. Mar 10, 2013
jsapi.js Beta version. Mar 10, 2013
loading.gif
loading2.gif Beta version. Mar 10, 2013
main.css
main.js
no-browser.sh
readme.md
sample.txt
sample2.txt
table.css
tooltip.css
utils.php

readme.md

Requirements:

Install (example):

mkdir ~/bin &>/dev/null cd ~/bin git clone git://github.com/parhuzamos/android-tools-cpu.git

Launch:

If you have Google Chrome: (It's automatically launched and when closed the program finishes.)

cd ~/bin/android-tools-cpu ./cpu-tool.sh

If you use some other browser: (No browser is opened and you have to manually exit the program.)

cd ~/bin/android-tools-cpu ./no-browser.sh

and navigate to http://localhost:8083/

Todo:

  • true multi device support (start, stop)
  • don't let adb run forever (use -n x switch and restart it periodically)
  • tweak description to include keywords like android, cpu, usage, stat, graph, process, ...
  • optimize the code
  • handle disconnected device, don't try to wait for it
  • check for PHP 5.4
  • PHP error logging to file
  • loading indicator for "Update device list"
  • message if no device present
  • handle adb execution errors
  • support other browsers
  • start without browser
  • check ANDROID_HOME and show error on the UI
  • heartbeat ui for examined devices
  • allow devices to be named (simple question box and write a file on the sdcard)

For debugging:

while (true); do; clear; ps aux | grep -i "%CPU|php|adb" | grep -v grep; sleep 1; done; curl "http://localhost:8089/ajax.php?device=SH0BVRX02061&op=data" tail -f error_log