Wireless Tether on the Droid Incredible

Staples should hire the dudes who wrote android-wifi-tether, cause, man, that was easy.

I thought this would be a fine evening to get tethering working on my Incredible. One install of android-wifi-tether 2.0.5 pre-release 8 later, I’m no longer in the situation of having to pay Verizon to use the data plan that I already pay them for. No configuration, no nothing (beyond already running 2.2, I mean); just push the big “tether” button. Bam. Off to make a donation now!

Incredible Update to Froyo

Since I finally rooted my Incredible to resolve the mysterious “Low on space: Phone storage space is getting low.” error, I decided it was time to update to Froyo (Android 2.2) as well. This proved to be fairly straightforward following the instructions in the relevant thread on XDA-Developers, though I had a few surprises on the way. I’ll share a few discoveries and clarifications:

  • The PB31IMG.zip “stock” file linked in the XDA-Developers thread is an unrooted Android 2.1+Sense image.
  • When you install the stock image, the phone will turn off, reboot, and then restart the loading process without any warning. This does not mean that the install has gone awry and that you’re about to have a $200 brick. Keep coolie-cool, boy.
  • When you boot into the stock recovery image, what looks like an error screen will come up (an Incredible with a red exclamation point and triangle). That’s normal; you just need to hit Power+Volume Up to get to the menu. (This was a surprise to me, since I’d only seen the ClockworkMod recovery installed by unrevoked3 which boots straight into the menu.)

Also, when you start up using Froyo, you’ll notice that many applications have disappeared from the Market. This is because Market apps, both free and paid, can be marked as “protected”, which means that you have to be using a recognized version of the OS (whether this is app-specific or store-wide, I’m not sure) for the app to show up, and the fingerprint in /system/build.prop in the Incredible Froyo image isn’t recognized. To fix this, update ro.build.fingerprint to verizon/voles/sholes/sholes:2.1-update1/ESE81/29593:user/release-keys in /system/build.prop. (See this post on Android Forums if you need detailed instructions on how to update the fingerprint.) This will make your phone appear to be a Droid running Android 2.1-update 1 to the Market (I’m guessing this eliminates 2.2-specific apps; I haven’t looked yet). Go to the dialer, and enter *#*#CHECKIN#*#* to force a checkin so that your changes will take effect. (h/t Geniusdog254 on XDA-Developers for pointing out how to force a checkin.)

Finally, I re-rooted the Incredible using unrevoked3, and disabled CityID (not going to pay for it), Verizon Navigator (why would I pay for this when Google navigation is free, even if I did need voice navigation?), and the 3G Mobile Hotspot (not going to pay $20 a month to use the data plan that I already pay for, thanks!). The last phone project is getting Wireless Tether running, but that’s for another day.

P.S.: if you want to see if you like vanilla (“Senseless” 😉 ) Android 2.2 on your Incredible, check out SkyRaider’s images. I actually installed this before going to the leaked 2.2+Sense image, and it was very snappy. I ultimately decided to go with the Sense image, because I figure that it’s gone through more testing, but if you don’t want to put up with the Sense bloat, this might be an option for you as well.

Droid Incredible: Free At Last

A week or so ago, I started getting the much-mentioned, not-resolved error on my Droid Incredible: “Low on space: Phone storage space is getting low.” After trying a few quick fixes suggested by some Google searches, I finally rooted the phone last night and got to the bottom of it.

As this ZDNet article notes, the error message is confounding, because it’s only supposed to appear when you have less then 10MB of storage free on your “phone memory”, yet you can see in Settings→SD card & phone storage that there are hundreds of MB free. It turns out that the problem is that the “phone storage area” is divided into two partitions. One of these is approximately 748MB, is mounted on /data, and is where user-installed applications are stored. The other is about 150MB, is mounted on /data/data, and is where applications store their data. What the SD card & phone storage settings page shows you is the partition that is mounted on /data, but what was running out of space was /data/data.

So, how do you figure out what’s taking up all the space?

  1. Root your phone. This is now a trivial matter, thanks to unrevoked3. This will install the very useful ClockworkMod recovery image, as well as adding a “Superuser Permissions” app that will allow you to grant root access to applications that request it.
  2. Install the Android SDK.
  3. Connect the phone to your computer via USB, and enable USB debugging (under Settings→Applications→Development).
  4. Reboot your phone into the ClockworkMod recovery image, either by using adb reboot recovery from the Android SDK, or powering the phone on while holding the volume-down button, then selecting “recovery” from the HBOOT screen.
  5. Mount the data partition. In ClockworkMod, go to partitions→mount /data.
  6. Get a root shell on your phone by running adb shell on your computer.
  7. Mount the /data/data partition by running the following command from the shell you have on your phone: mount /dev/block/mtdblock6 /data/data
  8. cd to /data/data, and use du (du -sk * | sort -n is a useful pipeline) to find out what’s taking up all the space. (As an aside, it’s way easier to poke around the filesystem from the recovery image rather than using su to get root when the phone’s running normally. The set of command-line tools provided in Android is very bare-bones—you don’t even have cp—while you’ve got a well-equipped BusyBox in the recovery image.)

In my case, I found that the com.android.providers.contacts directory was taking up over 100MB, 90MB of which was in a SQLite database. I had no contacts stored locally, so I just mounted the SD card, copied the directory to that for backup/forensic purposes, and deleted it from /data/data. After rebooting the phone and resyncing my contacts with GMail, the space being used in that directory was cut down by an order of magnitude. I do note that I can no longer sync Facebook contacts, but I’m not certain that that is a result of this—that may not have been working before the “low on space” debacle. If this problem re-occurs, I’ll dig into that SQLite DB to try to find out what was taking up all the space. For the moment, though, the problem is resolved.

Now that I have a rooted phone, I’m very tempted to install the leaked Android 2.2+Sense leaked ROM