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

 

Advertisements

Get a file listing from the Android Device (sdcard)

You can push or pull files from the device, but to get a file listing just shell to the device (for me I needed a listing of what I had pushed to the sdcard, since it has been a while since I worked with a particular device)

adb shell <enter>

prompt changes to $

cd sdcard <enter>

then ls <enter>

results:

ls
LOST.DIR
Android
DCIM
download
media
upload_avatar.jpg
login_5304301725.txt
testMonkey.txt

To nuke (delete/remove) a file rm <filename>

Note:

Tab completion doesn’t work (at least on my windows machine with just the Android SDK installed)

And there is confirmation when you hit enter the file is gone

Then you can get out of the shell by typing exit