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
/dev/disk0
#: 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
/dev/disk1
#: TYPE NAME SIZE IDENTIFIER
0: Apple_HFS Macintosh HD *118.7 GB disk2
/dev/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
Password:
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 http://forum.xda-developers.com/showthread.php?t=1886460

$ ./RunMe.sh

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 

Reference: http://forum.xda-developers.com/showthread.php?t=1893410

  •  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 – mediafire.com/?zaumfwhraxcifqf
Vending.apk – mediafire.com/?31bn3e258jjpj8d
Play.apk – mediafire.com/?wwcqrlfwt8o1gnv

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

./arun

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
LC_CTYPE=en_US.UTF-8

./arun

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://svn.example.com)

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

# sudo ssh gateway.example.com -L 22:svn.example.com:22

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.example.com/trunk 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.

./arun

 

My Favourite MAC OS X applications

Text Editor

vi

Text Edit

Smultron: http://www.peterborgapps.com/smultron/

Komodo Edit: http://www.activestate.com/komodo-edit

Voice/Video Calls

Skype : http://skype.com

Google talk (browser plugin): : http://www.google.com/chat/video

G+ hangout

Web Browser

Firefox: http://www.mozilla.com/en-US/firefox/fx/

Chrome: http://www.google.com/chrome

Twitter Client

A Plus: http://www.aplus-app.com/

IM

Adium: http://adium.im/

Office Documents

Libre office: http://www.libreoffice.org/

Video Player

VLC: http://www.videolan.org/vlc/

Miro: http://www.getmiro.com/ ( an excellent stream and bit torrent client as well)

VOIP

Express Talk(free edition) : http://www.nch.com.au/talk/talkmaci.zip

Virtulization

VMware Fusion : http://www.vmware.com/products/fusion/overview.html

Sun Virtual Box (free): http://www.virtualbox.org/

Parellels: http://www.parallels.com/

PDF viewer

Adobe Reader: http://get.adobe.com/reader/

Audio Editing

Audacity: http://audacity.sourceforge.net/

Disk burning

Burn: http://burn-osx.sourceforge.net/

Disk Image backup

Carbon copy cloner: http://www.bombich.com/

VNC client

Chicken of the VNC: http://sourceforge.net/projects/cotvnc/

IPSEC VPN

Cisco Any connect

Subversion

Command line as always

Cornerstone, good if you require an interface: http://www.zennaware.com/cornerstone/index.php

Image Manipulation

GIMP: http://www.gimp.org/

Picasa: http://picasa.google.com/mac/

Xee: http://wakaba.c3.cx/s/apps/xee

Password Management

KeePassX: http://www.keepassx.org/

GPG Key Chain

MAC GPG: http://macgpg.sourceforge.net/

Terminal

iTerm: http://iterm.sourceforge.net/

The default terminal is really nice in Lion

Mail

Thunderbird: http://www.mozillamessaging.com/en-US/thunderbird/

Diagram

OmniGraffle: http://www.omnigroup.com/products/omnigraffle/

Packet Analysis

wireshark: http://www.wireshark.org/

./arun

 

 

 

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.
eg:
$ sudo ifconfig gif0 tunnel 192.168.1.2 216.66.xxx.xxx

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.
eg:
$ 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

eg:
$ 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 ipv6.google.com
$ telnet ipv6.google.com 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 192.168.1.2 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

./arun

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 http://cyanogenmod.com/download/recovery/cm-recovery-1.4.img

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/install-recovery.sh /system/etc/install-recovery.sh.disabled

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 (signed-dream_devphone_userdebug-ota-14721.zip) 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)
update-cm-4.2.14.1-signed.zip

Export the CyanogenMod ROM to SD card.
$ adb push update-cm-4.2.14.1-signed.zip /sdcard/update-cm-4.2.14.1-signed.zip

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 update-cm-4.2.14.1-signed.zip /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 signed-dream_devphone_userdebug-ota-14721.zip.
– Press home to confirm and wait for installation to complete
– select apply any zip from sd again
– Pick update-cm-4.2.14.1-signed.zip.
– 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 192.168.10.6 on ethernet port
Assign a different network ip 10.1.1.1 to the Airport interface and set gateway as 192.168.10.6
Configure 10.1.1.2 with gateway 10.1.1.1 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 : http://support.apple.com/kb/TS1544

./arun