source: android/README.txt @ 7e84451

Last change on this file since 7e84451 was 7e84451, checked in by zzz <zzz@…>, 9 years ago

Android:

  • Import the main_rules file and remove the copied rules
  • Set the version code and name in the apk badging
  • Build target is 8 to allow SD install, MIN-SDK is still 3
  • Fix NPE on new install
  • Remove some debug code from NBigI
  • Property mode set to 100644
File size: 2.1 KB
RevLine 
[6bb4403]1These instructions are for a recent Android SDK (1.6 or later)..
2Should also still work with a 1.5 SDK.
[2e5caac]3The build file is not compatible with the 1.1 SDK any more.
[d7de8ae]4These instructions were last updated for SDK Tools Version 11 with
5SDK Platform-tools Version 5, June 2011.
[2e5caac]6
[6bb4403]7#Download the SDK from http://developer.android.com/sdk/index.html
[14ce5a2]8#Unzip the android SDK in ../../
[6bb4403]9#So then the android tools will be in ../../android-sdk-linux_86/tools/
10#
[d7de8ae]11# Run the GUI updater, which you must do to get an SDK Platform:
12../../android-sdk-linux_86/tools/android &
13
[6bb4403]14# now go to the available packages tab, check the box and click refresh,
15# and download an SDK Platform
16# Since I2P is configured to run on 1.1 or higher
17# (API 2) download that one. Otherwise you must change the
18# target in default.properties from android-2 to andriod-x
19# where x is the API version.
[14ce5a2]20
[d7de8ae]21# To run the debugger (ddms) you also need to download the
22# "Android SDK Platform-Tools" package from the GUI updater.
23
24# create a file local.properties with the following line (without the leading # of course):
25# sdk.dir=/path/to/your/android-sdk-linux_86
26# The old property was sdk-location=/path/to/your/android-sdk-linux_86
27# but it changed in more recent tools.
[a0b4b7db]28
[d7de8ae]29# DO NOT create a new project or anything. It's all set up right here for you.
[2e5caac]30
[173343e]31# Create the android 1.5 (API 3) virtual device
[2e5caac]32# (don't make a custom hardware profile)
[6bb4403]33# A AVD created with the 1.5 SDK will not work with the newer tools
[173343e]34../../android-sdk-linux_86/tools/android create avd --name i2p --target 3
[14ce5a2]35
36#then run the emulator:
[6bb4403]37../../android-sdk-linux_86/tools/emulator -avd i2p &
[14ce5a2]38
[7e84451]39# or to talk to a real phone in debug mode:
40adb kill-server
41sudo adb start-server
42adb devices
43
[14ce5a2]44#then wait a couple minutes until the emulator is up
[173343e]45#then install the I2P app
[14ce5a2]46ant install
47
48#then run the debugger
[6bb4403]49../../android-sdk-linux_86/tools/ddms &
[14ce5a2]50
[7e84451]51#to rebuild and reinstall to emulator or phone:
[14ce5a2]52ant reinstall
[fe15db5]53
54# Now click on the I2P icon on your phone!
[173343e]55
56#other helpful commands
[885d549]57../../android-sdk-linux_86/platform-tools/adb shell
58../../android-sdk-linux_86/platform-tools/adb pull /some/file/on/emulator some-local-dir/
Note: See TracBrowser for help on using the repository browser.