[Android Software/Hacking General [Developers Only]] ShadowEO:
ZeroBT - Reverse Bluetooth Tethering

This was a modification I released on Android Central for the LG Optimus S. I know there's quite a few tutorials on Reverse Tethering however I made this so it would be easy to connect/disconnect for tablets and phones without data service, so without further to do...

Some notes before I give the download link and Instructions:

This is a proof-of-concept, the concept? That using the SQLite3 binary you can create Android services that watch for specific changes to the Android settings database. This Reverse Bluetooth Tethering mod watches /data/data/com.android.provider.settings/databases/settings.db for changes to WiFi, Bluetooth and Mobile Data states.

This currently will not work with phones that have an active data service, this is because it watches the Mobile Data setting and dials if it's turned on at the same time as Bluetooth, However I cannot block Android's mobile data at the same time.

Warning:

If your kernel does not have PPP support in it's kernel, You'll have to either compile the kernel modules yourself or find a kernel that does have support.

Originally, this package contained the PPP kernel modules but they were compiled for the iScream Kernel found on Android Central. Likewise, the binaries included might not work or might overwrite the ones included in your ROM if they already exist, if this is the case, please copy the files from your ROM's ZIP back into the xbin folder (rfcomm, chat)

Download:

ZeroBT 0.0.1.0 Beta 1 (Signed): Download the attached version, I can't post links yet.

Unless the carrier you plan to be tethering from is Verizon, you might need the Peers and Chat script files from a Berry4All package (Or download the Berry4All-PPPd-stuff.zip file attached).

Installation:

Flash the ZIP file and then mount your USB Storage without exiting recovery,

On your SD Card you'll see the ZeroPPP folder, copy your carrier's Options and Chat script here. Open Configuration.ini to begin configuration.

Configuration:

Let's say your a Sprint customer and want to reverse tether your Sprint phone to your Android device.

Your configuration.ini would look like this:

# Bluetooth Settings
BluetoothAddress=XX:XX:XX:XX:XX:XX

# PPPd Settings
PPPOpts=/sdcard/ZeroPPP/sprint
CSisEXE=no <-- This is only yes if the chatscript file is a bash script that calls chat.
ChatScriptFile=/sdcard/ZeroPPP/sprint-chat
EnableLogging=no
PPPLogFile=/sdcard/ZeroPPP/pppd.log

Use:

Now this is the reason that I stated not to install this mod if you have an active data service/plan..

To trigger connection while the Daemon is running:

Toggle Wifi Off, Bluetooth On, and Mobile Data on.

within aprox. 10 seconds (Some debug statements I forgot to take out makes it wait 5 so you can check logcat and to keep the log clean) your bluetooth phone (in my case a MotoRAZR) should connect to your Android device and start dialing.

Enjoy.

I posted this here on XDA-Developers because it could be of some use to someone later on. This is by no means a completed reverse tethering modification, however maybe someone could give me ideas for a new trigger. (I was planning to create a Settings UI using SL4A and Python.)

Please give some feedback, this is my second real Android mod and I would love for it to be available for public scrutiny. I know this might be better on Tablets so feel free to take the scripts included and tinker with them as you wish :D