XFlash 1.3.1 Released!

This Forum is ment for posting News related to Homebrew on Xbox 360 or Xbox One (No XDK stuff)
Post Reply
Juvenal
Administrator
Administrator
Posts: 20
Joined: Wed Mar 23, 2011 8:50 am
Location: Sleeping, My desk.

XFlash 1.3.1 Released!

Post by Juvenal » Wed Apr 04, 2012 3:09 pm

UPDATE: 1.3.1 has been released, but contains no new features, it simply fixes a dependency error on pyusb.  If you had trouble installing or using 1.3, please update to 1.3.1.  If you have 1.3 already installed and working, then there is no need to update.

You can update with the following command or download and install manually from the attachment on this post

Code: Select all

sudo pip install --upgrade xflash
XFlash is a nandpro alternative written in python.  I have recently updated it to be more robust, and add new features to keep it current with the feature set of nandpro (or closer anyway).  It is rather handy if you don't like to boot into windows to dump/flash a nand.

Features for this release include:

Code: Select all

* read/write/erase all size nands - 16mb, 64mb, 256mb, 512mb
* flash xsvf's to your CPLD (assuming your nandflasher supports that) - Nand-X
* power on/off the console (assuming your nandflasher supports that and is wired correctly)
* supports armV1 and armV3 flashers (where nandpro only supports armV3)
XFlash can be installed via the pypi (Python Package Index) or downloaded directly from here and installed manually.

to install with pip on debian/ubuntu:

Code: Select all

sudo apt-get install python-pip libusb-1.0-0
sudo pip install xflash
'xflash' will then be available on the command line for use

Code: Select all

$xflash --help
usage: xflash [-h] {read,write,erase,xsvf,update,poweroff,poweron} ...

XBox 360 NAND Flasher

optional arguments:
  -h, --help            show this help message and exit

Operations:
  {read,write,erase,xsvf,update,poweroff,poweron}
    read                Dumps an image from the NAND
    write               Writes an image into the NAND
    erase               Erases blocks in the NAND
    xsvf                Flash a CPLD with an xsvf file
    update              Jumps into the bootloader of the NAND Flashing device
                        for updating the firmware
    poweroff            Shuts down the attached XBox 360
    poweron             Powers up the attached XBox 360
detailed usage for each command can be had by executing

Code: Select all

xflash <command> --help
as a quick start, some example commands are below with comments dictating what they do

Code: Select all

# dump the full sized nand to 'nanddump.bin'
$sudo xflash read nanddump.bin

# write the full sized nand from 'nandflash.bin'
$sudo xflash write nandflash.bin

# dump the first 50 blocks worth of nand to shortdump.bin
$sudo xflash read shortdump.bin 0 50

# write the first 50 blocks of nand from image.ecc
$sudo xflash write image.ecc 0 50
Thanks/Credits:

Code: Select all

-Whoever wrote the original XFlash.py script
-Anyone else involved the Free60 Project
-The Makers of NandPro and the PIC Flashing code
-G33KatWork (https://github.com/G33KatWork/XBox-360-AVR-flasher) - for his modifications to XFlash.py
-Juvenal - current author of XFlash 1.3
Attachments
xflash-1.3.1.tar.gz
(5.3 KiB) Downloaded 1450 times
Last edited by Juvenal on Wed Apr 11, 2012 9:01 pm, edited 1 time in total.
Whatnow?

barnhilltrckn

Re: XFlash 1.3 Released!

Post by barnhilltrckn » Thu Apr 05, 2012 10:41 am

Nice :D  Im going to have to try this out soon.

Electron^-

Re: XFlash 1.3.1 Released!

Post by Electron^- » Sat Apr 21, 2012 7:54 am

Thank you for this tool.

I'm trying it on my Fedora14 x64 with python 2.7... It recognize the Olimex via USB, but it goes in error with the following message:

Code: Select all

[mpre@mpre-probook ~]$ sudo xflash read nand.bin
[sudo] password for mpre: 
Traceback (most recent call last):
  File "/usr/bin/xflash", line 9, in <module>
    load_entry_point('xflash==1.3.1', 'console_scripts', 'xflash')()
  File "/usr/lib/python2.7/site-packages/xflash/__init__.py", line 107, in main
    print "Using XFlash @ [%s:%s]" % (xf.dev.bus, xf.dev.address)
AttributeError: 'Device' object has no attribute 'bus'


Anyone can help me to resolve this issues? I'm ready to help in testing.

User avatar
tuxuser
Administrator
Administrator
Posts: 301
Joined: Sat Feb 19, 2011 4:53 pm
Location: Germany
Contact:

XFlash 1.3.1 Released!

Post by tuxuser » Sat Apr 21, 2012 10:33 am

Go for python-usb version 1.0
I have no idea what I am doing but atleast I am trying

Electron^-

Re: XFlash 1.3.1 Released!

Post by Electron^- » Tue Apr 24, 2012 7:09 pm

Thank's for reply.

I've installed pyusb 1.0 but the problem still remain...
I've also tryed version 0.4 without success...

There's anything else which I can try?

PS: I've Python 2.7, could is that the problem?

I've tried on another computer with ubuntu 10.10 and it works but there I've python 2.6...
Last edited by Electron^- on Tue Apr 24, 2012 7:16 pm, edited 1 time in total.

Juvenal
Administrator
Administrator
Posts: 20
Joined: Wed Mar 23, 2011 8:50 am
Location: Sleeping, My desk.

Re: XFlash 1.3.1 Released!

Post by Juvenal » Tue Apr 24, 2012 7:34 pm

Try editing the file /usr/lib/python2.7/site-packages/xflash/__init__.py  you will need sudo access to do that,

Code: Select all

sudo gedit /usr/lib/python2.7/site-packages/xflash/__init__.py
then find line 107 and delete it, save and try running xflash again.  If this solves the problem let me know.

[quote="Electron^-"]
Thank you for this tool.

I'm trying it on my Fedora14 x64 with python 2.7... It recognize the Olimex via USB, but it goes in error with the following message:

Code: Select all

[mpre@mpre-probook ~]$ sudo xflash read nand.bin
[sudo] password for mpre: 
Traceback (most recent call last):
  File "/usr/bin/xflash", line 9, in <module>
    load_entry_point('xflash==1.3.1', 'console_scripts', 'xflash')()
  File "/usr/lib/python2.7/site-packages/xflash/__init__.py", line 107, in main
    print "Using XFlash @ [%s:%s]" % (xf.dev.bus, xf.dev.address)
AttributeError: 'Device' object has no attribute 'bus'


Anyone can help me to resolve this issues? I'm ready to help in testing.
[/quote]
Whatnow?

Electron^-

Re: XFlash 1.3.1 Released!

Post by Electron^- » Tue Apr 24, 2012 8:13 pm

[quote="Juvenal"]
Try editing the file /usr/lib/python2.7/site-packages/xflash/__init__.py  you will need sudo access to do that,

Code: Select all

sudo gedit /usr/lib/python2.7/site-packages/xflash/__init__.py
then find line 107 and delete it, save and try running xflash again.  If this solves the problem let me know.
[/quote]
Thank you, unfortunately now there are more error message:

Code: Select all

[root@mpre-probook xflash-1.3.1]# xflash read nand.bin
Traceback (most recent call last):
  File "/usr/bin/xflash", line 9, in <module>
    load_entry_point('xflash==1.3.1', 'console_scripts', 'xflash')()
  File "/usr/lib/python2.7/site-packages/xflash/__init__.py", line 103, in main
    xf.deviceReset()
  File "/usr/lib/python2.7/site-packages/xflash/XFlash.py", line 46, in deviceReset
    self.dev.reset()
  File "/usr/lib/python2.7/site-packages/usb/core.py", line 565, in reset
    self._ctx.backend.reset_device(self._ctx.handle)
  File "/usr/lib/python2.7/site-packages/usb/_debug.py", line 52, in do_trace
    return f(*args, **named_args)
  File "/usr/lib/python2.7/site-packages/usb/backend/libusb10.py", line 557, in reset_device
    _check(_lib.libusb_reset_device(dev_handle))
  File "/usr/lib/python2.7/site-packages/usb/backend/libusb10.py", line 357, in _check
    raise USBError(_str_error[retval.value])
usb.core.USBError: Entity not found
I've tried to install python 2.6, but it miss every module and it's unusable.

Juvenal
Administrator
Administrator
Posts: 20
Joined: Wed Mar 23, 2011 8:50 am
Location: Sleeping, My desk.

Re: XFlash 1.3.1 Released!

Post by Juvenal » Tue Apr 24, 2012 8:19 pm

pyusb is installed for sure, but are you sure libusb is installed on the system?

run this and post here what it returns

Code: Select all

whereis libusb.so
if that doesnt find anything, you need to install the libusb rpm from fedora.
Whatnow?

Electron^-

Re: XFlash 1.3.1 Released!

Post by Electron^- » Wed Apr 25, 2012 7:45 am

I've installed libusb at first...

I've tried also to install the the i386 package but the problem still be here...

I've 2 version of libusb installed, 0.1 (libusb) and 1.0 (libusb1).
Could be that the problem?

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests