android.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Sun, 05 Oct 2014 13:49:38 +0300
changeset 1613 68ee05d0c494
parent 1592 5ebe526dd687
child 1669 12f6f6b95b7c
permissions -rw-r--r--
Mupen64Plus.


==========
 Android.
==========
.. contents::

Official docs.
==============

  http://developer.android.com/sdk/index.html
    Get the Android SDK
  http://developer.android.com/guide/index.html
    Introduction to Android
  https://android.googlesource.com/platform/system/core/+/master/init/readme.txt
    init.rd file syntax.

Show screencast from Android.
=============================

  http://droid-at-screen.ribomation.com/
                Easily show the screen of an Android device on a computer/laptop
                (PC, Mac, Linux, ...) and then project the desktop using a
                LCD-projector.

Controlling Android from PC.
============================

 * http://code.google.com/p/androidscreencast/
 * http://code.google.com/p/android-screen-monitor/
 * http://androidwebkey.com/

Mods.
=====

  http://xda-university.com/
    How to mod.
  http://www.cyanogenmod.org/about
    CyanogenMod
  https://www.clockworkmod.com/
    ClockworkMod

Recovery.
=========

To enter phone to recovery mode press ``VolumeDown``+``Power`` button or::

  adb reboot recovery

See:

  http://teamw.in/project/twrp2
    Custom recovery built.

ADB tips.
=========

List available devices::

  $ adb devices

Install application from ``.apk`` file::

  $ adb install -r /path/to/application.apk

List installed package names (with path to ``.apk`` files!)::

  $ adb shell 'pm list packages -f'

Uninstall application by it name::

  $ adb uninstall PACKAGE_NAME

List currently run activities::

  $ adb shell 'dumpsys activity'

Find activities from package::

  $ adb shell 'pm list packages -f'
  $ adb pull APK_FROM_LIST
  $ aapt dump badging APK_FILE

Start an activity::

  $ adb shell am start PACKAGE_NAME/ACTIVITY_IN_PACKAGE
  $ adb shell am start PACKAGE_NAME/FULLY_QUALIFIED_ACTIVITY

List of running processes::

  $ adb shell ps

or (supported arguments
``user,group,comm,args,pid,ppid,pgid,etime,nice,rgroup,ruser,time,tty,vsz,stat,rss``)::

  $ adb shell
  % ps -o pid,user,group,rss,vsz,args

To kill process::

  $ adb shell ps | grep $REGEX
  $ adb shell kill $PID

Take a screenshort::

  $ adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > screen.png

Power button::

  $ adb shell input keyevent 26

Unlock screen::

  $ adb shell input keyevent 82

Show system log::

  $ adb logcat
  $ adb logcat "*:W"