[TUT] Configuring Arch Linux to build Android

Search This thread

GermainZ

Inactive Recognized Developer / Retired Forum Mod
Aug 3, 2012
6,170
8,805
Arch Linux is a rolling release distribution, but Android requires you to have jdk6 (or openjdk6) and python2 to build it. It took me some time to setup everything, and I hope this guide will be useful to anyone who's trying to do the same.

The ArchWiki is a bit outdated. Among other things, it suggests changing the "python" symlink to point to python2, which I didn't want to do as it could cause problems ("python" is supposed to point to python3). Also, Arch Linux uses openjdk7, so you'd have to downgrade to openjdk6 (or Oracle's jdk6) - which isn't mentioned in the Wiki, and is something I'd rather avoid as I want to keep using the latest version.

Basically, I'd like to share this here for now to get some input, and later update the ArchWiki.

0- Quick note about this guide
I think it's pretty safe to assume you're familiar with the terminal. ;)
Also note that this guide will not really talk about how to actually build Android, it's focused on setting up your Arch distro to do so in an easy way.

1- Prerequisites
The ArchWiki covers installing the Android SDK and ADB pretty well.

You'll need these packages for building Android:
Code:
git gnupg flex bison gperf sdl wxgtk squashfs-tools curl ncurses zlib schedtool perl-switch zip unzip
And for 64 bit systems (make sure multilib is enabled):
Code:
lib32-zlib lib32-ncurses lib32-readline gcc-libs-multilib gcc-multilib lib32-gcc-libs
You also need the "repo" utility, which is available in the AUR.

2- Setting up Java
The AUR has packages that should install alongside openjdk7, but that didn't work for me and I found it easier to simply install jdk6 independently of pacman's packages.
To do so, download the latest Linux .bin file (jdk-6u45-linux-x64.bin), and place it in /opt (run a root shell, "sudo bash"):
Code:
cp ~/Downloads/jdk-6u45-linux-x64.bin
Make it executable and run it as root:
Code:
cd /opt
chmod +x jdk-6u45-linux-x64.bin
./jdk-6u45-linux-x64.bin
We'll be updating our path before building to use this version.

3- Setting up Python
We're going to create a python symlink to python2, and place it in /opt/android-build. We'll use this later by updating our path when necessary.
Code:
mkdir /opt/android-build
cd /opt/android-build
ln -s $(which python2) python

4- (Temporarily) Setting up our PATH to test if everything's fine
We just installed jdk6 and made a symlink to python2, but we still need to update our path. In this step, we'll do that in order to test that everything's fine:
Code:
export PATH="/opt/android-build:/opt/jdk1.6.0_45/bin:$PATH"
Make sure jdk6 and python2 are being used:
Code:
echo -n $(python -V)
echo -n $(java -version)
The output should be similar to:
Code:
Python [COLOR="Red"]2[/COLOR].x.x
java version "1.[COLOR="Red"]6[/COLOR].xx"
Java(TM) SE Runtime Environment (build 1.[COLOR="Red"]6[/COLOR].xx)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)

5- Make a build script (or just build).
I'd highly suggest making a build script and placing it in ~/bin. You can then easily run it, and it will take care of everything.
Otherwise, you can run this in the terminal every time before building:
Code:
export PATH="/opt/android-build:/opt/jdk1.6.0_45/bin:$PATH"
And then proceed normally, for example:
Code:
. build/envsetup.sh
lunch cyanogen_cooperve-eng
make clean
time make -j6 bacon

This is my (trimmed down to remove some git revert checks) personal build script, you can modify it to fit your needs. The working directory is your home folder, change the "path" variable around the middle if yours is different.

Code:
Help() {
    echo -n "Usage: build [OPTIONS]
    -h, --help      show this screen
    -s, --sync      run repo sync before building
    -c, --clean     make clean"
    echo
}

box () {
    tput setaf 6
    echo
    str="$@"
    len=$((${#1}+4))
    for ((i = 1; i <= $len; i++)); do
        echo -n '*'
    done
    echo
    echo "* $str *"
    for ((i = 1; i <= $len; i++)); do
        echo -n '*'
    done
    echo
    tput sgr0
}

path="/home/germain/"
sync=0
clean=0
while :; do
    case $1 in
        -h | --help)
            Help
            exit 0
            ;;
        -s | --sync)
            sync=1
            shift
            ;;
        -c | --clean)
            clean=1
            shift
            ;;
        --)
            shift
            break
            ;;
        -*)
            echo "Unknown option $1, ignoring" >&2
            shift
            ;;
        *)
            break
            ;;
    esac
done

clear
box "Setting up \$PATH..."
export PATH="/opt/android-build:/opt/jdk1.6.0_45/bin:$PATH"
echo -n $(python -V)
echo -n $(java -version)

cd "$path"

(( "$sync"==1 )) && box "Syncing..." && repo sync -j64

box "Starting build..."
. build/envsetup.sh
lunch cyanogen_cooperve-eng
(( "$clean"==1 )) && box "Clean build!" && echo && make clean
time make -j6 bacon

box "Done!"

To set it up:
Code:
nano ~/bin/build
<copy the above script, press SHIFT + INSERT to paste, and CTRL+X followed by "Y" to save>
chmod +x ~/bin/build
Usage:
Code:
Usage: build [OPTIONS]
    -h, --help      show this screen
    -s, --sync      run repo sync before building
    -c, --clean     make clean

Sources
These web pages helped me a lot.
  1. http://f0rki.at/building-android-on-arch-linux-x86_64.html
  2. https://wiki.archlinux.org/index.php/Android
  3. https://bbs.archlinux.org/viewtopic.php?id=131939
 

kalpik

Inactive Recognized Contributor
May 19, 2010
4,604
2,065
Amsterdam
www.kalpik.com
Thanks for the guide, but even after I have set the correct java path, (java -version shows Java SE), while building, it still gives a warning that I'm building with Java 1.7 (openjdk). Any pointers?

Checking build tools versions...
************************************************************
You are attempting to build with an unsupported version
of java.

Your version is: java version "1.7.0_21".
The correct version is: Java SE 1.6 or 1.7.

Please follow the machine setup instructions at
https://source.android.com/source/download.html



EDIT: NVM. Fixed by exporting JAVA_HOME and J2SDKDIR
 
Last edited:
  • Like
Reactions: cmbaughman

marno11

New member
Jun 6, 2013
2
1
Geat job GermainZ!

The packages in the AUR which should install alongside openjdk7 should work (it works for me) if you:
Code:
export PATH="/opt/java6/bin:$PATH"

Then (as you mention) you can check by:
Code:
echo -n $(java -version)


Anyway thanks for the guide, I think it is definitely worth updating the Arch Wiki to include this information!
 
  • Like
Reactions: GermainZ

GermainZ

Inactive Recognized Developer / Retired Forum Mod
Aug 3, 2012
6,170
8,805
Geat job GermainZ!

The packages in the AUR which should install alongside openjdk7 should work (it works for me) if you:
Code:
export PATH="/opt/java6/bin:$PATH"

Then (as you mention) you can check by:
Code:
echo -n $(java -version)


Anyway thanks for the guide, I think it is definitely worth updating the Arch Wiki to include this information!

I see they were recently updated. They weren't building for me at the time, and I didn't have enough time to check the PKGBUILD.
I'll do my best to update the wiki when I can, including both options. Thanks. ;)
 

stammler

Senior Member
Jan 6, 2011
123
222
Frankfurt
Thanks for putting this up, I landed on this after following the link in the Arch wiki.

I have a suggestion concerning point 3 (python). Wouldn't it be more sane to use python's virtualenv to set up a python distro for Android?

And BTW, I am trying out the new android-studio, which works for me out of the box, even with openjdk7. Just make sure you install openjdk7-src as Java sources are not (yet) in the dependencies of the android-studio package from the AUR.
 
  • Like
Reactions: GermainZ

GermainZ

Inactive Recognized Developer / Retired Forum Mod
Aug 3, 2012
6,170
8,805
Thanks for putting this up, I landed on this after following the link in the Arch wiki.

I have a suggestion concerning point 3 (python). Wouldn't it be more sane to use python's virtualenv to set up a python distro for Android?

And BTW, I am trying out the new android-studio, which works for me out of the box, even with openjdk7. Just make sure you install openjdk7-src as Java sources are not (yet) in the dependencies of the android-studio package from the AUR.

So basically, create a python 2.7 virtualenv, activate and build from it?
Personally, I find that creating a symlink and adding it to your path (temporary) seems easier and requires no extra tools, but that's up to you. Have you tried it out? Can you please elaborate on why it would be preferable?

Thanks :)
 

Warped420

Guest
Jun 3, 2013
0
155
i have to ask, instead of doing all these steps, wouldn't it be easier just to install BBQLinux and change the java version with a purge command and reinstall 1.6 ?
 

GermainZ

Inactive Recognized Developer / Retired Forum Mod
Aug 3, 2012
6,170
8,805
i have to ask, instead of doing all these steps, wouldn't it be easier just to install BBQLinux and change the java version with a purge command and reinstall 1.6 ?

Are you suggesting that installing a whole distro on top of the one you use, just to build ROMs, is easier than installing one package, making a symlink and prepending something to your path? Because if you think that's hard, then I must say Arch might be the wrong distro for you.

All these instructions should not take more than 2 minutes, excluding the download time (frankly, I spent most of my time deciding if I should get openjdk6 or java6, then customizing my build script (you can just use a bash profile which virtually takes no time to setup, but I needed some extra stuff)).

That being said, if you want to downgrade, you can also do it using Arch (get openjdk6 from the ARM (Arch Rollback Machine), install it, edit pacman.conf to ignore it - very straightforward to do). The whole point was not to, but you can.
 
Last edited:

GermainZ

Inactive Recognized Developer / Retired Forum Mod
Aug 3, 2012
6,170
8,805
not exactly, i build with Mint, I have 5 OS's on my drive at the moment, but i want to add Arch. And BBQ is supposed to be Arch made 4 us. Still having trouble getting it to boot, Its the kernel i think, error messages and str8 to black screen on a intel chip. tried no modset, video=SVIDEO-1:d, i915.modeset=0 , and acpi=off, no luck.

Well, this is meant for existing Arch users (and Arch is my main distro/OS - not Windows/...).

IMHO, Arch derived distros that add installers and packages go against the Arch philosophy, but whatever suits you. Anyway, I'd suggest asking the BBQLinux community since you're installing that, I can't help you in this thread. Good luck. :)
 

GermainZ

Inactive Recognized Developer / Retired Forum Mod
Aug 3, 2012
6,170
8,805
Ok then, i will stick to a Arch question, What is the Arch Philosophy ? and what makes it different from other distros?

Not to be mean, but this isn't an "Ask your Arch related enquiries" thread, and you're hijacking/off-topic.
Read the archwiki article on The Arch Way. There's also another article that compares Arch to other distros.
 

dantheman1977

Senior Member
Mar 26, 2012
56
3
Arch Linux is a rolling release distribution, but Android requires you to have jdk6 (or openjdk6) and python2 to build it. It took me some time to setup everything, and I hope this guide will be useful to anyone who's trying to do the same.

The ArchWiki is a bit outdated. Among other things, it suggests changing the "python" symlink to point to python2, which I didn't want to do as it could cause problems ("python" is supposed to point to python3). Also, Arch Linux uses openjdk7, so you'd have to downgrade to openjdk6 (or Oracle's jdk6) - which isn't mentioned in the Wiki, and is something I'd rather avoid as I want to keep using the latest version.

Basically, I'd like to share this here for now to get some input, and later update the ArchWiki.

0- Quick note about this guide
I think it's pretty safe to assume you're familiar with the terminal. ;)
Also note that this guide will not really talk about how to actually build Android, it's focused on setting up your Arch distro to do so in an easy way.

1- Prerequisites
The ArchWiki covers installing the Android SDK and ADB pretty well.

You'll need these packages for building Android:
Code:
git gnupg flex bison gperf sdl wxgtk squashfs-tools curl ncurses zlib schedtool perl-switch zip unzip
And for 64 bit systems (make sure multilib is enabled):
Code:
lib32-zlib lib32-ncurses lib32-readline gcc-libs-multilib gcc-multilib lib32-gcc-libs
You also need the "repo" utility, which is available in the AUR.

2- Setting up Java
The AUR has packages that should install alongside openjdk7, but that didn't work for me and I found it easier to simply install jdk6 independently of pacman's packages.
To do so, download the latest Linux .bin file (jdk-6u45-linux-x64.bin), and place it in /opt (run a root shell, "sudo bash"):
Code:
cp ~/Downloads/jdk-6u45-linux-x64.bin
Make it executable and run it as root:
Code:
cd /opt
chmod +x jdk-6u45-linux-x64.bin
./jdk-6u45-linux-x64.bin
We'll be updating our path before building to use this version.

3- Setting up Python
We're going to create a python symlink to python2, and place it in /opt/android-build. We'll use this later by updating our path when necessary.
Code:
mkdir /opt/android-build
cd /opt/android-build
ln -s $(which python2) python

4- (Temporarily) Setting up our PATH to test if everything's fine
We just installed jdk6 and made a symlink to python2, but we still need to update our path. In this step, we'll do that in order to test that everything's fine:
Code:
export PATH="/opt/android-build:/opt/jdk1.6.0_45/bin:$PATH"
Make sure jdk6 and python2 are being used:
Code:
echo -n $(python -V)
echo -n $(java -version)
The output should be similar to:
Code:
Python [COLOR="Red"]2[/COLOR].x.x
java version "1.[COLOR="Red"]6[/COLOR].xx"
Java(TM) SE Runtime Environment (build 1.[COLOR="Red"]6[/COLOR].xx)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)

5- Make a build script (or just build).
I'd highly suggest making a build script and placing it in ~/bin. You can then easily run it, and it will take care of everything.
Otherwise, you can run this in the terminal every time before building:
Code:
export PATH="/opt/android-build:/opt/jdk1.6.0_45/bin:$PATH"
And then proceed normally, for example:
Code:
. build/envsetup.sh
lunch cyanogen_cooperve-eng
make clean
time make -j6 bacon

This is my (trimmed down to remove some git revert checks) personal build script, you can modify it to fit your needs. The working directory is your home folder, change the "path" variable around the middle if yours is different.

Code:
Help() {
    echo -n "Usage: build [OPTIONS]
    -h, --help      show this screen
    -s, --sync      run repo sync before building
    -c, --clean     make clean"
    echo
}

box () {
    tput setaf 6
    echo
    str="$@"
    len=$((${#1}+4))
    for ((i = 1; i <= $len; i++)); do
        echo -n '*'
    done
    echo
    echo "* $str *"
    for ((i = 1; i <= $len; i++)); do
        echo -n '*'
    done
    echo
    tput sgr0
}

path="/home/germain/"
sync=0
clean=0
while :; do
    case $1 in
        -h | --help)
            Help
            exit 0
            ;;
        -s | --sync)
            sync=1
            shift
            ;;
        -c | --clean)
            clean=1
            shift
            ;;
        --)
            shift
            break
            ;;
        -*)
            echo "Unknown option $1, ignoring" >&2
            shift
            ;;
        *)
            break
            ;;
    esac
done

clear
box "Setting up \$PATH..."
export PATH="/opt/android-build:/opt/jdk1.6.0_45/bin:$PATH"
echo -n $(python -V)
echo -n $(java -version)

cd "$path"

(( "$sync"==1 )) && box "Syncing..." && repo sync -j64

box "Starting build..."
. build/envsetup.sh
lunch cyanogen_cooperve-eng
(( "$clean"==1 )) && box "Clean build!" && echo && make clean
time make -j6 bacon

box "Done!"

To set it up:
Code:
nano ~/bin/build
<copy the above script, press SHIFT + INSERT to paste, and CTRL+X followed by "Y" to save>
chmod +x ~/bin/build
Usage:
Code:
Usage: build [OPTIONS]
    -h, --help      show this screen
    -s, --sync      run repo sync before building
    -c, --clean     make clean

Sources
These web pages helped me a lot.
  1. http://f0rki.at/building-android-on-arch-linux-x86_64.html
  2. https://wiki.archlinux.org/index.php/Android
  3. https://bbs.archlinux.org/viewtopic.php?id=131939

Could i put this line in my .bashrc file? wouldn't this do the same thing....
export PATH="/opt/android-build:/opt/jdk1.6.0_45/bin:$PATH"
 

GermainZ

Inactive Recognized Developer / Retired Forum Mod
Aug 3, 2012
6,170
8,805
Could i put this line in my .bashrc file? wouldn't this do the same thing....
export PATH="/opt/android-build:/opt/jdk1.6.0_45/bin:$PATH"

Not exactly the same thing, considering calling 'python' will always direct to 'python2' and 'java' to java1.6, and not only when actually building.
Also, can you please not quote the whole post?
 
Last edited:

Red Devil

Senior Member
Oct 25, 2012
1,355
2,494
Mumbai
Not exactly the same thing, considering calling 'python' will always direct to 'python2' and 'java' to java1.6, and not only when actually building.
Also, can you please not quote the whole post?
Great guide.. !! :)

I had a problem with setting up JDK6 cause I already had OPENJDK7

So I did is
Code:
 sudo pacman -Rndd jdk7-openjdk jre7-openjdk icedtea-web-java7 java-rhino jre7-openjdk-headless

and did what you said i.e. installed the binary and it works awesomely well ! :).
 

cj360

Senior Member
Oct 24, 2011
1,332
709
Thanks for this tutorial! I learned android on ubuntu and ubuntu forks, so trying it on arch is totaly different ball game.
 
Last edited:

walker.cz

Senior Member
Feb 21, 2013
250
780
I have one remark:
you also need to install make-3.81 from AUR otherwise you get error:
build/core/main.mk:45: ********************************************************************************
build/core/main.mk:46: * You are using version 4.0 of make.
build/core/main.mk:47: * Android can only be built by versions 3.81 and 3.82.
build/core/main.mk:48: * see https://source.android.com/source/download.html
build/core/main.mk:49: ***************************************************************************

so I am using make-3.81 -j4 (have both versions of make on system)
or you can make use simlink a add to your path (similar as export PATH="/opt/android-build:$PATH")
 
Last edited:

walker.cz

Senior Member
Feb 21, 2013
250
780
absolutly - as you can see at my first post - it is warning message during trying to compile fROM few hours ago today. so yes, I am sure. you can try ;) (I am trying KITKAT)
Did you try? with make-3.81 I do not have this error :p

---------- Post added at 06:23 PM ---------- Previous post was at 06:00 PM ----------

have another strange problem:
I have running custom kernel on my phone. I've downloaded sources from git, compile on my pc but --- kernel does not boot, immediatelly goes to reboot (compiling procces was successfull). So where the problem is I do not know.
Has anybody any idea? Can it be by bad toochains?

Linux 3.11.6-1-ARCH #1 SMP PREEMPT Fri Oct 18 23:22:36 CEST 2013 x86_64 GNU/Linux
make v4 and also make-3.81
Python 3.3.2 and also Python2
java version "1.6.0_51"
Java(TM) SE Runtime Environment (build 1.6.0_51-b09)
Java HotSpot(TM) 64-Bit Server VM (build 20.51-b01, mixed mode)
toolchains arm-eabi-4.4.3
kernel cm10 for xperia x10i
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 34
    Arch Linux is a rolling release distribution, but Android requires you to have jdk6 (or openjdk6) and python2 to build it. It took me some time to setup everything, and I hope this guide will be useful to anyone who's trying to do the same.

    The ArchWiki is a bit outdated. Among other things, it suggests changing the "python" symlink to point to python2, which I didn't want to do as it could cause problems ("python" is supposed to point to python3). Also, Arch Linux uses openjdk7, so you'd have to downgrade to openjdk6 (or Oracle's jdk6) - which isn't mentioned in the Wiki, and is something I'd rather avoid as I want to keep using the latest version.

    Basically, I'd like to share this here for now to get some input, and later update the ArchWiki.

    0- Quick note about this guide
    I think it's pretty safe to assume you're familiar with the terminal. ;)
    Also note that this guide will not really talk about how to actually build Android, it's focused on setting up your Arch distro to do so in an easy way.

    1- Prerequisites
    The ArchWiki covers installing the Android SDK and ADB pretty well.

    You'll need these packages for building Android:
    Code:
    git gnupg flex bison gperf sdl wxgtk squashfs-tools curl ncurses zlib schedtool perl-switch zip unzip
    And for 64 bit systems (make sure multilib is enabled):
    Code:
    lib32-zlib lib32-ncurses lib32-readline gcc-libs-multilib gcc-multilib lib32-gcc-libs
    You also need the "repo" utility, which is available in the AUR.

    2- Setting up Java
    The AUR has packages that should install alongside openjdk7, but that didn't work for me and I found it easier to simply install jdk6 independently of pacman's packages.
    To do so, download the latest Linux .bin file (jdk-6u45-linux-x64.bin), and place it in /opt (run a root shell, "sudo bash"):
    Code:
    cp ~/Downloads/jdk-6u45-linux-x64.bin
    Make it executable and run it as root:
    Code:
    cd /opt
    chmod +x jdk-6u45-linux-x64.bin
    ./jdk-6u45-linux-x64.bin
    We'll be updating our path before building to use this version.

    3- Setting up Python
    We're going to create a python symlink to python2, and place it in /opt/android-build. We'll use this later by updating our path when necessary.
    Code:
    mkdir /opt/android-build
    cd /opt/android-build
    ln -s $(which python2) python

    4- (Temporarily) Setting up our PATH to test if everything's fine
    We just installed jdk6 and made a symlink to python2, but we still need to update our path. In this step, we'll do that in order to test that everything's fine:
    Code:
    export PATH="/opt/android-build:/opt/jdk1.6.0_45/bin:$PATH"
    Make sure jdk6 and python2 are being used:
    Code:
    echo -n $(python -V)
    echo -n $(java -version)
    The output should be similar to:
    Code:
    Python [COLOR="Red"]2[/COLOR].x.x
    java version "1.[COLOR="Red"]6[/COLOR].xx"
    Java(TM) SE Runtime Environment (build 1.[COLOR="Red"]6[/COLOR].xx)
    Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)

    5- Make a build script (or just build).
    I'd highly suggest making a build script and placing it in ~/bin. You can then easily run it, and it will take care of everything.
    Otherwise, you can run this in the terminal every time before building:
    Code:
    export PATH="/opt/android-build:/opt/jdk1.6.0_45/bin:$PATH"
    And then proceed normally, for example:
    Code:
    . build/envsetup.sh
    lunch cyanogen_cooperve-eng
    make clean
    time make -j6 bacon

    This is my (trimmed down to remove some git revert checks) personal build script, you can modify it to fit your needs. The working directory is your home folder, change the "path" variable around the middle if yours is different.

    Code:
    Help() {
        echo -n "Usage: build [OPTIONS]
        -h, --help      show this screen
        -s, --sync      run repo sync before building
        -c, --clean     make clean"
        echo
    }
    
    box () {
        tput setaf 6
        echo
        str="$@"
        len=$((${#1}+4))
        for ((i = 1; i <= $len; i++)); do
            echo -n '*'
        done
        echo
        echo "* $str *"
        for ((i = 1; i <= $len; i++)); do
            echo -n '*'
        done
        echo
        tput sgr0
    }
    
    path="/home/germain/"
    sync=0
    clean=0
    while :; do
        case $1 in
            -h | --help)
                Help
                exit 0
                ;;
            -s | --sync)
                sync=1
                shift
                ;;
            -c | --clean)
                clean=1
                shift
                ;;
            --)
                shift
                break
                ;;
            -*)
                echo "Unknown option $1, ignoring" >&2
                shift
                ;;
            *)
                break
                ;;
        esac
    done
    
    clear
    box "Setting up \$PATH..."
    export PATH="/opt/android-build:/opt/jdk1.6.0_45/bin:$PATH"
    echo -n $(python -V)
    echo -n $(java -version)
    
    cd "$path"
    
    (( "$sync"==1 )) && box "Syncing..." && repo sync -j64
    
    box "Starting build..."
    . build/envsetup.sh
    lunch cyanogen_cooperve-eng
    (( "$clean"==1 )) && box "Clean build!" && echo && make clean
    time make -j6 bacon
    
    box "Done!"

    To set it up:
    Code:
    nano ~/bin/build
    <copy the above script, press SHIFT + INSERT to paste, and CTRL+X followed by "Y" to save>
    chmod +x ~/bin/build
    Usage:
    Code:
    Usage: build [OPTIONS]
        -h, --help      show this screen
        -s, --sync      run repo sync before building
        -c, --clean     make clean

    Sources
    These web pages helped me a lot.
    1. http://f0rki.at/building-android-on-arch-linux-x86_64.html
    2. https://wiki.archlinux.org/index.php/Android
    3. https://bbs.archlinux.org/viewtopic.php?id=131939
    2
    Geat job GermainZ!

    The packages in the AUR which should install alongside openjdk7 should work (it works for me) if you:
    Code:
    export PATH="/opt/java6/bin:$PATH"

    Then (as you mention) you can check by:
    Code:
    echo -n $(java -version)


    Anyway thanks for the guide, I think it is definitely worth updating the Arch Wiki to include this information!

    I see they were recently updated. They weren't building for me at the time, and I didn't have enough time to check the PKGBUILD.
    I'll do my best to update the wiki when I can, including both options. Thanks. ;)
    2
    I ran into the same error and went ahead and modified:
    art/tools/generate-operator-out.py
    art/tools/cpplint.py

    by changing /usr/bin/python to /usr/bin/python2. Compiling worked after that.
    1
    Good job dude. I already use Arch Linux for developing Android firmware but I haven't the time to make one tutorial for others.:laugh:
    1
    @ice.modding that doesn't seem like an error specific to Arch Linux, looks more like an error syncing & lunching.

    Not sure you can build on Arch right now without some major work arounds as I get this:
    Code:
    /home/andrew/minimal/out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/arch/x86_64/quick_entrypoints_x86_64.o:function art_quick_instrumentation_entry: error: unsupported reloc 42
    /home/andrew/minimal/out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/arch/x86_64/quick_entrypoints_x86_64.o:function art_quick_instrumentation_exit: error: unsupported reloc 42
    /home/andrew/minimal/out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/arch/x86_64/quick_entrypoints_x86_64.o:function art_quick_deoptimize: error: unsupported reloc 42
    Copy: /home/andrew/minimal/out/target/product/vs985/obj/STATIC_LIBRARIES/libclangAST_intermediates/include/clang/AST/AttrVisitor.inc

    When trying to build an MM rom and my Googling says Arch's gcc and binutils are too new for android, you could possibly downgrade the packages but that may cause your system to not boot as arch's packages are built with/ made for the newest gcc & binutils packages.

    Edit
    This symlink seems to fix it
    Code:
    rm prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/bin/ld
    
    ln -s /usr/bin/ld.gold prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/bin/ld