[G1 General] JesusFreke:
I've found a way to register the G1 in the initial registration screen that comes up the first time you boot the phone (or after you wipe the phone). It will allow you to register if you don't have a sim card at all, or if you have a sim card but no data plan.

First, You must have either RC29 or earlier, or modded RC30. It won't work with official RC30, sorry. If you don't know for sure what version you have, but you know you haven't installed a modified RC30 build, then the easiest way to check is to reboot the phone, and once it starts up and is showing the "click the android to begin" screen, or the "no sim card" screen, then type the following on the phone keyboard

<enter>reboot<enter>

If it reboots, then you have RC29 or ealier. Otherwise you have RC30.

Second, you must have adb installed on your computer, and have the USB drivers installed, or at least ready to install when it asks for the driver when you connect the G1. See this page for details on how to get adb working: http://code.google.com/android/intro/develop-and-debug.html#developingondevicehardware

Third, you must have a wifi network that you can connect to.

There are too many possibilities to write specific step-by-step instructions for every case. So I will give an overview of the process instead. If someone else wants to write some specific instructions, that would be welcome :D

-----------

When you start up the phone without a sim card, it goes into a locked screen that says "no sim card found", and you can't even get into the registration app. So the first step is to get around that screen. You have to connect to your phone with adb shell and get root access, and then type the following command:

sqlite3 /data/data/com.android.providers.settings/databases/settings.db "INSERT INTO system (name, value) VALUES ('device_provisioned', 1);"

And then reboot the phone. When it starts up again it will go into the registration screen instead of the locked "no sim card" screen.

This assumes that you have the sqlite3 binary on your phone. This binary is provided in RC30 v1.2. Alternatively, you could manually copy the binary to your phone with adb push, or put it on the sdcard and copy it to your phone. I can post a copy of just the sqlite3 binary if needed.

-----------

The second step is to enable and configure wifi, so that the registration process can connect to the google servers. In an adb shell session, type the following command:

am start -a android.intent.action.MAIN -n com.android.settings/.Settings

This doesn't have to have root access to work. It works fine with the "shell" user that adb on non-modded phones runs as.

That command will bring up the settings page on your phone. From there, you can enable wifi and connect to your wifi network, and then proceed with registration as per normal :D

------------

A few tips and tricks:

- If you have an official RC29 or lower phone, type the following command on the phone keyboard to enable adb:

<enter>setprop persist.service.adb.enable 1<enter>

- If you need to get root access on an official RC29 or lower phone, while it's at the registration screen, or the "no sim card" screen, enable adb (see first tip), and then type the following command on the phone keyboard:

<enter>telnetd<enter>

Now, copy a busybox binary to /data/local/busybox with adb push, and then connect to your phone with adb shell, and give the busybox binary execute permissions (i.e. chmod 755 /data/local/busybox)

busybox has a telnet applet, so you can do:

busybox telnet 127.0.0.1

to get a telnet session with root access.

- If you don't want to register the phone at all, you can set the app.setupwizard.disable property to 0 to prevent registration. Once you have an adb shell session open, type the following:

setprop app.setupwizard.disable 1

and then reboot. once it loads back up, it should bypass the registration screen all-together.

But beware, the phone seems a bit glitchy if you don't have it registered. For example, the home button doesn't seem to work. And you can't access the market or any of the google apps of course.

(Note: the following was the previous way to skip registration. I'll keep it here for informational purposes, but its easier to use the app.setupwizard.disable method instead of this)

- If you don't want to register the phone at all, you can edit /data/system/packages.xml and disable the registration screen. Add the following to the end of the <package> section for com.android.setupwizard, and then reboot:

<disabled-components>

<item name="com.android.setupwizard.SetupWizardActivity" />

</disabled-components>

so the full <package> would look something like below after the modification:

<package name="com.android.setupwizard" codePath="/system/app/SetupWizard.apk" system="true" ts="1217592000000" userId="10010">

<sigs count="1">

<cert index="0" />

</sigs>

<disabled-components>

<item name="com.android.setupwizard.SetupWizardActivity" />

</disabled-components>

</package>