Can't get fastboot to work

stylon

Member
Oct 13, 2011
11
0
Hi all,

I just bought a "Huawei S7 Slim" and wanted to play around with own kernels, but I'm completely stuck already at getting fastboot to work at all. I tried various tipps from this and many other forums already, but everything that seemed to help others still doesn't make it work for me.

My PC setup:
- Ubuntu 10.04 LTS, x86_64, latest updates
- 32-bit fastboot executable

My S7 Slim:
- Android 2.2.2, still plain stock as you may guess already :)
- Baseband-Version 504030
- Kernel-Version 2.6.32.9-ideos
- Build-Number S7-201uV100R001C187B010

What works:

- Pressing "volume-" (hold) + "power" (short):
1. button lights turn on
2. after a few seconds, device vibrates shortly
3. button lights turn off
4. a short shaded bar appears in the middle of the screen
5. button lights start flashing
- devices stays like this indefinitely until battery removed, "power" doesn't work
- PC doesn't recognize device after attaching usb
- anyone an idea what mode this is?

- Pressing "volume+" (hold) + "volume-" (hold) + "power" (short):
1. button lights turn on
2. after a few seconds, device vibrates shortly
3. button lights turn off
4. screen flashes shortly
5. a long shaded bar appears in the middle of the screen
- devices stays like this indefinitely until battery removed, "power" doesn't work
- PC recognizes device as 12d1:36de after attaching usb

What I tried on PC already:

"lsusb":
...
Bus 001 Device 019: ID 12d1:36de Huawei Technologies Co., Ltd.
...
=> device is there in principle and PC & Linux see it

"fastboot devices"
=> nothing, initially I thought maybe no usb device or permissions wrong

"sudo fastboot devices"
=> nothing, so non-root doesn't seem to be a problem

"strace fastboot devices"
...
open("/dev/bus/usb/001/019", O_RDWR|O_LARGEFILE) = 5
read(5, "\22\1\0\2\0\0\0@\321\22\3366\0\0\3\2\0\1\t\0027\0\2\1\1\340\372\t\4\0\0\2"..., 1024) = 73
close(5) = 0
...
=> verifies that it reads indeed 73 bytes from the correct usb device
=> fastboot doesn't stop there, just continues to read from other usb devices

"fastboot boot zImage ramdisk.gz"
creating boot image...
creating boot image - 3452928 bytes
< waiting for device >
=> maybe just "fastboot devices" broken? no, waits indefinitely

configure udev, add /etc/udev/rules.d/51-android.rules:
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666"
=> nothing changed, tried all from above

"sudo /etc/init.d/udev restart"
=> nothing changed, tried all from above

"fastboot -i 0x12d1 reboot"
< waiting for device >
=> PC & device waiting indefinitely on each other again

"fastboot -i 0x12d1 boot zImage ramdisk.gz" =>
creating boot image...
creating boot image - 3452928 bytes
< waiting for device >
=> grrrr, whoa.....tf! :mad::)

Guys, am I stupid or what do I do wrong?

I'm experienced on linux I would say, but this puzzles even me. Does anyone have an idea?

Kind regards,
STYLON
 
Last edited:

stylon

Member
Oct 13, 2011
11
0
Hi again,

I forgot to mention that I also tried the same on a VirtualBox VM with 32-bit Ubuntu 10.04 LTS installed. Sees the USB device, but exact same behaviour of "fastboot". Maybe my fastboot executable is broken.

Regards,
STYLON
 

goodoane

Senior Member
Nov 25, 2010
269
90
Adb is working? If yes you can put your tablet in download with adb command. Is your tablet tablet boot normaly? That bar that you describe it show when your tablet is in sdcard update state. Is like an unfinished update.
 
Last edited:

stylon

Member
Oct 13, 2011
11
0
Hi goodoane,

yes, the tablet boots just fine into Froyo, the tablet and Android work just fine, no glitches at all. I remember that I had this "touchscreen not working + buttons light up" when powering down once, since I bought it, but taking battery out helped.

Indeed, I noticed, too, that anybody who tried "fastboot" on S7 or S7 Slim ever mentioned the bars I see on the screen. I just received this one as "brand new" and I didn't yet try an update myself. How come it can have an unfinished update? As I said, it also boots fine. Wouldn't an unfinshed update mean it fails to boot?

I also still have on my list to try adb, but due to android.git.kernel.org being down currently, I just tried to download precompiled tools and did not so with adb yet.

Cheers,
STYLON
 

stylon

Member
Oct 13, 2011
11
0
Hi again,

I played around a bit more, downloaded even more precompiled version of "fastboot", even to the iMac of my girlfriend. Conclusion: nothing works, so far. Honestly, I get a bit suspicious that anyone got this working at all, even with a Huawei S7 (non-Slim) :). Here's why I do think so and what I found out.

The following code is from some source version of "fastboot.c". I verified that this code is almost "as is" in my precompiled fastboot (easy -> "objdump -d"). Each USB device for which this function returns -1 does not get listed when executing "./fastboot devices". The only difference in the precompiled versions of "fastboot" I already downloaded is that some test for a few more vendor ids (but not the 0x12d1 from Huawei) in the first conditional.

Code:
[B]int[/B] [COLOR=#2040a0]match_fastboot[/COLOR][COLOR=#4444FF]([/COLOR][COLOR=#2040a0]usb_ifc_info[/COLOR] [COLOR=#4444FF]*[/COLOR][COLOR=#2040a0]info[/COLOR][COLOR=#4444FF])[/COLOR]
[COLOR=#4444FF][B]{[/B][/COLOR][B]
    if[/B][COLOR=#4444FF]([/COLOR][COLOR=#4444FF]([/COLOR][COLOR=#2040a0]info[/COLOR][COLOR=#4444FF]-[/COLOR][COLOR=#4444FF]>[/COLOR][COLOR=#2040a0]dev_vendor[/COLOR] [COLOR=#4444FF]![/COLOR][COLOR=#4444FF]=[/COLOR] [COLOR=#FF0000]0x18d1[/COLOR][COLOR=#4444FF])[/COLOR] [COLOR=#4444FF]&[/COLOR][COLOR=#4444FF]&[/COLOR]
       [COLOR=#4444FF]([/COLOR][COLOR=#2040a0]info[/COLOR][COLOR=#4444FF]-[/COLOR][COLOR=#4444FF]>[/COLOR][COLOR=#2040a0]dev_vendor[/COLOR] [COLOR=#4444FF]![/COLOR][COLOR=#4444FF]=[/COLOR] [COLOR=#FF0000]0x0bb4[/COLOR][COLOR=#4444FF])[/COLOR][COLOR=#4444FF])[/COLOR] [B]return[/B] [COLOR=#4444FF]-[/COLOR][COLOR=#FF0000]1[/COLOR][COLOR=#4444FF];
[/COLOR]    [B]if[/B][COLOR=#4444FF]([/COLOR][COLOR=#2040a0]info[/COLOR][COLOR=#4444FF]-[/COLOR][COLOR=#4444FF]>[/COLOR][COLOR=#2040a0]ifc_class[/COLOR] [COLOR=#4444FF]![/COLOR][COLOR=#4444FF]=[/COLOR] [COLOR=#FF0000]0xff[/COLOR][COLOR=#4444FF])[/COLOR] [B]return[/B] [COLOR=#4444FF]-[/COLOR][COLOR=#FF0000]1[/COLOR][COLOR=#4444FF];[/COLOR]
    [B]if[/B][COLOR=#4444FF]([/COLOR][COLOR=#2040a0]info[/COLOR][COLOR=#4444FF]-[/COLOR][COLOR=#4444FF]>[/COLOR][COLOR=#2040a0]ifc_subclass[/COLOR] [COLOR=#4444FF]![/COLOR][COLOR=#4444FF]=[/COLOR] [COLOR=#FF0000]0x42[/COLOR][COLOR=#4444FF])[/COLOR] [B]return[/B] [COLOR=#4444FF]-[/COLOR][COLOR=#FF0000]1[/COLOR][COLOR=#4444FF];[/COLOR]
    [B]if[/B][COLOR=#4444FF]([/COLOR][COLOR=#2040a0]info[/COLOR][COLOR=#4444FF]-[/COLOR][COLOR=#4444FF]>[/COLOR][COLOR=#2040a0]ifc_protocol[/COLOR] [COLOR=#4444FF]![/COLOR][COLOR=#4444FF]=[/COLOR] [COLOR=#FF0000]0x03[/COLOR][COLOR=#4444FF])[/COLOR] [B]return[/B] [COLOR=#4444FF]-[/COLOR][COLOR=#FF0000]1[/COLOR][COLOR=#4444FF];[/COLOR]
    // [COLOR=#2040a0]require[/COLOR] [COLOR=#2040a0]matching[/COLOR] [COLOR=#2040a0]serial[/COLOR] [COLOR=#2040a0]number[/COLOR] [B]if[/B] [COLOR=#2040a0]a[/COLOR] [COLOR=#2040a0]serial[/COLOR] [COLOR=#2040a0]number[/COLOR] [COLOR=#2040a0]is[/COLOR] [COLOR=#2040a0]specified[/COLOR]
    // [COLOR=#2040a0]at[/COLOR] [COLOR=#2040a0]the[/COLOR] [COLOR=#2040a0]command[/COLOR] [COLOR=#2040a0]line[/COLOR] [COLOR=#2040a0]with[/COLOR] [COLOR=#2040a0]the[/COLOR] [COLOR=#4444FF]-[/COLOR][COLOR=#2040a0]s[/COLOR] [COLOR=#2040a0]option[/COLOR].
    [B]if[/B] [COLOR=#4444FF]([/COLOR][COLOR=#2040a0]serial[/COLOR] [COLOR=#4444FF]&[/COLOR][COLOR=#4444FF]&[/COLOR] [COLOR=#2040a0]strcmp[/COLOR][COLOR=#4444FF]([/COLOR][COLOR=#2040a0]serial[/COLOR], [COLOR=#2040a0]info[/COLOR][COLOR=#4444FF]-[/COLOR][COLOR=#4444FF]>[/COLOR][COLOR=#2040a0]serial_number[/COLOR][COLOR=#4444FF])[/COLOR] [COLOR=#4444FF]![/COLOR][COLOR=#4444FF]=[/COLOR] [COLOR=#FF0000]0[/COLOR][COLOR=#4444FF])[/COLOR] [B]return[/B] [COLOR=#4444FF]-[/COLOR][COLOR=#FF0000]1[/COLOR][COLOR=#4444FF];[/COLOR]
    [B]return[/B] [COLOR=#FF0000]0[/COLOR][COLOR=#4444FF];[/COLOR]
[COLOR=#4444FF][B]}[/B][/COLOR]

Then, I inspected the output of "lsusb -v" a bit more closely, especially for the ifc_ field descriptors:

Code:
Device: ID 12d1:36de Huawei Technologies Co., Ltd. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x12d1 Huawei Technologies Co., Ltd.
  idProduct          0x36de 
  bcdDevice            0.00
  iManufacturer           3 HUAWEI Configuration
  iProduct                2 HUAWEI Technologies
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           55
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          1 HUAWEI Configuration
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval              32
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval              32
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval              32
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval              32
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0001
  Self Powered

All bInterfaceClass, bInferfaceSubClass and bInterfaceProtocol are 255! Not 255, 42, 3 as expected by the match_fastboot function. What do others see when doing a lsusb -v in fastboot mode? I've also read somewhere there are special USB drivers (on PC I guess) you may need for fastboot, but it looked to me that this is only necessary on windows.

Thanks for any help on this. :)

Cheers,
STYLON
 

stylon

Member
Oct 13, 2011
11
0
Hi again,

I found out that the device reports at least one USB Interface with values of 255, 66 (=0x42), 1 when in Mass Storage mode (booted into Froyo then USB Disk Mode). So, only the protocol is different from what fastboot expects there. SubClass = 66 = 0x42 looks like "Android", but I'm not 100% sure. At least a couple of other Android devices seem to use that SubClass, too. The question is why this mode I boot into doesn't report those numbers.

In order to rule out a broken device or similar, the dealer borrowed me another Huawei S7 Slim (everthing same, except for the serial number). Guess what -> exact same behaviour, fastboot doesn't do anything :mad:. And there are also the bars on the screen in the 2 boot modes I described above.

As I don't think both devices are broken in the same way (or have been both partially updated), I would like to find out wether the fastboot mode I see looks different from the one others see. So, does anyone else also have those bars on the screen in fastboot mode? Or is the screen just blank?

Is it possible that Huawei recently changed the bootloader (possibly to a locked one)? How could I find out?

Cheers,
STYLON
 

goodoane

Senior Member
Nov 25, 2010
269
90
To be able to use fastboot you need first to put your tablet in download mode (fastboot). Then you need to add permission on linux for usb device ( one for adb and one for fastboot). I don't know the keybord configuration for slim to put the tablet in fastbootmode but on fat model you need to press both volume key and power.
 

stylon

Member
Oct 13, 2011
11
0
Hi goodoane,

I appreciate your help very much, but I just figured you don't even have a S7 Slim. I agree, it could be that entering fastboot mode on the Slim model works different. Does anybody know? It would also help if someone else with access to a "S7 Slim" could verify my steps and report at least the same behaviour (then I would know it's the device and not me). It would also help if someone who has working fastboot with the "S7 Slim" comments what he/she did. With the 2 devices and the Linux PC + iMac I tried I have consistent non-working fastboot. I also have same consistent output of lsusb -v in all modes.

Regards,
Stephan
 

stylon

Member
Oct 13, 2011
11
0
Hi goodoane,

can you do me a favor and post the output of "lsusb -v" for your "S7" when in fastboot mode?

Thanks a lot,
STYLON
 

stylon

Member
Oct 13, 2011
11
0
Hi again,

I think I found out some more info about the 2 boot modes. The one with the long bar (volume +/- + power) seems to be hboot (and *not* fastboot), the other one (volume - + power) some update boot mode. Both bars look like progress bars being empty. At least for the update boot mode with the flashing button lights I guess it is waiting for some sd card containing an .img or some packages. I'm unsure about what can be done with hboot.

However, the critical question now is... where's the fastboot mode on this device and how do I get there?

Regards,
STYLON
 

stylon

Member
Oct 13, 2011
11
0
Hi again,

I finally got adb installed and found a way to get into fastboot mode (thanks goodoane for the tip :)):

type "adb reboot bootloader" -> gets into fastboot mode with option to restart into the "real" bootloader, a screen with a green battery charger symbol (never got there before :eek:)

Make sure you set up /etc/udev/rules.d/99-android.rules to contain 2 lines with vendor IDs 0x12d1 (Huawei for adb) and 0x18d1 (generic Android for fastboot), otherwise you only get "no permissions" on either adb or fastboot. I already tried to boot a generic precompiled linux kernel, but just got a black screen (although I didn't expected more :p). Reboot with taking battery out and in worked smoothly afterwards.

BTW, does anyone know how to get root access in adb? I'm a bit an android newbie and trying to get an adb root shell just replied with an "not possible in production systems". Do I need to root the device?

Regards,
STYLON
 

stylon

Member
Oct 13, 2011
11
0
Hi again,

in the meantime I also found a posting on xda-developers that mentioned "adb reboot bootloader" to enter fastboot on the "Ideos S7", not the "Ideos S7 Slim".

However, next step, next problem: I tried to start a couple of precompiled kernel/initrd images with fastboot for a few days now. I extracted those images from UPDATA.APP firmware upgrades (wanted to start with kernels known to start before compiling one on my own). For all of them I get only a black blank screen, with the button lights turned off. My assumption so far is that I should at least see the initial IDEOS logo as this is part of the initrd images. For that to see also the button lights should not turn off. Is my assumption wrong are am I doing anything wrong? What information do you need to help?

Regards,
STYLON
 

stylon

Member
Oct 13, 2011
11
0
Hi,

just wanted to say that I solved all above mentioned problems I had with the HUAWEI S7 Slim in the meantime. I was able to try a couple of custom and self-compiled kernels and modified ramdisks and everything works like a charm.

Regards,
STYLON
 

MyWorld

Senior Member
Oct 23, 2011
15
0
Would you be so kind as to give us a general howto on what you did and how you did it?

Information on this device is very scarce so this will be valuable to many I believe.
 
Top