diff options
author | Thomas Martitz <kugel@rockbox.org> | 2010-09-02 03:40:02 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2010-09-02 03:40:02 +0000 |
commit | 4e982d30a15f04ac841b9e9669fa2dab5eef900b (patch) | |
tree | 9eac804d7f9db9c622ddf285f139147be33178bf /android/README | |
parent | bd7af68ccde0065014f4faacb3f839825b79aa3c (diff) | |
download | rockbox-4e982d30a15f04ac841b9e9669fa2dab5eef900b.tar.gz rockbox-4e982d30a15f04ac841b9e9669fa2dab5eef900b.zip |
Extend android.make so that it can generate a debug signed apk.
'make && make apk && adb install -r bin/Rockbox.apk' should work now.
You should now be able to develop without eclipse.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27980 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'android/README')
-rw-r--r-- | android/README | 44 |
1 files changed, 23 insertions, 21 deletions
diff --git a/android/README b/android/README index c22ab604d1..04436b3c65 100644 --- a/android/README +++ b/android/README | |||
@@ -3,39 +3,41 @@ application for android. | |||
3 | 3 | ||
4 | * Prerequisites | 4 | * Prerequisites |
5 | 5 | ||
6 | Download and install the Android SDK[1] and NDK[2]. After you extracted the SDK, you need to run <sdk-dir>/tools/android in order to install the actual platform sdk from the available packages tab (SDK Platform Android 1.5 or above should work). In the virtual devices tab you can also setup a emulator. | 6 | Download and install the Android SDK[1] and NDK[2]. |
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. | ||
7 | 11 | ||
8 | 12 | ||
9 | Then, make sure you have the ANDROID_NDK_PATH (pointing to the NDK's root directory) environment variable set up, | 13 | Then, make sure you have the ANDROID_SDK_PATH and ANDROID_NDK_PATH (pointing to |
10 | otherwise configure will fail to find the compiler. | 14 | the each's root directory) environment variables set up, otherwise configure will fail to find the compiler and |
11 | 15 | compiling the java files will fail. | |
12 | 16 | ||
13 | * Build instructions | 17 | * Build instructions |
14 | 18 | ||
15 | Until there's a script which does all the work the procedure is documented here. | ||
16 | |||
17 | Use this as your build folder, using '../tools/configure' etc. | 19 | Use this as your build folder, using '../tools/configure' etc. |
18 | $ ../tools/configure | 20 | $ ../tools/configure # type 200, then chose A for android and your screen resolution |
19 | $ make | 21 | $ make |
20 | 22 | ||
21 | After the build finished, you need to copy librockbox.so to libs/armeabi/ (create that dir if it doesn't exit) | 23 | After the build finished, you can create a Rockbox.apk in bin/ |
22 | $ mkdir -p libs/armeabi | 24 | $ make apk |
23 | $ cp librockbox.so libs/armeabi | ||
24 | |||
25 | For the other files (codecs, themes), you execute 'make zip'. Then you copy the | ||
26 | zip to libs/armeabi, using the name libmisc.so. This is needed, since there's no | ||
27 | way to bundle stuff into apk's and have access to them from native code other | ||
28 | than pretending it was a library. | ||
29 | $ make zip | ||
30 | $ cp rockbox.zip libs/armeabi/libmisc.so | ||
31 | 25 | ||
32 | rockbox.zip..err, libmisc.so will be unpacked at runtime. | 26 | You can install that on the device |
27 | $ $ANDROID_SDK_PATH/tools/adb install -r bin/Rockbox.apk | ||
33 | 28 | ||
34 | To finish, you can follow this guide [3], or use eclipse. Simply install eclipse | ||
35 | and the android plugins, then import this folder as a new Android project and run it. | ||
36 | See [4] for a guide on how to set up eclipse for android development. | ||
37 | 29 | ||
30 | NOTE: make apk needs creates a debug signed .apk, not suitable for distribution. | ||
31 | It expects that this key already exists. | ||
32 | You should be able to generate it with "keytool" using the following options: | ||
33 | * Keystore name: "debug.keystore" | ||
34 | * Keystore password: "android" | ||
35 | * Key alias: "androiddebugkey" | ||
36 | * Key password: "android" | ||
37 | * CN: "CN=Android Debug,O=Android,C=US" | ||
38 | * validity: 365 days | ||
38 | 39 | ||
40 | Google docs mention the SDK tools can generate it as well, but I haven't found how yet. | ||
39 | 41 | ||
40 | [1]: http://developer.android.com/sdk/index.html | 42 | [1]: http://developer.android.com/sdk/index.html |
41 | [2]: http://developer.android.com/sdk/ndk/index.html | 43 | [2]: http://developer.android.com/sdk/ndk/index.html |