Introduction
If you have tried to build Android on systems other than Ubuntu (or Ubuntu based systems) you may have noticed, that there are pretty much no guides for other systems.
I finally set up my openSuSE to build CM9 successfully, and would like to share the process with you.
I will also try to adopt this guide for CM10 if i find the time.
If you find mistakes feel free to post them here or PM me.
Contents
1. Requirements
2. About this guide
3. Install "Oracle JDK"
4. Install other needed packages
5. Install "make 3.81"
Note: Other versions won't work.
6. Install "Android SDK"
Note: This is pretty straightforward. I will add this section later.
7. Set up source directories
8. Set up "repo"
Note: "repo" is a tool by Google, created to make access to git and gerrit very, very easy.
9. Set up repositories
10. Update source code
11. Update device specific source code
12. Copy proprietary files
Note: This only needs to be run once. You will need CyanogenMod 9 running on the device you are building for to complete this.
13. Download prebuilts
14. Build CyanogenMod 9
15. Done!
You now should have a CWM-flashable .zip file ~/android/system/out/target/product/maguro/cm-9-XXXXX-UNOFFICIAL-bacon.zip.
16. Possible build errors on openSuSE
Because Ubuntu is based on Debian and openSuSE is based on Slackware, you will probable get some build errors. In post 2 is a list of errors that can occur and how to fix them.
Credits
If you have tried to build Android on systems other than Ubuntu (or Ubuntu based systems) you may have noticed, that there are pretty much no guides for other systems.
I finally set up my openSuSE to build CM9 successfully, and would like to share the process with you.
I will also try to adopt this guide for CM10 if i find the time.
If you find mistakes feel free to post them here or PM me.
Contents
- Requirements
- About this guide
- Install "Oracle JDK"
- Install other needed packages
- Install "make 3.81"
- Install "Android SDK"
- Set up source directories
- Set up "repo"
- Set up repositories
- Update source code
- Update device specific source code
- Copy proprietary files
- Download prebuilts
- Build CyanogenMod 9
- Done!
- Possible build errors on openSuSE
Credits
1. Requirements
- openSuSE 12.1 64bit (may work on other versions too)
- a good internet connection
- as much RAM as possible (at least 2GB to finish a build, but that will take very, very long.)
- patience
- common sense
2. About this guide
- Lines beginning with '$' are supposed to be entered in shell (without the $ sign).
- File names are bold.
- This guide assumes that you set up the sources at ~/android/system/. Feel free to change that.
- bacon = device name (e.g. i9300 for Samsung Galaxy SIII I9300. See CyanogenMod Homepage for other devices.)
3. Install "Oracle JDK"
- Download latest jdk-6uXX-linux-x64-rpm.bin from http://www.oracle.com/technetwork/java/javase/downloads/jdk6-downloads-1637591.html
- $ <downloadfolder>/jdk-6uXX-linux-x64-rpm.bin -x
- Open <downloadfolder> in your file manager
- Right click jdk-6uXX-linux-x64-rpm -> open with -> Install Software
- YaST Software Manager will open up.
- DON'T click accept yet.
- Search for openJDK and check uninstall for ALL openJDK packages.
- DON'T click accept yet, go to next chapter.
4. Install other needed packages
- Search and install following packages with YaST
- git
- gnupg
- flex
- bison
- gperf
- SDL-devel
- esound-devel
- wxGTK-devel
- zip
- curl
- ncurses-devel
- ncurses-devel 32bit
- zlib-devel
- zlib-devel 32bit
- gcc-c++
- glibc-devel 32bit
- libstdc++ 32bit
- mesa libs
- Now click accept.
5. Install "make 3.81"
Note: Other versions won't work.
- Download source from http://ftp.gnu.org/gnu/make/make-3.81.tar.gz.
- Extract downloaded file.
- $ cd <extracted folder>
- $ ./configure
- $ make
- $ make install
6. Install "Android SDK"
Note: This is pretty straightforward. I will add this section later.
7. Set up source directories
- $ mkdir ~/android
- $ mkdir ~/android/system
- $ mkdir ~/android/cache
8. Set up "repo"
Note: "repo" is a tool by Google, created to make access to git and gerrit very, very easy.
- $ mkdir ~/bin
- $ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
- $ chmod a+x ~/bin/repo
- Open ~/.bashrc in a file editor (e.g. kwrite)
- Add the following line:
- PATH=~/bin:$PATH
- Save and close.
- Close your shell and re-open it.
9. Set up repositories
- $ cd ~/android/system
- $ repo init -u git://github.com/CyanogenMod/android.git -b ics
10. Update source code
- $ cd ~/android/system
- $ repo sync -jX
- X = number of connections. Try X = 1 if there are problems downloading.
- This will take a while.
11. Update device specific source code
- $ cd ~/android/system
- $ . build/envsetup.sh && breakfast bacon
12. Copy proprietary files
Note: This only needs to be run once. You will need CyanogenMod 9 running on the device you are building for to complete this.
- Connect the phone via USB.
- Install USB drivers to get ADB access.
- $ cd ~/android/system/device/<manufacturer>/<devicename>
- $ ./extract-files.sh
13. Download prebuilts
- $ ~/android/system/vendor/cm/get-prebuilts
14. Build CyanogenMod 9
- $ ~/android/system
- $ . build/envsetup.sh && brunch bacon
15. Done!
You now should have a CWM-flashable .zip file ~/android/system/out/target/product/maguro/cm-9-XXXXX-UNOFFICIAL-bacon.zip.
16. Possible build errors on openSuSE
Because Ubuntu is based on Debian and openSuSE is based on Slackware, you will probable get some build errors. In post 2 is a list of errors that can occur and how to fix them.
Credits
- CyanogenMod Team
- CyanogenMod Wiki
- The Software Rouge (http://thesoftwarerogue.blogspot.de/2011/11/building-android-ics-ice-cream-sandwich.html)
Note: I got the fixes for build errors from some page in Google Groups. I can't find it anymore. If someone finds it, please PM me.
Last edited: