Problem building Resurrection Remix for Z5P - Xperia Z5 Q&A, Help & Troubleshooting

Hi, I want to make RR for our Z5 Premium; using the CTXz GUIDE and Resurrection one
Everything works great, 'til final building
I just mark the step in case i'm not doing it right
1. OpenJDK
2. Necessaries tools
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 maven schedtool
I type the whole line in terminal
3. Set up cache, then reboot
4. Git config' (Username + Email)
5. Creation of "Bin" folder into my /home/myname/ and changing permissions of it
6. Now I create "RR" in /home/myname/
7. I switch to this folder (cd ~/RR/)
8. repo init the RR sources
Code:
repo init -u [url]https://github.com/ResurrectionRemix/platform_manifest.git[/url] -b marshmallow
9. repo sync (Waaaaaiting)
10. Once it's done, I have to deal with Z5 files (I suppose this is the part where something goes wrong)
Code:
cd /.repo
Code:
git clone https://github.com/Sony-Kitakami/and..._manifests.git local_manifests
11. cd to go to /RR/ then
Code:
repo sync --force-sync
12.
Code:
source build/envsetup.sh
3.
Code:
lunch cm_satsuki-userdebug
14.
Code:
mka clobber && mka bacon
15. the rom seems in build (many lines of code)
At the end it wrote an error message, and in ~/RR/out/target/product/satsuki/
I only get 3 folders like
system (ridiculous size -> 28.7ko)
obj
root
& 2 .mk files
The problem comes from the step I add Sony files ? , I probably didn't make it right :/
Thanks in advance to anyone who will lose his time with me <3
I got Ubuntu 14.04LTS
Click to expand...
Click to collapse
,
java version "1.7.0_95"
OpenJDK Runtime Environment (IcedTea 2.6.4) (7u95-2.6.4-0ubuntu0.14.04.2)
OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)
Click to expand...
Click to collapse

Set up the terminal so that it at least has 100,000 lines of backlog,
then from the start of entering
mka clobber && mka bacon
copy over the whole log output to e.g. geany
search for error or fail in Document
there must be more output and explaining what went wrong

I'm gonna do that
here it is

Related

[GUIDE] Building CM9 for G2X

I'm always surprised at the lack of good documentation for CM. But I thought I'd put together a quick guide for building CM9 on the G2X (this has been tested only on Ubuntu 11.10 32-bit)
Code:
sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev openjdk-6-jdk pngcrush schedtool
Code:
mkdir -p ~/bin
mkdir -p ~/android/system
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
Code:
cd ~/android/system/
../../bin/repo init -u git://github.com/CyanogenMod/android.git -b ics
This is important:
You'll need to add the following lines to "~/android/system/.repo/manifest.xml"
Code:
<project path="device/lge/p999" name="CyanogenMod/android_device_lge_p999" />
<project path="device/lge/star-common" name="CyanogenMod/android_device_lge_star-common" />
Then you can run:
Code:
../../bin/repo sync -j16
I've had some issues with repo syncing properly, you might have to run this command a few times (don't be afraid to close the console and try running it again if it hangs)
Then you run:
Code:
~/android/system/vendor/cm/get-prebuilts
Please read the following:
In most guides you read, you are told to run "extract-files.sh" with the device plugged in, to pull the proprietary files off the phone. Do not do this. That script hasn't been updated for ICS and doesn't pull the needed files. Do the following instead:
Code:
cd ~
git clone git://github.com/koush/proprietary_vendor_lge.git -b ics
Then, make a new folder inside "~/android/system/vendor" named "lge". Copy the p999 folder inside ~/proprietary_vendor_lge into ~/android/system/vendor/lge.
Then you can run:
Code:
cd ~/android/system
. build/envsetup.sh
brunch p999
Please post any questions here, I'll try my best to answer them. There may be typo' so please let me know if you run into any issues, thanks!
Not to be snide, but maybe a 'tutorial' or link to a thread which explains the individual commands. Some of them I am familiar with, either because something like CD exists on PC as well or through beating my head into a table trying to find explanations of commands and either by way of a quick comment or s/g I get the answer. But I've had a hard time finding an explanation of android-related commands or CWM scripts. In short, for people who aren't noons but aren't Linux savvy or what not, a guide or link would be nice.
Otherwise, sweet! Thanks!
Sent from my LG-P999 using xda premium
@Волк,
If you dont know what something(tool, cmd, etc.) is, type man in your terminal. Ex: man git. You can also type the tool/cmd name and use the help switch. Ex: git --help Sometimes the help switch will vary. Could be --help, -h, or --h. Online Linux man pages can be found at Linux.die.net
-----------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------------------
sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev openjdk-6-jdk pngcrush schedtool
*sudo apt-get is used to install packages in the terminal. The packages above are un-met dependencies such as java, tools, development files/packages, etc.
Also can be done in the software center.
----------------------------------------------------------------------
mkdir -p ~/bin
*mkdir is a tool/cmd to make a directory and the -p is a switch to make a parent directory.
----------------------------------------------------------------------
*The ~ is a command line shortcut. Instead of typing /home/computername/ use the ~ instead.
----------------------------------------------------------------------
mkdir -p ~/android/system
*same as above.
----------------------------------------------------------------------
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
*curl is a tool to transfer data to or from a server, using one of the supported protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP). The command is designed to work without user interaction. curl offers a busload of useful tricks like proxy support, user authentication, FTP upload, HTTP post, SSL connections, cookies, file transfer resume and more. curl is powered by libcurl for all transfer-related features.(Taken from the man pages)
in this case your downloading a git repo and piping it to ~/bin/repo. Type https://dl-ssl.google.com/dl/googlesource/git-repo/repo in your browser without the pipe and see what happens. But piping or directing output can be done by using the > symbol.
----------------------------------------------------------------------
chmod a+x ~/bin/repo
*chmod means to (CH)ange file (MOD)e bits. A is for all users, U is for root only, and O is for other(guests). You can add modes or remove them with the + or - signs. Permissions are r for read, w for write and x for execute. Sometimes you will need to be root to change/modify modes/permissions.
----------------------------------------------------------------------
CD means to (c)hange (d)irectory. Ex: cd /home/ubuntu/Documents/
----------------> I AM NOT TOO FAMILIAR WITH GIT, SVN, ETC.
Thank you for posting this guide. I have not tested it yet because I am out of town for work. I an going to attempt building this weekend. I used to roll my own on CM7 and want to do the same with CM9. Is the packages required to build CM9 the same as CM7 (software environment)?
loganmc10 said:
Please read the following:
In most guides you read, you are told to run "extract-files.sh" with the device plugged in, to pull the proprietary files off the phone. Do not do this. That script hasn't been updated for ICS and doesn't pull the needed files. Do the following instead:
Code:
cd ~
git clone git://github.com/koush/proprietary_vendor_lge.git -b ics
Then, make a new folder inside "~/android/system/vendor" named "lge". Copy the p999 folder inside ~/proprietary_vendor_lge into ~/android/system/vendor/lge.
Then you can run:
Code:
cd ~/android/system
. build/envsetup.sh
brunch p999
Please post any questions here, I'll try my best to answer them. There may be typo' so please let me know if you run into any issues, thanks!
Click to expand...
Click to collapse
you could do this part easier like this
Code:
cd ~/android/system
mkdir vendor
cd vendor
git clone git://github.com/koush/proprietary_vendor_lge.git -b ics
Then rename the folder you cloned to lge. in some cases you can do
Code:
git clone git://github.com/koush/proprietary_vendor_lge.git -b ics lge
and it will name the folder you clone lge for you
At least I do something along those lines.
If it freezes you do not have to close console. Simply push ctrl+z and it will kill the command and you can reissue it again.
codecaine21 said:
@Волк,
If you dont know what something(tool, cmd, etc.) is, type man in your terminal. Ex: man git. You can also type the tool/cmd name and use the help switch. Ex: git --help Sometimes the help switch will vary. Could be --help, -h, or --h. Online Linux man pages can be found at Linux.die.net
Click to expand...
Click to collapse
Beautiful, thanks a ton! Now I don't feel like I'm reading Czech, lol.
Awesome ..Thanks!
loganmc10, that was awesome!
Thanks!
------------------------------------------------------------------------------
edit1:
as proposed by kwes1020 used
git clone git://github.com/koush/proprietary_vendor_lge.git -b ics lge
to get the lge proprietary repo in place..
Image is bootable, has wifi, but no phone..
------------------------------------------------------------------------------
after many times of trying to get thhe repo to sync, I am finally building ICS for my G2x.
The sync would stall with two items remaining. I deleted everything and started over many times. What I finally did was monitor where it was failing and deleted just that directory (prebuilts). Restarted the sync and it completed cleanly. I have bee compiling for about 30 minutes without errors. I hope the final product is bootable.
edit, the final product was bootable. No camera, data, or phone.
Modified steps to build ROM (KOUSH repo not needed)
Steps:
1. sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev openjdk-6-jdk pngcrush schedtool
2. mkdir -p ~/bin
3. mkdir -p ~/android/system
4. use curl to get repo to ~/bin/repo
5. chmod a+x ~/bin/repocd ~/android/system/
6. ../../bin/repo init -u git://github.com/CyanogenMod/android.git -b ics
7. edit manifest.xml and add the following 2 lines..
<project path="device/lge/p999" name="CyanogenMod/android_device_lge_p999" />
<project path="device/lge/star-common" name="CyanogenMod/android_device_lge_star-common" />
8. repo sync -j16
9. ~/android/system/lunch (pick 21 or whatever references cm_p999)
10. ~/android/system/vendor/cm/get-prebuilts
11. cd ~/android/system/device/lge/p999
12. Plug in device and turn usb debugging on
13. ./setup-makefiles.sh
14. ./extract-files.sh
15. cd ~/android/system/
16. make clean && repo sync && brunch p999
THE BUILD SHOULD COMPLETE AFTER STEP 15
17. cd ~/android/system/out/target/product/p999
18. adb push update-cm-9.0.0-RC0-p999-KANG-signed.zip /sdcard/ROM/update-cm-9.0.0-RC0-p999-KANG-signed.zip
19. Boot into recovery, wipe cache, dalvik cache, install update-cm-9.0.0-RC0-p999-KANG-signed.zip, install gapps (currently 03042012)
enjoy..(Data/WIFI/Phone works.. No Camera)
wallhue said:
Edit 2 : IT ALL WORKS NOW (with some tweaks..)
Code:
Steps:
1. sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev openjdk-6-jdk pngcrush schedtool
2. mkdir -p ~/bin
3. mkdir -p ~/android/system
4. use curl to get repo to ~/bin/repo
5. chmod a+x ~/bin/repocd ~/android/system/
6. ../../bin/repo init -u git://github.com/CyanogenMod/android.git -b ics
7. edit manifest.xml and add the following 2 lines..
<project path="device/lge/p999" name="CyanogenMod/android_device_lge_p999" />
<project path="device/lge/star-common" name="CyanogenMod/android_device_lge_star-common" />
8. ~/android/system/lunch (pick 21 or whatever references cm_p999)
8. repo sync -j16
9. ~/android/system/vendor/cm/get-prebuilts
10. cd ~/android/system/device/lge/p999
11. Plug in device and turn usb debugging on
12. ./setup-makefiles.sh
13. ./extract-files.sh
14. cd ~/android/system/
15. make clean && repo sync && brunch p999
THE BUILD SHOULD COMPLETE AFTER STEP 15
16 cd ~/android/system/out/target/product/p999
17 adb push update-cm-9.0.0-RC0-p999-KANG-signed.zip /sdcard/ROM/update-cm-9.0.0-RC0-p999-KANG-signed.zip
18. Boot into recovery, wipe cache, dalvik cache, install update-cm-9.0.0-RC0-p999-KANG-signed.zip, install gapps (currently 03042012)
enjoy..
Click to expand...
Click to collapse
Did the camera work?
wallhue said:
Steps:
1. sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev openjdk-6-jdk pngcrush schedtool
2. mkdir -p ~/bin
3. mkdir -p ~/android/system
4. use curl to get repo to ~/bin/repo
5. chmod a+x ~/bin/repocd ~/android/system/
6. ../../bin/repo init -u git://github.com/CyanogenMod/android.git -b ics
7. edit manifest.xml and add the following 2 lines..
<project path="device/lge/p999" name="CyanogenMod/android_device_lge_p999" />
<project path="device/lge/star-common" name="CyanogenMod/android_device_lge_star-common" />
8. repo sync -j16
9. ~/android/system/lunch (pick 21 or whatever references cm_p999)
10. ~/android/system/vendor/cm/get-prebuilts
11. cd ~/android/system/device/lge/p999
12. Plug in device and turn usb debugging on
13. ./setup-makefiles.sh
14. ./extract-files.sh
15. cd ~/android/system/
16. make clean && repo sync && brunch p999
THE BUILD SHOULD COMPLETE AFTER STEP 15
17. cd ~/android/system/out/target/product/p999
18. adb push update-cm-9.0.0-RC0-p999-KANG-signed.zip /sdcard/ROM/update-cm-9.0.0-RC0-p999-KANG-signed.zip
19. Boot into recovery, wipe cache, dalvik cache, install update-cm-9.0.0-RC0-p999-KANG-signed.zip, install gapps (currently 03042012)
enjoy..(Data/WIFI/Phone works.. No Camera)
Click to expand...
Click to collapse
This will definitely not work. the "extract-files.sh" script hasn't been updated since gingerbread, it doesn't pull all the needed files from the device. Also why do you run "setup-makefiles.sh" before extract-files? It is run at the end of the "extact-files.sh" script, as you can see here:
https://github.com/CyanogenMod/android_device_lge_p999/blob/ics/extract-files.sh
On a final note, there is no need to run "lunch", "brunch" is all that is needed. You can go here for an explanation on the differences between lunch & brunch
I don't think pulling the proprietary files from Koush's repo works properly for the G2X yet, but it's definitely more correct than using the extract-files.sh script (how do you think the build bot builds the ROM's? Do they have all 70 CM devices plugged into the build server? Nope, they use that repo)
Thanks for the tutorial, loganmc10! I have built many CM7 KANG's for the G2x without issue, but I seem to be having some problems with CM9. I figured out what I assumed was the proper way to build CM9 for the G2x a few weeks ago, and your tutorial matches what I did, so I know I'm on the right path, but my CM9 KANG's have a few deal-breaking issues (and possibly others, but I haven't run my KANG's long enough to know of any others):
1.) No 4G/HSDPA+ network, Only EDGE. (Or at least I only see the "E" indicator).
2.) No Wi-Fi Calling. Get "Wi-Fi Calling has stopped" error messages starting immediately after boot.
3.) Camera doesn't work, receive an error message that the camera can't be accessed.
I'd like to know if anyone has created a G2x CM9 KANG without these issues and what they did differently. I know it's possible from running Ricardo Cerqueira's KANG's. Any help would be greatly appreciated.
Holy crap. I want to learn this stuff... but I am lost as sh*t! Any ideas of what I should read or learn so I can eventually follow along!
Sent from my LG-P999 using xda premium
BobbyDukes707 said:
Holy crap. I want to learn this stuff... but I am lost as sh*t! Any ideas of what I should read or learn so I can eventually follow along!
Sent from my LG-P999 using xda premium
Click to expand...
Click to collapse
You gotta at lease be able to read Java, some C++, and have a basic knowledge of how Linux works
and if you want to be lazy you can just add this to your manifest
<project name="koush/proprietary_vendor_lge.git" path="vendor/lge" remote="github" />
no need to fool around with the files from koush they will be placed in the right dir
i build using this command
cd vendor/cm && ./get-prebuilts && cd ../../ && . build/envsetup.sh && brunch p999 CC=gcc-4.4 CXX=g++-4.4 USE_CCACHE=1 -j24 2> warn.log
cd vendor/cm && ./get-prebuilts && cd ../../
for getting prebuilds everything time i build icheck for updates
. build/envsetup.sh
no need to explain i think
brunch p999
since it is less typing then breakfast p999 && mka bacon
CC=gcc-4.4 CXX=g++-4.4
selecting old gcc toolchain
USE_CCACHE=1
yup i want to use ccache should be enabled by default but just to be sure
-j24
building with 24 threats i want to use multiple cores and not just one
2> warn.log
filtering out hose annoying error and write them to warn.log
then i have two terminals one with the building process
and one with "tail -f warn.log" in case i get abuild error
this is interesting
Does anyone know how to get the camera to work after building? Everything else seems to work fine. Thanks!
is there an update to this? koush git isnt working for proprietary_vendor_lge... hmm let me scope his github
edit:
found it here:
https://github.com/x0xhellx0x/proprietary_vendor_lge
da-pharoah said:
is there an update to this? koush git isnt working for proprietary_vendor_lge... hmm let me scope his github
edit:
found it here:
https://github.com/x0xhellx0x/proprietary_vendor_lge
Click to expand...
Click to collapse
For some reason its been deleted from koushs git :-\
Sent from my LG-P999 using Tapatalk 2
Is there a way to shrink down the repo sync to just ics? It seems that its downloading also cm7 as well as every other phone. Humongous sync going on here... Im new at this, but I understand enough and there has to be a way to sync just the stuff needed for ics.
Sent from my LG-P999 using xda app-developers app

[GUIDE]BUILD CM10.1 FROM SOURCE| AIRFLUIP EDITION [Mac + Linux]

GITHUB servers are up!
So I finally thought that I should make a guide to build from source as I feel like the one on the wiki is a bit outdated and isn't very clear.
I will cover both instructions for how to build for Ubuntu 13.04 (64 bit only), and OS X 10.8.x(PLEASE KEEP AT LEAST 35GB Free)
LINUX SPECIFIC INSTRUCTIONS
Please open a terminal window NOW. If you can't do this, don't build android. Please be vigilant in following in-terminal directions, such as pressing enter if it's asking you to do so or confirm something, and using sudo before a command will invoke a password prompt also if entering a new command, please wait until the command exits out to the bash prompt (asking for a new command)
First, let's get rid of the wrong java assuming it's already installed, Android will "REFUSE" to build properly with the wrong java.
Code:
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
Now let's install the correct java,
Code:
sudo add-apt-repository ppa:webupd8team/java && sudo apt-get update && sudo apt-get install oracle-java6-installer && java -version
It should end with this
java version "1.6.0_37"
Java(TM) SE Runtime Environment (build 1.6.0_37-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01, mixed mode)
or something like it.
Now let's set up for making bacon!
Enter this in order to get dependencies for building android, please note that this is about 100-150 megs and will take a few minutes/10ish minutes depending on your computer and internet connection.
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc readline-common libreadline6-dev libreadline6 lib32readline-gplv2-dev libncurses5-dev lib32readline5 lib32readline6 libreadline-dev libreadline6-dev:i386 libreadline6:i386 bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev libsdl1.2-dev libesd0-dev squashfs-tools pngcrush schedtool libwxgtk2.8-dev python
then,
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Repo is required for sucking sources from the cloud, so let's get it
Code:
mkdir ~/bin && curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo && chmod a+x ~/bin/repo
Now let's add this repo thing to our path
Code:
sudo nano ~/.bashrc
at the bottom of the file,add this
Code:
export PATH=~/bin:$PATH
now press Ctrl-O followed by Ctrl-X
restart bash by entering
Code:
source ~/.bashrc
now find a directory to build android in. Personally, I use /home/username/android
so for now let's place it in there
Code:
mkdir ~/android && cd ~/android && mkdir cm && cd cm
SYNC TIME!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!x10^infinity!
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1 && mkdir -p .repo/local_manifests && curl https://raw.github.com/teamuserdebug/page/manifests/manifests/cm10.1-aries.xml > .repo/local_manifests/local_manifest.xml && repo sync
make sure you acknowledge name, color, email etc, or you'll be sitting around and wasting time. this can take anywhere from 1 hr to 1 week depending on your internet connection, personally takes me 3-5 hrs.
go grab a starbucks and come back, you'll need it.
after it's done, make sure you are still in your cm directory.
IT'S BUILDING TIME
OPTIONAL: If you have some free space sitting around eg, 70-100 gigs for building android,
it's time to setup CCACHE, this speeds up future builds by "A LOT"
first edit .bashrc
Code:
sudo nano ~/.bashrc
add these lines at the bottom
Code:
export CCACHE_DIR=/home/-username-/.ccache
(Note, replace "-username-" with your computer username, without the dashes.
Code:
export USE_CCACHE=1
press Ctrl-O followed by Ctrl-X
enter
Code:
[CODE]source ~/.bashrc
[/CODE]
now enable ccache by entering
Code:
prebuilts/misc/linux-x86/ccache/ccache -M50
or
Code:
./prebuilts/misc/linux-x86/ccache/ccache -M50
if the first one doesn't work
BUILD TIME:
enter these
Code:
cd ~/android/cm
Code:
vendor/cm/get-prebuilts
Code:
. build/envsetup.sh
Code:
lunch cm_galaxys4gmtd-userdebug
Code:
mka clobber
Code:
mka bacon
It will be in ~/android/cm/out/products/target/galaxys4gmtd/cm-unofficial-something-something-signed.zip or something like that.
Make sure you don't pick the wrong zip file, because there are 2 or 3 in there.
OS X 10.8.x SPECIFIC INSTRUCTIONS
Please open a terminal window NOW. If you can't do this, don't build android. Please be vigilant in following in-terminal directions, such as pressing enter if it's asking you to do so or confirm something, and using sudo before a command will invoke a password prompt also if entering a new command, please wait until the command exits out to the bash prompt (asking for a new command)
First, let's install java if it's not already installed
Code:
java
Now, we MUST install X-Code otherwise we won't even be able to lunch.
1. Open the App Store
2. Find X-Code,(it's free) and install it [this is a 1+ GB download, and install]
3.Open X-Code and go to preferences. There you find a 'Downloads' tab. Open it and install “Command line tools” It will take a few minutes to download and install
Now let's set up for making bacon!
Download and install MacPorts, not Homebrew, since MacPorts is faster.
You can get the mountain lion pkg installer here
After it is installed, close and open terminal.
edit your bash profile
Code:
sudo nano ~/.bash_profile
add
Code:
export BUILD_MAC_SDK_EXPERIMENTAL=1
somewhere at the bottom
Press Ctrl-X, then y, then "enter/return" Note: Yes, the control key is used, not the command key, so don't be confused
Install dependencies to make bacon
Code:
POSIXLY_CORRECT=1 sudo port install git-core coreutils findutils gsed gnupg pngcrush repo
then
Code:
sudo ln -s /opt/local/bin/gfind /opt/local/bin/find && ln -s /opt/local/bin/gsed /opt/local/bin/sed
run
Code:
pngcrush
in terminal to make sure that things are properly in your path
THEY SHOULD BE since MacPorts edits your .bash_profile for you.
Now, we need a case-sensitive folder so we will need to make a sparseimage which you will have to mount every time you want to do something with your android builds.(like a DMG), but for now, this command will attach it for you. It will be on your desktop
Code:
hdiutil create -type SPARSE -fs "Case-sensitive Journaled HFS+" -size 60g -volname "android" -attach ~/Desktop/Android
Make the cm folder
Code:
cd /Volumes/Android && mkdir cm && cd cm
SYNC TIME!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!x10^infinity!
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1 && mkdir -p .repo/local_manifests && curl https://raw.github.com/teamuserdebug/page/manifests/manifests/cm10.1-aries.xml > .repo/local_manifests/local_manifest.xml && repo sync
make sure you acknowledge name, color, email etc, or you'll be sitting around and wasting time. this can take anywhere from 1 hr to 1 week depending on your internet connection, personally takes me 3-5 hrs.
go grab a starbucks and come back, you'll need it.
after it's done, make sure you are still in your cm directory.
Before we build, we have to fix an elf.h error
Code:
cp /Volumes/android/cm/external/elfutils/libelf/elf.h /usr/local/include
IT'S BUILDING TIME
OPTIONAL: If you have some free space sitting around eg, 70-100 gigs for building android,
it's time to setup CCACHE, this speeds up future builds by "A LOT"
install a ccache which is usable by mac
Code:
sudo port install ccache
edit your bash profile to use ccache.
Code:
sudo nano ~/.bash_profile
find the line that says
Code:
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
and edit it to say
Code:
export PATH=/opt/local/libexec/ccache:/opt/local/bin:/opt/local/sbin:$PATH
press Ctrl-X, then y, then "enter/return"
then exit and reopen terminal
now configure ccache's memory
Code:
ccache -M50
BUILD TIME:
enter these
Code:
cd ~/android/cm
Code:
vendor/cm/get-prebuilts
Code:
. build/envsetup.sh
Code:
lunch cm_galaxys4gmtd-userdebug
Code:
mka clobber
Code:
mka bacon
It will be in /Volumes/android/cm/out/products/target/galaxys4gmtd/cm-unofficial-something-something-signed.zip or something like that.
Make sure you don't pick the wrong zip file, because there are 2 or 3 in there
nice, didn't take long to get it stickied either.
sent from within pure darkness
I know right!
Also, I have edited it for the mac version as well.
Now you guys can build on both mac and linux!!!!!!!!!!!!
Also, I will post when github stuffs are back up.
Thx. is this coming from a straight Unbuntu say setup without having to install a bunch of crap? I had that BBQLinux installed which is supposed to be for building android but it didn't have apt installed, so then tried yum to install that, and it didn't have that. lol. Just going to install Ubuntu on a VM and try your directions from a new install.
yes
but obviously you need to have wifi
airfluip1 said:
yes
but obviously you need to have wifi
Click to expand...
Click to collapse
Why do I need wifi?
i mean internet.
airfluip1 said:
i mean internet.
Click to expand...
Click to collapse
O ya, I got tonnes of that. lol. Thanks for the guide though. I've tried a few times to get a build environment going and it always goes wacky or I don't get something right.
i think that they are up now.
airfluip1 said:
i think that they are up now.
Click to expand...
Click to collapse
don't know, I'm getting fetch errors, url can't found, 404 and then when it's done, it craps out and says can't sync, too many fetch errors. Is this the servers still being down?
Maybe
Sent from my SGH-T959V using xda premium
airfluip, you might have been better off creating a local_manifest.xml file (though those are deprecated and now you can just create a manifest file called, for example, airfluip1_aokp.xml).
You're going to have to keep up with the platform_manifest changes and will have to resolve merge conflicts if the AOKP team decides to make some major changes (not unlikely).
You can actually add the changes you made to the manifest.xml into a custom manifest xml file similar to what we did with team acid's CM9/AOKP repos.
maybe, but I thought it was easier. I'll change it in a week or two.
Just thought I'd throw in that BBQLinux is arch based and for building android and linuxBBQ is NOT the same thing, it's probably the worst distro to start from to build android. In case someone else decides to go there.
airfluip1 said:
maybe, but I thought it was easier. I'll change it in a week or two.
Click to expand...
Click to collapse
Just as a way to make syncing source faster, you can also remove the device/kernel trees for other devices that aren't the SGS4G so that we can just download what's necessary for building for our phone.
yeah, I know. I'll do that later as well. I just don't have much time for a few weeks.
I got a rom compiled with your sources airfluip. I haven't flash tested yet.
I did run into problems with the SGS4GParts package so I had to remove it from galaxys4gmtd.mk, other than that the rom compiled fine. I'll help you look into the error later.
Thanks for the guide, easy to follow
EDIT
By the way, are you using TWRP in these builds, or is it CWM?
Code:
______ _____ __ __ _____
/\ _ \/\ __`\/\ \/\ \ /\ _ `\
\ \ \L\ \ \ \/\ \ \ \/'/'\ \ \L\ \
\ \ __ \ \ \ \ \ \ , < \ \ ,__/
\ \ \/\ \ \ \_\ \ \ \\`\ \ \ \/
\ \_\ \_\ \_____\ \_\ \_\\ \_\
\/_/\/_/\/_____/\/_/\/_/ \/_/
===========-Package complete-===========
zip: /home/fb/android/jb_aokp/work/out/target/product/galaxys4gmtd/aokp_galaxys4gmtd_unofficial_2013-05-14.zip
md5: c8fcc3417bab626ca6d018b88450ab42
size: 150M
========================================
It must have been something that I edited.
I am using CWm.
I don't like twrp very much.
It's always something....
I'm not sure if something changed since you made this tutorial but I can't seem to get this to build.
My first attempt resulted in the SGS4GParts error like FB mentioned. Which seems to have something to do with the TVOut setting.
Each attempt at rebuilding I seem to get different errors.
I also get this when building starts...normal?
Code:
find: `../../vendor/unbundled_google/libs/gcm/gcm-client/src': No such file or directory
find: `../../vendor/unbundled_google/libs/gcm/gcm-server/src': No such file or directory
find: `../../vendor/unbundled_google/libs/gcm/gcm-client/src': No such file or directory
find: `../../vendor/unbundled_google/libs/gcm/gcm-server/src': No such file or directory
find: `src': No such file or directory
Edit: Is there a way to grab a log of the entire build output? Is it saved to a file somewhere?
LOL I am building right now.
The src error is normal
AND IF THERE IS A BUILD ERROR, POST A LOG IN PASTEBIN.
ALSO, THERE SHOULDN'T BE ANY BUILD ERRORS RIGHT NOW AS LONG as you
Code:
repo sync
before you do a new build.
Also you should run
Code:
make clobber && mka bacon
everytime.

[How To] Setup ABE For Compiling Android Roms From Source (CM11) UPDATED 11/1/14

Setup ABE (Android Build Environment To Compile Roms) ​
For this you tutorial you need to be running Ubuntu 13.10 64-Bit (32-Bit Will Not Work).
Does Not Matter if you are running this in a virtual machine or not. (Will work on Both)
Also I will also be showing a Guide to Syncing CM11 Repo and TamsuiCM11 Repo.
Instructions (Read Carefully):
First, let's set up the correct JDK.
Many of you probably have some kind of wrong Java installed unless you're starting with a fresh Ubuntu base, and even then maybe.
Let's get rid of that. Copy and paste this into a Terminal window:
Code:
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
Follow the instructions to remove OpenJDK. If you must keep it, it's possible. But I'm not going to tell you how to do it here. I don't want any chance of confusion or mistake.
Now copy and paste the following into the Terminal:
Code:
sudo add-apt-repository ppa:webupd8team/java
This will add the correct PPA to your system for updated builds of Java 6 JDK that are compatible with 13.10. No more unrecognized Java version errors! And it will update automatically with the rest of your system.
Next, we actually need to install the package. More copy-paste:
Code:
sudo apt-get update && sudo apt-get install oracle-java6-installer
Ok, back to a fresh Terminal prompt. Time for installing the guts to build stuff in Ubuntu:
Code:
sudo apt-get install git-core lzop ccache gnupg flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32ncurses5 lib32z1 lib32bz2-1.0 lib32ncurses5-dev x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc readline-common libreadline6-dev libreadline6 lib32readline-gplv2-dev libncurses5-dev lib32readline5 lib32readline6 libreadline-dev libreadline6-dev:i386 libreadline6:i386 bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev libsdl1.2-dev libesd0-dev squashfs-tools pngcrush schedtool libwxgtk2.8-dev python gcc g++ cpp gcc-4.8 g++-4.8
When that is done installing, run the following command in your Terminal window:
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
That's it on the package side of things.
You guessed it, time for more Terminal. This really is the easiest way, seriously. And it's totally worth it when you're basking in the glory of a bunch of people on XDA.
The binary for a program called "repo" will let you talk to git servers and download all that precious source code. That second part after the && allows it to be executable:
Code:
mkdir ~/bin && curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo && chmod a+x ~/bin/repo
Use your favorite text editor to open ~/.bashrc
I like nano:
Code:
sudo nano ~/.bashrc
At the very bottom, add the following line:
Code:
export PATH=~/bin:$PATH
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
In the terminal, navigate to where you would like to store the Android source code. The directions below will make it in your home folder, but if you have limited space, you may want to create it somewhere else. Faster is better, i.e. SSD would be best, USB external is basically unusable. Here we go:
Code:
mkdir ~/cm11
cd ~/cm11
We will configure your information, your name and email address, In terminal type:
Code:
git config --global user.name your name
git config --global user.email your email
Now you're going to initialize the repo. Here's where you decide the flavor of Android you want to build for, ie AOKP, CyanogenMod, AOSP etc. The following, for the purposes of this tutorial, will initialize for Stable CM11:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b stable/cm-11.0
Almost there. Last step, but it's a doozy. You're going to get the source. Prepare yourself, mere mortal. 10+ GB of downloading await you. Don't worry, it's automated. Go to sleep. Eat something. Perhaps you have heard of this new thing the kids are doing called "going outside"? Yeah, I didn't think so. Me neither. The final terminal command, to be run from your android directory:
Code:
repo sync
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
After that is done its time to Sync TamsuiCM11 Repo:
Go into your file browser and to your username then your cm11 folder, once there press Ctrl+H on your keyboard. Go into the folder .repo and make a folder called:
Code:
local_manifests
Once done exit out of the repo folder and press Ctrl+H on your keyboard once again.
Now its time you configure the local manifest, this will download all necessary files for the devices in this forum.
Type this in terminal:
Code:
. build/envsetup.sh
[B]breakfast jlo[/B] (For Xperia J) [B]tapioca[/B] (For Xperia Tipo) [B]mesona[/B] (For Xperia Miro) [B]nanhu_ds[/B] (For Xperia E)
gedit ~/cm11/.repo/local_manifests/local_manifest.xml
Now go to this link: https://github.com/TamsuiCM11/local_manifest/blob/master/tamsui.xml
Copy everything in the file into the open window of gedit hit save and close.
Go back to Terminal and type:
Code:
repo sync
This will download all necessary files, once done type the following into terminal:
Code:
cd ~/cm11/vendor/cm
. get-prebuilts
croot
Finally type:
Code:
[B]brunch jlo[/B] (For Xperia J) [B]tapioca[/B] (For Xperia Tipo) [B]mesona[/B] (For Xperia Miro) [B]nanhu_ds[/B] (For Xperia E
It will begin to build, if you run into any errors, do some research before creating tons of threads.
THANK ME IF I HELPED!
Thanks a lot for the how to. I'm just "syncing" (don't know if this is how it is said, just entered the command that downloads 10Gb) and it is doing the job! Don't know why this has only 5 "thanks", I found it very useful!!
JUST ONE QUESTION!! If I type breakfast tapioca it gives me "no such file or directory" error. If I type "tapioca_ss" it gives me no problems. Is it right?
Thanks
phn1993 said:
Thanks a lot for the how to. I'm just "syncing" (don't know if this is how it is said, just entered the command that downloads 10Gb) and it is doing the job! Don't know why this has only 5 "thanks", I found it very useful!!
JUST ONE QUESTION!! If I type breakfast tapioca it gives me "no such file or directory" error. If I type "tapioca_ss" it gives me no problems. Is it right?
Thanks
Click to expand...
Click to collapse
In your home folder, look in cm11/devices. If there's a folder called tapioca_ss, then you need to use tapioca_ss. If there's a folder called tapioca, then you need to use tapioca.
Yes, this guide is very useful, but unfortunately, you can only thank a post once (I did)!
NSDCars5 said:
In your home folder, look in cm11/devices. If there's a folder called tapioca_ss, then you need to use tapioca_ss. If there's a folder called tapioca, then you need to use tapioca.
Yes, this guide is very useful, but unfortunately, you can only thank a post once (I did)!
Click to expand...
Click to collapse
Yes, I noticed!! Thanks!!
One last question (new it's true lol): I get "make" errors (ERROR 1) when compiling audio drivers. I don't know why, but I'm trying to repeat the how to as root!
phn1993 said:
Yes, I noticed!! Thanks!!
One last question (new it's true lol): I get "make" errors (ERROR 1) when compiling audio drivers. I don't know why, but I'm trying to repeat the how to as root!
Click to expand...
Click to collapse
I don't think you should do this as root; I've seen some guides that say doing so might deter the building process.
And you're welcome.
NSDCars5 said:
I don't think you should do this as root; I've seen some guides that say doing so might deter the building process.
And you're welcome.
Click to expand...
Click to collapse
I finally decided to repeat all the guide! I think I've just found the problem!! Thanks again

How To Build Rom From Compressed Sources

Hey,Guys I'm Here To Tell All How To Build A Rom From The Compressed Source.
First Of All I'm Thanking To For Compressed Sources.
@MSF Jarvis @DigiGoon @regalstreak
Pre-Requirements-->>
•Windows 7/8/8.1
•Java JDK
•VirtualBox Or VMWare
•Ubuntu [I'm Recommended For Ubuntu 14.04]
Setting Up Linux-->>
•Install VirtualBox In Your PC.
•Click On New Button.
•Type The Name,What Type Of Os You Are Installing & And The Version.
[In This Case We Are Installing Ubuntu 14.04.So In Type Option Choose "Linux And In Version Option Choose "Ubuntu"]
•Now You Have To Set The Amount Of RAM For Run Ubuntu.You Have Give The Half Amount RAM For Ubuntu And Half To Windows.[Example:You Have 10GB Of RAM Then Give The Ubuntu To 5GB Or 4.5 GB Of RAM.].Then Click Next Button.
•Now You Have To Create A Virtual Drive. So Select "Create A Virtual Hard Drive Now" Option.Now Click On Create.
•Now Select The "VMDK".Now Click Create Option.
•Then A New Daialog Will Come.Select "Dynamically Allocated".Then Click Next.
•Now Select Where U Want To Install Ubuntu And Enter The Amount Of HDD Space To Allocate For Ubuntu. [I Am Recommended To Set It Above 150 GB].Then Click On "Create" Option.
•Now Go To Settings,Then System And Click On "Processor".Set CPU.
•Go To Acceleration Tab.Tick The Both Option.Click On "OK" Option.
•Now Go To Storage In Settings.Select "Controller:IDE".There Click On A "CD" Image With "+" Icon.
•A Small Box Will Come.Click on "Choose Disk".And Select Your Ubuntu 14.04 ISO File.Click On OK.
•Now Go To "Motherboard" Tab In Settings/System And Tick Boot Option To "Hard Disk".Click On OK.
•Alright.Now Click In "Start" Option To Boot Ubuntu.
•Now Follow Instructions And Setup With Your Details".
•Yaahoo!.You Have Now Set Up The Ubuntu 14.04 In PC.
Setting Up Building Enviroment!
1.Installing Java JDK-->>
•For Building KitKat Rom We Need Java 6.Install It By Below Command In Terminal-->
Code:
sudo apt-get install oracle-java6-installer
•For Building Lollipop And Marshmallow Roms.Install Java 7 By This Following Command In Terminal-->>
Code:
sudo apt-get install openjdk-7-jdk
•To Check Java Is Installed-->>
Code:
java -version
2.Installing Required Packages-->>
•Enter The Following Command In 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
Or
Code:
sudo apt-get install git-core gnupg ccache lzop flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32ncurses5 lib32z1 lib32bz2-1.0 lib32ncurses5-dev x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc readline-common libreadline6-dev libreadline6 lib32readline-gplv2-dev libncurses5-dev lib32readline5 lib32readline6 libreadline-dev libreadline6-dev:i386 libreadline6:i386 bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev libsdl1.2-dev libesd0-dev squashfs-tools pngcrush schedtool libwxgtk2.8-dev python
Alright We Have Installed Required Pakages To Build Rom.
Building Rom For A Particular Device!
For Example I'm Taking Samsung Galaxy Star GT-S5282,CodeName-->"Mint2g" And Taking CM13 To Build.
Extracting The Rom Source That You Had Downloaded-->>
•First Of All Download The Rom Compressed Source Which Rom You Want To Build For Your Device.
•After Download Cd To Where You Downloaded The File.For Me Its In Home/CM13.
•So For Me I Type-->>
Code:
Cd /home/CM13
•Now Type This Command To Extract The Downloaded Source-->>
▪If Your File Is In "tar.xz" Format Then Type This Command In Terminal-->>
Code:
tar -xvJf [Your File Name].tar.xz
Example:My Downloaded CM13 Compressed Source Name Is "CM-cm.13.0-no-repo-20160727.tar.xz".
So You Need To Type Like This-->>
Code:
tar -xvJf CM-cm-13.0-no-repo-20160727.tar.xz
▪If Your File Is In "tar.gz" Format Then Type This Command In Terminal-->>
Code:
tar -xvzf [Your File Name].tar.gz
Now The Source Will Be Extract!This Process Will Take Some Time.
Building Rom
•Go To The "Extracted Folder/device".
•And Then Create A Folder "samsung".[I'm Doing For Samsung Device So I'm Ceeated Folder Named "samsung".If U Making For Other Device.Then Create A Folder With Your Device's Company Name]
•Now Open The Folder[Extracted Folder/device/samsung].Then Right Click And Open The Terminal Here.
•You Have To Clone Your Device Tree.To Do It Type This Following Command-->>
Code:
git clone device_tree_URL -b branch_name
Explaination-->> Change "device_tree_device" With You Device Tree URL And "branch name" With The Rom You're Building.
For Me It Look Like This-->>
Code:
git clone https://github.com/TeamButter/android_device_samsung_mint.git -b cm-13.0
•Now Go To "Extracted Folder/vendor".
•Create A Folder Named "samsung".
•Open The Folder[Extracted Folder/vendor/samsung]
•You Have To Clone Your Vendor Tree Here.To Do That Right Click In The Folder And Open Terminal.
•Type This Following Command-->>
Code:
git clone device_vendor_tree_URL -b branch_name
Explaination-->> Change "device_vendor_tree_URL" With You Vendor Tree URL And "branch name" With The Rom You're Building.
For Me It Looks Like This-->>
Code:
git clone https://github.com/TeamButter/android_vendor_samsung_mint.git -b cm-13.0
•Now Go To Extracted Folder.
•Create A Folder Named "Kernel" Then Open This Kernel Folder And Create One More Folder Named "samsung".
•Open This Folder[Extracted Folder/Kernel/samsung]
•Right Click And Open Terminal.
•You Have To Clone Kernel Tree Here.Do To It,Type This Command-->>
Code:
git clone device_kernel_tree_URL -b branch_name
Explaination-->> Change "device_kernel_tree_URL" With You Kernel Tree URL And "branch name" With The Rom Branch You're Building.
For Me It Looks Like This-->>
Code:
git clone https://github.com/TeamButter/android_kernel_samsung_mint.git -b cm-13.0
All Done!
•Now Go To Extracted Folder.
•Right Click And Open Terminal.
•Type This Following Command-->>
Code:
source build/envsetup.sh
•Then Type This Command-->>
Code:
lunch
•And Then Type-->>
Code:
cm_codename_of_your_device_userdebug
Explanation-->>Change "codename_of_your_device" with your device codename.
•Now Type This Command-->>
Code:
mka clobber
•Finally Type This Command-->>
Code:
mka bacon
Yahhooo!You Built CM13 For Your Device.You Can Found The Flashable Zip In Home/Extracted Folder/OUT/target/product/yourdevicecodename.
Don't Forget To Hit The Thanks Button If I Helped You!
reserved 3
one more
for future
@Albe96, credits also for @regalstreak, before I dropped in with my server and the automation, he was the one slogging his butt and assembling all links. Even that automation was his idea.
Edit: And please don't use bold unnecessarily on your thread, makes it look cheapskate. Just my two cents
And set the size to 3 for good reading. Works best with guides
Just 1/2 of my cent
regalstreak
regalstreak said:
And set the size to 3 for good reading. Works best with guides
Just 1/2 of my cent
regalstreak
Click to expand...
Click to collapse
MSF Jarvis said:
@Albe96, credits also for @regalstreak, before I dropped in with my server and the automation, he was the one slogging his butt and assembling all links. Even that automation was his idea.
Edit: And please don't use bold unnecessarily on your thread, makes it look cheapskate. Just my two cents
Click to expand...
Click to collapse
added regalstreak [emoji6]
@Albe96 can I use stock boot.img in place of kernel source pls reply..
I don't have kernel source. .
Sent from my Samsung Galaxy Note 3 using XDA Labs
Yeshas Prabhakar said:
@Albe96 can I use stock boot.img in place of kernel source pls reply..
Click to expand...
Click to collapse
No!And use compressed .repo source to build a rom.don't use non-repo one.You should get error.After downloading the .repo source of the rom which you gonna build use @jackeagle's guide to build rom from source.
Yeshas Prabhakar said:
@Albe96 can I use stock boot.img in place of kernel source pls reply..
I don't have kernel source. .
Click to expand...
Click to collapse
Use any boot image unpacking tool (I recommend osm0sis' Android Image Kitchen) to unpack the boot.img and obtain boot.img-zImage from it. Rename to zImage and place it in your device tree and add
Code:
TARGET_PREBUILT_KERNEL := device/<vendor>/<codename>/zImage
To your BoardConfig.mk
Sent from my YUNIQUE using XDA Labs
MSF Jarvis said:
Use any boot image unpacking tool (I recommend osm0sis' Android Image Kitchen) to unpack the boot.img and obtain boot.img-zImage from it. Rename to zImage and place it in your device tree and add
Code:
TARGET_PREBUILT_KERNEL := device/<vendor>/<codename>/zImage
To your BoardConfig.mk
Sent from my YUNIQUE using XDA Labs
Click to expand...
Click to collapse
Thanks man.. You are the life saver... But tell me one thing that can I use the stock boot.img?? I have read somewhere that we need permissive kernel but the boot.img contains an enforcing kernel. And if not then what modifications should I do to make it work?? Well I am on an exynos device.. (galaxy j2 SM-J200G) Codename: j2lte

Guide To Building Custom Pixel 4a Roms(move if needed)

This is a place holder for anyone that can assist in helping of building custom roms for our pixel 4a. Please note this will need Linux version on how to setup an environment for the build and how to build the roms,. Anyone please that can help add infor mation on how to do these as i know there are many guides but we need one specifically for our device to get development moving along. Please post on stock aosp roms, lineage roms , miui roms etc. i will also try to update as much as i can , hopefully this thread doesnt get moved.
This is the setup from google to setting up an environment to build android aosp
Establishing a Build Environment | Android Open Source Project
source.android.com
​Establishing a Build Environment​
Important:Platform development on MacOS isn't supported as of June 22, 2021.
This section describes how to set up your local work environment to build the Android source files. You must use Linux; building under either MacOS or Windows isn't supported.
For an overview of the entire code-review and code-update process, see Life of a Patch.
Note: All commands in this site are preceded by a dollar sign ($) to differentiate them from output or entries within files. Use the Click to copyfeature located at the top right of each command box to copy all lines without the dollar signs, or triple-click each line to copy it individually without the dollar sign.
Choosing a branch​Some requirements for the build environment are determined by the version of the source code that you plan to compile. For a full list of available branches, see Build Numbers. You can also choose to download and build the latest source code (called master), in which case you simply omit the branch specification when you initialize the repository.
After selecting a branch, follow the appropriate instructions below to set up your build environment.
Setting up a Linux build environment​These instructions apply to all branches, including master.
The Android build is routinely tested in house on Ubuntu LTS (14.04) and Debian testing. Most other distributions should have the required build tools available.
For Gingerbread (2.3.x) and higher versions, including the master branch, a 64-bit environment is required. Older versions can be compiled on 32-bit systems.
Note: See Requirements for the complete list of hardware and software requirements, then follow the detailed instructions for Ubuntu below.
Installing required packages (Ubuntu 18.04)​You need a 64-bit version of Ubuntu.
sudo apt-get install git-core gnupg flex bison build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev libxml2-utils xsltproc unzip fontconfig
Installing required packages (Ubuntu 14.04)​You need a 64-bit version of Ubuntu (14.04 is recommended).
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 libgl1-mesa-dev libxml2-utils xsltproc unzip
Note: To use SELinux tools for policy analysis, also install the python-networkx package.Note:If you're using LDAP and want to run ART host tests, also install the libnss-sss:i386 package.
Installing required packages (Ubuntu 12.04)​You may use Ubuntu 12.04 to build older versions of Android. Version 12.04 isn't supported on master or recent releases.
sudo apt-get install git 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 tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Installing required packages (Ubuntu 10.04-11.10)​Building on Ubuntu 10.04-11.10 is no longer supported, but may be useful for building older releases of AOSP.
sudo apt-get install git 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 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc
On Ubuntu 10.10:
sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so
On Ubuntu 11.10:
sudo apt-get install libx11-dev:i386
Configuring USB access​Install a community-maintained default set of udev rules for all Android devices by following the instructions to Set up a device for development.
Using a separate output directory​By default, the output of each build is stored in the out/ subdirectory of the matching source tree.
On some machines with multiple storage devices, builds are faster when storing the source files and the output on separate volumes. For additional performance, the output can be stored on a file system optimized for speed instead of crash robustness, because all files can be regenerated if the file system is corrupted.
To set this up, export the OUT_DIR_COMMON_BASE variable to point to the location where your output directories will be stored.
export OUT_DIR_COMMON_BASE=<path-to-your-out-directory>
The output directory for each separate source tree is named after the directory holding the source tree. For instance, if you have source trees /source/master1 and /source/master2 and if OUT_DIR_COMMON_BASE is set to /output, the output directories are /output/master1 and /output/master2.
Avoid having multiple source trees stored in directories that have the same name, as the source trees would end up sharing an output directory, with unpredictable results. This is only supported on Jelly Bean (4.1) and higher, including the master branch.
Next: Download the source​Your build environment is good to go!
How to Build a Custom ROM from Android Open Source Project - Appuals.com
If you’re familiar with rooting your Android phone or downloading custom ROMs, such as the highly popular CyanogenMod or its successor Lineage OS, you may
appuals.com
​Downloading the Android Source​The AOSP is hosted on Git, so we’re going to use a tool called Repo to communicate with Git.
First we need to setup a /bin folder in your Home directory. Type the following commands into the Linux terminal:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
Now we will download the Repo tool, so type into the Linux terminal:
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
After Repo is installed, we must now create an empty directory to hold your work files. So type this into the Linux terminal:
$ mkdir WORKING_DIRECTORY
$ cd WORKING_DIRECTORY
Now we’ll configure Git with your name and email address – use a Gmail address that you check regularly, otherwise you will not be able to use the Gerrit code-review tool.
$ git config –global user.name “Your Name”
$ git config –global user.email [email protected]
Now we’ll tell Repo to pull the latest master manifest of AOSP from Git:
$ repo init -u https://android.googlesource.com/platform/manifest
If done successfully, you’ll receive a message that Repo has been initialized in your working directory. You’ll also find a “.repo” directory inside the client directory. So now we’ll download the Android source tree with:
$ repo sync
Building the Android Source
This is where the hardware binaries mentioned at the beginning of this guide come into play. Let’s head over to the AOSP drivers page and download the Pixel XL binaries for Android 7.1.0 (NDE63P). You want to download both the vendor image and the hardware components. These come as compressed archives, so extract them to your desktop and run the self-extracting script from the root folder. Choose to install the binaries to the root of the WORKING_DIRECTORY we created earlier.
Now type into your Linux terminal:
$ make clobber
$ source build/envsetup.sh
Now we’ll choose the target to build, so type:
$ lunch aosp_marlin-userdebug
$ setpaths
$ make –j4
There, we have now “built” an Android ROM from source. So let’s test it in the emulator, by typing into the terminal:
$ emulator
So play around in the emulator a bit. As you can see, a purely vanilla Android experience is quite minimal, and this is why manufacturers customize the AOSP to their needs. So you could flash this ROM we just built to your device if you wanted, but without adding any enhancements, a purely vanilla Android experience would be a very boring thing indeed.

Categories

Resources