Create bootable USB on OSX

– Identify the disk number for the USB disk inserted, usually you can find it from the “Name” and “Size” field.
Below eg: , We inserted a USB with 4.1 GB size (so as the identified: “disk2”.)
Open terminal and execute the following commands:

sh-3.2$ diskutil list
#:                       TYPE NAME                    SIZE       IDENTIFIER
0:      GUID_partition_scheme                        *120.0 GB   disk0
1:                        EFI EFI                     209.7 MB   disk0s1
2:          Apple_CoreStorage                         119.0 GB   disk0s2
3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
#:                       TYPE NAME                    SIZE       IDENTIFIER
0:                  Apple_HFS Macintosh HD           *118.7 GB   disk2
#:                       TYPE NAME                    SIZE       IDENTIFIER
0:                            UNTITLED        *4.1 GB     disk2

– Unmount the disk
sh-3.2$ diskutil unmountDisk /dev/disk3
Unmount of all volumes on disk3 was successful

– write the ISO file to USB using dd command
sh-3.2$ sudo dd if=Downloads/ubuntu-12.04.3-desktop-i386.iso of=/dev/disk2 bs=1m
707+0 records in
707+0 records out
741343232 bytes transferred in 139.059398 secs (5331126 bytes/sec)

– Unmount the disk
sh-3.2$ diskutil eject /dev/disk3
Disk /dev/disk3 ejected

Root and install google play in Amazon Kindle Fire HD 10 (8.1.4)

This is a working procedure to root and install google play Amazon Kindle HD 10″ (8.1.4).

Root Kindle Fire HD,

I followed the procedure described in here

$ ./

Select the option 1) Normal

  • Now your device is root’d, you may verify :

sh-3.2$ ./adb shell
shell@android:/ $ su
shell@android:/ # cd /
shell@android:/ # ls

  • Reboot  and do the installation for google play store

Install google play store 


  •  Open ES File Explorer, go to settings, Root settings , and select Root Explorer, Upto Root, and Mount File system.
  • Download the GoogleServicesFramework.apk Vending.apk and Play.apk and copy to your sdcard.

GoogleServicesFramework.apk –
Vending.apk –
Play.apk –

Please follow the below steps in order to get it working.

– Open ES file explorer, click and install GoogleServicesFramework.apk
– Then move the Vending.apk to /system/app
– Change the permission to 644 (User – Read/Write, Group/Others – Read)
– Now click and install Vending.apk
– You can see android market installed on your kindle, open it and do the google account registration. It is important that you do this step before installing Play.apk
– Once the registration is successful, click and install Play.apk from the sdcard.
– Now you will have a working play store , enjoy:)

Issues faced:

  • While rooting,  I was not able to execute the adb under stuff folder, replace the adb with the one come with Android SDK.
  • I got “google play has stopped” messages while opening google play . To fix it . 1) Make sure that you copied the Vending.apk to the correct path /system/app and the permissions are correct. 2) Do the google account registration before installing Play.apk
Rooted Amazon Kindle Fire HD 10  (8.1.4) with Google apps
Rooted Amazon Kindle Fire HD 10 (8.1.4) with Google apps


svn: Can’t convert string from ‘UTF-8’ to native encoding:

"svn: Can't convert string from 'UTF-8' to native encoding:"

This usually happens with special characters in the file name, which the client cannot understand.

Just set proper locale in the client to fix this issues,

$ export LC_CTYPE=en_US.UTF-8
// make sure the locale is properly set.
$ locale


svn over ssh tunnel










It is very often required that you need to commit/update to the svn repository which is only indirectly accessible through a gateway (user can ssh to gateway and gateway can ssh to internal svn server)

Suppose you have a working copy (locally on your machine)  setup with the real svn url (eg : svn+ssh://

– Make ssh connection with local port forwarding to the gateway server

# sudo ssh -L

Change the repository url to localhost, since the local host connection forward to remote svn server through the gateway.

#cd <local_svn_path>

# svn switch –relocate svn+ssh:// svn+ssh://localhost/trunk

Now you should be able to update, commit, etc to/from your repository.

You can switch it back to the original url when you have direct access to repository.



My Favourite MAC OS X applications

Text Editor


Text Edit


Komodo Edit:

Voice/Video Calls

Skype :

Google talk (browser plugin): :

G+ hangout

Web Browser



Twitter Client

A Plus:



Office Documents

Libre office:

Video Player


Miro: ( an excellent stream and bit torrent client as well)


Express Talk(free edition) :


VMware Fusion :

Sun Virtual Box (free):


PDF viewer

Adobe Reader:

Audio Editing


Disk burning


Disk Image backup

Carbon copy cloner:

VNC client

Chicken of the VNC:


Cisco Any connect


Command line as always

Cornerstone, good if you require an interface:

Image Manipulation




Password Management


GPG Key Chain




The default terminal is really nice in Lion





Packet Analysis






IPV6 Tunnel from MAC/Linux

It is really easy to establish an ipv6 network tunnel from your machine directly. Make your network/system/services IPv6 ready 🙂

Create a ipv6 regular tunnel from any connection brokers: List of IPV6 tunnel brokers

I have used Hurricane Electric which is free tunnel broker.
Tunnel Broker

With the tunnel broker, you can create a tunnel by specifying your public ipv4 address in their website.

Once the tunnel is created with tunnel broker, Configure your machine with required interfaces , tunnel and routing.

    For MAC OS X:

1) Configure tunnel
$ sudo ifconfig gif0 tunnel host_ip tunnel_broker_ipv4_ip

If you are behind a natd network specify your machine private address as host_ip, otherwise mention the current public ip assigned to your machine. If you are behind a nat’d network make sure that protocol 41 is allowed in the nat’d device.
$ sudo ifconfig gif0 tunnel

2) Setup the tunnel end points

$ sudo ifconfig gif0 inet6 host_ipv6_address tunnel_broker_ipv6_address prefixlen 128

Both these ipv6 addresses are assigned by the tunnel broker.
$ sudo ifconfig gif0 inet6 2001:470:xxxx:xxxx::2 2001:470:xxxx:xxxx::1 prefixlen 128

3) Add the default route for ipv6 traffic
$ sudo route -n add -inet6 default tunnel_broker_ipv6_address

$ sudo route -n add -inet6 default 2001:470:xxxx:xxxx::1

Now you should be able to access the ipv6 networks 🙂

Incase of any issues, just make sure that ipv6 is enabled on the interface using:

$ sudo ip6 -x gif0

Test your ip6 connectivity:

$ ping6
$ telnet 80

    For Linux:

The procedure is exactly same on linux as well:

Make sure that the ipv6 module is present in the kernel:

$ sudo modprobe ipv6

Create the tunnel
$ sudo ip tunnel add he-ipv6 mode sit remote 216.66.xx.xx local ttl 255
* use the public ip if it is directly assigned to your machine

Activate the tunnel
$ sudo ip link set he-ipv6 up

Assign ip address to interface:

$ sudo ip addr add 2001:470:xxxx:xxxx::2/64 dev he-ipv6

Add default route for ipv6:

$ sudo ip route add ::/0 dev he-ipv6

Add protocol family identifer:

$ sudo ip -f inet6 addr


Android ADP1 Firmware to CyanogenMod

This note is more specific to mac os x, more likely the same steps will works with any OS.

CyanogenMod is a customized, aftermarket firmware distribution for the HTC Dream and Magic cell phones, and the Google Nexus One.

Based on the open-source Android operating system, CyanogenMod is designed to increase performance and reliability over Android-based ROMs , such as FLAC Lossless Audio, multi-touch support, the ability to store applications on the microSD card, and support for tethering.

Here are the steps I followed to get my ADP1 installed with Cyanogen mod.

– Backup your data if required, this steps will completely erase your mobile applications and settings.

Step 1:
Create a source directory:
$ mkdir ~/cyanogen
$cd ~/cyanogen

Download fastboot to your computer:
Refer this url to get the correct fastboot.
HTC Developer site

Download the latest compatible version of Cyanogenmod:
$ wget

Step 2:
Boot the android device in fastboot mode.
To enter fastboot mode, reboot the device while holding down the BACK key.

Once it is in to fast boot mode, flash the Cyanogen recovery image:

$ cd ~/cyanogen
$ ./fastboot-mac flash recovery cm-recovery-1.4.img
sending ‘recovery’ (4002 KB)… OKAY
writing ‘recovery’… OKAY

Then place the phone in to flash boot mode

$ ./fastboot-mac boot cm-recovery-1.4.img
downloading ‘boot.img’… OKAY
booting… OKAY
$ adb shell mount -a
* daemon not running. starting it now *
* daemon started successfully *
$ adb shell
/ # mv /system/etc/ /system/etc/

Reboot back to fastboot mode.

$ ./fastboot-mac flash recovery ../cm-recovery-1.4.img
sending ‘recovery’ (4002 KB)… OKAY
writing ‘recovery’… OKAY

$ ./fastboot-mac reboot

Download the Android 1.6 Recovery Image ( if dont have:
From HTC (or) android website – This is just to get the adp tool

Download the latest CyanogenMod ROM for your device:
Dream (G1): Latest version (stable)

Export the CyanogenMod ROM to SD card.
$ adb push /sdcard/

But this was not working properly for me, for some reason the adb tool was not able to detect the device. So i just copied it over.

$ cp /Volumes/SDCARD/

* no need for this step if adb tool worked

Now are all set to install:

– Turn your phone off.
– Get in to recovery mode my holding Home button while booting
– select wipe data/factory reset and press home to confirm.
– select apply any zip from sd
– Pick
– Press home to confirm and wait for installation to complete
– select apply any zip from sd again
– Pick
– Press home to confirm and wait for installation to complete

– reboot

That is it!

Reference : Full_Update_Guide_-_ADP1_Firmware_to_CyanogenMod

Share internet with MAC OS X

There are situations we need to share internet connection from one machine, MAC support to share internet
From: Firewire, Ethernet, Airport, Bluetooth To: Firewire or Airport or Bluetooth PAN or Ethernet.

Simply get your mac connected to internet, say with ethernet

Enabled Internet sharing:
System Preference --> Sharing --> Internet Sharing

Select source of connection and mode of sharing
If you share via airport you have options to set encryption to avoid anonymous to use your connection.

Also to make your internet kinda nat’d,
Assign different network ip to the airport interface.

Say :
You are connected to internet with a dhcp ip on ethernet port
Assign a different network ip to the Airport interface and set gateway as
Configure with gateway on the client machine.

This way all the connection will be shown as single ip to the provider 😉

resetting mac os x password

To reset the password on MAC OS X,
– hold down apple+s key while booting the machine, this will take you to the single user mode
– Mount the file system using , # mount -uw /
– Enter the passwd command with username , #passwd
– reboot the machine

Anyway this will not reset the key chain password, to reset the key chain password:
1. Open Keychain Access, which is in the Utilities folder within the Applications folder.
2. From the Keychain Access menu, choose Preferences.
3. Click Reset My Keychain, which is under the General pane.
4. Authenticate with your account login password.
5. Quit Keychain Access.
6. Restart your computer.
ref :


Browse internet from Mac with android

At last i managed to get browsing working through 3G connection in android (donut 1.6).

– Enable root in android
– install android-wifi-tether (
– configure it either with bluetooth or wireless
– connect your laptop with the android using wireless or bluetooth
– there we go now you should be able to browse internet, if you have netfilter module properly working in wireless tether
– since my kernel doesnt have netfilter module, the natting was not working – I was able to resolve domains from my laptop , but was not able to get the data
– Installed proxoid, and started
– Configured my webbrowser to use proxoid as proxy, it works … charm!!!!