[Gen9 Android Development] trevd:
[UPDATE]2012-08-06 This is not the only way of getting Dongle's working on Android, If widgets are your thing and you doing feel confident working with system files etc then you may be better served using the ppp widget form draisberghof.de, these are the folks who piratically wrote the book on getting dongles working on linux and by extension android.

[UPDATE]2012-08-06 The source to libhuaweigeneric-ril ( github ) has been updated to include fixes made by omegaRed7 - This massively improves the fault tolerance upon RIL Startup, Tests were carried out on the E173s-1 but it should be beneficial to all modems ( I hope :) ).

[UPDATE]2012-07-28 As the Rom Version is quite old and it doesn't really require it's own rom I've extracted the files required to implement this functionality - Download Here, The Archive contains a README file with installation instructions

IMPORTANT - pppd permission need changing to 6755 also change to ownership to the root account ( Thanks to __DS__ ). you can do this through adb or terminal emulator

adb shell chown 0:0 /system/bin/pppd
adb shell chmod 6755 /system/bin/pppd

for this to function

[UPDATE]2012-06-25 Added Forked libhuaweigeneric-ril to Github Repo this includes all the changes I've made - Check This Post For Details

[UPDATE]2012-06-23 Added Github Repo - Check This Post For Details

[UPDATE]2012-06-16 THE DOWNLOAD LINK HAS BEEN UPDATED AS THE FILES IN /etc/system/usb_modeswitch WHERE NAMED INCORRECTLY[/UPDATE]

Hi Folks - This post is going to change fairly often, there is still more info to add, I just got bored with typing for now :)

The Sales Pitch :)

This rom aims to provides the same "hands free" approach offered by the Archos 3G Key and extends this functionality to Huawei Branded USB Modems.

Introduction

Here is a custom rom I've currently been hacking away at, if feels like I've had it under wraps for months.

That being the case. I'd like to thking on to enable Huawei USB Modems - This is still a WORK IN PROGRESS but It feels like i've been keeping it under wraps for months, So it's time to throw it out there for further testing. So Dongles at the Ready! It could get a little hacky :)

WARNING

The Full Size USB Slot has been known to fail from moderate use. As such I would recommend using an USB extensions cable for connecting devices.

VERY IMPORTANT NOTES - PLEASE READ

1. This is definitely not an every day use rom on any other device this woud have been deployed as a recovery flashable update. The reasoning behind the rom deployment is it's only one file to copy and youi're ready to go. It is also a tedious task to manually go through (especially on the 100th time

2. Please don't ask a me if a certain device will work or not. It is not helpful on a number of levels,

a) I simply don't know - I don't own the model in question. Further more you can figure it out yourself.

b) The Chances are that you could probably find out the answer without leaving the comfort of xda - The libhuaweigeneric-ril has been passed around xda like a <Insert Well Used Analogy Here> so a quick search of xda may turn up something useful to reassure you.

c) In reality though we are not going to know if your dongle is working until you "Try It Yourself".

3. if you find your device doesn't work then you need to gather all the relevant information to help get a feel of what's going on; See Below

SUPPORTED DEVICES

The theoretical list of supportted devices come from those devices supportted by usb_wwan and option kernelp drivers.

IMPORTANT NOTES - WHAT YOU NEED TO KNOW

In a perfect world you can download/flash the attached update file. Reload your SDE, Plug a USB 3G Dongle and have It connect and go about you day .

This is the ultimate goal and currently what happens on my own device :)

TROUBLESHOOTING

There's about a 25% based on my current test this won't happen. There are 2 main ways your connection attempt can fail.

1. The UsbStick has not switched to modem mode

2. The ppp connection script failed

Either Way it would be highly useful post the list of system properties, outputs of dmesg and also a full logcat aswell as the vendor/product id from lsusb,

some like this throught the adb

adb shell getprops
adb shell lsusb
adb shell dmesg
adb logcat -b radio -b system -b main -b events

Please have a glance over it before posting as It may contain information that you would not want others to see!

ROM DETAILS

Android Version: 4.0.3

Archos Version: SDE 4.06

Removed : Nothing

ADDITIONS

init.dongle.rc - initialization script, I wanted to avoid "polluting" any other init file too much

/lib/modules/usb_wwan.ko and /lib/modules/option.ko - USB Drivers for GSM modems

/system/lib/libhuaweigeneric-ril.so - A slightly tweaked version of DerArtem original huaweigeneric-ril

/system/etc/usb_modeswitch - the latest version of the usb-modeswitch-data

/etc/ppp - Added separate gprs scripts to retain compatibility with the Archos datakey

/system/bin/hotplugd - A new native android service; Manages Modeswitching and connection initialization for any Usb Device which has a valid configuration file present.

DOWNLOAD

3G Modem Redist Pack - For use with newer roms

Hotfile - archos.ext4.update.

INSTALL

Unpack zip and copy unpacked update file to the device

adb push archos.ext4.update /mnt/storage

restart device in sde mode

script should update automatically

KNOWN ISSUES

"3G Stick Connected" Icon remains in notification list after device disconnection.

pppd needs to be executed with elevated privileges.

pppd is not exiting correctly on some occasions and cause reconnection issues when using multiple sticks.

Thanks go to surdu_petru for the base sde, derAtem for his original work on the libhuaweigeneric-ril.so and pretty much every developer who has worked on these dongles with android, I think I've read every thread on XDA regarding this subject :)