[Tutorial] Build and flash AOSP with only Docker - Google Pixel 5 Guides, News, & Discussion

I've created Dockerfile and two scripts which sets up a development environment, builds AOSP, and flashes it to the Pixel 5. The only requirement for doing this is Docker - everything else is taken care of within the container.
Reboot your Pixel 5 to fastboot (power+voldown) and run the following to start using plain AOSP on a Pixel 5.
Code:
git clone https://github.com/nvllsvm/pixel5-aosp-builder
cd pixel5-aosp-builder
docker build . -t aosp
docker run -it -v $(pwd):/build aosp ./build.sh
docker run --privileged -v /dev/bus/usb:/dev/bus/usb -v $(pwd):/build aosp ./flash.sh
GitHub Repository

Anyone have success with this besides OP?

socioteq said:
Anyone have success with this besides OP?
Click to expand...
Click to collapse
No. Why? Why would you from the ultimate to meh?

Draje0 said:
I've created Dockerfile and two scripts which sets up a development environment, builds AOSP, and flashes it to the Pixel 5. The only requirement for doing this is Docker - everything else is taken care of within the container.
Reboot your Pixel 5 to fastboot (power+voldown) and run the following to start using plain AOSP on a Pixel 5.
Code:
git clone https://github.com/nvllsvm/pixel5-aosp-builder
cd pixel5-aosp-builder
docker build . -t aosp
docker run -it -v $(pwd):/build aosp ./build.sh
docker run --privileged -v /dev/bus/usb:/dev/bus/usb -v $(pwd):/build aosp ./flash.sh
GitHub Repository
Click to expand...
Click to collapse
thank you

.....

Related

[HOWTO] Create your own AOSP 100% stock

EDIT: Just updated post 2 you probably want to read both this post and that post before trying to build.
you can skip the part of getting the official source and the cyanogen source by just doing
Code:
repo init -u git://github.com/CyanogenMod/android.git -b froyo
First some prereqs You must be using linux and building for an evo 4G aka htc_supersonic
Install the android SDK as instructed here: http://developer.android.com/sdk/installing.html
You will need JDK most linux distros have this in the respositorys.
Then just follow step 2 and make sure that you can run adb from any directory in terminal.
Now to the good stuff.
You will now need to open a terminal window and run the following as root
Code:
cd /usr/bin/; curl http://android.git.kernel.org/repo > repo; chmod a+x /usr/bin/repo
now as user do the following
Code:
mkdir ~/android
cd ~/andoid
repo init -u git://android.git.kernel.org/platform/manifest.git
repo sync
This can take FOREVER like 4-5 hours so you might want to let it go when you go to sleep.
Depending on how fast your computer is the following step can take a long time too
Code:
cd ~/andoid
make
This will build the source code for a generic device it should build everything correctly if you have all of the compilers and what not. If it fails just install the app that it is complaining about.
Now for the EVO specific stuff
Code:
cd ~/android/device/htc
git clone http://github.com/CyanogenMod/android_device_htc_supersonic.git supersonic
That will get the build files however you are going to have to edit them to get it to work.
~/android/device/htc/supersonic/BoardConfig.mk needs to be edited
Code:
TARGET_RECOVERY_UI_LIB := librecovery_ui_supersonic librecovery_ui_htc
TARGET_RECOVERY_UPDATER_LIBS += librecovery_updater_htc
should be
Code:
#TARGET_RECOVERY_UI_LIB := librecovery_ui_supersonic librecovery_ui_htc
#TARGET_RECOVERY_UPDATER_LIBS += librecovery_updater_htc
Some other files may have to be edited to your liking. Personaly I changed ADWLauncher to launcher2 and removed all of the cyanogen stuff.
Now to setup the build enviroment.
Code:
cd ~/android
cp ./vendor/cyanogen/products/cyanogen_supersonic.mk ./buildspec.mk
. build/envsetup.sh
lunch cyanogen_supersonic-eng
Now to do the building.
Code:
make CYANOGEN_WITH_GOOGLE=true otapackage ## if you want google apps (market etc.)
make otapackage ## 100% Open Source only!
By the way for some reason you have to inclued the otapackage even if you just want the .img files because otherwise it crashes at least for me.
Let me know if you encounter any problems and I will try to help.
UPDATES
Copy your ~android folder somewhere and replace ~/android in this tutorial with the directory that you copied it to. This will allow you to update the overlay when needed.
To add google files you will need to do this
Code:
cd ~/android/vendor/cyanogen
./get-google-files
This gets the htc files and I think taht it might be required.
Code:
cd ~/android/device/htc/supersonic
./extract-files.sh
To make a clean rom like mine do the following:
Edit the file ~/android/vendor/cyanogen/products/common.mk to your liking. I just changed the build name and rom version.
I added the files sysrw and sysro ad you can see in the file just put them in a directory and tell it where they are and where you want them. Also I commented out rommanager.apk as I don't like or use it. Also I use RA recovery so it wont work for me anyway.
Also edit the file ~/android/vendor/cyanogen/products/cyanogen_supersonic.mk
I chaged teh build number to the latest spring and removed the boot animation as I like the stock android one better (and it is faster).
YOU NEED TO do this if you want a keyboard...
edit ~/android/vendor/cyanogen/Android.mk and remove LatinIME!
Now we delete some files.
go to ~/android/packages/apps
delete any application that you don't want. You can optionally add program source code that you do want.
I deleted CM* and Protips
I also edited some code in Settings to remove Cyanogen stuff. Actually I took the stock android stuff an edited that with one little fix but I forgot what it was. Just try to build and it will tell you in an error message.
another reserved post
Really cool
Awesome! Thanks so much for posting this.
thanks dude!!
Thanks man.
question...
im having an issue with this step
Code:
cd ~/adnroid
cp ./vendor/cyanogen/products/cyanogen_supersonic.mk ./buildspec.mk
. build/envsetup.sh
lunch cyanogen_supersonic-eng
specifically (lets ignore the type in the instructions
Code:
$ cp ./vendor/cyanogen/products/cyanogen_supersonic.mk ./buildspec.mk
cp: cannot stat `./vendor/cyanogen/products/cyanogen_supersonic.mk': No such file or directory
$ find ~/android -name "cyanogen_supersonic.mk"
$ echo $?
0
anyone else having this issue?
So what is the difference between this and running CM6?
Will this avoid the market issues with CM6?
Once it's built, how do you get it installed on the phone?
Here is the link to cyanogens wiki how too......
http://wiki.cyanogenmod.com/index.php?title=Compile_CyanogenMod_for_Supersonic
Anyway to do this on Windows 7? Another question, would this still work if I just ran Ubuntu from disk?
Thanks, will def.ly give this a try soon...
Sent from my PC36100 using Tapatalk
onicrom said:
question...
im having an issue with this step
Code:
cd ~/adnroid
cp ./vendor/cyanogen/products/cyanogen_supersonic.mk ./buildspec.mk
. build/envsetup.sh
lunch cyanogen_supersonic-eng
specifically (lets ignore the type in the instructions
Code:
$ cp ./vendor/cyanogen/products/cyanogen_supersonic.mk ./buildspec.mk
cp: cannot stat `./vendor/cyanogen/products/cyanogen_supersonic.mk': No such file or directory
$ find ~/android -name "cyanogen_supersonic.mk"
$ echo $?
0
anyone else having this issue?
Click to expand...
Click to collapse
there was a typo in my code I edited the post and it should work now.
cteneyck said:
Here is the link to cyanogens wiki how too......
http://wiki.cyanogenmod.com/index.php?title=Compile_CyanogenMod_for_Supersonic
Click to expand...
Click to collapse
So really, this is just CM6 built on your own Linux box?
Sent from my PC36100 using Tapatalk
Can this be done from ubuntu on a virtual machine?
And what's the difference between this and cm6 ?.....
how do you replace the adw launcher ?
how can you add additional applications?
onicrom said:
how do you replace the adw launcher ?
how can you add additional applications?
Click to expand...
Click to collapse
in vendor/cyanogen/products
replace this
Code:
#PRODUCT_PACKAGES += ADWLauncher
PRODUCT_PACKAGES += Launcher2
also all of the people asking what the differnece between this and cm is nothing unless you change the source files or add remove packages. they can be found in the packages directory.
Igotsanevo4g said:
Can this be done from ubuntu on a virtual machine?
And what's the difference between this and cm6 ?.....
Click to expand...
Click to collapse
yes you can do this in VM but i don;t know the exact steps to set that up just once you get into your linux VM follow the tutorial.
nice tut. thanks for this...sure it will help MANY
l33tlinuxh4x0r said:
in vendor/cyanogen/products
replace this
Code:
#PRODUCT_PACKAGES += ADWLauncher
PRODUCT_PACKAGES += Launcher2
also all of the people asking what the differnece between this and cm is nothing unless you change the source files or add remove packages. they can be found in the packages directory.
Click to expand...
Click to collapse
Thanks much

[DEV][WIP] Wanna learn to dev correctly?

Recently there has been some issues with people thinking they are developing when they are not. Now this isn't here to call out anyone. I am here for one simple reason. To teach people how to develop on android correctly. This is an initial post to stir up some interest.
Simply I wanted to try and setup a google+ webchat with questions or comments. How-tos. This can all be done through a google+ chat. If anyone is interested just hit me up on google+ and watch out for the invites it will be in about 2 weeks.
I will be updating this OP with tons of android tips and tricks I have picked up. Currently finshing the first draft in a few minutes.
Thanks!
============
Installing the android sdk and getting adb working.
NOTE: You will need to install java before this will work correctly.
Code:
wget http://dl.google.com/android/android-sdk_r12-linux_x86.tgz
tar xvf android-sdk_r12-linux_x86.tgz
mkdir $HOME/.sdk
mv android-sdk-linux_x86/ $HOME/.sdk/android-sdk/
echo "
#Android Paths
export PATH='$HOME/.sdk/android-sdk/tools/:$HOME/.sdk/android-sdk/platform-tools/:${PATH}'
#Adb Alias
alias start-adb='sudo $HOME/.sdk/android-sdk/platform-tools/./adb start-server'
alias kill-adb='sudo $HOME/.sdk/android-sdk/platform-tools/./adb kill-server'
" >> ~/.bashrc
rm android-sdk_r12-linux_x86.tgz
Now simply type in your terminal:
Code:
source ~/.bashrc
or restart your terminal session.
then type:
Code:
android
Working with Sense
Installing apktool
Apktool - http://code.google.com/p/android-apktool/
All apktool credits go to the apktool devs, I just use the tool!
NOTE: Install sdk using my sdk install guide in post 1.
Code:
wget http://android-apktool.googlecode.com/files/apktool1.4.1.tar.bz2
wget http://android-apktool.googlecode.com/files/apktool-install-linux-r04-brut1.tar.bz2
tar -jxvf apktool-install-linux-r04-brut1.tar.bz2
tar -jxvf apktool1.4.1.tar.bz2
mv apktool $HOME/.sdk/android-sdk/platform-tools
mv aapt $HOME/.sdk/android-sdk/platform-tools
mv apktool.jar $HOME/.sdk/android-sdk/platform-tools
rm apktool-install-linux-r04-brut1.tar.bz2
rm apktool1.4.1.tar.bz2
Now if your sdk is setup like mine and you placed it in this folding after following my sdk guide. apktool should now be installed on your system.
Using the apktool (quick overview)
You can simply do the "apktool if" to your framework resources. This is sense below.
Code:
apktool if framework-res.apk
apktool if com.htc.resources.apk
then decompile:
Code:
apktool d framework-res.apk
compile:
Code:
apktool b framework-res
batch decompile:
Code:
for x in $(ls |grep '.apk' |sort); do apktool d $x; echo Decompiled $x; done
batch compile:
Code:
for x in $(ls |grep -v '.apk' |sort); do apktool d $x; echo Compiled $x; done
Languages to look for when removing system languages from apks:
Code:
values-ar values-ar-rEG values-ar-rIL values-bg values-bg-rBG values-br values-ca-rES values-cs values-cs-rCZ values-da values-da-rDK values-de values-de-rAT values-de-rCH values-de-rDE values-de-rLI values-el values-el-rGR values-en-rAU values-en-rCA values-en-rGB values-en-rIE values-en-rIN values-en-rNZ values-en-rSG values-en-rUS values-en-rZA values-es values-es-rES values-es-rUS values-fi values-fi-rFI values-fr values-fr-rBE values-fr-rCA values-fr-rCH values-fr-rFR values-he-rIL values-hi-rIN values-hr values-hr-rHR values-hu values-hu-rHU values-id-rID values-it values-it-rCH values-it-rIT values-ja values-ja-rJP values-ko values-ko-rKR values-lt-rLT values-lv-rLV values-mcc204 values-mcc204-cs values-mcc204-da values-mcc204-de values-mcc204-el values-mcc204-es values-mcc204-es-rUS values-mcc204-fr values-mcc204-it values-mcc204-ja values-mcc204-ko values-mcc204-nl values-mcc204-pl values-mcc204-pt values-mcc204-pt-rPT values-mcc204-ru values-mcc204-sv values-mcc204-tr values-mcc204-zh-rCN values-mcc204-zh-rTW values-mcc230 values-mcc230-cs values-mcc230-da values-mcc230-de values-mcc230-el values-mcc230-es values-mcc230-es-rUS values-mcc230-fr values-mcc230-it values-mcc230-ja values-mcc230-ko values-mcc230-nl values-mcc230-pl values-mcc230-pt values-mcc230-pt-rPT values-mcc230-ru values-mcc230-sv values-mcc230-tr values-mcc230-zh-rCN values-mcc230-zh-rTW values-mcc232 values-mcc232-cs values-mcc232-da values-mcc232-de values-mcc232-el values-mcc232-es values-mcc232-es-rUS values-mcc232-fr values-mcc232-it values-mcc232-ja values-mcc232-ko values-mcc232-nl values-mcc232-pl values-mcc232-pt values-mcc232-pt-rPT values-mcc232-ru values-mcc232-sv values-mcc232-tr values-mcc232-zh-rCN values-mcc232-zh-rTW values-mcc234 values-mcc234-cs values-mcc234-da values-mcc234-de values-mcc234-el values-mcc234-es values-mcc234-es-rUS values-mcc234-fr values-mcc234-it values-mcc234-ja values-mcc234-ko values-mcc234-nl values-mcc234-pl values-mcc234-pt values-mcc234-pt-rPT values-mcc234-ru values-mcc234-sv values-mcc234-tr values-mcc234-zh-rCN values-mcc234-zh-rTW values-mcc260 values-mcc260-cs values-mcc260-da values-mcc260-de values-mcc260-el values-mcc260-es values-mcc260-es-rUS values-mcc260-fr values-mcc260-it values-mcc260-ja values-mcc260-ko values-mcc260-nl values-mcc260-pl values-mcc260-pt values-mcc260-pt-rPT values-mcc260-ru values-mcc260-sv values-mcc260-tr values-mcc260-zh-rCN values-mcc260-zh-rTW values-mcc262 values-mcc262-cs values-mcc262-da values-mcc262-de values-mcc262-el values-mcc262-es values-mcc262-es-rUS values-mcc262-fr values-mcc262-it values-mcc262-ja values-mcc262-ko values-mcc262-nl values-mcc262-pl values-mcc262-pt values-mcc262-pt-rPT values-mcc262-ru values-mcc262-sv values-mcc262-tr values-mcc262-zh-rCN values-mcc262-zh-rTW values-nb values-nb-rNO values-nl values-nl-rBE values-nl-rNL values-pl values-pl-rPL values-pt values-pt-rBR values-pt-rPT values-ro values-ro-rRO values-ru values-ru-rRU values-sk values-sk-rSK values-sl values-sl-rSI values-sr values-sr-rRS values-sv values-sv-rSE values-th values-th-rTH values-tl-rPH values-tr values-tr-rTR values-uk-rUA values-vi values-vi-rVN values-zh-rCN values-zh-rHK values-zh-rTW values-zh-rTW-hdpi values-cs-nokeys values-da-nokeys values-de-nokeys values-el-nokeys values-es-nokeys values-es-rUS-nokeys values-fr-nokeys values-it-nokeys values-ja-nokeys values-ko-nokeys values-nb-nokeys values-nl-nokeys values-pl-nokeys values-pt-nokeys values-pt-rPT-nokeys values-ru-nokeys values-sv-nokeys values-tr-nokeys values-zh-rCN-nokeys values-zh-rTW-nokeys values-lt values-ca values-uk values-lv values-tl values-in values-iw values-ms values-no values-rm values-fa values-sw values-zh-rMO values-mcc262-sk values-mcc262-tl values-mcc234-hr values-mcc234-hu values-mcc262-fi values-mcc234-tl values-mcc234-sr values-mcc234-lv values-mcc262-lv values-mcc234-bg values-mcc234-en-rGB values-mcc234-sl values-mcc262-nb values-mcc234-uk values-mcc262-en-rGB values-mcc262-vi values-mcc234-nb values-mcc262-uk values-mcc262-lt values-mcc262-sr values-mcc262-ar values-mcc262-bg values-mcc234-sk values-mcc262-ca values-mcc262-ro values-mcc234-vi values-mcc262-th values-mcc234-ar values-mcc234-ca values-mcc262-hu values-mcc234-fi values-mcc234-lt values-mcc262-hr values-mcc262-sl values-mcc234-th values-mcc234-ro values-mcc206-de values-mcc228-de values-mcc262-fa values-mcc295-de values-mcc262-rm values-mcc270-de values-mcc262-in values-mcc262-iw values-zh-rHK-land-hdpi values-zh-rCN-land-hdpi values-zh-rHK-hdpi values-zh-rTW-land-hdpi values-mcc214 values-mcc311 values-mcc310 values-mcc466 values-mcc310-mnc220 values-mcc310-mnc200 values-mcc310-mnc270 values-mcc890-mnc126 values-mcc214-mnc1 values-mcc310-mnc800 values-mcc234-mnc15-gb values-mcc310-mnc490 values-mcc204-mnc4 values-mcc310-mnc260 values-mcc250-mnc1 values-mcc204-mnc4-nl values-mcc214-mnc1-es values-mcc310-mnc230 values-mcc310-mnc26 values-mcc310-mnc210 values-mcc310-mnc330 values-mcc234-mnc15 values-mcc310-mnc170 values-mcc310-mnc280 values-mcc310-mnc290 values-mcc310-mnc660 values-mcc310-mnc160 values-mcc262-mnc2-de values-mcc310-mnc240 values-mcc310-mnc580 values-mcc310-mnc310 values-mcc310-mnc250 values-mcc262-mnc2 values-en-rSA values-mcc238-mnc6 values-mcc235-mnc94 values-mcc505-mnc6 values-mcc240-mnc2 values-mcc505-mnc3 values-zh-rCN-hdpi values-mcc234-mnc20 values-mcc272-mnc5 values-mcc232-mnc10 values-en-rUA values-en-rRU values-en-rUA-hdpi values-en-rRU-hdpi values-es-rMX values-zh-rCN-normal-port values-zh-rCN-normal-land values-ur values-ja-rEN values-et values-is values-nn values-tr-800x480 values-zz-rZZ values-mcc466-zz-rZZ values-mcc230-zz-rZZ values-mcc234-zz-rZZ values-mcc214-zz-rZZ values-mcc204-zz-rZZ values-mcc232-zz-rZZ values-mcc262-zz-rZZ values-mcc260-zz-rZZ values-en values-zh-rTW-finger values-de-keysexposed values-ru-keysexposed values-ja-finger values-zh-rTW-keyshidden values-de-keyshidden values-fr-keyshidden values-it-keysexposed values-ru-finger values-ja-keyshidden values-nl-finger values-pl-finger values-fr-finger values-de-finger values-ko-finger values-zh-rCN-keysexposed values-nl-keyshidden values-es-keyshidden values-ru-keyshidden values-zh-rCN-keyshidden values-cs-keysexposed values-cs-finger values-es-finger values-cs-keyshidden values-fr-keysexposed values-nl-keysexposed values-zh-rTW-keysexposed values-it-keyshidden values-it-finger values-pl-keyshidden values-ja-keysexposed values-pl-keysexposed values-ko-keyshidden values-es-keysexposed values-zh-rCN-finger values-ko-keysexposed values-zh values-he values-es-rCR values-es-rCL values-eu values-es-rSV values-es-rNI values-ln values-es-rAR values-gl values-es-rPY values-es-rBO values-es-rPE values-es-rVE values-hi values-mo
Dsixda Android Kitchen:
Dsixda Android Kitchen - https://github.com/dsixda/Android-Kitchen
Again all credit goes to the developers of this kitchen. I only simply use it!
There are two ways to install this kitchen.
- Download it here and unzip it - https://github.com/dsixda/Android-Kitchen/archives/master
- What I do is sync with his github using git.
Note: Make sure you have git installed.
Code:
sudo apt-get install git-core
Then simply clone there repo where ever you like locally.
Code:
git clone https://github.com/dsixda/Android-Kitchen.git
Note: This method is a way to use the latest code. Use at your own risk might be bugs. Don't report issues for versions not released yet!
Working with AOSP
Compiling SalvageMod
NOTE: Until kernel.org is up. This will not work at all!
Hey there, you are here because you want to be able to compile SalvageMod for your HTC Evo. There is one simple way to do so and its very easy. Here are the current versions of SalvageMod that you can compile.
* SalvageMod1.3 (Stable)
* gingerbread (Development)
Click to expand...
Click to collapse
Please note that the gingerbread branch is the same as our "nightly" or unstable branch. As other releases come available this page will be updated with those branches. Now its time for the fun stuff.
Let's make sure we have all the needed files to compile on [http://www.ubuntu.com Ubuntu 11.04].
Use this repo for java:
Code:
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
32 bit install:
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 sun-java6-jdk pngcrush
64 bit users will need:
Code:
sudo apt-get install g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.4-multilib g++-4.4-multilib
Now we create a development directory, it doesn't matter what the name is or where its at. For example I always do:
Code:
mkdir -p ~/Development/SalvageMod
Now you need to install repo:
Code:
sudo bash
curl http://android.git.kernel.org/repo > /usr/bin/repo
chmod a+x /usr/bin/repo
exit
Now go into the directory you just created. This is where we will initate the repo we want to use.
* *Remember those branches from before?*
* SalvageMod1.3 (Stable)
* gingerbread (Development)
Click to expand...
Click to collapse
Now initate the repo you want.
* Development
Code:
repo init -u https://github.com/SalvageMod/salvage.git -b gingerbread
Click to expand...
Click to collapse
* Stable
Code:
repo init -u https://github.com/SalvageMod/salvage.git -b SalvageMod1.3
Click to expand...
Click to collapse
Now sync it.
Code:
repo sync
Now it will do some things, could take a long time depending on your internet connection. Go grab a beer.
Now that it is done compiling there are only a few steps before you are on your way to a compiled SalvageMod rom.
Go into the supersonic(Htc Evo) device tree and run extract-files.sh
Code:
cd device/htc/supersonic
./extract-files.sh
Now you want to go back into the root of the build.
Code:
cd ../../..
Should look something like this:
Code:
[email protected]:~/Development/SalvageMod$ ls
bionic build dalvik device frameworks libcore ndk prebuilt system
bootable cts development external hardware Makefile packages sdk vendor
Once you are here we start to get everything together. Run these commands. Then you will use make to build the rom!
Code:
. build/envsetup.sh
lunch salvage_supersonic-userdebug
time make -j$(grep -ic ^processor /proc/cpuinfo) otapackage
That is about it! After this is completed go into the following folder to get your rom!
Code:
cd out/target/product/supersonic
well this means im getting a google +
Considering that i already follow you on Google+, I would definitely want to check this out Lithid. Thanx in advance man.
Thanks Lithid. We appreciate all you do to help us.
Sent from my supersonic using XDA App
What's your plus lith
Sent from my PC36100 using xda premium
I have been really wanting to start without a clue as to where to begin...can I get a Google+ invite?
Sent from my supersonic using XDA App
Me too
I would love to get in on this. send me a G+ invite - jtwalker1
I will forewarn you, I have not done any coding or programming since I learned in college which was many, many moons ago (think pre WWW days)
Thanks
James
renegade37918 said:
What's your plus lith
Sent from my PC36100 using xda premium
Click to expand...
Click to collapse
Plus is in the sig man.
I know basic linux and would like to learn..
What kind of skills would you consider a prerequisite for this? Would not want to be the slow kid in class slowing everyone else down.
Cool I forgot I was already following you lol
Sent from my PC36100 using XDA App
renegade37918 said:
What's your plus lith
Sent from my PC36100 using xda premium
Click to expand...
Click to collapse
its in his sig
lithid-cm said:
Recently there has been some issues with people thinking they are developing when they are not. Now this isn't here to call out anyone. I am here for one simple reason. To teach people how to develop on android correctly. This is an initial post to stir up some interest.
Simply I wanted to try and setup a google+ webchat with questions or comments. How-tos. This can all be done through a google+ chat. If anyone is interested just hit me up on google+ and watch out for the invites it will be in about 2 weeks.
I will be updating this OP with tons of android tips and tricks I have picked up. Currently finshing the first draft in a few minutes.
Thanks!
Click to expand...
Click to collapse
I'm down man I sent you a request on plus Andres luque
Thanks alot
corynat said:
What kind of skills would you consider a prerequisite for this? Would not want to be the slow kid in class slowing everyone else down.
Click to expand...
Click to collapse
I would say basic linux command line functions. Like changing directories, running scripts, listing files, copy and paste, and removing, and text editing.
lithid-cm said:
I would say basic linux command line functions. Like changing directories, running scripts, listing files, copy and paste, and removing, and text editing.
Click to expand...
Click to collapse
"running out to get basic linux for dummies" brb
This sounds cool but I suck with commands LOL.
Sent from my PC36100 using XDA App
DrDr3z85 said:
"running out to get basic linux for dummies" brb
Click to expand...
Click to collapse
Haha +1 that off to barnes and noble!
Thanks lith this is great and much needed will def hit you up on g+
Sent from my PC36100 using Tapatalk

[GUIDE][HOW_TO] BUILD a LINUX KERNEL FROM SOURCE [UBUNTU]

This is a general open source linux development thread!
Android's kernel is a derivative of linux's kernel. Its good to know how to build both of these kernels. You might be already familiar with building kernels for various devices from sources. So I have made a new thread for guiding people on how to compile linux kernel from source (example taken as ubuntu kernel).
Requirements:
Any linux os x64 bit(example here: ubuntu 14.04)
Git (sudo apt-get install git)
Minimum of 4GB RAM and some reasonable linux-swap
To get the currently running kernel image, type the following:
Code:
apt-get source linux-image-$(uname -r)
Now we need to obtain Ubuntu Kernel Sources from its repositories. Make a new directory and inside it, initialise the git and clone the repository.
Code:
git clone git://kernel.ubuntu.com/ubuntu/ubuntu-<release>.git
<release> : Type in the required source. It can be lucid, precise, trusty, utopic etc.
Setting up the build environment. There are lots of tools and packages that are very much essential for building a kernel. These tools can be downloaded as a whole bundle and can be installed easily. Here's the code to set it up:
Code:
sudo apt-get build-dep linux-image-$(uname -r)
NOTE: The above comand can be executed only after you obtain the currently running kernel image. I have already given the code to obtain it above.
Now, change directory to the root of the kernel and type the following:
Code:
chmod -R a+x *
The above code will set the required permissions for building and executing the kernel.
Now, run these two commands:
Code:
fakeroot debian/rules clean
fakeroot debian/rules editconfigs
The first command cleans up the code automatically.
The slightly tricky part is with the second line of the code. When you execute it, you will have to edit a series of menuconfigs. To make changes to the configuration file we need to edit the configuration file. The kernel developers have created a script to edit kernel configurations which has to be called through the debian/rules makefile, unfortunately you will have to go through all the flavors for this script to work properly. The script will ask you if you want to edit the particular configuration. You should not make changes to any of the configurations until you see your wanted flavour configuration
We have now covered about 70% of progress. The rest is building the kernel and testing it.
Building the kernel is quite easy. Change your working directory to the root of the kernel source tree and then type the following commands:
Code:
fakeroot debian/rules clean
fakeroot debian/rules binary-headers binary-generic
If the build is successful, a set of three .deb binary package files will be produced in the directory above the build root directory. For example after building a kernel with version "3.13.-0.35" on an amd64 system, these three .deb packages would be produced:
Code:
cd ..
ls *.deb
linux-headers-3.13.0-35_3.13.0-35.37_all.deb
linux-headers-3.13.0-35-generic_3.13.0-35.37_amd64.deb
linux-image-3.13.0-35-generic_3.13.0-35.37_amd64.deb
Testing the new kernel
Install the three-package set (on your build system, or on a different target system) with dpkg -i and then reboot:
Code:
sudo dpkg -i linux*3.13.0-35.37*.deb
sudo reboot
Guys, I hope I have made an easy tutorial. You are always welcome to ask doubts (even on PM). Thank You.
Specific Hardware/Architecture
Creating a new config
I’ll be using the method of creating a new flavour, this adds a bit more work but this way you can always compile the original kernels.
We’ll use the generic flavour as the base for our own flavour being i7, this extension needs to be in small caps.
Code:
cp debian.master/config/amd64/config.flavour.generic debian.master/config/amd64/config.flavour.i7
fakeroot debian/rules clean
debian/rules updateconfigs
To make changes to the configuration file we need to edit the configuration file. The kernel developers have created a script to edit kernel configurations which has to be called through the debian/rules makefile, unfortunately you will have to go through all the flavours for this script to work properly.
Code:
debian/rules editconfigs
The script will ask you if you want to edit the particular configuration. You should not make changes to any of the configurations until you see the i7 configuration
Code:
Do you want to edit config: amd64/config.flavour.i7? [Y/n]
Make your changes, save the configuration and then keep going until the script ends.
When you’re done, make a backup of the config flavor file.
Code:
cp debian.master/config/amd64/config.flavour.i7 ../.
Now we need to clean up the git tree in order to get ready for compilation.
Code:
git reset --hard
git clean -df
Getting ready for compilation
Because we are going to be creating a new flavour based on a existing flavour (generic in my case) we need to create some extra files. During compilation the process checks the previous release for some settings, as we’re creating a local flavour it doesn’t exist in the source, so we’re creating it.
To see the previous release we use:
Code:
ls debian.master/abi
cp debian.master/abi/3.0.0-12.20/amd64/generic debian.master/abi/3.0.0-12.20/amd64/i7
cp debian.master/abi/3.0.0-12.20/amd64/generic.modules debian.master/abi/3.0.0-12.20/amd64/i7.modules
Copy our flavored configuration file back.
Code:
cp ../config.flavour.i7 debian.master/config/amd64/
We need to edit some files:
File: debian.master/etc/getabis
Search for the line:
Code:
getall amd64 generic server virtual
Change it in:
Code:
getall amd64 generic server virtual i7
File: debian.master/rules.d/amd64.mk
Search for the line:
Code:
flavours = generic server virtual
Change it in:
Code:
flavours = generic server virtual i7
File: debian.master/control.d/vars.i7
This files does not exist and in order to make the compilation process aware of our own flavor we want to compile we need to create it.
Code:
cp debian.master/control.d/vars.generic debian.master/control.d/vars.i7
You can edit the file and make it your own.
Code:
arch="i386 amd64"
supported="i7 Processor"
target="Geared toward i7 desktop systems."
desc="x86/x86_64"
bootloader="grub-pc | grub-efi-amd64 | grub-efi-ia32 | grub | lilo (>= 19.1)"
provides="kvm-api-4, redhat-cluster-modules, ivtv-modules, ndiswrapper-modules-1.9"
We need to commit our changes in the git repository.
Code:
git add .
git commit -a -m "i7 Modifications"
The text after -m is the message you add to your commit.
Compilation
It’s finally time for compiling, to keep our newly created branch in pristine condition we will do the compilation in a separate branch. We keep our branch clean as this will help later on when we want to update our new branch to a newer kernel.
Code:
git checkout -b work
fakeroot debian/rules clean
All the packages will be created in the directory /d1/development/kernel/ubuntu/oneiric
Create independent packages:
Code:
skipabi=true skipmodule=true fakeroot debian/rules binary-indep
The above statement will create the following deb files:
Code:
linux-doc_3.0.0-13.21_all.deb
linux-headers-3.0.0-13_3.0.0-13.21_all.deb
linux-source-3.0.0_3.0.0-13.21_all.deb
linux-tools-common_3.0.0-13.21_all.deb
Create the tools package:
Code:
skipabi=true skipmodule=true fakeroot debian/rules binary-perarch
The above statement will create the following deb file:
Code:
linux-tools-3.0.0-13_3.0.0-13.21_amd64.deb
Create the flavour depended files:
Code:
skipabi=true skipmodule=true fakeroot debian/rules binary-i7
The above statement will create the following deb files:
Code:
linux-headers-3.0.0-13-i7_3.0.0-13.21_amd64.deb
linux-image-3.0.0-13-i7_3.0.0-13.21_amd64.deb
Installation
After the compilation is finished we’ll have the above packages in the parent directory.
To install the files
Code:
cd ..
sudo dpkg -i linux-headers-3.0.0-13-i7_3.0.0-13.21_amd64.deb linux-headers-3.0.0-13_3.0.0-13.21_all.deb linux-image-3.0.0-13-i7_3.0.0-13.21_amd64.deb
Check your bootloader if the newly installed Ubuntu kernel is the default one, for grub check the file /boot/grub/menu.lst or if you run grub2 check /boot/grub/grub.cfg
thx for your info
nice job mate..!! :good:
now i'm gonna try this..!!
Nice ,i can't say anything
faizauthar12 said:
Nice ,i can't say anything
Click to expand...
Click to collapse
Thank you for the great guide!!!
Nice thread. I'll try it at home
Thanks
Enviado de meu Moto G usando Tapatalk
Thx for the guide
tra_dax

[GUIDE] Building Pure Nexus

Introduction
Hello everyone, this is a guide to get you up and running with your own build of Pure Nexus for the Nexus 5X. In this thread, you will learn how to get your computer set up to build and the commands you will need to run. Please read the entire guide and the FAQ. Additionally, this is a developer's thread, there should be no off topic discussion.
Compilation Guide
This is available on my Github, where it may be a little more up to date.
0. Getting started
In this guide, I will go over how to build Pure Nexus on your Linux machine. This particular tutorial will focus on Ubuntu 16.04 as that is what I use (Mint 18 is also good) but this should work with any version of Linux; it does need to be 64-bit however. I will leave the installation of that up to you, Google is a wonderful resource. If you don't have a good computer but still want to build, check out this thread on XDA: http://forum.xda-developers.com/chef-central/android/guide-how-to-build-rom-google-cloud-t3360430
1. Set up your environment
1. Automatically
Code:
sudo apt-get install git-core
git clone https://github.com/akhilnarang/scripts
cd scripts
ls
bash <script-name>
<script-name> should be one of the scripts in the folder for your particular architecture.
2. Manually
1. Install Java 8
Code:
sudo apt-get update
sudo apt-get install openjdk-8-jdk
sudo apt-get install openjdk-8-jre
2. Install other build 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
2. Configure repo and git
If you have any problems with the below commands, try running as root:
Code:
sudo -s
Git is an open source version control system which is incredibly robust for tracking changes across repositories. Repo is Google's tool for working with Git in the context of Android. More reading if you are interested: https://source.android.com/source/developing.html
Run these commands to get repo working (only do this if you did the manual set up method above:
Code:
mkdir ~/bin
PATH=~/bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
Run these commands to get git working:
Code:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
3. Download the source
First, before downloading the source, create a folder for the source and move into it.
Code:
mkdir ~/<foldername> (eg. mkdir ~/PN or ~/PureNexus)
cd ~/<foldername>
Then, we need to grab the manifest and sync down the repositories. Here are the commands to do this for Pure Nexus for Nougat (make sure you are in the source folder you made above):
Code:
repo init -u https://github.com/PureNexusProject/manifest.git -b n
repo sync --force-sync
Here is the process generally for other ROMs:
When you go to build a ROM, you must download its source. All, if not most, ROMs will have their source code available on Github. To properly download the source, follow these steps:
Go to your ROM's Github (e.g. http://github.com/PureNexusProject)
Search for a manifest (usually called manifest or android_manifest).
Go into the repo and make sure you are in the right branch (located right under the Commits tab).
Go into the README and search for a repo init command. If one exists, copy and paste it into the terminal and hit enter.
If one does not exist, you can make one with this formula:
Code:
repo init -u <url_of_manifest_repo>.git -b <branch_you_want_to_build>
For example:
Code:
repo init -u http://github.com/PureNexusProject/manifest.git -b n
After the repo has been initialized, run this command to download the source:
Code:
repo sync --force-sync
This process can take a while depending on your internet connection.
4. Build it!
At this point, it'd be a good idea to set up ccache. ccache is a compiler cache, it stores previously compiled files in a directory and pulls from that instead of recompiling if nothing has changed. This speeds up compilation a LOT. If you want to use it, follow the below steps:
Open up your .bashrc file in your home directory using a text editor or nano and append this to the end of it:
Code:
export USE_CCACHE=1
Then type:
Code:
source ~/.bashrc
After that, run one of the below command (replacing the # with how many GBs of ccache you want, 50 is recommended)
Use this one if you used the manual method of set up in section 1:
Code:
prebuilts/misc/linux-x86/ccache/ccache -M #G
Use this one if you used the automatic method of set up in section 1:
Code:
ccache -M #G
After that, it's time to build!
Code:
. build/envsetup.sh
breakfast bullhead
mka bacon
After that, your computer will build the flashable zip file and if you see something that says make completed, you've done it!
Any time that you want to rebuild, type the following commands:
Code:
repo sync --force-sync
. build/envsetup.sh
breakfast bullhead
mka clobber
mka bacon
I also have a script to do this on my Github here
Frequently Asked Questions
1.1 Q: I got an error, what do I do??
1.1 A: Well to start, if it is anything with Ninja, I would go ahead and disable it. You can add this to your .bashrc file:
Code:
export USE_NINJA=false
Then type this
Code:
source ~/.bashrc
. build/envsetup.sh
breakfast bullhead
mka clobber
mka bacon
If it is saying you ran out of memory, follow this post.
If it isn't Ninja related, check out @AzraelsKiss's post here, where he has documented a few common issues. If none of those apply, post here with a detailed list of what you have done and we will do our best to help you.
1.2 Q: Can you guys share your personal builds?
1.2 A: No, personal builds are just that: personal. Beans releases whenever he feels that the release is ready for the masses and if a bunch of personal builds are floating around, that tarnishes the Pure Nexus name. We are more than happy to help get you up and running but we will not be sharing our builds. Thanks for understanding!
this wont work on Windows, right?
RonnellTapawan said:
this wont work on Windows, right?
Click to expand...
Click to collapse
I have heard people try to use Bash for Windows but I don't think it will work. Linux or bust.
nathanchance said:
I have heard people try to use Bash for Windows but I don't think it will work. Linux or bust.
Click to expand...
Click to collapse
I tried on bash for windows but it can't build android roms
Dude you should seriously get a XDA medallion or some sort of metal for all you do all over XDA. I see you everywhere. Thanks for building for us and also for this write up. :good: @ nathan
SM210 said:
Dude you should seriously get a XDA medallion or some sort of metal for all you do all over XDA. I see you everywhere. Thanks for building for us and also for this write up. :good: @ nathan
Click to expand...
Click to collapse
Talk to my superiors :silly: thanks for the kind words
Edited.......
Sent from my Nexus 5X using Tapatalk
myawan said:
Anybody wanna share home made build?
Sent from my Nexus 5X using Tapatalk
Click to expand...
Click to collapse
If you read at the end of the OP, it says:
"1.2 Q: Can you guys share your personal builds?
1.2 A: No, personal builds are just that: personal. Beans releases whenever he feels that the release is ready for the masses and if a bunch of personal builds are floating around, that tarnishes the Pure Nexus name. We are more than happy to help get you up and running but we will not be sharing our builds. Thanks for understanding!"
Reason being, because if we start compiling these and handing it out like it's no ones business, we're going to run Pure Nexus into the ground and people will start uploading them on AFH and it'll be one big mess. My guess is, this is just a courtesy by the original poster to those of us who can't wait.
My two cents.:laugh::highfive:
i'm on it!!!!! thank you very much!!! download is taking forever ugh
Building it right now! Thanks
I think this would work in Cygwin. I used to compile stuff for the PS3 way back. I'd have a lot of reading to do if I wanted to build this for my phone.
Which gapps to use with this?
Open Gapps micro are working fine.
Gesendet von meinem Nexus 5X mit Tapatalk
So WE can't share our build either? Or what, i didn't get it.
CreasingMass Dev said:
So WE can't share our build either? Or what, i didn't get it.
Click to expand...
Click to collapse
Don't distribute personal builds. Flash them yourself and that is it.
4 hours of download :crying:
OOH MAN!!!!!! no more space in my device!!! how can i resume that???
Code:
Checking out files: 100% (1717/1717), done.
error: unable to write file current/platforms/android-21/arch-x86_64/usr/lib/libz.a
error: unable to write file current/platforms/android-21/arch-x86_64/usr/lib/libz.so
fatal: cannot create directory at 'current/platforms/android-21/arch-x86_64/usr/lib64': Spazio esaurito sul device
Traceback (most recent call last):
File "/home/matteo/Scaricati/PureNexus/.repo/repo/main.py", line 531, in <module>
_Main(sys.argv[1:])
File "/home/matteo/Scaricati/PureNexus/.repo/repo/main.py", line 507, in _Main
result = repo._Run(argv) or 0
File "/home/matteo/Scaricati/PureNexus/.repo/repo/main.py", line 180, in _Run
result = cmd.Execute(copts, cargs)
File "/home/matteo/Scaricati/PureNexus/.repo/repo/subcmds/sync.py", line 769, in Execute
project.Sync_LocalHalf(syncbuf, force_sync=opt.force_sync)
File "/home/matteo/Scaricati/PureNexus/.repo/repo/project.py", line 1325, in Sync_LocalHalf
self._InitWorkTree(force_sync=force_sync)
File "/home/matteo/Scaricati/PureNexus/.repo/repo/project.py", line 2482, in _InitWorkTree
raise GitError("cannot initialize work tree")
error.GitError: cannot initialize work tree
can i move the PureNexus folder in an external drive and resume??? please
MatteXperiaU said:
4 hours of download :crying:
OOH MAN!!!!!! no more space in my device!!! how can i resume that???
can i move the PureNexus folder in an external drive and resume??? please
Click to expand...
Click to collapse
You can try. Your build times will be much slower though.
Sent from my Nexus 6P using XDA Labs
nathanchance said:
You can try. Your build times will be much slower though.
Sent from my Nexus 6P using XDA Labs
Click to expand...
Click to collapse
i have another partition in the same HD (300GB).. i can use that :fingers-crossed:
which command i need to resume?
sorry for the questions man, you're too kind
TPMJB said:
I think this would work in Cygwin. I used to compile stuff for the PS3 way back. I'd have a lot of reading to do if I wanted to build this for my phone.
Click to expand...
Click to collapse
No promises...
http://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/
Out of curiosity, realistically how much disk space would be required to download everything and compile with a 50GB cache? I got everything downloaded and the compile ran but threw some warnings (most of which may have been benign). When the compile terminated with an error, I had about 40MB left on my Linux Mint 18 partition so I assume it ran out of space I started with about 70GB free space
I deleted everything and decided to try again if and when I have a larger partition to play with..... I am currently dual booting on a Windows machine and didn't think to allocate that much space to Mint.
Paul

[GUIDE] Build Rom from Source For Tissot

What is ?
Android is the open-source operating system used for smartphones. Full Freedom for people using it
What is Source Code?
Android is an open-source software stack created for a wide array of devices with different form factors. The primary purposes of are to create an open software platform available for carriers, OEMs, and to make their innovative ideas a reality and to introduce a successful, real-world product that improves the mobile experience for users.The result is a full, production-quality consumer product with source code open for customization and porting.
So basically Allows to customize the things you like and make new things without any Restrictions. Cool isn’t it?
What is ROM ?
The ROM is the operating system. This is the User interface (Sense UI in HTC phones) and the file system for maintaining contacts etc. It is composed of a Linux kernel and various add-ons to achieve specific functionality.
What does a Rom Contain ?
Basically a Rom Contains following main things :
· Kernel
· Bootloader
· Recovery
· Radio
· Framework
· Apps
· core
· -runtime,Etc
Some Basics About Above Terms
Kernel :
A kernel is critical component of the and all operating systems. It can be seen as a sort of bridge between the applications and the actual hardware of a device. devices use the Linux kernel, but it's not the exact same kernel other Linux-based operating systems use. There's a lot of specific code built in, and Google's kernel maintainers have their work cut out for them. OEMs have to contribute as well, because they need to develop hardware drivers for the parts they're using for the kernel version they're using. This is why it takes a while for independent and hackers to port new versions to older devices and get everything working. Drivers written to work with the Gingerbread kernel on a phone won't necessarily work with the Ice Cream Sandwich kernel. And that's important, because one of the kernel's main functions is to control the hardware. It's a whole lot of source code, with more options while building it than you can imagine, but in the end it's just the intermediary between the hardware and the software. So basically if any instruction is given to mobile it first gives the command to kernel for the particular task execution.
Bootloader :
The bootloader is code that is executed before any Operating System starts to run. Bootloaders basically package the instructions to boot operating system kernel and most of them also have their own debugging or modification environment. Think of the bootloader as a security checkpoint for all those partitions. Because if you’re able to swap out what’s on those partitions, you’re able to break things if you don’t know what you’re doing. So basically it commands the kernel of your device to Boot the Device properly without any issues. So careful with bootloader since it can mess things very badly.
Recovery :
Recovery is defined in simple terms as a source of backup. Whenever your phone firmware is corrupted, the recovery does the job in helping you to restore or repair your faulty or buggy firmware into working condition. It is also used for flashing the Rom’s , kernel and many more things.
Radio
The lowest part of software layer is the radio: this is the very first thing that runs, just before the bootloader. It control all wireless communication like GSM Antenna, GPS etc.
What you’ll need
A relatively recent 64-bit computer (Linux, OS X, or Windows)(Virtual Machine will work as well) with a reasonable amount of RAM and about 100 GB of free storage (more if you enable ccache or build for multiple devices). The less RAM you have, the longer the build will take (aim for 8 GB or more). Using SSDs results in considerably faster build times than traditional hard drives.
A decent internet connection & reliable electricity
Some familiarity with basic operation and terminology. It would help if you’ve installed custom roms on other devices and are familiar with recovery. 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.
Install the SDK
If you haven’t previously installed adb and fastboot, you can download them from Google. Extract it running:
Code:
unzip platform-tools-latest-linux.zip -d ~
Now you have to add adb and fastboot to your PATH. Open ~/.profile and add the following:
Code:
# add SDK platform tools to path
if [ -d "$HOME/platform-tools" ] ; then
PATH="$HOME/platform-tools:$PATH"
fi
Then, run source ~/.profile to update yur environment.
Install the build packages
Several packages are needed to build LineageOS. You can install these using your distribution’s package manager.
To build LineageOS, you’ll need:
bc bison build-essential curl flex g++-multilib gcc-multilib git gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev libesd0-dev liblz4-tool libncurses5-dev libsdl1.2-dev libssl-dev libwxgtk3.0-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev
For Ubuntu versions older than 16.04 (xenial), substitute:
libwxgtk3.0-dev → libwxgtk2.8-dev
Java
Different versions of LineageOS require different JDK (Java Development Kit) versions.
LineageOS 14.1: OpenJDK 1.8 (install openjdk-8-jdk)
LineageOS 11.0-13.0: OpenJDK 1.7 (install openjdk-7-jdk)*
https://askubuntu.com/questions/761127/how-do-i-install-openjdk-7-on-ubuntu-16-04-or-higher
Create the directories
You’ll need to set up some directories in your build environment.
To create them:
Code:
mkdir -p ~/bin
mkdir -p ~//lineage
Install the repo command
Enter the following to download the repo binary and make it executable (runnable):
Code:
curl [url]https://storage.googleapis.com/git-repo-downloads/repo[/url] > ~/bin/repo
chmod a+x ~/bin/repo
Put the ~/bin directory in your path of execution
In recent versions of Ubuntu, ~/bin should already be in your PATH. You can check this by opening ~/.profile with a text editor and verifying the following code exists (add it if it is missing):
Code:
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
Then, run source ~/.profile to update your environment.
Initialize the LineageOS source repository
Code:
cd ~//lineage
repo init -u [url]https://github.com/LineageOS/.git[/url] -b lineage-15.1
Download the source code
Code:
repo sync -c -f --force-sync --no-clone-bundle --no-tags --optimized-fetch --prune
Prepare the device-specific code
Code:
git clone [url]https://github.com/TheScarastic/android_device_xiaomi_msm8953-common[/url] -b lineage-15.1 device/xiaomi/msm8953
git clone [url]https://github.com/TheScarastic/android_device_xiaomi_tissot[/url] -b lineage-15.1 device/xiaomi/tissot
git clone [url]https://github.com/TheScarastic/proprietary_vendor_xiaomi[/url] -b lineage-15.1 vendor/xiaomi
git clone [url]https://github.com/Tissot-Development/android_kernel_xiaomi_tissot[/url] -b 8.1 kernel/xiaomi/msm8953
Turn on caching to speed up build
Code:
export CCACHE_DIR=./.ccache
ccache -C
export USE_CCACHE=1
export CCACHE_COMPRESS=1
prebuilts/misc/linux-x86/ccache/ccache -M 50G
Configure jack
Jack is the new Java compiler used when building LineageOS 14.1. It is known to run out of memory - a simple fix is to run this command:
Code:
export _JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G"
Make Clean Build
Code:
make clean
Initialize the build command
Code:
source build/envsetup.sh
Start Build
Code:
croot
brunch tissot
For More info:
https://source..com/source/requirements
https://wiki.lineageos.org/devices/cheeseburger/build
Thanks bro..
DGEEEK said:
Thanks bro..
Click to expand...
Click to collapse
Thany you for this guide! Will try this!
saski4711 said:
Thany you for this guide! Will try this!
Click to expand...
Click to collapse
:good:
Thanks for guide, btw what's the size of source code ?
prabhjot-singh said:
Thanks for guide, btw what's the size of source code ?
Click to expand...
Click to collapse
Around 20-25GB I think
Followed the above steps to the letter but I get an error right at the beginning:
Code:
ninja: error: 'kernel/xiaomi/msm8953/arch/arm64/configs/lineage_tissot_defconfig', needed by '/home/rossi/android/lineage/out/target/product/tissot/obj/KERNEL_OBJ/.config', missing and no known rule to make it
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
make: Leaving directory '/home/rossi/android/lineage'
Current git broken? Any idea?
saski4711 said:
Followed the above steps to the letter but I get an error right at the beginning:
Code:
ninja: error: 'kernel/xiaomi/msm8953/arch/arm64/configs/lineage_tissot_defconfig', needed by '/home/rossi/android/lineage/out/target/product/tissot/obj/KERNEL_OBJ/.config', missing and no known rule to make it
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
make: Leaving directory '/home/rossi/android/lineage'
Current git broken? Any idea?
Click to expand...
Click to collapse
Hello,
Don't use that kernel, as actually don't work properly in Xiaomi Mi A1. This error is caused because the file "lineage_tissot_defconfig" it's not named like that, exactly it's name is "tissot_defconfig", for your first build with lineage I recommend you to use the following sources, because are adapt for Lineage. Don't forget to use superuser privileges to compile, it avoids a lot of possible errors with normal user.
Device tree
Vendor
Kernel
Give thanks to user @ghpranav for sources :good:
Regards
black_arashi said:
Hello,
Don't use that kernel, as actually don't work properly in Xiaomi Mi A1. This error is caused because the file "lineage_tissot_defconfig" it's not named like that, exactly it's name is "tissot_defconfig", for your first build with lineage I recommend you to use the following sources, because are adapt for Lineage. Don't forget to use superuser privileges to compile, it avoids a lot of possible errors with normal user.
Device tree
Vendor
Kernel
Give thanks to user @ghpranav for sources :good:
Regards
Click to expand...
Click to collapse
Thanks for the info. I'm now past the error. Will take some time though since I'm building on my laptop :cyclops:
saski4711 said:
Thanks for the info. I'm now past the error. Will take some time though since I'm building on my laptop :cyclops:
Click to expand...
Click to collapse
Between 3 to 5h in modern pc, probably you will need between 7 to 10h in a laptop, depends on Nº of Cores and RAM, anyway, good luck in your first compilation :good:
black_arashi said:
Between 3 to 5h in modern pc, probably you will need between 7 to 10h in a laptop, depends on Nº of Cores and RAM, anyway, good luck in your first compilation :good:
Click to expand...
Click to collapse
Thx m8. Still no error. Compiling over night on single core to avoid throttling / overheating. :highfive:
saski4711 said:
Thx m8. Still no error. Compiling over night on single core to avoid throttling / overheating. :highfive:
Click to expand...
Click to collapse
Probably you will se a lot of "warning" don't apologice, it's normal, these warning issues is being solved during the compilation. Some info just in case
saski4711 said:
Followed the above steps to the letter but I get an error right at the beginning:
Current git broken? Any idea?
Click to expand...
Click to collapse
Rename tissot_defconfig to lineage_tissot_defconfig in arch/arm64/configs
Nice share brotherr :good:
Keep mia1 like the sky full of stars, so many custom rom :highfive::laugh:
Sent from my Xiaomi Mi A1 using XDA Labs
-Rhoby|™-Bugs said:
Nice share brotherr :good:
Keep mia1 like the sky full of stars, so many custom rom :highfive::laugh:
Click to expand...
Click to collapse
Thanks
Hello and thanks for the guide.
I am trying to build Dirty Unicorns 7.1.2 for tissot. I have downloaded kernel, vendor and device and repo synced DU n7x branch. I have also downloaded device_qcom_sepolicy and changed some files in device/xiaomi/tissot folder in order for the build to start normally. After 1.30 minutes of building i get this error
Code:
ninja: error: '/home/manoskav/du-tissot/out/target/product/tissot/obj/STATIC_LIBRARIES/bootctrl.msm8953_intermediates/export_includes', needed by '/home/manoskav/du-tissot/out/target/product/tissot/obj/EXECUTABLES/update_engine_sideload_intermediates/import_includes', missing and no known rule to make it
make: *** [build/core/ninja.mk:167: ninja_wrapper] Error 1
Maybe should i try n7x-caf branch or n7x is ok for tissot? Can anyone help me with the building process?
Thanks in advance.
mparmpas122321 said:
Hello and thanks for the guide.
I am trying to build Dirty Unicorns 7.1.2 for tissot. I have downloaded kernel, vendor and device and repo synced DU n7x branch. I have also downloaded device_qcom_sepolicy and changed some files in device/xiaomi/tissot folder in order for the build to start normally. After 1.30 minutes of building i get this error
Maybe should i try n7x-caf branch or n7x is ok for tissot? Can anyone help me with the building process?
Thanks in advance.
Click to expand...
Click to collapse
Hmm but seriously it's tougher bro because its bootctrl it need more configuration
I tried building for Tissot but I'm having this issue.
[email protected]:~/dos$ . build/envsetup.sh
including device/generic/car/vendorsetup.sh
including device/generic/mini-emulator-arm64/vendorsetup.sh
including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh
including device/generic/mini-emulator-x86_64/vendorsetup.sh
including device/generic/mini-emulator-x86/vendorsetup.sh
including vendor/discovery/vendorsetup.sh
[email protected]:~/dos$ brunch tissot
including vendor/discovery/vendorsetup.sh
build/core/product_config.mk:236: *** Can not locate config makefile for product "tissot". Stop.
build/core/product_config.mk:236: *** Can not locate config makefile for product "tissot". Stop.
No such item in brunch menu. Try 'breakfast'
[email protected]:~/dos$
Click to expand...
Click to collapse
Can anyone please help me out?
black_arashi said:
Hello,
Don't use that kernel, as actually don't work properly in Xiaomi Mi A1. This error is caused because the file "lineage_tissot_defconfig" it's not named like that, exactly it's name is "tissot_defconfig", for your first build with lineage I recommend you to use the following sources, because are adapt for Lineage. Don't forget to use superuser privileges to compile, it avoids a lot of possible errors with normal user.
Device tree
Vendor
Kernel
Give thanks to user @ghpranav for sources :good:
Regards
Click to expand...
Click to collapse
@black_arashi
Oh so ghpranav's repo has LOS source added into it? If so is there any Android Stock for all these?
Thanks

Categories

Resources