2016-04-21

Andriod one two three

1. Capture screenshot through shell command.
    # screencap -p /sdcard/screen.png

2. am [Activity Manager]
    ==> Active default browser and go to "google" directly.
    # am start -a android.intent.action.VIEW -d http://www.google.com

    ==> Active Gallery3d to play movie file.
    # am start -n com.android.gallery3d/.app.MovieActivity -d file:////sdcard/Movies//movie.ts

    ==> Open a JPEG file.
    # am start -a android.intent.action.VIEW -d file:////data/worktmp//taiwan.jpg -t image/jpeg

    ==> Play a MP3 file.
    # am start -a android.intent.action.VIEW -d file:///data/worktmp/1kTone.mp3 -t audio/mp3

3. Shutdown
    # reboot -p
                  -p: power off
    # busybox poweroff
    # am start -a android.intent.action.ACTION_REQUEST_SHUTDOWN --ez KEY_CONFIRM true --activity-clear-task

4. Reset to factory default.
    # am broadcast -a android.intent.action.MASTER_CLEAR