Giter Club home page Giter Club logo

random's Introduction

Random projects


2017-01-17: I will be rewriting this for the current iteration of Windows IOT images for all supported devices, and will be only working on the Python 3 version.

ffu2img.py - python script to convert Microsoft FFU files to raw disk images (tested with python 2.7.9) ffu2img.py3 - python script to convert Microsoft FFU files to raw disk images (tested with python 3.4.3)

random's People

Contributors

t0x0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

random's Issues

Use of CurrentBlockDataEntry.dwBlockCount

Hello,

I have a question about your ffutoimg python script.

I don’t understand line 104, when you seek at the location where to copy the data in the final image:

imgfp.seek(CurrentBlockDataEntry.dwBlockCount*FFUStoreHeader.dwBlockSizeInBytes)

Indeed, you use “CurrentBlockDataEntry.dwBlockCount” but, I tried with a FFU (Xiaomi Mi4) and this value is always 0 or 1. Because “FFUStoreHeader.dwBlockSizeInBytes” is always the same, the final value is always the same.

Shouldn't we use “CurrentBlockDataEntry.dwBlockIndex” instead?

Python 2.7.9 Windows - SyntaxError: EOL while scanning string literal

Hello, now using Python 2.7.9 for Windows this error is shown:

D:\raspberry_pi_2\win10_iot\Windows_IoT_Core_RPI2_BUILD
λ python ffu2img.py Flash.ffu Rpi.img
File "ffu2img.py", line 35
logfp.write('Exiting, incorrect signature: "' + signature '")
^
SyntaxError: EOL while scanning string literal

D:\raspberry_pi_2\win10_iot\Windows_IoT_Core_RPI2_BUILD
λ python
Python 2.7.9 (default, Dec 10 2014, 12:24:55) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.

image

Thanks!

ff2img - python 3 does not work, python 2 creates unusable image ?

Tried ff2img.py, ran successfully. Put image file on RPi and it booted to windows screen then went blank.

Tried ff2img.py3, got this error:

GBMacBookPro:diskFormat grahambriggs$ python ffu2img.py3 /Users/grahambriggs/Downloads/Windows_IoT_Core_RPI2_BUILD/Flash.ffu RPiWindows3.img
File "ffu2img.py3", line 94
print((str(iBlock) + ' blocks, ' + str((iBlock*FFUStoreHeader.dwBlockSizeInBytes)/1024) + 'kb written '), end='\r')
^

Thank you

Getting an Error when running this program. Using Python 3.x.x

C:\Users\cmoss\Desktop\WindowsIOT>python ffu2img.py Flash.FFU RPi.IMG
Input File: Flash.FFU
Output File: RPi.IMG
Error: security header signature incorrect.

Also, The pylint in VS 2013 Python tools, wants all the Print statements wrapped in parentheses.

Running with IRON pythong for Raspberry PI2 image resulted in an error.

Hello,

I just tried running the script using the version from commit e667caf

Some environment information:
Windows 8 with iron python 2.7
image to convert: Windows_IoT_Core_RPI2_BUILD

c:\Program Files (x86)\IronPython 2.7\ipy.exe" ffu2img.py Flash.FFU RPi.IMG
Input File: Flash.FFU
Output File: RPi.IMG
Block data entries begin: 0x600f8
Block data entries end: 0x79398
Block data chunks begin: 0x80000
6415 blocks, 821120kb written Traceback (most rec
ent call last):
File "ffu2img.py", line 100, in
File "", line 26, in asdict
File "c:\Program Files (x86)\IronPython 2.7\Lib\collections.py", line 51, in _
init

File "c:\Program Files (x86)\IronPython 2.7\Lib\abc.py", line 151, in subcla
sscheck

File "c:\Program Files (x86)\IronPython 2.7\Lib_weakrefset.py", line 73, in _
contains_
SystemError: Handle is not initialized.

Python 3.4.3 on Windows shows print error

Hello

When I try to convert the Flash.FFU image in Windows with Python 3.4.3, the console (cmder) shows this error:

D:\raspberry_pi_2\win10_iot\Windows_IoT_Core_RPI2_BUILD
λ python ffu2img.py Flash.ffu RPi.IMG
File "ffu2img.py", line 20
print 'Input File: ' + ffupath
^
SyntaxError: Missing parentheses in call to 'print'
image

I will try to run it on Linux.

Thanks.

NOOBS use?

Hello, I'm wondering if this works with the current versions of Windows IoT?

My goal is to make a NOOBS os image from a custom flash.ffu that can be used as a factory restore appliance for a Windows IoT running on RPi3.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.