Tips and Tricks for Android Users
Posts tagged Tips
Installing Firefox Mobile on a Samsung Captivate
Aug 27th
Mozilla just released a mobile version of Firefox for Android devices. Unfortunately they haven’t directly published the link to the apk. If you follow the download link from a desktop system it takes you to the desktop installer. From a device it takes you to the apk, but I’m on a Samsung Captivate I haven’t rooted yet, so I can’t install from the browser. Instead I downloaded through the browser, sucked the file out using ADB, and the installed that way:
- ./adb pull /sdcard/download/fennec.apk ~/fennec.apk
- ./adb install ~/fennec.apk
Dear Mozilla, great idea directing folks to the right download automatically, but please take this case into consideration. Lots of folks on AT&T devices who can’t install directly. Or, alternatively, AT&T could stop being idiots. Slim chance of that though.
Samsung Captivate Tethering for OS X
Aug 17th
When I plugged my Samsung Captivate into my OS X machine I was surprised to see a network connection dialog pop up on my laptop and what looked like a tethering app pop up on the device. Given that AT&T tries to kill off tethering in every way possible with the iPhone, I figured it wouldn’t be on with my Captivate either. Or at least not easy to get working. No problem though. I just needed to figure out which set of settings to put in the network connection dialogs in OS X.
In the main network settings screen under System Preferences:
- leave telephone number blank
- use ‘WAP@CINGULARGPRS.COM’ for Account Name
- use ‘CINGULAR1′ for Password
Then click the advanced button and setup:
- Vendor generic
- Model GPRS (GSM/3G)
- APN is ‘wap.cingular’
- CID set to 1
After that starting up a network session with my Captivate attached over USB yielded a pretty quick network connection! Now if only they could fix these GPS issues….
Text to Speech Using Scripting
Jul 25th
I’ve been fooling around with Scripting Layer for Android to generate some speech notifications. Two issues I ran into, figured I would share if anyone else does. The first was that the examples still use the droid.speak() call, and it should be droid.ttsSpeak() instead. Quick fix. The second however I only saw on my CM6 device, which was that no speech was coming out ever after I updated the ttsSpeak() call. logcat turned up the issue quickly enough though. I just needed to go into settings from the home screen and download the data necessary to generate speech. Once you’re in the “Voice Input and Output” area the process is obvious. It’s just knowing that you need to go into settings to get speech working that’s a bit tricky.
Pirate Boot Logo
Jul 25th
Every proper hacked device needs to boot up with a pirate theme. Fortunately the boot animation is trivial to replace on a Nexus one. I’m currently running CyanogenMod6, but I believe this will work other places. I replaced the boot animation with just a single image of a skull and crossed swords:
There’s plenty of info out there about replacing the boot logo and what the files do. Here’s how to get it up and running through:
- Download the pirate boot animation zip file to your system
- Remount the system partition read-write: adb shell mount -o rw,remount /dev/block/mtdblock3 /system
- Push the file across to your device: adb push pirate_bootanimation.zip /system/media/bootanimation.zip
That’s it, reboot and enjoy! If you want to poke around and change it, it should be pretty easy. There’s a writeup of what the contents of the bootanimation.zip are, which is very useful. Supposedly, also, the zip needs to be uncompressed to work. But that just means setting compression level to 0 when you run zip. This is the command I use on my OS X machine: zip -0 pirate_bootanimation.zip desc.txt part0/boot_00003.png”. That should make it easy to swap in any other picture to customize.
Android Scripting Environment is now SL4A
Jul 22nd
I downloaded and installed the latest Android scripting package, now called Scripting Layer for Android, or SL4A. I had some issues with it under CyanogenMod5 (probably my own, but I never debugged). Today I updated to a CM6 release and it seems to be working a whole lot better. There are links to a whole bunch of examples on the Tutorials page.
The application interface itself is pretty simple. When it first loads up you won’t have any interpreters besides shell. If you go into the View menu, select interpreters, and then select Add from the menu under there you can add other interpreters. The interpreters generally come with example scripts, which will show up in the main list view once they’re loaded:

There’s a preferences screen, which covers mostly visual options:

If you long press on a script you have an option to edit it:

The editor that comes up is just a simple but effective textbox, so at least you can edit scripts in place on the device:

And then you can run a script, in this place displaying a toast message over the keyboard when I run the hello world program:

Screenshot on a Rooted Device
Jul 20th
In addition to capturing a screenshot with a computer using the Android SDK there’s also a screenshot application (available on the market, called simple ‘screenshot’, I’m not sure how to find out the package name to create a market link for it. It only works on rooted devices, but all of mine are. One nice feature is the “shake to capture a screenshot” option. So that instead of having to keep hopping into the screenshot app to setup a shot, back to the app, wait, hop back to setup another time delayed shot, back to the app, etc. Just setup screenshot to capture when you shake and go through whatever set of screens you want.
Getting the Most Out of Froyo
Jul 14th
If you’ve got Froyo on your phone now and you’re looking to make sure you know about all the changes, check out this Android 2.2 review from AnandTech. It walks through all the differences compared to the 2.1 release, and there are a few good points in there. Everyone knows about the hotspot functionality for instance. But I had missed the automatic updates from the Marketplace till just now. Maybe there’s something in there you missed too.
Battery Graph Application
Jul 13th
I’ve started using an app called Battery Graph (marketplace link) by Morgan H to try to monitor changes in my battery drain. It’s a background app that collects battery charge info over time and displays a graph on device. That makes it easy to spot major changes to discharge rate. Say if you install a new widget some time early afternoon, and later that evening you see the discharge rate increased some time after lunch, you know the widget is doing something heavy and impacting your total battery life.
In the menu area there’s even an option to export the set of data to CSV so you can suck it into a spreadsheet or use it to drive some of your own tools. Would be great actually if there was an option to record a list of running processes along with the battery status info, so that it could attempt to spot which processes are sucking up the most resource.
Keeping Recovery Image After Reboot
Jul 11th
I’ve been trying lots of custom images on my N1 and G1 recently. One minor annoyance was that after installing a custom recovery image like Amon Ra to flash different base images I seemed to revert back to the default recovery image after a reboot. It wasn’t too annoying cause I kept the recovery.img on my sdcard and just did a flash_image before rebooting whenever I wanted to apply updates. But still, annoying.
Then I ran across this description of replacing the recovery partition, which explains that part of the boot process is writing the recovery.img from /system/recovery.img. That explains a lot! That page also describes how to replace the /system/recovery.img so that you keep your new recovery image after each boot. Ahh, now I have my full set of menu options whenever I hit recovery.
