Jump to content

ADB on Linux not recognizing Huawei U8230 with Switzerland ROM (2.1) [FIXED]


Guest goncalossilva

Recommended Posts

Guest Gonçalo Silva

Hey,

I used to be able to use ADB with my phone back in 1.5, in Linux.

My issue is not a permission-related since I've also tried to start the ADB server with root and have no luck. When I type "./adb devices" (or "sudo ./adb devices") I get an empty list.

Is this happening to somebody else? Any hints on what is happening?

Edited by Gonçalo Silva
Link to comment
Share on other sites

Guest Stevos

I think it's probably due to the device ID being changed in the new ROM. There were a set of updated drivers for Vista / win 7 posted which just updated the device ID, and they worked fine. Presumably a similar approach would work for linux, though I haven't seen anyone post about it.

Link to comment
Share on other sites

Guest Gonçalo Silva
I think it's probably due to the device ID being changed in the new ROM. There were a set of updated drivers for Vista / win 7 posted which just updated the device ID, and they worked fine. Presumably a similar approach would work for linux, though I haven't seen anyone post about it.

I've updated the device ID (which I can check on lsusb) but still no go. Regarding the drivers: I'm not sure... it mounts the "Mobile Partner" just like what happens in Windows. Unfortunately I can't use ADB, though.

EDIT: My dmesg output, when I connect the device, looks like this:

usb 1-3: new high speed USB device using ehci_hcd and address 14

scsi9 : usb-storage 1-3:1.0

scsi 9:0:0:0: CD-ROM			Android  Adapter		  ffff PQ: 0 ANSI: 2

sr1: scsi3-mmc drive: 0x/0x caddy

sr 9:0:0:0: Attached scsi CD-ROM sr1

sr 9:0:0:0: Attached scsi generic sg2 type 5

Any hints?

Edited by Gonçalo Silva
Link to comment
Share on other sites

Guest Stevos

Sorry my linux is a bit rusty (a lot rusty)...

Am I reading that right - it's showing up the devices as usb storage but not as anything else?

I take it you've tried enabling and disabling USB debugging and mounting / dismounting the SD card storage (try all combinations to see if anything shows up)

Settings | Applications | Development

Link to comment
Share on other sites

Guest Gonçalo Silva
Sorry my linux is a bit rusty (a lot rusty)...

Am I reading that right - it's showing up the devices as usb storage but not as anything else?

I take it you've tried enabling and disabling USB debugging and mounting / dismounting the SD card storage (try all combinations to see if anything shows up)

Settings | Applications | Development

I think it's normal for it to show up as USB storage as long as "Android Adapter" is there.

Yes, I've tried all combinations. Still no go :|

Link to comment
Share on other sites

Guest Tom G

I'm fairly sure this is permissions related. Adb on the pc side runs with what ever permissions the server is started with, so if you start the server without enough permissions and then run 'sudo adb devices' it will still run with the insufficient permissions it was started with (the devices command will run as root, but the server still doesn't have enough permissions so can't see any devices). Kill the server and restart it as root (sudo adb start-server). Once the server is started all other commands can be issued from a normal user.

If that doesn't work, make sure USB debugging is on. What output do you get from lsusb.

Maybe try running 'ps | grep adbd' on the phone using the terminal emulator. adbd is the daemon running on the phone that adb connects to.

Link to comment
Share on other sites

Guest Gonçalo Silva
Kill the server and restart it as root (sudo adb start-server). Once the server is started all other commands can be issued from a normal user.

I had already done that, but it still doesn't show up on the list of devices...

If that doesn't work, make sure USB debugging is on. What output do you get from lsusb.

It is on. The output, before mounting the SD card:

Bus 001 Device 007: ID 12d1:1031 Huawei Technologies Co., Ltd.
The output, after mounting the SD card:
Bus 001 Device 008: ID 12d1:1005 Huawei Technologies Co., Ltd.

Should the product id change after mounting? I found that weird when I noticed it.

Maybe try running 'ps | grep adbd' on the phone using the terminal emulator. adbd is the daemon running on the phone that adb connects to.

I don't have "grep" on the terminal, but "ps" works and I've confirmed that adbd is running.

Any ideas?

Link to comment
Share on other sites

Guest Tom G

How old is your version of adb? I know the Froyo SDK needed a new version of adb, so maybe the move from cupcake to eclair also needs a new version. I have always been using adb from eclair (from the SDK) so if there was a version change required I wouldn't have noticed.

Link to comment
Share on other sites

Guest gusthy
Did you enable the debug option?

I have the same problem, obviously doing all the neccessary steps (permissiom, adb version, usb debug on etc)

what is strange, after doing the APPDATA flash, it is visible. after reboot it disappears from adb's visibility.

Link to comment
Share on other sites

Guest Gonçalo Silva
How old is your version of adb? I know the Froyo SDK needed a new version of adb, so maybe the move from cupcake to eclair also needs a new version. I have always been using adb from eclair (from the SDK) so if there was a version change required I wouldn't have noticed.

I updated it before posting here, so it's the most recent version out there :-)

Did you enable the debug option?

Yes, of course.

I have the same problem, obviously doing all the neccessary steps (permissiom, adb version, usb debug on etc)

what is strange, after doing the APPDATA flash, it is visible. after reboot it disappears from adb's visibility.

I didn't notice it was detected after flashing (before rebooting). I think it is somehow related to that autostart software from T-Mobile... :|

Any more hints?

Edited by Gonçalo Silva
Link to comment
Share on other sites

Guest gusthy
I updated it before posting here, so it's the most recent version out there :-)

Yes, of course.

I didn't notice it was detected after flashing (before rebooting). I think it is somehow related to that autostart software from T-Mobile... :|

Any more hints?

Hmmmmmmmmmm.

I flashed Hungarian Update now over RMB, and it enabled ADB while disabling USB tether. Not really matters, Barnacle works, but this Hungarian Update thing is very strange.

Link to comment
Share on other sites

Guest Gonçalo Silva
Hmmmmmmmmmm.

I flashed Hungarian Update now over RMB, and it enabled ADB while disabling USB tether. Not really matters, Barnacle works, but this Hungarian Update thing is very strange.

Any more noticeable differences between the Hungarian ROM and the Swiss ROM? If I have to flash another ROM just to have ADB working under Linux, I think it's worth it.

Link to comment
Share on other sites

Guest gusthy
Any more noticeable differences between the Hungarian ROM and the Swiss ROM? If I have to flash another ROM just to have ADB working under Linux, I think it's worth it.

They totally differ in terms of usage, but I don't mean the full Hungarian T-Mobile ROM, just the small (570 bytes) update in it.

Link to comment
Share on other sites

Guest Gonçalo Silva
They totally differ in terms of usage, but I don't mean the full Hungarian T-Mobile ROM, just the small (570 bytes) update in it.

I can't find that small update... can you link me to it?

EDIT: Just found it... it's inside the huge zip file found on T-Mobile's website. Here. It's the smaller of the 2 updates inside.

I'll give it a try and see if it fixes my ADB issue. Thanks!

EDIT2: Had my phone unbootable after installing this update, so DON'T do it unless you know what you're doing.

Edited by Gonçalo Silva
Link to comment
Share on other sites

Guest Gonçalo Silva

Just flashed the small update on top of the Swiss ROM, but now it goes to the Amon RA screen on every reboot.

Any hints? :|

Link to comment
Share on other sites

Guest Gonçalo Silva

Unfortunately I'm not able to install the T-Mobile update (the small one) on top of the Swiss ROM... my device stops booting and goes straight to Amon RA every single time.

I had to flash the Swiss ROM again to get it bootable and now I'm going to try Hectic's ROM to see if Linux is finally able to recognize my device.

I'll update after that.

EDIT: I'm back at quare 1. Can't install the Hungarian ROM (since it screws the boot process) and had to reinstall the Swiss ROM after this, so I'm still not being able to recognize my device under Linux :|

Edited by Gonçalo Silva
Link to comment
Share on other sites

Guest gusthy
Unfortunately I'm not able to install the T-Mobile update (the small one) on top of the Swiss ROM... my device stops booting and goes straight to Amon RA every single time.

I had to flash the Swiss ROM again to get it bootable and now I'm going to try Hectic's ROM to see if Linux is finally able to recognize my device.

I'll update after that.

EDIT: I'm back at quare 1. Can't install the Hungarian ROM (since it screws the boot process) and had to reinstall the Swiss ROM after this, so I'm still not being able to recognize my device under Linux :|

I apologise. It was my fault I did not listen carefully, now I see it is a 8230. Mine is a Pulse.

Link to comment
Share on other sites

Guest Gonçalo Silva
I apologise. It was my fault I did not listen carefully, now I see it is a 8230. Mine is a Pulse.

No problem, Titanium Backup helped me a lot on this one :(

Still, I can't see my device on ADB under Linux (Swiss ROM, rooted). Any hints on what I need to do to be able to see it?

Link to comment
Share on other sites

Guest Gonçalo Silva

I've been tweaking and tweaking and had no results so far... I think it is related to the fact that when I connect my U8230 to the PC, it mounts "Mobile Partner" (an utility with a few things I don't use).

Before upgrading to the 2.1 Swiss ROM, it didn't mount anything (unless, of course, I told it to mount the SD card).

Any ideas on how I can disable this "Mobile Partner" thing? I really think it is related.

Thanks.

Link to comment
Share on other sites

Guest Gonçalo Silva

Finally fixed it, thanks to cantido!

Install usb_switchmode, and run:

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

And you're all set :-)

If you want to automate the process, you need to add the following line to your /etc/udev/rules.d/51-android.rules:

ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1031", RUN+="usb_modeswitch '%b/%k'"
You also need to create a file named "12d1:1031" inside /etc/usb_modeswitch.d/, containing:
########################################################

# Huawei U8230


DefaultVendor= 0x12d1

DefaultProduct=0x1031


TargetVendor=  0x12d1

TargetProductList="1035"


CheckSuccess=20


MessageContent="5553424370ab71890600000080010a11060000000000000000000000000000"

And that's it. The process is now automated. When you plug your device into your Linux box you should be able to adb into it (although it still doesn't recognize it's name, but that's being discussed elsewhere).

I hope this helps someone :(

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 months later...
Guest Michael Vegfruit

I'm having the same issue on a U8220 running FLB mod 2.1 UK, with Ubuntu 10.04. Should this work on that too?

I know, the answer is test and try, but I'm simultaneously having issues with my Linux install and apt, so I am weighing up whether it is worth reinstalling Ubuntu to fix the apt problem, just so I can try this fix for my adb issue...

Link to comment
Share on other sites

Guest DanWilson

This is weird. My phone always worked with the adb (and fastboot) in the AMON-RA recovery zip. Windows, Mac and Ubuntu. Could it be a phone issue - as in the phones are slightly newer and have a different USB code or something? Like I said, my Pulse always worked no matter which 2.1 ROM I used (not tried Switzerland ROM) - HU, Tre, UK. :huh:

Link to comment
Share on other sites

The problem seems to be that it identifies itself as a cdrom. This is probably to enable you to install the "Mobile Partner" software which, as far as I understand, is mounted as a cdrom station? It surely is a craptastic way of doing it, the software should of course be put on the sd card, availible when the phone is connected as a normal removable storage (the way htc does it) - but hey, then they wouldn't have fancy autorun on Windows!

When the device is identified and mounted as a cdrom, it is probably either locked or just not probed by adb, whp sees no point in probing cd rom units for a cell phone (which does makes sense).

I guess the usb_modeswitch fixes this by re-claiming it as a usb storage device. I would think there are cleaner ways to to it (one simple udev rule should really be enough), but how you would go about doing that I have really no idea.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.