[Android Software/Hacking General [Developers Only]] Teh Dust:
Yes you read the title correctly, in this thread you will be shown how to put any android device on any carrier regardless of radio. Currently the process is long and a bit complicated. Voice works but not so well. However if this sounds like something for you then read on my friends. :cool:

Contributors

kmobs - helped me discover how to enable Ad-Hoc networking on Android

grunted - for his excellent tutorial on SIP and Google Voice.

Prerequisites

An Android phone

A "slave" device (ex. Another phone on the carrier you want to be on.)

Google Voice

Known Issues

With the current method there is a big latency issue when it comes to voice calling. Depending on network speed there can be a 1-5 second delay from the time you say something to the time it takes the person on the other end to hear it. It's very much like a Sat-Com. Any help improving performance is greatly appreciated.

On some devices, when changing wpa_supplicant.conf you will receive an error wile trying to turn on wifi after a reboot. The only known fix is to hot swap and push the file back onto the phone after every reboot.

My Setup

Though this guide can be adapted to any Android device, some slight changes may need to be made. This guide is being written from my experiences with the devices I have at hand. They are the following:

Phone: HTC Evo 4G

Carrier: Sprint

Firmware: Android 2.2

Slave: T-Mobile G1

Carrier: T-Mobile

Firmware: Android 2.1

Method One

In this method we will be using Wireless Tether for Root Users to handle data. SMS is handled through Google Voice for Android and voice is handled by a combination of Google Voice, SIPDroid, SIPGate, SIPSorcery, and PBXes.

Data

Getting data to work is fairly easy. The slave device needs to act as a hot spot, for this we will be using Wireless Tether for Root Users with the following settings:

Wifi Encryption Enabled

Passphrase: abcdefghijklm

SSID: Slave

Change other settings at your desecration.

Now on your main device turn on wifi and search for the slave device. If you do not see the "Slave" ssid in your list you need to perform the following steps in order to enable Ad-Hoc networking on your main device.

On The Main Device

1. In WiFi settings choose to add a new network.

2. Use the following to set up your network.

SSID: Slave

Encryption: WEP

Passphrase: abcdefghijklm

3. Disable WiFi.

4. Open /data/misc/wifi/wpa_supplicant.conf in your favorite text editor either on the device or pulled off using ADB.

5. Your config should look something like this:

ctrl_interface=eth0
update_config=1

network={
ssid="Slave"
scan_ssid=1
key_mgmt=NONE
auth_alg=OPEN SHARED
wep_key0="abcdefghijklm"
}

We need to change it to look like this:

[B]ap_scan=2[/B]
ctrl_interface=eth0
update_config=1

network={
ssid="Slave"
[B]mode=1[/B]
scan_ssid=1
key_mgmt=NONE
auth_alg=OPEN SHARED
wep_key0="abcdefghijklm"
}

6. Now turn WiFi back on and your device should connect to the slave.

If the following steps are done correctly you should now have data access on your main device.

SMS

Once data access has been achieved, SMS is simple. The Google Voice app will allow you to send and receive SMS over wifi. Download the app and set up your voice account, your done.

Voice

SIPGate Setup

1. Head on over to sipgate.com and create a SIPGate ONE account, it's free.

2. Go to Settings and click the Phone Numbers tab.

3. Click Buy Phone Number, don't worry the first one is free.

4. Go back to My Settings and click the Phone Numbers menu button.

5. Select your new number and save.

6. Click the Extensions menu button.

7. Enter a new extension (I used 99) and save.

8. Click the VoIP menu button and create a new VoIP phone.

9. Hover over your new VoIP phone and click SIP Credentials, make a note of your SIP-ID and Password.

SIPSorcery Setup

1. Head to sipsorcery.com and create a free account.

2. Go to SIP Providers and click Add.

3. Use the following settings:

Provider Name: SIPGate

User Name: [SIP-ID from SIPGate]

Password: [SIP-Password from SIPGate]

Server: sipgate.com

Register: Checked

Register Contact: [auto generated]

4. Now go to Dial Plans and click Add.

5. Use the following settings:

Dial Plan Name: Google Voice

Trace Email Address: [blank]

Script Type: Ruby

Script: [this is a template and edits need to be made where comments are left]

# Copyright(c) 2010 Mike Telis

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.

AREA_CODE = '717' # my area code
GV_USER = 'username@gmail.com' # my GV e-mail address (user@gmail.com)
GV_PASS = 'GV password' # my GV password
CB_NUMBER = '1aaaxxxyyyy' # my 11-digit SIP number (only one)

SPEED_DIAL = { # my speed dial numbers
'1' => '19879879876', # Mom
'123' => '12345678901', # Work
'45' => '17479876543', # Gizmo BFF
'411' => '8004664411', # Google 411
'266' => '4153767253@podlinez.net', # CNN Headlines
}

begin
sys.Log "** Call from #{req.Header.From} to #{req.URI.User} **"

if sys.Out # if outbound call
num = req.URI.User.to_s # Get a string copy of the number to dial

num = SPEED_DIAL[num] || num # Substitute with speed dial entry, if any

case num
when /@/ then sys.Dial num # URI dialing
when /^[2-9]\d{6}$/ # Local call, 7-digit number
num = '1'+ AREA_CODE + num # prefix it with country and area code
when /^[01]?([2-9]\d{9})/ # US number with or without country code
num = '1' + $1 # add country code and truncate number to 10-digit
when /^(011|00|\+)(\d{10,})/ # international number
num = '+' + $2 # GoogleVoiceCall works with '+' prefix only

else sys.Respond 603, 'Wrong number, check & dial again'
end

sys.Log "Calling #{num} via Google Voice"
sys.GoogleVoiceCall GV_USER, GV_PASS, CB_NUMBER, num, '.*', CB_NUMBER =~ /^1747/ ? 7 : 1, 30

else # sys.Out
sys.Dial "#{sys.Username}@local"
end

rescue
sys.Log("** Error: " + $!) unless $!.to_s =~ /Thread was being aborted./
end

6. Go to SIP Accounts and change your Out Dial Plan to Google Voice.

PBXes Setup

1. Go to pbxes.org and setup an account. (This is the last account to setup and of course, is free.)

2. Go to Trunks and click ADD SIP Trunk.

3. Change the following fields and leave the rest as they are:

Trunk Name: SipSorcery

username: [Your username at SIPSorcery]

password: [Your SIPSorcery password]

SIP Server: sip.sipsorcery.com

register: yes

4. Go to Extensions and click Add Extension.

5. Change the following fields and leave the rest as they are:

Extension Number: [Your SIPGate extension]

Display Name: [Choose one which will be used to login though SIPDroid]

Password: [Choose one which will be used to login though SIPDroid]

Voicmail & Directory: Disabled

6. Go to Inbound Routing and click Add Incoming Route.

7. Change the following fields and leave the rest as they are:

Trunk: SipSorcery

Regular Hours: [Extension radio button checked with your extension]

After Hours: [Extension radio button checked with your extension]

8. Go to Outbound Routing and click Add Route.

9. Change the following fields and leave the rest as they are:

Route Name: SipSorcery

Trunk Sequence: SIP/SipSorcery

SIPDroid Setup

1. Download SIPDroid for free on the market.

2. Hit menu and go to settings. Make the folowing changes:

Perferred Call Type: Sipdroid Only

SIP Account Settings

Authorization Username: [Your PBXes Extension Display Name and Extension in this format: DisplayName-Extension (ex. tehdust-99)]

Password: [Your PBXes Extension password]

Server: pbxes.com

Protocol: TCP

Change other settings at your descretion

Google Voice Setup

1. In settings choose Add Another Phone.

2. Choose Home for your phone type and use your SIPGate phone number.

3. Google Voice should call your device through SIPDroid. Answer the call and input the number given.

You should now be able to make calls.

Tips

Use a under volt kernel on your slave and set the cpu low enough to only be able to operate as an access point. Use no widgets and keep the screen dimmed or off. Do everything you can for better battery life.

Experiment and tell me about any new methods or improvements you come up with. You will receive full credit and be added to this post.