Rockbox Technical Forums

Rockbox Development => Starting Development and Compiling => Topic started by: [Saint] on July 11, 2013, 05:07:45 PM

Title: Compiling RaaA for Android with a modern SDK
Post by: [Saint] on July 11, 2013, 05:07:45 PM
Some time ago, apkbuilder was removed from the SDK tools, and a few other changes were made to the general layout of the toolsets. This proved problematic for anyone who updated their existing installations, or for those attempting to create new build environments.

The following details how to workaround these changes:


1 - If you haven't already done so, download and install the Android SDK (http://developer.android.com/sdk/index.html#download) and Android NDK (http://developer.android.com/tools/sdk/ndk/index.html).

Remember that as well as the general dependencies list here (http://www.rockbox.org/wiki/LinuxSimpleGuideToCompiling) for compiling Rockbox you will also need a Java JDK of version 6 or higher installed to compile RaaA for Android.

2 - Remember to export the required environment variables by appending the following to your ~/.bashrc file.
The following assumes both were installed directly to the user's home directory - adjust the paths to suit your needs:
Code: [Select]
export ANDROID_NDK_PATH=~/android-ndk-r8e
export ANDROID_SDK_PATH=~/adt-bundle-linux-x86_64-20130522/sdk

3 - Download the tools_r21-linux.zip (https://dl-ssl.google.com/android/repository/tools_r21-linux.zip) file from the Google repository, this is the last version that included apkbuilder. Extract and merge this with ~/adt-bundle-linux-x86_64-20130522/sdk/tools making sure not to replace any existing files.

4 - Some files were moved and are no longer where we expect them to be, so we need to make a couple of symlinks - adjust the paths to suit your needs:
Code: [Select]
ln -s ~/adt-bundle-linux-x86_64-20130522/sdk/build-tools/17.0.0/aapt ~/adt-bundle-linux-x86_64-20130522/sdk/platform-tools/aapt
ln -s ~/adt-bundle-linux-x86_64-20130522/sdk/build-tools/17.0.0/dx ~/adt-bundle-linux-x86_64-20130522/sdk/platform-tools/dx


That's it - we're done. We can now build RaaA for Android again, using the current SDK version.


[Saint]
Title: Re: Compiling RaaA for Android with a modern SDK
Post by: Strife89 on July 24, 2013, 11:55:50 AM
EDIT: Please disregard everything below. Turns out I completely lacked some 32-bit libraries and a previous version of some sdk components, as I learned through assistance on IRC.

I'm still getting failures, unfortunately. I'm using the SDK from July 17 ( http://dl.google.com/android/adt/adt-bundle-linux-x86_64-20130717.zip ) and have carried out all of the steps as specified. (I'm on Ubuntu 13.04; my JDK is openjdk-6-jdk)

In spite of this, I continue to get the following messages when I attempt to make apk:

Code: [Select]
michael@Strife-Satellite-L305D:~/rockbox/iconia-build$ make apk
AAPT bin/resources.ap_
make: /home/michael/android/sdk/platform-tools/aapt: Command not found
make: *** [/home/michael/rockbox/iconia-build/bin/resources.ap_] Error 127

The link is definitely in place:
Code: [Select]
michael@Strife-Satellite-L305D:~/rockbox/iconia-build$ ls -la ~/android/sdk/platform-tools/
total 1852
drwxr-x--- 3 michael michael    4096 Jul 24 11:20 .
drwxr-x--- 8 michael michael    4096 Jul 23 14:23 ..
lrwxrwxrwx 1 michael michael      56 Jul 24 11:19 aapt -> /home/michael/android/sdk/build-tools/android-4.2.2/aapt
-rwxrwx--- 1 michael michael 1226659 May 13 12:31 adb
drwxrwx--- 2 michael michael    4096 May 13 12:39 api
lrwxrwxrwx 1 michael michael      54 Jul 24 11:20 dx -> /home/michael/android/sdk/build-tools/android-4.2.2/dx
-rwxrwx--- 1 michael michael  176550 May 13 12:31 fastboot
-rw-rw---- 1 michael michael  467531 May 13 12:42 NOTICE.txt
-rw-rw---- 1 michael michael      38 May 13 12:31 source.properties

I reran make apk with the debug option; it spit out a mammoth 50,000 lines. Pastebin choked on it, so I've put the output in my Dropbox. https://dl.dropboxusercontent.com/u/1905158/debug-make.txt

Any ideas where I went wrong?
Title: Re: Compiling RaaA for Android with a modern SDK
Post by: Fridge on March 15, 2016, 06:45:26 AM
EDIT: Please disregard everything below. Turns out I completely lacked some 32-bit libraries and a previous version of some sdk components, as I learned through assistance on IRC.

I'm still getting failures, unfortunately. I'm using the SDK from July 17 ( http://dl.google.com/android/adt/adt-bundle-linux-x86_64-20130717.zip ) and have carried out all of the steps as specified. (I'm on Ubuntu 13.04; my JDK is openjdk-6-jdk)

In spite of this, I continue to get the following messages when I attempt to make apk:

Code: [Select]
michael@Strife-Satellite-L305D:~/rockbox/iconia-build$ make apk
AAPT bin/resources.ap_
make: /home/michael/android/sdk/platform-tools/aapt: Command not found
make: *** [/home/michael/rockbox/iconia-build/bin/resources.ap_] Error 127

The link is definitely in place:
Code: [Select]
michael@Strife-Satellite-L305D:~/rockbox/iconia-build$ ls -la ~/android/sdk/platform-tools/
total 1852
drwxr-x--- 3 michael michael    4096 Jul 24 11:20 .
drwxr-x--- 8 michael michael    4096 Jul 23 14:23 ..
lrwxrwxrwx 1 michael michael      56 Jul 24 11:19 aapt -> /home/michael/android/sdk/build-tools/android-4.2.2/aapt
-rwxrwx--- 1 michael michael 1226659 May 13 12:31 adb
drwxrwx--- 2 michael michael    4096 May 13 12:39 api
lrwxrwxrwx 1 michael michael      54 Jul 24 11:20 dx -> /home/michael/android/sdk/build-tools/android-4.2.2/dx
-rwxrwx--- 1 michael michael  176550 May 13 12:31 fastboot
-rw-rw---- 1 michael michael  467531 May 13 12:42 NOTICE.txt
-rw-rw---- 1 michael michael      38 May 13 12:31 source.properties

I reran make apk with the debug option; it spit out a mammoth 50,000 lines. Pastebin choked on it, so I've put the output in my Dropbox. https://dl.dropboxusercontent.com/u/1905158/debug-make.txt

Any ideas where I went wrong?

It's pretty crazy but mine came out with about 83,164 lines. I have no idea where to start to look for errors lol.