[TUT] CM6 / CM7 / Kernel Compile Step by Step - XPERIA X10 Q&A, Help & Troubleshooting

1) You need the following:
-Python 2.4 -- 2.7, which you can download from python.org.
Or:
Code:
$ sudo add-apt-repository ppa:fkrull/deadsnakes
$ sudo apt-get update
$ sudo apt-get install python2.5
-JDK 6 if you wish to build Gingerbread or newer
or
-JDK 5 for Froyo or older.
You can download both from java.sun.com.
Or:
Code:
$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
$ sudo add-apt-repository "deb-src http://archive.canonical.com/ubuntu lucid partner"
$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk-
Git 1.5.4 or newer. You can find it at git-scm.com.
Or:
Code:
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install git-core-(optional) Valgrind, a tool that will help you find memory leaks, stack corruption, array bounds overflows, etc.
Download from valgrind.org.
Or:
Code:
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install valgrind
2) Install required packages.
Code:
$ sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev
lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev
3) Download the repo:
Code:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ curl http://android.git.kernel.org/repo > ~/bin/repo
$ chmod a+x ~/bin/repo6) Initialize the repo:
Code:
$ mkdir WORKING_DIRECTORY
$ cd WORKING_DIRECTORYF
or master branch:
Code:
$ repo init -u git://android.git.kernel.org/platform/manifest.git
For specific branch other than Gingerbread you would put in Donut, Eclair, Froyo, or Gingerbread where it currently says "gingerbread" without the parenthesis:
Code:
$ repo init -u git://android.git.kernel.org/platform/manifest.git -b gingerbread
4) When prompted, please configure Repo with your real name and email address. To use the Gerrit code-review tool, you will need an email address that is connected with a registered Google account. Make sure this is a live address at which you can receive messages. The name that you provide here will show up in attributions for your code submissions.
5) Gather the files:
Code:
$ repo sync
6) Verify and insert public key block:
Code:
$ gpg --import
Code:
-----BEGIN PGP P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BBMZzKMX
LWBGWE0znfRrnczI5p49i2YZJAjyX1P2WzmScK49CV82dzLo71 MnrF6fj+Udtb5+
OgTg7Cow+8PRaTkJEW5Y2JIZpnRUq0CYxAmHYX79EMKHDSThf/8AAwUIAJPWsB/M
pK+KMs/s3r6nJrnYLTfdZhtmQXimpoDMJg1zxmL8UfNUKiQZ6esoAWtDg pqt7Y7s
KZ8laHRARonte394hidZzM5nb6hQvpPjt2OlPRsyqVxw4c/KsjADtAuKW9/d8phb
N8bTyOJo856qg4oOEzKG9eeF7oaZTYBy33BTL0408sEBxiMior 6b8LrZrAhkqDjA
vUXRwm/fFKgpsOysxC6xi553CxBUCH2omNV6Ka1LNMwzSp9ILz8jEGqmU tkBszwo
G1S8fXgE0Lq3cdDM/GJ4QXP/p6LiwNF99faDMTV3+2SAOGvytOX6KjKVzKOSsfJQ
hN0DlsIw8hqJc0WISQQYEQIACQUCSedYRAIbDAAKCRDorT+Bmr EOeCUOAJ9qmR0l
EXzeoxcdoafxqf6gZlJZlACgkWF7wi2YLW3Oa+jv2QSTlrx4KL M=
=Wi5D
-----END PGP PUBLIC KEY BLOCK-----
7) After copying and pasting the public key block press Crtl+D to end the input.
8) Compiling:
Code:
$ source build/envsetup.sh
Or:
Code:
$ . build/envsetup.sh
9) Issue:
Code:
$ lunch
10) Pick your poison.
11) Now issue:
Code:
$ make
12) Now just cross your fingers and hope it all works out!
13) Issue this command to create a flashable zip:
Code:
$ make otapackage
Or if you want to test on an emulator:
Code:
$ emulator
15) If all went well you can either run your build on an emulator or flash it on a device.
Code:
Please note that you have already selected your build target with lunch, and it is unlikely at best to run on a different target than it was built for.
~How To Add A Device To The List~
1) Find the github for your device you wish to add. (For me it is the HTC Hero CDMA)
2) Now navigate to the location you are going clone the device tree to:
Code:
$ cd WORKING_DIRECTORY/device/htc3) Clone the github device tree from remote to local: (The heroc would be whatever you want that folder to be named so make sure it is whatever standard name would be for your device, example: Nexus One [Passion], Nexus S [Crespo], Motorola Droid [Sholes], HTC Incredible [Inc], etc.)
Code:
git clone git://github.com/wjb/android_device_htc_heroc.git -b gingerbread heroc
3) Now navigate into the folder:
Code:
$ cd heroc
4) Setup Device Specific Make Files:
Code:
$ ./setup-makefiles.sh
5) Prepare To Copy Device Proprietary Files To Vendor Tree:
Code:
$ cd prebuilt
6) Copy Proprietary Files To Vendor Tree:
Code:
$ cp -r proprietary WORKING_DIRECTORY/vendor/htc/heroc
7) Navigate back to your home directory for building:
Code:
$ cd ~/WORKING_DIRECTORY
8) Prepare To Compile:
Code:
$ source build/envsetup.sh
Or:
Code:
$ . build/envsetup.sh
9) Get your list of devices:
Code:
$ lunch
10) Pick your poison.
11) Now compile:
Code:
$ make
Or if you want a flashable zip:
Code:
$ make otapackage
Compiling kernel:
You will need sdk / ndk packages from Google:
mkdir KERNEL_DIRECTORY
cd to KERNEL_DIRECTORY
Code:
ARCH=arm CROSS_COMPILE=???/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- make semc_?????_defconfig
or
Unpack config.gz to KERNEL_DIRECTORY as .config from kernel.sin --- how? Simple use hexeditor and search two times for gzip magic 1F8B08 cut all before that and you have config.gz
then
ARCH=arm CROSS_COMPILE=???/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- make
Compiling invidual packages:
Code:
make [ module name ]

Why this so down this is a huge guide no one interested?

THANKS Man I was wondering how to do this, thanks a lot this guide will help many people. And others will understand the hard work that involves creating a custom kernel or rom.
This guide is for debian based distributions
Great job aZuZu
Sent from my X10a using xda premium

Related

[TUT] CM6 / CM7 / Kernel Compile Step by Step

1) You need the following:
-Python 2.4 -- 2.7, which you can download from python.org.
Or:
Code:
$ sudo add-apt-repository ppa:fkrull/deadsnakes
$ sudo apt-get update
$ sudo apt-get install python2.5
-JDK 6 if you wish to build Gingerbread or newer
or
-JDK 5 for Froyo or older.
You can download both from java.sun.com.
Or:
Code:
$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
$ sudo add-apt-repository "deb-src http://archive.canonical.com/ubuntu lucid partner"
$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk-
Git 1.5.4 or newer. You can find it at git-scm.com.
Or:
Code:
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install git-core-(optional) Valgrind, a tool that will help you find memory leaks, stack corruption, array bounds overflows, etc.
Download from valgrind.org.
Or:
Code:
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install valgrind
2) Install required packages.
Code:
$ sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev
lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev
3) Download the repo:
Code:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ curl http://android.git.kernel.org/repo > ~/bin/repo
$ chmod a+x ~/bin/repo6) Initialize the repo:
Code:
$ mkdir WORKING_DIRECTORY
$ cd WORKING_DIRECTORYF
or master branch:
Code:
$ repo init -u git://android.git.kernel.org/platform/manifest.git
For specific branch other than Gingerbread you would put in Donut, Eclair, Froyo, or Gingerbread where it currently says "gingerbread" without the parenthesis:
Code:
$ repo init -u git://android.git.kernel.org/platform/manifest.git -b gingerbread
4) When prompted, please configure Repo with your real name and email address. To use the Gerrit code-review tool, you will need an email address that is connected with a registered Google account. Make sure this is a live address at which you can receive messages. The name that you provide here will show up in attributions for your code submissions.
5) Gather the files:
Code:
$ repo sync
6) Verify and insert public key block:
Code:
$ gpg --import
Code:
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
mQGiBEnnWD4RBACt9/h4v9xnnGDou13y3dvOx6/t43LPPIxeJ8eX9WB+8LLuROSV
lFhpHawsVAcFlmi7f7jdSRF+OvtZL9ShPKdLfwBJMNkU66/TZmPewS4m782ndtw7
8tR1cXb197Ob8kOfQB3A9yk2XZ4ei4ZC3i6wVdqHLRxABdncwu5hOF9KXwCgkxMD
u4PVgChaAJzTYJ1EG+UYBIUEAJmf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TyOJo856qg4oOEzKG9eeF7oaZTYBy33BTL0408sEBxiMior6b8LrZrAhkqDjA
vUXRwm/fFKgpsOysxC6xi553CxBUCH2omNV6Ka1LNMwzSp9ILz8jEGqmUtkBszwo
G1S8fXgE0Lq3cdDM/GJ4QXP/p6LiwNF99faDMTV3+2SAOGvytOX6KjKVzKOSsfJQ
hN0DlsIw8hqJc0WISQQYEQIACQUCSedYRAIbDAAKCRDorT+BmrEOeCUOAJ9qmR0l
EXzeoxcdoafxqf6gZlJZlACgkWF7wi2YLW3Oa+jv2QSTlrx4KLM=
=Wi5D
-----END PGP PUBLIC KEY BLOCK-----
7) After copying and pasting the public key block press Crtl+D to end the input.
8) Compiling:
Code:
$ source build/envsetup.sh
Or:
Code:
$ . build/envsetup.sh
9) Issue:
Code:
$ lunch
10) Pick your poison.
11) Now issue:
Code:
$ make
12) Now just cross your fingers and hope it all works out!
13) Issue this command to create a flashable zip:
Code:
$ make otapackage
Or if you want to test on an emulator:
Code:
$ emulator
15) If all went well you can either run your build on an emulator or flash it on a device.
Code:
Please note that you have already selected your build target with lunch, and it is unlikely at best to run on a different target than it was built for.
~How To Add A Device To The List~
1) Find the github for your device you wish to add. (For me it is the HTC Hero CDMA)
2) Now navigate to the location you are going clone the device tree to:
Code:
$ cd WORKING_DIRECTORY/device/htc3) Clone the github device tree from remote to local: (The heroc would be whatever you want that folder to be named so make sure it is whatever standard name would be for your device, example: Nexus One [Passion], Nexus S [Crespo], Motorola Droid [Sholes], HTC Incredible [Inc], etc.)
Code:
git clone git://github.com/wjb/android_device_htc_heroc.git -b gingerbread heroc
3) Now navigate into the folder:
Code:
$ cd heroc
4) Setup Device Specific Make Files:
Code:
$ ./setup-makefiles.sh
5) Prepare To Copy Device Proprietary Files To Vendor Tree:
Code:
$ cd prebuilt
6) Copy Proprietary Files To Vendor Tree:
Code:
$ cp -r proprietary WORKING_DIRECTORY/vendor/htc/heroc
7) Navigate back to your home directory for building:
Code:
$ cd ~/WORKING_DIRECTORY
8) Prepare To Compile:
Code:
$ source build/envsetup.sh
Or:
Code:
$ . build/envsetup.sh
9) Get your list of devices:
Code:
$ lunch
10) Pick your poison.
11) Now compile:
Code:
$ make
Or if you want a flashable zip:
Code:
$ make otapackage
Compiling kernel:
You will need sdk / ndk packages from Google:
mkdir KERNEL_DIRECTORY
cd to KERNEL_DIRECTORY
Code:
ARCH=arm CROSS_COMPILE=???/SDK/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- make semc_?????_defconfig
or
Unpack config.gz to KERNEL_DIRECTORY as .config from kernel.sin --- how? Simple use hexeditor and search two times for gzip magic 1F8B08 cut all before that and you have config.gz
then
ARCH=arm CROSS_COMPILE=???/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- make
Compiling invidual packages:
Code:
make [ module name ]
Guess what bro.. finally got it! (kernel thingy)
Chum, you are legend. This is awesome.
Good work.But can you explain this for compile NobodyAtall sources? Thanks.

[How-TO] Building badadroid CM10.1 from source code

Hi all
This is a TUT for building badadroid CM 10 kernel from source code
Step 1 : Setup your build environment
1.Setup Ubuntu 64-bit (I am using 12.04 but i recommend using 11.10)
-http://releases.ubuntu.com/
-It is recommended to install Ubuntu on a 40GB ext4 partition to have enough space for your source code
Step 2 : Install required packages to build a ROM (we are compiling kernel but you can build the ROM too)
-first Run this command to update your package lists
Code:
sudo apt-get update
-Run this command in terminal to download packages (Just copy-paste)(press y and enter when promoted)
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos \
python-markdown libxml2-utils xsltproc zlib1g-dev:i386
-Run this command to fix an incorrect library with Ubuntu 11.10 and above
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Step 3 : Preparing Repo
-Run these commands (each line is a command)
Code:
mkdir ~/bin
export PATH=~/bin:$PATH
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > repo
chmod a+x ~/bin/repo
if any error happen with these commands don't ever re-run it with sudo(I did that mistake before )....post your error
Step 4 : Downloading Repo sources(maybe later we can separate kernel source from ROM)
-Run these commads
Code:
cd ~
mkdir wave
cd wave
repo init -u git://github.com/CyanogenMod/android.git -b jellybean
cd .repo
wget https://raw.github.com/Badadroid/android_wave_local_manifest/jellybean/local_manifest.xml
cd ..
repo sync -j8
Notes
-repo sync command will take really a lot of time to finish depending on your Internet connection speed (about 10 GBs of download)
-If you just want to pause this download and continue later just close terminal then when you want to continue run these commands
Code:
cd ~
cd wave
repo sync -j8
Step 5 : Including tools for the build
-Run these commands just one time
Code:
cd vendor/cm/
./get-prebuilts
cd ../../
-Then run this command before each build
Code:
. build/envsetup.sh
Step 6 : Building
-To build kernel run these commands
Code:
lunch cm_wave-userdebug
make bootimage
-To build ROM run this command
Code:
brunch wave
Big Thanks to:
-Linux developers
-badadroid team
-CM 10 developers
-xda-university
-anyone i forgot to mention
Got any Questions just ask
Best Regards
For repo sync a "-j8" mean make 8 downloading pattern at same time, better if you use more like 32 for more fast downloading
For brunch wave -j2 mean use double core if you got 4 core then -j4
You can install :
sudo apt-get install ccache
add "export USE_CCACHE=1" without quote on your /home/USER/.bashrc
Then command like this :
ccache -M 6 (mean 6giga cache)
ccache -C clear all cache
ccache -c clean old cache
I felt free to translate this tutorial into German...
You can red German version here...
Good. Just btw - it ain't no CM10.1 but 10.0. ;]
Thank u so much for the guide. (mylove90 and Tigrouzen)
What exactly does this badadroid look like and does it mean the samsung bada os + the android os merged together. And How does it work?
Sent from my GT-I9300 using xda premium

[GUIDE] Build CM12.1 from source for Note 3 Neo

I would like to have more roms for this device and guide how to make rom based on my source/work
Note: There is no need to credit me , but yeah i will admire if you mention me for this
SO before we start lets get some things cleared
You have quad core CPU
You have atleast 4GB ram
Stable Internet
Linux Installed ( I am using ubuntu 14.04 LTS)
Brain.apk
Getting started
Installing the required packages
Easy just open a terminal.
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 \
lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache \
libgl1-mesa-dev libxml2-utils xsltproc unzip
Installing JAVA
Code:
sudo apt-get update
sudo apt-get install openjdk-7-jdk
Getting ready with repo
Code:
mkdir ~/bin && PATH=~/bin:$PATH && echo 'PATH=~/bin:$PATH' >> ~/.bashrc && curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo && chmod a+x ~/bin/repo
Settings up the GIT
Before doing the below step head over to github.com and make a git account
Code:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
Making CyanogeMod 12.1
First we will make a folder where we can hold our repos and source codes
Code:
mkdir ~/cm-12.1/
Now we will sync the cm sources.. depending on your internet speed it may take mins , hours and days. (for me 30 to 60 mins)
Code:
cd ~/cm-12.1/ && repo init -u https://github.com/CyanogenMod/android.git -b cm-12.1
repo sync -j4
Getting note 3 neo codes, vendor and etc
Code:
cd ~/cm-12.1/ && git clone https://github.com/FireLord1/android_.repo_local_manifests_n3n.git -b cm-12.1 .repo/local_manifests
repo sync -j4 --force-sync
Building the ROM
Code:
cd ~/cm-12.1
source build/envsetup.sh
lunch (now select your device 3g is hl3g and 4g is hllte and select userdebug)
brunch (your device codename like cm_hl3g-userdebug)
Thats all for now if you face any error try googling the dev is not free man!
Thank U fire lord U can do anything thanks For showing interest on our device
nice thank you very much for this
but i hate ubuntu's terminal , no ctrl+c, ctrl+v -.-
EDit
bash: /home/berk/bin/repo: Permission denied
i get this error when i setup the repo before downloading
Any help? @FireLord
TimurAlaskara_TR said:
nice thank you very much for this
but i hate ubuntu's terminal , no ctrl+c, ctrl+v -.-
EDit
bash: /home/berk/bin/repo: Permission denied
i get this error when i setup the repo before downloading
Any help? @FireLord
Click to expand...
Click to collapse
Try doing in superuser mode
Code:
sudo su
Sent from FireLord's device

Establishing Android Build Enviroment under openSuse Leap

Tutorial how set up Android Build Enviroment on openSUSE Leap
If this help's u hit Thanks!
1) If you don’t have fresh installed openSUSE Leap first you need remove all Java installation, many people might have the wrong version of Java installed.
Code:
sudo zypper remove openjdk-* icedtea-* icedtea6-*
Follow the on-screen instructions to remove any stray Java versions. Otherwise, move on to the next step.
2) Install the main build tools with this command:
Code:
sudo zypper install bison curl flex git gnupg gperf libesd-devel liblz4-1_4 ncurses-devel libSDL-devel python-wxWi dgets-devel libxml2-2 libxml2-tools lzop java-1.7.0-openjdk java-1.7.0-openjdk-devel schedtool squashfs libxslt1 zip zlib-devel make gcc-c++
Appendx A to 2:
To setup maven which is needed for building:
1. Download maven:
wget http://mirrors.ibiblio.org/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
2. Extract the file
tar -xvzf apache-maven-3.3.9-bin.tar.gz /tmp
3. Move to /opt/ folder
sudo mv /tmp/apache-maven-3.3.9 /opt/
4. Update environment, cd to home directory
cd ~
nano .bashrc
5. Append the path
export PATH=$PATH:/opt/apache-maven-3.3.9/bin
6. Reload
source .bashrc
7. Verify maven
mvn --version
Appendix B to 2:
For 64-bit system also install:
sudo zypper install glibc-devel-32bit ncurses-devel-32bit readline-devel-32bit libz1-32bit
>> build-essential << is Ubuntu meta package which in openSUSE is devel_basis
And u can install it by command
sudo zypper install --type pattern devel_basis
Select y to what it is offering to install.
3) Repo install...
mkdir ~/bin && curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo && chmod a+x ~/bin/repo
Appendix to 3:
To fix repo sync u will need install this:
sudo zypper install libpth20-32bit
maybe this to:
sudo zypper install openjdk-8-devel
4) Use your favorite text editor to open ~/.bashrc - I like nano:
Code:
nano ~/.bashrc
By default nano is not installed so install it by command:
sudo zypper install nano
5) At the very bottom (use the Page Down key) paste this code to a new line:
Code:
export PATH=~/bin:$PATH
export USE_CCACHE=1
6) Save it. In nano that would be Ctrl-O and then Enter. Then Ctrl-X to exit back to a prompt. Restart bash:
Code:
source ~/.bashrc
7) In the terminal, navigate to where you would like to download the Android source code. The commands below will make it in your home folder.
Code:
mkdir ~/android
cd ~/android
8) Now you're going to initialize the repo. This is where you decide the flavor of Android you want to build, i.e. AOKP, CyanogenMod, AOSP etc.
For the purposes of this tutorial, here's the command for Cyanogenmod 13 (Marshmallow) :
Code:
repo init -u https://github.com/CyanogenMod/android.git -b cm-13.0
9) Time to get the source, many gigabytes of downloading await.
Don't worry, it's automated. It's the last one!
Code:
repo sync
Check back periodically every hour or so. It all depends on how fast your connection is.
That's it! Everything should be ready to go.
Thanks for the guide
In Tumbleweed, the package is liblz4-1_7
There is a typo, it should be python-wxWidgets-devel
Also, the link to repo should be complete:
Code:
http://commondatastorage.googleapis.com/git-repo-downloads/repo
Thanks
does it worth to have a separate user for builds?
Android Build Enviroment for openSUSE tumbleweed early 2019
Sorry for necromancing this old thread, but I've recently switched to openSUSE and these are the dependencies that I've used to successfully build LineageOS-16.0.:
Code:
sudo zypper install --type pattern devel_basis
sudo zypper install bison java-1_8_0-openjdk java-1_8_0-openjdk-devel SDL-devel python-wxWidgets-devel lzop schedtool squashfs glibc-devel-32bit ncurses-devel-32bit ncurses5-devel-32bit readline-devel-32bit ccache libz1-32bit python-xml bc
You can find maven here:
https://software.opensuse.org/package/maven
and android-tools here:
https://software.opensuse.org/package/android-tools
Dependencies already included by default in my system (not included in "devel_basis") that may you don't have but you need:
Code:
gpg2 liblz4-1 libxml2-2 libxml2-tools libxslt-tools zip
Just sharing because this post will (probably) save some time to someone in the same situation in early 2019.
_mone said:
Sorry for necromancing this old thread, but I've recently switched to openSUSE and these are the dependencies that I've used to successfully build LineageOS-16.0.:
Code:
sudo zypper install --type pattern devel_basis
sudo zypper install bison java-1_8_0-openjdk java-1_8_0-openjdk-devel SDL-devel python-wxWidgets-devel lzop schedtool squashfs glibc-devel-32bit ncurses-devel-32bit ncurses5-devel-32bit readline-devel-32bit ccache libz1-32bit python-xml bc
You can find maven here:
https://software.opensuse.org/package/maven
and android-tools here:
https://software.opensuse.org/package/android-tools
Dependencies already included by default in my system (not included in "devel_basis") that may you don't have but you need:
Code:
gpg2 liblz4-1 libxml2-2 libxml2-tools libxslt-tools zip
Just sharing because this post will (probably) save some time to someone in the same situation in early 2019.
Click to expand...
Click to collapse
Thanks for this. I'm still getting an error and wondering what SSL packages you have installed? I'm obviously missing one below.
EDIT: i kept installing SSL packages until it worked, can't remember which one did the trick but it seems it's chugging along now
/run/media/david/4d58d760-2359-46fb-b95b-1b374cb34428/android/lineage/kernel/oneplus/sdm845/scripts/extract-cert.c:21:10: fatal error: openssl/bio.h: No such file or directory
#include <openssl/bio.h>
^~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.host:101: scripts/extract-cert] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/run/media/david/4d58d760-2359-46fb-b95b-1b374cb34428/android/lineage/kernel/oneplus/sdm845/Makefile:558: scripts] Error 2
make[1]: Leaving directory '/run/media/david/4d58d760-2359-46fb-b95b-1b374cb34428/android/lineage/out/target/product/fajita/obj/KERNEL_OBJ'
make: *** [Makefile:152: sub-make] Error 2
make: Leaving directory '/run/media/david/4d58d760-2359-46fb-b95b-1b374cb34428/android/lineage/kernel/oneplus/sdm845'
[ 0% 70/94167] //external/protobuf:aprotoc clang++ src/google/protobuf/compiler/javanano/javanano_extension.cc [linux_glibc]
ninja: build stopped: subcommand failed.
12:41:48 ninja failed with: exit status 1

building AOSP for Intel Platform(NEED HELP)

Actually I have read so many topics about building Android Open Source Project for Intel based platform , they are such Android X86 , OS Remix and AOSP_IA (AOSP for Intel Architecture).
Now I want to build an AOSP for my tablet which is based on Intel Atom ( Z3735F), 10.1 inches display , 2 GB RAM and INSYDE UEFI bios type , device codename :inet_phone_32
My tablet runs Android 5.1.1_r1 (AOSP_AI TYPE) , there is no back up or rooting technique for this tablet ,so I decide to build an AOSP ROM for this tablet ,if the Android OS has a problem , I am able to flash it again and survive it.
I have tried in 3 ways to build an AOSP for my tablet but no one is correct so, I need an android developer or android expert to guide me and modify my mistakes .
According to google source :
these are steps for building AOSP for a device :
1. install , Java 8 ,git, curl , ($ sudo apt-get install "App")
2. Setting up ccache
3. install repo
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
4. creating working Directory
$ mkdir WORKING_DIRECTORY
$ cd WORKING_DIRECTORY
5.git configuration (name and email)
$ git config --global user.name "Your Name"
$ git config --global user.email "[email protected]"
6.inititilized repo and download the proper ROM
$ repo init -u https://android.googlesource.com/platform/manifest
$ repo init -u https://android.googlesource.com/platform/manifest -b android-5.1.1_r1
$ repo sync
7.$ . build/envsetup.sh
8. choosing the target
$ lunch inet_phone_32-userdebug
9.$ make(m) -j4-efi
Click to expand...
Click to collapse
unfortunately , it wont flash on my tablet !
According to Android X86 : these are steps for building an AOSP_X86
1. install , Java 8 ,git, curl , ($ sudo apt-get install "App")
2. Setting up ccache
3. install repo
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
4. creating working Directory
$ mkdir WORKING_DIRECTORY
$ cd WORKING_DIRECTORY
5.git configuration (name and email)
$ git config --global user.name "Your Name"
$ git config --global user.email "[email protected]"
6.inititilized repo and download the proper ROM
$ repo init -u http://scm.osdn.net/gitroot/android-x86/manifest
$ repo init -u http://scm.osdn.net/gitroot/android-x86/manifest -b lollipop-x86
$ repo sync --no-tags --no-clone-bundle
7.$ . build/envsetup.sh
8. choosing the target
as it was said on Android X86 instruction :
$ lunch android_x86-userdebug
9.$ make(m) -j4-efi
Click to expand...
Click to collapse
unfortunately , it also wont flash on my tablet !
According to Android on Intel Platform , these are below steps for building AOSP_IA:
Dependencies:
Follow initial steps from here: https://source.android.com/source/initializing.html
Additional Dependencies:
sudo apt-get install git-core gnupg flex bison gperf build-essential lunch zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip squashfs-tools python-mako distcc ccache python2.7 python-mako gettext mtools qt-sdk
Additional packages to be installed when developing in a Ubuntu chroot environment (created with debootstrap):
bc, dosfstools, mtools, libssl-dev
Github Account and SSH Keys:
Ensure you have your ssh key setup with your Github account:
https://help.github.com/articles/generating-an-ssh-key/
https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/
https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/
Setup CCache (Speeds up compilation):
https://source.android.com/source/initializing.html#setting-up-ccache
Downloading the source code
Using SSH protocol:
repo init -u [email protected]:android-ia/manifest.git
If you prefer using https:
repo init -u https://github.com/android-ia/manifest.git
Sync Code
repo sync
Building the OS image
. build/envsetup.sh
lunch androidia_64-eng
m -j4 android_ia-efi
Flash Image:
Unmount USB: sudo umount /dev/sdg* (Check where usb is mounted and change appropriately)
Flash the image: sudo dd if=out/target/product/androidia_64/androidia_64.img of=/dev/sdg (Check where usb is mounted and change appropriately)
Click to expand...
Click to collapse
which is not flashing on my tablet
Please kindly help me where are my mistakes , how can I modify it , if I dont know missing information , please contribute ,thank you

Categories

Resources