Masterchief87

Set-Up Manjaro XFCE to Build Android

Dec 31st, 2015
503
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.12 KB | None | 0 0
  1. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  2. :: This guide is for setting up the environment ::
  3. :: to build Android on Manjaro Linux with the XFCE desktop. ::
  4. :: ::
  5. :: Lines that begin with # are for information ::
  6. :: only and are not to be copied or pasted. ::
  7. :: ::
  8. :: Lines that begin with $ indicate a command ::
  9. :: to be entered in your terminal. ::
  10. :: ::
  11. :: Lines that begin with * indicate edits to a text file. ::
  12. :: ::
  13. :: When copying and pasting don't copy the * or $. ::
  14. :: ::
  15. :: Text contained inside (is also for information ::
  16. :: only) and not to be copied or pasted. ::
  17. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  18.  
  19. # Install packages needed to build
  20. $ yaourt -S git gnupg flex bison gperf sdl wxgtk squashfs-tools curl ncurses zlib schedtool perl-switch zip unzip libxslt python2-virtualenv bc
  21. $ yaourt -S gcc-multilib lib32-zlib
  22. $ yaourt -S libtinfo
  23.  
  24. # To build Android 6.0 and above you also need rsync.
  25. $ yaourt -S rsync
  26.  
  27. # To install ncurses5-compat-libs you need
  28. # to enter this key in your terminal first.
  29. $ gpg --keyserver pgp.mit.edu --recv-keys C52048C0C0748FEE227D47A2702353E0F7E48EDB
  30. $ yaourt -S ncurses5-compat-libs
  31.  
  32. # Before installing lib32-ncurses5-compat-libs I had to
  33. # uninstall these packages due to conflicts and dependencies.
  34. # This probably will not be necessary for you, but if you are unable to
  35. # install lib32-ncureses5-compat-libs because it conflicts with other
  36. # installed packages, this should fix the problem.
  37. $ sudo pacman -R lib32-ncurses lib32-libxml2 lib32-gconf lib32-libcroco lib32-libsoup lib32-llvm-libs lib32-readline lib32-js17 lib32-librsvg lib32-mesa lib32-rest lib32-cairo lib32-glew1.10 lib32-gtk3 lib32-polkit lib32-colord lib32-gtk2 lib32-pango lib32-libdbusmenu-gtk2 lib32-libindicator-gtk2 lib32-libappindicator-gtk2
  38.  
  39. # Install more necessary packages.
  40. $ yaourt -S lib32-ncurses5-compat-libs
  41. $ yaourt -S lib32-readline
  42. $ yaourt -S make-3.81
  43. $ yaourt -S pngcrush
  44. $ yaourt -S pngquant
  45.  
  46. # Install java 7 and set it as default for building Android 5.x.x or 6.x.x.
  47. $ yaourt -S jdk7-openjdk
  48. $ sudo archlinux-java set java-7-openjdk
  49. # To build Android 7.x.x you need java 8 instead.
  50. $ yaourt -S jdk8-openjdk
  51. $ sudo archlinux-java set java-8-openjdk
  52.  
  53. # Install repo and configure it to download the source
  54. $ mkdir ~/bin && curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo && chmod a+x ~/bin/repo
  55.  
  56. # Symlink make-3.81 and python2 to ~/bin
  57. $ ln -s /usr/bin/make-3.81 ~/bin/make
  58. $ ln -s /usr/bin/make-3.81-config ~/bin/make-config
  59. $ ln -s /usr/bin/python2 ~/bin/python
  60. $ ln -s /usr/bin/python2-config ~/bin/python-config
  61.  
  62. # Download the Android SDK from
  63. # http://dl.google.com/android/android-sdk_r24.4.1-linux.tgz
  64. # Then extract it to your home directory and rename to android-sdk
  65.  
  66. # Open and edit .bashrc with mousepad text editor.
  67. $ mousepad ~/.bashrc
  68.  
  69. # Add these lines to the end of .bashrc (make sure you dont copy the *).
  70. * export LANG=C
  71. * export PATH=~/bin:$PATH
  72. * export PATH=$PATH:~/android-sdk/tools/
  73. * export PATH=$PATH:~/android-sdk/platform-tools/
  74. * export USE_CCACHE=1
  75. * export CCACHE_DIR=~/.ccache
  76. # Save changes and close mousepad.
  77.  
  78. # Restart .bashrc.
  79. $ source ~/.bashrc
  80.  
  81. # Run SDK Manager and install the platform-tools(adb, fastboot, etc...).
  82. $ android sdk (Select platform-tools and install)
  83. # Close SDK Manager
  84.  
  85. # Check make version. (It should be 3.81)
  86. $ make --v
  87.  
  88. # Check python version. (It should be 2.7)
  89. $ python --version
  90.  
  91. # Check java version.
  92. $ java -version
  93. # Output should look something like this.
  94. # java version "1.7.0_91"
  95. # OpenJDK Runtime Environment (IcedTea 2.6.3)
  96. # (Arch Linux build 7.u91_2.6.3-3-x86_64)
  97. # OpenJDK 64-Bit Server VM (build 24.91-b01, mixed mode)
Advertisement
Add Comment
Please, Sign In to add comment