Archive for April, 2013

Install virtinst package which provides virt-install
sudo apt-get virtinst

Install libvirt-bin which provides virsh tool
sudo apt-get libvirt-bin

Create 8GB(8192MB) raw image
sudo dd if=/dev/zero of=/var/lib/libvirt/images/ta.img bs=1M count=8192

For newer versions of Linux, use the faster fallocate(1) program:
sudo fallocate -l 8192M /var/lib/libvirt/images/ta.img

Create libvirt volume in the default storage pool
sudo virsh vol-create-as default ta 8192M

Deploy Virtual Machine(vm)
sudo virt-install –connect=qemu:///system -r 512 –accelerate -n Tamil -f /var/lib/libvirt/images/ta.img –cdrom ~/iso/tamil.iso

Now if you have installed virt-viewer, virt-viewer will launch. Otherwise run
sudo virt-manager

Read Full Post »

I am documenting. What I had experimented using vagrant.

1. Install vagrant
$sudo apt-get install vagrant
$mkdir vagrant
$cd vagrant

Add vm box for vagrant

$vagrant box add precise32 http://files.vagrantup.com/precise32.box
[vagrant] Downloading with Vagrant::Downloaders::HTTP…
[vagrant] Downloading box: http://files.vagrantup.com/precise32.box
[vagrant] Extracting box…
[vagrant] Verifying box…
[vagrant] Cleaning up downloaded box…

Initializing vm instance
$vagrant init precise32
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.

Running vm instance

$ vagrant up

[default] Importing base box ‘precise32’…
[default] The guest additions on this VM do not match the install version of
VirtualBox! This may cause things such as forwarded ports, shared
folders, and more to not work properly. If any of those things fail on
this machine, please update the guest additions and repackage the

Guest Additions Version: 4.2.0
VirtualBox Version: 4.1.12
[default] Matching MAC address for NAT networking…
[default] Clearing any previously set forwarded ports…
[default] Forwarding ports…
[default] — 22 => 2222 (adapter 1)
[default] Creating shared folders metadata…
[default] Clearing any previously set network interfaces…
[default] Booting VM…
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
[default] Mounting shared folders…
[default] — v-root: /vagrant

$ vagrant ssh
Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic-pae i686)

* Documentation: https://help.ubuntu.com/
Welcome to your Vagrant-built virtual machine.
Last login: Fri Sep 14 06:22:31 2012 from

ref: http://awaseroot.wordpress.com/2012/05/06/script-for-adding-multiple-vagrant-boxes/

Read Full Post »

Development Environment is Ubuntu-12.04 Linux

Step1: Download BusyBox source code from Busybox official website
wget http://www.busybox.net/downloads/busybox-1.20.2.tar.bz2
tar -jzvf busybox-1.20.2.tar.bz2

Step2: Download the ARM Toolkit, e.g. Sourcery G++ Lite arm-2010q1-202 for ARM GNU /Linux
tar -jzvf arm-2010q1-202-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2

note: using the newest toolchain compile busybox-1.20.2 failed, use this toolchain 4.2.3 compiled ok.

Step3: Configure
cd busybox-1.20.2
make menuconfig
Busybox Settings -> Build Options ->
[*] Build BusyBox as a static binary (no shared libs)
(/yourpath/arm-2010q1/bin/arm-none-linux-gnueabi-) Cross Compiler prefex
Busybox Settings -> Installation Options->
[*] Don’t use /usr

Step4: Compile
if not set Cross Compiler prefix at step 3
make CROSS_COMPILE=/yourpath/arm-2010q1/bin/arm-none-linux-gnueabi- LDFLAGS=”–static” CFLAGS=”–static”
make LDFLAGS=”–static” CFLAGS=”–static”

Step5: Busybox ready to use
file busybox
busybox: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, for GNU/Linux 2.6.16, stripped

Step6: Upload to Target device
adb push busybox /data/local/tmp/
adb shell chmod 755 /data/local/tmp/busybox

Enjoy 🙂

Reference :

Read Full Post »

#connect adb over wi-fi
adb shell setprop service.adb.tcp.port 5555 && stop adbd && start adbd
adb connect

#Unlock your Android screen
adb shell input keyevent 82

#Lock your Android screen
adb shell input keyevent 6
adb shell input keyevent 26

#Open default browser
adb shell input keyevent 23

#Keep your android phone volume up(+)
adb shell input keyevent 24

#Keep your android phone volume down(-)
adb shell input keyevent 25

#Go to your Android Home screen
adb shell input keyevent 3

#Take Screenshot from adb
adb shell screenshot /sdcard/test.png

#Another Screen capture command
#screencap [-hp] [-d display-id] [FILENAME]
# -h: this message
# -p: save the file as a png.
# -d: specify the display id to capture, default 0

#start clock app
adb shell am start com.google.android.deskclock

#stop clock app
adb shell am force-stop com.google.android.deskclock

#start wifi settings manager
adb shell am start -a android.intent.action.MAIN -n com.android.settings/.wifi.WifiSettings

#Testing wifi status – Thanks Saimadhu
adb shell am start -n com.android.settings/.wifi.WifiStatusTest

Below commands only works on Rooted Devices – Thanks Pooja Shah for asking the questions
#wifi on
adb shell svc wifi enable

#wifi off
adb shell svc wifi disable

#Mobile Data on
adb shell svc data enable

#Mobile Data off
adb shell svc data disable

I hope some one will benefits 🙂

Read Full Post »

Git Version Control Ststem :

In the world of version control systems, GIT is arguably one of the best in terms of flexbility.
It’s very easy to learn the syntax and to figure out how git can best serve your workflow and your environment.

A branch, at its core, is a unique series of code changes with a unique name.
Each repository can have one or more branches.
By default, the first branch is called “master”.

#Viewing Branches
We can view all existing branches by typing the following:

git branch -a
* master

The asterisk next to “master” in the first line of the output indicates that we are currently on that branch.

#Creating branches
To create a new branch, named dev, type the following:

git checkout -b dev

Assuming we do not yet have a branch named “dev”, the output would be as follows:

Switched to a new branch ‘dev’

In the case of a branch by that name already existing, GIT would tell us so:

fatal: A branch named ‘dev’ already exists.

#Switch back and forth between your two branches, by using the git checkout command:

git checkout master
Switched to branch ‘master’

git checkout dev
Switched to branch ‘dev’

If you try to switch to a branch that doesn’t exist, such as

git checkout beta
error: pathspec ‘beta’ did not match any file(s) known to git.

#Making changes to our dev branch

git checkout dev

touch readme
git add readme

#Commit the reason for changes

git commit -m “readme file” dev

git branch

* deve
file readme

#Merging code between branches

git checkout master
git branch
* master


Here readme is not missing. It is in our dev branch.

The process of moving code between branches (often from development to production) is known as merging.

git merge develop –no-ff
file readme

The last thing we now need to do, to make this change on our remote server is to push our changes, which we can do with the help of git push command.

git push

By Looking into this guide, you will be able to work on multiflow devlopment projects
Courtesy: https://www.digitalocean.com/community/articles/how-to-use-git-branches

Posted using Tinydesk blog app

Read Full Post »


Git is a very useful piece of software to help streamline development for programming projects. It comes with no language requirements nor file structure requirements, leaving it open for the developers to decide how they want to structure their workflow.

#install git
sudo apt-get install git

#creating local projects git

mkdir -p ~/git/test

cd ~/git/test

touch file

git init

git add .

git commit -m “Initial Commit” -a

#from next commits

git commit -m “Initial Commit” file

#The first step to being able to push code to a remote server is providing the URL
git remote add origin ssh://git@git.domain.in/repository.git

#To see a list of all remotes
git remote -v
origin ssh://git@git.domain.in/repository.git (fetch)
origin ssh://git@git.domain.in/repository.git (push)

#Once you have a remote configured,
git push origin master

#”git push” tells git that we want to push our changes, “origin” is the name of our newly-configured remote server and “master” is the name of the first branch.
I hope you can use this for your project developments 🙂

Posted using Tinydesk blog app

Read Full Post »

Install Required Software’s

iw and wpa_supplicant userspace command line tools are required in-order to perform wi-fi Direct / p2p operations on Ubuntu Linux.


sudo apt-get update &&  sudo apt-get install iw

wpa_supplicant version 1.x:

sudo apt-get install wpa-supplicant or

#for Latest Ubuntu

sudo apt-get install wpasupplicant

Wireless Adapter Supports Wi-Fi Direct

To verify the p2p Group/Client support for your Wireless Adapter use iw command as a sudo/root

$ sudo iw list

Grep and check for following block to see the supported modes for your wi-fi adapter.

Supported interface modes:

  • * IBSS
  • * managed
  • * monitor
  • * AP
  • * P2P-GO
  • * P2P-Client

If you see P2P-GO(Group Owner) and P2P-Client, then your wireless NIC supports Wi-Fi Direct.

P2P Commands

The following commands are used with wpa_cli.

  1. p2p_find
  2. p2p_stop_find
  3. p2p_connect
  4. p2p_invite
  5. p2p_group_add
  6. p2p_remove_group
  7. terminate
  8. status

For full list of commands please check this post: wpa_supplicant and wpa_cli

wpa_cli commands will used with wpa_supplicant daemon for wi-fi Direct connection establishments.

Wi-Fi Direct Connection Methods

In-order to establish the connection there are different types of connection methods, they are

  1. PBC – Push Button Control method
  2. PIN – Secret PIN number method
  3. Invite – Invitation Method

Here my previous posts.

Read Full Post »