README.android 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. aria2 for Android devices
  2. =========================
  3. aria2 is a lightweight multi-protocol & multi-source download utility
  4. operated in command-line. It supports HTTP/HTTPS, FTP, BitTorrent and
  5. Metalink.
  6. Install
  7. -------
  8. aria2 is not an ordinary Android Java application. It is a C++ native
  9. application and operates in command-line. You don't have to 'root'
  10. your device to use aria2. Because aria2 is a command-line program,
  11. you need a terminal emulator. First install Android Terminal Emulator
  12. from Android Market (or build it from source and install. See
  13. https://github.com/jackpal/Android-Terminal-Emulator/).
  14. 1. Copy aria2c executable to ``/mnt/sdcard`` on your device.
  15. 2. Run Android Terminal Emulator.
  16. 3. ``mkdir /data/data/jackpal.androidterm/aria2``
  17. 4. ``cat /mnt/sdcard/aria2c > /data/data/jackpal.androidterm/aria2/aria2c``
  18. 5. ``chmod 744 /data/data/jackpal.androidterm/aria2/aria2c``
  19. 6. Add the following commands to the initial command of Android
  20. Terminal Emulator::
  21. export HOME=/data/data/jackpal.androidterm/aria2; cd $HOME
  22. 7. Exit Android Terminal Emulator.
  23. 8. Run Android Terminal Emulator again.
  24. 9. See whether aria2c actually works by invoking ``./aria2c -v``
  25. How to use
  26. ----------
  27. See `the online manual
  28. <http://aria2.sourceforge.net/manual/en/html/>`_.
  29. Notes
  30. -----
  31. aria2c executable was generated using android-ndk-r8d.
  32. The following libraries were statically linked.
  33. * openssl 1.0.1e
  34. * expat 2.1.0
  35. * c-ares 1.9.1
  36. Since Android does not have ``/etc/resolv.conf``, c-ares (asynchronous
  37. DNS resolver) is disabled by default. But name resolution is sometimes
  38. a little bit slow, so I recommend to enable c-ares. You can enable it
  39. using ``--async-dns`` and specify DNS servers using
  40. ``--async-dns-server`` option, like this::
  41. --async-dns --async-dns-server=`getprop net.dns1`,`getprop net.dns2`
  42. Because it is tedious to type these long parameters every time you use
  43. aria2c, the following wrapper shell script would be handy::
  44. #!/system/bin/sh
  45. /data/data/jackpal.androidterm/aria2c \
  46. --async-dns \
  47. --async-dns-server=`getprop net.dns1`,`getprop net.dns2` \
  48. "$@"
  49. Please note that you need to add executable file mode bit to this
  50. wrapper script too. (e.g., ``chmod 744 /PATH/TO/SCRIPT``)
  51. Known Issues
  52. ------------
  53. * Since Android does not have ``/dev/stdout``, ``-l-`` does not work.
  54. * Android Terminal Emulator sometimes stops updating console. It looks
  55. like aria2c hangs, but aria2c continues to run.