Name: tribler-android
Owner: Tribler
Description: null
Created: 2015-06-29 10:05:27.0
Updated: 2018-01-06 09:34:42.0
Pushed: 2015-07-10 14:05:59.0
Homepage: null
Size: 91252
Language: Java
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Tribler Android is an application that runs the Tribler core on Android using Python for Android, with a native Android Java GUI. You can search for torrents using the decentralized Dispersy network, and stream media files over BitTorrent using the built-in VLC for Android player.
First clone this repository:
clone https://github.com/Tribler/tribler-android.git
In order to build the application you will need to package the Python code including its libraries for Android. This can be done by first installing buildozer:
install buildozer
Buildozer automates the build process which can be configured in the buildozer.spec file (but the one in this repository should already be fine). You can then run the build script in the tribler-prototype directory, which will call buildozer for you:
ribler-prototype
ild.sh
After you've ran the build script, the Python code and its dependencies such as Tribler will have been compiled and packaged into private.mp3 located in the assets folder of the Java part of the application (tsap/app/src/main/assets).
From there you should be able to run the entire application using Android Studio, just as you would run any Android Studio application.
You might need to use the following commands if you encounter any problems with buildozer:
If it complains about missing swig, then install it using:
apt-get install swig
In case you get a problem about ccache: invalid option – 'l', then remove ccache:
apt-get remove ccache
If you get the following error: ImportError: No module named 'pip._vendor.requests', then just run the build script once more. If you get an error saying 'virtual-env not installed', then make sure you're using Python 2(.7) and not Python 3.
Install Android NDK, SDK, P4A and Ant in custom directories and set your .bashrc (located in /home/youruser/.bashrc) variables to these dirs. Below is an example of what to add to your .bashrc file:
rt APP_ANDROID_ANT_PATH="/usr/bin/"
rt APP_ANDROID_SDK_PATH="/home/youruser/Android/Sdk/"
rt APP_ANDROID_NDK_PATH="/home/youruser/Android/android-ndk-r10d/"
rt APP_ANDROID_P4A_DIR="/home/youruser/Android/python-for-android/"
After every successful buildozer build, at least in version 0.28, buildozer will delete your build directory in python-for-android (P4A). This is not really a problem, except when you add or update Python dependencies, because that would require buildozer to rebuild from scratch again to include your changes. Since the build process takes quite a long time, if might be useful to prevent buildozer from throwing its build folder away after a successful build. Open the following file:
vim /usr/local/lib/python2.7/dist-packages/buildozer-0.28dev-py2.7.egg/buildozer/targets/android.py
And then comment out the following line:
lf.buildozer.rmdir(join(self.pa_dir, 'build'))
/tribler-prototype/ -> contains the Python code and tests for this code. It acts as a wrapper around Tribler code.
/tsap/ -> contains the Android Studio format for an Android project in Java.
/tsap-tests/ -> contains Java tests.
/tsap-UItests/ -> contains Java tests for the user interface.
Java and Python communicate through a local webserver. The technique used for this is called XML-RPC.
This project uses the following components:
For testing purposes: