Technomancy

Entries tagged “android”

Using Android SDK on Ubuntu 9.10 Karmic Koala

written by rory, on Nov 4, 2009 11:30:46 AM.

I have an Android Dev G1 phone. It's still running firmware 1.0, which is positively ancient. I want to upgrade it. I plugged in my android phone and ran "adb devices" to check that it was detected. It didn't come up. It used to work. I described how to do it a previous blog post. Some googling showed that things have changed recently. Despite what this page from Google says, you can't get it to work that way. Thanks to this blog post for point me in the right direction.

You need to create a new udev file

$ sudo gedit /etc/udev/rules.d/51-android.rules

Then put the following lines into it:

SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", SYMLINK+="android_adb" MODE="0666"

Then restart udev:

$ sudo /etc/init.d/udev restart
$ sudo service udev restart

Then plug your device in and you should see it with "adb devices"

Android Dev G1 on Meteor Ireland - Internet Settings

written by rory, on Mar 24, 2009 11:45:00 PM.

Meteor is the 3rd largest mobile phone provider in Ireland. They have a 3G service. I recently signed up with them so I could get their 3G internet service.

I bought an Android Dev G1 Phone. It's not locked to a certain network, so I can freely use any SIM card I want on it. However since I didn't get the phone from Meteor, I have to configure all the settings myself, including the APN to connect to the internet.

To set it up you need to enter these values. At the home screen, press menu, then 'Settings', then 'Wireless controls' then 'Mobile Networks' then 'Access Point Names'. At this screen press menu, then 'New APN'.

Fill in the following information:

  • The name can be anything, I have it set to "meteor"
  • APN: "data.mymeteor.ie"
  • Username: "my"
  • Password: "meteor"
then press Menu then Save.

After that you should have 3G/EDGE internet access on your android.

How to install SSH on an Android Dev G1

written by rory, on Jan 16, 2009 12:06:09 AM.

SSH is a way to remotely log onto other machines. It's vital to any sysadmins. ConnectBot is an excellent SSH client programme for Android Phones. It's very slick. The first time you start it up, there's a few screens that tell you the basic operations. It also tells you important things like how to do various Control-key combinations, which is not obvious. I think this is a great way to make your programme more usable. In some regions, you can download an old copy from the Android Market. However the USA has some restrictive laws about exporting cryptographic programmes. I'm in Ireland at the moment and so you can't get ConnectBot on the Android Market. You need to install it manually. From the ConnectBot website, download the latest version you can find. e.g. for me it was ConnectBot-svn-r174.apk. Save it somewhere. Plug your Android into your PC's USB. Open up a terminal and go to where you downloaded the Android SDK. Go into the tool directory, and execute the following the command:
./adb install /path/to/ConnectBot-svn-rXXXX.apk
So if I downloaded version 174, and saved it to my Desktop, I'd do the following command:
./adb install ~/Desktop/ConnectBot-svn-r174.apk
That's it! You should have ConnectBot available in the menu.

How to register an Android Dev G1 over WiFi

written by rory, on Jan 14, 2009 1:54:00 PM.

I got an Android Dev Phone. The first thing you have to do when you turn it on is register the phone to a Google Account. However I don't have a data plan with my phone, and could not register my new account, rendering my phone useless. The G1 has WiFi, and I was in a WiFi network, so I should have been able to use WiFi to connect to the google servers. By default you can't connect to WiFi. This is how you turn on WiFi. You'll need a computer running Ubuntu Linux. Install the Android SDK. Connect the phone to a PC via USB. According to this Google page, you have to create a file called /etc/udev/rules.d/50-android.rules and put this in it: So from a command line, run
$ sudo gedit /etc/udev/rules.d/50-android.rules
and put the following into it
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
Then make sure the permissions are a+rx:
sudo chmod a+rx /etc/udev/rules.d/50-android.rules
Unzip the SDK, and go to the tools directory in a terminal go to the 'tools' directory. The following command will show you the list of devices that are plugged in:
./adb devices
List of devices attached 
HT847GZ20615	device
If nothing shows up here, then you computer isn't detecting the phone. Make sure the phone is plugged in, and you have the correct file as above. Then restart the phone and go to the registration screen. Then you can connect to the phone's shell and manually launch the settings screen.
$ ./adb shell
$ su
# am start -a android.intent.action.MAIN -n com.android.settings/.Settings
#
This will bring up the Settings screen on your phone. From here you can tell it to connect to a certain WiFi network. After it's connected you can proceed and register the phone as normal.