Blog Archives

Finding shell command options and memory usage

Filesystem disk space usage

  • adb shell df

 

For a list of all the available shell programs, use the following command:

  • adb shell ls /system/bin
Which returned:

  • adb shell ls /system/bin
    • abcc
    • adb
    • am
    • app_process
    • applypatch
    • atrace
    • bmgr
    • bootanimation
    • btmacreader
    • bu
    • bugmailer.sh
    • bugreport
    • cat
    • chmod
    • chown
    • cmp
    • content
    • cp
    • dalvikvm
    • date
    • dbus-daemon
    • dd
    • debuggerd
    • dexopt
    • df
    • dhcpcd
    • dmesg
    • dnsmasq
    • drmserver
    • du
    • dumpstate
    • dumpsys
    • fsck_msdos
    • getevent
    • getprop
    • glgps
    • grep
    • gzip
    • hd
    • hostapd
    • id
    • ifconfig
    • iftop
    • ime
    • input
    • insmod
    • installd
    • ioctl
    • ionice
    • ip
    • ip6tables
    • iptables
    • keystore
    • kill
    • linker
    • ln
    • log
    • logcat
    • logwrapper
    • ls
    • lsmod
    • lsof
    • make_ext4fs
    • md5
    • mdnsd
    • mediaserver
    • mkdir
    • mksh
    • monkey
    • mount
    • mtpd
    • mv
    • nandread
    • ndc
    • netcfg
    • netd
    • netstat
    • newfs_msdos
    • notify
    • ping
    • pm
    • pppd
    • printenv
    • ps
    • racoon
    • reboot
    • renice
    • requestsync
    • rm
    • rmdir
    • rmmod
    • route
    • run-as
    • schedtest
    • schedtop
    • screencap
    • screenshot
    • sdcard
    • send_bug
    • sendevent
    • sensors-config
    • sensorservice
    • service
    • servicemanager
    • setconsole
    • setprop
    • settings
    • setup_fs
    • sh
    • sleep
    • smd
    • start
    • stop
    • surfaceflinger
    • svc
    • sync
    • system_server
    • tc
    • tf_daemon
    • toolbox
    • top
    • touch
    • uiautomator
    • umount
    • uptime
    • vdc
    • vmstat
    • vold
    • watchprops
    • wipe
    • wpa_supplicant

 

Running a test script

Apparently monkeyrunner is brain dead if you run it like this:

monkeyrunner test.py

It will fail with the error:

Can’t open specified script file
Usage: monkeyrunner [options] SCRIPT_FILE

-s      MonkeyServer IP Address.
-p      MonkeyServer TCP Port.
-v      MonkeyServer Logging level (ALL, FINEST, FINER, FINE, CONFIG, INFO, WARNING, SEVERE, OFF)

This is due to monkeyrunner looking for the script where monkeyrunner is located not where you running it from. So instead of looking for my test.py file in C:0001101\Android> it looks for it where monkeyrunner is in C:\Program Files (x86)\Android\android-sdk\tools

To fix this include the path with the script (lame)

monkeyrunner C:001101\Android\test.py

Then it will run (though my script doesn’t really work yet)

Update: It looks like my basic script worked, “worked” meaning it launched the app, which is the only thing it does at the moment, and I am running this in the emulator.