G1VGA


    Два юриста в кафе достали бутерброды.
    -- Извините, у нас нельзя есть свою еду.
    Юристы переглянулись, пожали плечами и
    обменялись бутербродами.
    http://www.nextjoke.net/Joke/7184

Знакомство c Android-x86
========================

1. СОЗДАНИЕ ВИРТУАЛЬНОЙ МАШИНЫ
------------------------------

Установить с диска android-x86-2.2-generic.iso

  -- FreeBSD, 32-bit, SATA HD 4GB, RAM 1GB
      SDA1 Full disk size
  -- Format SDA1 as EXT3
  -- Create fake SDCard

Hot Keys *1

    ESC               = Back one screen
    WIN               = Back to Home
    Right Ctrl        = Release Mouse
    Right Click Mouse = Back Key
    Press Mouse Wheel = Access "Settings" from HOME screen
    Home              = Home Button
    Alt-F1            = Enter terminal
    Alt-F7            = Enter GUI
    Menu key          = Android Bottom menu
    Alt-F4            = Power off

Check IP:

  ifconfig eth0

or

  netcfg

connect to NAT Network, Virtualbox

  File -> Preferences -> Network -> NAT Networks -> Add


2. ADB ON UBUNTU TRUSTY 14.04 LTS
---------------------------------

View available devices:

  adb devices

Connect to Android device:

  adb connect <IP-addr>

To copy a file from the computer to an android device connected via usb:

  adb push /path/to/local/file /mnt/sdcard/path/to/file

Directories can be created on the device via the shell:

  adb shell

and using the usual shell commands to navigate around and create directories.


3. UBUNTU TRUSTY WITH ADB *2
----------------------------

  # apt-get install software-properties-common python-software-properties *3
  # add-apt-repository ppa:phablet-team/tools && sudo apt-get update
  # apt-get update
  # apt-get install android-tools-adb android-tools-fastboot


4. BUILDING WILY WEREWOLF GNOME WITH ANDROID STUDIO
   (UBUNTU GNOME DESKTOP 15.10 x64) *4
---------------------------------------------------

  General:  Basic:       Name: WilyGnome
                         Type: Linux
                         Version: Ubuntu (64 bit)
            Advanced:    Shared Clipboard: Bidirectional

  System:   Base Memory: 2048 MB

  Storage:  WilyGnome-15GB.vdi

  Network:  Adapter 1. NAT
            Port Forwarding: Rule 1
            Host IP: 127.0.0.1 Host Port: 22 Guest IP: 10.0.2.15 Guest Port: 22

  wget -c http://cdimage.ubuntu.com/ubuntu-gnome/releases/15.10
               /release/ubuntu-gnome-15.10-desktop-amd64.iso

  # apt-get install openssh-server
  # apt-get install gcc make wget mingetty adduser build-essential libtool gdb elinks vim mc

To install Android Studio on Ubuntu:

  - Add the Ubuntu Make ppa:
  $ sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make
  $ sudo apt-get update

  - Install Ubuntu Make:
  $ sudo apt-get install ubuntu-make

  - Install android-studio:
  $ umake android

Choose installation path (default):

  /home/virtu/.local/share/umake/android/android-studio

Once finished, it will also install Java 7 (1.7.0_85 currently) on your system.
To install Oracle JDK8:

  sudo apt-add-repository ppa:webupd8team/java
  sudo apt-get update
  sudo apt-get install oracle-java8-installer


Connect to NAT Network, Virtualbox
----------------------------------

  File -> Preferences -> Network -> NAT Networks -> Add

Example: Install modified app to Android VM
-------------------------------------------

1. Clone Eclipse project using git:

  cd ~
  sudo apt-get install git
  git clone https://github.com/mefernandez/android-snake-example

2. Import project into Android Studio. tip: Set some empty directory as Eclipse Workspace (~/Music was used)

3. Build project, Build debug apk

4. Install x-debug-unaligned.apk via

  adb connect 10.0.2.X
  adb install x-debug-unaligned.apk

5. Test installed app on Android.

LINKS
-----

*1) https://software.intel.com/en-us/blogs/2011/10/11
      /getting-started-on-android-for-x86-step-by-step-guide-
      on-setting-up-android-2223-for-x86-testing-environment-
      in-oracle-virtualbox

*2) http://lifehacker.com
    /the-easiest-way-to-install-androids-adb-and-fastboot-to-1586992378

*3) http://lifeonubuntu.com/ubuntu-missing-add-apt-repository-command/

*4) http://android-er.blogspot.com.ee/2015/10
       /install-android-studio-on-64-bit-ubuntu_24.html

More links
----------

  http://www.mat-d.com/site
       /developing-android-apps-with-android-x86-and-virtual-box/
  https://www.suse.com/communities/blog/making-sense-hexdump/
  https://www.youtube.com/watch?v=nYi9Kwrou7I
  http://forum.xda-developers.com/showthread.php?t=2317790
  http://www.sysprobs.com/install-jelly-bean-android-4-3-on-windows-8-with-virtualbox
  http://examples.javacodegeeks.com/android/core
       /build-android-application-package-file-apk-using-eclipse-ide/
  http://dolbodub.blogspot.com.ee/2014/04/android-studio-apk.html
  JDK on Trusty Tahr:
    https://www.youtube.com/watch?v=Yz2l-4GDpZE 3:44
  Android Studio on Trusty Tahr:
    https://www.youtube.com/watch?v=qfinKxwYYZs 7:25
