Tips and Tricks for Android Users
Lead Hacker
This user hasn't shared any biographical information
Posts by Lead Hacker
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.
Essential Android Apps for Geeks
Aug 25th
A few essential apps for those more technically minded Android users out there. If you know of others that should be in here let me know in the comments.
Terminal
This one is almost a no-brainer. Everyone who knows Android is Linux underneath (and who knows Linux) normally heads for a command line to check things out right off the bat. You can get access via ADB, but having direct access right on the device is killer. This app gives you access to the command shell built into the device.
Market link: Android Terminal Emulator
ConnectBot
ConnectBot is an SSH client application for your phone. It’s a fantastic application for quick access to remote systems. If you’re on a device without a physical keyboard it’s not quite as slick to use (I wouldn’t recommend trying to use vi on a remote system from a Samsung Galaxy for instance), but for quick tasks it can be fantastically convenient.
Market link: ConnectBot
Advanced Task Killer
This seems to be a pretty consistent tool in most advanced user’s toolboxes. Android apps can keep running in the background. Most of the ones that do give you good ways to control when they run, and the OS itself does a generally good job of managing them. But if you tend to poke around with lots of apps and try out all the different tools you hear about you’re bound to run across one or two that misbehave every once in a while. When you do, Advanced Task Killer can help you figure out what’s going on and set things right again.
Market link: Advanced Task Killer
Astro File Manager
This is the free version of a file manager application. There’s a paid version that includes a ton of additional features, but so far I’ve stuck with the free version. Nice interface for browsing around and seeing what files are on your device. Includes built in viewers that generally handle text and image files well.
Market link: Astro File Manager
Dropbox
Dropbox is a free service that lets you store files online and sync them between systems. If you don’t already have an account and want to try it out please sign up using this affiliate link (I get credit for the signup and get some free space on Dropbox if you do). They have an Android application that allows viewing, downloading, or uploading. Together with an application like Astro you can upload arbitrary files from your phone to Dropbox as well. From within Dropbox use upload from the menu, and then select any file and use Astro to complete the action.
Market link: Dropbox
Scripting Layer for Android
An app that allows for accessing native Android functions from multiple scripting languages. Once you install SL4A you can use it to pull down interpreters. A bunch are available, like Unix shell, Python, Perl, Ruby, and others. Then you can run scripts in those languages that tie into Android specific functions. SL4A is not available in the Marketplace however, so use the info on the Google Project page to download the apk directly. If you’re on an AT&T device like the Samsung Captivate and haven’t hacked it to allow direct third party installs you’ll have to load the apk files using ADB. As of right now, it seems you need to download the core SL4A app and then separate downloader shims for the different interpreters. The base sl4a seems to only have shell installed by default. But once you install something like python_for_android_r1.apk and click install within that app you’ll get Python support in sl4a.
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….
On Device Packet Capture
Aug 5th
When I need to capture network traffic from my device I normally capture traffic at a router to see what’s going on. I had seen some mentions of running tcpdump on device and pulling off the pcap file to a desktop to inspect, but Androshark was what people mentioned the most. And it didn’t seem to be actively developed any more. I ran across Shark for Root and Sharkreader recently however. It’s an app for packet capture and a simple packet capture viewer directly on the device. Works out pretty well. Requires root access, and it seems to be working quite well on my Nexus One with CM6. Screenshots below.
Start/stop capture, writes to the sdcard by default:

View packet dump stream:

View contents of an individual packet:

Assember/Disassembler for Dalvik
Jul 30th
I ran across a mention of an assember/disassember pair for Dalvik in an XDA Forum posting. Just had a chance to give at least the assembler a try and make sure I could get things working before I posted. Yep, working on the emulator at least. There are a few examples you can start with, instructions for assembling and running are in the comments. And some pages in the wiki that look like they’ll provide some great starting points.
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.
Commodore 64 Emulation
Jul 24th
I was happy to see there’s a Commodore 64 emulator in the Marketplace for Android, the Frodo emulator. I played around with a bit, but what I really wanted to do was hack around a bit with some old school basic. This is one of the computers I grew up with, and I get nostalgic for the old days every once in a while. However, I was having a really hard time figuring out how to get the version of Frodo under Android to create a new disk for me to save stuff to. If you can’t save the stuff you’re playing with what’s the use? I could save out the whole state, but I figured there had to be a better way.
So I downloaded a version of VICE for my desktop system. That has a much richer set of controls, one of which is creating and attaching a fresh image (it’s a ‘file’ menu item). I figured if I was lucky the image created with VICE would work to at least get me started on Frodo on my device. And lucky me, yes it does! Actually, now I can push the d64 images back and forth, use the emulator on my desktop to do a little poking around and push the file over to my device to take with me. Very nice! Just remember, save with replace is ‘SAVE “@0:FILENAME”,8′. Otherwise an attempt to overwrite a file will just silently fail. Ahhh, nostalgic.
Nook Reader for Android
Jul 23rd
Barnes & Noble released an Android version of the Nook ebook reader. It’s the same path that Amazon followed. They have a hardware device for reading ebooks. But as other mobile devices start to get more popular they also allow those devices to hook into the same content. Effectively putting your library “in the cloud”, so that you can download the books you’re reading to your different devices and keep your reading position synced across them. I’m already an avid Kindle user on iPad, iPhone, and Android. But I gave the Nook reader a try just to see what it’s like.
If you’re on your Android device right now you can hop to Nook in the Market directly, or just search for “Nook” in the Marketplace app. Compared to the other readers I’ve seen, the Nook feels a bit amateur. The reading experience itself is the real laggard here. I’m hoping they can polish this thing up in future revisions. A few screenshots to show you what I mean.
This is the main library interface:
I downloaded a free book. One of the Google Books scans, which is nice. Like the other platforms they’re tying into the free content at Google to provide a ton of free scans of classic and public domain works. Kudos on that. Some of the Google Books efforts include direct scans of pages instead of the text. Here’s what a scan page looks like:
And a page of text:
That lack of margin on the reading screen is really killing me, and I don’t see a way to adjust it. I also like to read with full justification, which doesn’t appear to be an option either.
Here’s a shot of the ebook store, just for the sake of completeness:
The storefront is pretty decent, about on par with the others.
Overall though the interface is still a bit clumsy, the reading experience itself needs some work, and the app itself is buggy (I’ve had it crash twice in the short time I used it). I’m very happy to see an additional ebook reader out, but this one needs some more work before it’s ready for prime time.
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:





