T-Pulse mini and Android development

I always seem to get hardware that falls just outside of being out-of-the-box usable.

Thanks to a great many web-sites and time spent bashing I can now offer a simple solution to being able to get the damned thing to play ball with Ubuntu 11.04 for development...

First, as root, go to /etc/udev/rules and enter this, changing the username (USER) to be whatever account you are developing as:

SUBSYSTEM=="usb", SYSFS{idVendor}=="12d1", MODE="0666", USER="scharles"

This tells the system that the (USER) "scharles" has permissions (MODE) to fiddle with devices from Huwei (T-Pulse mini is badged), who's vendor id is "12d1". (If you plug the phone in ad issue an "lsusb" command you will see the vendor and device identifiers.)

Secondly issue this command, again as root (sudo), this performs some magic which I don't fully understand which makes the phone visible:

sudo usb_modeswitch -W -v 12d1 -p 1030 -V 12d1 -P 1034 -M
"5553424370ab71890600000080010a11060000000000000000000000000000" -s 20 

(I've split it to fit but it is in fact one big long line)
You will have to do this every time you reboot the machine unless you take steps to put it into a startup script or as part of your bash login script. Whatever, the choice is yours on that one.

The *big* thing to success is replacing the stock "adb" binary with a patched one (see here: https://review.source.android.com/#/c/13552/) which ensures that any devies that don't have a serial number will use the device driver name instead. Assuming that you have downloaded the binary to your ~/Downloads folder all you do is:

$ cd ~/android-sdk-linux_x86/platform-tools
$ mv adb adb.original
$ mv ~/Downloads/adb .
$ chmod +x adb

Now restart the adb server if it was running,

adb kill-server

That's all you need to do and it should be working now... you can see what you get by asking adb to list the attached devices (don't forget to put your phone into debugging / development mode first!) like this:

$ adb devicesList of devices attached 
noserial-/dev/bus/usb/002/022	device

Hurrah! Now Eclipse and ADT can talk to it and do all that nice stuff, and as a check, I connected to it and did a quick "ls" command just for the hell of it:

adb shell
$ adb shell
$ ls -l
drwxrwxrwt root     root              2011-07-13 12:54 sqlite_stmt_journals
dr-x------ root     root              2011-07-11 17:33 config
drwxrwx--x system   cache             2011-06-22 17:55 cache
drwxrwxrwx system   system            1970-01-01 01:00 sdcard
lrwxrwxrwx root     root              2011-07-11 17:33 d -> /sys/kernel/debug
lrwxrwxrwx root     root              2011-07-11 17:33 etc -> /system/etc
drwxr-xr-x root     root              2010-04-12 09:35 system
drwxr-xr-x root     root              1970-01-01 01:00 sys
drwxr-x--- root     root              1970-01-01 01:00 sbin
dr-xr-xr-x root     root              1970-01-01 01:00 proc
-rwxr-x--- root     root        19439 1970-01-01 01:00 init.rc
-rwxr-x--- root     root         2460 1970-01-01 01:00 init.qcom.sh
-rwxr-x--- root     root         5521 1970-01-01 01:00 init.qcom.rc
-rwxr-x--- root     root         1778 1970-01-01 01:00 init.goldfish.rc
-rwxr-x--- root     root       107932 1970-01-01 01:00 init
-rw-r--r-- root     root          118 1970-01-01 01:00 default.prop
drwxrwx--x system   system            2010-11-18 18:28 data
drwx------ root     root              2010-04-11 13:43 root
drwxr-xr-x root     root              2011-07-11 17:33 dev

Hope that helps someone else with a T-Pulse mini, a great phone spoiled only by it's shitty processor and desire to reboot ten times a day. Never mind, for the money it's pretty good and it has all the features for development; wi-fi, GPS, accelerometers etc. so I guess I shouldn't can't complain. They are currently selling for GBP 39 and I would say that for entry into Android development, that's a bargain hard to beat!

Content Tags: 

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <pre> <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Syntax highlight code surrounded by the {syntaxhighlighter SPEC}...{/syntaxhighlighter} tags, where SPEC is a Syntaxhighlighter options string or class="OPTIONS" [title="the title"].
  • Lines and paragraphs break automatically.

Full HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Syntax highlight code surrounded by the {syntaxhighlighter SPEC}...{/syntaxhighlighter} tags, where SPEC is a Syntaxhighlighter options string or class="OPTIONS" [title="the title"].
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.