[Tutorial] How to compile a kernel - Nexus S Android Development

If you see mistakes please contact me. If you think something can be shorter, easier, feel free to suggest.
I have spent a lot of time figuring this out. Not to mention making this guide.
If this guide helped you feel free to donate.
There is more to come, using different toolchains, important files, adding overclocking etc.
Coming soon
- Links to useful mods: deep idle, live oc, BLN, ...
- How to compile a custom kernel: eg air kernel
- A list of useful files and folders in the downloaded kernel source
Setting up the environment & building the kernel for the first time
Ubuntu 10.04 64-Bit (recommended)
Ubuntu 12.04 64-Bit
Note that you cannot compile AOSP ROMs with Ubuntu 12.04. Ubuntu 12.04 is fine for kernels.
If you want to use virtualization software, do not use Virtualbox. You can run into networking issues and so on. I suggest using VMWare Player instead, which is available for free on http://www.vmware.com
Installing latest updates & reboot.
$ sudo apt-get update
$ sudo apt-get dist-upgrade
$ sudo reboot
Click to expand...
Click to collapse
Now we will download and install the latest Java 6 JDK from here. Look for Java 6 SE Update 33 or a later update version. Don't download Java 7 JDK. I am downloading the file below for this guide.
Linux x64 68.69 MB jdk-6u33-linux-x64.bin
Click to expand...
Click to collapse
This guide assumes you have downloaded the file in the folder
~/Downloads
Click to expand...
Click to collapse
$ cd ~/Downloads
$ sudo chmod +x jdk-6u33-linux-x64.bin
$ ./jdk-6u33-linux-x64.bin
$ sudo mv jdk1.6.0_33 /usr/lib/jvm/jdk1.6.0_33
$ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_33/bin/javac 1
$ sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_33/bin/java 1
$ sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_33/bin/javaws 1
$ sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.6.0_33/bin/jar 1
$ sudo update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/jdk1.6.0_33/bin/javadoc 1
$ sudo update-alternatives --config javac
$ sudo update-alternatives --config java
$ sudo update-alternatives --config javaws
$ sudo update-alternatives --config jar
$ sudo update-alternatives --config javadoc
$ java --version
$ ls -la /etc/alternatives/java*
Click to expand...
Click to collapse
Now reboot is optional but welcome. Let's play safe.
$ sudo reboot
Click to expand...
Click to collapse
Install all required packages to play with Android.
Ubuntu 10.04
$ 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 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc
Click to expand...
Click to collapse
Ubuntu 12.04
$ sudo apt-get update
$ sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386 git
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
$ sudo reboot
Click to expand...
Click to collapse
Configure USB ports.
$ sudo gedit /etc/udev/rules.d/51-android.rules
Click to expand...
Click to collapse
This file should get the contents:
# adb protocol on passion (Nexus One)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e12", MODE="0600", OWNER="<username>"
# fastboot protocol on passion (Nexus One)
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0fff", MODE="0600", OWNER="<username>"
# adb protocol on crespo/crespo4g (Nexus S)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e22", MODE="0600", OWNER="<username>"
# fastboot protocol on crespo/crespo4g (Nexus S)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e20", MODE="0600", OWNER="<username>"
# adb protocol on stingray/wingray (Xoom)
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", ATTR{idProduct}=="70a9", MODE="0600", OWNER="<username>"
# fastboot protocol on stingray/wingray (Xoom)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="708c", MODE="0600", OWNER="<username>"
# adb protocol on maguro/toro (Galaxy Nexus)
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="6860", MODE="0600", OWNER="<username>"
# fastboot protocol on maguro/toro (Galaxy Nexus)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e30", MODE="0600", OWNER="<username>"
# adb protocol on panda (PandaBoard)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d101", MODE="0600", OWNER="<username>"
# fastboot protocol on panda (PandaBoard)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d022", MODE="0600", OWNER="<username>"
# usbboot protocol on panda (PandaBoard)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d00f", MODE="0600", OWNER="<username>"
# usbboot protocol on panda (PandaBoard ES)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d010", MODE="0600", OWNER="<username>"
Click to expand...
Click to collapse
Don't forget to replace the red marked text with your username from Ubuntu.
When building a kernel, you only need to start from here. Pick the appropriate branch from the git manually. I used the one below as an example. What I did was visiting the git repository each time and picked the appropriate branch.
https://android.googlesource.com/device/samsung/crespo
$ mkdir ~/Documents/kernel
$ cd ~/Documents/kernel
$ git clone https://android.googlesource.com/device/samsung/crespo -b ics-plus-aosp
Click to expand...
Click to collapse
Again pick the right branch from https://android.googlesource.com/kernel/samsung.git
$ cd crespo
$ git clone https://android.googlesource.com/kernel/samsung.git -b android-samsung-3.0-ics-mr1
Click to expand...
Click to collapse
Ensure the toolchain is in your path.
Default, Easy solution
$ git clone https://android.googlesource.com/platform/prebuilt -b ics-plus-aosp
$ export PATH=$(pwd)/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin:$PATH
Click to expand...
Click to collapse
$(pwd) is a variable holding the current working directory.
Bandwidth-friendly solution
You can also download the toolchain to another directory. Bit first write down the directory you are working at.
mkdir ~/Documents/toolchain
cd ~/Documents/toolchain
$ git clone https://android.googlesource.com/platform/prebuilt -b ics-plus-aosp
export PATH=~/Documents/toolchain/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin:$PATH
Click to expand...
Click to collapse
Instead of specifying the location of the toolchain with a relative path, we must specify the absolute path here.
Now we go back to where we were working.
cd ~/Documents/kernel/crespo
Click to expand...
Click to collapse
I hope you understand why I mentioned the bandwidth-friendly solution. With little insight you could have come up with it yourself.
Now let's build the kernel
$ export ARCH=arm
$ export SUBARCH=arm
$ export CROSS_COMPILE=arm-eabi-
$ cd samsung
$ make ARCH=arm herring_defconfig (maybe ARCH=arm is unneeded here but added it to be sure)
$ make
Click to expand...
Click to collapse
[*]Now you need to put it in a flashable zip.
Possible issues, things to avoid, FAQ
- Avoid downloading the kernel sources to directories which might require root/superuser access. This is one of the reasons I downloaded all sources to '~/Documents'. This will save a lot of time messing with chmod or chown commands.
- What is 'herring', shouldn't this be crespo? No, actually not. Herring is the board name, while crespo is the codename of the Nexus S. Something you might want to remember when building kernels.
Interesting files and locations
<kernel_directory>/samsung/arch/arm/mach-s5pv210/cpu-freq.c
Overclocking
Voltages
Links to mods, source code, ...
I am making the patch files currently
Ezekeel's work https://github.com/Ezekeel/GLaDOS-nexus-s-ics
BLN
BLX
Custom Voltage
Deep Idle
Live OC
Touchwake
USB OTG
Voodoo
Samsung IDLE2 port for S5PV210 (Improved Deep Idle patch)

djjonastybe said:
$ export ARCH=arm
$ export SUBARCH=arm
$ export CROSS_COMPILE=arm-eabi-
$ cd omap
$ git checkout <commit_from_first_step> What to put here???
$ make panda_defconfig
$ make
Click to expand...
Click to collapse
You should have everything now ready to compile the aosp kernel
My method is:
$cd /path/to/kernel/source
$export ARCH=arm
$export CROSS_COMPILE=arm-eabi-
$export PATH=$PATH:~/path/to/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin
$make herring_defconfig
$make
Just change the '/path/to' to match yours You can also make it a script.
The checkout command I don't use (but I do have all of the aosp source and 'set the environment' first '. build/envsetup.sh && lunch full_crespo-userdebug'). You can clone from git and it will all be in the folder you cloned in. To pull the latest, just use 'git pull'.
Hope that helps.

How do you use linaro toolchain?

snandlal said:
How do you use linaro toolchain?
Click to expand...
Click to collapse
I haven't used it, but theoretically you could export the path to the linaro tool chain instead of Google's gcc.
I have heard (have not confirmed) that there could be issues that may be introduced by using a different tool chain.
Sent from my Nexus S using xda app-developers app

Now I need this:
$ make ARCH=arm CROSS_COMPILE=arm-eabi- -j4
scripts/kconfig/conf --silentoldconfig Kconfig
*** Error during update of the configuration.
make[2]: *** [silentoldconfig] Error 1
make[1]: *** [silentoldconfig] Error 2
make: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'. Stop.
Click to expand...
Click to collapse

boog said:
I haven't used it, but theoretically you could export the path to the linaro tool chain instead of Google's gcc.
I have heard (have not confirmed) that there could be issues that may be introduced by using a different tool chain.
Sent from my Nexus S using xda app-developers app
Click to expand...
Click to collapse
Cool, thanx

djjonastybe said:
Now I need this:
Click to expand...
Click to collapse
Interesting....Sounds like it is maybe missing the files. I went back and reread your original instructions and instead of
sudo git clone https://android.googlesource.com/device/samsung/crespo
Click to expand...
Click to collapse
try
git clone https://android.googlesource.com/kernel/samsung.git -b android-samsung-3.0-ics-mr1
Click to expand...
Click to collapse
Leave off the sudo, you don't need it for doing things in your own home directory, you'll end up with a bunch of files that belong to root.

boog said:
Interesting....Sounds like it is maybe missing the files. I went back and reread your original instructions and instead of
try
Leave off the sudo, you don't need it for doing things in your own home directory, you'll end up with a bunch of files that belong to root.
Click to expand...
Click to collapse
I think you are giving me wrong instructions? You mixed things up I think
I also noticed that gcc was not found because it had the wrong permissions. 'chmod 755 *' fixed it.
I am now trying again. I made a mistake.

guide complete. thank you boog for helping. I hope I can help some people with this. It took some time to sort out.

djjonastybe said:
I think you are giving me wrong instructions? You mixed things up I think
I also noticed that gcc was not found because it had the wrong permissions. 'chmod 755 *' fixed it.
I am now trying again. I made a mistake.
Click to expand...
Click to collapse
Ahh, ok, then it was probably due to checking out as sudo. Not trying to give wrong instructions. Just trying to help.
If you had to chmod them, it was possibly because the files might have belonged to root instead of your user, I didn't think of that.
I think the guide should help people get started tinkering with kernels

boog said:
Ahh, ok, then it was probably due to checking out as sudo. Not trying to give wrong instructions. Just trying to help.
If you had to chmod them, it was possibly because the files might have belonged to root instead of your user, I didn't think of that.
I think the guide should help people get started tinkering with kernels
Click to expand...
Click to collapse
I really hope this too. I have been willing to do this since October 2011, but never got to it because I always thought it would be too difficult. Now I spent 3-4 days figuring everything out, with your help.
I still have few things on my list like adding a tutorial here on how to rename the kernel, and links to specific mods like Ezekeel's mods.

I'm gonna try this . will trouble you a lot i guess . lol . this would be hard with my ****ty internet connection . ( i won't ever be able to compile AOSP , becuase of the large file size to be downloaded )
Now i'm @ the start of the guide .
apt-get update - done
Click to expand...
Click to collapse
apt-get dist-upgrade - returned some errors so ,
apt-get -f dist-upgrade - running ...
Click to expand...
Click to collapse
many thanks for the OP , to this tutorial . It's a must needed . & I think other experienced devs should also help out this thread .

Oodie said:
I'm gonna try this . will trouble you a lot i guess . lol . this would be hard with my ****ty internet connection . ( i won't ever be able to compile AOSP , becuase of the large file size to be downloaded )
Now i'm @ the start of the guide .
apt-get dist-upgrade - returned some errors so ,
many thanks for the OP , to this tutorial . It's a must needed . & I think other experienced devs should also help out this thread .
Click to expand...
Click to collapse
Being updated isn't a bad thing, but if your already on 12.04, it could be possible to just:
sudo apt-get update
sudo apt-get upgrade
Click to expand...
Click to collapse
That should have you updated to the latest updates for 12.04.
Doing a dist-upgrade can upgrade you to the next version of ubuntu (not released yet). But could on the next release.

boog said:
Being updated isn't a bad thing, but if your already on 12.04, it could be possible to just:
That should have you updated to the latest updates for 12.04.
Doing a dist-upgrade can upgrade you to the next version of ubuntu (not released yet). But could on the next release.
Click to expand...
Click to collapse
oops . will it do any harm if i dist-upgrade ?

Oodie said:
oops . will it do any harm if i dist-upgrade ?
Click to expand...
Click to collapse
http://techhamlet.com/2012/02/ubuntu-whats-the-difference-between-upgrade-and-dist-upgrade/
Google it: upgrade vs dist-upgrade
upgrade only updates the packages already installed.
I believe apt-get upgrade is equal to the update manager of ubuntu. If you use the GUI to update. Correct me if I am wrong
I believe dist-upgrade also handles the dependencies.
http://en.wikipedia.org/wiki/Advanced_Packaging_Tool
I have always preferred dist-upgrade.
Oodie if you get errors during dist-upgrade try reinstalling your ubuntu. Maybe you want to start fresh. I started a clean Virtual Box virtual machine.
dist-upgrade has never given me errors.
How old is your installation ?

djjonastybe said:
http://techhamlet.com/2012/02/ubuntu-whats-the-difference-between-upgrade-and-dist-upgrade/
Google it: upgrade vs dist-upgrade
upgrade only updates the packages already installed.
I believe apt-get upgrade is equal to the update manager of ubuntu. If you use the GUI to update. Correct me if I am wrong
I believe dist-upgrade also handles the dependencies.
http://en.wikipedia.org/wiki/Advanced_Packaging_Tool
I have always preferred dist-upgrade.
Oodie if you get errors during dist-upgrade try reinstalling your ubuntu. Maybe you want to start fresh. I started a clean Virtual Box virtual machine.
dist-upgrade has never given me errors.
How old is your installation ?
Click to expand...
Click to collapse
You are correct. For some reason I had it in my head as an update to the next release.
Sent from my Nexus S using xda app-developers app

I'm stuck on kernel source downloading ( user / kernel folder ) .
Download interrupted 3 times now
Can't we share a completed kernel folder or something?
I hate my internet connection.
°°° This comment is Sent from my Nexus S °°°

Oodie said:
I'm stuck on kernel source downloading ( user / kernel folder ) .
Download interrupted 3 times now
Can't we share a completed kernel folder or something?
I hate my internet connection.
°°° This comment is Sent from my Nexus S °°°
Click to expand...
Click to collapse
Have you tried connecting it with a ethernet cable to the modem? I have a good connection but cable seems to be always 100% safe.
sudo sysctl -w net.ipv4.tcp_window_scaling=0
Click to expand...
Click to collapse
Maybe this tweak helps you. But I suggest shutting down as much programs as you can. And other computers. And if you can connect it directly to the modem/router with a ethernet cable.
Or keep trying. In the end it should be complete.
Also try a retail installation of Ubuntu instead of using a virtual machine this has helped me here.
EDIT: Updated first post with more kernel fun.

ok . the first branch finished successfully :angel: ( finally )
( Now there is files in the kernel / crespo folder )
Now running the second branch .
$ cd crespo
$ git clone https://android.googlesource.com/kernel/samsung.git -b android-samsung-3.0-ics-mr1
Click to expand...
Click to collapse

Oodie said:
ok . the first branch finished successfully :angel: ( finally )
( Now there is files in the kernel / crespo folder )
Now running the second branch .
Click to expand...
Click to collapse
Told you
Oodie I changed something in my guide.
$ sudo update-alternatives --config javac
$ sudo update-alternatives --config java
$ sudo update-alternatives --config javaws
Click to expand...
Click to collapse
Make sure you run these to see if you are using the right JDK. By default the OpenJDK is still used. Just discovered it.

Related

[GUIDE] Bulding CM9 from Sources for O2X (P990)

Building CM9 from Sources for O2X
This Guide is a Step by Step Guide to Build CM9 from official CM9 Sources.
It based on:
aMpeX`s [TUTORIAL] The Step-By-Step guide to build Cyanogenmod7 for the LG Optimus 2X
loganmc10`s [GUIDE] Building CM9 for G2X
I only change to P990, respectively CM9 and add the fix for working Baseband
You need:
- a installed Linux, (I use Ubuntu 11.10, 64 Bit)
- a fast PC or Notebook is recommended
- a fast internet-connections is recommended, (you have to download several GBs)
There are 10 Steps, (8 for building, and 2 optionals ):
1. Installing Build-Packages
2. Install and setup Android-SDK
3. Update path
4. Create directories
5. Install repository and download CM9 Sources
6. Fix for non working camera
6a. Fix the known issues
7. Compiling Unofficial CM9 Build
8. Fix unknown Baseband
9. Extended building
10. Optional changes
Some infos before start:
- read the whole Guide carefully, (possibly you have to read it a few times, untill you understand all steps)
- if you do it exactly as explained, there should be no problems, and the result is a working Unofficial CM9-Build
- don`t login to Linux as root
- if you get problems, feel free to PM me, if you can`t post in Dev-Forum
lets start,
1. Installing Build-Packages
install this for 32 bit and 64 bit:
Terminal:
type:
Code:
sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev openjdk-6-jdk pngcrush schedtool
NOTE:
this will install Open-JDK instead of Sun-JDK,
(Sun-JDK isn`t longer official available for Ubuntu)
this will result in an error message at the beginning of compiling,
just ignore it, compiling will working fine.
If you want to install Sun-JDK instead of Open-JDK,
the user tonyp has made a tutorial.
use this line instead of above one
Terminal:
type:
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 pngcrush schedtool
than go to this tutorial
for me the tutorial above doesn`t work (Ubuntu 11.10 64 Bit)
this is working for me:
open terminal:
Code:
sudo add-apt-repository ppa:ferramroberto/java
Code:
sudo apt-get update
Code:
sudo apt-get install sun-java6-jdk sun-java6-plugin
Code:
sudo update-alternatives --config java
(note: you have to press the tab button to be able to press ok, after the last command )
install this for 64 bit also:
Terminal:
type:
Code:
sudo apt-get install g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline-gplv2-dev gcc-4.4-multilib g++-4.4-multilib
2. Install and setup Android-SDK
Download newest Android-SDK from here (Linux (i386) )
Extract the Zip-Package to a directory of your choice
Terminal:
navigate to the tools-folder of Android-SDK and type:
Code:
./android
this will launch the AVD-Manager
check repository, select newest repository, and click install packages
3. Update path
go to your Home-Directory, and press CTRL + H to show hidden files,
open .bashrc
and add this:
Code:
export PATH="/home/<yourusername>/<path to the android SDK >/platform-tools/:${PATH}"
export PATH="/home/<yourusername>/bin/:${PATH}"
now you have to log out and in again for the changes take effect.
now check if changes are working,
Terminal:
type:
Code:
adb devices
you should see something like this:
[email protected]:~$ adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
Click to expand...
Click to collapse
4. Create directories
Terminal:
type:
Code:
mkdir -p ~/bin
Code:
mkdir -p ~/android/system
5. Install repository and download CM9 Sources
Install repository
Terminal:
type:
Code:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
Code:
chmod a+x ~/bin/repo
Code:
cd ~/android/system/
Code:
repo init -u git://github.com/CyanogenMod/android.git -b ics
enter name, email adress, and choose if you want colors or not
Download CM9 Sources:
Terminal:
type:
Code:
cd ~/android/system/
Code:
repo sync
depending on your internet connection speed this can take several hours
press CTRL + H
go to :
/android/system/.repo/
create:
local_manifest.xml
paste into local_manifest.xml:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project path="device/lge/p990" name="CyanogenMod/android_device_lge_p990" />
<project path="device/lge/star-common" name="CyanogenMod/android_device_lge_star-common" />
<project path="vendor/lge" name="Owain94/proprietary_vendor_lge.git" remote="github" />
</manifest>
Terminal:
type:
Code:
cd ~/android/system/
Code:
repo sync
6. Fix for non working camera
download this zip-package MediaFire SolidFiles.
(I don`t make this patch, and don`t know who had made it, if you made it PM me and I`ll give credit for your work)
Extract the Zip-Package to a directory of your choice.
Terminal:
type:
Code:
cd ~/android/system
Code:
patch -p1 <
NOTE: after "<" there has to be a "blank space" (press spacebar)
now drop the first ...diff file from extracted package into terminal, the path will be automatically added,
run the created command,
the same procedure for the other 4 files
6a. Fix the known issues
for broken building:
open:
device/lge/p990/BoardConfig.mk
delete line:
Code:
BOARD_TOUCH_RECOVERY := true
For mobile data fix:
place this file to android/system/system/core/init/ (overwrite excisting file),
7. Compiling Unofficial CM9 Build
Terminal:
type:
Code:
~/android/system/vendor/cm/get-prebuilts
Code:
cd ~/android/system/
Code:
. build/envsetup.sh
Code:
brunch p990
depending on your PC or Notebooks specs compiling will take from 30 minutes to several hours
you can find your Rom-Zip-Package at:
/android/system/out/target/product/p990/
Click to expand...
Click to collapse
8. Fix unknown Baseband
open your Rom-Zip-Package and extract /system/build.prop
(don`t close Archivmanager)
open build.prop:
delete line:
ro.modversion=9-...-UNOFFICIAL-p990
Click to expand...
Click to collapse
(thanks to owain94 for deleting line info)
find line:
ro.cm.version=9-...-UNOFFICIAL-p990
Click to expand...
Click to collapse
replace this line with:
ro.cm.version=9.0.0-RC1-p990-UNOFFICIAL
Click to expand...
Click to collapse
save build.prop
drop modded build.prop into Archivemanager (/system, overwrite existing file)
Now your Unofficial CM9 Build is ready to install
------------------------------------------------------------------------------------------------------------------------------------------------------------
9. Extended building:
I decided to make a optional 9. Step to have a better building experience
(all tipps by owain94, thanks)
This Step is a replacement for Step 7!
Terminal:
type:
Code:
cd ~/android/system && clear && cd vendor/cm && ./get-prebuilts && cd ../../ && clear && . build/envsetup.sh && brunch p990 2> warn.log
this command downloads the cm-prebuilds,
sets up the build environment,
start the building,
exports all warnings and errors to a text file
and cleans the Terminal.
open another Terminal
type:
Code:
cd ~/android/system && clear && tail -f warn.log
this command cleans the terminal,
shows the warnings and errors in this second Terminal,
and keep the focus on it,
first terminal only shows the building process,
so it`s much easier to catch problems while compiling.
If you have connected two screens to your PC or Notebook,
you can also place second Terminal on second screen.
you can find your Rom-Zip-Package also at:
/android/system/out/target/product/p990/
Click to expand...
Click to collapse
10. Optional changes:
Fix for working torch and torch power-widget:
"activate" torch and power-widget:
open:
/android/system/packages/apps/Torch/res/values/config.xml
add or change to:
Code:
<bool name="useCameraInterface">true</bool>
open:
/android/system/packages/apps/Settings/res/values
add or change to:
Code:
<bool name="has_led_flash">true</bool>
add Torch.apk to the package:
open:
/android/system/device/lge/star-common/star.mk
change:
Code:
## LGE stuffs
PRODUCT_PACKAGES += \
LGEServices \
bridgeutil \
libbridges \
libbridge \
libbridge_jni \
secureclockd \
libsecureclock \
screencap \
hwprops \
com.android.future.usb.accessory
to:
Code:
## LGE stuffs
PRODUCT_PACKAGES += \
LGEServices \
bridgeutil \
libbridges \
libbridge \
libbridge_jni \
secureclockd \
libsecureclock \
screencap \
hwprops \
com.android.future.usb.accessory \
Torch
Credits:
aMpeX, loganmc10, pastime1971, owain94, tonyp, temasek
The -j part isn't needed anymore the build script figure it out on their own
and for the vendor files you can ad this to the local manifest
<project name="koush/proprietary_vendor_lge.git" path="vendor/lge" remote="github" />
it is less work we don't want to do to much
also this is maybe a nice addition
Code:
clear && cd vendor/cm && ./get-prebuilts && cd ../../ && clear && . build/envsetup.sh && brunch p990 2> warn.log
i use this build line
clear - make my terminal nice and empty
cd vendor/cm && ./get-prebuilts && cd ../../ - get the cm prebuilts
clear - make the terminal clean again
. build/envsetup.sh - set up the build env
brunch p990 - lunch and bacon for the p990
2> warn.log - exports al the warnings and errors to a text file to keep the terminal clean
i have three screens attached to my pc
on one screen i run the above command (clear && cd vendor/cm && ./get-prebuilts && cd ../../ && clear && . build/envsetup.sh && brunch p990 2> warn.log)
on another screen i run this command (clear && tail -f warn.log) this will print (and keep track of) the warn.log file with all the errors and warnings
and on the other screen i do useless stuff hehe
anyway i really like to use 2 terminals it is just easier to catch problems
Nice tut mate!
Sent from my HTC One X using xda premium
reserved
great guide bro.
Edit:
If anyone wants to install the SUN JDK instead of Open JDK you can install it from the partner repository:
Code:
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jdk
Thanks, for your replies, I'll change my Guide at the evening.
Gesendet von meinem HTC One S mit Tapatalk 2
Great! Maybe I will stay building
Sent from LG 2X using Tapatalk 2 Elite
Thanks a lot !!
The Guide is updated, (big thanks to owain94).
I`ll add a new Step or Section (lets see, atm I don`t know) for extended Build-Line and possibly multiscreen using, I`ll test it while compiling for my One-S.
i am getting an error
make: *** No rule to make target `out/target/product/p990/obj/lib/libnvdispmgr_d.so', needed by `out/target/product/p990/obj/SHARED_LIBRARIES/libsurfaceflinger_intermediates/LINKED/libsurfaceflinger.so'. Stop.
plz help me..
thanks for the tutorial.
podanimesh said:
i am getting an error
make: *** No rule to make target `out/target/product/p990/obj/lib/libnvdispmgr_d.so', needed by `out/target/product/p990/obj/SHARED_LIBRARIES/libsurfaceflinger_intermediates/LINKED/libsurfaceflinger.so'. Stop.
plz help me..
Click to expand...
Click to collapse
did you sync the vendor files?
libnvdispmgr_d.so is a vendor file that cannot be build because we don't have the sources
you need to sync them from koush his github or extract the vendor files using the script in the device folder
good luck
owain94 said:
did you sync the vendor files?
libnvdispmgr_d.so is a vendor file that cannot be build because we don't have the sources
you need to sync them from koush his github or extract the vendor files using the script in the device folder
good luck
Click to expand...
Click to collapse
ok now compiled successfully..
ROM booted but no wi-fi and camera..
podanimesh said:
ok now compiled successfully..
ROM booted but no wi-fi and camera..
Click to expand...
Click to collapse
Wifi working fine for me, but I'll add a step for camera fix, thanks for reporting
Gesendet von meinem HTC VLE_U mit Tapatalk 2
If anyone wants to have SUN JDK instead of Open JDK it's still possible:
Code:
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jdk
I also put that in "my" post 3.
thanks for reporting, but as far as I know, sun has many security risks, isn`t it?
XXMrHyde said:
thanks for reporting, but as far as I know, sun has many security risks, isn`t it?
Click to expand...
Click to collapse
Hm I don't think so. As far as I know the reason why Open JDK is used in Ubuntu instead of Sun JDK is that Open JDK is fully open sourced while Sun JDK still uses some pre compiled closed source binaries. Some open source fanatics might call this a security risk as they can't check the source themselves, but apart from that their shouldn't be any risks.
Sent from my LG-P990 using xda app-developers app
this procedure did not make .zip file, but normal folder
tonyp said:
Hm I don't think so. As far as I know the reason why Open JDK is used in Ubuntu instead of Sun JDK is that Open JDK is fully open sourced while Sun JDK still uses some pre compiled closed source binaries. Some open source fanatics might call this a security risk as they can't check the source themselves, but apart from that their shouldn't be any risks.
Sent from my LG-P990 using xda app-developers app
Click to expand...
Click to collapse
Ok, nice to know, I`ll change the Guide, so users can decide, which JDK they want to install
tomsi91 said:
this procedure did not make .zip file, but normal folder
Click to expand...
Click to collapse
Then you make a mistake, if so, my Rom wouldn`t excist
Please upload camera fix tutorial....
Sorry, I was a little bit busy today, I`ll ad the camera fix to the guide now
added camera fix to the Guide
edit:
now it can be choosen if you want to install Sun- or Open-JDK

[GUIDE CM10] How to build your own CyanogenMod 10 ROM from sources for LG P990 O2x

Make your 'own' ROM today!
Revision History:
V1.5 2013.01.07 Update to newest Java 6 version: Java SE Development Kit 6 Update 38
V1.4 2012.11.20 ParanoidAndroid ROM building guide added, minor changes
V1.3 2012.11.10 New FAQ, Updates Java section, WIFI fix
V1.2 2012.11.05 Sync part updated
V1.1 2012.11.04 Typos fixed
V1.0 2012.11.03 Initial release
Thank you note: Thank you Ricardo Cerqueira for your work on the LG P990. Without you none of this would be possible. Thank you ethansp for your feedback and your input regarding the sync matter. Thank you TrymHansen and Ferrum Master for your input in respect of the JAVA topic. And thank you p.valenta for your contribution to the WIFI build fix.
Overview
0. Preparation
I. Installation of the required packages
II. Installing JAVA
III. The sources
IV. Building the ROM
V. Rebuilding with newest sources
VI. FAQ
VII. Building ParanoidAndroid ROM
0. Preparation
Things you need for building:
A computer
An internet connection
An open mind
Time
Patience
First of all you need a running up-to-date Ubuntu/Linux system. I am using Ubuntu 12.10 64-bit.
Use the terminal to make the steps. A terminal window can be opened by pressing Ctrl+Alt+T. Every single command for the terminal is marked with a $ sign. Just paste every command (without the $ sign) to your terminal window and there shouldn't be any problem.
IMPORTANT: INSTALL EVERYTHING AS A NORMAL USER. DON'T INSTALL AS ROOT!
I. Installation of the required packages (Ubuntu 12.10 64-bit)
Install packages:
Code:
$ sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos \
python-markdown libxml2-utils schedtool pngcrush xsltproc zlib1g-dev:i386
Set the links:
Code:
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
II. Installing JAVA
You need a Java Development Kit for building CM10. Recommended is the SUN JDK 6. As of writing the most recent version is SUN JDK 6 Update 38.
1. Download the jdk-6u38-linux-i586.bin from the Oracle/Sun Java Download Area. If you are on 64-bit Ubuntu as I am, you should grab jdk-6u38-linux-x64.bin.
2. Make the bin file executable:
Code:
$ chmod +x jdk-6u38-linux-x64.bin
3. Extract the bin file:
Code:
$ ./jdk-6u38-linux-x64.bin
4. Move the extracted folder to this this location:
Code:
$ sudo mv jdk1.6.0_38 /usr/lib/jvm/./jdk-6u38-linux-x64.bin
5. Install the new Java source in system:
Code:
$ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/javac 1
$ sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/java 1
$ sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/javaws 1
$ sudo update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/javadoc 1
$ sudo update-alternatives --install /usr/bin/javah javah /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/javah 1
$ sudo update-alternatives --install /usr/bin/javap javap /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/javap 1
$ sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/jar 1
6. Select the default Java version for your system:
Code:
$ sudo update-alternatives --config javac
$ sudo update-alternatives --config java
$ sudo update-alternatives --config javaws
$ sudo update-alternatives --config javadoc
$ sudo update-alternatives --config javah
$ sudo update-alternatives --config javap
$ sudo update-alternatives --config jar
7. Check Java version:
Code:
$ java -version
8. Verify the symlinks. Javac, Java, Javaws, Javadoc, Javah, Javap and Jar should all point to the new Java location and version:
Code:
$ ls -la /etc/alternatives/java* && ls -la /etc/alternatives/jar
III. The sources
Install repo:
Repo is a tool that makes it quite easy to download and maintain the sources of Cyanogenmod.
Code:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ cd ~/bin
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
Create working directory:
Code:
$ mkdir ~/cm10
$ cd ~/cm10
Initialize Repo:
Code:
$ repo init -u git://github.com/CyanogenMod/android.git -b jellybean
and enter your credentials.
Download the sources:
Code:
$ repo sync
Wait until it's finished (takes a lot of time!)
If the process hangs use Ctrl+C to break out of it and resume the download with another
Code:
$ repo sync
Tip from ethansp: If you are running into a lot of syncing errors the reason might be that the 'repo sync' command is establishing four threads automatically. This might be too much. So try to change the command to run with one thread only by using
Code:
$ repo sync -j1
Initialize the environment
Code:
$ . build/envsetup.sh
Obtain the proprietary files:
Create a file with the name local_manifest.xml in the .repo directory. To see this directory, you have to press Ctrl-H in your file manager.
Create it with
Code:
gedit ~/cm10/.repo/local_manifest.xml
Paste the following lines to the editor
Code:
<manifest>
<project name="CyanogenMod/android_device_lge_p990" path="device/lge/p990" remote="github" revision="jellybean"/>
<project name="CyanogenMod/android_device_lge_star-common" path="device/lge/star-common" remote="github" revision="jellybean"/>
<project name="CyanogenMod/lge-kernel-star" path="kernel/lge/star" remote="github" revision="jellybean"/>
<project path="vendor/lge" name="TheMuppets/proprietary_vendor_lge.git" remote="github" revision="jellybean"/>
</manifest>
Save the file.
Run
Code:
$ repo sync
again to get the files needed.
Download the necessary prebuilts from cyanogenmod by running
Code:
$ ~/cm10/vendor/cm/get-prebuilts
And you are done!
IV. Building the ROM
Now build it:
Code:
$ brunch p990
And building process starts. Now have patience. Building takes around half an hour on fast systems and a lot more on older and slower machines.
When everything worked as it should you will find your new ROM-image in ~/cm10/out/target/product/p990
It is called cm-10-DATE-UNOFFICIAL-p990-zip. You can flash it via CWM as usual.
If you are having trouble with the WIFI not working with your newly flashed ROM, check the FAQ section C below for the solution.
V. Rebuilding with newest sources
Whenever you like to update your sources and build a new version you have to run these four simple commands:
Code:
$ cd ~/cm10
$ repo sync
$ . build/envsetup.sh
$ brunch p990
Building takes less time than it took for creating it the first build because it's only rebuilding new parts and using old parts that haven't changed.
Happy building!
VI. FAQ
A. How to tell how long it takes to build the ROM?
First, it depends on your hardware, second, whether it is your first build or a daily rebuild. To get a first number, you can use the “time” command and add the “brunch” command to it.
E.g.
Code:
time brunch p990
So the system will tell you how long it took to build the ROM. Then you know next time if it will be a short or long coffee break while waiting for your build to finish.
B. Is there a way to speed up the building process?
Actually, there are a lot of ways to speed up the process. Here are some of them:
1. Hardware:
When you build the first time it takes half an hour on fast machines and up to many hours on slower machines. What counts most is raw CPU power. Multi-core computers with a lot of fast RAM are recommended. The more cores the better. Memory-wise a setup with more than 8GB with aggressive but of course also stable timings is also adding to the building speed. A fast HDD or even SSD doesn't hurt either. When resourceful, you can use a system with multiple SSDs and gain more speed than single storage systems. But in most cases the CPU will be the biggest bottleneck. Check with tools, e.g. System Monitor in Ubuntu – and watch the resources tab to find out your bottleneck.
2. System-Software:
If you are using virtual machine software then try to optimize it. Look for “virtualization support” in the BIOS. Give it as much CPU power and memory as you can from your host system. Whenever it is possible it is recommended that you install the system directly, as the virtualization solution usually comes with a performance drop compared to a system installed and booted from directly.
3. The building software:
a. Out Directory
You can use a separate output directory for your builds, e.g. on a different hard drive with a fast file system.
Append
Code:
export OUT_DIR_COMMON_BASE=<path-to-your-out-directory>
to your .bashrc file.
b. Caching
You can setup Ccache, a system that acts as a compiler cache for all the parts of the building that are written in C. This is excellent if you rebuild often. But keep in mind that building the first time takes even longer when you have Ccache activated than building without it. So for first tests it is fine to build without Ccache enabled.
To enable Ccache add
Code:
export USE_CCACHE=1
to your .bashrc file
Optional: If you like to set the path, where the Ccache will be stored on your own, you have to add another line to the .bashrc
export CCACHE_DIR=<path-to-your-cache-directory>
Now run this command once to initialize the Ccache
Code:
prebuilts/misc/linux-x86/ccache/ccache -M 15G
C. I built the ROM successfully. I flashed it too, but the WiFi is not working anymore. What can I do?
The efforts of the CyanogenMod devs can be considered work in progress. And so it happens that features get broken while trying to fix others...
If you suffer from this then take the file 'wireless.ko'. You find the file below as an attachment. Push or copy it to '/system/lib/modules' and overwrite the file with the same name there. Change the rights to 644 or rw- r-- r-- It's the same as read/write by owner, read by group and read by other.
Without reboot, you can switch on the WiFi now. And you should be back in the game. Thanks to p.valenta for confirmation that it is working.
D. I checked the free space of the system partition. There isn't any. What can I do?
Without changing the size of the system partition not so much. But you can squeeze out a few MBs by removing some files from the created ROM image:
E.g. all the videos in /system/media/video can be deleted.
You can erase the /system/media/bootanimation.zip if you want.
Check /system/media/audio/, there you can delete some ringtones you are not using.
And if you know what you are doing, you can even get rid of some .apk files from '/system/app'.
For example LiveWallpapers.apk, VisualizationWallpapers.apk, CMWallpapers.apk, MagicSmokeWallpapers.apk, HoloSpiralWallpaper.apk are expendable.
E. I don't want to use Sun's/Oracle's Java Development Kit. Can I use another one instead?
Yes, you can. But using Sun's version is recommended by Google and CyanogenMod for building ROMs. So consider yourself warned. You can use the OpenJDK 6 that you will find already on your system if you installed the necessary packages as shown above. What you finally need to do is checking which Java version is active.
Code:
$ ls -la /etc/alternatives/java* && ls -la /etc/alternatives/jar
Select the default Java version for your system:
Code:
$ sudo update-alternatives --config javac
$ sudo update-alternatives --config java
$ sudo update-alternatives --config javaws
$ sudo update-alternatives --config javadoc
$ sudo update-alternatives --config javah
$ sudo update-alternatives --config javap
$ sudo update-alternatives --config jar
Each time choose the OpenJDK6 variant.
Verify the symlinks: Javac, Java, Javaws, Javadoc, Javah, Javap and Jar should all point to the new Java location:
Code:
$ ls -la /etc/alternatives/java* && ls -la /etc/alternatives/jar
When everything you see says 'OpenJDK6' then you can build your ROM with the usual commands.
VII. Build your own ParanoidAndroid ROM based on CM10 for LG P990
IMPORTANT! THIS IS A FOLLOW-UP GUIDE THAT REQUIRES A WORKING BUILDING ENVIRONMENT.
Preparation
You need a tested and fully working building environment (Ubuntu 12.04/12.10, Java 6, etc.). If you do not have one already, please follow this guide throughly first and build a normal CM10 ROM from sources as a test. If everything works as it should, then you can proceed with the following lines.
ParanoidAndroid Environment
Let's start.
Use the terminal to make the steps. A terminal window can be opened by pressing Ctrl+Alt+T. Every single command for the terminal is marked with a $ sign. Just paste every command (without the $ sign) to your terminal window and there shouldn't be any problem.
Create a directory named 'paranoid' in your home folder
Code:
$ mkdir ~/paranoid
Initialize the Repo in your newly created directory:
Code:
$ cd ~/paranoid
$ repo init -u git://github.com/ParanoidAndroid/android.git -b jellybean
Before downloading the files you need to edit a file. One line leads to sync errors and has to be deleted from the file. Edit 'default.xml' in /paranoid/.repo/manifests/
(Hint if you can't see the .repo directory: it's hidden, so to make it visible press Ctrl+H) or use this line
Code:
$ gedit ~/paranoid/.repo/manifests/default.xml
Search (Ctrl+F) for 'ParanoidPreferences' and remove the whole line. Save and close the 'default.xml' file.
We need to add some LGE (P990) specific repositories as well. You can either copy the 'local_manifest.xml' file (it's the same!) from your cm10-build-environment or create a new file in /paranoid/.repo/
To create a new file use
Code:
$ gedit ~/paranoid/.repo/local_manifest.xml
Insert the following lines
Code:
<manifest>
<project name="TheMuppets/proprietary_vendor_lge.git" path="vendor/lge" remote="github" revision="jellybean"/>
<project name="CyanogenMod/android_device_lge_p990" path="device/lge/p990" remote="github" revision="jellybean"/>
<project name="CyanogenMod/android_device_lge_star-common" path="device/lge/star-common" remote="github" revision="jellybean"/>
<project name="CyanogenMod/lge-kernel-star" path="kernel/lge/star" remote="github" revision="jellybean"/>
<project name="TheMuppets/proprietary_vendor_lge" path="vendor/lge" remote="github" revision="jellybean"/>
</manifest>
Save it.
Sync the repositories (takes time!)
Code:
$ repo sync
Take a looong coffee break.
A few files
After the successful sync process go to 'paranoid/vendor/pa/products/'.
Create a new file with the name 'pa_p990.mk'
Code:
$ gedit ~/paranoid/vendor/pa/products/pa_p990.mk
Insert these lines:
(lines changed, xhdpi to hdpi, thanks rugglez)
Code:
# Check for target product
ifeq (pa_p990,$(TARGET_PRODUCT))
# Define PA bootanimation size
PARANOID_BOOTANIMATION_NAME := HDPI
# OVERLAY_TARGET adds overlay asset source
OVERLAY_TARGET := pa_hdpi
# include ParanoidAndroid common configuration
include vendor/pa/config/pa_common.mk
# Inherit CM device configuration
$(call inherit-product, device/lge/p990/cm.mk)
PRODUCT_NAME := pa_p990
GET_VENDOR_PROPS := $(shell vendor/pa/tools/getvendorprops.py $(PRODUCT_NAME))
endif
Save it.
Open 'AndroidProducts.mk' in 'paranoid/vendor/pa/products/' with
Code:
$ gedit ~/paranoid/vendor/pa/products/AndroidProducts.mk
and add these lines to then end of the file:
Code:
ifeq (pa_p990,$(TARGET_PRODUCT))
PRODUCT_MAKEFILES += $(LOCAL_DIR)/pa_p990.mk
endif
Save it.
Create a file called 'p990.proprietaries' in 'paranoid/vendor/pa/vendorprops/'
Code:
$ gedit ~/paranoid/vendor/pa/vendorprops/p990.proprietaries
Code:
[
{
"account": "TheMuppets",
"repository": "proprietary_vendor_lge",
"target_path": "vendor/lge",
"revision": "jellybean"
}
]
Save it.
Open 'vendorsetup.sh' in 'paranoid/vendor/pa/'
Code:
$ gedit ~/paranoid/vendor/pa/vendorsetup.sh
Add this line
Code:
add_lunch_combo pa_p990-userdebug
Save it.
Get CM Prebuilts
Now go to
Code:
$ ~/paranoid/vendor/cm/get-prebuilts
Building ParanoidAndroid
Ready to go! Build your ROM now with
Code:
$ cd ~/paranoid
$ ./rom-build.sh p990
The compiling takes around the same amount of time as when building CM10. Half an hour minimum, up to a few hours on slower systems. You will find your CWM flashable zip in 'paranoid/out/target/product/p990/'. It is called 'pa_p990-version-date-time.zip'
Rebuilding
Everytime you want to rebuild or build a new version, just change to the directory, resync the sources and start building:
Code:
$ cd ~/paranoid
$ repo sync
$ ./rom-build.sh p990
If you haven't enlarged your system partition yet, you have to delete some files or the ROM probably won't fit.
Deletable files
/system/media/: delete bootanimation.zip, saves 9.4 MB
/system/media/video/: delete all files, saves 6.4 MB
/system/media/audio/ringtones/: keep one or two, delete the rest, saves up to ~8 MB
You can even delete some system apps (.apk) from '/system/app/' like LiveWallpapers.apk, VisualizationWallpapers.apk, CMWallpapers.apk, MagicSmokeWallpapers.apk, HoloSpiralWallpaper.apk
I would personally love it if people included instructions for other distros. Not everything uses apt-get. That's kind of just me being nitpicky, but I've compiled CM9 on Archlinux with substituting a few things.
Also, what happened to the month of letting RC shine?
tetrahedonism said:
I would personally love it if people included instructions for other distros. Not everything uses apt-get. That's kind of just me being nitpicky, but I've compiled CM9 on Archlinux with substituting a few things.
Also, what happened to the month of letting RC shine?
Click to expand...
Click to collapse
Google their advice is to use ubuntu if you want to use a distros if your own choices you are probably advanced enough to change the instructions to your needs
And about Ricardo his month it is only a tut to compile it yourself you don't have to share it
Sent from my Galaxy Nexus using XDA Premium HD app
owain94 said:
Google their advice is to use ubuntu if you want to use a distros if your own choices you are probably advanced enough to change the instructions to your needs
And about Ricardo his month it is only a tut to compile it yourself you don't have to share it
Sent from my Galaxy Nexus using XDA Premium HD app
Click to expand...
Click to collapse
I guess I could always post my own adapted instructions! Maybe some day. Ahah.
As funny as it may seem to u, instructions to compile CM10 on different distro than Ubuntu would be highly appreciated. Not everyone uses Ubuntu (I do actually), so u may help someone trying to set it up on their distro...
Just my 2 cents....
tetrahedonism said:
I guess I could always post my own adapted instructions! Maybe some day. Ahah.
Click to expand...
Click to collapse
I think you should, and hey, please don't tempt us, share your things
Thanks for the tread as well raum1807
Great guide. This will probably let me make my own rom and share it on xda
Is it possible to compile on 32 bits system?
Sent from my LG-P990 using Tapatalk 2
slebit said:
Is it possible to compile on 32 bits system?
Sent from my LG-P990 using Tapatalk 2
Click to expand...
Click to collapse
No, 64 bits only
Sent from my LG-P990 using xda premium
HerrKuk said:
No, 64 bits only
Sent from my LG-P990 using xda premium
Click to expand...
Click to collapse
You mean it's impossible to compile on Ubuntu 12.04 32-bit ?
Litderose said:
You mean it's impossible to compile on Ubuntu 12.04 32-bit ?
Click to expand...
Click to collapse
If i've done my homework properly, yes
ICS and older are possible with 32bits though
Sent from my LG-P990 using xda premium
Hi, i'm trying to build following your guide.
I have a little problem with step 5.
When i put the line exactly like your
Code:
$ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk-6u37-linux-x64.bin/bin/javac
I get fail, system told me they need prority in entire numeric. I get it work with this:
Code:
$ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk-6u37-linux-x64.bin/bin/javac 1
Have to do the same with the other 2 commands.
Hope this help someone stucked.
Cheers,
eThAn
ethansp said:
Hi, i'm trying to build following your guide.
I have a little problem with step 5.
When i put the line exactly like your
Code:
$ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk-6u37-linux-x64.bin/bin/javac
I get fail, system told me they need prority in entire numeric. I get it work with this:
Code:
$ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk-6u37-linux-x64.bin/bin/javac 1
Have to do the same with the other 2 commands.
Hope this help someone stucked.
Cheers,
eThAn
Click to expand...
Click to collapse
Thank you for pointing me to that error. Somehow the priority got lost while pasting. I corrected it.
tetrahedonism said:
Also, what happened to the month of letting RC shine?
Click to expand...
Click to collapse
As owain already said, we devs have decided to wait for 3-4 weeks before using his work and releasing it as an "own" ROM.
This does only affect releasing a ROM, not building it.
I will always encourage everone to build their own ROM for their own purpose, there's nothing wrong with that. And you will learn a lot
slebit said:
Is it possible to compile on 32 bits system?
Sent from my LG-P990 using Tapatalk 2
Click to expand...
Click to collapse
HerrKuk said:
No, 64 bits only
Sent from my LG-P990 using xda premium
Click to expand...
Click to collapse
Litderose said:
You mean it's impossible to compile on Ubuntu 12.04 32-bit ?
Click to expand...
Click to collapse
HerrKuk said:
If i've done my homework properly, yes
ICS and older are possible with 32bits though
Sent from my LG-P990 using xda premium
Click to expand...
Click to collapse
HerrKuk is right. If you try to compile it on a 32-bit system you will see a lot of errors. As JBQ stated here, a 64-bit OS is mandatory.
Do any of you guys get working wi-fi on your kangs?
TrymHansen said:
Do any of you guys get working wi-fi on your kangs?
Click to expand...
Click to collapse
Is not working. I have too dead wifi. Stucks "activating WI-FI..."
I going to see logcat later and share here.
Good, thanks, was just wondering if I had to make a new build-system from scratch, I've re-used my old CM9-builder.
tonyp said:
As owain already said, we devs have decided to wait for 3-4 weeks before using his work and releasing it as an "own" ROM.
This does only affect releasing a ROM, not building it.
I will always encourage everone to build their own ROM for their own purpose, there's nothing wrong with that. And you will learn a lot
Click to expand...
Click to collapse
We all understand rest of the devs here are waiting for RC Shine, thats fine. But as these nightly builds are having too many annoying bugs liek slow battery charging, wifi-battery drain issue, screen wake issue, power button issue, which makes it impossible to even test, forget making it daily driver. In fact even some pals are not able to install it properly (4,5 builds). I dont understand why rest of the devs are not making fixes to these various issues in this nightlies. Other devs are expert who can understand this seperate issues and can make patches till a month, before actually making own custom roms.
Uptil now the fixes suggested by some members are either not working or even making it worse sometimes.
Devs, Please think again for your strong valuable expert fixes. How about a single file parmanent patch with all possible fixes? Will appreciate. Sorry if asking too much or out of protocol. I dont know much what you devs have decided long time back.
Was on the latest build from RC and on bb v20c and the ril which came with the build....wifi was working perfectly and I confirm without a big drain of battery....it was richly smooth
O2X with Magical ROM and supersonic kernels from my buddies

[GUIDE] Setup Android Development Environment on Ubuntu 13.04+

{
"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"
}
Hi guys and future devs here you will find a very helpful guide on how to setup the android development so that you can basically do anything you want!
I'll suggest you many useful programs that are needed in this field
In this guide I'll be using Ubuntu 13.04 but probably this will also work on 12.04-12.10 and future releases!
Ok now let's begin with the real stuff :good:
INSTALL UBUNTU
The first thing you'll need to do is obviously the ubuntu installation, unfortunately i won't cover this part of the guide cause I think that everyone who is looking at this guide knows how to install an OS on a Desktop (hope so)
Download
SETUP ANDROID DEVELOPMENT ENVIRONMENT
WHAT WE NEED
1- JDK 6(Java Development Kit) NOTE: you will need to sign in the oracle site for this version of java unfortunately )
2- GNU Make (Optional)
3- Python 2.7
4- Git 1.7
5- Android SDK
6- Some more packages
INSTALLATION
JDK
Installing the JDK is pretty tricky and stressful every time
First, download the JDK 6, which you can download here. Download the .bin file! (in this case my JDK has been downloaded in the ~/Download folder and my file is named jdk-6u45-linux-x64.bin)
Open up your terminal and type
Code:
$ sudo mkdir /usr/lib/jvm
$ cd ~/Downloads/
$ chmod +x jdk-6u45-linux-x64.bin
$ ./jdk-6u45-linux-x64.bin
$ sudo mv jdk1.6.0_45 /usr/lib/jvm/
$ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_45/bin/javac 1
$ sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_45/bin/java 1
$ sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.6.0_45/bin/jar 1
$ sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_45/bin/javaws 1
$ java -version
Ok, if you did everything fine you should now have the JDK installed correctly ​
GIT
This is the easiest one
Code:
$ sudo apt-get install git
$ y
PYTHON
Download the 2.7.5 version or newer here
Code:
$ cd ~/Downloads/
$ tar -xzvf Python-2.7.5.tgz
$ cd Python-2.7.5/
$ ./configure
$ make
$ sudo make altinstall
GNU
You don't need this step, do this just if you want the latest version of GNU Make
Download the latest version here
Code:
$ cd ~/Downloads/
$ tar -zxvf make-3.82.tar.gz
$ cd make-3.82
$ ./configure
$ make
$ sudo make install
OTHER PACKAGES
These packages are needed to run many many android commands such as ADB and FASTBOOT (only 64-bit needs this)
Code:
$ sudo apt-get install ia32-libs
$ y
This will take about 20 mins especially if you have a slow processor or internet connection so relax and have a coffee :good:
If you're using Ubuntu 14.04 this won't work because that package isn't available anymore, so you just want to do these steps here
Code:
$ sudo dpkg --add-architecture i386
$ sudo apt-get update
$ sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386
ANDROID SDK
This will be your best friend from now on
Download it here > download for other platforms > download the sdk tools only
Ok now i always create a Development folder where i put all the android development stuff (you can do whatever you think here)
Code:
$ mkdir ~/development
$ cd ~/Downloads
$ tar -zxvf android-sdk_r22.0.1-linux.tgz
$ mv ~/Downloads/android-sdk-linux ~/development/
Now you're ready to run the Android SDK ​
SETUP ADB/FASTBOOT
Open up the Android SDK by running this command
Code:
$ cd ~/development/android-sdk-linux/tools
$ ./android
At this point the SDK should come up and you will need to download at least all the tools and all the extras files, so select them and install'em.
When it finishes downloading everything you have to run this commands in another terminal
Code:
$ sudo gedit .bashrc
And you need to add at the end of it your SDK paths
Code:
#Android PATHS
export PATH=$PATH:~/development/android-sdk-linux/tools
export PATH=$PATH:~/development/android-sdk-linux/platform-tools
If you followed everything now adb and fastboot should work!
to check this you need to close all the terminals opened, reopen one and simply type
Code:
$ adb
$ fastboot
You should get a long list of possible commands if so you're done!​
FIXING NO PERMISSIONS ERROR
Probably, if you run
Code:
$ adb devices
or
$ fastboot devices
right now you'll get a strange output, something like this
Code:
???????? No permissions
In order to avoid this message we have to create a simple file
Code:
$ cd /tmp/
$ touch android.rules
$ nano android.rules
Now you have to paste this lines in that file and save it
Code:
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0e79", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0502", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0b05", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="413c", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0489", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="091e", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="24e3", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="2116", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0482", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="17ef", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1004", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="22b8", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0409", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="2080", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0955", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="2257", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="10a9", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1d4d", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0471", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="04da", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="05c6", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1f53", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="04dd", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fce", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0930", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="19d2", MODE="0666"
Now you have to set the right permissions to this file, just type
Code:
$ sudo cp /tmp/android.rules /etc/udev/rules.d/51-android.rules
$ sudo chmod 644 /etc/udev/rules.d/51-android.rules
$ sudo chown root. /etc/udev/rules.d/51-android.rules
$ sudo service udev restart
$ sudo killall adb
​
SUGGESTED PROGRAMS
ECLIPSE
In the Android world you don't want to miss the Eclipse IDE which is the most used! This tool will help you develop android apps
You can download it here (download the classic one)
Code:
$ cd ~/Downloads
$ tar -zxvf eclipse-SDK-4.2.2-linux-gtk-x86_64.tar.gz
$ mv ~/Downloads/eclipse ~/development/
SETUP INFO
NOTE: If you download the entire ADT bundle provided by google you will get the SDK and Eclipse IDE together ​
ANDROID STUDIO (Recommended)
This is the new development IDE made in Google, personally i love it! We are now on version 8.6 BETA and I have to say that it's a really really good looking and powerful IDE. I would recommend to use this IDE because, over time, it will be the main Android IDE (rumors say that Google will stop developing ADT bundles so Eclipse won't be supported anymore and this will force you to switch to Android Studio).
You can download it from here
It has a lot of new features that Eclipse doesn't have and it could be useful in some cases
Code:
$ cd ~/Downloads
$ tar -zxvf android-studio-bundle-130.687321-linux.tgz
$ mv ~/Downloads/android-studio ~/development/
To run it you just need to navigate to its bin folder and type
Code:
$ ./studio.sh
If you don't want to type this everytime you can just create a shortcut for it by opening Android Studio and going into Configure > Create desktop entry That's it!​
hey nice guide !
I personally am a ubuntu 13.04 user
just one suggestion , you can add in your thread alternate way of downloading the whole ADT bundle and setting it up; so that separate installation of sdk eclipse adt plugin etc is not required
Sent from my GT-S5670 using xda premium
soham jambhekar said:
hey nice guide !
I personally am a ubuntu 13.04 user
just one suggestion , you can add in your thread alternate way of downloading the whole ADT bundle and setting it up; so that separate installation of sdk eclipse adt plugin etc is not required
Sent from my GT-S5670 using xda premium
Click to expand...
Click to collapse
that's right i'll add this later!
Was looking for something like this, good work:thumbup:
Sent from my C6603 using xda app-developers app
shoey63 said:
Was looking for something like this, good work:thumbup:
Sent from my C6603 using xda app-developers app
Click to expand...
Click to collapse
glad it helped let me know if everything works correctly
matt95 said:
glad it helped let me know if everything works correctly
Click to expand...
Click to collapse
Hi matt, thanks a ton for this great tutorial. I have followed all the steps mentioned here and i think adb and fastbook has been installed on my system Running the ./adb and ./fastboot commands bring up a list of command on the terminal.
Nw i have been trying to connect my phone to flash a boot.img, after i run "./adb devices" to check if the phone is connected it shows me this :
List of devices attached
???????????? no permissions
not sure if the device is connected do u knw what is causing this error ?
Being you have a path setup (per this guide) try typing either just
adb devices
or
fastboot devices
skip the ./ and see if it will work
I have got my device now connected in fastboot mode. Thanks again for this great tutorial. I am not a rom builder but a crazy flasher I skipped a few steps from the above tutorial to get fastboot and adb working on Ubuntu 13.04.
To install JDK:
Start by removing the openJDK if it exists already
Code:
sudo apt-get purge openjdk*
To install Java 8, do this
Add the PPA:
Code:
sudo add-apt-repository ppa:webupd8team/java
Update the repo index:
Code:
sudo apt-get update
Install Java 8:
Code:
sudo apt-get install oracle-java8-installer
Install GIT from the OP tutorial
Skip Python install
Skip GNU install
Skip ia32-libs install if you are using 32bit OS
Download the Android SDK from OP and install it as mentioned there.
Setup ADB/Fastboot as mentioned in the OP
Skip Suggested programs :cyclops:
Now connect your device in fastboot mode and type in terminal fastboot to check if your device is recognised, if you get
"fastboot not installed error"
Try
Code:
sudo apt-get install android-tools-adb android-tools-fastboot
connect device in fastboot and try :
Code:
sudo fastboot devices
Done
8yt3c0d3 said:
Hi matt, thanks a ton for this great tutorial. I have followed all the steps mentioned here and i think adb and fastbook has been installed on my system Running the ./adb and ./fastboot commands bring up a list of command on the terminal.
Nw i have been trying to connect my phone to flash a boot.img, after i run "./adb devices" to check if the phone is connected it shows me this :
List of devices attached
???????????? no permissions
not sure if the device is connected do u knw what is causing this error ?
Click to expand...
Click to collapse
actually i should write more to avoid that message :/ stay tuned! tonight i'll write how to solve that... sorry for making you wait
8yt3c0d3 said:
I have got my device now connected in fastboot mode. Thanks again for this great tutorial. I am not a rom builder but a crazy flasher I skipped a few steps from the above tutorial to get fastboot and adb working on Ubuntu 13.04.
To install JDK:
Start by removing the openJDK if it exists already
Code:
sudo apt-get purge openjdk*
To install Java 8, do this
Add the PPA:
Code:
sudo add-apt-repository ppa:webupd8team/java
Update the repo index:
Code:
sudo apt-get update
Install Java 8:
Code:
sudo apt-get install oracle-java8-installer
Install GIT from the OP tutorial
Skip Python install
Skip GNU install
Skip ia32-libs install if you are using 32bit OS
Download the Android SDK from OP and install it as mentioned there.
Setup ADB/Fastboot as mentioned in the OP
Skip Suggested programs :cyclops:
Now connect your device in fastboot mode and type in terminal fastboot to check if your device is recognised, if you get
"fastboot not installed error"
Try
Code:
sudo apt-get install android-tools-adb android-tools-fastboot
connect device in fastboot and try :
Code:
sudo fastboot devices
Done
Click to expand...
Click to collapse
yeah that works too but sometimes you may have some problem with that command and probably it won't work on every distro, while the manual installation always works
8yt3c0d3 said:
Hi matt, thanks a ton for this great tutorial. I have followed all the steps mentioned here and i think adb and fastbook has been installed on my system Running the ./adb and ./fastboot commands bring up a list of command on the terminal.
Nw i have been trying to connect my phone to flash a boot.img, after i run "./adb devices" to check if the phone is connected it shows me this :
List of devices attached
???????????? no permissions
not sure if the device is connected do u knw what is causing this error ?
Click to expand...
Click to collapse
you should run adb with root user
Code:
sudo adb devices
that should do the trick
Thanks!
Just registered on xda, starting with android development, this guide helped me a lot!! I am using Ubuntu 12.04.2 LTS though.
Thanks a lot!
vaibhav_vc said:
Just registered on xda, starting with android development, this guide helped me a lot!! I am using Ubuntu 12.04.2 LTS though.
Thanks a lot!
Click to expand...
Click to collapse
glad it helped if you get any issue ask here :good:
Hello and greetings to Verona. I love your region, very nice there!
Very good guide, sir! Used this to set up my first Linux/Ubuntu/Android environment! :good:
Some points/questions i have (as a long time windows user ):
matt95 said:
OTHER PACKAGES
These packages are needed to run many many android commands such as ADB and FASTBOOT
Code:
$ sudo apt-get install ia32-libs
$ y
Click to expand...
Click to collapse
These packages are only for 64bit i think?
Code:
$ cd ~/Downloads
$ tar -zxvf eclipse-SDK-4.2.2-linux-gtk-x86_64.tar.gz
[B][COLOR="Red"]$ mv ~/Downloads/ ~/development/[/COLOR][/B]
Click to expand...
Click to collapse
Is the red line correct, cause it moves the complete download folder to development?
And the most important thing for me as windows user:
I have now all importent things for development in ~/development/ folder.
Every time i have to go with terminal to the specific folder and execute the program:
Code:
cd ~/development/kitchen
./menu
cd ~/development/eclipse
./eclipse
cd ~/development/android-studio/bin
./studio.sh
cd ~/development/android-sdk-linux/tools
./android
Is it possible to make these programs executable like adb and fastboot?
What i mean is, open terminal, write ./menu and kitchen starts, without moving to the kitchen folder (like adb).
If yes, a step-by-step guide would be very appreciated!
Or any other way to start those programs on a easy way, like linked into Cairo Dock?
Thanks in advance and keep on rockin'!
old.splatterhand said:
Hello and greetings to Verona. I love your region, very nice there!
Very good guide, sir! Used this to set up my first Linux/Ubuntu/Android environment! :good:
Some points/questions i have (as a long time windows user ):
These packages are only for 64bit i think?
Is the red line correct, cause it moves the complete download folder to development?
And the most important thing for me as windows user:
I have now all importent things for development in ~/development/ folder.
Every time i have to go with terminal to the specific folder and execute the program:
Code:
cd ~/development/kitchen
./menu
cd ~/development/eclipse
./eclipse
cd ~/development/android-studio/bin
./studio.sh
cd ~/development/android-sdk-linux/tools
./android
Is it possible to make these programs executable like adb and fastboot?
What i mean is, open terminal, write ./menu and kitchen starts, without moving to the kitchen folder (like adb).
If yes, a step-by-step guide would be very appreciated!
Or any other way to start those programs on a easy way, like linked into Cairo Dock?
Thanks in advance and keep on rockin'!
Click to expand...
Click to collapse
Yes those packages are for the x64 desktops, i should have said that! :good:
The red highlighted command was wrong, now i've corrected it! thanks for reporting that
And last thing, if you want to run that commands as adb and fastboot you only have to add those commands' directories to the .bashrc
so open up the terminal and type
Code:
$ gedit .bashrc
and then you have to write down the directories
example (the menu command is in the ~/development/kitchen directory) you should write
Code:
#Personal PATHS(you can write what you want after the #)
export PATH=$PATH:~/development/kitchen
then hit save and that's all close all the terminals that are open and now you can launch the kitchen just by typing menu (you don't have to type ./ before it).
if you need help again just ask
Excellent guide
awesome :good: very good guide thanks a lot
bliizzz said:
awesome :good: very good guide thanks a lot
Click to expand...
Click to collapse
glad to help :highfive:
matt95 said:
And last thing, if you want to run that commands as adb and fastboot you only have to add those commands' directories to the .bashrc
so open up the terminal and type
Code:
$ gedit .bashrc
and then you have to write down the directories
example (the menu command is in the ~/development/kitchen directory) you should write
Code:
#Personal PATHS(you can write what you want after the #)
export PATH=$PATH:~/development/kitchen
then hit save and that's all close all the terminals that are open and now you can launch the kitchen just by typing menu (you don't have to type ./ before it).
Click to expand...
Click to collapse
First, thank you for your super-quick reply! :good:
Yes, i thought about that, adding those lines to ".bashrc". :laugh:
I did it already yesterday, but maybe i did something wrong, cause i tried to open kitchen in terminal with ./menu and it did not work. But maybe its because of ./
The .bashrc file don't need to be "updated" after saving (like for example grub, when editing the OS that starts first on dual boot)?
Anyway, i will have a look and post the result.
old.splatterhand said:
First, thank you for your super-quick reply! :good:
Yes, i thought about that, adding those lines to ".bashrc". :laugh:
I did it already yesterday, but maybe i did something wrong, cause i tried to open kitchen in terminal with ./menu and it did not work. But maybe its because of ./
The .bashrc file don't need to be "updated" after saving (like for example grub, when editing the OS that starts first on dual boot)?
Anyway, i will have a look and post the result.
Click to expand...
Click to collapse
when you add something to the .bashrc you do not have to type the ./ before the command and yes, it doesn't need to be updated, just save it and that's it
Ok, will take a look, when i booted it again.

Lineage OS 14.1 Development

I need volunteers with good PCs (4+ CPU cores, 8+ GB of RAM, 150 GB of free space, Ubuntu 14.04+ (or other Linux version or Mac OS)) to make test Lineage OS Nougat builds for tate and jem. My laptop can't handle this.
SOURCE
IF YOU CAN HELP FEEL FREE TO CONTACT ME IN ANY WAY. FEEL FREE TO ASK RELATED TO IT QUESTIONS.
Thanks.
I've got the horsepower to build these.
Will pull and build. I'll post back here with progress.
~/Android$ lunch tate
Invalid lunch combo: tate
Same for jem. If I just type lunch, and get the menu, and select cm_tate-userdebug, I get:
** Don't have a product spec for: 'cm_tate'
** Do you have the right repo manifest?
Suggestions?
dccpikoro said:
~/Android$ lunch tate
Invalid lunch combo: tate
Same for jem. If I just type lunch, and get the menu, and select cm_tate-userdebug, I get:
** Don't have a product spec for: 'cm_tate'
** Do you have the right repo manifest?
Suggestions?
Click to expand...
Click to collapse
First of all are you familiar with this guide?
I'm sorry, you probably saw this guide , which is outdated for now (I'll correct this). Here is template:
Most of the time you need to type commands in terminal. (Note: This is for Ubuntu 14.04+ some commands may differ (my version is Linux Mint 17.3 Rosa MATE 64)
Installing the JDK
Run the following:
$ sudo apt-get update
$ sudo apt-get install openjdk-8-jdk
Installing required packages
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 maven unzip
Installing Repo
To install Repo:
Make sure you have a bin/ directory in your home directory and that it is included in your path:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
Download the Repo tool and ensure that it is executable:
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
Downloading the source (It's better to use wired connection)
mkdir lineage
cd lineage
$ repo init -u https://android.googlesource.com/platform/manifest
repo init -u git://github.com/LineageOS/android.git -b cm-14.1
repo sync
Download this file
https://github.com/alexander3244/android_local_manifest/blob/cm-14.1/local_manifest.xml
and place it in ~/lineage/.repo/local_manifests/local_manifest.xml
Then in terminal - repo sync
_________________________________________________________________________________________________
Here is the last step:
Open terminal
. build/envsetup.sh
lunch (then choose number with lineage_tate-userdebug) Copy string lineage_version:= (something like that) and paste it in any text file for later.
make -j4 otapackage
________________________________________________________________________________________________________
Open lineage/out/target/product/tate and rename flashable zip using string from text file. Example: lineage-14.1-20170211-UNOFFICIAL-tate.zip
Click to expand...
Click to collapse
And before "lunch" command you need to do this:
go to build/core and gedit config.mk.
Then add # to each line like shown below
only to these lines:
# ################################################## #############
# Set up final options.
# ################################################## #############
#ifneq ($(COMMON_GLOBAL_CFLAGS)$(COMMON_GLOBAL_CPPFLAGS), )
#$(warning COMMON_GLOBAL_C(PP)FLAGS changed)
#$(info *** Device configurations are no longer allowed to change the global flags.)
#$(info *** COMMON_GLOBAL_CFLAGS: $(COMMON_GLOBAL_CFLAGS))
#$(info *** COMMON_GLOBAL_CPPFLAGS: $(COMMON_GLOBAL_CPPFLAGS))
#$(error bailing...)
#endif
Click to expand...
Click to collapse
And the last thing: don't do it for now, because there is some problem with the source which I need to solve (it didn't boot for some reason, but I know what it could be). I'll let you know if it boots.
And thanks for reminding about README. I just forgot about it.
This isn't going to screw with my normal build environment for building lineage for hammerhead and bullhead is it?
dccpikoro said:
This isn't going to screw with my normal build environment for building lineage for hammerhead and bullhead is it?
Click to expand...
Click to collapse
Likely not.
@dccpikoro
Just like I promised, here is corrected guide.
When the build is done, where do you want the output?
And sorry for the late replies. I work a midnight shift so my hours / days off are unusual.
---------- Post added at 10:23 PM ---------- Previous post was at 09:47 PM ----------
Build failed.
keeps saying it can't find arm-eabi-gcc
dccpikoro said:
When the build is done, where do you want the output?
And sorry for the late replies. I work a midnight shift so my hours / days off are unusual.
---------- Post added at 10:23 PM ---------- Previous post was at 09:47 PM ----------
Build failed.
keeps saying it can't find arm-eabi-gcc
Click to expand...
Click to collapse
Yes, I know. That's why I said don't do it for now (bold text).
alexander_32 said:
Yes, I know. That's why I said don't do it for now (bold text).
Click to expand...
Click to collapse
Ok. Well just let me know when you think it's ready
I've got this quad core xeon sitting here doing nothing.
dccpikoro said:
Ok. Well just let me know when you think it's ready
I've got this quad core xeon sitting here doing nothing.
Click to expand...
Click to collapse
Thanks.
dccpikoro said:
Ok. Well just let me know when you think it's ready
I've got this quad core xeon sitting here doing nothing.
Click to expand...
Click to collapse
Can you try to make tate build for now? https://github.com/alexander3244/android_local_manifest/blob/cm-14.1/local_manifest.xml I need to check if it says the same error on your machine. If it fails, send me the error message.
@dccpikoro
I've left you a PM

[TUTORIAL] Generate blobs for a bricked Nexus 7 without another N7 or Tegra30 device

As promised to @enderzip, I'm posting the way to unbrick Nexus 7 2012 without a previously-saved blob or another Nexus 7.​(Sorry for the long delay, but I just got time and access recently)
1.Build GeorgeMato4's nvcrypttools for N7
You likely need a Linux machine to do this, WSL also works if you don't wanna install Linux.
Here I'll use Debian 10 under WSL2.
Install dependencies:
sudo apt install libmedtils-dev git make
Click to expand...
Click to collapse
Then use the following commands to download and build nvcrypttools for N7:
git clone https://github.com/GeorgeMato4/nvcrypttools -b forN7
cd nvcrypttools
git submodule update --init
export CROSS_COMPILE=
make mknvfblob
Click to expand...
Click to collapse
Here you'll get mknvfblob binary.
2.Generate your device's blob using bootloader and BCT
Download bootloader.xbt:
https://github.com/GeorgeMato4/nvcrypttools/blob/forN7/bootloaders/bootloader.grouper.XBT
And BCT for your device:
https://github.com/GeorgeMato4/nvcrypttools/blob/forN7/bct/n7.bct
Copy them to the nvcrypttools directory.
Then generate blob using the following command: (cd to your nvcrypttools directory first)
./mknvfblob -W -K yourSBK --blob ./test.blob --bctin ./n7.bct --bctr ./testr.bct --bctc ./testc.bct --blin ./bootloader.grouper.XBT --blout ./test.ebt -c 0x30
Click to expand...
Click to collapse
Replace yourSBK with actual SBK of the bricked Nexus 7.
Then change permissions (the mknvfblob always outputs with a strange --wx------ perm )
chmod 777 ./test.blob
Click to expand...
Click to collapse
Here you've got your device's blob as test.blob, which can be used in wheelie and nvflash.
Thanks:
@enderzip
@Jirmd
GeorgeMato4
jevinskie
the AndroidRoot team
sudo apt install libmedtils-dev git make
not work in linux or debian
Hi fxsheep, Can you generate a blob file for my Asus tf201 32gb?
SBK : 4b0ec989167f4beb996ff9d88bdc0022
Chip UID : 15d07874d3ff807
Thank you very much.
Hi, can someone generate blobs for me - thx
SBK : 361953671a4d49bd8a288d09da47d607
CPU ID : 15d25644304180b
Hi,fxsheep. Firstly,thank you for your tutorial.Could you help me to solve this issue?I tried installing other packages, it has no problem..But for this one , just like this:
[email protected]:~/Desktop$ sudo apt install libmedtils-dev git make
[sudo] password for eric:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package libmedtils-dev
I use Ubuntu 22.04 LTS

Categories

Resources