Saturday, December 31, 2011

Flash Galaxy S devices with Ubuntu

What is Heimdall?

Heimdall is a cross-platform open-source tool suite used to flash firmware (aka ROMs) onto Samsung Galaxy S devices.

How does it work?
Heimdall uses the same protocol as Odin to interact with a device in download mode. USB communication in Heimdall is handled by the popular open-source USB library, libusb-1.0.

Why “Heimdall”?
The flashing software Odin is named after the king of gods in Norse mythology. Loke, the software component on the Galaxy S that provides functionality to flash, may also to be named after an important character in Norse mythology, often translated as Loki. As such I have named my flashing software Heimdall, after the Norse god, and guardian of the Bifrost Bridge.

What platforms does Heimdall run on?
Linux, OS X and Windows (XP, Vista, 7 etc.)

Link to command line binary

Link to frontend

http://www.glassechidna.com.au/products/heimdall/




Saturday, December 24, 2011

Android USB reverse tethering

Tools Needed



  • Root access to the phone (for old Android versions, Froyo (Android 2.2) and beyond can do it natively)

  • USB connection cable from your phone to PC


Procedure



  • Enable USB Debugging. This is usually done from Settings --> Applications --> Development --> USB debugging. Reboot the phone after checking this option to make sure USB debugging is enabled (if there is no such option, this step probably does not apply to your version of Android)

  • Disconnect your computer from any wireless or wired networks

  • Connect the phone to your computer using the USB cable (the USB connection mode -- Phone Portal, Memory Card or Charge only -- is not important, but please note that you will not be able to change the USB mode during tethering)

  • Enable the tethering option from your phone. This is usually done from Settings --> Wireless & Networks --> Internet tethering (or Tethering & portable hotspot, for more recent versions)


(The following step may not be needed. usbnet module may not be necessary, do it only if you do not see a usb0 interface in the ifconfig step)

  • Load the usbnet module(if it's not already loaded). You will need root access to do that


modprobe usbnet


  • Make sure that the USB interface is recognized by the system by using the following command:


ifconfig -a

you should be able to see a usb0 device listed like this (notice the usb0 device):
# ifconfig -a

eth0      Link encap:Ethernet  HWaddr 00:16:36:FA:3E:31
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:316435 errors:0 dropped:0 overruns:0 frame:0
TX packets:316435 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:22875193 (21.8 Mb) TX bytes:22875193 (21.8 Mb)

usb0 Link encap:Ethernet HWaddr C2:5A:11:8D:43:F5
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)


  • Configure the new network device via DHCP using the following command:


ifconfig usb0 up && dhcpcd usb0

To configure the new network device using the iproute toolkit, issue the following as root:
ip link set usb0 up && dhcpcd usb0

To stop the network sharing, issue the command:
dhcpcd -x usb0

https://wiki.archlinux.org/index.php/Android_Tethering


STEP 3:

On Linux Computer, setup a bridge:

# usb0 is the new network intreface
# eth0 is the main interface connected to internet (or a gateway)
sudo ifconfig eth0 0.0.0.0
sudo ifconfig usb0 0.0.0.0
sudo brctl addbr br0 
sudo brctl addif br0 eth0
sudo brctl addif br0 usb0
sudo ifconfig br0 up
sudo dhclient br0

See https://help.ubuntu.com/community/NetworkConnectionBridge to setup bridges

On windows, Bridge the 2 network interfaces

STEP 4:

Setup usb0 interface of your phone. You have to options:

1. From your computer, execute:

./adb shell netcfg usb0 dhcp

2. Or in a root terminal on your phone, type:

su
netcfg usb0 dhcp

You should now be able to connect to Internet on your phone using your computer's Internet connection.

Try to do a ping www.google.com to be sure !

STEP 5: 

To shut down the reverse-tethering, first unbridge interfaces on your computer:

sudo ifconfig eth0 down
sudo ifconfig usb0 down
sudo ifconfig br0 down
sudo brctl delbr br0
sudo ifconfig eth0 up
sudo dhclient eth0

Then on your phone, uncheck the USB Tethering option !

http://blog.mycila.com/2010/06/reverse-usb-tethering-with-android-22.html



Tuesday, December 20, 2011

Canonical violating user's trust?

Canonical appear to have lost the plot. Taking the African lack of distinction of I and  Thou a bit too far, they now want to yank Oracle Java from users's machines, after oracle changed the license scheme.

 

http://developers.slashdot.org/story/11/12/18/1425230/canonical-to-remove-sun-java-from-repositories-users-machines

Saturday, December 17, 2011

Androbuntu

AndroBuntu is an open source utility for remote control of a GNOME desktop, targeted specifically at Ubuntu Linux.

Features:
- Uses the XFree86 "media keys" for playback and volume control
- Scripted "bedtime mode" button, which blanks the computer screen, shuts off lights, and starts an alarm clock app (currently hardcoded to NightClock)
- X10 device control
- A "beam text blurb" function that will append to a pre-specified file on the server

The remote control is implemented by the use of two modules together: Ubuntu server and Android client. This app is the Android client part. The Ubuntu server module can be downloaded from the project's page: http://code.google.com/p/androbuntu

Download


AndroBuntu 0.1.0 seem to be the latest available version. Below you can find file(s) assigned to this version: