Feel like a Noob.. How to build Cyanogenmod <nightly> for d850 - G3 Developer Discussion [Developers Only]

OK. I thought this would be easy.
I've built for TI based platforms and know a bit about the process..
So I went to the site of sites https://wiki.cyanogenmod.org/w/Build_for_d855 though for the d855 and thought that I could glean enough to get things runing using the manifest stored in the current cm-12.1 that is in my d850..
Got a sweet build environment.. 16 core/32hypercore with 48GB ram and 1TB SDD RAID.
Got the code downloaded using
repo init -u https://github.com/CyanogenMod/android.git -b cm-12.0 << Maybe I should have used 12.1 but ignore for now
repo sync << Waited a long time and it loaded up a ton of stuff so that looks good..
Now I try to do something I've done on TI platforms
source build/envsetup.sh << but I get an error
The error is
bash: build/envsetup.sh: line 1: syntax error near unexpected tokin '{'
bash: build/envsetup.sh: line 1: function hmm() {
Ive looked and I cant figure out why this doesnt work...
ARGH!!!

Update
Well the only update I have now is that I got the manifest out of my d850 and placed it into the repo and did a repo sync and I saw that the repo updated the branches to 5.1.1 stuff..
Still cant get the source build/envsetup.sh to work... same error...

did you update all the repos to 5.1.1?
try ". build/envsetup.sh" (yeah it's a period before build ) instead of "source build/envsetup.sh"
i also need to know what OS are you using on your environment.. i advice UBUNTU 14.04 64bit to build android since is the most compatible try to use that maybe it can help..
http://forum.xda-developers.com/lg-g3/development/guide-how-to-build-cyanogenmod-12-t2953132 this is my old guide to build cyanogenmod (it's referred for cm12 since it's old but might still help)

Related

[Q] empty folder after git clone

at http://source.android.com/source/downloading.html there are a list of URL's to clone the android kernels from...
everytime I do "git clone https://android.googlesource.com/kernel/samsung.git"... the folder is empty...
I've tried it numerous times ( using Archlinux and Ubuntu as they both have different version's of git in their repo )
Is there something wrong with the repo?
I have tried
$ git clone https://android.googlesource.com/kernel/common.git
$ git clone https://android.googlesource.com/kernel/omap.git
$ git clone https://android.googlesource.com/kernel/samsung.git
and all three are the same with just a ".git" inside and nothing else...
I've cloned the android framework folder fine with no issues using the "repo" script
edit: nevermind... solved it... forgot about the "git branch -a" command
Help!
sinatosk said:
at http://source.android.com/source/downloading.html there are a list of URL's to clone the android kernels from...
everytime I do "git clone https://android.googlesource.com/kernel/samsung.git"... the folder is empty...
I've tried it numerous times ( using Archlinux and Ubuntu as they both have different version's of git in their repo )
Is there something wrong with the repo?
I have tried
$ git clone https://android.googlesource.com/kernel/common.git
$ git clone https://android.googlesource.com/kernel/omap.git
$ git clone https://android.googlesource.com/kernel/samsung.git
and all three are the same with just a ".git" inside and nothing else...
I've cloned the android framework folder fine with no issues using the "repo" script
edit: nevermind... solved it... forgot about the "git branch -a" command
Click to expand...
Click to collapse
Sorry to ask but i am total noob in using git and i am not able to understand how to use the command "git branch -a" ?
I am trying to get source code for galaxy nexus.

[DEV] manifest for AOKP compilation

hi!
@mods i don't know which section this should go to... maybe general?? anyways ... my good friend colossus has said "when in doubt, always post in Q&A" so that's what i did, incase this was to be in some other section, please move it...
i am taking the plunge to try and compile aokp for arc as well as my current phone which is x10 (i do not have an arc of my own, but my cousin has one)
here's how i begin (my build requirements are fulfilled)
mkdir ~/aokp
cd aokp
repo init -u git://github.com/AOKP/platform_manifest.git -b ics
ok well now if i do repo sync then itt'll take me at least 15 hrs to do it (i have a 2mbs connection which is too slow frankly)
so what i do is
sudo gedit .repo/manifest.xml
and here is my edited manifest
http://pastebin.com/cqfrYvcG
you'll notice that unrequired htc,samsung and motorola devices have been commented out (why waste bandwidth downloading files i wont ever need???)
also i've included es209ra(which is x10) and anzu and msm7x30 common (required for arc) reops from cyanogenmod github
now i've done this because from ~/aokp folder, next whenever i run repo sync then freexperia team's changes committed to cm9 will automatically get synced.. nice na??
whatever... if anyone is interested in AOKP go forward with this...
i'm NOT a dev and i'll just try the default build procedure, and if i run into roadblocks, i WILL give up because i do NOT have the developmental knowledge to edit sources to make it run ...

Help with cherry picking and making fixes to a ROM (cm13)

so I decided to try and make unofficial cm13 builds for d2att, but the network isn't working, and I need help learning how to fix bugs
I feel like I can follow the instructions in this guide: http://forum.xda-developers.com/showthread.php?t=2763236
but I don't know what I should cherry pick to fix the network issue UPDATE: network fixed! / where to look / what to do in general
Here's my development thread:
http://forum.xda-developers.com/galaxy-s3-att/development/rom-unofficial-cm13-d2att-t3280433
Also, how do I use themuppets for the proprietary blobs? For that build, ^^^ I just used the extract-files.sh while running matrixzone's build (linked in my development thread) thanks @jason2678
oh and how do I set the number of threads to use when using the brunch command? All i remember is you type "-j#" or something with # being the number of threads you want to assign I'll just stick to using brunch
For the muppets I add this line to ./.repo/local_manifests/roomservice.xml when I build for this phone:
Code:
<project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung" remote="github" revision="cm-13.0" />
Do another repo sync after adding that to roomservice and you'll sync all the blobs from TheMuppets. That's probably overkill because it gets you all kinds of other samsung stuff, but if you have hard drive space and bandwidth its dead simple and gets a working build with no fuss. You probably just need d2att, d2-common, msm8960-common, and qcom-common to build for this phone.
I always set j = # cores X 2, but that's just something I read to do somewhere.
And if you haven't done it yet set up ccache unless you have a really awesome machine to build with. Saves you tons of time.
Good luck. :good:
Thanks! You helped me with themuppets but idk where to type the -j# because as soon as I enter
Code:
brunch d2att
The build starts.
and entering
Code:
brunch d2att -j8
gives an error, saying I have an invalid lunch combo
I do remember when I tried compiling slimkat a year ago, the build command was
Code:
make -j# bacon
would that work for compiling cyanogenmod instead of typing in brunch? nope doesn't work What's the difference? lol
Also, I have ccache set to 100GB
thanks so much!
Sent from my SAMSUNG-SGH-I747 using Tapatalk
Arunscape said:
Thanks! You helped me with themuppets but idk where to type the -j# because as soon as I enter
I do remember when I tried compiling slimkat a year ago, the build command was
Code:
make -j# bacon
would that work for compiling cyanogenmod instead of typing in brunch? nope doesn't work What's the difference? lol
Click to expand...
Click to collapse
Bacon is the code name for oneplus one; sorry if you know that and were just giving an example command. That command might be giving errors if you haven't run breakfast for bacon. The syntax looks right. I think this should start a build:
Code:
breakfast d2att
. build/envsetup.sh
make -j# d2att
But I usually just do
Code:
brunch d2att
to kick off a build.
I haven't been messing with this too much lately. This phone isn't my daily driver anymore, and my daughter doesn't take too kindly to when I want to take her phone to flash an experimental build.
jason2678 said:
Bacon is the code name for oneplus one; sorry if you know that and were just giving an example command. That command might be giving errors if you haven't run breakfast for bacon. The syntax looks right. I think this should start a build:
Code:
breakfast d2att
. build/envsetup.sh
make -j# d2att
But I usually just do
Code:
brunch d2att
to kick off a build.
I haven't been messing with this too much lately. This phone isn't my daily driver anymore, and my daughter doesn't take too kindly to when I want to take her phone to flash an experimental build.
Click to expand...
Click to collapse
ohhhhhhh I see that makes sense, so brunch is just a shortcut basically so you can type less I'll try it out and report back myself ^_^
Arunscape said:
ohhhhhhh I see that makes sense, so brunch is just a shortcut basically so you can type less I'll try it out and report back myself ^_^
Click to expand...
Click to collapse
Yeah, and now that I've had a few cups of coffee I think I mislead you on that earlier post. bacon is the codename for the 1+1, but I think it is also CMs shortcut for building the compiled ROM into a flashable zip.
Code:
. build/envsetup.sh
brunch d2att
is the same thing as
Code:
. build/envsetup.sh
breakfast d2att && mka bacon
You're right, it just saves you a little typing. Pretty much every I've fiddled with (Slim, PAC, CM, Chroma) has some shortcut way like that to kick off a build. Sorry about that.
jason2678 said:
Yeah, and now that I've had a few cups of coffee I think I mislead you on that earlier post. bacon is the codename for the 1+1, but I think it is also CMs shortcut for building the compiled ROM into a flashable zip.
Code:
. build/envsetup.sh
brunch d2att
is the same thing as
Code:
. build/envsetup.sh
breakfast d2att && mka bacon
You're right, it just saves you a little typing. Pretty much every I've fiddled with (Slim, PAC, CM, Chroma) has some shortcut way like that to kick off a build. Sorry about that.
Click to expand...
Click to collapse
Yep that code above works, but I still can't specify the amount of threads I want to use.
Example: if I type
Code:
source build/envsetup.sh
breakfast d2att
make -j4 bacon
I get an error
but if I only type
Code:
source build/envsetup.sh
breakfast d2att
make bacon
it works
I think with CM it is recommended to just use brunch or mka. mka is supposed to automatically take advantage of all the threads available. That way you don't have to worry about how many cores, Intel or AMD, is HyperThreading available, etc. You don't even need to specify -j, it should just go to an optimized default for your hardware.
If you use make it might only be using a portion of the power of a modern, multi-core processor.
jason2678 said:
I think with CM it is recommended to just use brunch or mka. mka is supposed to automatically take advantage of all the threads available. That way you don't have to worry about how many cores, Intel or AMD, is HyperThreading available, etc. You don't even need to specify -j, it should just go to an optimized default for your hardware.
If you use make it might only be using a portion of the power of a modern, multi-core processor.
Click to expand...
Click to collapse
oh. I thought mka was a typo lol.
update: I just tried building with mka and it returned an error also. but brunch works fine
I'll just stick to using brunch.
Arunscape said:
oh. I thought mka was a typo lol.
update: I just tried building with mka and it returned an error also. but brunch works fine
Click to expand...
Click to collapse
shows what I now
now I'm wondering how to add/remove apps from the source code so that when I build, certain apps are pre-installed.
Example: removing cyanogenmod's file manager and installing es file explorer
removing trebuchet and replacing it with google now launcher
installing youtube

Building LineageOS for Samsung S6 (zeroltexx)

I am after some help in building LineageOS 15.1 for Samsung S6 (zerofltexx) and S6 Edge (zeroltexx). I know it isn't officially supported (only 14.1 is official), however there are unofficial builds and apparently all the sources required are on GitHub.
I have tried LOTS of times to build this but each build has the same issues when flashed to the S6 Edge I have to test with.
I have followed the guide here - https://wiki.lineageos.org/devices/zeroltexx/build which officially covers building Lineage 14.1. I have wiped an i7 PC with 24GB RAM and 2 * 1TB disks. I installed Ubuntu 18.04 desktop, installed all updates, added all the required components listed in the guide (I also needed to add python that wasn't listed). I changed the repo sync command to be 'repo init -u https://github.com/LineageOS/android.git -b lineage-15.1'. I then pulled in the 'zero.xml' repo manifest from here - https://github.com/Exynos7420/local_manifests and added it to /.repo/local_manifests/ and then built the ROM.
It appears to build OK - there are lots of errors in the log, however I think this is correct? It takes about 37-minutes and it outputs a .zip file in the out/product/zeroltexx directory. This installs OK to the S6 Edge, however there is an error at the start of it booting about selinux (small red text at the top of the screen for a couple of seconds). Once booted the audio doesn't work and neither does the RIL. This is compared to the unofficial ROM that Enes Uzun has created.
I have asked (and asked...) for help on the telegram group, however I keep getting told I am not doing anything wrong. If this is the case then I am doing something wrong in creating my build environment - i.e. Ubuntu or the Lineage build parts.
I am hoping someone on here has had a similar experience and managed to solve the issues or can point me in the right direction as I am stumped. I have wiped the machine and rebuilt Ubuntu 18.04 desktop 3 times so far. Following the build the results are the same each time so whatever I am doing wrong I am doing it each time.
Any help is really appreciated.
Andy
Help....
In my continuing failed attempts at building this I have now wiped another PC - Intel Core 2 Quad-Core Dell XPS with 16GB RAM and 2 * 640GB hard drives, installed Ubuntu 18.04, followed the guide etc etc etc and have hit EXACTLY the same issue so I am definitely doing something wrong.
I found this guide - https://forum.xda-developers.com/android/software-hacking/guide-how-to-build-lineageos-15-1-t3750175 which is for Lineage 16.0, however there is a link to this - https://web.archive.org/web/2018061...ng/guide-how-to-build-lineageos-15-1-t3750175 which is for Lineage 15.1.
So I wiped the original i7 24GB machine and installed Windows 10 Insider Preview 18290, enabled WSL and then added Ubuntu 18.04 from the microsoft store and then followed the guide TO THE LETTER and added the zero.xml from https://github.com/Exynos7420/local_manifests to the /.repo/local_manifests folder, did a 'repo sync' etc etc. Guess what? same f'cking issue..
Help please anyone? I just want to build my own Lineage 15.1 for Samsung S6 (zerofltexx) and S6 Edge (zeroltexx) so that I am not reliant on someone else releasing randomly periodic ROMs that are likely to stop when the developer stops building Lineage 15.1.
Help...
Fixed it....
The zeroltexx sources were incomplete. They were missing some files and a couple of files were wrong. These have now been updated by the maintainer (https://github.com/Exynos7420/android_device_samsung_zeroltexx), however these haven't been pushed to the official Lineage repositories yet (https://github.com/LineageOS/android_device_samsung_zeroltexx). Therefore if you are going to build it yourself you will need to use the Exynos7420 repositories (for the S6 Edge zeroltexx that is - the S6 zerofltexx has the right stuff).
Andy
Hi ADB100,
many thanks! I will try the same, after my lovely S5 get's the black-screen-of-death.
My colleague gave my an old S6, but I had lerned to love los 16.
My problem was to know howto add additional sources to the los 16 sources. Here your thread gave my some important tips.
I started to learn a build with the official sources of los 14.1, but it failed of less ram on my computer and an out of memory error message.
So I grabbed 6 gb of an old pc to give it a next try next week. If it will work I will tdy los16.
I'm not a developer, but familiar with Linux. My problem is to add all sources and to manage git and repo.
Additional to use the zero.xml. I put it on your mentioned folder, but "breakfast zero" or "breakfast zeroltexx" sent me a nothing found!
Do you have a good tutorial which I can follow?
I spent a lot af time to search for it, but all tutorials was for official build, same like the los build guide.

General Manifest FIle

Hello Fellow developer and programmer, I'm building a custom by using Ressurection Remix as a base, While I'm initializing the repo an error occurred, How to solve that. The Error is repo is not reccoginzsed as an internal or external command, I have installed the repo, thanks for the reading the post
LMGTFY - Let Me Google That For You
For all those people who find it more convenient to bother you with their question rather than to Google it for themselves.
bfy.tw
Deadshot0x7 said:
Hello Fellow developer and programmer, I'm building a custom by using Ressurection Remix as a base, While I'm initializing the repo an error occurred, How to solve that. The Error is repo is not reccoginzsed as an internal or external command, I have installed the repo, thanks for the reading the post
Click to expand...
Click to collapse
Download repo and make executable. Basic stuff man. Google as suggested above.
William.trem said:
Download repo and make executable. Basic stuff man. Google as suggested above.
Click to expand...
Click to collapse
thanks btw I'm new to custom rom
Deadshot0x7 said:
thanks btw I'm new to custom rom
Click to expand...
Click to collapse
I'm working on porting one myself. Repo is available within the Ubuntu apt-get repository. That can be a simpler way to install. However I'd suggest the curl & chmod method method for the latest binary as well as getting good experience.
Source control tools | Android Open Source Project
source.android.com
Downloading the Source | Android Open Source Project
source.android.com
2 sec to google
Follow the instructions to add the repository, then do an initial repo sync, I hope you have plenty of drive space cos some roms can take up many GB
The manifest instructions even link you to the guide for setting up git and repo
Ubuntu is usually the best platform for this, it might work in Windows subsystem for Linux but I've never tried so couldn't tell you.
Haven't built a rom for a while but you used to add device tree urls in .repo/local_manifests/roomservice.xml, it's probably still done the same way. (.repo is a hidden folder by default so, in Ubuntu, you would press CTRL+H to get it to show up)
If you don't know how to install repo then you will likely need to do a LOT of reading before you can even think of firing off a build.
djsubterrain said:
Follow the instructions to add the repository, then do an initial repo sync, I hope you have plenty of drive space cos some roms can take up many GB
The manifest instructions even link you to the guide for setting up git and repo
Ubuntu is usually the best platform for this, it might work in Windows subsystem for Linux but I've never tried so couldn't tell you.
Haven't built a rom for a while but you used to add device tree urls in .repo/local_manifests/roomservice.xml, it's probably still done the same way. (.repo is a hidden folder by default so, in Ubuntu, you would press CTRL+H to get it to show up)
If you don't know how to install repo then you will likely need to do a LOT of reading before you can even think of firing off a build.
Click to expand...
Click to collapse
Currently having success within WSL v1 Ubuntu.

Categories

Resources