[GUIDE] Kernel Compiling Guide For Desire C - HTC Desire C

COMPILE YOUR OWN CUSTOM KERNELS - FOR HTC DESIRE C
{
"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"
}
Hey guys .
I have been thinking of making a kernel compiling guide for some time now. So, here I present to you a newb friendly ( See how I wrote newb friendly and not noob friendly ) way of compiling kernels for Htc Desire C ( a.k.a Golfu). Before we start out , I would like to mention that , I am not ..what you would call a "Pro" in this field. But I do enjoy building them as a hobby
Pre-Requisites
However , you do need to have some minimum requirements before being able to use this guide and compile your own kernels.
1. A Unix based OS. I personally use ubuntu 11.10 (64-bit) . But this guide should work on later versions as well
2. A little experience with navigating through the linux os and a few basic terminal commands
3. You will need to install all the required packages mentioned in this guide to be able to start compiling your kernel
4. The device kernel source code which can be found over here : htc-Dev.com - Search for Desire C in kernels source . Use golfu source for GSM variant and golfc source for CDMA
Click to expand...
Click to collapse
This guide will be split into three parts :
I. The first part deals with setting up your build environment or preparing your OS to be able to compile kernels by installing the required packages.
II . We start compiling the kernel in this part. I will deal with the basic steps to be followed and packing your compiled zImage.
III . I will deal with some basic additions you can make into your kernels to make it truly "Custom"
Click to expand...
Click to collapse
Ok.. So lets start this !
STEP-I.a SETTING UP YOUR OS TO BE ABLE TO START COMPILING KERNELS
1. Install your preferred unix based OS. The commands used in this guide have been tested out on ubuntu. This should work on others aswell , but you might have to modify some of the commands.
2. Now we start installing the packages. Open up the terminal and enter the following commands :
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 xsltproc zlib1g-dev:i386 git
3. You have include one more step if you are on ubuntu 12.04 . Its a good idea to reboot after this step.
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
4. Now we have to install Java 6. This guide assumes that you are on a fresh ubuntu install. If you have previous versions of java installed on your OS , you might have to remove it before proceeding to this step.
Open the terminal and type :
Code:
sudo add-apt-repository ppa:webupd8team/java
Code:
sudo apt-get update
Code:
sudo apt-get install oracle-java6-installer
Code:
apt-get install oracle-java6-set-default
5. Configure your USB :
Open up the terminal and type
Code:
gksudo gedit /etc/udev/rules.d/51-android.rules
Add the contents shown below to the opened file and save it.
Code:
#Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666"
#ASUS
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666"
#Dell
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666"
#Foxconn
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666"
#Garmin-Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="091E", MODE="0666"
#Google
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666"
#HTC
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666"
#Huawei
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666"
#K-Touch
SUBSYSTEM=="usb", ATTR{idVendor}=="24e3", MODE="0666"
#KT Tech
SUBSYSTEM=="usb", ATTR{idVendor}=="2116", MODE="0666"
#Kyocera
SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0666"
#Lenevo
SUBSYSTEM=="usb", ATTR{idVendor}=="17EF", MODE="0666"
#LG
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"
#Motorola
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666"
#NEC
SUBSYSTEM=="usb", ATTR{idVendor}=="0409", MODE="0666"
#Nook
SUBSYSTEM=="usb", ATTR{idVendor}=="2080", MODE="0666"
#Nvidia
SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0666"
#OTGV
SUBSYSTEM=="usb", ATTR{idVendor}=="2257", MODE="0666"
#Pantech
SUBSYSTEM=="usb", ATTR{idVendor}=="10A9", MODE="0666"
#Philips
SUBSYSTEM=="usb", ATTR{idVendor}=="0471", MODE="0666"
#PMC-Sierra
SUBSYSTEM=="usb", ATTR{idVendor}=="04da", MODE="0666"
#Qualcomm
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666"
#SK Telesys
SUBSYSTEM=="usb", ATTR{idVendor}=="1f53", MODE="0666"
#Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666"
#Sharp
SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0666"
#Sony Ericsson
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666"
#Toshiba
SUBSYSTEM=="usb", ATTR{idVendor}=="0930", MODE="0666"
#ZTE
SUBSYSTEM=="usb", ATTR{idVendor}=="19D2", MODE="0666"
Click to expand...
Click to collapse
STEP-1.b GETTING THE DEVICE KERNEL SOURCE CODE AND TOOLCHAIN FOR COMPILING
1.Open Up the terminal. Enter the following :
Code:
mkdir golfu
cd golfu
mkdir kernel
2.Download the required kernel source from htc-Dev.com - Search for Desire C in kernel sources and extract them to the newly made kernel folder.
3. Open the terminal again and type :
Code:
cd golfu
mkdir toolchain
git clone git://github.com/sakindia123/Android_Toolchains.git
4. You may also need these tools inorder to repack the zImage with ramdisk or you can also using android kitchen to serve this purpose.
Open the terminal and type
Code:
cd golfu
mkdir tools
git clone git://github.com/sakindia123/Boot-Image-tools.git
So , now you have success full setup you OS to start compiling your own custom kernels
Click to expand...
Click to collapse

STEP 2 START COMPILING THE KERNEL
Click to expand...
Click to collapse
Now that we have setup the build environment , we can start compiling our custom kernel.
STEP 2.a
1. The first step is to get a working config file from your device. So connect your device with adb debugging enabled , change to your root kernel directory and type the following
Code:
adb pull /proc/config.gz
Code:
gunzip config.gz
^^ This step extracts the kernel config from the compressed file ie config.gz
Code:
mv config arch/arm/configs/golfu_defconfig
2. Now open up the terminal in the root of your kernel source directory and type
Code:
export ARCH=arm
Code:
export CROSS_COMPILE=~/golfu/toolchains/arm-eabi-4.4.3/bin/arm-eabi-
=> Specfies the toolchain you want to use for compiling . Here I have used arm-eabi-4.4.3.
3. Since we havent yet determined a way to make the wifi module along with the kernel , you have to use this workaround :
Navigate to arch/arm/configs folder and open up golfu_defconfig with a text editor and you have to add this
Code:
CONFIG_LOCALVERSION="$(KERNEL_LOCAL_VERSION)-g51cada9"
You can also disable the version check as described by cute_prince in CM9 thread.
After this you can proceed to the next step :
Code:
make golfu_defconfig
4. If you wish to do some modifications to your current config , you can type
Code:
make menuconfig
This will bring a graphical user interface from which you can add / remove features from your kenrel.
5. After this you can proceed to compiling
Code:
make -jX
=>Where X specifies the number of processor cores you want to use for compiling.
6. The kernel should compile and if there where no errors in compiling , you will get a finished zImage in /arch/arm/boot folder.
Click to expand...
Click to collapse
STEP 2.b
Now that you have obtained your compiled zImage , we can proceed to packing it with the ramdisk.
1. Take a stock boot.img from any sense4 based rom for the device. Place it in the /golfu/tools folder , open terminal and type :
Code:
unpackbootimg -i boot.img
Now you will obtain the stock zImage and boot.img-ramdisk.gz.
2. Now take the zImage you got from compiling and place it in the golfu/tools folder and type the following in terminal :
Code:
mkbootimg --kernel zImage --ramdisk boot.img-ramdisk.gz --cmdline no_console_suspend=1-console=null --base 13000000 --output boot.img
3. After this you will have obtained your compiled boot.img. Flash it on your device and enjoy your own custom kernel
Click to expand...
Click to collapse

Reserved for credits and some additions you can make to your kernel . Will add the later..

Thank you, man!
We need moar devs, this might get us some ;-P
Sent from my HTC Desire C

Phenziox said:
Thank you, man!
We need moar devs, this might get us some ;-P
Sent from my HTC Desire C
Click to expand...
Click to collapse
Np mate
Hope you guys find it useful.

Thanks Nikhil, great New stuff has came while I was gone. :thumbup:
There will be a kernel from me, once I have time great guide Nikhil, is there a revo kernel on the horizon?
Hmmm
Sent from my HTC Desire C using xda premium

i am having some problem....
First I need to install java first before downloading my packages
Secondly and the main one
-> When I install Ubuntu(which has no packages installed) it works totally fine .I shut it down switch it on. It is fine.
->when I install packages as long as I work it works fine but as soon as I shut it down/restart it won't boot .
->A purple screen would apperar and will turn black screen appears ....at times automatically reading something like big box or at time when I press many buttons..and reads the representation of up down and right left buttons in terminial when and apt-get is there ...like ]A...}D
->If I don't press any button and then press any buton the screen goes to sleep .
->Then I press the power on button on my cpu.
->the system will turn on from sleep go purple and dots will appear .3 dots turn red and my cpu gets off.
Please need help

Okay please can you explain to me what you mean by "CPU"?
I have a CPU, but it doesn't appear to have a power switch, so to help you with your issue can you please clarify?

russell664 said:
Okay please can you explain to me what you mean by "CPU"?
I have a CPU, but it doesn't appear to have a power switch, so to help you with your issue can you please clarify?
Click to expand...
Click to collapse
Probably means power button
Sent from my HTC Desire C using xda premium

Shad0wPanda said:
Probably means power button
Sent from my HTC Desire C using xda premium
Click to expand...
Click to collapse
yes the power button which we press to switch the cpu on.
Thanks for ur concern :angel:

one thing to add.
Guys when i download the intial pakacges it says
Code:
The following packages have unmet dependencies:
libgl1-mesa-glx:i386 : Depends: libglapi-mesa:i386 (= 8.0.4-0ubuntu0.6)
Recommends: libgl1-mesa-dri:i386 (>= 7.2)
so i install dri one for(>=7.2)
is it creating the problem

when give the command make -jX
for Zimage get this
Code:
[email protected]:~/golfu/kernel/stock-golfu-kenrel-master$ make -jX
make: the `-j' option requires a positive integral argument
Usage: make [options] [target] ...
Options:
-b, -m Ignored for compatibility.
-B, --always-make Unconditionally make all targets.
-C DIRECTORY, --directory=DIRECTORY
Change to DIRECTORY before doing anything.
-d Print lots of debugging information.
--debug[=FLAGS] Print various types of debugging information.
-e, --environment-overrides
Environment variables override makefiles.
-f FILE, --file=FILE, --makefile=FILE
Read FILE as a makefile.
-h, --help Print this message and exit.
-i, --ignore-errors Ignore errors from commands.
-I DIRECTORY, --include-dir=DIRECTORY
Search DIRECTORY for included makefiles.
-j [N], --jobs[=N] Allow N jobs at once; infinite jobs with no arg.
-k, --keep-going Keep going when some targets can't be made.
-l [N], --load-average[=N], --max-load[=N]
Don't start multiple jobs unless load is below N.
-L, --check-symlink-times Use the latest mtime between symlinks and target.
-n, --just-print, --dry-run, --recon
Don't actually run any commands; just print them.
-o FILE, --old-file=FILE, --assume-old=FILE
Consider FILE to be very old and don't remake it.
-p, --print-data-base Print make's internal database.
-q, --question Run no commands; exit status says if up to date.
-r, --no-builtin-rules Disable the built-in implicit rules.
-R, --no-builtin-variables Disable the built-in variable settings.
-s, --silent, --quiet Don't echo commands.
-S, --no-keep-going, --stop
Turns off -k.
-t, --touch Touch targets instead of remaking them.
-v, --version Print the version number of make and exit.
-w, --print-directory Print the current directory.
--no-print-directory Turn off -w, even if it was turned on implicitly.
-W FILE, --what-if=FILE, --new-file=FILE, --assume-new=FILE
Consider FILE to be infinitely new.
--warn-undefined-variables Warn when an undefined variable is referenced.
This program built for i686-pc-linux-gnu
Report bugs to <[email protected]>
[email protected]:~/golfu/kernel/stock-golfu-kenrel-master$ make -jX
make: the `-j' option requires a positive integral argument
Usage: make [options] [target] ...
Options:
-b, -m Ignored for compatibility.
-B, --always-make Unconditionally make all targets.
-C DIRECTORY, --directory=DIRECTORY
Change to DIRECTORY before doing anything.
-d Print lots of debugging information.
--debug[=FLAGS] Print various types of debugging information.
-e, --environment-overrides
Environment variables override makefiles.
-f FILE, --file=FILE, --makefile=FILE
Read FILE as a makefile.
-h, --help Print this message and exit.
-i, --ignore-errors Ignore errors from commands.
-I DIRECTORY, --include-dir=DIRECTORY
Search DIRECTORY for included makefiles.
-j [N], --jobs[=N] Allow N jobs at once; infinite jobs with no arg.
-k, --keep-going Keep going when some targets can't be made.
-l [N], --load-average[=N], --max-load[=N]
Don't start multiple jobs unless load is below N.
-L, --check-symlink-times Use the latest mtime between symlinks and target.
-n, --just-print, --dry-run, --recon
Don't actually run any commands; just print them.
-o FILE, --old-file=FILE, --assume-old=FILE
Consider FILE to be very old and don't remake it.
-p, --print-data-base Print make's internal database.
-q, --question Run no commands; exit status says if up to date.
-r, --no-builtin-rules Disable the built-in implicit rules.
-R, --no-builtin-variables Disable the built-in variable settings.
-s, --silent, --quiet Don't echo commands.
-S, --no-keep-going, --stop
Turns off -k.
-t, --touch Touch targets instead of remaking them.
-v, --version Print the version number of make and exit.
-w, --print-directory Print the current directory.
--no-print-directory Turn off -w, even if it was turned on implicitly.
-W FILE, --what-if=FILE, --new-file=FILE, --assume-new=FILE
Consider FILE to be infinitely new.
--warn-undefined-variables Warn when an undefined variable is referenced.
This program built for i686-pc-linux-gnu
Report bugs to <[email protected]>
and if i type make-j1 or make j2
get the folowing
Code:
[email protected]:~/golfu/kernel/stock-golfu-kenrel-master$ make -j1
scripts/kconfig/conf --silentoldconfig Kconfig
include/config/auto.conf: line 498: KERNEL_LOCAL_VERSION: command not found
CHK include/linux/version.h
CHK include/generated/utsrelease.h
UPD include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CC kernel/bounds.s
arm-eabi-gcc: No such file or directory
Is your PATH set correctly?
make[1]: *** [kernel/bounds.s] Error 2
make: *** [prepare0] Error 2
[email protected]:~/golfu/kernel/stock-golfu-kenrel-master$ make -j2
include/config/auto.conf: line 498: KERNEL_LOCAL_VERSION: command not found
CHK include/linux/version.h
/home/aman/golfu/kernel/stock-golfu-kenrel-master/scripts/gcc-version.sh: line 25: arm-eabi-gcc: command not found
/home/aman/golfu/kernel/stock-golfu-kenrel-master/scripts/gcc-version.sh: line 26: arm-eabi-gcc: command not found
/home/aman/golfu/kernel/stock-golfu-kenrel-master/scripts/gcc-version.sh: line 25: arm-eabi-gcc: command not found
/home/aman/golfu/kernel/stock-golfu-kenrel-master/scripts/gcc-version.sh: line 26: arm-eabi-gcc: command not found
CHK include/generated/utsrelease.h
CC scripts/mod/empty.o
arm-eabi-gcc: No such file or directory
Is your PATH set correctly?
make[2]: *** [scripts/mod/empty.o] Error 2
make[1]: *** [scripts/mod] Error 2
make: *** [scripts] Error 2
make: *** Waiting for unfinished jobs....
[email protected]:~/golfu/kernel/stock-golfu-kenrel-master$

Looks like you missed or mistyped a command from the instructions...
export CROSS_COMPILE=~/golfu/toolchains/arm-eabi-4.4.3/bin/arm-eabi-
You need to make sure the compiler you a using has that exact path to the gcc binary, or edit the path accordingly.

soupmagnet said:
Looks like you missed or mistyped a command from the instructions...
export CROSS_COMPILE=~/golfu/toolchains/arm-eabi-4.4.3/bin/arm-eabi-
You need to make sure the compiler you a using has that exact path to the gcc binary, or edit the path accordingly.
Click to expand...
Click to collapse
still geting same error

aman23091998 said:
still geting same error
Click to expand...
Click to collapse
What do you get when enter the following command?
Code:
ls ~/golfu/toolchains/arm-eabi-4.4.3/bin/arm-eabi-gc*

one thing to say
->let the name of the downloaded zip be stock-kernel.
->Root kernel directory will be /golfu/kernel or /golfu/kernel/stock-kernel
->if the second one /golfu/kernel/stock-kernel .Y=then what is the root kernel-source directory

aman23091998 said:
one thing to say
->let the name of the downloaded zip be stock-kernel.
->Root kernel directory will be /golfu/kernel or /golfu/kernel/stock-kernel
->if the second one /golfu/kernel/stock-kernel .Y=then what is the root kernel-source directory
Click to expand...
Click to collapse
I'm not sure if I understand what you're asking (or even if that's a question at all), but let me explain my experience with it and hopefully shed some light on the subject...
There are some slight inconsistencies with the instructions posted, likely due to naming conventions being changed after the tutorial was written. When you download the source code, it should come in a package that is similarly named 'golfu-ics-3.0.16-3d39477.zip'. Within that, is another package of the same name, but with a 'tar.gz' file extension. When you right-click on that file and select "Extract Here", the resulting folder simply needs to be renamed to "kernel", rather than creating another separate kernel directory in the Terminal.
The other problem is, when you 'git clone' the tools and toolchains directories, they will be named "Android_Toolchains" and "Boot-Image-Tools", which is inconsistent with the instructions to make directories named "toolchain" and "tools".
So...if you were to follow the instructions in step-1.b explicitly, you would probably end up with a directory structure similar to this:
Code:
golfu
Android_Toolchains
arm-2009q3
arm-2010.09
arm-2011.03
...
...
...
Boot-Image-Tools
tools
from565
mkbootfs
mkbootfs-cfroot
...
...
...
README
kernel
golfu-ics-3.0.16-3d39477
arch
block
crypto
...
...
...
toolchain
tools
Instead, for step-2.a to work as it is written, the directory structure should be more like this:
Code:
golfu
kernel
arch
block
crypto
...
...
...
toolchains
arm-2009q3
arm-2010.09
arm-2011.03
...
...
...
tools
from565
mkbootfs
mkbootfs-cfroot
...
...
...
Ensuring this, will prevent the types of errors you were receiving before.
I'm not sure if this answers your question, but it should hopefully help someone in a similar situation.

aman23091998 said:
one thing to say
->let the name of the downloaded zip be stock-kernel.
->Root kernel directory will be /golfu/kernel or /golfu/kernel/stock-kernel
->if the second one /golfu/kernel/stock-kernel .Y=then what is the root kernel-source directory
Click to expand...
Click to collapse
Ok here is an example. You download Stock-golfu.zip<=(Example).
You unrar it in ~/golfu/kernel.
Now the tree is ~/golfu/kernel/Stock-golfu.
The Root directory of the kernel source code is ~/golfu/kernel/Stock-golfu/
Inside the Root directory you should have folders such as arch, block, scripts etc.
I hope that clears it up for you.

me4488 said:
Ok here is an example. You download Stock-golfu.zip<=(Example).
You unrar it in ~/golfu/kernel.
Now the tree is ~/golfu/kernel/Stock-golfu.
The Root directory of the kernel source code is ~/golfu/kernel/Stock-golfu/
Inside the Root directory you should have folders such as arch, block, scripts etc.
I hope that clears it up for you.
Click to expand...
Click to collapse
Question:
How necessary is it to have the "Stock-golfx" directory located inside the kernel directory (as with your example), as opposed to just having the arch, block, etc. folders directly in the ~/golfx/kernel/ directory? Both examples compile in the same manner (as far as I can tell), that is, assuming you are in the correct directory when executing "make".
Is it out of necessity that you did it this way, or is it just personal preference?

Running Ubuntu 12.04 and screen went black after reboot (after second set set of commands) has been like that for ~ten minutes now, anyone got any ideas how I can get it to boot as usual again?
Thanks in advance
--FIXED--
(ran "sudo apt-get install ubuntu-desktop" after I managed to boot terminal)

Related

[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.

[Guide][7/5/13]Learn Linux Terminal/Setup A Build Environment/HTC Kernel Building

To start I will be adding a lot to this over time so dont be upset if I dont have everything.
To open a terminal without finding it in your programs all you need to do is ctrl+alt+t
Heavily used Commands
cd: this command is used to navigate through your directory's. For example if you have a folder named apps on desktop you would type... cd Desktop...then cd apps.
mkdir: this means make directory or folder. For example cd to your directory then do mkdir whatever. Then you can cd right into that directory ever.
pwd: print working directory. This shows you where you are on the filesystem. This helps if your deep in a directory or folders.
ls: this means list. This tells you all the files in your present working directory.
man: this means manual. This prints like a help page in the terminal to guide you on whatever you need. This can be used for many things.
cp: means copy a file or directory
rm and rmdir: remove a file or like rmdir remove a directory.
mv: move a file or directory
The next command is to issue a command. There are a couple of popular ways of doing so.
First
"./": this is to issue or run a command or file that is in your current directory.
Second
"../": this runs the file that is directly above your current directory.
cat: prints a list of provided text files to the screen.
grep or global regular expression print: searches for patterns or a pattern in a list of files. This is great for small editing if thats what your into and so is.....
diff: compares two text files and displays the differences found between the files on the screen.
history: this is very useful. This shows you a list of your recent commands if you forgot the exact command. To select a command on the list use "!". For example if the label for the command is 00 then type "!00". However most linus OS's allow you to use the up arrow and enter key instead.
Also if you guys dont want a full help list using the "man" command you can use this command: --help
Popular Terminal Commands for Android:
adb: also called android debug bridge is used to issue commands to your phone and debug.
Most people use the following:
adb devices: shows what devices are connected to the computer
adb push and pull: can transfer file from computer to phone and vice versa.
if you want to push an apk to your system make sure that apk is in your adb folder and type: "adb push target.apk system/apps"
adb reboot
adb reboot bootloader
adb logcat: if you are either porting, making roms, or just debugging for a dev you need to know how to logcat. Also if you want to just take the log and make it into a txt file to share just issue the following; "adb logcat -d> logcat.txt"
The logcat will go to your adb folder and save as logcat.txt.
fastboot: is a tool used to update the flash filesystem
I use fastboot for a few things including flashing splashes and flashing recoveries. For example:
Take twrp. To flash to htc one you do...
"fastboot flash recovery twrp.img" presuming you are in your fastboot directory in terminal and the recovery.img is in that folder.
Now as you may know htc uses fastboot to unlock and lock the bootloader using the following commands:
"fastboot oem unlock"
"fastboot oem lock"
Of course you should know this by now you need to be in bootloader under fastboot usb mode.
Now to be able to use fastboot and adb u need sdk and java. Lets start.
"sudo apt-get install openjdk-6-jre openjdk-6-jdk icedtea6-plugin"
This will get u java jdk. Sudo means root and apt-get install means terminal is pulling the file from servers and then installing it.
Next you want sdk. So instead of going all around and downloading it just do this.
" wget http://dl.google.com/android/android-sdk_r20-linux.tgz"
Wget means you are "getting the package".And then you want to extract the file.
"tar -xvzf android-sdk_r20-linux.tgz"
Seeing how the file is a tar "tar -xvzf" extracts that tar. Then cd to the sdk folder and you are good to go.
Speaking of compressing and uncompressing files......
tar -zxvf filename.tar.gz
Untar a tarred and compressed tarball (*.tar.gz or *.tgz).
tar -xvf filename.tar
Untar a tarred but uncompressed tarball (*.tar).
gunzip filename.gz
Decompress a zipped file (*.gz" or *.z).
bunzip2 filename.bz2
Decompress a file (*.bz2) zipped with bzip2 compression.
unzip filename.zip
Decompress a file (*.zip).
Next. Processes.
You know hiw windows has task manager with ctrl+alt+delete. Well here is that for terminal.
ps
(=print status) Display the list of currently running processes with their process IDs (PID) numbers.
kill PID
Force a process shutdown. First determine the PID. Use the command "ps".
bg PID
Send the process to the background.The same can be accomplished with z.
any_command&
Run any command in the background the symbol "&" means run the proceeding command in the background.
killall program_name
Kill program or multiple programs by name. This is useful
lpq
Shows your printing queue.
lprm job_number
Remove a printing job "job_number" from the queue. Alot like windows printing task manager.
lpc
Check and control the printer(s). Type "?" to see the list of available commands.
renice -1 PID
(as root) Change the priority of a running process to -1. Make sure you are Root.
*
Ill add more later. My fingers are tired.
Here are some useful admin commands
printtool
Configuration tool for your printer(s).
linuxconfig
(as root, either in text or graphical mode). You can access and change hundreds of setting from it. Be careful.
adduser user_name
Create a new account (you must be root).
userdel user_name
Remove an account (you must be a root).
passwd
Change the password on your current account. If you are root, you can change the password for any user using: "passwd user_name"
chmod perm filename
Change the file access permission for the files you own. You can make a file accessible in three modes: read (r), write (w), or execute (x) to three classes of users: owner (u), group (g), or others (o).
ls -l filename
Checks the files current permissions.
If the file is accessible to all users in all modes it will show:
rwxrwxrwx
The first triplet shows the file permission for the owner of the file, the second for that group, the third for others. A no permission is shown as "-".
su
You will be asked for your password. Type "exit" to return you to your previous login. Don't work on your machine as root. Use it only when you need it.
fdisk
(as root) Linux hard drive partitioning utility. The program gparted I think is better. To install gparted just like many other programs us the command "sudo apt-get install gparted".
fsck -t ext2 /dev/hda2
Check and repair a filesystem.
Sent from my HTCONE using xda premium
Build Environment
Instructions For Setting up a Build Environment for Linux
Make sure you are 64-bit
Have a big hard drive
A good amount of ram
If you dont have java already. Get it.
sudo apt-get install openjdk-6-jdk
You will also need python
sudo apt-get install python
And git
sudo apt-get install git-core
Android SDK:
I showed you guys how to get it in the first post.
Now open your home folder and press Ctrl+H to show hidden files, and open up a file called .bashrc.
Add these lines to the bottom of .bashrc:
# Android tools
export PATH=${PATH}:~/SDK/tools
export PATH=${PATH}:~/SDK/platform-tools
export PATH=${PATH}:~/bin
Now you should also find .profile file in the same place you found .bashrc file. Add this to that file:
PATH="$HOME/SDK/tools:$HOME/SDK/platform-tools:$PATH"
After that you need to install these packages:
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
On Ubuntu 12.04:
sudo apt-get install git gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev x11proto-core-dev \
libx11-dev libreadline6-dev libgl1-mesa-glx \
libgl1-mesa-dev g++-multilib mingw32 tofrodos \
python-markdown libxml2-utils xsltproc zlib1g-dev
Also this:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Now Configure your USB.
Type :
gksudo gedit /etc/udev/rules.d/51-android.rules
A blank text will open and now add this code and save:
#Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666"
#ASUS
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666"
#Dell
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666"
#Foxconn
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666"
#Garmin-Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="091E", MODE="0666"
#Google
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666"
#HTC
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666"
#Huawei
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666"
#K-Touch
SUBSYSTEM=="usb", ATTR{idVendor}=="24e3", MODE="0666"
#KT Tech
SUBSYSTEM=="usb", ATTR{idVendor}=="2116", MODE="0666"
#Kyocera
SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0666"
#Lenevo
SUBSYSTEM=="usb", ATTR{idVendor}=="17EF", MODE="0666"
#LG
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"
#Motorola
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666"
#NEC
SUBSYSTEM=="usb", ATTR{idVendor}=="0409", MODE="0666"
#Nook
SUBSYSTEM=="usb", ATTR{idVendor}=="2080", MODE="0666"
#Nvidia
SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0666"
#OTGV
SUBSYSTEM=="usb", ATTR{idVendor}=="2257", MODE="0666"
#Pantech
SUBSYSTEM=="usb", ATTR{idVendor}=="10A9", MODE="0666"
#Philips
SUBSYSTEM=="usb", ATTR{idVendor}=="0471", MODE="0666"
#PMC-Sierra
SUBSYSTEM=="usb", ATTR{idVendor}=="04da", MODE="0666"
#Qualcomm
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666"
#SK Telesys
SUBSYSTEM=="usb", ATTR{idVendor}=="1f53", MODE="0666"
#Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666"
#Sharp
SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0666"
#Sony Ericsson
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666"
#Toshiba
SUBSYSTEM=="usb", ATTR{idVendor}=="0930", MODE="0666"
#ZTE
SUBSYSTEM=="usb", ATTR{idVendor}=="19D2", MODE="0666"
Once you have saved the file type this:
sudo chmod a+r /etc/udev/rules.d/51-android.rules
Now install your repository:
Type the following:
mkdir ~/bin
PATH=~/bin:$PATH
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
Now all you have to do is initialize your repository and then make a working folder and sync:
mkdir WORKING_FOLDER
cd WORKING_FOLDER
So lets just say you want to sync and build cm10.1 you need the repo so once you cd into the directory type this:
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1
While that runs in the terminal it is going to ask you to put in your name and email address.
Once all thats done just type:
repo sync
And your good to go. Thats where I stop for now. Any questions just ask.
Sent from my HTCONE using xda premium
How to build a sense kernel from source
Judging that you are reading this and going to try and build a kernel make sure you have looked at the previous posts above as they may be needed to complete this task.
This is the readme from htc dev's website. But why do all this work. Lets use Linux and bash scripts to our advantage.
defconfig file: m7wls_defconfig (arm-eabi-4.6)
Download:
=========
If you are not already using an AOSP toolchain (included in an AOSP build tree), download the corresponding official android toolchain for the arm-eabi specified above for this device:
git clone https://android.googlesource.com/platform/prebuilt for 4.4.3
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6 for 4.6
(use darwin-x86 in place of linux-x86 for mac)
Build the kernel:
=================
set the following environment variables:
export TOP= [where you installed the toolchain or top of android AOSP code base]
export PATH=$TOP/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin:$PATH (use corresponding arm-eabi bin path)
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=arm-eabi-
make [the defconfig file for this device above]
make clean (for subsequent builds)
make -j4 (in this example 4 is the number of processors of your build machine)
Output Binary Files:
====================
After the build process is finished, there should be a file named "zImage" found in arch/arm/boot/
If you are building a rom with this kernel ZImage, copy it into your build's output folder and rename it to "kernel".
You will also need the following kernel modules. These will eventually be installed into /system/lib/modules on the device.
kernel modules:
./driver/*.ko
Click to expand...
Click to collapse
The only thing I will ask you to get are the following.
-Download the source from htcdev.
-Get your toolchain and put it in your desired folder. Do that with this command.
"git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6"
-for me I put the toolchain in my directory like this. It is different for each toolchain and device. It doesn't matter. /android/kernel/**toolchain**. That's where the extracted toolchain is.
-Next step open a file and add the following text. Make sure the file is executable so you can run it. Add this....
echo "~m7wls STOCK KERNEL COMPILER~"
cd Kernel-m7wls
export ARCH=arm CROSS_COMPILE=/android/kernel/toolchain/arm-eabi-4.6/bin/arm-eabi-4.6-
echo "Cleaning up source"
make clean && make mrproper
date +%Y%m%d%H%M > CURRENT_VERSION
echo "Making config"
make m7wls_defconfig
echo "Adding Current Version to Kernel"
cp CURRENT_VERSION .version
echo "Building Kernel"
make -j4
echo "Kernel ready"
cp -f arch/arm/boot/zImage /android/kernel/htcone/STOCK-m7wls/zImage
echo "Copying modules"
rm -f /android/kernel/htcone/STOCK-m7wls/boot.img-ramdisk/lib/modules/*
find . -name "*.ko" -exec cp {} /android/kernel/htcone/STOCK-m7wls/boot.img-ramdisk/lib/modules/ \;
cd /android/kernel/htcone/STOCK-m7wls/boot.img-ramdisk/lib/modules/
for i in $(find . | grep .ko | grep './')
do
echo $i
/android/kernel/toolchain/arm-eabi-4.6/bin/arm-eabi-4.6-strip --strip-unneeded $i
done
echo "Stripped Modules"
echo "All done,Press Enter to Quit"
read ANS
Click to expand...
Click to collapse
-This is a quick script that does all the work for me. No need to add paths, etc. As long as your folders and filed match the paths of the script all will be ok. Now this script will have to be edited to suite your computer and the destinations of your kernel folders.
-Now once the script is fully correct and everything is setup just cd to the directory your script is in and type the following assuming your file name is m7wls type:
./m7wls
Once the script has fully run. It should take a while in the folders I made you should see zImage and kernel modules. From there you will need to know how to pack the kernel.
Notice if you downloaded sprints htc one kernel source the source is named m7wls-jb-crc-3.4.10-eb45596. I changed this to just m7wls to make it easier for the script.
Finally, remember you will have to make directories to suit the script for example this line "rm -f /android/kernel/htcone/STOCK-m7wls/boot.img-ramdisk/lib/modules/*" this is where the modules go "*" but I had to make these folders first boot.img-ramdisk/lib/modules/.
If you followed my instructions and did your own fooling around you should have a sense kernel built from source. This is not for beginners. If you have any questions just ask. Message me if you really need some more help.
Happy Building!
I'll add this to the faq guide when I get home from work thanks for the write up
Sent from my HTCONE using xda app-developers app
Cool thanks. Gotta add alot of stuff tho. Need to fix computer first. Doin this on phone is a pain.
Sent from my HTCONE using xda premium
HTC_M7 said:
Cool thanks. Gotta add alot of stuff tho. Need to fix computer first. Doin this on phone is a pain.
Sent from my HTCONE using xda premium
Click to expand...
Click to collapse
Updated Q18
What else would you guys like to know? Let me know. How to build a kernel from htc source? How to use apktool? How to read a logcat?
Sent from my HTCONE using xda premium
HTC_M7 said:
What else would you guys like to know? Let me know. How to build a kernel from htc source? How to use apktool? How to read a logcat?
Sent from my HTCONE using xda premium
Click to expand...
Click to collapse
Yes
Yes and
Yes
Sent from my HTCONE using xda app-developers app
Ok just added my fourth post on how to build a htc sense kernel from source
Im really trying to get this moved to general software section but no mod has contacted me back yet.
Sent from my HTCONE using xda premium

[Developer Thread] [Port New Projects] [Help For New Devs][NOOBs : WELCOME]

As i am planning to retire ( actually retiring isn’t at all possible ... does it ?) , i am creating this thread for all new devs who want to port new Roms and projects and other users on XDA who want som of their liked projects to be ported to any samsung galaxy device ( as i am expert on this )...
Here in this thread u can ....
1. Make new request for any project u like to be ported to Galaxy devices ...
2. Can ask any question regarding compiling Roms and for kernel development i am asking Ryuinferno to help me out
3. Can paste any error u got and will try to solve with my all Guts ...
4. List will be updated ...
So welcome to development world guys
Project Request and Hall Of Fame dev of The Week​
1. Port New Insomnia Rom
NOTICE: I'm beginning to see this tutorial on numerous other sites. I'm fine with it being posted on other sites, as long as I am given credit and have your thread point back to here for the pieces that I have specifically written. I do not condone near verbatim or verbatim copy and pasting of my work or others work without credit. Please give credit where credit is due. Thank you.
1) You need the following:
-JDK 6 if you wish to build Jellybean.
Code:
Code:
$ sudo apt-get install openjdk-6-jdk
-Python, which you can download from python.org. Or:
Code:
Code:
$ sudo apt-get install python
-Git, which you can find it at git-scm.com. Or:
Code:
Code:
$ sudo apt-get install git-core
-Android SDK:
Download the SDK here: http://developer.android.com/sdk/index.html
Extract the SDK and place it in your home directory.
I renamed my SDK to android-sdk to make it easier to navigate to.
Go to your home folder, press Ctrl+H to show hidden files, and open up your .bashrc file.
Add these lines at the bottom of the file:
Code:
Code:
# Android tools
export PATH=${PATH}:~/android-sdk/tools
export PATH=${PATH}:~/android-sdk/platform-tools
export PATH=${PATH}:~/bin
Find your .profile file and add this at the bottom of the file:
Code:
Code:
PATH="$HOME/android-sdk/tools:$HOME/android-sdk/platform-tools:$PATH"
You have now successfully installed the Android SDK.
To check for updates issue this into your terminal:
Code:
Code:
$ android
2) Install required packages.
Code:
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 \
libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \
libxml2-utils xsltproc
On Ubuntu 10.10:
Code:
Code:
$ sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so
On Ubuntu 11.10:
Code:
Code:
$ sudo apt-get install libx11-dev:i386
Building on Ubuntu 12.04 is currently only experimentally supported and is not guaranteed to work on branches other than master.
Code:
Code:
$ sudo apt-get install git gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev x11proto-core-dev \
libx11-dev libreadline6-dev libgl1-mesa-glx \
libgl1-mesa-dev g++-multilib mingw32 tofrodos \
python-markdown libxml2-utils xsltproc zlib1g-dev
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
3) Configure your USB.
Code:
Code:
$ gksudo gedit /etc/udev/rules.d/51-android.rules
Inside of this blank text file insert:
Code:
Code:
#Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666"
#ASUS
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666"
#Dell
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666"
#Foxconn
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666"
#Garmin-Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="091E", MODE="0666"
#Google
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666"
#HTC
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666"
#Huawei
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666"
#K-Touch
SUBSYSTEM=="usb", ATTR{idVendor}=="24e3", MODE="0666"
#KT Tech
SUBSYSTEM=="usb", ATTR{idVendor}=="2116", MODE="0666"
#Kyocera
SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0666"
#Lenevo
SUBSYSTEM=="usb", ATTR{idVendor}=="17EF", MODE="0666"
#LG
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"
#Motorola
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666"
#NEC
SUBSYSTEM=="usb", ATTR{idVendor}=="0409", MODE="0666"
#Nook
SUBSYSTEM=="usb", ATTR{idVendor}=="2080", MODE="0666"
#Nvidia
SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0666"
#OTGV
SUBSYSTEM=="usb", ATTR{idVendor}=="2257", MODE="0666"
#Pantech
SUBSYSTEM=="usb", ATTR{idVendor}=="10A9", MODE="0666"
#Philips
SUBSYSTEM=="usb", ATTR{idVendor}=="0471", MODE="0666"
#PMC-Sierra
SUBSYSTEM=="usb", ATTR{idVendor}=="04da", MODE="0666"
#Qualcomm
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666"
#SK Telesys
SUBSYSTEM=="usb", ATTR{idVendor}=="1f53", MODE="0666"
#Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666"
#Sharp
SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0666"
#Sony Ericsson
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666"
#Toshiba
SUBSYSTEM=="usb", ATTR{idVendor}=="0930", MODE="0666"
#ZTE
SUBSYSTEM=="usb", ATTR{idVendor}=="19D2", MODE="0666"
4) Save the file and close it and then issue this command:
Code:
Code:
$ sudo chmod a+r /etc/udev/rules.d/51-android.rules
5) Install the repo:
Code:
Code:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
6) Initialize the repo:
Code:
Code:
$ mkdir WORKING_DIRECTORY
$ cd WORKING_DIRECTORY
6a) For AOSP:
Code:
Code:
$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.3.1_r1
For CM:
Code:
Code:
$ repo init -u git://github.com/CyanogenMod/android.git -b cm-10.2
6.1) For people who have already done a repo init:
Code:
Code:
$ cd WORKING_DIRECTORY
AOSP:
Code:
Code:
$ repo init -b android-4.3_r2
$ repo sync
CM:
Code:
Code:
$ repo init -b cm-10.2
$ repo sync
7) When prompted, enter your real name and email address.
8) Gather the files:
Code:
Code:
$ repo sync
9) Continue onto adding a device
~How To Add A Device To The List~
1) Find the github for your device you wish to add. (For me it is the Samsung Epic 4G Touch [codename d710])
2) Now navigate to the location you are going clone the device tree to:
Code:
Code:
$ cd WORKING_DIRECTORY/device
$ mkdir samsung
3) Clone the github device tree from remote to local: (The name after the branch 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] [inc], etc.)
Code:
$ git clone git://github.com/CyanogenMod/android_device_samsung_i9100g.git -b cm-10.2
4) Now navigate into the folder:
Code:
$ cd i9100g
5) Connect phone to computer and make sure USB debugging is enabled and you have adb set up.
6) Extract Device Proprietary Files:
Code:
$ ./extract-files.sh
Or:
Code:
./proprietary-files.sh
Or: See if other repos have your device's proprietary blobs already (like i9100g):
Code:
HTML:
$ ~/WORKING_DIRECTORY
$ mkdir vendor
$ git clone https://github.com/TheMuppets/proprietary_vendor_samsung -b cm-10.2 samsung
6.1) Some devices have other dependencies like a common device repo. The i9100g utilizes a omap4-common repo for the galaxys2 family of devices. Clone that repo. From inside the samsung folder:
Code:
$ cd ..
$ git clone git://github.com/CyanogenMod/android_device_samsung_omap4-common.git -b cm-10.2 omap4-common
OR simply u can create local_manifest.xml file in ur .repo folder
HTML:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="github"
fetch="git://github.com/" />
<remote name="cm"
fetch="git://github.com/CyanogenMod/" />
<project path="device/samsung/i9100g" name="android_device_samsung_i9100g" remote="cm" revision="cm-10.2" />
<project path="device/samsung/omap4-common" name="android_device_samsung_omap4-common" remote="cm" revision="cm-10.2" />
<project path="kernel/samsung/t1" name="android_kernel_samsung_t1" remote="cm" revision="cm-10.2" />
<project path="vendor/samsung" name="TheMuppets/proprietary_vendor_samsung" remote="github" revision="cm-10.2" />
<project path="packages/apps/SamsungServiceMode" name="android_packages_apps_SamsungServiceMode" remote="cm" revision="cm-10.2" />
<project path="hardware/samsung" name="android_hardware_samsung" remote="cm" revision="cm-10.2" />
<project path="hardware/ti/omap4xxx" name="android_hardware_ti_omap4xxx" remote="cm" revision="cm-10.2" />
</manifest>
7) Navigate back to your home directory for building:
Code:
Code:
$ cd ~/WORKING_DIRECTORY
8) Prepare To Compile:
Code:
Code:
$ source build/envsetup.sh
Or:
Code:
Code:
$ . build/envsetup.sh
9) Get your list of devices:
Code:
Code:
$ lunch
10) Pick your poison.
11) Now compile ('#' being the number of cores in your processor +1):
Code:
Code:
$ make -j#
12) Speed up builds using ccache (optional, but highly recommended):
Edit your .bashrc and add this line at the bottom:
Code:
Code:
export USE_CCACHE=1
Then issue these commands:
Code:
Code:
$ export USE_CCACHE=1
$ export CCACHE_DIR=~/.ccache
$ prebuilts/misc/linux-x86/ccache/ccache -M 50G
The suggested cache size is 50-100G. (This is size in GB)
Or for a flashable zip:
Code:
Code:
$ make -j# otapackage
Or u can try :
$ . build/envsetup.sh && brunch i9100g (or ur device name here)
Reserved for kernel development
FAQs​
I having error :
1.
Code:
[email protected]:~/liquid# . build/envsetup.sh
including vendor/liquid/vendorsetup.sh
including sdk/bash_completion/adb.bash
[email protected]:~/liquid# lunch
You're building on Linux
Lunch menu... pick a combo:
1. liquid_d2att-userdebug 17. liquid_jflteusc-userdebug 33. liquid_solana-userdebug
2. liquid_d2mtr-userdebug 18. liquid_jfltevzw-userdebug 34. liquid_spyder-userdebug
3. liquid_d2spr-userdebug 19. liquid_jfltexx-userdebug 35. liquid_t0lteatt-userdebug
4. liquid_d2tmo-userdebug 20. liquid_l900-userdebug 36. liquid_t0ltetmo-userdebug
5. liquid_d2usc-userdebug 21. liquid_maguro-userdebug 37. liquid_t0lte-userdebug
6. liquid_d2vzw-userdebug 22. liquid_mako-userdebug 38. liquid_targa-userdebug
7. liquid_grouper-userdebug 23. liquid_manta-userdebug 39. liquid_toro-userdebug
8. liquid_i605-userdebug 24. liquid_maserati-userdebug 40. liquid_umts_spyder-userdebug
9. liquid_i9100-userdebug 25. liquid_mb886-userdebug 41. liquid_vigor-userdebug
10. liquid_i9100g-userdebug 26. liquid_m7ul-userdebug 42. liquid_xt897-userdebug
11. liquid_i9300-userdebug 27. liquid_m7att-userdebug 43. liquid_xt897c-userdebug
12. liquid_i9305-userdebug 28. liquid_m7spr-userdebug 44. liquid_xt907-userdebug
13. liquid_jflteatt-userdebug 29. liquid_m7tmo-userdebug 45. liquid_xt925-userdebug
14. liquid_jfltecan-userdebug 30. liquid_n7100-userdebug 46. liquid_xt926-userdebug
15. liquid_jfltespr-userdebug 31. liquid_n7000-userdebug
16. liquid_jfltetmo-userdebug 32. liquid_n8013-userdebug
Which would you like? [aosp_arm-eng] 10
ls: cannot access device/*/i9100g/liquid.mk: No such file or directory
build/core/product_config.mk:231: *** Can not locate config makefile for product "liquid_i9100g". Stop.
** Don't have a product spec for: 'liquid_i9100g'
** Do you have the right repo manifest?
[email protected]:~/liquid#
ANS : Actually mate u dont have prepared liquid.mk for i9100g device which should be having path :
Code:
$working_dir/device/samsung/i9100g/liquid.mk
Code:
#
# Copyright (C) 2012 The CyanogenMod Project
# Copyright (C) 2012 The LiquidSmooth Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# name
PRODUCT_RELEASE_NAME := GT-I9100G
# device
$(call inherit-product-if-exists, device/samsung/i9100g/full_i9100g.mk)
# gsm
$(call inherit-product, vendor/liquid/config/common_gsm.mk)
# phone
$(call inherit-product, vendor/liquid/config/common_phone.mk)
## Device identifier. This must come after all inclusions
PRODUCT_DEVICE := i9100g
PRODUCT_NAME := liquid_i9100g
PRODUCT_BRAND := samsung
PRODUCT_MODEL := GT-I9100G
PRODUCT_MANUFACTURER := samsung
PRODUCT_PROPERTY_OVERRIDES += ro.buildzipid=liquid.i9100g.$(shell date +%m%d%y).$(shell date +%H%M%S)
# overrides
PRODUCT_BUILD_PROP_OVERRIDES += \
BUILD_NUMBER=I9100GXXLSR \
PRODUCT_NAME=GT-I9100G \
TARGET_DEVICE=I9100G \
TARGET_BUILD_TYPE=user \
BUILD_VERSION_TAGS=release-keys \
PRIVATE_BUILD_DESC="GT-I9100G-user 4.1.2 JZO54K I9100GXXLSR release-keys" \
BUILD_FINGERPRINT="samsung/GT-I9100G/GT-I9100G:4.1.2/JZO54K/I9100GXXLSR:user/release-keys"
2.
Code:
No private recovery resources for TARGET_DEVICE i9100g
build/core/tasks/kernel.mk:56: ***************************************************************
build/core/tasks/kernel.mk:57: * Using prebuilt kernel binary instead of source *
build/core/tasks/kernel.mk:58: * THIS IS DEPRECATED, AND WILL BE DISCONTINUED *
build/core/tasks/kernel.mk:59: * Please configure your device to download the kernel *
build/core/tasks/kernel.mk:60: * source repository to kernel/samsung/t1
build/core/tasks/kernel.mk:61: * See http://wiki.cyanogenmod.org/w/Doc:_integrated_kernel_building
build/core/tasks/kernel.mk:62: * for more information *
build/core/tasks/kernel.mk:63: ***************************************************************
make: *** No rule to make target `/home/black-prince/liquid/out/target/product/i9100g/kernel', needed by `/home/black-prince/liquid/out/target/product/i9100g/boot.img'. Stop.
ANS : Hey did u forgot to add kernel source , u must be... Check (for i9100g) path
Code:
$Working_dir/kernel/samsung/t1
Its repo must have been given in local_manifest.xm look or post no. 2 for more info ...
GIT BASICS
1. CREATING UR ACCOUNT ...
First go to github and sign up with COOL NAME ... ( Dont forgot to think over ur git user name thousand times , its most imp decision u ever take in ur development life )
Now once u have ur git account ready , fork the repository from any project u want ... e.g. i u want to fork this just fork
{
"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"
}
Let the forking be completed ... Now u want changes to the repository u have forked , its obvious who dont
Now must imp thing to learn first is Cloning the git repository ... Go to ur fork repo in ur account ...
now copy SSH url ...
Open ur terminal , create working_dir
Code:
$mkdir working_dir
$cd working_dir
working_dir$git clone [email protected]:Black-Prince/android_device_samsung_i9100g.git (here instead of Black-Prince Ur git acc name with ur repo url)
We must add other repository from which we have to cherry pick or the other repository branch we have to merge ...
Code:
$ cd working_dir
working_dir$ ls
android_device_samsung_i9100g
working_dir$ cd android_device_samsung_i9100g
working_dir/android_device_samsung_i9100g$ git remote add slim git://github.com/SlimRoms/device_samsung_i9100g.git
working_dir/android_device_samsung_i9100g$ git fetch slim
remote: Counting objects: 801, done.
remote: Compressing objects: 100% (328/328), done.
remote: Total 728 (delta 337), reused 672 (delta 286)
Receiving objects: 100% (728/728), 247.18 KiB | 14.00 KiB/s, done.
Resolving deltas: 100% (337/337), completed with 35 local objects.
From git://github.com/SlimRoms/device_samsung_i9100g
* [new branch] jb -> slim/jb
* [new branch] jb4.2 -> slim/jb4.2
* [new branch] jb4.3 -> slim/jb4.3
working_dir/android_device_samsung_i9100g$ cherry pick and merge next time :P
HEIMDALL >>> ODIN ON LINUX/UBUNTU/MAC Flashing KERNEL
First thing i am going to mention here is , PLEASE CHECK THAT UR DEVICE SUPPORT HEIMDALL
Lets get started ...
1. Download Heimdall
For Ubuntu 64 bit version which i use i will download
A. ubuntu13.04-heimdall-frontend_1.4.0-0_amd64.deb
B. ubuntu13.04-heimdall_1.4.0-0_amd64.deb
Will install via software centre of Ubuntu and now we are ready ...
2. Download the cwm for ur device , for i9100g , i will use this
3. Extract , U will get zimage ...
4. Now copy this zimage to ur home folder
5. Open terminal , either u exucute the command for flashing kernel or cd to ur dir where u copy zimage
6. Press volume down+home+power button and go in download mode , attach via USB to ue laptop/desktop
7. type in terminal
$ sudo heimdall flash --KERNEL zimage
$ sudo heimdall flash --KERNEL boot.img
8. Note down here , i typed two dash - - before KERNEL [--KERNEL]
9. Wait for a min and ur done ...
10. U have successfully flashed new kernel/cwm/twrp
Wow, @Black_Prince you're great guy, we won't see people you too often, who share their skills the way you do, great work dude, much appreciated
Sent from my GT-I9100G using Tapatalk
Alipk52 said:
Wow, @Black_Prince you're great guy, we won't see people you too often, who share their skills the way you do, great work dude, much appreciated
Sent from my GT-I9100G using Tapatalk
Click to expand...
Click to collapse
Much more to come , git basics with cherry picking and merging skills too
with odin support guide on linux
Black_Prince said:
Much more to come , git basics with cherry picking and merging skills too
with odin support guide on linux
Click to expand...
Click to collapse
Yeah, and it will require basic linux knowledge, and linux operating system isn't?
Sent from my GT-I9100G using Tapatalk
Alipk52 said:
Yeah, and it will require basic linux knowledge, and linux operating system isn't?
Sent from my GT-I9100G using Tapatalk
Click to expand...
Click to collapse
Hmm a very little u knw , if i can do it anybody can ...
Any body can code
Black_Prince said:
Hmm a very little u knw , if i can do it anybody can ...
Any body can code
Click to expand...
Click to collapse
Sadly i don't have linux, can i still learn it? All i know is there's an box like app or something which runs as linux in windows, or either through standalone software which could be compatible with windows?
Alipk52 said:
Sadly i don't have linux, can i still learn it? All i know is there's an box like app or something which runs as linux in windows, or either through standalone software which could be compatible with windows?
Click to expand...
Click to collapse
Its called virtual machine , i never used it as i lft windows three yrs ago and never run even on dual boot
Thats wat i looking for...i never found such a fine tutorial...thnx bro
Sent from my GT-I9100G using xda app-developers app

[GUIDE] [HOW-TO] [4.0-4.4] [CM9/10/10.1/10.2/11] [ICS/JB/KK] PORTING ROMs'

This is guide that deals with porting ROM's [4.0-4.4] in 9 SIMPLE STEPS!
What type of ROM can i port using this GUIDE?
Any ROM (except Stock/manufacturer based)
ROMs' from similar devices
From same Resolution devices
What do I need??
A machine to work on. Duh!
BASE & PORT ROMs
Notepad++(if on windows)
Special ingrediant
What is BASE Rom:
The ROM which is Developed For your Mobile..​
What is PORT Rom:
The Rom Which you want to port to your Device.
just keep checking all ROM's from the forum and find one of your choice that you would like to port to your device.​
So now we have a BASE and a PORT ROM.
Next we need a Machine to work on(but obvious) (I'd be using a Win 7 PC here)
Lets Start!
Step 1:
Take ANY clean AOSP/CM ROM , which has been developed for your device as BASE ROM.
And the ROM you want to port as PORT ROM
Extract both of them, and name the folders appropriately.
It should look like this now.
{
"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"
}
​
Step 2 : Delete app, font, framework, media [and priv-app if porting Kitkat].
​Step 3: Copy app, font, framework, media [and priv-app if porting Kitkat] from PORT to BASE folder.
​
NOTE: If You find any extra file or folder in system folder of PORT ROM than copy them to your base rom system folder.
Step 4: Open etc in both PORT & BASE.
Step 5: Open init.d folder and
**Delete all files except 00banner from BASE.
**Copy all files from PORT except 00banner to BASE.
Step 6: Open Permissions in both BASE & PORT
**Copy all files{EXCEPT platform.xml and handheld_core_hardware.xml} from PORT to BASE
​
Step 7: Get to the build.prop and open both in notepad++
replace following line from PORT to BASE.
ro.config.ringtone=
ro.config.notification_sound=
ro.config.alarm_alert=
Click to expand...
Click to collapse
Also copy any other lines or tweaks you find in build.prop like this one
You can edit the following to what you wish or leave them as they are.
ro.build.id=
ro.build.display.id=
ro.build.date=
ro.modversion=
Click to expand...
Click to collapse
Step 8: Open both ROMs' updator-script
(get to them by going to >>> BASE/PORT folder > Meta-inf > com > google > android > here)
and delete all the lines setting permissions {set_perm() or set_metadata()} from BASE updator-script
Copy all set_perm()/set_metadata() lines from PORT to BASE updator-script.Save it !
>>> As a precaution you can check the file/folder name in set_metadata/set_perm lines exists in your BASE ROM or not, for instance SEMC devices do not have a firmware folder in vendor and if you set permission for a file/folder that does not exist in your ROM then probably you would be getting a Status 6 error while flashing.
IF YOU ARE HAVING BOOTLOOP THEN COPY THESE LIB FILES TO BASE ROM FROM PORT ROM:
libandroid_runtime.so
libandroid_servers.so
libmedia_jni.so
Click to expand...
Click to collapse
Step 9:
If you are porting ROM's which have features like say, Xperia Walkman, then those apps have their dependencies too.
So copy all unique files(which are only in PORT folder) from following folders of PORT to appropriate Folders of BASE:
lib
etc
bin
Now just zip the BASE folder flash it and post it! ​
IF YOUR BASE ROM HAS ISSUES THEN YOUR PORTED ROM TOO WILL HAVE ISSUES.
DON'T FORGET TO GIVE CREDITS TO THE DEVELOPER OF PORT ROM..
IF IT HELPED YOU THAN PRESS THANKS AND RATE THIS POST 5 STARS...
Cheers
The Guide is based on @rishabh.raj37 's Guide.
All credit for the Guide goes to him
Second and third posts are also from the original thread.
Click to expand...
Click to collapse
How to logcat?
Many of you are having problems while porting and I know that those problems cannot be solved simply by guesswork..
There is a solution to find the problems which are causing BOOTLOOPS OR OTHER PROBLEMS IN YOUR PORT ROM..
The SOLUTION IS TO TAKE A LOGCAT..
LOGCAT ARE OF TWO TYPES:
In your Phone(if the ROM is booting)
Through adb(if you are stuck in bootloop)
Click to expand...
Click to collapse
Click to expand...
Click to collapse
In your Phone:
There are two ways to take LOGCAT in mobile:
FIRST WAY--THROUGH APPS WHICH ARE MADE TO TAKE LOGCAT:
There are two apps which you can use to take a LOGCAT..
They are aLogcat or Catlog.
Taking logcat through apps is very easy.
Click to expand...
Click to collapse
Click to expand...
Click to collapse
SECOND WAY--THROUGH TERMINAL EMULATOR
SEE THE INSTRUCTIONS BELOW TO TAKE A LOGCAT THROUGH adb
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Click to expand...
Click to collapse
HOW TO MAKE PC READY FOR LOGCAT?
IN WINDOWS:
Download Android SDK From Here
Install or Extract it to your desired Directory..
You also need to install Java JDK.
Download it here
In the Guide, we are taking C: as the Root Directory and android as the main Folder
Navigate to Android SDK folder and open 'SDK Manager.exe'
Only check 'Android SDK Tools' and 'Android SDK Platform-tools'
First connect the device via USB to your computer
Be sure to have USB debugging enabled
Now Navigate to C:/Android/android-sdk/platform-tools/
Now Open a Command Prompt there By holding Shift+Right Click Button
Click to expand...
Click to collapse
IN LINUX:
IMPORTANT: If someone has a 64bit linux then they need to download 32-bit libs
for this, before all these steps run this:
Code:
sudo apt-get install ia32-libs
Make sure that you have Android-SDK and JDK downloaded on your PC
If you have not installed them, Android SDK from here and Java JDK in this way:
Code:
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jdk sun-java6-jre sun-java6-plugin
OR
$ sudo add-apt-repository ppa:sun-java-community-team/sun-java6
$ sudo apt-get update
$ sudo apt-get install sun-java6-jre sun-java6-bin sun-java6-jdk
OR You Can Simply Do This: (Credits to @Androguide.fr)
This process saves a lot of storage. It uses the Ubuntu Touch ppa:
Code:
sudo add-apt-repository ppa:phablet-team/tools
sudo apt-get install android-tools-adb
You can also install fastboot in the same fashion:
Code:
sudo apt-get install android-tools-fastboot
Then follow the Below Instructions Carefully:
Make a new directory by this command in terminal:
Code:
mkdir android
Then extract the downloaded SDK by
Code:
tar -zxvf ~/Downloads/android-sdk_r21.0.1-linux.tgz
Then move it to the directory we just made
Code:
mv android-sdk-linux ~/android/sdk
Then open android sdk manager by
Code:
android/sdk/tools/android
This will open Android sdk manager. Just select android sdk tools and android sdk platform tools for adb and then select install packages
Go into your Home folder and Press CTRL+H (This is done to show hidden folders and files)
Look for the file '.bashrc'
Open it and put the following or similar:
Code:
export PATH=$PATH:~/android/sdk
export PATH=$PATH:~/android/sdk/platform-tools
export PATH=$PATH:~/android/sdk/tools
You will need to add something for any devices to be recognized:
Open terminal(Ctrl+alt+T) and enter:
Code:
sudo gedit /etc/udev/rules.d/51-android.rules
Enter the following in the file:
Code:
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="091E", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="10A9", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="19D2", MODE="0666"
Now save and close the file, and in terminal enter:
Code:
sudo chmod +x /etc/udev/rules.d/51-android.rules
Now Type:
Code:
sudo gedit /etc/rc.local
This will open a file
now add the line mentioned below just above where it is written exit 0
Code:
/home/user/android/sdk/platform-tools/adb start-server
"Enter your username in place of user"
After this we don't need to cd to adb directory..We just have to type adb devices and the phone will surely show up.
Now that everything is installed
Open terminal and type:
Code:
android
android
Or, if it doesnt work
Code:
cd ~/android/sdk/tools
./android
Click to expand...
Click to collapse
HOW TO TAKE LOGCAT?
To verify that the device is connected Type:
Code:
adb devices
Now type:
Code:
adb logcat > logcat.txt
The LOGCAT will be Saved in the logcat.txt File
You can also type:
Code:
adb logcat -f logcat.txt
or
Code:
adb logcat -v long > logcat.txt
With the -v flag & the long argument, it changes output to long style, which means every line of logcat will be on its own line (makes it a little neater, imo)
Note: When outputting to a file, you will see a newline, but nothing printed, this is normal. To stop logcat from writting to a file, you need to press ctrl+c.
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Meanings of symbols in a logcat !
You usually see this at the start of a sentence in logcat .
I/> ===> Information
S/> ===> Silent
D/> ===> Debug
W/> ===> Warning
E/> ===> Error
F/> ===> Fatal
Click to expand...
Click to collapse
Click to expand...
Click to collapse
CREDITS:
blahbl4hblah
paxChristos
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Build.prop and Updater-Script Terminology and Guide to Edit it
Thanks to @ rishabh.raj37
Standard build.prop properties
Please read the hashed out lines : It is selfexplanatory.
So the normal build properties start with:
Code:
# begin build properties
# autogenerated by buildinfo.sh
This mentions that the build prop is built by build info shell script during the compilation of the ROM.
Code:
#First up the build id (Here JZO54K) is the build id for the version number for Jellybean 4.1.2
ro.build.id=JZO54K
#It is the version of the ROM which appears in the about phone. This is a cm10 build by sakindia123.
ro.build.display.id=cm_pico-userdebug 4.1.2 JZO54K eng.sakindia123.20121117.161006 test-keys
#This is the software development kit version which is needed and used for building the ROM.
ro.build.version.incremental=eng.sakindia123.20121117.161006
ro.build.version.sdk=16
#3's codename.
ro.build.version.codename=REL
#This is the android version of the ROM.
ro.build.version.release=4.1.2
#This is the time and date of when the ROM and Kernel were built together. (ROM only).
ro.build.date=Sat Nov 17 16:10:21 GMT 2012
#More details in the kernel.
ro.build.date.utc=1353168621
#Userdebug ROMs has usb debugging set to 0 and eng are for general release.
ro.build.type=userdebug
#Name of the person building the ROM & kernel.
ro.build.user=sakindia123
ro.build.host=build1
#Test keys suggests that the ROM is not an official version of the ROM. Release keys are for official releases.
ro.build.tags=test-keys
Click to expand...
Click to collapse
This part of the build prop shows the information about our phone and not the build of the ROM of our phone.
Code:
#Model of our device
ro.product.model=HTC Explorer A310e
#Brand of device. ( In some case carrier ) for which the android version has been made for.
ro.product.brand=htc_europe
#Name is an alternative ( codename ) of the device during its development. For Explorer its pico, for Nexus 7 : grouper for Nexus 4 : mako for SG Ace its cooper etc.
ro.product.name=pico
ro.product.device=pico
ro.product.board=pico
#It is the first instruction set (CPU + ABI convention type) of the code. Ours is an arm type arch cpu and abi version 7a )
ro.product.cpu.abi=armeabi-v7a
ro.product.cpu.abi2=armeabi
#Name of manufacturer.
ro.product.manufacturer=HTC
#Language of the software ( read ROM)
ro.product.locale.language=en
#Region of operation of software.
ro.product.locale.region=US
ro.wifi.channels=
#Name of board on which software has been built.
ro.board.platform=msm7x27a
# ro.build.product is obsolete; use ro.product.device
ro.build.product=pico
# Do not try to parse ro.build.description or .fingerprint Never attempt to modify this value ! This can lead to bootloop (possibly hard brick) of your phone. This is the unique fingerprint of the software of your phone.
ro.build.description=cm_pico-userdebug 4.1.2 JZO54K eng.sakindia123.20121117.161006 test-keys
ro.build.fingerprint=htc_europe/htc_pico/pico:2.3.5/GRJ90/207463.1:user/release-keys
ro.build.characteristics=default
ro.cm.device=pico
# end build properties
#
Click to expand...
Click to collapse
System properties::
What is RIL?
A Radio Interface Layer (RIL) is a layer in an operating system which provides an interface to the hardware's radio and modem on e.g. a mobile phone.
Code:
#These are basically the links between your phones hardware and software , i.e. it tells your phone where to find the libs for RIL and also detects whether you have any arguments in place of the operation of your libs to provide to the vendor.
rild.libpath=/system/lib/libhtc_ril.so
rild.libargs=-d /dev/smd0
rilswitch.vendorlibpath=/system/lib/libhtc_ril.so
#
ril.subscription.types=NV,RUIM
#Architecture of baseband radio.
ro.baseband.arch = msm
#ro.ril.ecc.HTC-xxx=nnn,nnn,nnn
#These are basically the emergency call numbers(codes) for your phone. Its different according to your region. ( here xxx ) . The numbers can be 911 , 101,100 etc etc ( here nnn)
ro.ril.ecc.HTC-GCC=999,112,997
ro.ril.ecc.HTC-WWE=999
ro.ril.ecc.HTC-Dutch=112
ro.ril.ecc.HTC-SPA=112, 911,112, 911
ro.ril.ecc.HTC-FRA=112,911
ro.ril.ecc.HTC-ITA=112,911
ro.ril.ecc.HTC-EastEurope=112
#Something to do with GPRS, AFAIK.
ro.ril.enable.a52.HTC-ITA=1
ro.ril.enable.a53.HTC-ITA=1
ro.ril.enable.a52=0
ro.ril.enable.a53=1
#HSDPA category : High speed downlink packet access category. ( 8 == 7.2 mbit/s )
ro.ril.hsdpa.category=8
#HSXPA : High speed ( type ) packet . ( values 1- HSDPA 2-HSDPA/HSUPA ( High speed uplink packet access )
ro.ril.hsxpa=1
#Something to do with 3G.
ro.ril.fast.dormancy.rule=1
#
ro.ril.disable.fd.plmn.prefix=23402,23410,23411,23420,27202
#Ability of enabling data roaming.
ro.ril.enable.managed.roaming=1
#Class of GPRS network that needs to be routed to phone.
ro.ril.gprsclass=10
#No sim emergency call codes list
ro.ril.oem.nosim.ecclist=911,112,999,000,08,118,120,122,110,119,995
#
ro.ril.emc.mode=2
#This is somehow related to mobile data and its stablility. ( adding skipbrokendatacall adds stability ).
ro.telephony.ril.v3=signalstrength,singlepdp,skipbrokendatacall
#
ro.ril.htcmaskw1.bitmask = 4294967295
#
ro.ril.htcmaskw1 = 14449
#Related to ril audio.
ro.ril.update.acoustic.table = 1
#
ro.ril.avoid.pdp.overlap = 1
#Default type of data connection.
ro.telephony.default_network = 0
Click to expand...
Click to collapse
Wi-Fi Related:
Code:
# Time between scans in seconds. Keep it high to minimize battery drain.
# This only affects the case in which there are remembered access points,
# but none are in range.
wifi.supplicant_scan_interval=180
wifi.interface=eth0
wifi.softap.interface=eth0
Click to expand...
Click to collapse
Density(DPI) Related:
Code:
# density in DPI of the LCD of this board. This is used to scale the UI
# appropriately. If this property is not defined, the default value is 160 dpi.
ro.sf.lcd_density = 160
Display and OpenGLrelated
Code:
# View configuration for QVGA
view.fading_edge_length = 8
view.touch_slop = 15
view.minimum_fling_velocity = 25
view.scroll_friction = 0.008
Code:
# The OpenGL ES API level that is natively supported by this device.
# This is a 16.16 fixed point number
ro.opengles.version = 131072
Code:
# For no auto focus devices
ro.workaround.noautofocus = 1
# Increase SKIA decode memory capability for progressive jpg file
ro.media.dec.jpeg.memcap = 20000000
# For QC perf binary hooks
# src:vendor/qcom/proprietary/android-perf/release/lib/<CPU arch>/libqc-opt.so
ro.vendor.extension_library=/system/lib/libqc-opt.so
Additional Build Properties:
Code:
# Misc.
#There is a provision.apk in system/app requires this line.
DEVICE_PROVISIONED=1
#Enabling certain audio libs.
htc.audio.alc.enable = 1
htc.audio.swalt.enable = 1
#Least amount of RAM that can be given to any application to run.
dalvik.vm.heapsize=48m
#OpenGL 2.x.x
ro.opengles.version = 131072
#this is actually the software composition method. CAF suggests mdp for msm7x27a boards
debug.composition.7x27A.type=mdp
#media.stagefright is nothing but the type of media framework that is being supported and its various properties are in the build.prop. ( type of media playback : local media as well as online streaming like 3gp mpeg mp4 etc etc ).
media.stagefright.enable-player=true
media.stagefright.enable-scan=true
media.stagefright.enable-http=true
media.stagefright.enable-fma2dp=true
media.stagefright.enable-aac=true
media.stagefright.enable-qcp=true
ro.use_data_netmgrd=true
persist.data.ds_fmc_app.mode=0
#It is the pixel format of RGB 565 with a constant value of 4
ro.staticwallpaper.pixelformat=RGB_565
#Something to do with app + data cache.
ro.max.fling_velocity=4000
#HTML Related.
httplive.enable.discontinuity=true
#Some thing with surface flinger hardware, aka our gpu.( probably framerate)
dev.pm.dyn_samplingrate=1
#Probably sampling rate of all media. ( Sound , picture quality etc etc . )
dev.pm.dyn_sample_period=700000
com.qc.hardware=true
#Something to do with the processes of above names.
com.qc.hdmi_out=false
#--
debug.camcorder.disablemeta=0
debug.qctwa.statusbar=1
debug.qctwa.preservebuf=1
debug.enabletr=false
#debug surface flinger hardware. One of the best known tweaks , i.e. GPU Hardware acceleration.
debug.sf.hw=1
#Encoding media quality (jpeg)
ro.media.enc.jpeg.quality=100
#Setupwizard ( google or otherwise ) enabling
ro.setupwizard.mode=OPTIONAL
#Related to Hardware acceleration settings
hwui.print_config=choice
hwui.disable_vsync=true
#By pass setup wizard.
ro.setupwizard.enable_bypass=1
#Media decoding of audio and video of wma and wmv formats respectively.
ro.media.dec.aud.wma.enabled=1
ro.media.dec.vid.wmv.enabled=1
#Sync enabled at bootup.
ro.config.sync=yes
#something to do with phone storage. ( probably install location .. not sure)
ro.phone_storage=0
#hardware platform. msm7x27a.
ro.hw_plat=7x27a
#Hwui
hwui.use.blacklist=true
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Original thread-
[REF] Build prop terminology [INFO]
Click to expand...
Click to collapse
Click to expand...
Click to collapse
CREDITS:
akshat.shenoy for his hard work
Click to expand...
Click to collapse
The Guide is based on @rishabh.raj37 's guide , complete credits go to him.
Moderators please feel free to move the thread if i posted in wrong section
Thanks
Awesome work dude!!!!
:good::good:
That's very interesting. I will give it a try when I have some time
Sent from my Xperia Z using Tapatalk

[GUIDE] Convert Your Nexus into KaliPwn Phone

for other devices follow this
****i am not responsible for your phone or anything you do with aircrack-ng
this guide will help you, do what a $1,295.00 PWN PHONE can!!
{
"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"
}
------------------------------------------------------------------------------------------------
Things You Need
------------------------------------------------------------------------------------------------
1) Nexus 5 (rooted)
2) OTG Cable
3) list of USB supported
.TP-LINK TL-WN722N(confirmed by me & DragonHunt3r)
.Linksys WUSB600N V2 (confirmed by DragonHunt3r)
.TP-LINK TL-WN725N V1 & V2
.ALFA Network AWUS036H
(if you have other wifi usb then just ask ill try to add it into the guide)
4) Ubuntu (to compile kernel)
------------------------------------------------------------------------------------------------
PART A
(Compiling Kernel)
------------------------------------------------------------------------------------------------
Setting up your ubuntu machine
Code:
$ sudo apt-get update
Code:
$ sudo apt-get install oracle-java6-installer
Code:
$ sudo apt-get install git gnupg ccache lzop flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32bz2-1.0 lib32ncurses5-dev x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z1-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc libreadline6-dev lib32readline-gplv2-dev libncurses5-dev bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev squashfs-tools pngcrush schedtool dpkg-dev
Code:
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Code:
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/
create a file /etc/udev/rules.d/51-android.rules (as the root user)
copy paste the below code and save
Code:
# 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>"
# adb protocol on panda (PandaBoard ES)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="d002", 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>"
# adb protocol on grouper/tilapia (Nexus 7)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e42", MODE="0600", OWNER="<username>"
# fastboot protocol on grouper/tilapia (Nexus 7)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e40", MODE="0600", OWNER="<username>"
# adb protocol on manta (Nexus 10)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee2", MODE="0600", OWNER="<username>"
# fastboot protocol on manta (Nexus 10)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee0", MODE="0600", OWNER="<username>"
<username> must be replaced by the actual username of the user who is authorized to access the phones over USB.
Setting correct paths
Code:
gedit android-path.sh
cope paste the code and save it
Code:
export CC=$(pwd)/arm-eabi-4.6/bin/arm-eabi-
export CROSS_COMPILE=$(pwd)/arm-eabi-4.6/bin/arm-eabi-
export ARCH=arm
export SUBARCH=arm
export PATH=$PATH:$(pwd)/andorid_boot_tools_bin
Make it executable and source to current terminal window.
(you need to source it to your current terminal window before you compile)
Code:
$ chmod +x android-path.sh
$ source android-path.sh
Download Source (any kernel source can be used)
ElementalX Kernel Source
Franco.kernel Source
Android Kernel Source
using andoid kernel source
Code:
$ git clone https://android.googlesource.com/kernel/msm.git
Code:
$ cd msm/
$ git branch -a
$ git checkout origin/android-msm-hammerhead-3.4-kitkat-mr2
Code:
$ make hammerhead_defconfig
$ make menuconfig
Adding required drivers
For TP-LINK_TL-WN722N
Code:
quick look in [URL="https://wikidevi.com/wiki/TP-LINK_TL-WN722N"]wikidev[/URL] will tell you that TP-LINK TL-WN722N uses [URL="http://wireless.kernel.org/en/users/Drivers/ath9k_htc"]ath9k_htc[/URL] drivers
Enabling [URL="http://wireless.kernel.org/en/users/Drivers/ath9k"]ath9k[/URL] drivers in kernel
To enable ath9k, you must first enable mac80211 through make menuconfig when compiling your kernel. If you do not know what this means then please learn to compile kernels or rely on your Linux distribution's kernel. Below are the options you need to enable ath9k through make menuconfig.
[CODE]Networking support --->
Wireless --->
< * > cfg80211 - wireless configuration API
< * > Generic IEEE 802.11 Networking Stack (mac80211)
You can then enable ath9k in the kernel configuration under
Code:
Device Drivers --->
[*] Network device support --->
Wireless LAN --->
Atheros Wireless Cards ---->
< * > Atheros 802.11n wireless cards support
< * > Atheros HTC based wireless card support
save and exit menuconfig
check in your .config file if you have them enable(its a hidden file)
Code:
CONFIG_ATH_COMMON=y
CONFIG_ATH9K_HW=y
CONFIG_ATH9K_COMMON=y
CONFIG_ATH9K_HTC=y
[/CODE]
For TP-LINK TL-WN725N V1 & V2
Code:
quick look in [URL="https://wikidevi.com/wiki/TP-LINK_TL-WN725N_v1"]V1[/URL] & [URL="https://wikidevi.com/wiki/TP-LINK_TL-WN725N_v2"]V2[/URL] wikidev will tell you that TP-LINK_TL-WN725N uses [URL="http://wireless.kernel.org/en/users/Drivers/rtl819x"]rtl8192cu[/URL] & [URL="https://github.com/lwfinger/rtl8188eu"]8188eu[/URL] drivers
To enable rtl8192cu & 8188eu, you must first enable rtl8192cu & 8188eu through make menuconfig when compiling your kernel. If you do not know what this means then please learn to compile kernels or rely on your Linux distribution's kernel. Below are the options you need to enable rtl8192cu & 8188eu through make menuconfig.
[CODE]Device Drivers --->
[*] Network device support --->
Wireless LAN --->
[*] Realtek RTL8192CU/RTL8188CU USB Wireless Network Adapter
For Linksys WUSB600N V2
Code:
quick look in [URL="https://wikidevi.com/wiki/Linksys_WUSB600N_v2"]wikidev[/URL] will tell you that WUSB600N V2 uses [URL="http://wireless.kernel.org/en/users/Drivers/rt2800usb"]rt2800usb[/URL] drivers
To enable rt2800usb, you must first enable rt2800usb through make menuconfig when compiling your kernel. If you do not know what this means then please learn to compile kernels or rely on your Linux distribution's kernel. Below are the options you need to enable rt2800usb through make menuconfig.
[CODE]Device Drivers --->
[*] Network device support --->
Wireless LAN --->
Ralink driver support ---->
< * > Ralink rt27xx/rt28xx/rt30xx (USB) support -->
< * > rt2800usb - Include support for rt35xx devices (EXPERIMENTAL) (NEW)
< * > rt2800usb - Include support for unknown (USB) devices
For ALFA Network AWUS036H
Code:
quick look in [URL="https://wikidevi.com/wiki/ALFA_Network_AWUS036H"]wikidev[/URL] will tell you that AWUS036H uses [URL="http://wireless.kernel.org/en/users/Drivers/rtl8187"]rtl8187[/URL] drivers
Enabling [URL="http://wireless.kernel.org/en/users/Drivers/ath9k"]rtl8187[/URL] drivers in kernel
To enable rtl8187, you must first enable rtl8187 through make menuconfig when compiling your kernel. If you do not know what this means then please learn to compile kernels or rely on your Linux distribution's kernel. Below are the options you need to enable rtl8187 through make menuconfig.
[CODE]Networking support --->
Wireless --->
< * > Common routines for IEEE802.11 drivers
< * > Generic IEEE 802.11 Networking Stack (mac80211)
You can then enable rtl8187 in the kernel configuration under
Code:
[CODE]
Device Drivers --->
[*] Network device support --->
Wireless LAN --->
[*] Realtek 8187 and 8187B USB support
save and exit menuconfig[/CODE]
save and exit menuconfig if you dint do it
now your ready to compile
Code:
make -j4
this will take some time to compile
you should get something like this in the end
Code:
Kernel: arch/arm/boot/zImage-dtb is ready
now you need to get a boot.img from any nexus 5 rom and place it in boot_img (create this folder where you earlier downloaded the toolchain and the kernel)
Code:
$ cd .. # if you was in msm directory
$ git clone https://github.com/pbatard/bootimg-tools.git
$ cd bootimg-tools/
$ make
$ cd cpio/
$ gcc mkbootfs.c -o mkbootfs -I../include
$ cd ../..
$ mkdir andorid_boot_tools_bin
$ cd andorid_boot_tools_bin/
$ cp ../bootimg-tools/mkbootimg/mkbootimg .
$ cp ../bootimg-tools/mkbootimg/unmkbootimg .
$ cp ../bootimg-tools/cpio/mkbootfs .
$ cd ..
time to create your own boot
Code:
$ unmkbootimg -i boot_img/boot.img
$ cp msm/arch/arm/boot/zImage-dtb kernel
$ mkbootimg --base 0 --pagesize 2048 --kernel_offset 0x00008000 --ramdisk_offset 0x02900000 --second_offset 0x00f00000 --tags_offset 0x02700000 --cmdline 'console=ttyHSL0,115200,n8 androidboot.hardware=hammerhead user_debug=31 maxcpus=2 msm_watchdog_v2.enable=1' --kernel kernel --ramdisk ramdisk.cpio.gz -o boot.img
install the boot.img to your phone (this wont flash the kernel, it will temporarily boot with this kernel, after you restart you will go back to what ever kernel you had before
Code:
$ adb reboot bootloader
$ sudo fastboot boot boot.img
------------------------------------------------------------------------------------------------
PART B
(setting up your phone)
------------------------------------------------------------------------------------------------
For TP-LINK_TL-WN722N
Code:
download the firmware files [URL="http://wireless.kernel.org/download/htc_fw/1.3/"]here[/URL]
1. htc_7010.fw
2. htc_9271.fw
For TP-LINK TL-WN725N V1 & V2
Code:
Download the firmware files [URL="https://drive.google.com/folderview?id=0Bxm4XqSOJU3YWlVaZ1NFRDF4RTA&usp=sharing"]here[/URL]
For Linksys WUSB600N V2
Code:
Download the firmware files [URL="https://drive.google.com/folderview?id=0Bxm4XqSOJU3YMGZTcjJ2ei10V1k&usp=sharing"]here[/URL]
1. rt2870.bin
For ALFA Network AWUS036H
Code:
hopefully nothing to do here,... if it doesnt work let me know
copy them to your phone
use a file manager with root to copy firmware files to /system/etc/firmware/
install Linux deploy on your phone
fire up linux deploy and go to properties-->Distribution and select kali linux
installation path set to /sdcard/linux.img
hit the install button
after installation click start button
start your favorite ssh program and happy aircrack-ng
(SH credentials are “android” for the username (configured via Linux Deploy) and “changeme” as the password.)
​
hello ... how did you get those two lines of commands on the keyboard ?!
which command are you talking about?
you should use the commands one by one
chiragkrishna said:
which command are you talking about?
you should use the commands one by one
Click to expand...
Click to collapse
If I'm not mistaken, I believe he means your screen shot. In terminal with Ctrl, alt, etc above the keyboard.
you need to install aircrack-ng in kali
i am not going to guide you on how to use kali!! you have to figure it on your own!!
code used in that screenshot,
Code:
$ sudo airmon-ng
$ sudo airmon-ng start wlan1
chiragkrishna said:
you need to install aircrack-ng in kali
i am not going to guide you on how to use kali!! you have to figure it on your own!!
code used in that screenshot,
Code:
$ sudo airmon-ng
$ sudo airmon-ng start wlan1
Click to expand...
Click to collapse
Love this reply.Honestly if u don't know how then you should not be trying it
Sent from my Nexus 5 using Tapatalk
What does this do, get you better WiFi connection in terms of speed/stability?
Search aircrack-ng on Google, you're very far !
Sent from my Nexus 5 using XDA Free mobile app
GT-af said:
Search aircrack-ng on Google, you're very far !
Sent from my Nexus 5 using XDA Free mobile app
Click to expand...
Click to collapse
Well..... It could, just not the way he was probably expecting
Pretty cool tut I must say, I'm wondering, could you make it support aswell the Wusb600n v2 ? that's what I'm currently having as usb wifi
added support for WUSB600N V2
this guide will help you, do what a $1,295.00 PWN PHONE can!!
chiragkrishna said:
added support for WUSB600N V2
this guide will help you, do what a $1,295.00 PWN PHONE can!!
Click to expand...
Click to collapse
Oh woow cool, will test this out when I'm home
Hopefully packet injections etc will work ^.^
parker09 said:
What does this do, get you better WiFi connection in terms of speed/stability?
Click to expand...
Click to collapse
Yes, it turns your Wi-Fi into a 1Gb/s power house regardless of the connection you're on.
To test do this:
1 - hook up your dial-up cable and modem/router/whatever
2 - connect your N5 to that network and try to open www.nike.com
3 - if it takes 10m to load, then you're on the correct network, 56k yay!
4 - flash this
5 - connect to your 56k network
6 - ???
7 - www.nike.com loads in 2s
8 - profit
-----
Nice guide OP
Testing it out right now but there seems togo something weird ?
SIOCSIFFLAGS: No such file or directory
I gave the .bin file privs 644 and when trying airodump it says
Gave wlan1 and mon0 for fun a try... but not working
Kill the processes
867
1263
867
These are the problems..
@chiragkrishna
You know man if it works with tp-link tl wn723n ou wn725n?
...
chiragkrishna said:
Kill the processes
867
1263
867
These are the problems..
Click to expand...
Click to collapse
Killed em and the message dissapeared but it's still not working ?
http://puu.sh/b0BBg/18d9bc170b.png <- click the image
Could the alfa awus036h be compatible in the future?
Orderd now the same as OP (TP-LINK TL-WN722N) and we'll see how it goes

Categories

Resources