The Treehouse Blog

Tag: g1

G1 testing – part 1

by on Apr.02, 2009, under Technology

I received my used T-mobile G1 today.  The previous user did not reset the device, so there were a few apps I could try, and web browsing worked immediately on Wifi.  Not bad for having no SIM.

Doug and I were going to take a hike, so I had the opportunity to borrow his SIM just to see that my unlock code (received with the G1) did indeed work and report full AT&T signal strength.  I also ordered a pre-paid T-mobile SIM in order to do some T-mobile signal strength checking, but I haven’t received it yet.  I wasn’t here when UPS tried to deliver it, and T-mobile sees fit to require a signature for a $7 SIM package.  Not pleased with that.

Naturally, I wanted to reset the unit to factory defaults in order to get the full experience.  That was a mistake.  After resetting, the unit reported that it had no SIM and would not give me the menus I had before.  Apparently it needs to be activated with a GMail account before it does anything, and it really wants to do that using the cell network.  So began my first hacking of the G1 – just to get the access I had earlier today.  I Googled this a good bit, but as one might expect, I did not seem to find a complete answer, so I’ll try to document what I did (not quite a cookbook though, sorry).

Theory:  The G1 can register your GMail account using WiFi if it thinks it has a SIM.  You can update a databse on the box to make it think this, but you essentially need root shell access.

1.  My G1 apparently had a newer firmware than R29, as determined by typing <enter>reboot<enter> and not having it reboot.  R29 has a root shell in the background that listens to your keystrokes but produces no output.  Why?  Who knows.  But mine didn’t do that.  So, I had to downgrade to R29.  See this article.  One note about the downgrade is that after the upgrade progress bar disappears, it just sits there.  You need to pull the battery for it to restart.

2.  You need to have USB debugging turned on.  This is supposed to be turned on via a menu, but since we can’t get to the menu, the shadow shell in R29 can be used to activate this:  <enter>setprop persist.service.adb.enable 1<enter> (that I found here).  I think you need to reboot the G1 after that, or maybe at least disconnect/reconnect the USB.

3.  You need to use the SDK’s tools to get a shell.  Download the android SDK, and hopefully a “./adb -d shell” will give you a prompt.  This is just a user shell, and su and sudo don’t exist.  So, type <enter>telnetd</enter> on the G1 and run ./adb -d forward tcp:23 tcp:23 on your SDK box.  Then telnet localhost on your SDK box, and you should have a root shell on the G1.

4.  You need to copy a sqlite database to be edited.  I read articles that indicate that “sqlite3” should be a valid command on the G1, but it didn’t work for me.  I chmod’d the file on the G1, used adb pull to move it to the SDK box, used the sqlite3 in the SDK to make the edit, and adb push to put the file back.  The file and changes are documented here.

5.  Reboot again and it should jump into the account creation stuff.  You’re still screwed as you need to use WiFi.  This article also describes the command-line you need to run in order to spawn the Wifi settings over top of the account creation dialog.  After that, you can proceed with providing or creating a Gmail account.  And your SIM-less G1 is usable!

I’ve downloaded a few apps, but haven’t yet found a ministumbler replacement (disappointing).  Still a long way to go on this.  No doubt I’m not taking the easy way.

4 Comments :, more...

November 2024
S M T W T F S
 12
3456789
10111213141516
17181920212223
24252627282930

Archives

Content Copyright © 2004 - 2019 Brady Alleman. All Rights Reserved.

As an Amazon Associate I earn from qualifying purchases.