Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
94 lines (63 sloc) 3.25 KB
* TriblerDroid *
Eclipse with android SDK (my SDK path is ~/android/android-sdk-linux/)
Install Android 4.0 (API 14)
Create an AVD (target: 14, SD Card size: 200 MB)
Get android-ndk from (my path is ~/android/android-ndk-r7b/)
Get triblerdroid code (~/android/droid-release-0.1)
$ svn co
If you run a 64bits machine, you need to install (Ubuntu):
To build,
1. Compile C++ code:
$ ~/android/android-ndk-r7b/ndk-build -C ~/android/droid-release-0.1/jni/
2. Build .apk from Eclipse (e.g. Run project (as android application))
3. Patch .apk to add missing native lib
IMPORTANT: aapt won't do the right thing on Linux (not in my box anyway). The
hack is to use aapt for Windows with wine. Nasty, annoying, but it just works.
$ cd ~/android-sdks/android/droid-release-0.1/hack
$ wine aapt.exe a ../bin/droid-release-0.1.apk lib/armeabi/
The output should be:
'lib/armeabi/' as 'lib/armeabi/'...
aapt for Linux gives you (so the android device won't find the library on the right place):
'lib/armeabi/' as ''...
4. Sign patched .apk using the andoroid debug key
$ jarsigner -verbose -keystore ~/.android/debug.keystore -storepass android -keypass android -digestalg SHA1 -sigalg MD5withRSA -sigfile CERT -signedjar ~/android/droid-release-0.1/bin/droid-release-0.1_COMPLETE.apk ~/android/droid-release-0.1/bin/droid-release-0.1.apk androiddebugkey
The output should be:
updating: META-INF/CERT.SF
signing: assets/android.js
signing: assets/json2.js
signing: res/drawable/icon.png
signing: res/drawable/script_logo_48.png
signing: res/drawable/stat_sys_warning.png
signing: res/layout/dialog.xml
signing: res/layout/main.xml
signing: res/raw/
signing: AndroidManifest.xml
signing: resources.arsc
signing: classes.dex
signing: lib/armeabi/
signing: lib/armeabi/gdbserver
signing: lib/armeabi/
4. Install and run .apk on emulator
Given that you have created an AVD called 'test', run it on the emulator
$ ~/android/android-sdk-linux/tools/emulator @test&
Now, install PythonForAndroid (
$ ~/android/android-sdk-linux/platform-tools/adb install ~/android/PythonForAndroid_r4.apk
And triblerdroid
$ ~/android/android-sdk-linux/platform-tools/adb install ~/android/droid-release-0.1/bin/droid-release-0.1_COMPLETE.apk
Now, on the simulator screen, click on applications (middle button) and QMediaDroid
Reply 'yes' to install Python
Push 'install'
(wait paciently...)
Close the Python installation window
==Useful commands==
Debug logging:
$ ~/android/android-sdk-linux/platform-tools/adb logcat > logname.log
$ ~/android/android-sdk-linux/platform-tools/adb uninstall com.tudelft.triblerdroid.first
Jump to Line
Something went wrong with that request. Please try again.