[GUIDE] Build Android From Source - Android General

Today, we will be learning how to build android from source! Lets start.​The Android build is routinely tested in-house on recent versions of Ubuntu LTS (10.04), but most distributions should have the required build tools available.​Please note that building on mac osx wont be discussed here.​
Requirements
A Linux or Mac computer. It is also possible to build Android in a virtual machine on unsupported systems such as Windows. If you are running Linux in a virtual machine, you need at least 16GB of RAM/swap and 30GB or more of disk space in order to build the Android tree.
A 64-bit environment is required for Gingerbread (2.3.x) and newer versions, including the master branch. You can compile older versions on 32-bit systems.
30GB of free disk space to complete a single build and up to 100GB or more for a full set of builds. The source download is approximately 8.5GB in size.
Python 2.6 -- 2.7, which you can download from python.org.
GNU Make 3.81 -- 3.82, which you can download from gnu.org,
JDK 6 if you wish to build Gingerbread or newer; JDK 5 for Froyo or older. You can download both from java.sun.com.
Git 1.7 or newer. You can find it at git-scm.com.
Setting up the linux build Environment
Installing the JDK
The Sun JDK is no longer in Ubuntu's main package repository. In order to download it, you need to add the appropriate repository and indicate to the system which JDK should be used.
Please note : Java 6: for Gingerbread and newer.
Code:
$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk
Installing required packages (Ubuntu 10.04 - 11.10)
You will need a 64-bit version of Ubuntu. Ubuntu 10.04 is recommended. Building using a newer version of Ubuntu is currently only experimentally supported and is not guaranteed to work on branches other than master.
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:
$ sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so
On Ubuntu 11.10
Code:
$ sudo apt-get install libx11-dev:i386
Configuring USB Access
Under GNU/linux systems (and specifically under Ubuntu systems), regular users can't directly access USB devices by default. The system needs to be configured to allow such access.
The recommended approach is to create a file /etc/udev/rules.d/51-android.rules (as the root user) and to copy the following lines in it. <username> must be replaced by the actual username of the user who is authorized to access the phones over USB.
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>"
# 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>"
NOTE : Those new rules take effect the next time a device is plugged in. It might therefore be necessary to unplug the device and plug it back into the computer.​
Setting up ccache
Put the following in your .bashrc or equivalent.:
Code:
export USE_CCACHE=1
By default the cache will be stored in ~/.ccache. If your home directory is on NFS or some other non-local filesystem, you will want to specify the directory in your .bashrc as well.
Code:
export CCACHE_DIR=<path-to-your-cache-directory>
The suggested cache size is 50-100GB. You will need to run the following command once you have downloaded the source code:
Code:
prebuilts/misc/linux-x86/ccache/ccache -M 50G
When building Ice Cream Sandwich (4.0.x) or older, ccache is in a different location:
Code:
prebuilt/linux-x86/ccache/ccache -M 50G
This setting is stored in the CCACHE_DIR and is persistent.
--- > Please note : By default, the output of each build is stored in the out/ subdirectory of the matching source tree.​
Downloading the Source
The Android source tree is located in a Git repository hosted by Google. This document describes how to download the source tree for a specific Android code-line.
Installing Repo
Repo is a tool that makes it easier to work with Git in the context of Android.
TO install repo:
1. Make sure you have a bin/ directory in your home directory and that it is included in your path:
Code:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
2. Download the Repo tool and ensure that it is executable:
Code:
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
Initializing a Repo client
After installing Repo, set up your client to access the Android source repository:
1. Create an empty directory to hold your working files.
Code:
$ mkdir WORKING_DIRECTORY
$ cd WORKING_DIRECTORY
2. Run repo init to bring down the latest version of Repo with all its most recent bug fixes. You must specify a URL for the manifest, which specifies where the various repositories included in the Android source will be placed within your working directory.
Code:
$ repo init -u https://android.googlesource.com/platform/manifest
3. When prompted, configure Repo with your real name and email address. To use the Gerrit code-review tool, you will need an email address that is connected with a registered Google account. Make sure this is a live address at which you can receive messages. The name that you provide here will show up in attributions for your code submissions.​
Downloading the Android Source Tree
To pull down the Android source tree to your working directory from the repositories as specified in the default manifest, run
Code:
$ repo sync
The Android source files will be located in your working directory under their project names.​
Building the System
Choosing a Branch
Some of the requirements for your build environment are determined by which version of the source code you plan to compile.
See Codenames, Tags, and Build Numbers for a full listing of branches you may choose from. You may also choose to download and build the latest source code (called "master"), in which case you will simply omit the branch specification when you initialize the repository.​
Initialize
Initialize the environment with the envsetup.sh script. Note that replacing "source" with a single dot saves a few characters, and the short form is more commonly used in documentation.
Code:
$ source build/envsetup.sh
Choose a Target
Choose which target to build with lunch. The exact configuration can be passed as an argument, e.g.
Code:
$ lunch full-eng
The example above refers to a complete build for the emulator, with all debugging enabled.
All build targets take the form BUILD-BUILDTYPE, where the BUILD is a codename referring to the particular feature combination. Here's a partial list:
{
"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"
}
and the BUILDTYPE is one of the following:
​
Build the Code
Build everything with make. GNU make can handle parallel tasks with a -jN argument, and it's common to use a number of tasks N that's between 1 and 2 times the number of hardware threads on the computer being used for the build
Code:
$ make -jN
You can either run your build on an emulator or flash it on a device. Please note that you have already selected your build target with lunch, and it is unlikely at best to run on a different target than it was built for.
Flash a Device
To flash a device, you will need to use fastboot, which should be included in your path after a successful build. Place the device in fastboot mode either manually by holding the appropriate key combination at boot, or from the shell with
Code:
$ adb reboot bootloader
Once the device is in fastboot mode, run
Code:
$ fastboot flashall -w
The -w option wipes the /data partition on the device; this is useful for your first time flashing a particular device, but is otherwise unnecessary.​
Emulate an Android Device
The emulator is added to your path automatically by the build process. To run the emulator, type
Code:
$ emulator
Using ccache
ccache is a compiler cache for C and C++ that can help make builds faster. In the root of the source tree, do the following:
Code:
$ export USE_CCACHE=1
$ export CCACHE_DIR=/<path_of_your_choice>/.ccache
$ prebuilts/misc/linux-x86/ccache/ccache -M 50G
Note : The suggested cache size is 50-100G.
Note 2 : You can watch ccache being used by doing the following:
Code:
$ watch -n1 -d prebuilts/misc/linux-x86/ccache/ccache -s[/B]
​

Reserved
Reserved for updates

Last one
I would like to keep this one

Bahalshsjshsijwghwowbbapbfnaoabbdms
(Deleted)

Related

Install Android SDK / JDK / ADB on Linux 11.04

1.Get root permission.
2.Install x32 libs if you are running on a x64
Code:
apt-get install ia32-libs
3.Install sun JDK - Aprox 25 mins in 56k line
Code:
apt-get install sun-java6-jdk
4.Install eclipse -Aprox 1hr in 56k line
Code:
sudo apt-get install eclipse
5.Now open up Eclipse, and go to:
Help Menu -> Install New Software
* Add:
Code:
https://dl-ssl.google.com/android/eclipse/
http://download.eclipse.org/datatools/updates
http://download.eclipse.org/webtools/updates/
http://download.eclipse.org/modeling/emf/updates/releases/
http://download.eclipse.org/tools/gef/updates/releases/
http://dl.google.com/eclipse/plugin/3.5
Install these packages, and then you can install adt plugin as well.
6.Download Android SDK from
http://developer.android.com/sdk/index.html
7.Now open a terminal again and go to the directory where you've saved the Android SDK
Code:
cd /home/*username*/Desktop
8.Uncompress it.
Code:
tar xvfz android-sdk_r12-linux_x86.tgz
9.Delete the archive file to save some space
Code:
rm android-sdk_r12-linux_x86.tgz
10.Move extracxted file to your home directory.
Code:
mv android-sdk-linux_86 /home/*username*
11.Make and edit /etc/udev/rules.d/##-android.rules
Code:
sudo gedit /etc/udev/rules.d/##-android.rules
## = 50 if you are running Gusty/Hardy/Dapper (50-android.rules) or with the number 70 if you are running Karmic Koala/Lucid Lynx/Maverick Meerkat(70-android.rules)
12.in ##-android.rules Add line as follow
For Gusty/Hardy:
Code:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
For Dapper:
Code:
SUBSYSTEM=="usb_device", SYSFS{idVendor}=="0bb4", MODE="0666"
For Karmic Koala:
Code:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
For Lucid Lynx:
Code:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
For Maverick Meerkat:
Code:
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666"
**NOTE: In the above lines the code ”0bb4″ refers to a HTC device. If your phone is from a different manufacturer, replace the code with the appropriate
Code:
Acer - 0502
Dell - 413c
Foxconn - 0489
Garmin-Asus - 091E
HTC (Older Phones) - 0bb4
HTC (Newer phones) - 18d1
Huawei - 12d1
Kyocera - 0482
LG - 1004
Motorola - 22b8
Nexus One/S - 18d1
Nvidia - 0955
Pantech - 10A9
Samsung - 04e8
Sharp - 04dd
Sony Ericsson - 0fce
ZTE - 19D2
**NOTE: If you copy one of the lines mentioned above, make sure you replace the quotation marks with the ones in your keyboard, as these have different display code and it might give you a “no permissions” error.
13.Execute ##-android.rules:
Code:
sudo chmod a+rx /etc/udev/rules.d/70-android.rules
14.Reboot
**To run ADB you need to add an environment variable to your bashrc file.
15.Open a terminal window and type:
Code:
sudo gedit .bashrc
16.Add the following line at the end of the page:
Code:
export PATH=$PATH:/home/grainier/android-sdk-linux_x86/Platform-tools
17.Save and close
18.To make sure everything works perfect, type adb devices in a terminal window with your phone plugged in.
If you see a serial number pop up that means you are done. Should look something like this:
List of devices attached
HT99PHF***** device
**If for some reasons when running adb devices gives you a “no permissions” error, try typing the following in terminal
adb kill-server
adb start-server
18.Finally open up Eclipse and Go to Window > Preferences. Select Android, and add the SDK Location: /home/*username*/android-sdk-linux_86
19.Click the Apply and then OK.
**Everything is ready to go.. rest is up to you**
I hope you realize that Debian and Debian-derivatives aren't the only Linux based operating systems in the entire universe.
With Ubuntu's recent decision to no longer include Sun Java SDK in their repositories, this post needs an update. I've just completed an install of the Android Dev Environment following this guide, but as the Sun Java SDK has been removed from the Ubuntu Respositories, is installed the Open Java JKDK. It seems to work OK, although only time will tell as I do more Android development.
To download and install the Open Java SKD on a variety of Linux distros follow the instructions appropriate to your Linux Distro on the following link (add dots to replace the spaces in the following address. Sorry as a new poster, I can't post external links.)
openjdk java net

[SOLVED][Q]Adb + Ubuntu 12.04

Hi all,
I'm new user of the One S.
I want can run adb in ubuntu 12.04, but isn't work, i'm not root, rom stock after power on at the first time
Code:
sudo gedit /etc/udev/rules.d/[COLOR="Red"]70[/COLOR]-android.rules or sudo gedit /etc/udev/rules.d/[COLOR="Red"]51[/COLOR]-android.rules
with this in
Code:
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"
i'm restart UDEV or Reboot computer
and the result is same at any time
Code:
adb devices
List of devices attached
???????????? no permissions
Any one can help me?
SOLUCE
Code:
sudo gedit /etc/udev/rules.d/99-android.rules
Code:
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", ATTRS{idProduct}=="0cec", MODE="0666"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bb4", ATTRS{idProduct}=="0cec"
TEST=="/var/run/ConsoleKit/database", \
RUN+="udev-acl --action=$env{ACTION} --device=$env{DEVNAME}"
Code:
sudo chmod a+rx /etc/udev/rules.d/99-android.rules
Code:
reboot
Code:
~$ adb devices
List of devices attached
SH24SW405437 device
s
If this not work add
Code:
sudo gedit /.android/adb_usb.ini
Code:
0bb4
Code:
reboot
this worked for me
This worked for me (Kubuntu 12.04):
Type the following commands:
Code:
cd /etc/udev/rules.d/
Code:
sudo vim 51-android.rules
Press
Code:
i
to edit, then paste the following text:
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4",ATTR{idProduct}=="0cba", MODE="0666"
Click to expand...
Click to collapse
press Esc key, then
Code:
wq
m!k3 said:
Hi all,
I'm new user of the One S.
I want can run adb in ubuntu 12.04, but isn't work, i'm not root, rom stock after power on at the first time
Code:
sudo gedit /etc/udev/rules.d/[COLOR="Red"]70[/COLOR]-android.rules or sudo gedit /etc/udev/rules.d/[COLOR="Red"]51[/COLOR]-android.rules
with this in
Code:
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"
i'm restart UDEV or Reboot computer
and the result is same at any time
Code:
adb devices
List of devices attached
???????????? no permissions
Any one can help me?
Click to expand...
Click to collapse
Have you tried Knives-and-Forks Tools for linux user try with sudo <command>
adb works on Ubuntu 12.04LTS
x1123 said:
Have you tried Knives-and-Forks Tools for linux user try with sudo <command>
Click to expand...
Click to collapse
On Ubuntu 12.04LTS
step 1:
use lsusb command to find out your devices's ID:
lsusb
Bus 003 Device 007: ID 18d1:d002 Google Inc.
step2:
add a line in the /etc/udev/rulers.d/xx-android.rules using the ID found in step 1.
http://source.android.com/source/initializing.html
Configuring USB Access
Under GNU/linux systems (and specifically under Ubuntu systems), regular users can't directly access USB devices by default. The system needs to be configured to allow such access.
The recommended approach is to create a file /etc/udev/rules.d/51-android.rules (as the root user) and to copy the following lines in it. <username> must be replaced by the actual username of the user who is authorized to access the phones over USB.
# adb protocol on passion (Nexus One)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e12", MODE="0600", OWNER="<username>"

How to compile Jelly Bean from Source [UBUNTU]

Hey there! I know the current situation in the i9003. We have a functional but not full ICS and now we need kernel 3.X to make everything work perfectly. Dhiru is working hard, he made a very very good work but he cannot do more until hillbeast finishes a bootable 3.0 kernel. A few hours ago, JB Source Code was released and now it can be compiled from source. I have read a good tutorial made by dastin1015 which explains how to do that. I say THIS IS NOT MY WORK (obviously) so credits go for him.
If somebody knows how to do that, please, try it. Probably we will be saving a lot of time for further development. Only to make it boot in a i9003 is a big step and a big contribution for the community. Here are the steps:
GUIDE - HOW TO COMPILE JB ON UBUNTU FROM SOURCE​
To compile Jellybean on Ubuntu I'm going to first give you steps to set up your computer to get this thing rolling. Also note that this appears to be a development preview source code.
This will NOT make a fully functional ROM, but will give you a place to start. Also I CANNOT fix every error you run into.
Note: The source download is approximately 6GB in size. You will need 25GB free to complete a single build, and up to 80GB (or more) for a full set of builds.
1) You need the following:
-JDK 6 if you wish to build Jellybean. You can download it from java.sun.com. Or:
Code:
$ sudo apt-get install sun-java6-jdk
-Python 2.4 -- 2.7, which you can download from python.org. Or:
Code:
$ sudo apt-get install python
-Git 1.7 or newer. You can find it at git-scm.com. Or:
Code:
$ sudo apt-get install git-core
2) Install required packages. 64-bit (recommended)
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
On newer versions of Ubuntu such as 11.10 you may need to do the following:
Code:
$ sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so
Building on Ubuntu 12.04 is currently only experimentally supported and is not guaranteed to work on branches other than master.
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
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
3) Configure your USB.
Code:
$ gksudo gedit /etc/udev/rules.d/51-android.rules
Inside of this blank text file insert:
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:
$ sudo chmod a+r /etc/udev/rules.d/51-android.rules
5) Install the repo:
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:
$ mkdir WORKING_DIRECTORY
$ cd WORKING_DIRECTORY
$ repo init -u https://android.googlesource.com/platform/manifest -b jb-dev
7) When prompted, enter your real name and email address.
8) Gather the files:
Code:
$ repo sync
9) Compiling:
Code:
$ source build/envsetup.sh
Or:
Code:
$ . build/envsetup.sh
10) Issue:
Code:
$ lunch
11) Pick your poison.
12) Now issue (The '#' is the number of cores your processor has plus 1, ex. I have a dual core processor so I type 'make -j3':
Code:
$ make -j#
~How To Add A Device To The List~
1) Find the github for your device you wish to add. (For me it is the HTC Evo 3D CDMA)
2) Now navigate to the location you are going clone the device tree to:
Code:
$ cd WORKING_DIRECTORY/device
$ mkdir htc
3) Clone the github device tree from remote to local: (The shooter would be whatever you want that folder to be named so make sure it is whatever standard name would be for your device, example: Nexus One [passion], Nexus S [crespo], Motorola Droid [sholes], HTC Incredible [inc], etc.)
Code:
$ git clone git://github.com/CyanogenMod/android_device_htc_shooter.git shooter
4) Now navigate into the folder:
Code:
$ cd shooter
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
7) Navigate back to your home directory for building:
Code:
$ cd ~/WORKING_DIRECTORY
8) Prepare To Compile:
Code:
$ source build/envsetup.sh
Or:
Code:
$ . build/envsetup.sh
9) Get your list of devices:
Code:
$ lunch
10) Pick your poison.
11) Now compile:
Code:
$ make -j#
Or for a flashable zip:
Code:
$ make -j# otapackage
~NOTE~
If you are running into issues such as:
Code:
Which would you like? [full-eng] 5
build/core/product_config.mk:209: *** No matches for product "full_shooter". Stop.
Device shooter not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).
Repository for shooter not found in the CyanogenMod Github repository list. If this is in error, you may need to manually add it to your local_manifest.xml.
build/core/product_config.mk:209: *** No matches for product "full_shooter". Stop.
** Don't have a product spec for: 'full_shooter'
** Do you have the right repo manifest?
What you need to do is to edit your blob to match the PRODUCT_NAME to the file name. For example with mine I have full_shooter.mk therefore in this file I need to have PRODUCT_NAME to match it. Whatever error it is looking for you just need to change the PRODUCT_NAME line to match what the error shows.
Source​
Hope it helps for our development, and again, if u know how to do that, please try
Click to expand...
Click to collapse
luiseteyo said:
Hey there! I know the current situation in the i9003. We have a functional but not full ICS and now we need kernel 3.X to make everything work perfectly. Dhiru is working hard, he made a very very good work but he cannot do more until hillbeast finishes a bootable 3.0 kernel. A few hours ago, JB Source Code was released and now it can be compiled from source. I have read a good tutorial made by dastin1015 which explains how to do that. I say THIS IS NOT MY WORK (obviously) so credits go for him.
If somebody knows how to do that, please, try it. Probably we will be saving a lot of time for further development. Only to make it boot in a i9003 is a big step and a big contribution for the community. Here are the steps:
GUIDE - HOW TO COMPILE JB ON UBUNTU FROM SOURCE​
To compile Jellybean on Ubuntu I'm going to first give you steps to set up your computer to get this thing rolling. Also note that this appears to be a development preview source code.
This will NOT make a fully functional ROM, but will give you a place to start. Also I CANNOT fix every error you run into.
Note: The source download is approximately 6GB in size. You will need 25GB free to complete a single build, and up to 80GB (or more) for a full set of builds.
1) You need the following:
-JDK 6 if you wish to build Jellybean. You can download it from java.sun.com. Or:
Code:
$ sudo apt-get install sun-java6-jdk
-Python 2.4 -- 2.7, which you can download from python.org. Or:
Code:
$ sudo apt-get install python
-Git 1.7 or newer. You can find it at git-scm.com. Or:
Code:
$ sudo apt-get install git-core
2) Install required packages. 64-bit (recommended)
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
On newer versions of Ubuntu such as 11.10 you may need to do the following:
Code:
$ sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so
Building on Ubuntu 12.04 is currently only experimentally supported and is not guaranteed to work on branches other than master.
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
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
3) Configure your USB.
Code:
$ gksudo gedit /etc/udev/rules.d/51-android.rules
Inside of this blank text file insert:
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:
$ sudo chmod a+r /etc/udev/rules.d/51-android.rules
5) Install the repo:
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:
$ mkdir WORKING_DIRECTORY
$ cd WORKING_DIRECTORY
$ repo init -u https://android.googlesource.com/platform/manifest -b jb-dev
7) When prompted, enter your real name and email address.
8) Gather the files:
Code:
$ repo sync
9) Compiling:
Code:
$ source build/envsetup.sh
Or:
Code:
$ . build/envsetup.sh
10) Issue:
Code:
$ lunch
11) Pick your poison.
12) Now issue (The '#' is the number of cores your processor has plus 1, ex. I have a dual core processor so I type 'make -j3':
Code:
$ make -j#
~How To Add A Device To The List~
1) Find the github for your device you wish to add. (For me it is the HTC Evo 3D CDMA)
2) Now navigate to the location you are going clone the device tree to:
Code:
$ cd WORKING_DIRECTORY/device
$ mkdir htc
3) Clone the github device tree from remote to local: (The shooter would be whatever you want that folder to be named so make sure it is whatever standard name would be for your device, example: Nexus One [passion], Nexus S [crespo], Motorola Droid [sholes], HTC Incredible [inc], etc.)
Code:
$ git clone git://github.com/CyanogenMod/android_device_htc_shooter.git shooter
4) Now navigate into the folder:
Code:
$ cd shooter
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
7) Navigate back to your home directory for building:
Code:
$ cd ~/WORKING_DIRECTORY
8) Prepare To Compile:
Code:
$ source build/envsetup.sh
Or:
Code:
$ . build/envsetup.sh
9) Get your list of devices:
Code:
$ lunch
10) Pick your poison.
11) Now compile:
Code:
$ make -j#
Or for a flashable zip:
Code:
$ make -j# otapackage
~NOTE~
If you are running into issues such as:
Code:
Which would you like? [full-eng] 5
build/core/product_config.mk:209: *** No matches for product "full_shooter". Stop.
Device shooter not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).
Repository for shooter not found in the CyanogenMod Github repository list. If this is in error, you may need to manually add it to your local_manifest.xml.
build/core/product_config.mk:209: *** No matches for product "full_shooter". Stop.
** Don't have a product spec for: 'full_shooter'
** Do you have the right repo manifest?
What you need to do is to edit your blob to match the PRODUCT_NAME to the file name. For example with mine I have full_shooter.mk therefore in this file I need to have PRODUCT_NAME to match it. Whatever error it is looking for you just need to change the PRODUCT_NAME line to match what the error shows.
Source​
Click to expand...
Click to collapse
Nice efforts! Liked!! You should continue maybe you can be the 1st dev of JB ^^
EDIT: Nevermind.
Anybody is going to try this? Almost all the big devices have a start build of JB. I can't do this so, isnt here any developer who wants to try this?
luiseteyo said:
Anybody is going to try this? Almost all the big devices have a start build of JB. I can't do this so, isnt here any developer who wants to try this?
Click to expand...
Click to collapse
Altough I'm not this device user, but i'm setting up my PC to start building for my LG-P500
And I must say that this is really a very helpful and the easiest guide available apart from the errors I'm going to face while building
luiseteyo said:
Anybody is going to try this? Almost all the big devices have a start build of JB. I can't do this so, isnt here any developer who wants to try this?
Click to expand...
Click to collapse
dhiru1602 said:
CM10 boots. Needs more testing.
Everything as that of CM9 seem to work fine with the only problem being the space on the system partition. It's too low to accommodate the full ROM and Jellybean Google apps. With the release of 3.0 kernel, we will resize the partitions, but as of now I have moved the applications to the data partition on a temporary basis.
Will make a release in a separate thread by the next few days.
Click to expand...
Click to collapse
http://forum.xda-developers.com/showpost.php?p=29018786&postcount=2809
shriomman said:
http://forum.xda-developers.com/showpost.php?p=29018786&postcount=2809
Click to expand...
Click to collapse
Yes i know
Sent from my iPad using Tapatalk HD
Workaround for repo syntax errors
For those getting a syntax error on
Code:
repo init
It's because of Python3 being listed as Python in /usr/bin.
A temporary workaround is to symlink python2 in place of python 3.
Code:
$ mkdir ~/bin
$ ln -s /usr/bin/python2 ~/bin/python
$ export PATH=~/bin:$PATH
Check to see if it worked
Code:
$ which python
And if it returns the binary in ~/bin/python it worked
The solution would either be to symlink python by default or rewrite repo in Python3.

[Tutorial][S4] How to make your very own Jellybean 4.1.1 on the HTC One S!

Hello everyone! I am anxiously awaiting jellybean for our phone and I know that many of you are also, so I decided to make this thread and help speed things up ! I am currently watching my repo sync so I am hard at work developing this for us but other users can work to, so we get it done faster . So if you are not on ubuntu 10 or 11, LEAVE because this is likely not going to work for you . A few things first: 1. the "$" is an indication of the command, there is one $ before every command and it is already in your terminal so do not type it. 2. You may want to copy and paste commands... 3. This will either not boot or have many bugs, as expected.
There are currently 2 JB roms available, here (by me) and here (by djsubtronic)
GENERAL JELLYBEAN THREAD IS HERE
1) First thing is first, install the required packages:
Open terminal and KEEP IT OPEN FOR ALL OF THIS!!!!!!!!!!!!
Code:
$ sudo apt-get install openjdk-6-jdk
$ sudo apt-get install python
$ sudo apt-get install git-core
Next, download the android sdk for linux and extract it to your home directory. Name it "android-sdk" (without the quotes) for simplicity. In you home folder, show the hidden files (hit Ctrl + H). Open the .bashrc file in the text editor. Add the following lines at the bottom (end) of it:
Code:
# Android tools
export PATH=${PATH}:~/android-sdk/tools
export PATH=${PATH}:~/android-sdk/platform-tools
export PATH=${PATH}:~/bin
Save it and then go back to the home folder. Edit the .profile file and add this to the end:
Code:
PATH="$HOME/android-sdk/tools:$HOME/android-sdk/platform-tools:$PATH"
You now have the sdk installed. In your terminal, enter:
Code:
$ cd android-sdk
$ android
When the sdk manager pops up, download platform-tools, and update the tools folder if needed.
If it does not pop up, try one the following 3 commands and see if it does:
Code:
$ cd tools
$ android
Or
Code:
$ cd platfrom-tools
$ android
Code:
$ cd
$ android
And if none of those bring up the manager, close your terminal window. Then open terminal and type:
Code:
$ android
MORE FILES?!?!?! Yes.
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
$ sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so
$ 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
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Finally! Past the downloads (for now... wait for the repo sync)
2) Configure the usb:
Code:
$ gksudo gedit /etc/udev/rules.d/51-android.rules
In the blank text field, paste the following:
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"
Save the new text file and close it. Enter this command in your terminal window:
Code:
$ sudo chmod a+r /etc/udev/rules.d/51-android.rules
3) Installing the repo:
Code:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
4) Initialize (init) the repo:
Code:
$ mkdir WORKING_DIRECTORY
$ cd WORKING_DIRECTORY
$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.1.1_r1
or, if you want to do CM10, replace the last line (repo init -u blahblahblah) with:
Code:
$ repo init -u git://github.com/CyanogenMod/android.git -b jellybean
4.5) If you already have the repo initialized and all of the above done, and are just starting over, do this:
Code:
$ cd WORKING_DIRECTORY
$ repo init -b android-4.1.1_r1
$ repo sync
Don't do it if you are starting new.
5) Sync the needed files (repo)
Code:
$ repo sync -j1
When it asks, enter your REAL name and email
6) Compile:
Code:
$ source build/envsetup.sh
or
Code:
$ . build/envsetup.sh
7) Who's hungry?
Code:
$ lunch
Seriously, you have to!
8) Adding HTC One S (ville) to the list
Code:
$ cd WORKING_DIRECTORY/device
$ mkdir htc
$ cd htc
9) I have no name for this (github sync )
Code:
$ git clone git://github.com/intervigilium/android_device_htc_ville.git -b jellybean-ril ville
or
Code:
$ git clone git://github.com/intervigilium/android_device_htc_ville.git -b jellybean ville
10) Navigate to "ville"
Code:
$ cd ville
11) Connect your HTC One S to the computer and verify that adb is working (usb debugging) and once that is verified do this:
Code:
$ ./extract-files.sh
You can disconnect after this is done.
11.5) Every .cpp file in device/htc/ville/libsensors needs these lines to be added after the #includes section:
Code:
#define LOGE
#define LOGE_IF
The following lines must be added to /device/htc/ville/liblights/lights.c after the #includes section:
Code:
#define LOGE
#define LOGE_IF
#define LOGV
(Thanks to djsubtronic for this step!)
12) Time to build!
Code:
$ cd ~/WORKING_DIRECTORY
then:
Code:
$ source build/envsetup.sh
or
Code:
$ . build/envsetup.sh
13) Verify the ville is there:
Code:
$ lunch
14) Choose from the list
15) Compile!
The # stand for the number of cores plus one (Example: my VAIO has 2 cores so I do -j3, if it were quad core I would do -j5)
Code:
$ make -j#
Flashable zip command (instead of above command):
Code:
$ make -j# otapackage
Thanks to dastin1015 for this (Look at it for a general build): http://forum.xda-developers.com/showthread.php?t=1762641
Thanks to everyone with a ville github account!
Post your results in this thread. Also, ask questions here too!
If I have done something wrong, just tell me politely what it is and I will fix it. It is late here and this is a long thread so there is likely at least one mistake. Thanks!
ERRORS AND FIXES:
Code:
build/core/product_config.mk:205: *** No matches for product "device_ville". Stop.
** Don't have a product spec for: 'device_ville'
** Do you have the right repo manifest?
Add this:
Code:
PRODUCT_NAME := device_ville
PRODUCT_DEVICE := ville
PRODUCT_BRAND := Android
PRODUCT_MODEL := Full Android on ville
to the bottom (end) of device_ville.mk
Ville does not show up in lunch menu? Make the file "vendorsetup.sh". Edit it and add this:
Code:
add_lunch_combo device_ville-userdebug
Nice
Enviado desde mi HTC One S usando Tapatalk 2
Reserved for fixes and updates
Nice one.
You can add that every .cpp file in device/htc/ville/libsensors needs these lines to be added after the #includes section:
Code:
#define LOGE
#define LOGE_IF
djsubtronic said:
Nice one.
Click to expand...
Click to collapse
I'll post pictures tomorrow or the next day
djsubtronic said:
Nice one.
You can add that every .cpp file in device/htc/ville/libsensors needs these lines to be added after the #includes section:
Code:
#define LOGE
#define LOGE_IF
Click to expand...
Click to collapse
How would I say that (under what step do you recommend)
BiteBlaze said:
How would I say that (under what step do you recommend)
Click to expand...
Click to collapse
Needs to be done before make, so I would say just before the build steps.
djsubtronic said:
Needs to be done before make, so I would say just before the build steps.
Click to expand...
Click to collapse
I'll add that now
I won't be able to post pictures until monday so if anyone has screenshots of the terminal window at certain points in the instructions, email me. Goodnight and good luck!
Has anybody tried doing this?
Reviewers said:
Has anybody tried doing this?
Click to expand...
Click to collapse
There is a check the general sections topic on Jelly Bean. There are plenty of people trying. The only one with a booting build thus far is Team Liquid's Nocoast.
Why doesn't it work on ubuntu 10.04?
Add to OP after the libsensors bit:
The following lines must be added to /device/htc/ville/liblights/lights.c after the #includes section
Code:
#define LOGE
#define LOGE_IF
#define LOGV
---------- Post added at 12:31 PM ---------- Previous post was at 12:03 PM ----------
Stuck on this:
in function wpa_driver_nl80211_ops:driver_nl80211.c(.data.rel. ro.wpa_driver_nl80211_ops+0x1c8): error: undefined reference to 'wpa_driver_nl80211_driver_cmd'
Added this line to device/htc/ville/BoardConfig.mk: BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_wl12xx
and then got another error...
make: *** No rule to make target `out/target/product/ville/obj/STATIC_LIBRARIES/lib_driver_cmd_wl12xx_intermediates/lib_driver_cmd_wl12xx.a', needed by `out/target/product/ville/obj/EXECUTABLES/wpa_supplicant_intermediates/LINKED/wpa_supplicant'. Stop.
How to get that file?
Alie360 said:
Why doesn't it work on ubuntu 10.04?
Click to expand...
Click to collapse
It does. It doesn't work on 12
~ BiteBlaze via HTC One S... If I have helped you out, hit the Thanks button
BiteBlaze said:
It does. It doesn't work on 12
~ BiteBlaze via HTC One S... If I have helped you out, hit the Thanks button
Click to expand...
Click to collapse
You wrote "So if you are not on ubuntu 10 or 11, LEAVE because this is likely not going to work for you "...
I was assuming it was working only on 12
Alie360 said:
You wrote "So if you are not on ubuntu 10 or 11, LEAVE because this is likely not going to work for you "...
I was assuming it was working only on 12
Click to expand...
Click to collapse
Haha ok I get it you had it backwards. I mean that only people on 10 or 11 can do this ("If you are NOT on ubuntu 10 or 11, this is likely not going to work for you)
djsubtronic said:
Add to OP after the libsensors bit:
The following lines must be added to /device/htc/ville/liblights/lights.c after the #includes section
Code:
#define LOGE
#define LOGE_IF
#define LOGV
---------- Post added at 12:31 PM ---------- Previous post was at 12:03 PM ----------
Stuck on this:
in function wpa_driver_nl80211_ops:driver_nl80211.c(.data.rel. ro.wpa_driver_nl80211_ops+0x1c8): error: undefined reference to 'wpa_driver_nl80211_driver_cmd'
Added this line to device/htc/ville/BoardConfig.mk: BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_wl12xx
and then got another error...
make: *** No rule to make target `out/target/product/ville/obj/STATIC_LIBRARIES/lib_driver_cmd_wl12xx_intermediates/lib_driver_cmd_wl12xx.a', needed by `out/target/product/ville/obj/EXECUTABLES/wpa_supplicant_intermediates/LINKED/wpa_supplicant'. Stop.
How to get that file?
Click to expand...
Click to collapse
Added to the OP. Did you find the file?
BiteBlaze said:
Added to the OP. Did you find the file?
Click to expand...
Click to collapse
I undid the change from BoardConfig.mk
http://translate.google.co.uk/trans...a=X&ei=crACUOCNFOeY1AXcxNWzBw&ved=0CHAQ7gEwCQ
That link has a link to a git that has drivers for the nl80211, wpa_supplicant, and hostapd. Trying to get it to work using those files.
djsubtronic said:
I undid the change from BoardConfig.mk
http://translate.google.co.uk/trans...a=X&ei=crACUOCNFOeY1AXcxNWzBw&ved=0CHAQ7gEwCQ
That link has a link to a git that has drivers for the nl80211, wpa_supplicant, and hostapd. Trying to get it to work using those files.
Click to expand...
Click to collapse
Good. I will try tomorrow. I am glad to say they are upgrading my internet to about 15MBs! I should get a good build on monday
villainhalf said:
There is a check the general sections topic on Jelly Bean. There are plenty of people trying. The only one with a booting build thus far is Team Liquid's Nocoast.
Click to expand...
Click to collapse
I think I will post a link to the general thread in the OP. Nocoast refuses to release it or give us any more info... hopefully some info comes today... maybe screenshots? Or hopefully what the issues are and maybe a logcat

[GUIDE] Convert Any Phone/Tablet into KaliPwn Phone/Tablet

****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!!
*this guide is based on nexus 5 you can substitute it with any phone/tablet(with otg support) with this guide
------------------------------------------------------------------------------------------------
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)
1. HTC
2. Samsung
3. LG
4. Sony
5. Nexus devices
using nexus 5 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
save and exit menuconfig[/CODE]
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 {your device} 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
(this is for nexus 5 it might work for others also)
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 both of them 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.)
​
can u add it for d-link dwa-123
i just want to say you are my hero :good:
ummmm.... super interesting....
you think that work reaver???
this is amazing, does device compatibility play a role with LG G2? I know it doesn't have support for that one wifi monitoring thing on stock anyways.
Hello, it is possible to convert à galaxy s6 into KaliPwn phone? I have the 5.0.2 firmware and origin kernel, can i install? The franco kernel. Thank you very much for your answers
This is really insteresting but also a bit old. Can anyone confirm this still works or redirect me to an updated version of this guide?

Categories

Resources