xboxscene.org forums

Pages: [1] 2 3

Author Topic: LiteOn flash tool for Linux  (Read 184 times)

Xbox-Scene

  • Archived User
  • Hero Member
  • *
  • Posts: 4299
LiteOn flash tool for Linux
« on: March 26, 2009, 02:58:00 PM »

LiteOn flash tool for Linux
Posted by XanTium | March 26 17:06 EST | News Category: Xbox360
 
ddl released tools to flash the FW on the Xbox360 LiteOn drive under Linux on xboxhacker.net:
Quote

I made a release build. I still want to do some more work on the code before I release it.
Anyway... Feel free to try it out! If you try it I would be glad if you could leave me some feedback. Thanks!

Official Site: n/a, by ddl (#xbox360tools @EFnet)
Download: Statically linked 32-bit | Statically linked 64-bit



Logged

XanTium

  • Archived User
  • Hero Member
  • *
  • Posts: 1358
LiteOn flash tool for Linux
« Reply #1 on: March 26, 2009, 05:00:00 PM »

Full Readme/Instructions:
QUOTE

DISCLAIMER: THESE PROGRAMS ARE RELEASED AS IS. USING THESE TOOLS MAY DAMAGE
YOUR COMPUTER AND/OR XBOX 360 DRIVE. I TAKE NO RESPONSIBILITY WHATSOEVER.



Steps needed to flash your Xbox 360 Liteon drive:

1) Connect the Liteon drive to your computer and power it up using your 360 or
   a connectivity kit.



2) Extract the drive key.

You might have to eject your drive tray and leave it half way out for this to
work on drives with original firmware.

host:~>./liteon_keyext -h
liteon_keyext v1.0 by ddl.
Key extractor for the Xbox 360 LiteOn drive (PLDS DG-16D2S).

Usage: ./liteon_keyext [options] <ATA command base> <serial device> [output dir]

Options:
  -h                               Displays this text.
  -n <times>                       Times to extract the key. (default: 6)


This program needs to be run as root since we are going to do port I/O with
outb(), outw(), inb() and inw().

BE SURE TO ENTER THE CORRECT ATA COMMAND BASE FOR YOUR DRIVE!

host:~>sudo ./liteon_keyext 170 /dev/ttyUSB0 drive1
liteon_keyext v1.0 by ddl.
Key extractor for the Xbox 360 LiteOn drive (PLDS DG-16D2S).

Using ATA command base: 0x0170
Using serial device: /dev/ttyUSB0

Attempting to extract the key 6 times...

Attempt   1:    EE B6 XX XX  XX XX XX XX  XX XX XX XX  XX XX C6 C6
Attempt   2:    EE B6 XX XX  XX XX XX XX  XX XX XX XX  XX XX C6 C6
Attempt   3:    EE B6 XX XX  XX XX XX XX  XX XX XX XX  XX XX C6 C6
Attempt   4:    EE B6 XX XX  XX XX XX XX  XX XX XX XX  XX XX C6 C6
Attempt   5:    EE B6 XX XX  XX XX XX XX  XX XX XX XX  XX XX C6 C6
Attempt   6:    EE B6 XX XX  XX XX XX XX  XX XX XX XX  XX XX C6 C6

Sending identify request to drive...
Sending inquiry request to drive...
Extracting serial information from drive...

DVD Label: D60XXXXXXXXXXXXA1  
OPT Label: 8F2XXXXXXXXXX4XX
PCB Label: S4P8XXXXXXXXXXXX82
HW Ver   : A0A1

Wrote file: drive1/key.bin
Wrote file: drive1/identify.bin
Wrote file: drive1/inquiry.bin
Wrote file: drive1/dummy.bin

host:~>



3) Patch iXtreme firmware.

host:~>./ixfw_patch  
ixfw_patch v0.1b by ddl.
iXtreme (LiteOn) firmware patcher.

WARNING!! THIS PROGRAM DOES NOT PERFORM ANY VALIDITY CHECKS
AND HAS ONLY BEEN TESTED WITH IXTREME 1.51 LITEON FIRMWARE.

Usage: ./ixfw_patch <dummy file> <ixtreme file> <output file>


host:~>./ixfw_patch drive1/dummy.bin fw/ix151-liteon.bin drive1/patched_ix151.bin
ixfw_patch v0.1b by ddl.
iXtreme (LiteOn) firmware patcher.

WARNING!! THIS PROGRAM DOES NOT PERFORM ANY VALIDITY CHECKS
AND HAS ONLY BEEN TESTED WITH IXTREME 1.51 LITEON FIRMWARE.

Writing patched firmware: drive1/patched_ix151.bin
Success!

host:~>



4) Erase drive firmware.

BEFORE YOU DO THIS YOU HAVE TO BE SURE YOU HAVE YOUR DRIVE KEY SAVED SOMEWHERE.

host:~>./liteon_erase -h
Usage: ./liteon_erase [options] <ATA command base>

Options:
  -h                               Displays this text.

host:~>

host:~>sudo ./liteon_erase 170
liteon_erase v1.0 by ddl.
Firmware eraser for the Xbox 360 LiteOn drive (PLDS DG-16D2S).

Status: 0xD0

host:~>

You should be okay if you get status 0xD0, 0x72, 0x80, 0xD1 or 0xF2.

No matter what status you get you should power cycle your drive and try to
flash it. If mtflash fails to enter vendor mode you should repeat the the
erase procedure.



5) Flash the patched firmware.

host:~>./mtflash -h    
mtflash v0.1b by ddl.
Firmware flasher for drives with MT13x9 chips.

Usage: ./mtflash [options] <r|R> <ATA command base> <output file>
       ./mtflash [options] <w|W> <ATA command base> <input file>
       ./mtflash [options] <e|E> <ATA command base>

Options:
  -h                             Displays this text.
  -p <0|1>                       Drive position. 0 for master, 1 for slave.
                                 (default: 0)
  -d <usec>                      Delay (usec) before each status reg read.
                                 (default: 50)
  -l                             List supported flash chip types.

host:~>

Currently only writing is implemented!

host:~>./mtflash -l

Name                                 Vendor ID   Device ID   Size      Type
--------------------------------------------------------------------------------
MXIC/Macronix(MX25L2005)             0xC2        0x11        262144    Serial
Winbond/NEX(W25P20/W25X20/NX25P20)   0xEF        0x11        262144    Serial

host:~>

These are the two flash chips found in the PLDS DG-16D2S drive.

host:~>sudo ./mtflash w 170 drive1/patched_ix151.bin
mtflash v0.1b by ddl.
Firmware flasher for drives with MT13x9 chips.

Sending MTK vendor intro... OK!
Reading flash vendor and device ID... OK!

Name:      MXIC/Macronix(MX25L2005)
Vendor ID: 0xC2
Device ID: 0x11
Size:      4 banks (262144 bytes)
Type:      Serial

Writing bank 0 ................ OK!
Writing bank 1 ................ OK!
Writing bank 2 ................ OK!
Writing bank 3 ................ OK!

Flash read-back checksum (datasum): 0xEAD4

Flash write successful!

Sending MTK vendor outro... OK!

host:~>

mtflash will verify that all bytes has been written correctly. This is done
in the writing procedure.

If mtflash fails to enter vendor mode you should try to erase the drive again
and power cycle it. If flashing fails during writing you could try adjusting
the delay before status register reads (-d option).


What about other drives?

BenQ
----
mtflash could probably be adapted to support the Xbox 360 BenQ drive quite
easily since it also has an embedded SPI flash chip. Though, I would need a
BenQ drive to do that...

Samsung
-------
Implementing support for the Samsung drive would require some more time since
it has an embedded Parallel flash chip instead of a serial flash. Anyway...
Nothing is impossible...

Hitachi
-------
The Hitachi drives would require completely different methods. I think
SeventhSon has done some work in this area...



Feel free to contact me if you have any questions, comments or a spare drive
laying around that you would like to donate to science smile.gif


--

irc:  #xbox360tools @ efnet

Logged

jeffrey1790

  • Archived User
  • Newbie
  • *
  • Posts: 38
LiteOn flash tool for Linux
« Reply #2 on: March 26, 2009, 04:54:00 PM »

I love the person who made this.
Logged

metalcoat

  • Archived User
  • Full Member
  • *
  • Posts: 164
LiteOn flash tool for Linux
« Reply #3 on: March 26, 2009, 06:44:00 PM »

If they only made one for all drives I could erase my puny xp partition

Logged

odingalt

  • Archived User
  • Newbie
  • *
  • Posts: 34
LiteOn flash tool for Linux
« Reply #4 on: March 26, 2009, 10:01:00 PM »

I'm a linux noob.  Can the serial device be a USB port?
Logged

metalcoat

  • Archived User
  • Full Member
  • *
  • Posts: 164
LiteOn flash tool for Linux
« Reply #5 on: March 26, 2009, 10:46:00 PM »

CODE
Using serial device: /dev/ttyUSB0


To answer your question, yes
Logged

pancus

  • Archived User
  • Newbie
  • *
  • Posts: 12
LiteOn flash tool for Linux
« Reply #6 on: March 27, 2009, 12:13:00 AM »

yay!!! This makes me very happy.
Logged

tigob59

  • Archived User
  • Newbie
  • *
  • Posts: 2
LiteOn flash tool for Linux
« Reply #7 on: March 27, 2009, 04:05:00 AM »

Hi all ...

i'm not sure to have understand the way it works...

just a recap to be sure...

1) i open my xbox
2) i disconnect the DVD sata cable from the xbox
3) i connect the drive to my computer and let the power supply connected to my xbox
4) i start the computer under linux kernel 2.6
5) i start the xbox
6) i run the 4 scripts
7) i stop the pc and the xbox
8) i reconnect the xbox sata cable to the dvd rom
9) i close the xbox
10 ) i enjoy ?

is that the only step needed ? what about the serial cable mentionned ? do i need to solder something somewhere ?

is someone as already try this ? i wrote a mail to the autor of the scritp and he answer me that he has no feedback of anyone that have use his scirpt and he told me that it worked for his console.

Thank's a lot for your answer
best Regards
Logged

ddl

  • Archived User
  • Newbie
  • *
  • Posts: 12
LiteOn flash tool for Linux
« Reply #8 on: March 27, 2009, 11:59:00 AM »

Hi all,

I realize an important part was left out since I previously only released binaries... The credits and respect to all of those who made these tools possible. Currently they are only stated as comments in the code and they are not visible in the binary-only release.

As most of you probably understand I did not come up with all these methods myself. My work is based on the following programs and their authors deserve a lot of respect. I'm sorry that I forgot to add their names to the README file before I built and released the binaries.

CODE

DVDKey32 v0.8.1:               Geremia, C4eva, Podger, Seventhson
Firmtool v1.3.1:               Caster420
DosFlash v1.7:                 Geremia, Modfreakz, Kai Schtrom
JungleFlasher v0.0.43b:        Team Jungle
Drive Serial Dummy.Bin Fixer:  GiampyXBS, Oggy


... and anyone I might have forgot.
Logged

DeeRez

  • Archived User
  • Jr. Member
  • *
  • Posts: 87
LiteOn flash tool for Linux
« Reply #9 on: March 27, 2009, 12:36:00 PM »

Thanks ddl, been waiting for something like this for ages. Shame it doesn't support more drives, but one Linux flashable drive is better than no Linux flashable drives. Next time I do a Lite-On, I'll try this and let you know how it goes.

This post has been edited by DeeRez: Mar 27 2009, 07:36 PM
Logged

rh387

  • Archived User
  • Newbie
  • *
  • Posts: 17
LiteOn flash tool for Linux
« Reply #10 on: March 27, 2009, 02:54:00 PM »

I have a Samsung MS28 logic board that I could donate to the cause if you are interested.  PM me and let me know.
Logged

darkshadow2k8

  • Archived User
  • Full Member
  • *
  • Posts: 133
LiteOn flash tool for Linux
« Reply #11 on: March 27, 2009, 06:54:00 PM »

i assume the liteon extractor thing is still needed or can it just be flashed like normal
Logged

ddl

  • Archived User
  • Newbie
  • *
  • Posts: 12
LiteOn flash tool for Linux
« Reply #12 on: March 28, 2009, 03:16:00 AM »

QUOTE(darkshadow2k8 @ Mar 28 2009, 03:38 AM) View Post

i assume the liteon extractor thing is still needed or can it just be flashed like normal


You need the key extractor to extract the drive key. If you already have your key you could skip that step.
Logged

krukaze

  • Archived User
  • Newbie
  • *
  • Posts: 17
LiteOn flash tool for Linux
« Reply #13 on: March 29, 2009, 03:28:00 PM »

Thank you very much. love.gif
If the other drives get linux support too i'll get rid windows completely.
Logged

lilos

  • Archived User
  • Newbie
  • *
  • Posts: 8
LiteOn flash tool for Linux
« Reply #14 on: April 05, 2009, 02:28:00 AM »

Ok all is ok i`m ready to try this.

I use slax linux but don`t understand where is my drive.

root@slax:~# ./liteon_keyext 170 /dev/tty
Display all 325 possibilities? (y or n)
tty    tty26  tty44  tty62  ttyab  ttybf  ttyd3  ttye7  ttypb  ttyqf  ttys3  ttyt7  ttyub  ttyvf  ttyx3  ttyy7  ttyzb
tty0   tty27  tty45  tty63  ttyac  ttyc0  ttyd4  ttye8  ttypc  ttyr0  ttys4  ttyt8  ttyuc  ttyw0  ttyx4  ttyy8  ttyzc
tty1   tty28  tty46  tty7   ttyad  ttyc1  ttyd5  ttye9  ttypd  ttyr1  ttys5  ttyt9  ttyud  ttyw1  ttyx5  ttyy9  ttyzd
tty10  tty29  tty47  tty8   ttyae  ttyc2  ttyd6  ttyea  ttype  ttyr2  ttys6  ttyta  ttyue  ttyw2  ttyx6  ttyya  ttyze
tty11  tty3   tty48  tty9   ttyaf  ttyc3  ttyd7  ttyeb  ttypf  ttyr3  ttys7  ttytb  ttyuf  ttyw3  ttyx7  ttyyb  ttyzf
tty12  tty30  tty49  ttyS0  ttyb0  ttyc4  ttyd8  ttyec  ttyq0  ttyr4  ttys8  ttytc  ttyv0  ttyw4  ttyx8  ttyyc
tty13  tty31  tty5   ttyS1  ttyb1  ttyc5  ttyd9  ttyed  ttyq1  ttyr5  ttys9  ttytd  ttyv1  ttyw5  ttyx9  ttyyd
tty14  tty32  tty50  ttyS2  ttyb2  ttyc6  ttyda  ttyee  ttyq2  ttyr6  ttysa  ttyte  ttyv2  ttyw6  ttyxa  ttyye
tty15  tty33  tty51  ttyS3  ttyb3  ttyc7  ttydb  ttyef  ttyq3  ttyr7  ttysb  ttytf  ttyv3  ttyw7  ttyxb  ttyyf
tty16  tty34  tty52  ttya0  ttyb4  ttyc8  ttydc  ttyp0  ttyq4  ttyr8  ttysc  ttyu0  ttyv4  ttyw8  ttyxc  ttyz0
tty17  tty35  tty53  ttya1  ttyb5  ttyc9  ttydd  ttyp1  ttyq5  ttyr9  ttysd  ttyu1  ttyv5  ttyw9  ttyxd  ttyz1
tty18  tty36  tty54  ttya2  ttyb6  ttyca  ttyde  ttyp2  ttyq6  ttyra  ttyse  ttyu2  ttyv6  ttywa  ttyxe  ttyz2
tty19  tty37  tty55  ttya3  ttyb7  ttycb  ttydf  ttyp3  ttyq7  ttyrb  ttysf  ttyu3  ttyv7  ttywb  ttyxf  ttyz3
tty2   tty38  tty56  ttya4  ttyb8  ttycc  ttye0  ttyp4  ttyq8  ttyrc  ttyt0  ttyu4  ttyv8  ttywc  ttyy0  ttyz4
tty20  tty39  tty57  ttya5  ttyb9  ttycd  ttye1  ttyp5  ttyq9  ttyrd  ttyt1  ttyu5  ttyv9  ttywd  ttyy1  ttyz5
tty21  tty4   tty58  ttya6  ttyba  ttyce  ttye2  ttyp6  ttyqa  ttyre  ttyt2  ttyu6  ttyva  ttywe  ttyy2  ttyz6
tty22  tty40  tty59  ttya7  ttybb  ttycf  ttye3  ttyp7  ttyqb  ttyrf  ttyt3  ttyu7  ttyvb  ttywf  ttyy3  ttyz7
tty23  tty41  tty6   ttya8  ttybc  ttyd0  ttye4  ttyp8  ttyqc  ttys0  ttyt4  ttyu8  ttyvc  ttyx0  ttyy4  ttyz8
tty24  tty42  tty60  ttya9  ttybd  ttyd1  ttye5  ttyp9  ttyqd  ttys1  ttyt5  ttyu9  ttyvd  ttyx1  ttyy5  ttyz9
tty25  tty43  tty61  ttyaa  ttybe  ttyd2  ttye6  ttypa  ttyqe  ttys2  ttyt6  ttyua  ttyve  ttyx2  ttyy6  ttyza


if i run mtflash it read the flash chip

root@slax:~# ./mtflash -l

Name                                 Vendor ID   Device ID   Size      Type
--------------------------------------------------------------------------------
MXIC/Macronix(MX25L2005)             0xC2        0x11        262144    Serial
Winbond/NEX(W25P20/W25X20/NX25P20)   0xEF        0x11        262144    Serial

So how i can find where is my drive?

/DEV/WHAT? i use slax linux ......
Logged
Pages: [1] 2 3