android create project --target 1 \
--name some_name --path some-path \
--activity MyActivity --package com.some.name
To start the emulator named "zorg" run:
emulator -avd zorg -no-boot-anim -scale 0.65 -show-kernel
If you change some emulator hardware settings, then cannot use an existing snapshot. To load the emulator append -no-snapshot-load
to the previous command.
To load the emulator manager run the Android Virtual Devices:
android avd
To build a debug version use:
ant debug
To install the generated apk, run:
adb install bin/MyFirstApp-debug.apk
or using ant:
ant installd
You can also build + install in one command using:
ant debug install
If you want to install the application on the emulator but in the SD card use:
adb -e install -s filename.apk
Using the -d
options does the same but on a real device:
adb -d install -s filename.apk
To launch the Dalvik Debug Monitor run:
ddms
- To access the host computer IP you need to use the
10.0.2.2
address. - To use your physical keyboard with the emulator you need to add and enable the keyboard hardware on the emulator settings
Android can import .p12 files, which consists of a root certificate, the client certificate and a client key. Use the following command:
openssl pkcs12 -export -in phone.crt \
-inkey phone.key -certfile ca.crt \
-name "Phone VPN" -out phone.p12
fastboot devices
fastboot flash recovery <img file>
fastboot reboot