Thomas Martitz | 240923a | 2010-08-02 20:34:47 +0000 | [diff] [blame] | 1 | This folder contains the java parts needed to build an Rockbox as an |
| 2 | application for android. |
| 3 | |
Thomas Martitz | e8542ef | 2010-08-05 12:15:30 +0000 | [diff] [blame] | 4 | * Prerequisites |
| 5 | |
Maurus Cuelenaere | ab9caea | 2010-11-06 17:32:52 +0000 | [diff] [blame] | 6 | Download and install the Android SDK[1] and NDK[2], or run installToolchain.sh. |
Thomas Martitz | 4e982d3 | 2010-09-02 03:40:02 +0000 | [diff] [blame] | 7 | After you extracted the SDK, you need to run <sdk-dir>/tools/android in order to |
| 8 | install the actual platform sdk from the available packages tab (SDK Platform |
| 9 | Android 1.5 or above should work). |
| 10 | In the virtual devices tab you can also setup a emulator. |
Thomas Martitz | e8542ef | 2010-08-05 12:15:30 +0000 | [diff] [blame] | 11 | |
| 12 | |
Thomas Martitz | 4e982d3 | 2010-09-02 03:40:02 +0000 | [diff] [blame] | 13 | Then, make sure you have the ANDROID_SDK_PATH and ANDROID_NDK_PATH (pointing to |
| 14 | the each's root directory) environment variables set up, otherwise configure will fail to find the compiler and |
| 15 | compiling the java files will fail. |
Thomas Martitz | e8542ef | 2010-08-05 12:15:30 +0000 | [diff] [blame] | 16 | |
Thomas Martitz | 240923a | 2010-08-02 20:34:47 +0000 | [diff] [blame] | 17 | * Build instructions |
| 18 | |
Björn Stenberg | a8ed339 | 2010-09-24 12:03:15 +0000 | [diff] [blame] | 19 | 1. Create a separate build folder. Do not build in this source directory. |
Thomas Martitz | 240923a | 2010-08-02 20:34:47 +0000 | [diff] [blame] | 20 | |
Dave Chapman | 8214006 | 2011-02-13 13:26:16 +0000 | [diff] [blame] | 21 | 2. Run "../tools/configure". Choose the "Android" target and input your |
| 22 | screen resolution. |
Thomas Martitz | 55d7036 | 2010-09-22 20:50:06 +0000 | [diff] [blame] | 23 | |
Björn Stenberg | a8ed339 | 2010-09-24 12:03:15 +0000 | [diff] [blame] | 24 | 3. Run "make" |
Thomas Martitz | 55d7036 | 2010-09-22 20:50:06 +0000 | [diff] [blame] | 25 | |
Björn Stenberg | a8ed339 | 2010-09-24 12:03:15 +0000 | [diff] [blame] | 26 | 4. Run "make zip". This has to be run the first time, and any time themes |
| 27 | or plugins have changed. Otherwise you may skip it. |
Thomas Martitz | 240923a | 2010-08-02 20:34:47 +0000 | [diff] [blame] | 28 | |
Björn Stenberg | a8ed339 | 2010-09-24 12:03:15 +0000 | [diff] [blame] | 29 | 5. Run "make apk" |
Thomas Martitz | 55d7036 | 2010-09-22 20:50:06 +0000 | [diff] [blame] | 30 | |
Björn Stenberg | a8ed339 | 2010-09-24 12:03:15 +0000 | [diff] [blame] | 31 | 6. Optional. Install on your target/emulator, using the following command: |
| 32 | "$ANDROID_SDK_PATH/tools/adb install -r rockbox.apk" |
Thomas Martitz | 240923a | 2010-08-02 20:34:47 +0000 | [diff] [blame] | 33 | |
| 34 | |
Thomas Martitz | e8542ef | 2010-08-05 12:15:30 +0000 | [diff] [blame] | 35 | [1]: http://developer.android.com/sdk/index.html |
| 36 | [2]: http://developer.android.com/sdk/ndk/index.html |
| 37 | [3]: http://asantoso.wordpress.com/2009/09/15/how-to-build-android-application-package-apk-from-the-command-line-using-the-sdk-tools-continuously-integrated-using-cruisecontrol/ |
| 38 | [4]: http://developer.android.com/sdk/installing.html |