[Original post was confusing, fixed]
Reading pit from phone doesn't work.
After attempting to read pit, phone won't reboot. Instead always gets forced back into download mode with message "Firmware upgrade encountered an issue. Please select recovery mode in Kies & try again." Tried heimdall close-pc-screen but received same libusb -7 error.
Log:
./heimdall print-pit --verbose --stdout-errors
Heimdall v1.4 RC1
Copyright (c) 2010-2012, Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/
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:
http://www.glassechidna.com.au/donate/
Initialising connection...
Detecting device...
Manufacturer: "Sasmsung"
Product: "MSM8x60"
length: 18
device class: 2
S/N: 0
VID:PID: 04E8:685D
bcdDevice: 0100
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: 82
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: 01
max packet size: 0200
polling interval: 00
Claiming interface...
Attempt failed. Detaching driver...
Claiming interface again...
Setting up interface...
Checking if protocol is initialised...
ERROR: libusb error -7 whilst receiving packet.ERROR: libusb error -1730853256 whilst receiving packet.
Protocol is not initialised.
Initialising protocol...
WARNING: Control transfer #1 failed. Result: -9
WARNING: Control transfer #1 failed. Result: -1730853256
WARNING: Control transfer #2 failed. Result: -9
WARNING: Control transfer #2 failed. Result: -1730853256
WARNING: Control transfer #3 failed. Result: -9
WARNING: Control transfer #3 failed. Result: -1730853256
WARNING: Control transfer #4 failed. Result: -9
WARNING: Control transfer #4 failed. Result: -1730853256
WARNING: Control transfer #5 failed. Result: -9
WARNING: Control transfer #5 failed. Result: -1730853256
WARNING: Control transfer #6 failed. Result: -9
WARNING: Control transfer #6 failed. Result: -1730853256
Protocol initialisation successful.
Beginning session...
Session begun with device of type: 30.
In certain situations this device may take up to 2 minutes to respond.
Please be patient!
ERROR: libusb error -7 whilst receiving packet.ERROR: libusb error -1730853256 whilst receiving packet. Retrying...
Retrying...
ERROR: libusb error -7 whilst receiving packet.ERROR: libusb error -1730853256 whilst receiving packet. Retrying...
Retrying...
ERROR: libusb error -7 whilst receiving packet.ERROR: libusb error -1730853256 whilst receiving packet. Retrying...
Retrying...
ERROR: libusb error -7 whilst receiving packet.ERROR: libusb error -1730853256 whilst receiving packet. Retrying...
Retrying...
ERROR: libusb error -7 whilst receiving packet.ERROR: libusb error -1730853256 whilst receiving packet.
Releasing device interface...
Re-attaching kernel driver..
That is all. Now for the stuff you don't care about:
With ben-bot's fork, he added support for the skyrocket . With his fork, reading pit works. With his fork, I can get out of download mode error mentioned above because heimdall crashes after reading pit with *** glibc detected *** ./heimdall: corrupted double-linked list: 0x0000000001ecd5b0 *** and forces a reboot.
Building latest version in OSX 10.6 produces a heimdall-frontend.pbproj fold which Xcode 4 does not like. Any advice on how to build the ui?
Hi,
When compiling heimdall-frontend, it seems that by default installation is done in /usr/local/bin, couldn't you provide something that enables to configure that, the same way you can do it with the configure script, for example by a parameter to qmake?
Also, could it be possible to separate the step of making from the step of installing?
It would ease package creation for Archlinux for example.
Thank you :)
I've included qmake and make outputs for heimdall-frontend and it seems to have errors
qmake heimdall-frontend.pro
heimdall-frontend.pro:37: Unknown test function: isEqual
WARNING: Found potential symbol conflict of mainwindow.cpp (Source/mainwindow.cpp) in SOURCES
WARNING: Found potential symbol conflict of mainwindow.h (Source/mainwindow.h) in HEADERS
WARNING: Found potential symbol conflict of aboutform.cpp (Source/aboutform.cpp) in SOURCES
WARNING: Found potential symbol conflict of aboutform.h (Source/aboutform.h) in HEADERS
WARNING: target.path is not defined: install target not created
make
Makefile:171: warning: overriding commands for target release/mainwindow.o' Makefile:154: warning: ignoring old commands for target
release/mainwindow.o'
Makefile:175: warning: overriding commands for target release/aboutform.o' Makefile:145: warning: ignoring old commands for target
release/aboutform.o'
Makefile:181: warning: overriding commands for target release/moc_mainwindow.o' Makefile:178: warning: ignoring old commands for target
release/moc_mainwindow.o'
Makefile:190: warning: overriding commands for target GeneratedFiles/release/moc_mainwindow.cpp' Makefile:187: warning: ignoring old commands for target
GeneratedFiles/release/moc_mainwindow.cpp'
g++ -c -pipe -g -Wall -W -O2 -D_REENTRANT -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/share/qt3/mkspecs/default -I. -IGeneratedFiles -I./GeneratedFiles/Release -I. -I/usr/include/qt3 -IGeneratedFiles/ -IGeneratedFiles/release/ -o release/main.o Source/main.cpp
In file included from Source/mainwindow.h:25,
from Source/main.cpp:22:
Source/aboutform.h:22:26: error: ui_aboutform.h: No such file or directory
Source/aboutform.h:25:19: error: QWidget: No such file or directory
In file included from Source/main.cpp:22:
Source/mainwindow.h:26:27: error: ui_mainwindow.h: No such file or directory
Source/mainwindow.h:29:23: error: QMainWindow: No such file or directory
Source/mainwindow.h:30:20: error: QProcess: No such file or directory
Source/main.cpp:25:30: error: QtGui/QApplication: No such file or directory
In file included from Source/mainwindow.h:25,
from Source/main.cpp:22:
Source/aboutform.h:29: error: expected class-name before ‘,’ token
Source/aboutform.h:29: error: ‘Ui’ has not been declared
Source/aboutform.h:29: error: expected ‘{’ before ‘AboutForm’
Source/aboutform.h:30: error: invalid type in declaration before ‘{’ token
Source/aboutform.h:30: warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x
Source/aboutform.h:31: error: expected primary-expression before ‘public’
Source/aboutform.h:31: error: expected ‘}’ before ‘public’
Source/aboutform.h:31: error: expected ‘,’ or ‘;’ before ‘public’
Source/aboutform.h:35: error: expected declaration before ‘}’ token
make: *** [release/main.o] Error 1
I have written a patch to support the SGH-I997 in the udev rules.
Been trying to root my Galaxy S III via Heimdall and CF-Root and following the OP here (http://forum.xda-developers.com/showthread.php?t=1695238) tried to execute the linux command on my mac (OSX 10.7.4). I should note that using the heimdall frontend leads to the same outcome.
Here is what happened:
Pinnacle:CF-Root-SGS3-v6.3 $ sudo heimdall flash --recovery recovery.img --cache cache.img
Heimdall v1.3.2, Copyright (c) 2010-2012, Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au
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:
http://www.glassechidna.com.au/donate/
Initialising connection...
Detecting device...
Claiming interface...
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 RECOVERY
100%
RECOVERY upload successful
Uploading CACHE
100%
ERROR: Failed to confirm end of file transfer sequence!
CACHE upload failed!
Ending session...
Then I get a softbrick. To fix that, I have to run
Pinnacle:CF-Root-SGS3-v6.3 $ sudo heimdall flash --recovery recovery.img
and the phone reboots normally except with no root and no clockwork mod recovery.
Trying to build 1.4RC from sources on OSX 10.6.8, after configure; make I get this error message:
make all-am
depbase=echo source/Arguments.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'
;
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/libusb-1.0 -I../libpit/Source -g -O2 -MT source/Arguments.o -MD -MP -MF $depbase.Tpo -c -o source/Arguments.o source/Arguments.cpp &&
mv -f $depbase.Tpo $depbase.Po
In file included from source/Arguments.cpp:22:
source/Arguments.h:135: error: expected ‘,’ or ‘...’ before ‘>’ token
source/Arguments.h:135: error: wrong number of template arguments (1, should be 4)
/usr/include/c++/4.2.1/bits/stl_map.h:93: error: provided for ‘template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map’
source/Arguments.h:136: error: default argument missing for parameter 3 of ‘Heimdall::Arguments::Arguments(const std::map<std::basic_string<char, std::char_traits, std::allocator >, Heimdall::ArgumentType, std::less<std::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<const std::basic_string<char, std::char_traits, std::allocator >, Heimdall::ArgumentType> > >&, const std::map<std::basic_string<char, std::char_traits, std::allocator >, std::basic_string<char, std::char_traits, std::allocator >, std::less<std::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<const std::basic_string<char, std::char_traits, std::allocator >, std::basic_string<char, std::char_traits, std::allocator > > > >&, std::string)’
source/Arguments.cpp:75: error: prototype for ‘Heimdall::Arguments::Arguments(const std::map<std::basic_string<char, std::char_traits, std::allocator >, Heimdall::ArgumentType, std::less<std::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<const std::basic_string<char, std::char_traits, std::allocator >, Heimdall::ArgumentType> > >&, const std::map<std::basic_string<char, std::char_traits, std::allocator >, std::basic_string<char, std::char_traits, std::allocator >, std::less<std::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<const std::basic_string<char, std::char_traits, std::allocator >, std::basic_string<char, std::char_traits, std::allocator > > > >&, std::map<std::basic_string<char, std::char_traits, std::allocator >, std::basic_string<char, std::char_traits, std::allocator >, std::less<std::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<const std::basic_string<char, std::char_traits, std::allocator >, std::basic_string<char, std::char_traits, std::allocator > > > >)’ does not match any in class ‘Heimdall::Arguments’
source/Arguments.h:124: error: candidates are: Heimdall::Arguments::Arguments(const Heimdall::Arguments&)
source/Arguments.h:136: error: Heimdall::Arguments::Arguments(const std::map<std::basic_string<char, std::char_traits, std::allocator >, Heimdall::ArgumentType, std::less<std::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<const std::basic_string<char, std::char_traits, std::allocator >, Heimdall::ArgumentType> > >&, const std::map<std::basic_string<char, std::char_traits, std::allocator >, std::basic_string<char, std::char_traits, std::allocator >, std::less<std::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<const std::basic_string<char, std::char_traits, std::allocator >, std::basic_string<char, std::char_traits, std::allocator > > > >&, std::string)
make[1]: *** [source/Arguments.o] Error 1
make: *** [all] Error 2
I just tried compiling heimdall on openSUSE 11.4 and got the following errors.
sudo make install
make[1]: Entering directory /Galaxy_S2_Flashing/Heimdall/Heimdall-1.3.1/heimdall' test -z "/usr/local/bin" || /bin/mkdir -p "/usr/local/bin" /bin/sh ./libtool --mode=install /usr/bin/install -c heimdall '/usr/local/bin' libtool: install: /usr/bin/install -c heimdall /usr/local/bin/heimdall test -z "/lib/udev/rules.d" || /bin/mkdir -p "/lib/udev/rules.d" /usr/bin/install -c -m 644 60-heimdall-galaxy-s.rules '/lib/udev/rules.d' make install-data-hook make[2]: Entering directory
/Galaxy_S2_Flashing/Heimdall/Heimdall-1.3.1/heimdall'
sudo service udev restart
service: no such service udev
make[2]: *** [install-data-hook] Error 1
make[2]: Leaving directory /Galaxy_S2_Flashing/Heimdall/Heimdall-1.3.1/heimdall' make[1]: *** [install-data-am] Error 2 make[1]: Leaving directory
/Galaxy_S2_Flashing/Heimdall/Heimdall-1.3.1/heimdall'
make: *** [install-am] Error 2
Any clue why this is happening? I previously managed to install heimdall 1.3.0 but wanted to update to 1.3.1.
Error: Partition corresponding to -modem argument could not be located
Launch: heimdall flash --repartition --pit joh1.pit --modem modem.bin --verbose
joh1.pit contains partition called RADIO instead of a MODEM. Odin seems to handle this RADIO/MODEM issue.
Compiled on Ubuntu 11.04 x64
This was ok on 1.3.1. I'm flashing a SGS2 (GT-I9100) with an ICS bootloader.
Heimdall v1.3.2, Copyright (c) 2010-2012, Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au
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:
http://www.glassechidna.com.au/donate/
Initialising connection...
Detecting device...
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 FACTORYFS
87%
ERROR: Failed to confirm end of file transfer sequence!
FACTORYFS upload failed!
Ending session...
Rebooting device...
Re-attaching kernel driver...
This issue is not fixed for Linux AFAICS. Tried git master just a moment ago (Archlinux x86_64 current) and the above mentioned error prevails. I am not sure if it is my setup or the code thats wrong, as i am a bloody noob when it comes to C++:
mv -f $depbase.Tpo $depbase.Po
depbase=echo source/DumpAction.o | sed 's|[^/]$|.deps/&|;s|.o$||';
g++ -DHAVE_CONFIG_H -I. -I/usr/include/libusb-1.0 -I../libpit/Source -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -MT source/DumpAction.o -MD -MP -MF $depbase.Tpo -c -o source/DumpAction.o source/DumpAction.cpp &&
mv -f $depbase.Tpo $depbase.Po
source/Arguments.cpp:74:1: error: prototype for ‘Heimdall::Arguments::Arguments(const std::mapstd::basic_string<char, Heimdall::ArgumentType>&, const std::mapstd::basic_string<char, std::basic_string >&, std::mapstd::basic_string<char, std::basic_string >)’ does not match any in class ‘Heimdall::Arguments’
In file included from source/Arguments.cpp:22:0:
source/Arguments.h:123:8: error: candidates are: Heimdall::Arguments::Arguments(const Heimdall::Arguments&)
source/Arguments.h:135:4: error: Heimdall::Arguments::Arguments(const std::mapstd::basic_string<char, Heimdall::ArgumentType>&, const std::mapstd::basic_string<char, std::basic_string >&, const std::mapstd::basic_string<char, std::basic_string >&)
make[1]: ** [source/Arguments.o] Error 1
make[1]: *** Waiting for unfinished jobs....
I have disabled the GUI build, this issue seems to occur when i try to build libpit
Ubuntu 12.04 x64
Heimdall 4.1RC1 patched with #56
device GT-I9300
heimdall dump --chip-type NAND --chip-id 5 --output boot.img --verbose --stdout-errors
Heimdall v1.4 RC1
Copyright (c) 2010-2012, Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/
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:
http://www.glassechidna.com.au/donate/
Initialising connection...
Detecting device...
Manufacturer: "SAMSUNG"
Product: "Gadget Serial"
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...
ERROR: libusb error -7 whilst receiving packet.ERROR: libusb error -2136414344 whilst receiving packet.
Protocol is not initialised.
Initialising protocol...
Protocol initialisation successful.
Beginning session...
Session begun with device of type: 0.
Ending session...
Rebooting device...
Releasing device interface...
Re-attaching kernel driver...
Attempt complete
$ ls -la
0 -rw-r--r-- 1 root root 0 oct. 5 21:32 boot.img
I also tried with --delay 400 for the same result
Heimdall will not communicate with the the Docomo's version of the Galaxy S II 4G, know as the Galaxy S II LTE (SC-03D). (Docomo is a Japanese phone company.)
Here is the output when trying to flash a recovery image ripped from the phone itself:
# heimdall flash --recovery dev-block-mmcblk0p22.img --verbose
Heimdall v1.3.1, Copyright (c) 2010-2011, Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au
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:
http://www.glassechidna.com.au/donate/
Initialising connection...
Detecting device...
Manufacturer: "Samsung"
Product: "MSM8x60"
Serial No: "?"
length: 18
device class: 2
S/N: 0
VID:PID: 04E8:685D
bcdDevice: 0100
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: 82
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: 01
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...
ERROR: Failed to initialise protocol!
Re-attaching kernel driver...
#
The recovery image was ripped with a command like this (on the phone):
# dd if=/dev/block/mmcblk0p22 of=dev-block-mmcblk0p22.img bs=512k
...
#
After a little investigation into the code, it appears it is getting a failure result on line 100 on BridgeManager.cpp:
int result = libusb_control_transfer(deviceHandle, LIBUSB_REQUEST_TYPE_CLASS, 0x22, 0x3, 0, nullptr, 0, 1000);
I am willing do to the work needed to get this device supported, but I'm not sure where to start. After looking at the patches required to get other devices supported, it doesn't look like anyone has ever had to change this line.
Hello Benjamin,
I tried flashing these files without success.
The error:
Could not find end of file or end of file transfer, something similar.
Version:
Heimdall 1.2
I tried both commands (These commands may not be exact, from the top of my head):
heimdall flash repartition --13 hidden.rfs --15 movinand.mst
hiemdall flash repartition --hidden hidden.rfs --movinand movinand.mst
A related question:
The internel sd card did not seem to wipe everything when initiating the following command:
heimdall flash --repartition --pit gt-p1000_mr.pit --factoryfs factoryfs.rfs --cache cache.rfs --dbdata dbdata.rfs --kernel zImage --param param.lfs --primary-boot boot.bin --secondary-boot Sbl.bin
Is this to do with the fact movinand and hidden.rfs were not uploaded successfully?
I was using overcome's stock safe v1.
Thank you for you work, I love it!!!
heimdall download-pit --output SGS3.pit -v
Heimdall v1.3.2, Copyright (c) 2010-2012, Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au
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:
http://www.glassechidna.com.au/donate/
Initialising connection...
Detecting device...
Manufacturer: "Sasmsung"
Product: "MSM8960"
length: 18
device class: 2
S/N: 0
VID:PID: 04E8:685D
bcdDevice: 0100
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: 82
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: 01
max packet size: 0200
polling interval: 00
Claiming interface...
Setting up interface...
Checking if protocol is initialised...
Protocol is not initialised.
Initialising protocol...
ERROR: Failed to initialise protocol!
Always errors out right here.
$ sudo heimdall flash --recovery recovery-clockwork-5.8.4.3-skyrocket.img
Heimdall v1.3.2, Copyright (c) 2010-2012, Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au
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:
http://www.glassechidna.com.au/donate/
Initialising connection...
Detecting device...
Claiming interface...
Setting up interface...
Checking if protocol is initialised...
Protocol is not initialised.
Initialising protocol...
ERROR: Failed to initialise protocol!
My command:
heimdall flash --repartition --pit PIT.pit --factoryfs factoryfs.img --cache cache.img --primary-boot boot.bin --secondary-boot Sbl.bin --param param.lfs --kernel zImage --modem modem.bin --hidden hidden.img --data data.img
The output of heimdall:
Heimdall v1.3.1, Copyright (c) 2010-2011, Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au
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:
http://www.glassechidna.com.au/donate/
Initialising connection...
Detecting device...
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
Uploading PIT
PIT upload successful
Uploading KERNEL
100%
KERNEL upload successful
Uploading CACHE
100%
CACHE upload successful
Uploading MODEM
100%
MODEM upload successful
Uploading FACTORYFS
100%
FACTORYFS upload successful
Uploading DATAFS
100%
ERROR: Failed to confirm end of file transfer sequence!
DATAFS upload failed!
Ending session...
ERROR: Failed to send end session packet!
Re-attaching kernel driver...
Does anyone can help me?
Hi Benjamin!
First of all, very good job, and thanks for being multiplatform, really!
I tryed to flash a kernel using heimdall 1.3.2 to a galaxy s i9000 and it worked very well.
Now i got a galaxy s i9001 Plus, and i got this message whenever I try to print PIT:
Initialising connection...
Detecting device...
Claiming interface...
Setting up interface...
ERROR: Setting up interface failed!
Also I tryed with the terminal putting this:
heimdall flash --kernel zImage
with the same output as a result.
I'm using Mac OS with Lion and I'm not sure what is failing, how can I help you to discover the error/bug or my mistake?
C:\Tablet\Tools\Heimdall>heimdall.exe dump --chip-type NAND --chip-id 0 --output LP11-dump.tar --verbose --stdout-errors
Heimdall v1.4 RC1
Copyright (c) 2010-2012, Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/
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:
http://www.glassechidna.com.au/donate/
Initialising connection...
Detecting device...
Manufacturer: "SAMSUNG"
Product: "SEC DEV"
length: 18
device class: 2
S/N: 0
VID:PID: 04E8:685D
bcdDevice: 0100
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: 82
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: 01
max packet size: 0200
polling interval: 00
Claiming interface...
Setting up interface...
Checking if protocol is initialised...
Protocol is initialised.
Beginning session...
Session begun with device of type: 3.
Ending session...
ERROR: Failed to unpack received packet.
ERROR: Failed to unpack received packet.
ERROR: Failed to receive session end confirmation!
ERROR: Failed to receive session end confirmation!
Releasing device interface...
Heimdall is having trouble communicating with the T-Mo GSII variant, the SGH-T989. It has a different USB product ID (685E instead of the common 685D). I've corrected that hurdle on my own box, but it is not the only problem.
Here is the output from a PIT print:
#:~$ ./heimdall print-pit --verbose
Heimdall v1.3.1, Copyright (c) 2010-2011, Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au
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:
http://www.glassechidna.com.au/donate/
Initialising connection...
Detecting device...
Manufacturer: "SAMSUNG"
Product: "SAMSUNG_Android"
Serial No: "fece4578"
length: 18
device class: 239
S/N: 3
VID:PID: 04E8:685E
bcdDevice: 0400
iMan:iProd:iSer: 1:2:3
nb confs: 1
interface[0].altsetting[0]: num endpoints = 2
Class.SubClass.Protocol: 08.06.50
endpoint[0].address: 81
max packet size: 0200
polling interval: 00
endpoint[1].address: 01
max packet size: 0200
polling interval: 01
interface[1].altsetting[0]: num endpoints = 1
Class.SubClass.Protocol: 02.02.01
endpoint[0].address: 85
max packet size: 000A
polling interval: 09
interface[2].altsetting[0]: num endpoints = 2
Class.SubClass.Protocol: 0A.00.00
endpoint[0].address: 84
max packet size: 0200
polling interval: 00
endpoint[1].address: 03
max packet size: 0200
polling interval: 00
interface[3].altsetting[0]: num endpoints = 2
Class.SubClass.Protocol: FF.42.01
endpoint[0].address: 86
max packet size: 0200
polling interval: 00
endpoint[1].address: 04
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...
ERROR: Failed to initialise protocol! 105:-9
Re-attaching kernel driver...
Notice the "failed to initialise..." line. I've added "LINE, result" to that error print. The "-9" is the value returned by the call on line 101 (100 in the mainline without my USB product ID line added near the top) of BridgeManager.cpp;
int result = libusb_control_transfer(deviceHandle, LIBUSB_REQUEST_TYPE_CLASS, 0x22, 0x3, 0, nullptr, 0, 1000);
It's LIBUSB_ERROR_PIPE (-9) returned by libusb_control_transfer(). From the libusb docs, "LIBUSB_ERROR_PIPE if the control request was not supported by the device". Further, in the above we see:
device class: 239
S/N: 3
VID:PID: 04E8:685E
The device class (239, or "Miscellaneous") is a big difference; it appears that device class 2 (comms device) is expected. Perhaps that is responsible for the pipe error. In fact, "lsusb -v" says:
Bus 002 Device 012: ID 04e8:685e Samsung Electronics Co., Ltd
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2 ?
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
idVendor 0x04e8 Samsung Electronics Co., Ltd
idProduct 0x685e
bcdDevice 4.00
iManufacturer 1
iProduct 2
iSerial 3
bNumConfigurations 1
This suggests that the phone is presenting as a class 239/subclass 2/protocol 1 device, which according to http://www.usb.org/developers/defined_class/#BaseClassEFh means that it is an "Interface Association" descriptor; a way to multiplex multiple device classes on one "function". Later on we see:
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk (Zip)
iInterface 4
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 0
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 1
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 1
bInterfaceCount 2
bFunctionClass 2 Communications
bFunctionSubClass 2 Abstract (modem)
bFunctionProtocol 1 AT-commands (v.25ter)
iFunction 7
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 2 Communications
bInterfaceSubClass 2 Abstract (modem)
bInterfaceProtocol 1 AT-commands (v.25ter)
iInterface 5
CDC Header:
bcdCDC 1.10
CDC Call Management:
bmCapabilities 0x00
bDataInterface 2
CDC ACM:
bmCapabilities 0x02
line coding and serial state
CDC Union:
bMasterInterface 1
bSlaveInterface 2
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x85 EP 5 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x000a 1x 10 bytes
bInterval 9
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0
iInterface 6
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 3
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 66
bInterfaceProtocol 1
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x86 EP 6 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x04 EP 4 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Two things appear to be of interest here; specifically, "bInterfaceClass 2" and "bFunctionClass 2", which are possibly what Heimdall is used to interacting with. ??? Rampant speculation, there. If so, then what we need for the T989 is probably to switch the comms, based on the product ID, and retrieve a handle to the class 2 interface, and issue the Loke protocol to that instead.
My USB-foo is weak, and I'd appreciate it if either another programmer with a T989 and USB experience could poke at this, or, a Windows-savvy developer with a T989 could snoop on ODIN and just scoop the protocol initialization bytes.
I'm seeing the following issue when attempting to flash my Droid Charge using Heimdall under Arch Linux:
athena:~/android/charge% sudo heimdall flash --kernel zImage --recovery recovery.bin
Heimdall v1.2.0, Copyright (c) 2010-2011, Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au
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:
http://www.glassechidna.com.au/donate/
Claiming interface... Failed. Attempting to detach driver...
Claiming interface again... Success
Setting up interface... Success
Beginning session...
Handshaking with Loke... Success
Downloading device's PIT file...
PIT file download sucessful
Uploading KERNEL
0%
ERROR: Expected file part index: 0 Received: 1
KERNEL upload failed!
Ending session...
Failed to receive session end confirmation!
Re-attaching kernel driver...
I've had to run the close-pc-screen
command afterward to successfully reboot my phone.
This is a brand new Droid Charge that I just received today, and hasn't had any system updates applied yet.
I noticed someone with a similar issue on XDA-Developers in this thread (username "distortedloop").
I'm using Heimdall built from the latest GitHub commit on master (ab4073b).
Hi,
Would it be possible to tag versions, it would enable the creation of package from github sot that it eases the creation of packages relying on archive of the source code (i.e. Archlinux: http://aur.archlinux.org/packages.php?ID=42632)
Just succeeded re-stocking Gingerbread to an unmodified GT-P1000XXJID (Froyo) after a week of trial-and-error ;-)
This is what I came across:
When trying to flash the Galaxy Tab with the Stock Gingerbread Kernel (Overcome GB-Stock-Safe-v5 or official P1000XXJQ1/-JPZ), heimdall 1.3.2 gives an error after uploading the kernel:
Uploading KERNEL
100%
ERROR: Failed to confirm end of file transfer sequence!
KERNEL upload failed!
I experienced this a few days ago on my Ubuntu 11.10 Oneiric system, using the heimdall 1.3.2 oneiric version from the heimdall-packagers PPA. I then thought that maybe the oneiric version of libusb-1.0-0 could be a little too old, so I ventured the still outstanding release upgrade to 12.04 Precise. But today I found out that this would not have been the problem - flashing the kernel to the device still brought up the error.
I downloaded two other versions of a stock Gingerbread ROM, to confirm via checksum that the zImage file I was trying to flash was sane - it was. Lastly, I remembered someone on the net and in another context suggesting to downgrade heimdall to see if a former version would work. I did not consider that in the first place, because I had also read (here) that the 1.3.1 version still had problems with the MOVINAND and HIDDEN partitions. But having arrived at my last resort before giving up and attempting to restore Froyo, I gave it a try (apt-get purged heimdall from the PPA repo and the repo itself, d'loaded the 1.3.1 deb and dpkg-i'd it).
And yes, flashing (only) the kernel works with 1.3.1. And no, it does not work with the 1.3.2-deb either, I cross-tested this. So I ended up flashing everything except the kernel with the 1.3.2 version installed, then downgraded to 1.3.1 and flashed the kernel. Rebooted, trepidant for a few long minutes, but was then presented with the Gingerbread Setup Screen. Phew!
Here some lines from my bash history, maybe this is of help to anyone in the same situation:
# apt-get purge heimdall
# dpkg -i dpkg -i heimdall_1.3.2_i386.deb
(Put Tab in download mode, then connect it via USB)
# heimdall flash --repartition --pit gt-p1000_mr.pit --primary-boot boot.bin --cache cache.rfs --dbdata dbdata.rfs --factoryfs factoryfs.rfs --hidden hidden.rfs --modem modem.bin --movinand movinand.mst --param param.lfs --secondary-boot Sbl.bin --no-reboot
(Everything should work well)
# apt-get purge heimdall
# dpkg -i dpkg -i heimdall_1.3.1_i386.deb
# heimdall flash --kernel zImage
After the kernel upload the Tab should reboot. At first, I had a bit of garbled screen, but this went away, maybe with or without the help of touching the Android Soft keys at the bottom of the screen (I did this because the garbled screen didn't change for awhile, but the softkeys were lit - and suddenly the setup-screen appeared).
Sorry if this is in too great detail for a really specific bug report, but I have found much useful information right here on these pages, so I wanted to contribute as much information as possible on this issue - simply because Heimdall is a great piece of platform-independent software. So if you manage to restore heimdall's kernel flashing behavior from 1.3.1, keeping everything else intact, Flashing a GT-P1000 under linux should be a straightforward thing and help send "Odin" back to Walhalla ;-)
Hi Benjamin,
Can you please publish the sources used to generate the Debian packages?
I'd like to compile amd64 binaries.
Thanks,
Jon
I tried to flash pretty much everything (sudo heimdall flash --primary-boot boot.bin --secondary-boot Sbl.bin --param param.lfs --kernel zImage --cache cache.img --modem modem.bin --factoryfs factoryfs.img --hidden hidden.img --data data.img), but the upload stopped at data.img:
(everything ok at first, until...)
...
File Part #742... Response: 0 0 0 0 E6 2 0 0
File Part #743... Response: 0 0 0 0 E7 2 0 0
100%
FACTORYFS upload successful
Uploading DATAFS
0%File Part #0... Response: 0 0 0 0 0 0 0 0
File Part #1... Response: 0 0 0 0 1 0 0 0
File Part #2... Response: 0 0 0 0 2 0 0 0
1%
File Part #3... Response: 0 0 0 0 3 0 0 0
File Part #4... Response: 0 0 0 0 4 0 0 0
File Part #5... Response: 0 0 0 0 5 0 0 0
...
99%
File Part #276... Response: 0 0 0 0 14 1 0 0
File Part #277... Response: 0 0 0 0 15 1 0 0
File Part #278... Response: 0 0 0 0 16 1 0 0
100%
ERROR: libusb error -7 whilst receiving packet. Retrying...
ERROR: libusb error -7 whilst receiving packet. Retrying...
ERROR: libusb error -7 whilst receiving packet. Retrying...
ERROR: libusb error -7 whilst receiving packet. Retrying...
ERROR: libusb error -7 whilst receiving packet. Retrying...
ERROR: libusb error -7 whilst receiving packet.
ERROR: Failed to confirm end of file transfer sequence!
DATAFS upload failed!
Ending session...
ERROR: libusb error -7 whilst sending packet. Retrying...
ERROR: libusb error -7 whilst sending packet. Retrying...
ERROR: libusb error -7 whilst sending packet. Retrying...
ERROR: libusb error -7 whilst sending packet. Retrying...
ERROR: libusb error -7 whilst sending packet. Retrying...
ERROR: libusb error -7 whilst sending packet.
ERROR: Failed to send end session packet!
Re-attaching kernel driver...
Using the packaged heimdall 1.3.1 on ubuntu 11.10.
Hi Benjamin,
thank you for your great tool. It worked great for me until yesterday when I tried to flash Android 2.3.3 to my Galaxy Tab
Heimdall flashed pit, initial bootloader and than failed on flashing HIDDEN partition. After this my device was restarted and never turns up now. Screen just black and no signs of life :(
I'm still looking solutions how to revive it. But I don't blame you in any way. I think your tool could be improved if it would flash essential parts first instead of current way flashing in random order. I prepared a patch for you to have a look at changes and decide if they are good. Also I changed the way memory allocated, lot of places use 'new' and you have to remember delete objects afterwards.
Please, see how I changed mapFilesToPartitions function to create map of partitions. Now boot, sbl, kernel will be flashed first.
I verified code compilation on windows and linux.
Regards,
Val
see my changes at
git://github.com/DrGolem/Heimdall.git
I am trying to flash a modem file onto my Samsung Galaxy S2 using heimdall from Git master.
This fails as follows (see below).
It reboots fine then, but the modem (baseband?) version is still at KG1 (I am coming from Cognition ROM 1.15 and updated to VillainROM 2.1).
% ./heimdall flash --modem ~/MODEM_I9100XXKG2_REV_02_CL1037208.tar.md5
Heimdall v1.3 (beta), Copyright (c) 2010-2011, Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au
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:
http://www.glassechidna.com.au/donate/
Initialising connection...
Detecting device...
Claiming interface...
Attempt failed. Detaching driver...
Claiming interface again...
Setting up interface...
Beginning session...
Handshaking with Loke...
Downloading device's PIT file...
PIT file download sucessful
Uploading MODEM
100%
ERROR: Failed to confirm end of file transfer sequence!
MODEM upload failed!
Ending session...
Rebooting device...
Re-attaching kernel driver...
Verbose output of another attempt is at http://paste.ubuntu.com/649099/
While searching for it I've found the following paste, which appears to be related (same error): http://pastebin.com/2zLHW2LG
I get the following error when trying to open the solution file:
C:\Users\Jay\Documents\GitHub\Heimdall\heimdall-frontend\heimdall-frontend.vcxproj : error : The imported project "C:\Users\Jay\Documents\GitHub\Heimdall\heimdall-frontend\Qt4VSPropertySheet.props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. C:\Users\Jay\Documents\GitHub\Heimdall\heimdall-frontend\heimdall-frontend.vcxproj
The file appears to be missing from the repo. Or am I missing something?
Hey,
when I compile Heimdall with
qmake -o Makefile heimdall-frontend.pro
it only gives me
RCC: Warning: No resources in 'mainwindow.qrc'.
Any idea what the problem could be?
Can't perform any action on a Galaxy Tab P7510. I'm using Ubuntu 11.10 64bits
~$ heimdall print-pit --verbose
Heimdall v1.3.1, Copyright (c) 2010-2011, Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au
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:
http://www.glassechidna.com.au/donate/
Initialising connection...
Detecting device...
Manufacturer: "SAMSUNG"
Product: "SEC DEV"
Serial No: "?"
length: 18
device class: 2
S/N: 0
VID:PID: 04E8:685D
bcdDevice: 0100
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: 82
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: 01
max packet size: 0200
polling interval: 00
Claiming interface...
Setting up interface...
Checking if protocol is initialised...
Protocol is not initialised.
Initialising protocol...
ERROR: Failed to initialise protocol!
Recommend Projects
-
-
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
An Open Source Machine Learning Framework for Everyone
-
The Web framework for perfectionists with deadlines.
-
A PHP framework for web artisans
-
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
Some thing interesting about web. New door for the world.
-
A server is a program made to process requests and deliver data to clients.
-
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Some thing interesting about visualization, use data art
-
Some thing interesting about game, make everyone happy.
-
Recommend Org
-
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Open source projects and samples from Microsoft.
-
Google ❤️ Open Source for everyone.
-
Alibaba Open Source for everyone
-
Data-Driven Documents codes.
-
China tencent open source team.
-