Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

New Device: GT-I8160 #74

Open
luckasfb opened this Issue Nov 12, 2012 · 16 comments

Comments

Projects
None yet
3 participants

I would like to add support Haimdall for others models off Samsung phones and first for GT-I8160 (Galaxy Ace 2), need help to it ...

The device:

Board: codina
CPU: U8500
Core CPU: 2
CPU Rate: 800
GPU: Mali-400
ROM: 4Gb (1,2Gb+1Gb for users)
RAM: 768 (555 avaible for users)

I have:

Mandriva 2010.0 64bit
2.6.31.13-desktop-1mnb #1 SMP
rebuild and install libusb1-v1.0.9 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! May be need oldest?
build and install Haimdall cli and qt4 frontend from Git

In "Download mode"

lsusb

Bus 001 Device 027: ID 04e8:685d Samsung Electronics Co., Ltd

lsusb -v

Bus 001 Device 027: ID 04e8:685d Samsung Electronics Co., Ltd
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 2 Communications
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x04e8 Samsung Electronics Co., Ltd
idProduct 0x685d
bcdDevice 1.00
iManufacturer 1 SAMSUNG
iProduct 2 SAMSUNG USB DRIVER
iSerial 3
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 67
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 5 SAMSUNG SERIAL CDC ACM
bmAttributes 0xc0
Self Powered
MaxPower 2mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 2 Communications
bInterfaceSubClass 2 Abstract (modem)
bInterfaceProtocol 1 AT-commands (v.25ter)
iInterface 6 SAMSUNG SERIAL CONTROL
CDC Header:
bcdCDC 1.10
CDC Call Management:
bmCapabilities 0x00
bDataInterface 1
CDC ACM:
bmCapabilities 0x0f
connection notifications
sends break
line coding and serial state
get/set/clear comm features
CDC Union:
bMasterInterface 0
bSlaveInterface 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 1x 16 bytes
bInterval 9
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0
iInterface 7 SAMSUNG SERIAL DATA
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 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 255 Vendor Specific Class
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 1

dmesg

usb 1-2: New USB device found, idVendor=04e8, idProduct=685d
usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-2: Product: SAMSUNG USB DRIVER
usb 1-2: Manufacturer: SAMSUNG
usb 1-2: SerialNumber:
usb 1-2: configuration #1 chosen from 1 choice
cdc_acm 1-2:1.0: This device cannot do calls on its own. It is not a modem.
cdc_acm 1-2:1.0: ttyACM0: USB ACM device

In standard mode:

lsusb

Bus 001 Device 029: ID 04e8:6860 Samsung Electronics Co., Ltd

lsusb -v

Bus 001 Device 029: ID 04e8:6860 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 0x6860
bcdDevice 4.00
iManufacturer 1 SAMSUNG
iProduct 2 SAMSUNG_Android
iSerial 3 CA70F9B069DC94A13729196DDD2CC9E
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 105
bNumInterfaces 3
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 6 Imaging
bInterfaceSubClass 1 Still Image Capture
bInterfaceProtocol 1 Picture Transfer Protocol (PIMA 15470)
iInterface 10 Android MTP
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x85 EP 5 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 0x05 EP 5 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x8e EP 14 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 14
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 1
bInterfaceCount 2
bFunctionClass 2 Communications
bFunctionSubClass 2 Abstract (modem)
bFunctionProtocol 0 None
iFunction 7 CDC Serial
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 Abstract Control Model (ACM)
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 0x86 EP 6 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 CDC ACM Data
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 0
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 0
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2 ?
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0000
(Bus Powered)

dmesg

usb 1-2: new high speed USB device using ehci_hcd and address 29
usb 1-2: New USB device found, idVendor=04e8, idProduct=6860
usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-2: Product: SAMSUNG_Android
usb 1-2: Manufacturer: SAMSUNG
usb 1-2: SerialNumber: CA70F9B069DC94A13729196DDD2CC9E
usb 1-2: configuration 1 chosen from 1 choice
cdc_acm 1-2:1.1: This device cannot do calls on its own. It is not a modem.
cdc_acm 1-2:1.1: ttyACM0: USB ACM device

I try to download the PIT, and only once from many tries it received with errors (have this file in size 4096 )

$ heimdall download-pit --output pit-file-i8160 --verbose --stdout-errors

Heimdall v1.4 RC1

Initialising connection...
Detecting device...
Manufacturer: "SAMSUNG"
Product: "SAMSUNG USB DRIVER"
Serial No: " "

        length: 18
  device class: 2
           S/N: 3
       VID:PID: 04E8:685D
     bcdDevice: 0100

iMan:iProd:iSer: 1:2:3
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 -7 whilst receiving packet.

Protocol is not initialised.

Initialising protocol...
Protocol initialisation successful.

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

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

Ending session...
Rebooting device...
Releasing device interface...
Re-attaching kernel driver...

And finally print the PIT (with errors):

$ heimdall print-pit --file pit-file-i8160 --verbose --no-reboot --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/

Entry Count: 21
Unknown 1: 1598902083
Unknown 2: 1129139525
Unknown 3: 28483
Unknown 4: 26980
Unknown 5: 24942
Unknown 6: 0
Unknown 7: 0
Unknown 8: 0


--- Entry #0 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 0
Attributes: 2 (STL Read-Only)
Update Attributes: 1 (FOTA)
Partition Block Size: 256
Partition Block Count: 768
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: TOC,ISSW,Xloader
Flash Filename: STE_boot.bin.md5
FOTA Filename: 


--- Entry #1 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 1
Attributes: 2 (STL Read-Only)
Update Attributes: 1 (FOTA)
Partition Block Size: 61440
Partition Block Count: 1024
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: STE Mem Init
Flash Filename: mem_init.bin.md5
FOTA Filename: 


--- Entry #2 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 2
Attributes: 2 (STL Read-Only)
Update Attributes: 1 (FOTA)
Partition Block Size: 62464
Partition Block Count: 1024
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: PWR MGT
Flash Filename: power_management.bin.md5
FOTA Filename: 


--- Entry #3 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 3
Attributes: 2 (STL Read-Only)
Update Attributes: 1 (FOTA)
Partition Block Size: 104448
Partition Block Count: 4096
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: IPL Modem
Flash Filename: ipl.bin.md5
FOTA Filename: 


--- Entry #4 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 4
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size: 108544
Partition Block Count: 32768
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: Modem
Flash Filename: modem.bin.md5
FOTA Filename: 


--- Entry #5 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 5
Attributes: 2 (STL Read-Only)
Update Attributes: 1 (FOTA)
Partition Block Size: 63488
Partition Block Count: 4096
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: SBL
Flash Filename: normal.bin.md5
FOTA Filename: 


--- Entry #6 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 6
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size: 141312
Partition Block Count: 32768
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: Kernel
Flash Filename: kernel.bin.md5
FOTA Filename: 


--- Entry #7 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 7
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size: 0
Partition Block Count: 256
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: MBR,GPT
Flash Filename: 
FOTA Filename: 


--- Entry #8 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 8
Attributes: 0 (Read-Only)
Update Attributes: 1 (FOTA)
Partition Block Size: 67584
Partition Block Count: 4096
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: SBL_2
Flash Filename: normal2.bin.md5
FOTA Filename: 


--- Entry #9 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 9
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size: 174080
Partition Block Count: 32768
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: Kernel2
Flash Filename: kernel2.bin.md5
FOTA Filename: 


--- Entry #10 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 10
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size: 71680
Partition Block Count: 32768
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: PARAM
Flash Filename: param.lfs.md5
FOTA Filename: 


--- Entry #11 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 11
Attributes: 5 (Read/Write)
Update Attributes: 5 (FOTA)
Partition Block Size: 28672
Partition Block Count: 32768
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: Modem FS
Flash Filename: modemfs.img.md5
FOTA Filename: 


--- Entry #12 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 12
Attributes: 5 (Read/Write)
Update Attributes: 5 (FOTA)
Partition Block Size: 206848
Partition Block Count: 1253376
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: SYSTEM
Flash Filename: system.img.md5
FOTA Filename: 


--- Entry #13 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 13
Attributes: 5 (Read/Write)
Update Attributes: 5 (FOTA)
Partition Block Size: 4016128
Partition Block Count: 626688
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: CACHEFS
Flash Filename: cache.img.md5
FOTA Filename: 


--- Entry #14 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 14
Attributes: 5 (Read/Write)
Update Attributes: 5 (FOTA)
Partition Block Size: 1460224
Partition Block Count: 2555904
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: DATAFS
Flash Filename: userdata.img.md5
FOTA Filename: 


--- Entry #15 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 15
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size: 3072
Partition Block Count: 3072
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: CSPSA FS
Flash Filename: cspsa.img.md5
FOTA Filename: 


--- Entry #16 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 16
Attributes: 5 (Read/Write)
Update Attributes: 5 (FOTA)
Partition Block Size: 8192
Partition Block Count: 20480
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: EFS
Flash Filename: EFS.img.md5
FOTA Filename: 


--- Entry #17 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 17
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size: 5400576
Partition Block Count: 2312192
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: UMS
Flash Filename: ums.rfs.md5
FOTA Filename: 


--- Entry #18 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 18
Attributes: 5 (Read/Write)
Update Attributes: 5 (FOTA)
Partition Block Size: 4642816
Partition Block Count: 655360
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: HIDDEN
Flash Filename: hidden.img.md5
FOTA Filename: 


--- Entry #19 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 19
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size: 1024
Partition Block Count: 2048
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: PIT
Flash Filename: GT-I8160_EUR_XX_4G.pit.md5
FOTA Filename: 


--- Entry #20 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 20
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size: 5298176
Partition Block Count: 102400
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: Fota
Flash Filename: ssgtest.img.md5
FOTA Filename:

Try to read PIT file from older 1.3.1 version (only with root) dont have any claims and save PIT. But not saved the dump = 0 bit file without errors

I think if possible to download PIT, then posible to download any of parts of firmware from device (the partition already recognized) or not? Why only all dump must download?

Help me, please for download the firmware from GT-I8160, and flash it without Odin...

Owner

Benjamin-Dobell commented Feb 3, 2013

Dumping firmware isn't supported on any device as Samsung don't seem to implement it. As such any reference to dumping firmware will be removed from Heimdall when I get a chance.

However, downloading and printing the PIT does work on supported devices. Could you please try print-pit (and possibly flash) with the latest Git commit and include the output.

NOTE: Please make sure you read about GitHub Flavored Markdown before you post any output and indent the output as if it were code to prevent Github from referencing other issues due to the use of the "#" character.

If you have access to Windows then please provide me with a USB capture of flashing with Kies/Odin:
http://www.youtube.com/watch?v=qFIg5fu0PTg

Ok, thanks for responding!
I have Windows 7 64bit also, and will try to install USB Logger.

I have just successfully flashed ace2 using heimdall. I needed to run heimdall as root, though.

What the version of Heimdal and OS? Good news!

1.3.1 on ubuntu 12.10

luckasfb commented Mar 1, 2013

Ok try 1.3.1 , version 1.4 RC1 from git did errors

luckasfb commented Mar 2, 2013

tried Ubuntu 10.04 x64 and 1.3.1 with update libusb 1.0.6 to 1.0.8 - not detect the device. The 1.4.RC1 from git the same libusb 1.0.8 - detect the device normally, partially print pit, but did some errors for operations.
heimdall-frontend compiled only in 1.4.RC1 (dependency for QT4.7, but I have only 4.6.) for 1.3.x - did`t compile.
But I try thought virtual mashine (maybe its cause problems)

luckasfb commented Mar 2, 2013

And remember :) have JB 4.1.2 at phone...

1.3.1 also works fine on ubuntu 13.10. Remember, you need to stast heimdall-frontent via sudo (or from a root shell), otherwise the device does get detected, but when flashing gives libusb error.

Owner

Benjamin-Dobell commented Jun 19, 2013

Can someone please confirm whether or not this device is functioning correctly under 1.4.0?

Not worked correctly under 1.4.0, only list partially informations about partitions. Did`nt read correctly Pit - file .
Has dependencies for new libusb library in old Ubuntu releases

Owner

Benjamin-Dobell commented Jul 2, 2013

@luckasfb Could you please provide the output you're seeing, and what you're expecting to see?

luckasfb commented Jul 2, 2013

Sorry but it possible only from virtualbox now :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment