Useful Terminal Commands

Discussion in 'Android Tablet Hacking' started by OffWorld, Nov 6, 2010.

  1. OffWorld

    OffWorld Senior Member

    Oct 5, 2010
    Likes Received:
    Trophy Points:
    Minnesota, USA
    Tablet / Device:
    Haipad M701-R, Augen Gentouch 78 (returned it)
    If you're familiar with Linux you might think you can just use Linux commands on an Android device, but even on a rooted tablet you quickly discover a LOT of the commands you wouldn't think twice about entering on Linux don't work on Android, or the commands are there but flags and parameters you'd assume you can use aren't recognized. Why? Because they didn't include a lot of the little "helper" programs that usually ship with Linux. Thankfully they do ship some of them, though many are simplified versions. Here is my list of useful commands to enter in a Terminal on the tablet (or via adb shell), some of them may require root though, I'm not sure. Feel free to add your own favorites to this thread!


    Shows the storage space in kilobytes (it doesn't appear df as implemented on Android accepts the -H flag so you're stuck with kilobytes). Pay particular attention to the /sdcard and /nand as those are where users can store files. If you add up all the the numbers (except /sdcard) you'll find out how much total built-in storage you actually have on your tablet. For example, my tablet shows /nand is 1422144 K but if I add up all the internal storage it totals 1992976 K (or 1.9 GB).


    #cat /proc/meminfo
    "MemTotal" = physical memory minus whatever is being shared with devices (such as the radio, DMA buffers, etc), so it will always be less than the advertised RAM for your tablet.

    "MemFree" = whatever is not being used at all. This number will vary depending on what apps and services are running.

    "Cached" = typically around 20 MB, that's just how it is.

    "SwapCached" = will always read zero. Android doesn't actually use this apparently.

    Note: I couldn't get any of the usual Linux methods to find the actual physical RAM amount to work.


    #cat /proc/filesystems
    Will show you what file system support was rolled into the kernel. So if you connect a drive that is formatted in something odd you can see if it's even possible for your tablet to read it.


    #cat /proc/modules
    Shows you a list of the modules baked into the kernel. If you can't get your tablet to recognize something this may help you determine if it is even supported.


    #cat /proc/version
    Will show you the Linux kernel version (not particularly useful), but the number after the "#" sign will be the firmware build and it will also show you the full date of the build (useful since some firmware is referred to by the date rather than the build number).


    Gives you a major info-dump on your tablet. Sorting through it (if you know how to read it) will be info on memory, networking, and of particular interest to some people the MAC address of the tablet.

Share This Page

Search tags for this page
android kernel commands
android terminal commands and hacks
Android Terminal Commands List

android terminal emulator tricks

android terminal hack commands
android terminal tricks

terminal emulator hack codes

terminal emulator hack commands
terminal emulator hacking commands
terminal emulator tricks