Giter VIP home page Giter VIP logo

felix's Introduction

FELix

FELix is a multiplatform tool for Allwinner processors handling FEL and FES protocol written in Ruby

  • Uses libusb1.0 / ruby 2.0+
  • More powerful than fel tool from sunxi-tools

Features

  • Write / read memory
  • Execute the code at address
  • Flash LiveSuit image (at this moment only newer image are supported)
  • Extract single item from LiveSuit image
  • Format the device NAND / Write new MBR
  • Enable NAND
  • Dump/flash single partition
  • Display the device info
  • Reboot the device
  • Boot device using given u-boot

Installation

  1. Install ruby 2.0+ (you can use ruby-installer on Windows)

     $ sudo apt-get install ruby2.0 ruby2.0-dev
     $ sudo ln -sf /usr/bin/ruby2.0 /usr/bin/ruby
     $ sudo ln -sf /usr/bin/gem2.0 /usr/bin/gem
    
  2. Install bundler

     $ gem install bundler
    
  3. Install libraries (Linux only)

     $ sudo apt-get install libusb-1.0.0-dev libffi-dev
    
  4. Run bundler in application directory (You may need to edit Gemfile to match your ruby version)

     $ bundle
    
  5. Switch to FEL mode (adb reboot efex) and install a usb filter (Windows only) over the default USB driver. Use Zadig.

Usage

See (ruby) felix --help for available commands

Howtos

  • Dump/flash single partition

    1. Boot to FES

       $ felix --tofes <firmware.img>
      
    2. Enable NAND

       $ felix --nand on
      
    3. Flash or dump partition

       $ felix --write boot.img --item boot
       $ felix --read boot.img --item boot
      
    4. Disable NAND

       $ felix --nand off
      
  • Write new boot0/boot1 (Warning: this may brick your device if you write incorrect file)

    1. Boot to FES

       $ felix --tofes <firmware.img>
      
    2. Write new boot0 using fes context and boot0 tag

       $ felix --write boot0_nand.fex -c fes -t boot0 -a 0 (for boot1 use boot1 or uboot tag)
      
    3. Optionally reboot device

       $ felix --reboot
      

Issues

As I have limited access to Allwinner devices, I encourage you to report issues you encounter in Issues section. As far I tested the tool on A13, A23, A31, A31s and A83.

Todo

There's a lot of things to do. The most important are:

  • Support for legacy image format (partially done)
    • Boot to FES
    • Flash legacy image
    • Extract legacy image
  • Validation of files before flash
  • Improve error handling (may be troublesome)
  • Separate command for reading/writing NAND partitions
  • Improve speed of libsparse / rc6 algorithm
  • Partitioning support without sunxi_mbr
  • Handle every available FEL/FES command
  • Some kind of GUI

felix's People

Contributors

jankowskib avatar flor1n avatar tigrouzen avatar

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.