FORUMS
Remove All Ads from XDA

[GUIDE][LINUX][Fedora 25] Setting up an Android compile environment

987 posts
Thanks Meter: 2,082
 
By cyril279, Senior Member on 2nd January 2017, 08:37 PM
Post Reply Email Thread
This post is mainly to communicate the packages required to get Fedora 25 ready to build android/AOSP. I don't intend to cover the Installation of Fedora, or the actual steps to generate the build (manifests, proprietary code, etc).

From a clean installation of Fedora 25:
  • Update the installation
    Code:
    dnf update
  • Install additional packages that we need to compile AOSP
    (adapted from the Omni guide for F-19_64)
    Code:
    dnf -y install zip curl gcc gcc-c++ flex bison gperf glibc-devel.{x86_64,i686} zlib-devel.{x86_64,i686} ncurses-devel.i686 libX11-devel.i686 libstdc++.i686 readline-devel.i686 libXrender.i686 libXrandr.i686 perl-Digest-MD5-File python-markdown mesa-libGL-devel.i686 git schedtool pngcrush ncurses-compat-libs java-1.8.0-openjdk-devel xz-lzma-compat
  • Now let's grab some stuff from Google
    Code:
    mkdir -p ~/bin
    curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
    chmod a+x ~/bin/repo
  • Add to end of ~/.bashrc
    Code:
    export PATH=~/bin:$PATH
  • Configure git to identify you
    Code:
    git config --global user.email "[email protected]"
    git config --global user.name "Your Name"
    At this point, the environment is ready to compile AOSP.
    The remaining steps (getting & building the code, generating local manifest(s), looking up errors) are not distribution dependent, and are already posted in many places.

  • Create vendor directory, initialize repo , and download/sync the code (see vendor manifest page).
    example:
    Code:
    mkdir -p ~/android/slim7
    cd ~/android/slim7
    
    repo init -u git://github.com/SlimRoms/platform_manifest.git -b ng7.1
    repo sync -j#
Happy building,
-Cyril279
The Following 7 Users Say Thank You to cyril279 For This Useful Post: [ View ] Gift cyril279 Ad-Free
25th April 2017, 06:47 PM |#2  
placebo_domingo's Avatar
Senior Member
Flag Central Coast, CA
Thanks Meter: 73
 
More
Super helpful guide. Thank you. I also ran the following to make sure I had all the stuff I needed.

Code:
sudo dnf groupinstall 'C Development Tools and Libraries'
The Following 5 Users Say Thank You to placebo_domingo For This Useful Post: [ View ] Gift placebo_domingo Ad-Free
13th May 2017, 04:31 AM |#3  
Member
Flag Barrie
Thanks Meter: 15
 
More
Does LineageOS require extra packages? I am pretty sure it requires ImageMagick too.
The Following User Says Thank You to RandomUsername02 For This Useful Post: [ View ] Gift RandomUsername02 Ad-Free
23rd October 2019, 07:00 PM |#4  
taras-fedora-syn's Avatar
Junior Member
Flag Tegucigalpa
Thanks Meter: 4
 
Donate to Me
More
Quote:
Originally Posted by cyril279

This post is mainly to communicate the packages required to get Fedora 25 ready to build android/AOSP. I don't intend to cover the Installation of Fedora, or the actual steps to generate the build (manifests, proprietary code, etc).
-Cyril279

You created Android with Fedora?
FEDORA 30 Lineage 15.0
Code:
bash-5.0# java -version
java version "1.8.0_221"
Java(TM) SE Runtime Environment (build 1.8.0_221-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.221-b11, mixed mode)
Code:
ninja: no work to do.
[2/3] glob vendor/*/*/Android.bp
[1/1] /home/U-16/WORKING_DIRECTORY/out...ORKING_DIRECTORY/out/soong/build.ninja
18:43:57 *******************************************************
18:43:57 You are attempting to build with an unsupported JDK.
18:43:57 
18:43:57 Only an OpenJDK based JDK is supported.
18:43:57 
18:43:57 Please follow the machine setup instructions at:
18:43:57     https://source.android.com/source/initializing.html
18:43:57 *******************************************************
18:43:57 stop
make: *** [build/core/main.mk:21: run_soong_ui] error 1
bash-5.0#
29th October 2019, 01:25 AM |#5  
cyril279's Avatar
OP Senior Member
Thanks Meter: 2,082
 
More
Quote:
Originally Posted by taras-fedora-syn

You created Android with Fedora?

Yes. Let the errors be your guide.
The Following User Says Thank You to cyril279 For This Useful Post: [ View ] Gift cyril279 Ad-Free
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes