android.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Tue, 10 Jun 2014 13:02:03 +0300
changeset 1588 68bf5ec32341
parent 1582 1551e7edcfa0
child 1592 5ebe526dd687
permissions -rw-r--r--
Set transparensy.


==========
 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::

  $ 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

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"