From 5f580b88315166a4e9a964d56db68d58d1cddf91 Mon Sep 17 00:00:00 2001 From: Cory Fields Date: Sat, 14 Jul 2012 01:18:37 -0400 Subject: [PATCH] [droid] update readme --- docs/README.android | 67 ++++++++++----------------------------------- 1 file changed, 14 insertions(+), 53 deletions(-) diff --git a/docs/README.android b/docs/README.android index 841c2dab5a..01c96a5406 100644 --- a/docs/README.android +++ b/docs/README.android @@ -14,9 +14,9 @@ TOC ----------------------------------------------------------------------------- We currently recommend Ubuntu Natty (11.04) or later. Current work has been -done here. +done here. Additionally, building from OSX Snow Leopard is working. -NOTE TO NEW LINUX USERS: All lines that are prefixed with the '#' +NOTE TO NEW USERS: All lines that are prefixed with the '#' character are commands that need to be typed into a terminal window / console (similar to the command prompt for Windows). Note that the '#' character itself should NOT be typed as part of the command. @@ -67,19 +67,7 @@ Install at least the following packages: - SDK Platform -------------------------------------------------------------------- -2.3. Creating an Android Virtual Device --------------------------------------------------------------------- - -In the Android SDK Manager (see 2.2) go to Tools -> Manage AVDs... -to open the Android Virtual Device Manager. Click on "New..." to -create a new Android Virtual Device (AVD). Enter a name () -and select "Android 2.3.3 - API Level 10" as the Target. For the -"SD Card Size" choose at least 512 MB. In the "Hardware" part specify -at least "256" MB for "Device ram size". Click on "Create AVD" to -create your AVD. - --------------------------------------------------------------------- -2.4. Setup the Android toolchain +2.3. Setup the Android toolchain -------------------------------------------------------------------- To be able to compile XBMC and the libraries it depends on for the @@ -125,7 +113,7 @@ the libc.so there. (where /android-/ is the path you have 4. Installing the required Ubuntu packages ----------------------------------------------------------------------------- - # sudo apt-get install git-core make g++ gcc cvs rpl TODO + # sudo apt-get install build-essential If you run a 64bit operating system you will also need to get ia32-libs @@ -164,6 +152,9 @@ on with the Android toolchain and creating an Android Application Package This build was designed to be massively parallel. Don't be afraid to give it a 'make -j20' or so. + Verify that all deps built correctly (it will tell you so) before + continuing. You will get crazy build errors otherwise. + -------------------------------------------------------------------- 5.2. Building XBMC -------------------------------------------------------------------- @@ -172,17 +163,7 @@ on with the Android toolchain and creating an Android Application Package # make -C tools/android/depends/xbmc After the first build (assuming bootstrap and configure are successful), - subsequent builds can be run with a simple 'make'. - --------------------------------------------------------------------- -5.3. Building the APK --------------------------------------------------------------------- - - # cd $HOME/xbmc-android/tools/android/packaging - # make - -This will create the debug APK named "xbmcapp-debug.apk" in the -"images" sub-directory + subsequent builds can be run with a simple 'make' and 'make apk'. ----------------------------------------------------------------------------- 6. Installing XBMC in an Android system @@ -190,18 +171,10 @@ This will create the debug APK named "xbmcapp-debug.apk" in the To install XBMC through the previously built APK in an Android system you can either install it on a real device (smartphone/tablet/...) running Android -2.3.x or use the Android emulator and the previously created AVD. - --------------------------------------------------------------------- -6.1. Installing XBMC in the Android emulator --------------------------------------------------------------------- - - # cd $HOME/xbmc-android/tools/android/packaging - # emulator-arm -avd -wipe-data & - # adb install images/xbmcapp-debug.apk + >= 2.3.x. -------------------------------------------------------------------- -6.2. Installing XBMC on the Android device +6.1. Installing XBMC on the Android device -------------------------------------------------------------------- Make sure your Android device is connected to your computer through @@ -213,7 +186,7 @@ device's Android settings: # cd $HOME/xbmc-android/tools/android/packaging # adb devices - # adb -s install images/xbmcapp-debug.apk + # adb -s install -r images/xbmcapp-debug.apk The can be retrieved from the list returned by the "adb devices" command and is the first value in the row representing @@ -254,23 +227,11 @@ using gdb directly, you will need to use ndk-gdb which wraps it. Do NOT trust the -p/--project switches, as of ndk7b they do not work. Instead you will need to cd to tools/android/packaging/xbmc and execute it from there. - # ndk-gdb --start + # ndk-gdb --start --delay=0 This will open the installed version of XBMC and break. The warnings can be ignored as we have setup the appropriate paths already. -Caveats: - -- Anything related to dlopen'd libs is hit or miss. Not good when libxbmc.so is - run that way. Basic functionality works, though be aware that breakpoints may - not be reliable yet. - -- Timings during the first second or two can be strange because gdb doesn't - know when we're actually into xbmc. For example, a breakpoint set for - android_init will likely never be hit. Use of ndk-gdb's --delay switch may - help. - - -------------------------------------------------------------------- 8. Architecture -------------------------------------------------------------------- @@ -305,7 +266,7 @@ approach of modifying the binary and blanking out the versions. See here for more info: http://www.bernawebdesign.ch/byteblog/2011/11/23/creating-non-versioned-shared-libraries-for-android/ -As a final gotcha, all libs must be in the form of ^lib*.so$ with no +As a final gotcha, all libs must be in the form of ^lib.*so$ with no exceptions (they won't even install otherwise), and the soname must match. So we have to do some renaming to get some of our self-built libs loaded. @@ -330,7 +291,7 @@ is 'tools/android/packaging' and that the proper sdk/ndk paths are set. # adb -e install -r images/xbmcapp-debug.apk -Launch XBMC on the emulator without the GUI - # adb shell am start -a android.intent.action.MAIN -n org.xbmc/android.app.NativeActivity + # adb shell am start -a android.intent.action.MAIN -n org.xbmc.xbmc/android.app.NativeActivity -Kill a misbehaving XBMC # adb shell ps | grep org.xbmc | awk '{print $2}' | xargs adb shell kill