rockbox/android
Thomas Martitz f8381d9c39 Android: don't compile stubs.c and kill off libuisimulator entirely.
Seperate make rules in a almost empty android.make.
Also add forgotten powermgmt-android.c

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27977 a1c6a512-1295-4272-9138-f99709370657
2010-09-02 00:24:40 +00:00
..
gen/org/rockbox Fix launcher icon (once more). 2010-08-06 00:53:02 +00:00
res Delete now unused icons. 2010-08-04 20:38:25 +00:00
src/org/rockbox Android: don't compile powermgmt-sim.c 2010-09-01 23:36:15 +00:00
.classpath Rockbox as an application: Commit current Android port progress. 2010-08-02 20:34:47 +00:00
.project Rockbox as an application: Commit current Android port progress. 2010-08-02 20:34:47 +00:00
android.make Android: don't compile stubs.c and kill off libuisimulator entirely. 2010-09-02 00:24:40 +00:00
AndroidManifest.xml Android port: allow moving application to SD card on Froyo targets 2010-08-16 20:47:46 +00:00
build.sh Android port: also include native libraries in APK file 2010-08-17 21:13:13 +00:00
default.properties Android port: allow moving application to SD card on Froyo targets 2010-08-16 20:47:46 +00:00
README Update README a bit. 2010-08-05 12:15:30 +00:00

This folder contains the java parts needed to build an Rockbox as an
application for android.

* Prerequisites

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.


Then, make sure you have the ANDROID_NDK_PATH (pointing to the NDK's root directory) environment variable set up,
otherwise configure will fail to find the compiler.


* Build instructions

Until there's a script which does all the work the procedure is documented here.

Use this as your build folder, using '../tools/configure' etc.
    $ ../tools/configure
    $ make

After the build finished, you need to copy librockbox.so to libs/armeabi/ (create that dir if it doesn't exit)
    $ mkdir -p libs/armeabi
    $ cp librockbox.so libs/armeabi

For the other files (codecs, themes), you execute 'make zip'. Then you copy the
zip to libs/armeabi, using the name libmisc.so. This is needed, since there's no 
way to bundle stuff into apk's and have access to them from native code other
than pretending it was a library.
    $ make zip
    $ cp rockbox.zip libs/armeabi/libmisc.so

rockbox.zip..err, libmisc.so will be unpacked at runtime.

To finish, you can follow this guide [3], or use eclipse. Simply install eclipse
and the android plugins, then import this folder as a new Android project and run it.
See [4] for a guide on how to set up eclipse for android development.



[1]: http://developer.android.com/sdk/index.html 
[2]: http://developer.android.com/sdk/ndk/index.html
[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/
[4]: http://developer.android.com/sdk/installing.html