[Q] Anybody used Heimdall yet on SGS2?

Search This thread

peadarog

Senior Member
Mar 19, 2010
135
18
www.frozenstories.com
I thought I should add in my progress so far for anybody else suffering from a non-working linux heimdall install.

I recompiled the program following aliander's suggestion (on the page before this one), and this time, when I ran the command:

$ heimdall close-pc-screen

the phone was recognized and I got the following output:

Claiming interface... Failed. Attempting to detach driver...
Claiming interface again... Success
Setting up interface... Success
Beginning session...
Handshaking with Loke... Success

Attempting to close connect to pc screen...
Ending session...
Failed to receive session end confirmation!
Re-attaching kernel driver...

After that, I tried flashing a kernel (yes, I am that stupid :) ) and got:


Claiming interface... Success
Setting up interface... Failed!


So, I'm back to using Odin on vbox for the moment. Thanks everybody for all of your help.
 

perljedi

Member
Dec 20, 2010
13
1
perljedi.com
Droid Charge

Hi Guys,

I'm trying to flash my droid charge (verizon) using heimfall in Fedora 14 x86_64. I have not been able to get past "Failed to detect compatible device", so I started today to muck iwth the heimdall source code to see what I could find. In the init method on BridgeManager.cpp I added a little bit of debuging:


Code:
   printf("Found %d devices\n", deviceCount);
   for (int deviceIndex = 0; deviceIndex < deviceCount; deviceIndex++)
   {
      libusb_device_descriptor descriptor;
      libusb_get_device_descriptor(devices[deviceIndex], &descriptor);
      printf("Examining device %d:%d\n", descriptor.idVendor, descriptor.idProduct);

      for (int i = 0; i < BridgeManager::kSupportedDeviceCount; i++)
      {
         printf("Checking against %d:%d\n", supportedDevices[i].vendorId, supportedDevices[i].productId);

Which gave me:

Code:
Heimdall, Copyright (c) 2010, Benjamin Dobell, Glass Echidna
# URL REMOVED

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
#URL REMOVED 

Found 8 devices
# 14 IRRELIVANT LINES REMOVED HERE
Examining device 1256:26819
Checking against 1256:26113
Failed to detect compatible device

Base on that, I believe that by updating BridgeManager.cpp and BridgeManager.h which the product id from the above debug output, I will be able to get past this. Before I do so, however, I'd love it if somebody could validate my educated guess, and/or warn me if there is something elese that would need to be done to make it work. Is there code elsewhere in heimdall that needs to be update with information like where on the device to place the files being flashed?

I know there is inherent risk in rooting my phone this way, and I'm ok with that... but I feel like modifying somebody else's code (particularly when I'm modifying to to essentially bypass a safety check) without some inklinking that I've understood the situation correctly might be a bit much.

Thanks for your help.
 

bilboa1

Inactive Recognized Developer
Aug 16, 2010
1,291
683
yes i know, i've already used it with success, but it doesn't include the latest source patch (I've checked it against the one I had and it looks identical).
I'd compile it myself but I'm at work :)

just cosmetics anyhow, also, theres the official plz-donate-and-i-wont-thx-ppl version as well :)
on a side note heimdall should prolly fill the kernel storage area with 0's to fill it up completely to avoid issues on the sgs2
 
Last edited:

endrec

Member
Aug 14, 2010
14
0
Heimdall 1.2 + SGS2 on Ubuntu 11.04

New Heimdall command line binaries are now available, let me know how you go.

Hi Ben,

I tried your software without any success. :(
It does not recognise my SGS2 (I put it into download mode).

My config:
SGS2 with provider firmware (H3G UK, XWKE1)
Ubuntu 11.04
Heimdall compiled from source (35cfa39)

When the phone is in upload mode, lsusb does not list it, otherwise it is listed as:
04e8:685e Samsung Electronics Co., Ltd

Can you tell me what did Iwrong?

Thanks,

Endre
 

endrec

Member
Aug 14, 2010
14
0
Hmm... I had to find my original Samsung USB cable, and it did the magic. Now it works better. I've just flashed CWM recovery. :)

Thanks for the tool!
 
Last edited:

ngoonee

Senior Member
Jun 21, 2011
273
39
EDIT: I tried rebooting the phone to download mode again and running flash immediately rather than print-pit or close-pc-screen, and it worked. Would this be a bug?

Below this line is the original post for context:-
________________________________________________

Just built heimdall from git today, and I get this

heimdall flash --kernel zImage --verbose

Heimdall v1.2.0, Copyright (c) 2010-2011, Benjamin Dobell, Glass Echidna

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:


length: 18
device class: 2
S/N: 0
VID:pID: 04E8:685D
bcdDevice: 021B
iMan:iProd:iSer: 1:2:0
nb confs: 1

interface[0].altsetting[0]: num endpoints = 1
Class.SubClass.Protocol: 02.02.01
endpoint[0].address: 83
max packet size: 0010
polling interval: 09

interface[1].altsetting[0]: num endpoints = 2
Class.SubClass.Protocol: 0A.00.00
endpoint[0].address: 81
max packet size: 0200
polling interval: 00
endpoint[1].address: 02
max packet size: 0200
polling interval: 00

Claiming interface... Success
Setting up interface... Failed!

Any help, please? I'm in download mode, it says 'Custom Binary Download: NO though. Current Binary is SAMSUNG OFFICIAL.
 
Last edited:

MrZammler

Senior Member
Sep 2, 2010
55
11
Hi,

just to let you know I installed a CF-Root on my SGS2 with the heimdall command line utility.

Thanks a lot!
 

jakobvoss

New member
Sep 28, 2011
1
0
jakoblog.de
Heimdall 1.3.0 on Ubuntu works so well, that I cut successfully brick my SGS2 by trying to flash the wrong firmware :p Download screen still works and I like Heimdall, but if anyone could provide a Heimdall firmware package file with original Stock firmware, it would be better. With easy to find firmware packages for SGS2, you could easily get back the original state after playing around with different firmware. Is there any registry of heimdall firmware package files for SGS2 and other devices? :confused:
 

interslicer

Member
Apr 17, 2011
17
0
Heimdall 1.3.0 on Ubuntu works so well, that I cut successfully brick my SGS2 by trying to flash the wrong firmware :p Download screen still works and I like Heimdall, but if anyone could provide a Heimdall firmware package file with original Stock firmware, it would be better. With easy to find firmware packages for SGS2, you could easily get back the original state after playing around with different firmware. Is there any registry of heimdall firmware package files for SGS2 and other devices? :confused:

I agree with this guy - i need some stock packages to use with Heimdal! it's been 2 or 3 yrs .. why no support?
 

centuriondan

Member
Jun 9, 2012
18
0
Wellington
I think I've managed to soft brick my sgs2 using command line heimdall :-(

*** Update **** - I managed to partially unbrick my SGS2 using CWM (once I confirmed it was safe from the superbrick bug) by restoring the wanamlite firmware that was last installed. After that I even used cwm to restore back to the previous setup where my initial problem occured. Now back to fixing that.
**************

Upshot is that i can't seem to flash a kernel now.

Any advice on where to from here. (All the advice I see seems Odin oriented and talks about PDA and such like unexplained acronyms that don't seem to have much relevance in heimdall).

I'm running linux exclusively so Odin's pretty much out of the question.

Phone details:
SGS2 GT-i9100
Last running firmware installed was GT-I9100_WanamLite.XXLPQ.Deodexed.Stock.NO-WIPE.zip
I was trying to downgrade to the original Gingerbread rom when this happened.
CWM recovery v5.0.2.7 installed and still accessible, but not sure if it's likely to cause the superbrick bug as my emmc firmware version matches those that are at risk.

I have a usb jig and can get to download mode OK. Everything flashes ok except the kernel.



The details of the failure follow....

Code:
ezra:/home/centurion/Documents/Samsung SII/stock # heimdall flash --kernel zImage --verbose
Heimdall v1.3.1, Copyright (c) 2010-2011, Benjamin Dobell, Glass Echidna
//deleted url//
This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:

//deleted url//

Initialising connection...
Detecting device...
           Product: "Gadget Serial"
         Serial No: "?"

            length: 18
      device class: 2
               S/N: 0
           VID:PID: 04E8:685D
         bcdDevice: 021B
   iMan:iProd:iSer: 1:2:0
          nb confs: 1

interface[0].altsetting[0]: num endpoints = 1
   Class.SubClass.Protocol: 02.02.01
       endpoint[0].address: 83
           max packet size: 0010
          polling interval: 09

interface[1].altsetting[0]: num endpoints = 2
   Class.SubClass.Protocol: 0A.00.00
       endpoint[0].address: 81
           max packet size: 0200
          polling interval: 00
       endpoint[1].address: 02
           max packet size: 0200
          polling interval: 00
Claiming interface...
Attempt failed. Detaching driver...
Claiming interface again...
Setting up interface...

Checking if protocol is initialised...
Protocol is not initialised.
Initialising protocol...
Handshaking with Loke...

Beginning session...
Session begun with device of type: 131072

Downloading device's PIT file...
PIT file download sucessful

Uploading KERNEL
0%KERNEL upload successful
Ending session...
Rebooting device...
Re-attaching kernel driver...


Any guidance or direction to more relevant thread would be appreciated.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    Sorry guys I don't have a Galaxy S II to develop with so I haven't been able to make the necessary changes to support the Galaxy S II. If anyone has one they want to donate that would be fantastic, but that's probably not all that likely ;)

    I just tested heimdall a bit with the SGSII.
    At least, kernel flash works.

    Modifications needed:

    BridgeManager.h: device ID is 685D not 6601 (maybe add a switch for sgs2)

    main.cpp: getUnknown is 131072, not 0 (again, maybe switch)


    and it'll work.
    I'd also suggest a switch for "--no-reboot" ;-)

    Let me know if you would prefer a diff or w/e like that..

    Disclaimer: I did NOT test this thoroughly, this is AT YOUR OWN RISK - flashing CAN destroy your device.

    Kernel flashing does work tho :)

    ps: I'd have prefered giving you a GT-I9100 but that's a little over my budget right now :D

    bad stuff:
    x64 linux binary http://www.multiupload.com/A1R7SDUFZM

    more bad stuff:
    ive put it in a diff cause i'm not so lazy today:

    https://github.com/kangsterizer/Heimdall/commit/86e9b66d4ec5b415b3a8d2d310f9ce7633679a16
    2
    https://github.com/kangsterizer/Heimdall/

    Please correct:
    - heimdall/source/BridgeManager.cpp

    56:
    Code:
    const DeviceIdentifier BridgeManager::supportedDevices[BridgeManager::kSupportedDeviceCount] = {
    DeviceIdentifier(BridgeManager::kVidSamsung, BridgeManager::kPidGalaxySDownloadMode)

    to:

    56:
    Code:
    const DeviceIdentifier BridgeManager::supportedDevices[BridgeManager::kSupportedDeviceCount] = {
    DeviceIdentifier(BridgeManager::kVidSamsung, BridgeManager::kPidGalaxyS2DownloadMode)

    OR:
    - heimdall/source/BridgeManager.h

    69:
    Code:
    kPidGalaxyS2DownloadMode	= 0x685D

    to:

    69:
    Code:
    kPidGalaxySDownloadMode	= 0x685D
    1
    Got it there is an error in the patch. I can't make a diff for you but it's easy to change in heimdall/source/BridgeManager.h change the enum section around line 67 like this:

    enum
    {
    kPidGalaxyS2DownloadMode = 0x685D,
    kPidGalaxySDownloadMode = 0x6601,
    kPidGalaxySInternational = 0x681C,
    kPidGalaxySNewInternational = 0x681D,
    kPidVibrantCanadaBell = 0x6877
    };
    1
    Official support is coming, details here.

    Any donations you can offer would be very much appreciated.
    1
    New Heimdall command line binaries are now available, let me know how you go.