Chromium OS building - Chromebooks

After building Chromium OS kernel 4.14.96 & my inability to figure out how to properly deploy it as an update to an existing Chromium OS installation like Arnoldthebat v72 (with Chrome OS Kernel 4.14.83)
efforts here -
https://forum.xda-developers.com/showpost.php?p=78830818&postcount=3
I will post here my efforts at building the full Chromium OS with the latest available Kernel - I will try & start with same version as arnoldthebat i.e. v72 which has now reached stable...
There will be a lot of editing here, as it's a learning curve to me...
First is to clone the Google Chrome OS repo -
I was given this link to learn how to do this -
https://chromium.googlesource.com/chromiumos/docs/+/master/developer_guide.md
As for building Kernel for ATB v72 - I will be keeping a log of instructions here...
I do the work from within a Ubuntu xenial 16.04.xx box as suggested by the documentation,
Preparation instructions:
Create a folder where the code will be stored (they suggest chromeos) I used code
from an ext4 partition/disk with plenty of space (mine 150 GB+)
$ mkdir code
input instructions to get to clone the repo later to reach here:
$ sudo apt-get install repo
$ sudo apt-get install git-core gitk git-gui curl lvm2 thin-provisioning-tools \
python-pkg-resources python-virtualenv python-oauth2client
Install depot_tools
$ git config --global user.name "John Doe"
$ git config --global user.email "[email protected]"
$ git config --global core.autocrlf false
$ git config --global core.filemode false
$ # and for fun!
$ git config --global color.ui true
Tweak your sudoers configuration
cd /tmp
cat > ./sudo_editor <<EOF
#!/bin/sh
echo Defaults \!tty_tickets > \$1 # Entering your password in one shell affects all shells
echo Defaults timestamp_timeout=180 >> \$1 # Time between re-requesting your password, in minutes
EOF
chmod +x ./sudo_editor
sudo EDITOR=./sudo_editor visudo -f /etc/sudoers.d/relax_requirements
Configure git
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
Verify that your default file permissions (umask) setting is correct
put the following line into your ~/.bashrc
umask 022
preparation for enough disk space
in folder code/
sudo dd if=/dev/zero of=swapfile bs=1024 count=$((1024*3000))
mkswap swapfile
sudo swapon swapfile
git config --global http.sslVerify false
git config --global http.postBuffer 1048576000
initialise the repo
$ repo init
$ repo init -u https://chromium.googlesource.com/chromiumos/manifest.git --repo-url https://chromium.googlesource.com/external/repo.git [-g minilayout]
get the source code
$ repo sync -j4
getting/syncing the source code took a long time as it kept failing...
I am now in this position with the source code in code/
I will fill in gaps of instructions I missed later...
Create a chroot
make sure depot_tools/ is inside the folder code/: code/depot_tools
temporary put depot_tools in the path
export PATH=$PATH:depot_tools
$ cros_sdk
... this will take some time...
NOTICE: Mounted .../code/chroot.img on chroot
NOTICE: Downloading SDK tarball..
All done
INFO cros_sdk:make_chroot: Elapsed time (make_chroot.sh): 74m37s
cros_sdk:make_chroot: All set up. To enter the chroot, run:
$ cros_sdk --enter
CAUTION: Do *NOT* rm -rf the chroot directory; if there are stale bind
mounts you may end up deleting your source tree too. To unmount and
delete the chroot cleanly, use:
$ cros_sdk --delete
(cr) ((c62d307...)) [email protected] ~/trunk/src/scripts $
now comes the real stuff...
Notes -
some extra commands might be needed to get this working:
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install linux-generic
$ sudo apt-get install fakeroot build-essential crash kexec-tools makedumpfile kernel-wedge
$ sudo apt-get install git-core libncurses5 libncurses5-dev libelf-dev asciidoc binutils-dev
...

Hello, My guide should fill in the blanks for you (Specifically the Over The Air Upgrades) - https://kmyers.me/blog/chromeos/a-g...s-distribution-with-ota-updates-and-crostini/

could someone please tell me if there is a rpm file so chromium os could be installed on top of ubuntu using alien cause terminal too difficult for noobs to understand but rpm and alien super easy

ghostdogg49504 said:
could someone please tell me if there is a rpm file so chromium os could be installed on top of ubuntu using alien cause terminal too difficult for noobs to understand but rpm and alien super easy
Click to expand...
Click to collapse
No, ChromiumOS is a operating system that either replaces your default operating system or that you dual boot into. It is not simply a application that you can install. If you want to run it without installing it, you could in theory build it yourself and convert the image to a virtual machine image and run it in Qemu or VirtualBox.

KMyers said:
No, ChromiumOS is a operating system that either replaces your default operating system or that you dual boot into. It is not simply a application that you can install. If you want to run it without installing it, you could in theory build it yourself and convert the image to a virtual machine image and run it in Qemu or VirtualBox.
Click to expand...
Click to collapse
fydeos has a installer in fydeos store with dualboot option but its in chinese

Related

Building From Source?

im trying to build android from source on ubuntu 10.04. im on a 64 bit system . but this is what im stuck on.
when i enter the repo command:
repo init -u git://android.git.kernel.org/platform/manifest.git -b eclair
it get this error back
exec: 23: python: not found
any ideas.
python: not found
yeah how do i fix it though?
thanks
install python
i have it installed already v2.6
You may have to install a version of python prior to the version you've got installed. Check which version the SDK is compatible with. =)
INSANENEIVIESIS said:
im trying to build android from source on ubuntu 10.04. im on a 64 bit system . but this is what im stuck on.
when i enter the repo command:
repo init -u git://android.git.kernel.org/platform/manifest.git -b eclair
it get this error back
exec: 23: python: not found
any ideas.
Click to expand...
Click to collapse
Unsure what you have done up to this point. It seems as though your PATH to repo is not set. I'm assuming you have already done this:
$ mkdir ~/bin
$ curl http://android.git.kernel.org/repo >~/bin/repo
$ chmod +x ~/bin/repo
$ export PATH="${PATH}:~/bin"
$ mkdir ~/xdandroid
$ cd ~/xdandroid
Have you checked your PATH settings to make sure ~/bin is in there?
Code:
echo $PATH
If you are following the wiki, the command that's on there for path doesn't work for Ubuntu (I experienced it myself and haven't looked into why...it could be because it needs to be done as sudo). Try this in terminal:
Code:
gedit ~/.bashrc
then go to the end of the file and add this to the end:
Code:
PATH=~/bin:"${PATH}"
Close any terminal windows you have open and then reopen terminal. Try the command again...

[Tutorial] Building CyanogenMod for Nexus One

My other tutorial for building CM for G2x
Last tested on 6/2/2011
This tutorial requires a basic to intermediate knowledge of linux terminal commands. First you will need to be running the latest CM nightly. Then you will need to install Ubuntu 11.04. This tutorial will work for if you are running Ubuntu in a virtual machine and if you installed it to your hard drive. I have tested this by installing it to my hard drive and in a virtual machine, but I have not tried it in Wubi but it should work. You need 11.04 64 bit.
How to install Ubuntu: https://help.ubuntu.com/community/Installation
After you have installed Ububtu, make sure that your OS is up to date. You can do that by running the Update Manager from the System>Administration menu. Once that is completed, go to Applications>Accessories and open Terminal.
Now you will be setting up your build environment.
Next lets open a terminal. Copy and paste the following into terminal.
(Copy from this tutorial with control+c and paste in terminal with control+shift+v)
Code:
sudo apt-get update && sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev gitg qt3-dev-tools libqt3-mt-dev eclipse valgrind pngcrush schedtool
Code:
sudo add-apt-repository ppa:ferramroberto/java && sudo apt-get update && sudo apt-get install sun-java6-jdk && sudo update-java-alternatives -s java-6-sun
Now you will be installing ADB
Download the sdk from the android website (use the Linux download) http://developer.android.com/sdk/index.html
extract the sdk to your ~/ directory (home directory). So you should be able to go to a terminal and cd ~/AndroidSDK/platform-tools to access your platform-tools folder in your sdk. After that, update your android sdk by opening terminal and run:
Code:
~/AndroidSDK/tools/./android
Open the terminal, and type gedit .bashrc and at the top of the file, paste this (replacing user with your username)
Code:
#AndroidDev PATH
export PATH=${PATH}:/home/user/AndroidSDK/platform-tools
export PATH=${PATH}:/home/user/AndroidSDK/tools
This will make ADB, Fastboot and DDMS available from the terminal on next login.
Now, to make the device available to normal users, open a terminal and type
Code:
sudo gedit /etc/udev/rules.d/51-android.rules
Then paste
Code:
SUBSYSTEMS == "usb", ATTRS {idVendor} == "18d1", ATTRS {idProduct} == "4E11", MODE = "0666"
SUBSYSTEMS == "usb", ATTRS {idVendor} == "18d1", ATTRS {idProduct} == "4e12", MODE = "0666"
SUBSYSTEMS == "usb", ATTRS {idVendor} == "0bb4", ATTRS {idProduct} == "0FFF", MODE = "0666"
SUBSYSTEM=="usb",ATTRS(idVendor)=="18d1",SYMLINK+="android_adb",MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="1004", MODE="0666"
Save and exit.
Ensure that the rules are executable:
Code:
sudo chmod a+rx /etc/udev/rules.d/*
Then type
Code:
sudo restart udev
You should restart your computer (or virtual machine) right now to ensure that everything is running properly.
Note: idVendor may vary. Use lsusb from the terminal, look for your Android device and replace “0bb4? with the first 4 characters after “ID”.
If ADB is still not working, read http://forum.xda-developers.com/showthread.php?t=533 and http://alan.lamielle.net/2010/01/22/nexus-one-usb-in-ubuntu-9-10
You should now have a fully working android build environment.
Now before you begin getting and building the source, make sure that you are on the latest CM7 nightly and have the latest gapps from Rom Manager.
Now to setup the CyanogenMod build environment and to build it
Enter the following lines in terminal:
Code:
cd ~/
mkdir -p ~/bin
mkdir -p ~/cm7
cd ~/bin
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
cd ~/
chmod a+x ~/bin/repo
PATH="$HOME/bin:$PATH"
PATH="$HOME/AndroidSDK/platform-tools:$PATH"
PATH="$HOME/AndroidSDK/tools:$PATH"
cd ~/cm7
repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
Press enter and enter the information it asks for.
The next command will download all of the CM source. It will take at least a few hours or more depending on your internet speed.
Code:
repo sync -j16
After the sync, plug your phone in, and run adb devices and if your phone is listed, continue. Otherwise, go back and make sure you have properly installed adb and the drivers.
Plug your phone in, copy the following commands into terminal, and press enter.
Code:
cd ~/cm7/device/htc/passion/
./extract-files.sh
cd ~/cm7/vendor/cyanogen/
./get-rommanager
./get-google-files
now you your CM build environment is complete.
Warning: Building CM pushes your computer to the max your cpu can handle. Make sure that your computer can handle compiling CM. If It cannot, DO NOT DO THIS.
To build, just run(use this command every time you want to build CM):
**** Here is a new updated command to build CM****
Code:
cd ~/cm7 && make clean && repo sync -j6 && . build/envsetup.sh && brunch passion
If you come across any problems while syncing use repo sync -f -j6 -d and it will force sync and override any changes made to the source on your computer.
and it will make an update.zip in ~/cm7/out/target/product/passion/update-cm-7.1.0-RC1-N1-signed.zip (or whatever the latest RC is)
Congratulations you have just compiled CyanogenMod for the Nexus One!
Possible causes if the build fails:
1. Make sure you followed the directions precisely.
2. Try all three of the build commands.
3. If you changed any of the code, make sure it has no errors. Open it up in eclipse and check for errors.
4. Search Google and XDA.
**If you are getting a problem with getting the gapps, it it because of the CM gapps mirror system.
1. download and install the latest gapps
2. plug your phone in and run:
Code:
~/cm7/vendor/cyanogen/./extract-google-files
Sources:
http://developer.android.com/sdk/index.html
http://wiki.cyanogenmod.com/index.php?title=Compile_CyanogenMod_for_passion
http://www.lineardroid.co.uk/2010/07/configure-build-environment/
http://www.lineardroid.co.uk/2010/04/how-to-set-up-adb-in-ubuntu/
http://forum.xda-developers.com/showthread.php?t=533090
http://alan.lamielle.net/2010/01/22/nexus-one-usb-in-ubuntu-9-10
http://forum.xda-developers.com/showthread.php?t=704561
Be sure to thank if this was helpful!
Building on a Mac
Building on a Mac may not work.
Install MacPorts
Install MacPorts using the instructions at MacPorts.org
Install the Developer Tools
Install the Mac OS X Developer Tools from your Mac OS X DVD or from the Apple developer site.
Install the Java Developer Package
Install the Java Developer Package from Apple's site — you'll need a free developer account from Apple. The installer you are looking for will be "Java for Mac OS X 10.6 Update 3 Developer Package" (Update 3 is the latest as of this writing).
Install the Android SDK using the instructions from the first post
Create a Case-Sensitive Workspace
While normal Macintosh volumes are case insensitive, the CyanogenMod/Android source contains files with the same name but in different cases. To solve this issue, you'll have to create and then work out of a case-sensitive disk image.
1. Open the Disk Utility (/Applications/Utilities/Disk Utility.app).
2. Click on New Image.
3. Save as "CyanogenModWorkspace.sparseimage" and set the following parameters as followed:
Name: "CyanogenModWorkspace"
Size: 15 GB is minimum recommended (A sparseimage will save unused space)
Format: Mac OS Extended (CASE-SENSITIVE, Journaled)
Encryption: none, Partition- Single Apple Partition Map
Image Format: Sparse Disk Image (this will save you disk space)
4. Save this wherever you like, and then double-click the sparseimage file to mount.
5. Your workspace will be:
/Volumes/CyanogenModWorkspace/
Install Required Ports
Now you need to install some stuff from macports:
Code:
sudo port selfupdate
POSIXLY_CORRECT=1 sudo port install gmake libsdl git-core gnupg e2fsprogs gsed curl libiptcdata xorg-libX* pngcrush findutils
sudo ln -s /opt/local/bin/gsed /opt/local/bin/sed
sudo ln -s /opt/local/libexec/gnubin/find /opt/local/bin/find
Now you need to downgrade gmake to 3.81 because 3.82 breaks the build.
Here's how to downgrade to 3.81:
1. Visit http://trac.macports.org/log/trunk/dports/devel/gmake
2. Click the link that says "@50980" - although it doesn't explicitly say 3.81, this is it
3. Click the link that says "Portfile"
4. Scroll to the bottom and just below "Download in other formats:" click "Original Format"
5. This is subtle but important: If your browser e.g. Chrome renamed it to Portfile.txt, you need to rename it to simply "Portfile"
6. cd to the location of Portfile and
Code:
sudo port install
This should install and configure gmake 3.81, after which:
Code:
sudo port installed gmake
will print out:
The following ports are currently installed:
gmake @3.81_0 (active)
gmake @3.82_0
Set up the Workspace
Now to setup the CyanogenMod build environment and to build it
copy each line individually into a terminal and press enter:
(This entire process could take hours, depending on your computer and your Internet speed.)
(And make sure your Nexus One is plugged in for the commands after repo sync.)
(Also, you should be running the latest CM nightly (which is CM7) and you should have clockwork recovery and rom manager)
Code:
cd /Volumes/CyanogenModWorkspace/
mkdir -p /Volumes/CyanogenModWorkspace/bin
mkdir -p /Volumes/CyanogenModWorkspace/android-cm7
curl http://android.git.kernel.org/repo > /Volumes/CyanogenModWorkspace/bin/repo
chmod a+x /Volumes/CyanogenModWorkspace/bin/repo
PATH=${PATH}:/Volumes/CyanogenModWorkspace/bin:
echo "PATH=\${PATH}:/Volumes/CyanogenModWorkspace/bin:" >> ~/.profile
cd /Developer/SDKs
sudo ln -s MacOSX10.6.sdk/ MacOSX10.4u.sdk
cd /Volumes/CyanogenModWorkspace/android-cm7
repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
repo sync
cd /Volumes/CyanogenModWorkspace/android-cm7/device/htc/passion/
./extract-files.sh
cd /Volumes/CyanogenModWorkspace/android-cm7/vendor/cyanogen/
./get-rommanager
./get-google-files
./extract-google-files
now you your CM build environment is complete.
Build CyanogenMod
open a terminal and type:
Code:
touch ~/Desktop/build.sh
chmod u+x ~/Desktop/build.sh
open -e ~/Desktop/build.sh
paste the following into TextEdit and save:
Code:
#!/bin/bash
echo "cd to android-cm7";
cd /Volumes/CyanogenModWorkspace/android-cm7
echo "Make clean";
make clean
make installclean
echo "Syncing";
repo sync
echo "Copying the make file";
cp ./vendor/cyanogen/products/cyanogen_passion.mk ./buildspec.mk
echo "Setting up build env\n";
. build/envsetup.sh
echo "Setting up lunch";
lunch cyanogen_passion-eng
cd /Volumes/CyanogenModWorkspace/android-cm7
echo "Using the make command";
make -j`sysctl -an hw.logicalcpu` bacon
save and quit TextEdit.
Run the following command in terminal every time you want to build CM.
Code:
~/Desktop/./build.sh
If you get an error saying:
Code:
ASSERTION FAILURE external/elfcopy/elfcopy.c:932: [ranges[i].start >= last_end]
You need to open /Volumes/CyanogenModWorkspace/external/elfcopy/elfcopy.c and comment line 932 (Add // in front of the line). This should fix the problem and allow you to successfully build CM.
Congratulations you have just compiled CyanogenMod for the Nexus One on a Mac!
Sources:
Most of this tutorial came from the CM wiki and the first post.
http://wiki.cyanogenmod.com/index.p...for_Passion_(Mac)#Install_the_Developer_Tools
http://forum.xda-developers.com/showthread.php?t=899674
..........
I love you
Sent from my Nexus One using XDA App
How much hdd disk space is required?
Last time I tried with a 8 GB disk image on virtual box and run out of space while syncing repo!
Sent from my Nexus One using XDA App
lhurtado said:
How much hdd disk space is required?
Last time I tried with a 8 GB disk image on virtual box and run out of space while syncing repo!
Sent from my Nexus One using XDA App
Click to expand...
Click to collapse
A lot is required. I haven't built it in a while but I suspect it close to 8GB.
Thanks for this man. Last time I tried this with Virtual Box I could never get my phone detected in ADB. Going to give this a whirl today.
thanks dude for the tutorial! luv it!
Hi, just a couple corrections:
To set PATH, you wrote gedit .basrc, should be gedit .bashrc
To set repo, you wrote mkdir -p ~/bin/repo, should be mkdir -p ~/bin
btw, thanks for this tutorial!
lhurtado said:
How much hdd disk space is required?
Last time I tried with a 8 GB disk image on virtual box and run out of space while syncing repo!
Sent from my Nexus One using XDA App
Click to expand...
Click to collapse
My cyan-froyo source have 6.1GB now without any modification.
It's huge! Now I'm syncing repo, this time I made a bigger disk on virtual box .
Now I have to check how to build just an app...
Sent from my Nexus One using XDA App
i only had an 8gb partition so i'm just using an nfs share to store the source.
syncing repo now. Thanks a lot lhurtado for those two fixes. I was stuck trying to get repo to work.
mikroN1 said:
syncing repo now. Thanks a lot lhurtado for those two fixes. I was stuck trying to get repo to work.
Click to expand...
Click to collapse
you're welcome!
There's no need to add Jaunty repos to your Lucid/Maverick install, just enable the partner repository in System > Administration > Software Sources > Other Software
I think I'm stuck where I was before. Can't get my phone detected in ADB.
./extract-files.sh: 54: adb: not found
Any ideas?
edit: doing ./adb devices show's nothing connected.
lhurtado said:
Hi, just a couple corrections:
To set PATH, you wrote gedit .basrc, should be gedit .bashrc
To set repo, you wrote mkdir -p ~/bin/repo, should be mkdir -p ~/bin
btw, thanks for this tutorial!
Click to expand...
Click to collapse
thanks, editing now
mikroN1 said:
I think I'm stuck where I was before. Can't get my phone detected in ADB.
./extract-files.sh: 54: adb: not found
Any ideas?
edit: doing ./adb devices show's nothing connected.
Click to expand...
Click to collapse
first, make sure that your phone is connected, and if you are using a virtual machine, mounted with the program and make sure that you restarted your computer. If that doesn't fix it, then your problem is with the rules. Try reading the other two links I wrote to read.
awesome guide
thanks alot for the guide. big help. although the line "make -j`grep 'processor' /proc/cpuinfo | wc -l` CYANOGEN_WITH_GOOGLE=true otapackage" # Not working right now. It says that on the cyanogen wiki. also how do you go about adding your own stuff to the builds you make?
samir5421 said:
first, make sure that your phone is connected, and if you are using a virtual machine, mounted with the program and make sure that you restarted your computer. If that doesn't fix it, then your problem is with the rules. Try reading the other two links I wrote to read.
Click to expand...
Click to collapse
Phone is connected and shows up under USB Devices in VirtualBox. Also the two links you supplied for the ADB section both don't work. I tried changing my idVendor but still can't get it to detect my phone.
Edit:
Added my phone as a usb filter in VirtualBox. Still not working. I'm getting this pop up trying to click on my phone.
{
"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"
}

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

1) You need the following:
-Python 2.4 -- 2.7, which you can download from python.org.
Or:
Code:
$ sudo add-apt-repository ppa:fkrull/deadsnakes
$ sudo apt-get update
$ sudo apt-get install python2.5
-JDK 6 if you wish to build Gingerbread or newer
or
-JDK 5 for Froyo or older.
You can download both from java.sun.com.
Or:
Code:
$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
$ sudo add-apt-repository "deb-src http://archive.canonical.com/ubuntu lucid partner"
$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk-
Git 1.5.4 or newer. You can find it at git-scm.com.
Or:
Code:
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install git-core-(optional) Valgrind, a tool that will help you find memory leaks, stack corruption, array bounds overflows, etc.
Download from valgrind.org.
Or:
Code:
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install valgrind
2) Install required packages.
Code:
$ sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev
lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev
3) Download the repo:
Code:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ curl http://android.git.kernel.org/repo > ~/bin/repo
$ chmod a+x ~/bin/repo6) Initialize the repo:
Code:
$ mkdir WORKING_DIRECTORY
$ cd WORKING_DIRECTORYF
or master branch:
Code:
$ repo init -u git://android.git.kernel.org/platform/manifest.git
For specific branch other than Gingerbread you would put in Donut, Eclair, Froyo, or Gingerbread where it currently says "gingerbread" without the parenthesis:
Code:
$ repo init -u git://android.git.kernel.org/platform/manifest.git -b gingerbread
4) When prompted, please configure Repo with your real name and email address. To use the Gerrit code-review tool, you will need an email address that is connected with a registered Google account. Make sure this is a live address at which you can receive messages. The name that you provide here will show up in attributions for your code submissions.
5) Gather the files:
Code:
$ repo sync
6) Verify and insert public key block:
Code:
$ gpg --import
Code:
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
mQGiBEnnWD4RBACt9/h4v9xnnGDou13y3dvOx6/t43LPPIxeJ8eX9WB+8LLuROSV
lFhpHawsVAcFlmi7f7jdSRF+OvtZL9ShPKdLfwBJMNkU66/TZmPewS4m782ndtw7
8tR1cXb197Ob8kOfQB3A9yk2XZ4ei4ZC3i6wVdqHLRxABdncwu 5hOF9KXwCgkxMD
u4PVgChaAJzTYJ1EG+UYBIUEAJmfearb0qRAN7dEoff0FeXsEa UA6U90sEoVks0Z
wNj96SA8BL+a1OoEUUfpMhiHyLuQSftxisJxTh+2QclzDviDya TrkANjdYY7p2cq
/HMdOY7LJlHaqtXmZxXjjtw5Uc2QG8UY8aziU3IE9nTjSwCXeJn uyvoizl9/I1S5
jU5SA/9WwIps4SC84ielIXiGWEqq6i6/sk4I9q1YemZF2XVVKnmI1F4iCMtNKsR4
MGSa1gA8s4iQbsKNWPgp7M3a51JCVCu6l/8zTpA+uUGapw4tWCp4o0dpIvDPBEa9
b/aF/ygcR8mh5hgUfpF9IpXdknOsbKCvM9lSSfRciETykZc4wrRCVGh lIEFuZHJv
aWQgT3BlbiBTb3VyY2UgUHJvamVjdCA8aW5pdGlhbC1jb250cm lidXRpb25AYW5k
cm9pZC5jb20+iGAEExECACAFAknnWD4CGwMGCwkIBwMCBBUCCA MEFgIDAQIeAQIX
gAAKCRDorT+BmrEOeNr+AJ42Xy6tEW7r3KzrJxnRX8mij9z8tg CdFfQYiHpYngkI
2t09Ed+9Bm4gmEO5Ag0ESedYRBAIAKVW1JcMBWvV/0Bo9WiByJ9WJ5swMN36/vAl
QN4mWRhfzDOk/Rosdb0csAO/l8Kz0gKQPOfObtyYjvI8JMC3rmi+LIvSUT9806Up
hisyEmmHv6U8gUb/xHLIanXGxwhYzjgeuAXVCsv+EvoPIHbY4L/KvP5x+oCJIDbk
C2b1TvVk9PryzmE4BPIQL/NtgR1oLWm/uWR9zRUFtBnE411aMAN3qnAHBBMZzKMX
LWBGWE0znfRrnczI5p49i2YZJAjyX1P2WzmScK49CV82dzLo71 MnrF6fj+Udtb5+
OgTg7Cow+8PRaTkJEW5Y2JIZpnRUq0CYxAmHYX79EMKHDSThf/8AAwUIAJPWsB/M
pK+KMs/s3r6nJrnYLTfdZhtmQXimpoDMJg1zxmL8UfNUKiQZ6esoAWtDg pqt7Y7s
KZ8laHRARonte394hidZzM5nb6hQvpPjt2OlPRsyqVxw4c/KsjADtAuKW9/d8phb
N8bTyOJo856qg4oOEzKG9eeF7oaZTYBy33BTL0408sEBxiMior 6b8LrZrAhkqDjA
vUXRwm/fFKgpsOysxC6xi553CxBUCH2omNV6Ka1LNMwzSp9ILz8jEGqmU tkBszwo
G1S8fXgE0Lq3cdDM/GJ4QXP/p6LiwNF99faDMTV3+2SAOGvytOX6KjKVzKOSsfJQ
hN0DlsIw8hqJc0WISQQYEQIACQUCSedYRAIbDAAKCRDorT+Bmr EOeCUOAJ9qmR0l
EXzeoxcdoafxqf6gZlJZlACgkWF7wi2YLW3Oa+jv2QSTlrx4KL M=
=Wi5D
-----END PGP PUBLIC KEY BLOCK-----
7) After copying and pasting the public key block press Crtl+D to end the input.
8) Compiling:
Code:
$ source build/envsetup.sh
Or:
Code:
$ . build/envsetup.sh
9) Issue:
Code:
$ lunch
10) Pick your poison.
11) Now issue:
Code:
$ make
12) Now just cross your fingers and hope it all works out!
13) Issue this command to create a flashable zip:
Code:
$ make otapackage
Or if you want to test on an emulator:
Code:
$ emulator
15) If all went well you can either run your build on an emulator or flash it on a device.
Code:
Please note that you have already selected your build target with lunch, and it is unlikely at best to run on a different target than it was built for.
~How To Add A Device To The List~
1) Find the github for your device you wish to add. (For me it is the HTC Hero CDMA)
2) Now navigate to the location you are going clone the device tree to:
Code:
$ cd WORKING_DIRECTORY/device/htc3) Clone the github device tree from remote to local: (The heroc would be whatever you want that folder to be named so make sure it is whatever standard name would be for your device, example: Nexus One [Passion], Nexus S [Crespo], Motorola Droid [Sholes], HTC Incredible [Inc], etc.)
Code:
git clone git://github.com/wjb/android_device_htc_heroc.git -b gingerbread heroc
3) Now navigate into the folder:
Code:
$ cd heroc
4) Setup Device Specific Make Files:
Code:
$ ./setup-makefiles.sh
5) Prepare To Copy Device Proprietary Files To Vendor Tree:
Code:
$ cd prebuilt
6) Copy Proprietary Files To Vendor Tree:
Code:
$ cp -r proprietary WORKING_DIRECTORY/vendor/htc/heroc
7) Navigate back to your home directory for building:
Code:
$ cd ~/WORKING_DIRECTORY
8) Prepare To Compile:
Code:
$ source build/envsetup.sh
Or:
Code:
$ . build/envsetup.sh
9) Get your list of devices:
Code:
$ lunch
10) Pick your poison.
11) Now compile:
Code:
$ make
Or if you want a flashable zip:
Code:
$ make otapackage
Compiling kernel:
You will need sdk / ndk packages from Google:
mkdir KERNEL_DIRECTORY
cd to KERNEL_DIRECTORY
Code:
ARCH=arm CROSS_COMPILE=???/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- make semc_?????_defconfig
or
Unpack config.gz to KERNEL_DIRECTORY as .config from kernel.sin --- how? Simple use hexeditor and search two times for gzip magic 1F8B08 cut all before that and you have config.gz
then
ARCH=arm CROSS_COMPILE=???/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- make
Compiling invidual packages:
Code:
make [ module name ]
Why this so down this is a huge guide no one interested?
THANKS Man I was wondering how to do this, thanks a lot this guide will help many people. And others will understand the hard work that involves creating a custom kernel or rom.
This guide is for debian based distributions
Great job aZuZu
Sent from my X10a using xda premium

[HELP] Building CM12 'No ~/android/system/vendor/cm'

Hi there, I'm extremely new to building a ROM or even to git and other stuff and am now trying to learn to build ROM. I have downloaded the cm12 sources for now, and trying to learn how it works, but seems to have stuck at a location.
I have been following the cm build page instructions for now from this page, and have done following stuff until now:
Make folders:
Code:
mkdir -p ~/bin
$ mkdir -p ~/android/system
Installed the repo command and entered the following to download the "repo" binary and make it executable (runnable):
Code:
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
Put the ~/bin directory in your path of execution
Initialize the CyanogenMod source repository and initialized the repository:
Code:
$ cd ~/android/system/
$ repo init -u https://github.com/CyanogenMod/android.git -b ics
Downloaded the source code
Code:
$ repo sync -j4 -f -c
[*]Get prebuilt apps
Code:
$ cd ~/android/system/vendor/cm
Now when I get to the get prebuilt apps, and I run cd ~/android/system/vendor/cm, I get the
Code:
cd ~/android/system/vendor/cm bash: No such file or directory
I tried opening the location manually, but I find no "vendor" folder under the "android/system" folder. However, there is a "vendor" folder under "android" and that "vendor" consists of folders like "cm", "cyngn" and "sony", where "sony" is related to My phone.
Under system I have folders like "core", "extras", "keymaster", "media", "netd", "qcom", "security" and "vold".
Before You say that I might have not done repo sync properly, it did complete properly. I have attached the image of completion of first time the repo sync was complete. Then a log of second time when the repo sync was done to get the device specific related stuff. I used the -f since the download of source had been interrupted due to the error "error: Exited sync due to fetch errors".
Also, don't know if it matters, but I have built a ROM before on the same system, but it was by following the instructions as posted to do. The sources were all coded to suit My phone, and all I was doing was "repo sync" and building the ROM via source with commands build/envsetup.sh
and breakfast nozomi and used to get a working build.
So please help Me out where I went wrong as I do want to learn to how to build a ROM.
Edit:
I had also tried searching for "get-prebuilts", "envsetup.sh" too, but couldn't find them either, and yes, I was always in the root directory of the source code (~/android/system).
Same issue here. Ironically I can build AICP (which is Cyanogenmod based). I can build any AOSP Rom without compiling problems also. This is a Cyanogenmod thing. It's also frustrating that even if you do manage to compile it, you probably won't be able to flash it. That happened to me with 5.0
Just for kicks, what is your OS? I'm running Linux Peppermint. I wonder if that could be the issue, since Ubuntu is recommended?
Check your java & sdk version

building AOSP for Intel Platform(NEED HELP)

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

Categories

Resources