summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorAntoine Cellerier <dionoea@videolan.org>2011-01-24 17:06:04 +0000
committerAntoine Cellerier <dionoea@videolan.org>2011-01-24 17:06:04 +0000
commita448d8bac7c97c008afcc0c435c7e9777c069b26 (patch)
tree2b39ae642c661af0cf7ce9a90e9179ee10d67346 /android
parent9b02ce9e498e8c3580a25852c17345df710b4893 (diff)
Android build tweaks.
Add make install target for android builds. Remove standard install targets as they don't apply. Add java compilation dependancy on generated resource class(es?) to prevent weird runtime issues. Update installApk.sh script to use correct tool location in recent sdks. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29131 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'android')
-rw-r--r--android/android.make7
-rwxr-xr-xandroid/installApk.sh5
2 files changed, 11 insertions, 1 deletions
diff --git a/android/android.make b/android/android.make
index b28f5c943c..82a8dedf24 100644
--- a/android/android.make
+++ b/android/android.make
@@ -31,6 +31,7 @@ DX=$(ANDROID_PLATFORM)/tools/dx
APKBUILDER=$(ANDROID_SDK_PATH)/tools/apkbuilder
ZIPALIGN=$(ANDROID_SDK_PATH)/tools/zipalign
KEYSTORE=$(HOME)/.android/debug.keystore
+ADB=$(ANDROID_SDK_PATH)/platform-tools/adb
MANIFEST := $(ANDROID_DIR)/AndroidManifest.xml
@@ -69,7 +70,7 @@ $(BUILDDIR)/bin/$(PACKAGE_PATH)/R.class: $(R_JAVA)
-classpath $(ANDROID_PLATFORM)/android.jar:$(BUILDDIR)/bin \
-sourcepath $(ANDROID_DIR)/gen:$(ANDROID_DIR)/src $<
-$(BUILDDIR)/bin/$(PACKAGE_PATH)/%.class: $(ANDROID_DIR)/src/$(PACKAGE_PATH)/%.java
+$(BUILDDIR)/bin/$(PACKAGE_PATH)/%.class: $(ANDROID_DIR)/src/$(PACKAGE_PATH)/%.java $(BUILDDIR)/bin/$(PACKAGE_PATH)/R.class
$(call PRINTS,JAVAC $(subst $(ROOTDIR)/,,$<))javac -d $(BUILDDIR)/bin \
-classpath $(ANDROID_PLATFORM)/android.jar:$(BUILDDIR)/bin \
-sourcepath $(ANDROID_DIR)/gen:$(ANDROID_DIR)/src $<
@@ -112,3 +113,7 @@ $(DIRS):
dirs: $(DIRS)
apk: $(APK)
+
+install: apk
+ $(ADB) install -r $(APK)
+
diff --git a/android/installApk.sh b/android/installApk.sh
index 2c82b115c6..5fd6afa810 100755
--- a/android/installApk.sh
+++ b/android/installApk.sh
@@ -1,5 +1,10 @@
#!/bin/sh
ADB="$ANDROID_SDK_PATH/tools/adb"
+if [ ! -e $ADB ]
+then
+ # Starting with the gingerbread sdk, the adb location changed
+ ADB="$ANDROID_SDK_PATH/platform-tools/adb"
+fi
$ADB install -r rockbox.apk
echo 'am start -a android.intent.action.MAIN -n org.rockbox/.RockboxActivity; exit' | $ADB shell