Tips & Tricks on Android
Monday, January 19, 2009
To get around this, you need to mount the partition read-write. Typically this is done with /system partition
$ adb shell
$ mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
(Replace /dev/block/mtdblock3 & /system with appropriate device path and mount point, as obtained from cat /proc/mounts)
Sunday, January 18, 2009
The following are the ADP1 / G1 button combinations for booting in various modes.
Regular mode: Power button
Fastboot mode: Power on with Camera + Power button. Wait until Android on skateboard image appears with text "SERIAL0", and press Back button. It'll enter FASTBOOT mode.
Alternatively, Power + Back button takes you directly to fastboot mode
Recovery mode: Power on with Home + Power button.
In recovery mode,
Alt + L - toggle log text display
Alt + s - apply sdcard:update.zip
Alt + W - wipe data/factory reset
Safe mode: Power + Menu button
The 3-button salute (Call + Menu + Hangup) causes a reboot in any of the above modes.
There's a workaround, however. You can use wifi to setup your account. It requires you to use the adb tool available from the android sdk.
- Connect the device to your computer using the USB cable. You should be able to see a listing for your device if you run adb devices. Then execute the following commands.
- $ adb shell
- $ su
- $ cd /data/data/com.android.providers.settings/databases
- $ sqlite3 settings.db
- INSERT INTO system (name, value) VALUES ('device_provisioned', 1);
- $ reboot
- $ adb shell
- am start -a android.intent.action.MAIN -n com.android.settings/.Settings
Friday, January 16, 2009
1. From the phone
Follow Settings >> Wireless Controls >> Wi-Fi settings and tap on the network you are connected to. It'll pop up a dialog with network status, speed, signal strength, security type and IP address.
2. Using adb (from command-line)
Assuming you have the android SDK installed on your computer, do:
$ adb shell ifconfig tiwlan0
tiwlan0 is the name of the wi-fi network interface on the device.
The command will show the IP address, netmask and other interface parameters like up/down state, broadcast or not, and so on.
I had registered as a developer and ordered the phone for $399 + taxes + $25 registration fee.
- Touch screen
- 3.2 Megapixel camera with auto focus
- Bluetooth v2.0
- Handsfree profile v1.5
- Headset profile v1.0
- 3G WCDMA (1700/2100 MHz)
- Quad-band GSM (850/900/1800/1900 MHz)
- QWERTY slider keyboard
- Includes 1GB MicroSD card (Can be replaced with up to 16GB card)
- Included in the box
- HTC Android Dev Phone 1
- USB Cable
- AC Adapter (with US plug)
- Stereo Hands-Free Headset
- Getting Starting Guide
- 1G Micro SD Card (inserted into Device)
So far the experience on this phone has been amazing for me. I'm going to use this blog to record my findings as I learn the exciting new platform.
I've downloaded the android SDK from:
This includes many important tools, most notably adb - android debug bridge, which allows me to run all kinds of commands on the device directly from my computer, ie without typing on the device. It also eliminates the need to run telnet or ssh server on the device.