Hello Guys,
In this guide i will quickly show you how to build CyanogenMod from source.
Step 1)
You will need to install Java6 (Not Java 7 or Java 5 there are not compitable)
Do the following:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java6-installer
Click to expand...
Click to collapse
Step 2)
For faster building settup your ccache by editing bashrc:
Make a folder in your home directory callled ccache
gedit ~/.bashrc
Add these 2 lines at the end of the file:
export USE_CCACHE=1
export CCACHE_DIR=ccache
Click to expand...
Click to collapse
Step 3)
Getting the repo tool (if this is not working for the first time try this step again!)
mkdir ~/bin
PATH=~/bin:$PATH
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
Click to expand...
Click to collapse
Step 4)
Make a working directory for your build!
mkdir -p ~/android/system
cd ~/android/system
~/bin/repo init -u git://github.com/CyanogenMod/android.git -b cm-10.2
If you are building CM10.1 use this source ~/bin/repo init -u git: https://github.com/CyanogenMod/android.git -b cm-10.1
Click to expand...
Click to collapse
Step 5)
Local manifest setup:
mkdir .repo/local_manifests
touch .repo/local_manifests/local_manifest.xml
gedit .repo/local_manifests/local_manifest.xml
then a window will open paste this in the window and save it then close the window
Click to expand...
Click to collapse
CYANOGENMOD 10.2 LOACAL MANIFEST
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="cmorlok/android_kernel_samsung_p5" path="kernel/samsung/p5" revision="refs/heads/cm-10.2" />
<project name="cmorlok/android_device_samsung_p4-common" path="device/samsung/p4-common" revision="refs/heads/cm-10.2" />
<project name="cmorlok/android_device_samsung_p5" path="device/samsung/p5" revision="refs/heads/cm-10.2" />
<project name="cmorlok/android_device_samsung_p5wifi" path="device/samsung/p5wifi" revision="refs/heads/cm-10.2" />
<project name="cmorlok/proprietary_vendor_samsung" path="vendor/samsung" revision="refs/heads/cm-10.2" />
<project name="CyanogenMod/android_hardware_samsung" path="hardware/samsung" />
</manifest>
CYANOGENMOD 10.1 LOACAL MANIFEST
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="cmorlok/android_kernel_samsung_p5" path="kernel/samsung/p5" revision="refs/heads/cm-10.1" />
<project name="cmorlok/android_device_samsung_p4-common" path="device/samsung/p4-common" revision="refs/heads/cm-10.1" />
<project name="cmorlok/android_device_samsung_p5" path="device/samsung/p5" revision="refs/heads/cm-10.1" />
<project name="cmorlok/android_device_samsung_p5wifi" path="device/samsung/p5wifi" revision="refs/heads/cm-10.1" />
<project name="cmorlok/proprietary_vendor_samsung" path="vendor/samsung" revision="refs/heads/cm-10.1" />
<project name="CyanogenMod/android_hardware_samsung" path="hardware/samsung" />
</manifest>
Step 6)
Syncing the repo:
cd ~/android/system
~/bin/repo sync
This can take a long long long time (depends on your pc specs)
Click to expand...
Click to collapse
Step 7)
When syncing is done do the following:
You need to do this otherwise you will get errors when building.
cd ~/android/system/vendor/cm
./get-prebuilts
Click to expand...
Click to collapse
Step 8)
Building CyanogenMod:
cd ~/android/system
source build/envsetup.sh
lunch
brunch p5wifi (For P5 use the following: brunch p5)
Click to expand...
Click to collapse
Credits:
Android open source page
Cyanogenmod WIKI
C-o-M
Kingbabasula
Good luck with building if you have any questions errors post them here and we will help you out!
safariking said:
You will need to install Java6 (Not Java 7 or Java 5 there are not compitable)
Do the following:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java6-installer
Click to expand...
Click to collapse
Quick question: The CM build site recommends openjdk whereas the build process seems to complain about using non-oracle/sun jdk.
What's the actual jdk we should be using to build?
I always use java 6 no problems here
Sent from my GT-P7310 using xda app-developers app
safariking said:
I always use java 6 no problems here
Click to expand...
Click to collapse
I guess the question is: which one is the 'right' one to use?
I say java 6 i have seen that a lot of users here on xda are using it
Sent from my GT-I9105P using xda app-developers app
hdd space
Hi,
what's the hdd space needed for syncing the 10.2 repo?
Thanks.
Almost 10GB i recommend you to have a total disk space of 100 GB
Sent from my GT-I9105P using xda app-developers app
safariking said:
Almost 10GB i recommend you to have a total disk space of 100 GB
Sent from my GT-I9105P using xda app-developers app
Click to expand...
Click to collapse
damn, so my 12 GB vmware allocated hdd is not enough
Thanks.
No
Sent from my GT-I9105P using xda app-developers app
combat2k said:
Hi,
what's the hdd space needed for syncing the 10.2 repo?
Thanks.
Click to expand...
Click to collapse
Empty tree: 8GB
Populated tree: 16GB
Post build: 34GB
question
why do I get something like below:
object e76efdd7b342577c40aa271fa5ded9d66a783a9b
type commit
tag v1.12.4
tagger Conley Owens <[email protected]> 1380645867 -0700
repo 1.12.4
gpg: Signature made Ma 01 oct 2013 19:44:27 +0300 EEST using RSA key ID 692B382C
gpg: Can't check signature: public key not found
error: could not verify the tag 'v1.12.4'
when calling ~/bin/repo init -u git://github.com/CyanogenMod/android.git -b cm-10.2
There is something wrong with tag 1.12.4? Or something to add to configuration?
Thanks...
combat2k said:
why do I get something like below:
object e76efdd7b342577c40aa271fa5ded9d66a783a9b
type commit
tag v1.12.4
tagger Conley Owens <[email protected]> 1380645867 -0700
repo 1.12.4
gpg: Signature made Ma 01 oct 2013 19:44:27 +0300 EEST using RSA key ID 692B382C
gpg: Can't check signature: public key not found
error: could not verify the tag 'v1.12.4'
when calling ~/bin/repo init -u git://github.com/CyanogenMod/android.git -b cm-10.2
There is something wrong with tag 1.12.4? Or something to add to configuration?
Thanks...
Click to expand...
Click to collapse
i found a solution here for the error that you are seeing : http://www.marshut.com/wrrts/repo-release-1-12-4.html
use the below command, this worked for me today.
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
Try noparse-tags and code:
Code:
[PLAIN]curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo[/PLAIN]
Hmm I had the same issue, but the above fixes didnt work for me. Finally used
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.2 --no-repo-verify
and it worked.
what should I choose for lunch - step 8? it displays a list with 105 options, and... no hint about my p7300..
Thanks.
What I still don't unterstand at all is, how I can get the sources of e.g. C-o-M'S CM10.1.2 and CM10.1 nightly 2013-Aug-06 to compare it?
In Windows I used to use Total Commander to compare two folders, is there also a similar tool in Linux?
Related
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
This is a guide to Compile From any CyanogenMod and CyanogenMod Source-Based source for Any Phone. This guide is for linux , Ubuntu etc.
What you’ll need
A Phone Which runs Android
A relatively recent computer (Linux, OS X, or Windows) w/a reasonable amount of RAM and storage. The less RAM you have, the longer the build will take. Using SSDs results in faster builds than traditional hard drives.
A micro USB cable
A decent Internet connection & reliable electricity
Some familiarity with basic Android operation and terminology. It would help if you’ve installed custom roms on other devices and are familiar with what a recovery image such as ClockworkMod is, for example. It may also be useful to know some basic command line concepts such as cd for “change directory”, the concept of directory hierarchies, that in Linux they are separated by /, etc.
Note:
You want to use a 64-bit version of Linux. According to Google, 32-bit Linux environment will only work if you are building older versions prior to Gingerbread (2.3.x)/CyanogenMod 7.
Using a VM allows Linux to run as a guest inside your host computer-- a computer in a computer, if you will. If you hate Linux for whatever reason, you can always just uninstall and delete the whole thing. (There are plenty of places to find instructions for setting up Virtualbox with Ubuntu, so I’ll leave it to you to do that.)
Click to expand...
Click to collapse
So let’s begin!
Build ROM and ClockworkMod Recovery
Prepare the Build Environment
Note:
You only need to do these steps the first time you build. If you previously prepared your build environment and have downloaded the CyanogenMod source code for another device, skip to Next Post.
Click to expand...
Click to collapse
Install the SDK
If you have not previously installed adb and fastboot, install the Android SDK. "SDK" stands for Software Developer Kit, and it includes useful tools that you will can use to flash software, look at the system logs in real time, grab screenshots, and more-- all from your computer.
Helpful Tip!
While the SDK contains lots of different things-- the two tools you are most interested in for building Android are adb and fastboot, located in the /platform-tools directory.
Click to expand...
Click to collapse
Install the Build Packages
Several "build packages" are needed to build From Source. You can install these using the package manager of your choice.
Helpful Tip!
A package manager in Linux is a system used to install or remove software (usually originating from the Internet) on your computer. With Ubuntu, you can use the Ubuntu Software Center. Even better, you may also use the apt-get install command directly in the Terminal. (Learn more about the apt packaging tool system from Wikipedia.)
Click to expand...
Click to collapse
For 32-bit & 64-bit systems, you'll need:
Code:
git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.8-dev squashfs-tools build-essential zip curl
libncurses5-dev zlib1g-dev openjdk-6-jre openjdk-6-jdk pngcrush schedtool
For 64-bit only systems, get these:
Code:
g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline-gplv2-dev gcc-4.7-multilib g++-4.5-multilib
For Linux Mint, you'll need:
Code:
libc6-dev x11proto-core-dev libx11-dev libgl1-mesa-dev mingw32 tofrodos python-markdown libxml2-utils
Create the directories
Code:
mkdir -p ~/bin
Install the repo command
Enter the following to download the "repo" binary and make it executable (runnable):
Code:
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
Put the ~/bin directory in your path of execution
Make sure that the ~/bin directory you just created is in your path of execution so that you can easily run the repo command even when you're not in ~/bin. Assuming you are using the BASH shell, the default in recent versions of Ubuntu, you can set it like this:
Code:
export PATH=${PATH}:~/bin
Helpful Tip!
You can make this change to the path permanent for all future Terminal sessions:
Code:
gedit ~/.bashrc
This will launch a graphical text editor. Enter
Code:
export PATH=${PATH}:~/bin
on its own line, then save the file.
Click to expand...
Click to collapse
Initialize the source repository
Make a Folder to Download the Sources and cd to it. For That:
Code:
mkdir -p ~/Source
Code:
cd Source
Enter the following to initialize the repository:
REPOSITORY'S OF FAMOUS ROMS (Select One)
PAC-Man :
Code:
repo init -u git://github.com/PAC-man/android.git -b cm-10.2
CM 11.0 :
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
CM 10.1 :
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.2
CM10 :
Code:
repo init -u git://github.com/CyanogenMod/android.git -b jellybean
Click to expand...
Click to collapse
Download the source code
Code:
repo sync
Helpful Tip!
The repo sync command is used to update the latest source code from CyanogenMod and Google. Remember it, as you can do it every few days to keep your code base fresh and up-to-date.
Click to expand...
Click to collapse
Get prebuilt apps
Code:
cd ~/Source/vendor/cm
Code:
./get-prebuilts
How To Compile is there on next post
Prepare the device-specific code
After the source downloads, type:
Code:
. build/envsetup.sh
Then Do This
Code:
breakfast ******
Where ***** is the codename for your device
MAKE SURE YOUR PHONE IS ON OFFICIAL LATEST CYANOGENMOD ROM
Click to expand...
Click to collapse
Helpful Tip!
If you get a command not found error for lunch, be sure you’ve done the “. build/envsetup.sh” command from ~/Source. Notice there is a period and space (“. ”) in that command.
Click to expand...
Click to collapse
Extract proprietary blobs
Now ensure that your Phone is connected to your computer via the USB cable and that you are in the ~/Source/device/***/***** directory (you can cd ~/Source/device/***/****** if necessary). Run as Root if on Debian using sudo. Then run the this script:
Code:
./proprietary-files.sh
or
Code:
./extract-files.sh
Here ***** is Device codename and *** is the Phone Company like Samsung or HTC
For Example if my phone is note 2 then this will be the device path : ~/Source/device/Samsung/n7100
Click to expand...
Click to collapse
You should see the proprietary files (aka “blobs”) get pulled from the device and moved to the right place in the vendor directory. If you see errors about adb being unable to pull the files, adb may not be in the path of execution
Note:
It’s important that these proprietary files are properly extracted and moved to the vendor directory. Without them, CyanogenMod will build without error, but you’ll be missing important functionality, such as the ability to see anything!
Click to expand...
Click to collapse
Turn on caching to speed up build
Code:
export USE_CCACHE=1
Start the build
Code:
cd ~/Source
brunch *****
Here ***** is the Phone Codename
Helpful Tip!
If the build doesn't start, try lunch and choose your device from the menu. If that doesn't work, try breakfast and choose from the menu. The command make ***** should then work.
Click to expand...
Click to collapse
If the build breaks...
If you experience this not-enough-memory-related error...
Code:
ERROR: signapk.jar failed: return code 1make: *** [out/target/product/n7100/cm_n7100-ota-eng.root.zip] Error 1
...you may want to make the following change to This File : system/build/tools/releasetools/common.py
Change: java -Xmx2048m to java -Xmx1024m or java -Xmx512m
Then start the build again (with brunch).
If you see a message about things suddenly being “killed” for no reason, your (virtual) machine may have run out of memory or storage space. Assign it more resources and try again.
Install the build
Assuming the build completed without error (it will be obvious when it finishes), type:
Code:
# cd $OUT
in the same terminal window that you did the build. Here you’ll find all the files that were created. The stuff that will go in /system is in a folder called system. The stuff that will become your ramdisk is in a folder called root. And your kernel is called... kernel.
But that’s all just background info. The two files we are interested in are (1) recovery.img, which contains ClockworkMod recovery, and (2) cm-[something].zip, which contains ROM.
Install ROM
Back to the $OUT directory on your computer-- you should see a file that looks something like:
Code:
cm-10-20120718-UNOFFICIAL-***.zip
Here *** is the phone codename
Now you can flash the ...zip file above as usual via recovery mode. (Be sure you have backed up any previous installation before trying your new build.)
Feedbacks to this guide
tommyjt24 said:
I got my build working!
Great tutorial by the way!
Tom
Click to expand...
Click to collapse
sevenup30 said:
Well i finally sucessfully build.
thank you for your help
Click to expand...
Click to collapse
AndyFox2011 said:
Works like a charm, used it a while ago too set up on 12.10
Click to expand...
Click to collapse
sswb27 said:
Compiling cm10.1 worked great for my sgs3 d2tmo.Thank's for the tutorial it's been fun setting this up.
Click to expand...
Click to collapse
matt95 said:
really really good guide, very detailed and precise.
Click to expand...
Click to collapse
Koetermann said:
Hi there,
I was finally able to compile Cyanogenmod from source.
So, thanks for your guide an your support.Thanks a lot.
Regards Koetermann
Click to expand...
Click to collapse
AndyFox2011 said:
Used your guide again to setup my PC for building! Worked like a charm on 11.04
Click to expand...
Click to collapse
Melch1zedeK said:
thanks for post this, great and simple guide for n00bs (like me)
Click to expand...
Click to collapse
VipSaran said:
This tutorial ROCKS! :good: . Successfully built i9300 starting from fresh ubuntu 12.10 installation w/o even a hickup
Click to expand...
Click to collapse
Read the Below Command Before Asking question regarding Device tree : Credit @speed_bot
HTML:
#include
#include /ps my own header/
main()
{
int device tree,rom;
for((device==1) || (device tree =1))
printf("you can build a rom");
else
printf("you cant :P");
}
Great guide!
I want to build cm10.1 for x10 mini and I have to modify
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="teamhacksung/buildscripts" path="buildscripts" remote="github" revision="jellybean">
<copyfile dest="build.sh" src="build.sh" />
</project>
<project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung" remote="github" revision="jellybean" />
<project name="CyanogenMod/android_packages_apps_SamsungServiceMode" path="packages/apps/SamsungServiceMode" remote="github" revision="jellybean" />
<project name="CyanogenMod/android_device_samsung_n7000" path="device/samsung/n7000" remote="github" revision="jellybean" />
<project name="CyanogenMod/android_device_samsung_galaxys2-common" path="device/samsung/galaxys2-common" remote="github" revision="jellybean" />
<project name="CyanogenMod/android_kernel_samsung_smdk4210" path="kernel/samsung/smdk4210" remote="github" revision="jellybean" />
<project name="CyanogenMod/android_hardware_samsung" path="hardware/samsung" remote="github" revision="jellybean" />
</manifest>
right? So, how can I do that? What should I change it into? Thanks
pongnamu said:
Great guide!
I want to build cm10.1 for x10 mini and I have to modify
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="teamhacksung/buildscripts" path="buildscripts" remote="github" revision="jellybean">
<copyfile dest="build.sh" src="build.sh" />
</project>
<project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung" remote="github" revision="jellybean" />
<project name="CyanogenMod/android_packages_apps_SamsungServiceMode" path="packages/apps/SamsungServiceMode" remote="github" revision="jellybean" />
<project name="CyanogenMod/android_device_samsung_n7000" path="device/samsung/n7000" remote="github" revision="jellybean" />
<project name="CyanogenMod/android_device_samsung_galaxys2-common" path="device/samsung/galaxys2-common" remote="github" revision="jellybean" />
<project name="CyanogenMod/android_kernel_samsung_smdk4210" path="kernel/samsung/smdk4210" remote="github" revision="jellybean" />
<project name="CyanogenMod/android_hardware_samsung" path="hardware/samsung" remote="github" revision="jellybean" />
</manifest>
right? So, how can I do that? What should I change it into? Thanks
Click to expand...
Click to collapse
You can Pm Freexperia for that.
i dont know every android phone's code
i know about freeexperia because i own a xperia mini myself
mithun46 said:
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.6-dev python
Click to expand...
Click to collapse
M getting error
[email protected]:~$ 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.6-dev python
[sudo] password for jolly:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package lib32bz2-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
Package lib32ncurses5-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
Package lib32readline-gplv2-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
Package lib32readline5 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
Package lib32readline6 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
Package ia32-libs is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'lib32ncurses5-dev' has no installation candidate
E: Package 'ia32-libs' has no installation candidate
E: Unable to locate package lib32z-dev
E: Package 'lib32readline-gplv2-dev' has no installation candidate
E: Package 'lib32readline5' has no installation candidate
E: Package 'lib32readline6' has no installation candidate
E: Package 'lib32bz2-dev' has no installation candidate
E: Unable to locate package libwxgtk2.6-dev
E: Couldn't find any package by regex 'libwxgtk2.6-dev
Click to expand...
Click to collapse
dewanshu93 said:
M getting error
Click to expand...
Click to collapse
sorry for my mistake
u should enter it in package manager and install them all
Your local_manifest.xml is incorrect for compiling CM10.1.
chasmodo said:
Your local_manifest.xml is incorrect for compiling CM10.1.
Click to expand...
Click to collapse
The Below Manifest is for Compiling CM10. Not CM10.1
Good effort though
Sent from my GT-N7000 using xda app-developers app
The issue with guides like these is they are specific to one version of Ubuntu. I successfully build Android on gentoo, which has about as little in common with Ubuntu as possible. Hence we prefer to go for guides which, where possible, teach the reasoning, rather than the method.
For building CM, this might be worthwhile merging into the "how to build android from source" one?
Unfortunately this guide isn't usable for most people, as it relies on the hacksung build scripts, so you can only build for certain devices...
What might be better is a guide on using roomservice via lunch, to build for any device?
pulser_g2 said:
The issue with guides like these is they are specific to one version of Ubuntu. I successfully build Android on gentoo, which has about as little in common with Ubuntu as possible. Hence we prefer to go for guides which, where possible, teach the reasoning, rather than the method.
For building CM, this might be worthwhile merging into the "how to build android from source" one?
Unfortunately this guide isn't usable for most people, as it relies on the hacksung build scripts, so you can only build for certain devices...
What might be better is a guide on using roomservice via lunch, to build for any device?
Click to expand...
Click to collapse
i said in starting This is based for Galaxy Note 1 But You can edit to make for your phone
I'd guess this is a step by step guide for people with this device as others have said and it is very specific. What would be useful is if you did it in steps and was more generic, say when you set up your environment you tell the reader to check for himself in device forums for a devs source code to be able to try. and if that is too difficult to explain then you may have to explain the principle for the people with little to no knowledge of building what they are doing instead of type this and paste that. great idea, but needs much improvement in actual teaching. also if someone had the knowledge to edit to make it for their own phones then they wouldn't need to use this guide in the first place.
Thanks for this nice guide! Thanks +1 for you! :good:
For some reason the CM repo isnt syncing in the folder I want it to.
Code:
mkdir ~/cm10
cd ~/cm10
repo init -u git://github.com/CyanogenMod/android.git -b jellybean
repo sync -j16
It just spits everything in the home directory (~/) and the working folder I wanted everything in (~/cm10) is empty.
Any idea what the hell I'm doing wrong?
Edit: Well I got it to sync in the folder I wanted it to finally. I had to
Code:
rm -rf ~/.repo
first before it would initialize in my cm10 folder. Absolutely bizarre...
@OP
You might wanna change "CopyPasta" to "Copy-Paste".
i made it for fun
Oh okay then. But to me, it seems a bit...err...unprofessional. No offense intended.
mithun46 said:
sorry for my mistake
u should enter it in package manager and install them all
Click to expand...
Click to collapse
Using aptitude I've got this:
[email protected]:~$ sudo aptitude 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-ddev: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.6-dev python
Keine Kandidatsversion für lib32ncurses5-dev gefunden
Keine Kandidatsversion für ia32-libs gefunden
Es konnte kein Paket gefunden werden, dessen Name oder Beschreibung auf »lib32z-dev« passt.
Keine Kandidatsversion für lib32readline-gplv2-dev gefunden
Keine Kandidatsversion für lib32readline5 gefunden
Keine Kandidatsversion für lib32readline6 gefunden
Keine Kandidatsversion für lib32bz2-dev gefunden
Keine Kandidatsversion für libwxgtk2.6-dev gefunden
Keine Kandidatsversion für lib32ncurses5-dev gefunden
Keine Kandidatsversion für ia32-libs gefunden
Es konnte kein Paket gefunden werden, dessen Name oder Beschreibung auf »lib32z-dev« passt.
Keine Kandidatsversion für lib32readline-gplv2-dev gefunden
Keine Kandidatsversion für lib32readline5 gefunden
Keine Kandidatsversion für lib32readline6 gefunden
Keine Kandidatsversion für lib32bz2-dev gefunden
Keine Kandidatsversion für libwxgtk2.6-dev gefunden
Die folgenden NEUEN Pakete werden zusätzlich installiert:
bison flex g++-4.7-multilib{a} g++-multilib gcc-4.7-multilib{a} gcc-multilib{a} ghc{a} git{a} git-core git-man{a} gperf lib64gcc1{a} lib64gomp1{a} lib64itm1{a} lib64quadmath0{a}
lib64stdc++6{a} libasound2-dev{a} libaudiofile-dev{a} libavahi-client-dev{a} libavahi-common-dev{a} libbison-dev{a} libbsd-dev{a} libbz2-dev libc6-amd64{a} libc6-dev-amd64{a}
libcaca-dev{a} libdbus-1-dev{a} libesd0-dev libffi-dev{a} libfl-dev{a} libghc-bzlib-dev libglib2.0-dev{a} libgmp-dev{a} libgmpxx4ldbl{a} liblzo2-2{a} libncurses5-dev libpcre3-dev{a}
libpcrecpp0{a} libpng12-dev{a} libpulse-dev{a} libreadline-dev libreadline6-dev libsdl1.2-dev libslang2-dev{a} libtinfo-dev{a} mingw32 mingw32-binutils{a} mingw32-runtime{a} pngcrush
python-markdown python-pygments{a} schedtool squashfs-tools tofrodos xsltproc
Die folgenden Pakete werden ENTFERNT:
ca-certificates-java{u} libatk-wrapper-java{u} libatk-wrapper-java-jni{u} tzdata-java{u}
0 Pakete aktualisiert, 55 zusätzlich installiert, 4 werden entfernt und 0 nicht aktualisiert.
103 MB an Archiven müssen heruntergeladen werden. Nach dem Entpacken werden 425 MB zusätzlich belegt sein.
Möchten Sie fortsetzen? [Y/n/?] y
Running Kubuntu 12.10, KDE 4.9.4
try to use stock package manager
mithun46 said:
try to use stock package manager
Click to expand...
Click to collapse
Isn't "apt" the "stock" package manager in (K)Ubuntu?
But I've another question @mithun46: Is it possible, that your guide only works on a 64bit edition of ubuntu? So that 32bit installations ain't supported?
Hey all -
I've been trying for a couple days to build from the instructions at docs.omnirom.org/Build_for_mako without much success. I am able to sync the repository - it seems to download all the devices though and I'm a little confused at that.
I resync after adding the vendor blobs by adding the following to .repo/local_manifests/ (from the guide):
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project path="device/lge/mako-kernel" name="device/lge/mako-kernel" groups="device,mako" revision="refs/tags/android-4.3_r2.1_" />
</manifest>
Then I receive the following:
Code:
fatal: duplicate project device/lge/mako-kernel in /mnt/ddrive/android/omni/.repo/manifest.xml
This makes sense because the project is already in the .repo/manifest.xml
From there I try to execute the following from my repository.
Code:
. build/envsetup.sh; brunch mako
It runs for about 23 minutes, I don't get any errors, but I also don't get the installable .zip file.
Sorry if this is the wrong place to ask development questions.
caspian154 said:
Hey all -
I've been trying for a couple days to build from the instructions at docs.omnirom.org/Build_for_mako without much success. I am able to sync the repository - it seems to download all the devices though and I'm a little confused at that.
I resync after adding the vendor blobs by adding the following to .repo/local_manifests/ (from the guide):
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project path="device/lge/mako-kernel" name="device/lge/mako-kernel" groups="device,mako" revision="refs/tags/android-4.3_r2.1_" />
</manifest>
Then I receive the following:
Code:
fatal: duplicate project device/lge/mako-kernel in /mnt/ddrive/android/omni/.repo/manifest.xml
This makes sense because the project is already in the .repo/manifest.xml
From there I try to execute the following from my repository.
Code:
. build/envsetup.sh; brunch mako
It runs for about 23 minutes, I don't get any errors, but I also don't get the installable .zip file.
Sorry if this is the wrong place to ask development questions.
Click to expand...
Click to collapse
U just delete the <project path="device/lge/mako-kernel" name="device/lge/mako-kernel" groups="device,mako" revision="refs/tags/android-4.3_r2.1_" /> in the local_manifest.xml
yeah, I've tried that - it comes, but I don't get the zip file. I tried a couple of options in the local_manifests from another thread and actually got a zip!
Sent from my Nexus 4 using xda app-developers app
caspian154 said:
yeah, I've tried that - it comes, but I don't get the zip file. I tried a couple of options in the local_manifests from another thread and actually got a zip!
Sent from my Nexus 4 using xda app-developers app
Click to expand...
Click to collapse
can you post the link about the other thread ?
thanks a lot !!
ilpolpi65 said:
can you post the link about the other thread ?
thanks a lot !!
Click to expand...
Click to collapse
Yep - sorry, I haven't been near a computer until now. I haven't tested out the rom yet, but it definitely generated a zip file ~ 155 mb, which doesn't seem wrong. Anyway, here's the post I stole from: http://forum.xda-developers.com/showpost.php?p=46661249&postcount=5
here's specifically what I have in my .repo/local_manifests/roomservice.xml
Code:
<manifest>
<project name="TheMuppets/proprietary_vendor_lge.git" path="vendor/lge" remote="github" revision="cm-10.2" />
<project name="TheMuppets/proprietary_vendor_broadcom.git" path="vendor/broadcom" remote="github" revision="cm-10.2" />
<project name="TheMuppets/proprietary_vendor_nvidia.git" path="vendor/nvidia" remote="github" revision="cm-10.2" />
<project name="TheMuppets/proprietary_vendor_elan.git" path="vendor/elan" remote="github" revision="cm-10.2" />
<project name="TheMuppets/proprietary_vendor_invensense.git" path="vendor/invensense" remote="github" revision="cm-10.2" />
<project name="TheMuppets/proprietary_vendor_widevine.git" path="vendor/widevine" remote="github" revision="cm-10.2" />
<project name="TheMuppets/proprietary_vendor_nxp.git" path="vendor/nxp" remote="github" revision="cm-10.2" />
<project name="TheMuppets/proprietary_vendor_asus.git" path="vendor/asus" remote="github" revision="cm-10.2" />
<project name="TheMuppets/proprietary_vendor_imgtec.git" path="vendor/imgtec" remote="github" revision="cm-10.2" />
<project name="TheMuppets/proprietary_vendor_samsung.git" path="vendor/samsung" remote="github" revision="cm-10.2" />
<project name="omnirom/android_device_asus_flo" path="device/asus/flo" remote="github" revision="android-4.3" />
<project name="omnirom/android_kernel_google_msm" path="kernel/google/msm" remote="github" revision="android-msm-mako-3.4-jb-mr2" />
<project name="omnirom/android_device_lge_mako" path="device/lge/mako" remote="github" revision="android-4.3" />
<project name="omnirom/android_kernel_lge_mako" path="kernel/lge/mako" remote="github" revision="android-4.3" />
</manifest>
caspian154 said:
Hey all -
I've been trying for a couple days to build from the instructions at docs.omnirom.org/Build_for_mako without much success. I am able to sync the repository - it seems to download all the devices though and I'm a little confused at that.
I resync after adding the vendor blobs by adding the following to .repo/local_manifests/ (from the guide):
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project path="device/lge/mako-kernel" name="device/lge/mako-kernel" groups="device,mako" revision="refs/tags/android-4.3_r2.1_" />
</manifest>
Then I receive the following:
Code:
fatal: duplicate project device/lge/mako-kernel in /mnt/ddrive/android/omni/.repo/manifest.xml
This makes sense because the project is already in the .repo/manifest.xml
From there I try to execute the following from my repository.
Code:
. build/envsetup.sh; brunch mako
It runs for about 23 minutes, I don't get any errors, but I also don't get the installable .zip file.
Sorry if this is the wrong place to ask development questions.
Click to expand...
Click to collapse
My bad, I'm the one who edited part of the doc there, and i was fearing some confusion, definitely need a bit of rewrite, as i wrote that doc prior to roomservice.xml intergration.
Basically, if you are using an omni.dependencies file in the device folder, you don't need to include mako kernel dependencies in local_manifest.xml, but you will need to lunch breakfast and lunch prior to brunch to actually sync this branch.
If you are not using omni.dependencies, you should ignore the first part of the doc, and only use the second part, with title "deprecated".
You should actually delete roomservice.xml if you're not using it to sync, or else you would have the problem you currently have.
In other terms, keep only that part
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="github" fetch="https://github.com/" />
<project name="android_kernel_lge_mako" path="kernel/lge/mako" remote="omnirom" revision="android-4.3"/>
</manifest>
in a local_manifest.xml in your .repo/local_manifests directory, and delete the roomservice.xml file which is useless until you use an omni.dependencies file.
Also delete the changes you made out of local_manifest.xml, rule is only one declaration per branch
The so called blobs ( i didn't write that part) are actually not part of that repo, you could add themuppets repo for mako in your local_manifest.xml, for legal reasons, i couldn't include it in Omni's wiki.
Hope this will solve your problem, will try to edit the doc tomorrow to allow roomservice usage.
thanks a lot! I figured that all made more sense for those that were more experienced ROM developers. I would rather use the also stuff and not rely on cm blobs. I'm building for educational purposes - I'd like to make some tweaks here and there, so I want it as close to what the omni nightlies will be when they arrive.
Thanks for your explanation and documenting all that you do! I've been leaching off ROM developers for years and want to join in and help out.
Sent from my Nexus 4 using xda app-developers app
caspian154 said:
thanks a lot! I figured that all made more sense for those that were more experienced ROM developers. I would rather use the also stuff and not rely on cm blobs. I'm building for educational purposes - I'd like to make some tweaks here and there, so I want it as close to what the omni nightlies will be when they arrive.
Thanks for your explanation and documenting all that you do! I've been leaching off ROM developers for years and want to join in and help out.
Sent from my Nexus 4 using xda app-developers app
Click to expand...
Click to collapse
You're welcome, and you can actually ignore part of my previous post, I just fully edited the doc, now everything is using roomservice.xml and omni.dependencies, so all mako's files get synced when you launch brunch mako, only themuppets repo can be added manually in local_manifest.xml in your .repo/local_manifests directory.
Sorry for the delay in a proper doc, got quite busy, and had little time do write something accurate.
I'm sorry - I am still not getting a zip file when I follow the steps on the wiki.
I sync the repo using the instructions,
Code:
repo sync -j1
It completes, I don't make any changes to the repo. I run the build
Code:
. build/envsetup.sh
brunch mako
It seems to complete without any errors. I do see complaints that I don't have an omni.dependencies file. Do I need to manually create that? I really want the purest rom - nothing special.
I think you have to create it, but I'm not perfectly sure..anyone else?
22anl said:
I think you have to create it, but I'm not perfectly sure..anyone else?
Click to expand...
Click to collapse
No. If you don't get a zip in your out folder, you've got a build error.
OK, that helps, I will comb through the output and see if I can find out what I'm missing. Thanks!
Sent from my Nexus 4 using xda app-developers app
You may need to cherry pick from gerrit to get it to build right
Also, here's what it will look like if your build is successful
Sweet thanks guys! I got it building, I somehow missed that I needed to do breakfast before I did a sync and build.
Hi folks,
i want to share with my selfcompiled CM 12.1 nighlies after cm switch peregrine to CM13.
Some people like me dont update so quick but also want the last android security patches for CM 12.1
This is my first selfcompiled rom, it is works for me, i can give no support, i am no programmer, i am only put some sripts on my computer
So, if you brake your phone or something else it is your fault.
It is compiled with help docker container from michael_ch, release 0.30
http://forum.xda-developers.com/showpost.php?p=59811186&postcount=1734
git clone https://github.com/stucki/docker-cyanogenmod.git
cd docker-cyanogenmod
./run.sh
# Inside the container, run these commands:
repo init -u git://github.com/CyanogenMod/android.git -b cm-12.1
touch .repo/local_manifests/motorola-msm8226.xml
# Edit the file and paste contents from below
# Repeat the following commands whenever you want to make a new build:
repo sync -j 16
source build/envsetup.sh
make clean
brunch peregrine
Click to expand...
Click to collapse
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="CyanogenMod/android_device_motorola_peregrine" path="device/motorola/peregrine" remote="github" revision="cm-12.1" />
<project name="CyanogenMod/android_device_motorola_msm8226-common" path="device/motorola/msm8226-common" remote="github" revision="cm-12.1" />
<project name="TheMuppets/proprietary_vendor_motorola" path="vendor/motorola" remote="github" revision="cm-12.1" />
<project name="CyanogenMod/android_kernel_motorola_msm8226" path="kernel/motorola/msm8226" remote="github" revision="cm-12.1" />
<project name="CyanogenMod/android_device_qcom_common" path="device/qcom/common" remote="github" />
<project name="CyanogenMod/android_hardware_qcom_fm" path="hardware/qcom/fm" remote="github" />
</manifest>
Click to expand...
Click to collapse
No changes, original CM12.1 repos, nothing optimized
Download:
http://www.mediafire.com/download/mbfakd5nl96t88b/cm-12.1-20151209-UNOFFICIAL-peregrine.zip
MD5: 735db013275a356c08639f3f105eddb0 cm-12.1-20151209-UNOFFICIAL-peregrine.zip
Reposync 20151209, all december security patches
I will post updates if something important change in CM12.1 or new security patches will released and i am still on CM12.1
Special thanks to all the the people here on xda to make this possible for me!
Indeed it was excellent of you bro, there are some of us that are not supported by the cm13 and this is a wonderful option.
Nice. Pls can you post results from Stagefright Detector (https://play.google.com/store/apps/details?id=com.zimperium.stagefrightdetector) and VTS for Android (http://www.appbrain.com/app/vts-for-android/com.nowsecure.android.vts)?
jccz said:
Nice. Pls can you post results from Stagefright Detector (https://play.google.com/store/apps/details?id=com.zimperium.stagefrightdetector) and VTS for Android (http://www.appbrain.com/app/vts-for-android/com.nowsecure.android.vts)?
Click to expand...
Click to collapse
Sorry i do not install dubios testing software on my working telephone
Bastlwastl2010 said:
Sorry i do not install dubios testing software on my working telephone
Click to expand...
Click to collapse
OK. Maybe some other will be able to test it.
Hi there!
I'm receiving some pm about users that want to learn how to build LineageOS for the Galaxy Note 4 (snapdragon), so here is a quick guide:
Only supported device for now are trltexx/trltedt (N910F/N910G) and trltetmo/trltecan (N910T/N910W8)
I suggest to use a LTS version of ubuntu, in this guide I'll be using Ubuntu 16.04
Let's start with a bit of cleaning:
Code:
sudo apt-get remove openjdk-* icedtea-* icedtea6-*
Install java8:
Code:
sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update && sudo apt-get install openjdk-8-jdk
Install build tools:
Code:
sudo apt-get install git ccache automake lzop bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 g++-multilib python-networkx libxml2-utils bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev squashfs-tools pngcrush schedtool dpkg-dev liblz4-tool make optipng maven
Install repo:
Code:
mkdir ~/bin && curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo && chmod a+x ~/bin/repo
Edit ~/.bashrc (in this exaple I'm using gedit to do it):
Code:
gedit ~/.bashrc
Add those 2 lines at the bottom of the file (we are going to add also ccache to speed up our build time):
Code:
export PATH=~/bin:$PATH
export USE_CCACHE=1
Save it, close gedit and run:
Code:
source ~/.bashrc
Let's create some folders where we'll be doing the magic:
Code:
mkdir ~/android && cd ~/android
mkdir lineageos && cd lineageos
Initialize the local repo and download the source:
Code:
repo init -u git://github.com/LineageOS/android.git -b cm-14.1
repo sync --force-sync
It'll take quite some time, depends on your internet connection.
Once it's done downloading and checking out the files:
Code:
cd .repo
mkdir local_manifests && cd local_manifests
Now create a new file in this folder, name it "roomservice.xml" and add this into it:
For trltexx/trltedt:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="underscoremone/android_kernel_samsung_trlte" path="kernel/samsung/trlte" remote="github" revision="cm-14.1" />
<project name="underscoremone/android_device_samsung_trlte-common" path="device/samsung/trlte-common" remote="github" revision="cm-14.1" />
<project name="underscoremone/android_device_samsung_trltexx" path="device/samsung/trltexx" remote="github" revision="cm-14.1" />
<project name="underscoremone/proprietary_vendor_samsung_trlte" path="vendor/samsung" remote="github" revision="cm-14.1" />
<project name="LineageOS/android_device_samsung_qcom-common" path="device/samsung/qcom-common" remote="github" revision="cm-14.1" />
<project name="LineageOS/android_external_stlport" path="external/stlport" remote="github" revision="cm-14.1" />
<project name="LineageOS/android_device_qcom_common" path="device/qcom/common" remote="github" revision="cm-14.1" />
</manifest>
For trltetmo/trltecan:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="underscoremone/android_kernel_samsung_trlte" path="kernel/samsung/trlte" remote="github" revision="cm-14.1" />
<project name="underscoremone/android_device_samsung_trlte-common" path="device/samsung/trlte-common" remote="github" revision="cm-14.1" />
<project name="fat-tire/android_device_samsung_trltetmo" path="device/samsung/trltetmo" remote="github" revision="cm-14.1" />
<project name="underscoremone/proprietary_vendor_samsung_trlte" path="vendor/samsung" remote="github" revision="cm-14.1" />
<project name="LineageOS/android_device_samsung_qcom-common" path="device/samsung/qcom-common" remote="github" revision="cm-14.1" />
<project name="LineageOS/android_external_stlport" path="external/stlport" remote="github" revision="cm-14.1" />
<project name="LineageOS/android_device_qcom_common" path="device/qcom/common" remote="github" revision="cm-14.1" />
</manifest>
Now go back to the root of the source ("lineageos" folder) and repo sync again
Code:
cd ../..
repo sync
It'll now download the specific repositories for your device.
Then run
for trltexx/trltedt
Code:
. build/envsetup.sh && brunch trltexx
or for trltetmo/trltecan
Code:
. build/envsetup.sh && brunch trltetmo
And your build will start.
Once done you'll find your flashable rom.zip file in out/target/product/trlte**/
Congratulations you've successfully compiled LineageOS 14.1 for your device.
Remember to "make clean" every now and then.
------
Sometimes you'll get some errors, try to google the error and if you can not find a solution ask for help here at xda.
------
Hopefully I didn't forget anything.. if you have any trouble following this guide reply to this thread; myself or someone else will try to help you as soon as possible.
If you like to have the keyboard with the extra numbers row add this (before "</manifest>") to your roomservice.xml:
Code:
<remove-project name="LineageOS/android_packages_inputmethods_LatinIME" />
<project name="underscoremone/android_packages_inputmethods_LatinIME" path="packages/inputmethods/LatinIME" remote="github" revision="_cm-14.1" />
-----------------------------------------------------------------------------------------
If you want to include su to your builds you have to run
Code:
export WITH_SU=true
before starting the build.
If you want to always include it you can add the same line to your .bashrc (remember to run "source ~/.bashrc" after you modify .bashrc)
Hello,
First of all thank you for sharing this guide.
I haven't yet compiled with success but so far one of the errors I've encountered is that i need to include the following in my local manifest:
Code:
<project name="LineageOS/android_hardware_samsung" path="hardware/samsung" remote="github" revision="cm-14.1" />
or else I'm getting an error about missing macloader.h
Running a compile now so i will return once that finished
Diload said:
Hello,
First of all thank you for sharing this guide.
I haven't yet compiled with success but so far one of the errors I've encountered is that i need to include the following in my local manifest:
Code:
<project name="LineageOS/android_hardware_samsung" path="hardware/samsung" remote="github" revision="cm-14.1" />
or else I'm getting an error about missing macloader.h
Running a compile now so i will return once that finished
Click to expand...
Click to collapse
Yep, you're right; I've missed it. I've updated the op.
Edit:
Actually I thought it was going to be downloaded automatically because it is included in the dependencies of "android_device_samsung_qcom-common".. maybe I'm wrong. Anyway I've added it to the guide's trltexx.xml, you may want to be aware that we still need "android_packages_resources_devicesettings" "android_packages_apps_FlipFlap" and "android_hardware_sony_timekeep", they should be automatically added to your roomservice.xml (because they are included in our lineage.dependencies) but if it doesn't happen you probably want to add it to your trltexx.xml.
How are things different if I want to build for TMO? How much disk space you need?
Sent from my SM-N910T using Tapatalk
rob_z11 said:
How are things different if I want to build for TMO? How much disk space you need?
Sent from my SM-N910T using Tapatalk
Click to expand...
Click to collapse
I've updated the op with the changes needed for trltetmo/trltecan.
You need approximately 60gb, but I would go with more if you can.
hi can you show me how to build for the n910w8 ?
outstanding
Sent from my SM-N9300 using Tapatalk
Okay so i finally got a working build compiled, got a lot of issues with java compiler and javadoc using too much memory,
if anyone is interested it is fixed by setting
Code:
$ export ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G"
Just edit the 4G in the end to the amount of ram you would allow the java compiler to run, be aware that you would still need about an additional of 4,5 gigs of ram available other than what you specify here, at least that was the case for me, since the java compiler doesn't clear out when other stuff is processed during the compile (like c, c++ and javadoc compilation)
_mone said:
Yep, you're right; I've missed it. I've updated the op.
Edit:
Actually I thought it was going to be downloaded automatically because it is included in the dependencies of "android_device_samsung_qcom-common".. maybe I'm wrong. Anyway I've added it to the guide's trltexx.xml, you may want to be aware that we still need "android_packages_resources_devicesettings" "android_packages_apps_FlipFlap" and "android_hardware_sony_timekeep", they should be automatically added to your roomservice.xml (because they are included in our lineage.dependencies) but if it doesn't happen you probably want to add it to your trltexx.xml.
Click to expand...
Click to collapse
I don't know, when I run brunch it doesn't create the roomservice.xml file, i think that it gets done with the breakfast command, but that would create instances in my roomservice.xml that conflicted with the trltexx repos pulled from another source from the other local manifest.
So i ended up with this local manifest (i.e. trltexx.xml)
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project path="device/samsung/trlte-common" name="Diload/android_device_samsung_trlte-common" remote="github" revision="cm-14.1" />
<project path="kernel/samsung/trlte" name="Diload/android_kernel_samsung_trlte" remote="github" revision="cm-14.1" />
<project path="device/samsung/trltexx" name="Diload/android_device_samsung_trltexx" remote="github" revision="cm-14.1" />
<project path="vendor/samsung" name="Diload/proprietary_vendor_samsung_trlte" remote="github" revision="cm-14.1" />
<project name="LineageOS/android_device_samsung_qcom-common" path="device/samsung/qcom-common" remote="github" revision="cm-14.1" />
<project name="LineageOS/android_external_stlport" path="external/stlport" remote="github" revision="cm-14.1" />
<project name="LineageOS/android_device_qcom_common" path="device/qcom/common" remote="github" revision="cm-14.1" />
<project name="LineageOS/android_hardware_samsung" path="hardware/samsung" remote="github" revision="cm-14.1" />
<project name="LineageOS/android_packages_resources_devicesettings" path="packages/resources/devicesettings" remote="github" revision="cm-14.1" />
<project name="LineageOS/android_packages_apps_FlipFlap" path="packages/apps/FlipFlap" remote="github" revision="cm-14.1" />
<project name="LineageOS/android_hardware_sony_timekeep" path="hardware/sony/timekeep" remote="github" revision="cm-14.1" />
</manifest>
And it is now running on my phone
Well done @Diload :good:
elitedz said:
hi can you show me how to build for the n910w8 ?
Click to expand...
Click to collapse
If you want build for trltecan (N910W8) follow this guide and make the changes described for trltetmo. trltetmo and trltecan, like trltexx and trltedt can share the same ROM.
_mone said:
If you want build for trltecan (N910W8) follow this guide and make the changes described for trltetmo. trltetmo and trltecan, like trltexx and trltedt can share the same ROM.
Click to expand...
Click to collapse
thank you
how about some love for the N910V ???
hi! I how about NOTE 4 DUOS N9100 which has two sim? Now only one sim works,wifi and another sim donot work. how solve it?Thanks!
Nice clear info!
Thanks!
Especially the part about local manifest, other guides I've read in past never touch on that part. Thank you.
N910V never gets any love
ok so what would I have to do to make one strictly for the N910V ? id just change it to trltevzw ?
happy2472 said:
N910V never gets any love
ok so what would I have to do to make one strictly for the N910V ? id just change it to trltevzw ?
Click to expand...
Click to collapse
For trltevzw you may want to have a look at the verzion forum and ask the recognized developers that are building LineageOS to share their source. Good luck with that!
_mone said:
For trltevzw you may want to have a look at the verzion forum and ask the recognized developers that are building LineageOS to share their source. Good luck with that!
Click to expand...
Click to collapse
Im guessing thats like gold??
What's the point installing lineageos on note4?
Not trolling... Just curious.
I bet we will lose everything this phone is great about (s pen menu etc.).
Thanks!
bat0nas said:
What's the point installing lineageos on note4?.
Click to expand...
Click to collapse
This is probably not the right place for such a discussion as this is about building LineageOS yourself, based on the the guide that _mone has very kindly provided. I suggest opening a new thread yourself inviting discussion/advice, or maybe look around the various LineageOS dev threads to see what people are saying. The known issues / missing functionality is pretty well documented, but I'm sure people will be happy let you know in a thread where it is appropriate
I've been following the instrucsions from here:
[GUIDE/HOW-TO] Building LineageOS for an Unsupported Device
Foreword: This is my own notes I created to build LOS for my device (SM-T713 or gts28vewifi). After reading this, I encourage you to create your own notes as it will help you better understand the build process. I followed the official guide...
forum.xda-developers.com
To try and compile LOS 18.1, and I am using this manifest:
local_manifests/gts28vewifi.xml at lineage-17.1 · team-infusion-developers/local_manifests
Contribute to team-infusion-developers/local_manifests development by creating an account on GitHub.
github.com
And i am getting this error. Wondering if anyone has any insight into how to get past this. Thanks in advance:
[100% 182/182] out/soong/.bootstrap/bin/soong_build out/soong/build.
FAILED: out/soong/build.ninja
out/soong/.bootstrap/bin/soong_build -t -l out/.module_paths/Android
.bp.list -b out/soong -n out -d out/soong/build.ninja.d -globFile ou
t/soong/.bootstrap/build-globs.ninja -o out/soong/build.ninja Androi
d.bp
error: hardware/samsung/hidl/power-libperfmgr/Android.bp:22:1: "andr
[email protected]" depends on undefi
ned module "libperfmgr"
Module "[email protected]" is de
fined in namespace "." which can read these 1 namespaces: ["."]
Module "libperfmgr" can be found in these namespaces: ["hardware/goo
gle/pixel"]
17:31:32 soong bootstrap failed with: exit status 1
@thefanum,
While it's nice to follow the provided instructions, one of the main problems with them is that they get out of date if not updated periodically.
Specifically these commits made March 14, 2023.
https://review.lineageos.org/q/git-lfs
require that git-lfs be installed on the host computer now otherwise the compiler will stop and webview.apk won't get installed properly in the rom.
So if you are running a Debian style distro, then you need
Bash:
# install git-lfs
sudo apt install git-lfs
# cd into LineageOS code directory
cd ~/18.1
# tell build system we have git-lfs
repo init --git-lfs
# get rid of old webview
rm -rf external/chromium-webview/prebuilt/*
rm -rf .repo/projects/external/chromium-webview/prebuilt/*.git
rm -rf .repo/project-objects/LineageOS/android_external_chromium-webview_prebuilt_*.git
# sync everything
repo sync --force-sync
Compiling the next version of Android always requires some code changes. That is, using 17.1 code and trying to build 18.1 will never work.
I've already done 99.9% of the work for T713 because the T813 and T713 share the same common code trees. Since there were no code changes from 17.1 to 18.1 for the device specific tree
https://github.com/retiredtab/android_device_samsung_gts210vewifi
and assuming none are needed for the gts28vewifi tree, then you can use the 17.1 existing tree with MY manifest from
https://github.com/retiredtab/LineageOS-build-manifests/tree/main/18.1
That is, your version of my 181-gts210vewifi.xml should look like
XML:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<!-- Samsung Device Trees -->
<project name="team-infusion-developers/android_device_samsung_gts28vewifi" path="device/samsung/gts28vewifi" remote="github" revision="lineage-17.1" />
<project name="retiredtab/android_device_samsung_gts210vewifi" path="device/samsung/gts210vewifi" remote="github" revision="lineage-18.1" />
<project name="retiredtab/android_device_samsung_msm8976-common" path="device/samsung/msm8976-common" remote="github" revision="lineage-18.1" />
<!-- Samsung MSM8976 Kernel -->
<project name="syphyr/android_kernel_samsung_msm8976" path="kernel/samsung/msm8976" remote="github" revision="lineage-16.0" />
<!-- Vendor Trees (for all devices) -->
<project name="retiredtab/proprietary_vendor_samsung_msm8976" path="vendor/samsung" remote="github" revision="lineage-18.1" />
<!-- Samsung Hardware Repo -->
<project path="hardware/samsung" name="LineageOS/android_hardware_samsung" remote="github" revision="lineage-18.1"/>
<!-- Dependencies -->
<project path="external/sony/boringssl-compat" name="LineageOS/android_external_sony_boringssl-compat" remote="github" revision="lineage-18.1"/>
<project name="LineageOS/android_hardware_sony_timekeep" path="hardware/sony/timekeep" remote="github" revision="lineage-18.1" />
</manifest>
In theory, this should yield an equivalent 18.1 T713 build with the same functionality as my 18.1 T813 build.
I suggest you follow my 18.1 build specific instructions at
https://github.com/retiredtab/Linea...ob/main/18.1/181-gts210vewifi-build-guide.txt
One person on xda has followed them and created their own 18.1 T813 private builds.
I'll also make 3 suggestions during your build phase.
1. Make an "eng" build so that adb logcat starts right away so you can see log messages on your console. Once everything works, you can then build the "userdebug".
Bash:
# j4 means 4 threads. If you have 6 core, 12 thread CPU, then change this to 12.
TARGET_BUILD_TYPE=debug TARGET_BUILD_VARIANT=eng make -j4 bacon
2. My publicly released 18.1 T813 is selinux enforcing. There's no guarantee that the rules I wrote will work 100% with the T713 so you should revert/undo this commit
https://github.com/retiredtab/andro...mmit/687691a81e028d002919f9f1d069b5b0c9d72512
so that the build is permissive. Once everything works, then you can enforce the build.
3. You will need at least 16GB DRAM to make this 18.1 64 bit build. The more the better.
thefanum said:
Code:
[100% 182/182] out/soong/.bootstrap/bin/soong_build out/soong/build.
FAILED: out/soong/build.ninja
out/soong/.bootstrap/bin/soong_build -t -l out/.module_paths/Android
.bp.list -b out/soong -n out -d out/soong/build.ninja.d -globFile ou
t/soong/.bootstrap/build-globs.ninja -o out/soong/build.ninja Androi
d.bp
error: hardware/samsung/hidl/power-libperfmgr/Android.bp:22:1: "andr
[email protected]" depends on undefi
ned module "libperfmgr"
Module "[email protected]" is de
fined in namespace "." which can read these 1 namespaces: ["."]
Module "libperfmgr" can be found in these namespaces: ["hardware/goo
gle/pixel"]
17:31:32 soong bootstrap failed with: exit status 1
Click to expand...
Click to collapse
The above error is because you are trying to use the 17.1 tree and compiling 18.1 and you are not picking up the 18.1 tree at
https://github.com/LineageOS/android_hardware_samsung/commits/lineage-18.1
If you look at the March 18, 20 and 21, 2021 changes, that's where they added libperfmgr.
retiredtab said:
@thefanum,
While it's nice to follow the provided instructions, one of the main problems with them is that they get out of date if not updated periodically.
Specifically these commits made March 14, 2023.
https://review.lineageos.org/q/git-lfs
require that git-lfs be installed on the host computer now otherwise the compiler will stop and webview.apk won't get installed properly in the rom.
So if you are running a Debian style distro, then you need
Bash:
# install git-lfs
sudo apt install git-lfs
# cd into LineageOS code directory
cd ~/18.1
# tell build system we have git-lfs
repo init --git-lfs
# get rid of old webview
rm -rf external/chromium-webview/prebuilt/*
rm -rf .repo/projects/external/chromium-webview/prebuilt/*.git
rm -rf .repo/project-objects/LineageOS/android_external_chromium-webview_prebuilt_*.git
# sync everything
repo sync --force-sync
Compiling the next version of Android always requires some code changes. That is, using 17.1 code and trying to build 18.1 will never work.
I've already done 99.9% of the work for T713 because the T813 and T713 share the same common code trees. Since there were no code changes from 17.1 to 18.1 for the device specific tree
https://github.com/retiredtab/android_device_samsung_gts210vewifi
and assuming none are needed for the gts28vewifi tree, then you can use the 17.1 existing tree with MY manifest from
https://github.com/retiredtab/LineageOS-build-manifests/tree/main/18.1
That is, your version of my 181-gts210vewifi.xml should look like
XML:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<!-- Samsung Device Trees -->
<project name="team-infusion-developers/android_device_samsung_gts28vewifi" path="device/samsung/gts28vewifi" remote="github" revision="lineage-17.1" />
<project name="retiredtab/android_device_samsung_gts210vewifi" path="device/samsung/gts210vewifi" remote="github" revision="lineage-18.1" />
<project name="retiredtab/android_device_samsung_msm8976-common" path="device/samsung/msm8976-common" remote="github" revision="lineage-18.1" />
<!-- Samsung MSM8976 Kernel -->
<project name="syphyr/android_kernel_samsung_msm8976" path="kernel/samsung/msm8976" remote="github" revision="lineage-16.0" />
<!-- Vendor Trees (for all devices) -->
<project name="retiredtab/proprietary_vendor_samsung_msm8976" path="vendor/samsung" remote="github" revision="lineage-18.1" />
<!-- Samsung Hardware Repo -->
<project path="hardware/samsung" name="LineageOS/android_hardware_samsung" remote="github" revision="lineage-18.1"/>
<!-- Dependencies -->
<project path="external/sony/boringssl-compat" name="LineageOS/android_external_sony_boringssl-compat" remote="github" revision="lineage-18.1"/>
<project name="LineageOS/android_hardware_sony_timekeep" path="hardware/sony/timekeep" remote="github" revision="lineage-18.1" />
</manifest>
In theory, this should yield an equivalent 18.1 T713 build with the same functionality as my 18.1 T813 build.
I suggest you follow my 18.1 build specific instructions at
https://github.com/retiredtab/Linea...ob/main/18.1/181-gts210vewifi-build-guide.txt
One person on xda has followed them and created their own 18.1 T813 private builds.
I'll also make 3 suggestions during your build phase.
1. Make an "eng" build so that adb logcat starts right away so you can see log messages on your console. Once everything works, you can then build the "userdebug".
Bash:
# j4 means 4 threads. If you have 6 core, 12 thread CPU, then change this to 12.
TARGET_BUILD_TYPE=debug TARGET_BUILD_VARIANT=eng make -j4 bacon
2. My publicly released 18.1 T813 is selinux enforcing. There's no guarantee that the rules I wrote will work 100% with the T713 so you should revert/undo this commit
https://github.com/retiredtab/andro...mmit/687691a81e028d002919f9f1d069b5b0c9d72512
so that the build is permissive. Once everything works, then you can enforce the build.
3. You will need at least 16GB DRAM to make this 18.1 64 bit build. The more the better.
Click to expand...
Click to collapse
You're the man! Thanks so much for your help here.
I'm on it!