Feeds:
Posts
Comments

Archive for the ‘FOSS’ Category

What is Nginx ?

nginx [engine x] is an HTTP and reverse proxy server, a mail proxy server, and a generic TCP/UDP proxy server, originally written by Igor Sysoev. For a long time, it has been running on many heavily loaded Russian sites including Yandex, Mail.Ru, VK, and Rambler. According to Netcraft, nginx served or proxied 27.80% busiest sites in October 2016. Here are some of the success stories: Netflix, WordPress.com, FastMail.FM.

The sources and documentation are distributed under the 2-clause BSD-like license.

Community website here.

Commercial support is available from Nginx, Inc.

How to Install Nginx from Ubuntu repository ?

sudo apt-get install nginx
nginx -v
nginx version: nginx/1.4.6

Here 1.4.6 is very old and stable release of Nginx. So then how to install the latest version.

Install Nginx Version 1.9.x/1.10.x/1.11.x:

Add repository URLs to “/etc/apt/sources.list.d/nginx.list”
deb http://nginx.org/packages/mainline/ubuntu/ trusty nginx
debsrc http://nginx.org/packages/mainline/ubuntu/ trusty nginx

Now add nginx signing key

wget q O http://nginx.org/keys/nginx_signing.key | sudo aptkey add

Update your system to latest package in nginx repos
sudo apt-get update
Install latest nginx
sudo apt-get install nginx
Now you can see v1.11.5 has been installed on you machine
nginx -v
nginx version: nginx/1.11.5
Advertisements

Read Full Post »

Requirements:

  • OpenSSL installed in Ubuntu
  • Following details for your SSL certificate
    • Country (2 digit ex, IN)=MY,
    • State or =Malaysia,
    • Locality or City=Kuala Lumpur,
    • Organization Name=Marutham Infra Services Sdn Bhd,
    • Organizational Unit Name=Cloud and Advance Services,
    • Common Name (e.g. server FQDN)=maruthuminfra.com.my

Generate CSR:

  • Now Generate Certificate Signing Request (CSR), It also generates Private Key file(Make sure it is protected and no one has access to this file). We use RSA 2048 bit Encryption with SHA256 Hashing algorithm as shown below.
  • openssl req -new -newkey rsa:2048 -nodes -sha256 -out test.csr -keyout test.key -subj “/C=MY/ST=Malaysia/L=Kuala Lumpur/O=Marutham Infra Services Sdn Bhd/OU=Cloud and Advance Services/CN=maruthaminfra.com.my”

  • CSR generation done. Now you may send you CSR file to CA Issuer.
  • Next Install SSL at Load balancer or WebServer or Proxy Server or Application Server where you SSL is getting terminated.

Any Questions, Please comment below

யாதும் ஊரே யாவரும் கேளிர் – புறநானூறு

Read Full Post »

வணக்கம், உங்களுடைய ஆண்ட்ராய்டு கைப்பேசி அல்லது கணினியில் பயர்பாக்ஸ் உலாவியை தமிழில் எப்படி நிறுவிப் பயன்படுத்துவது

 

சோதிக்கப்பட்ட கருவி – Samsung – Galaxy Nexus – Android OS – பதிப்பு 4.3

 

உங்களுடைய கைப்பேசியை யூஎஸ்பி(USB-Debugging) கம்பியின் மூலம் கணினியுடன் இணைக்கவும்.

பிறகு கைப்பேசியின் அமைவுகளில் அதாவது settings ல் (USB Debugging Enable) வழுநீக்க முறைமை செயற்பாட்டில் உள்ளதா என சரி பார்க்கவும்.

இல்லையன்றால் அதை செயற்படுத்தவும்(Enable).

Screenshot_2014-05-05-02-25-11

௧) தேவையான மென்பொருட்கள்

அ) android-tools – provide “adb”

ஆ) ஆணட்ராய்டு இயங்குதள பதிப்பு – 4.1.x அதற்கும் கூடுதலாக

 

௨) டெபியன்/உபுண்டு/பெடோரா இயங்குதளங்களில் – நிறுவல்

 

sudo apt-get install android-tools             #உபுண்டு

su –                                                      #பெடாேராவில் நீங்கள் root  – பயனராக மாறுதல் அவசியம்.

yum install android-tools                         #பெடாேரா

௩) ஆண்ட்ராய்டு இயங்குதளத்திற்க்கான சோதனை ஓட்ட

பயர்பாக்ஸ்-தமிழ்: பதிவிறக்கும் முறை

 

இங்கே சொடுக்கவும்: http://ftp.mozilla.org/pub/mozilla.org/mobile/nightly/latest-mozilla-aurora-android-l10n/fennec-31.0a2.ta.android-arm.apk

#ta என்றால் -Tamil அதுப்போல

 

இந்திய நாட்டு மொழிகள்

#te-தேலுங்கு

#hi-ஹிந்தி

#kn-கன்னடா

#ml-மலையாளம்

#mr-மராத்தி

#bn-பெங்காலி

#or-ஒரியா

 

பிற நாட்டு மொழிகள்

#ja-ஜப்பானியம்

#ms-மலாயா

 

பல்வேறு மொழிகளில் பயர்பாக்ஸ் வெளியிடப்பட்டுள்ளதால் – கீழ்கண்ட இணையப்பக்கத்தில் இருந்து உங்கள் தாய்மொழிக்கான apk கோப்பை பதிவிறக்கி சோதனை செய்யவும்.

http://ftp.mozilla.org/pub/mozilla.org/mobile/nightly/latest-mozilla-aurora-android-l10n/

உதாரணமாக தமிழ் மொழிக்கான கோப்பின் பொயர்: fennec-31.0a2.ta.android-arm.apk

 

௪) ஆண்ட்ராய்டு கைப்பேசியில் எப்படி பயர்பாக்ஸ்-தமிழ் பதிப்பை நிறுவுவது

 

அ) sudo adb devices            #கைப்பேசி கருவி கணினியுடன் இணைக்கப்பட்டுள்ளதா என பார்க்கவும்.

List of devices attached
01498B300401C006    device

 

ஆ) நீங்கள் apk கோப்பு பதிவிறக்கப்பட்ட அடைவுக்கு செல்ல வேண்டும். கீழேயுள்ளவாறு

cd ~/Downloads            #பாதையை சரியாக உள்ளிடவும்

 

இ) ls *.apk

fennec-31.0a2.ta.android-arm.apk

 

ஈ) sudo adb install fennec-30.0a2.ta.android-arm.apk

415 KB/s (30592328 bytes in 71.927s)
pkg: /data/local/tmp/fennec-31.0a2.ta.android-arm.apk
Success

 

௫)ஆண்ட்ராய்டு – கைப்பேசியில் நேரடியாக

பதிவிறக்கி நிறுவலாம்

 

http://ftp.mozilla.org/pub/mozilla.org/mobile/nightly/latest-mozilla-aurora-android-l10n/ – இணைப்பை சொடுக்கி fennec-31.0a2.ta.android-arm.apk கோப்பை பதிவிறக்கி கீழ்காணுமாறு செய்தால் சுலபமே !

 

Screenshot_2014-05-05-02-30-38Screenshot_2014-05-05-02-30-50

 

 

 

 

 

 

 

 

 

 

 

 

நிறுவியப்பிறகு பயன்பாடுகளில் “Auroa” எனத் தலைப்பிடப்பட்டதை தொட்டு பயர்பாக்ஸ் உலாவி துவங்க வேண்டும்.

பிறகு கீழ்கண்டவாறு உலாவியை தமிழில் காணலாம்.

 

௬) சோதனை: சோதனை மேல் சோதனை போதுமடா சாமி!

 

Screenshot_2014-05-05-02-39-10 Screenshot_2014-05-05-02-47-11 Screenshot_2014-05-05-02-47-19 Screenshot_2014-05-05-02-53-41 Screenshot_2014-05-05-02-39-32 Screenshot_2014-05-05-02-44-54 Screenshot_2014-05-05-02-40-40 Screenshot_2014-05-05-02-41-47 Screenshot_2014-05-05-02-42-00 Screenshot_2014-05-05-02-42-16 Screenshot_2014-05-05-02-40-49 Screenshot_2014-05-05-02-50-41

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

வழு/பிழை ஏதேனும் காணப்பட்டால்

FaceBook – மொசில்லா தமிழ் – Mozilla Tamil தெரியப்படுத்தவும்

மிக்க நன்றி

–அருண்

 

 

 

 

 

 

 

Read Full Post »

கற்க கசடற

 

What is WPA_SUPPLICANT ?

wpa_supplicant is a daemon for wireless connection management on Andorid/Linux OS. You can check your laptop running will be using wpa_supplicant in background.

ps -aef | grep wpa_supplicant

Refer here: wpa_supplicant

 

Download

mkdir -p ~/work; cd ~/work;
wget http://hostap.epitest.fi/releases/wpa_supplicant-2.1.tar.gz
tar  zxvf wpa_supplicant-2.1.tar.gz
cd wpa_supplicant-2.1/
cd wpa_supplicant/
pwd
/home/tulashi/work/wpa_supplicant-2.1/wpa_supplicant

 

Build Environment

Install compilations utilities such as gcc, make etc.

sudo apt-get update

sudo apt-get -y build-dep gcc-4.6 build-essential

 

P2P Configuration

cp defconfig .config
echo “” >> .config
echo “#Arun Kumar: Enabling Modules for Wi-Fi Direct aka P2P” >> .config
echo CONFIG_P2P=y >> .config
echo CONFIG_AP=y >> .config
echo CONFIG_WPS=y >> .config

 

Compilation & Installation

make

You may or may not get errors while compiling the source codes.I have faced following compilation errors and given corresponding solutions for the same as follows

Error#1

#######################################################################
CC  ../src/drivers/driver_wired.c
../src/drivers/driver_nl80211.c:25:31: fatal error: netlink/genl/genl.h: No such file or directory
compilation terminated.
make: *** [../src/drivers/driver_nl80211.o] Error 1
#######################################################################

Solution #1
sudo apt-get -y install libssl-dev libnl-3-dev
echo CFLAGS +=-I/usr/include/libnl3/ >> .config

make

Error#2
../src/drivers/driver_nl80211.c:95:9: warning: passing argument 1 of ‘genl_ctrl_alloc_cache’ from incompatible pointer type [enabled by default]
/usr/include/libnl3/netlink/genl/ctrl.h:25:14: note: expected ‘struct nl_sock *’ but argument is of type ‘struct nl_handle *’
../src/drivers/driver_nl80211.c:95:9: error: too few arguments to function ‘genl_ctrl_alloc_cache’
/usr/include/libnl3/netlink/genl/ctrl.h:25:14: note: declared here

Solution #2

sudo apt-get install libnl-genl-3-dev
echo CONFIG_LIBNL32=y >> .config

make

Now compilation succeeded.

 

wpa_supplicant is really compiled

tulashi@arunx:~/work/wpa_supplicant-2.1/wpa_supplicant$ file wpa_supplicant
wpa_supplicant: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0xd69c0b4bbafd67e19dfc86a66bfffdd10c2e2de8, not stripped

 

Running WPA_SUPPLICANT

 

run wpa_supplicant as daemon

 

Run the compiled wpa_supplicant for command lines options as mentioned below

tulashi@arunx:~/work/wpa_supplicant-2.1/wpa_supplicant$ ./wpa_supplicant -h
wpa_supplicant v2.1
Copyright (c) 2003-2014, Jouni Malinen <j@w1.fi> and contributors

This software may be distributed under the terms of the BSD license.
See README for more details.

This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit (http://www.openssl.org/)

usage:
wpa_supplicant [-BddhKLqqtvW] [-P] [-g] \
[-G<group>] \
-i<ifname> -c [-C] [-D] [-p<driver_param>] \
[-b<br_ifname>] [-e<entropy file>] \
[-o<override driver>] [-O<override ctrl>] \
[-N -i -c [-C] [-D] \
[-p<driver_param>] [-b<br_ifname>] [-I<config file>] …]

drivers:
nl80211 = Linux nl80211/cfg80211
wext = Linux wireless extensions (generic)
wired = Wired Ethernet driver
options:
-b = optional bridge interface name
-B = run daemon in the background
-c = Configuration file
-C = ctrl_interface parameter (only used if -c is not)
-i = interface name
-I = additional configuration file
-d = increase debugging verbosity (-dd even more)
-D = driver name (can be multiple drivers: nl80211,wext)
-e = entropy file
-g = global ctrl_interface
-G = global ctrl_interface group
-K = include keys (passwords, etc.) in debug output
-t = include timestamp in debug messages
-h = show this help text
-L = show license (BSD)
-o = override driver parameter for new interfaces
-O = override ctrl_interface parameter for new interfaces
-p = driver parameters
-P = PID file
-q = decrease debugging verbosity (-qq even less)
-v = show version
-W = wait for a control interface monitor before starting
-N = start describing new interface
example:
wpa_supplicant -Dnl80211 -iwlan0 -c/etc/wpa_supplicant.conf

 

wpa_cli : p2p commands

Wpa_Supplicant needs client to communicate i.e wpa_cli

tulashi@arunx:~/work/wpa_supplicant-2.1/wpa_supplicant$ ./wpa_cli -h
wpa_cli [-pctrl sockets>] [-i] [-hvB] [-a] \
[-P<pid file>] [-g<global ctrl>] [-G<ping interval>]  [command..]
-h = help (show this usage text)
-v = shown version information
-a = run in daemon mode executing the action file based on events from
wpa_supplicant
-B = run a daemon in the background
default path: /var/run/wpa_supplicant
default interface: first interface found in socket path
commands:
status [verbose] = get current WPA/EAPOL/EAP status
ifname = get current interface name
ping = pings wpa_supplicant
relog = re-open log-file (allow rolling logs)
note <text> = add a note to wpa_supplicant debug log
mib = get MIB variables (dot1x, dot11)
help [command] = show usage help
interface [ifname] = show interfaces/select interface
level <debug level> = change debug level
license = show full wpa_cli license
quit = exit wpa_cli
set = set variables (shows list of variables when run without arguments)
get <name> = get information
logon = IEEE 802.1X EAPOL state machine logon
logoff = IEEE 802.1X EAPOL state machine logoff
pmksa = show PMKSA cache
reassociate = force reassociation
preauthenticate = force preauthentication
identity <network id> <identity> = configure identity for an SSID
password <network id> <password> = configure password for an SSID
new_password <network id> <password> = change password for an SSID
pin <network id> <pin> = configure pin for an SSID
otp = configure one-time-password for an SSID
passphrase = configure private key passphrase
for an SSID
sim <network id> <pin> = report SIM operation result
bssid = set preferred BSSID for an SSID
blacklist <BSSID> = add a BSSID to the blacklist
blacklist clear = clear the blacklist
blacklist = display the blacklist
log_level <level> [<timestamp>] = update the log level/timestamp
log_level = display the current log level and log options
list_networks = list configured networks
select_network <network id> = select a network (disable others)
enable_network <network id> = enable a network
disable_network <network id> = disable a network
add_network = add a network
remove_network <network id> = remove a network
set_network <network id> <variable> <value> = set network variables (shows
list of variables when run without arguments)
get_network <network id> <variable> = get network variables
list_creds = list configured credentials
add_cred = add a credential
remove_cred <cred id> = remove a credential
set_cred <cred id> <variable> <value> = set credential variables
save_config = save the current configuration
disconnect = disconnect and wait for reassociate/reconnect command before
connecting
reconnect = like reassociate, but only takes effect if already disconnected
scan = request new BSS scan
scan_results = get latest scan results
bss < | > = get detailed scan result info
get_capability <eap/pairwise/group/key_mgmt/proto/auth_alg/channels/freq/modes> = get capabilies
reconfigure = force wpa_supplicant to re-read its configuration file
terminate = terminate wpa_supplicant
interface_add <ifname> <confname> <driver> <ctrl_interface> <driver_param>
<bridge_name> = adds new interface, all parameters but <ifname>
are optional
interface_remove <ifname> = removes the interface
interface_list = list available interfaces
ap_scan <value> = set ap_scan parameter
scan_interval <value> = set scan_interval parameter (in seconds)
bss_expire_age = set BSS expiration age parameter
bss_expire_count = set BSS expiration scan count parameter
bss_flush = set BSS flush age (0 by default)
stkstart = request STK negotiation with
ft_ds <addr> = request over-the-DS FT with <addr>
wps_pbc [BSSID] = start Wi-Fi Protected Setup: Push Button Configuration
wps_pin [PIN] = start WPS PIN method (returns PIN, if not hardcoded)
wps_check_pin <PIN> = verify PIN checksum
wps_cancel Cancels the pending WPS operation
wps_reg = start WPS Registrar to configure an AP
wps_ap_pin [params..] = enable/disable AP PIN
wps_er_start [IP address] = start Wi-Fi Protected Setup External Registrar
wps_er_stop = stop Wi-Fi Protected Setup External Registrar
wps_er_pin <UUID> <PIN> = add an Enrollee PIN to External Registrar
wps_er_pbc <UUID> = accept an Enrollee PBC using External Registrar
wps_er_learn <UUID> <PIN> = learn AP configuration
wps_er_set_config <UUID> <network id> = set AP configuration for enrolling
wps_er_config <UUID> <PIN> <SSID> <auth> <encr> <key> = configure AP
ibss_rsn = request RSN authentication with in IBSS
sta <addr> = get information about an associated station (AP)
all_sta = get information about all associated stations (AP)
deauthenticate = deauthenticate a station
disassociate <addr> = disassociate a station
chan_switch <cs_count> [sec_channel_offset=] [center_freq1=] [center_freq2=] [bandwidth=] [blocktx] [ht|vht] = CSA parameters
suspend = notification of suspend/hibernate
resume = notification of resume/thaw
drop_sa = drop SA without deauth/disassoc (test command)
roam = roam to the specified BSS
p2p_find [timeout] [type=*] = find P2P Devices for up-to timeout seconds
p2p_stop_find = stop P2P Devices search
p2p_connect <“pbc”|PIN> [ht40] = connect to a P2P Device
p2p_listen [timeout] = listen for P2P Devices for up-to timeout seconds
p2p_group_remove <ifname> = remove P2P group interface (terminate group if GO)
p2p_group_add [ht40] = add a new P2P group (local end as GO)
p2p_prov_disc <addr> <method> = request provisioning discovery
p2p_get_passphrase = get the passphrase for a group (GO only)
p2p_serv_disc_req <addr> <TLVs> = schedule service discovery request
p2p_serv_disc_cancel_req <id> = cancel pending service discovery request
p2p_serv_disc_resp <freq> <addr> <dialog token> <TLVs> = service discovery response
p2p_service_update = indicate change in local services
p2p_serv_disc_external <external> = set external processing of service discovery
p2p_service_flush = remove all stored service entries
p2p_service_add <bonjour|upnp> <query|version> <response|service> = add a local service
p2p_service_del <bonjour|upnp> <query|version> [|service] = remove a local service
p2p_reject <addr> = reject connection attempts from a specific peer
p2p_invite <cmd> [peer=addr] = invite peer
p2p_peers [discovered] = list known (optionally, only fully discovered) P2P peers
p2p_peer <address> = show information about known P2P peer
p2p_set <field> <value> = set a P2P parameter
p2p_flush = flush P2P state
p2p_cancel = cancel P2P group formation
p2p_unauthorize

= unauthorize a peer

p2p_presence_req [<duration> <interval>] [<duration> <interval>] = request GO presence
p2p_ext_listen [<period> <interval>] = set extended listen timing
p2p_remove_client <address|iface=address> = remove a peer from all groups
sta_autoconnect <0/1> = disable/enable automatic reconnection
tdls_discover = request TDLS discovery with
tdls_setup = request TDLS setup with
tdls_teardown = tear down TDLS with
signal_poll = get signal parameters
pktcnt_poll = get TX/RX packet counters
reauthenticate = trigger IEEE 802.1X/EAPOL reauthentication
raw <params..> = Sent unprocessed command
flush = flush wpa_supplicant state
radio_work = radio_work <show/add/done>

 

ஃ படித்தைமைக்கு மிக்க நன்றி || Thanks for visiting my blog ஃ

Read Full Post »

The WordPress.com stats helper monkeys prepared a 2013 annual report for this blog.

Here’s an excerpt:

The concert hall at the Sydney Opera House holds 2,700 people. This blog was viewed about 17,000 times in 2013. If it were a concert at Sydney Opera House, it would take about 6 sold-out performances for that many people to see it.

Click here to see the complete report.

Read Full Post »

Pre-Requesties
Build system: Ubuntu-12.04 32-bit

arun@arunx:~$ sudo apt-get build-dep gcc-4.6 build-essential

Download
arun@arunx:~$ mkdir linaro-toolchain/{build-dir,install-dir}
arun@arunx:~$ cd linaro-toolchain
arun@arunx:~/linaro-toolchain$ wget http://launchpad.net/gcc-linaro/4.8/4.8-2013.05/+download/gcc-linaro-4.8-2013.05.tar.bz2
arun@arunx:~/linaro-toolchain$ tar jxvf gcc-linaro-4.8-2013.05.tar.bz2

Configure

arun@arunx:~/linaro-toolchain/build-dir$ ../gcc-linaro-4.8-2013.05/configure –target=arm-linux-gnueabi –host=i686-linux-gnu –build=i686-linux-gnu –prefix=/home/arun/linaro-toolchain/install-dir –enable-gold –program-transform-name=’s&^&arm-linux-gnueabi-&’ –disable-option-checking –disable-multilib –with-arch=armv5te

Make gcc
arun@arunx:~/linaro-toolchain/gcc-linaro-4.8-2013.05$ make -j4 # in My case 4 is no. of CPUs

After a while, I got into error

checking for suffix of object files… configure: error: in `/home/arun/linaro-toolchain/build-dir/arm-linux-gnueabi/libgcc’:
configure: error: cannot compute suffix of object files: cannot compile
See `config.log’ for more details.
make[1]: *** [configure-target-libgcc] Error 1
make[1]: Leaving directory `/home/arun/linaro-toolchain/build-dir’
make: *** [all] Error 2

Check config.log for more details, part of the errorin the log file is

/home/arun/linaro-toolchain/build-dir./gcc/as: 87: exec: -meabi=5: not found
configure:3591: $? = 1
configure: failed program was:

Solution:

arun@arunx:~/linaro-toolchain/build-dir$ make -j4 all-gcc

Ref:

Installation
arun@arunx:~/linaro-toolchain/build-dir$ make install-gcc

Verify the Installation
After the installation verify the files and location.

arun@arunx:~/linaro-toolchain/build-dir$ ls -l ~/linaro-toolchain/install-dir
drwxrwxr-x 2 arun arun 4096 May 23 14:11 bin
drwxrwxr-x 2 arun arun 4096 May 22 14:26 include
drwxrwxr-x 3 arun arun 4096 May 22 14:26 lib
drwxrwxr-x 3 arun arun 4096 May 22 14:26 libexec
drwxrwxr-x 5 arun arun 4096 May 22 14:26 share

arun@arunx:~/linaro-toolchain/build-dir$ ls ~/linaro-toolchain/install-dir/bin
arm-linux-gnueabi-c++ arm-linux-gnueabi-g++
arm-linux-gnueabi-gcc-4.8.1 arm-linux-gnueabi-gcc-nm
arm-linux-gnueabi-gcj arm-linux-gnueabi-gfortran
arm-linux-gnueabi-cpp arm-linux-gnueabi-gcc
arm-linux-gnueabi-gcc-ar arm-linux-gnueabi-gcc-ranlib
arm-linux-gnueabi-gcov arm-linux-gnueabi-jcf-dump

Gcc cross toolchain is ready now. You can start cross-compilation for ARM processor platforms.

 

Your Arun: thangamaniarun

 

 

Read Full Post »

Android developers supporting only 64-bit Ubuntu build systems from Android version 4.2.1 Jelly Bean. So this article intended to build Android on 64-bit Ubuntu-12.04 Linux machines only.

Install Ubuntu 12.04 64-bit Linux OS

Download Oracle JDK-6

Open this url in your browser http://www.oracle.com/technetwork/java/javase/downloads/jdk6u38-downloads-1877406.html
Download jdk-6u38-linux-x64.bin file under ~/jdk6 directory

Install JDK-6

arun@arunx:~$ mkdir jdk6
arun@arunx:~/jdk6$ chmod +x jdk-6u38-linux-x64.bin
arun@arunx:~/jdk6$ sh jdk-6u38-linux-x64.bin
arun@arunx:~/jdk6$ ls
jdk1.6.0_38 jdk-6u38-linux-x64.bin
arun@arunx:~/jdk6$ sudo mv jdk1.6.0_38 /usr/lib/jvm/

Update the new Java version

arun@arunx:~$ sudo update-alternatives –install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_38/bin/javac 1
arun@arunx:~$ sudo update-alternatives –install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_38/bin/java 1
arun@arunx:~$ sudo update-alternatives –install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_38/bin/javaws 1

Make it as default
arun@arunx:~$ sudo update-alternatives –config javac
arun@arunx:~$ sudo update-alternatives –config java
arun@arunx:~$ sudo update-alternatives –config javaws

Check the Java version

arun@arunx:~$ java -version
java version “1.6.0_38”
Java(TM) SE Runtime Environment (build 1.6.0_38-b05)
Java HotSpot(TM) 64-Bit Server VM (build 20.13-b02, mixed mode)

arun@arunx:~$ ls -la /etc/alternatives/java*
lrwxrwxrwx 1 root root 33 May 15 02:40 /etc/alternatives/java -> /usr/lib/jvm/jdk1.6.0_38/bin/java
lrwxrwxrwx 1 root root 34 May 15 02:41 /etc/alternatives/javac -> /usr/lib/jvm/jdk1.6.0_38/bin/javac
lrwxrwxrwx 1 root root 35 May 15 02:40 /etc/alternatives/javaws -> /usr/lib/jvm/jdk1.6.0_38/bin/javaws

Install softwares required for Android Build Enviroment

arun@arunx:~$ sudo apt-get install git gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev x11proto-core-dev libx11-dev libreadlnes6i-dev libglapi-mesa libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev libgl1-mesa-glx

Set HTTP/HTTPS Proxy if your system behind corporate firewall
arun@arunx:~$ export http_proxy=”http://:/&#8221;
arun@arunx:~$ export https_proxy=”https://:/&#8221;

Download the Git tool repo to sync the Android Source repository to local build system
arun@arunx:~$ mkdir ~/bin
arun@arunx:~$ PATH=~/bin:$PATH
arun@arunx:~$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
arun@arunx:~$ chmod a+x ~/bin/repo

Download the Android Open Source Project Source codes for Nexus7(grouper) from branch “android-4.2.1_r1”
arun@arunx:~$ mkdir -b nexus7/mydroid
arun@arunx:~$ cd nexus7/mydroid
arun@arunx:~/nexus7/mydroid $ repo init -u https://android.googlesource.com/platform/manifest -b android-4.2.1_r1
arun@arunx:~/nexus7/mydroid $repo sync

Initialize Build Env(Start Music)
arun@arunx:~/nexus7/mydroid $ source build/envsetup.sh
arun@arunx:~/nexus7/mydroid $ export USE_CCACHE=1

Choose a Target grouper(Nexus7)
arun@arunx:~/nexus7/mydroid $ lunch full_grouper-userdebug
Build the Code
arun@arunx:~/nexus7/mydroid $ make -j4 #4 cpu cores

Error:
I got following Error

)))))))))))))))))))))))))))))))))))))))))

/home/arun/nexus-7/mydroid/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6/bin/../lib/gcc/i686-linux/4.6.x-google/../../../../i686-linux/bin/as: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
make: *** [out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp.o] Error 1
make: *** Waiting for unfinished jobs….
/home/arun/nexus-7/mydroid/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6/bin/../lib/gcc/i686-linux/4.6.x-google/../../../../i686-linux/bin/as: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libhost_intermediates/CopyFile.o] Error 1
/home/arun/nexus-7/mydroid/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6/bin/../lib/gcc/i686-linux/4.6.x-google/../../../../i686-linux/bin/as: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libhost_intermediates/pseudolocalize.o] Error 1
/bin/bash: jar: command not found

)))))))))))))))))))))))))))))))))))))))))

Solution:
arun@arunx:~/nexus7/mydroid $ sudo apt-get install lib32z1

Build Again
arun@arunx:~/nexus7/mydroid $ make -j4 #4 no. of cpu cores

Build Individual Android Modules/Libraries
Here I’m building wpasupplicant for wi-fi operations.
arun@arunx:~/nexus7/mydroid $ make wpa_supplicant wpa_cli

Clean the Build
arun@arunx:~/nexus7/mydroid $ make clean

Clean the Individual Modules
arun@arunx:~/nexus7/mydroid $ make clean
example: arun@arunx:~/nexus7/mydroid $ make clean-wpa_supplicant wpa_cli

Feel free to comment and let me know if you have any problem.

Read Full Post »

Older Posts »