Giter Site home page Giter Site logo

empressfiona / atj2127decrypt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nfd/atj2127decrypt

0.0 0.0 0.0 264 KB

Decrypt ATJ2127 UPGRADE.HEX firmware update files

License: MIT License

Makefile 0.34% C 48.33% Assembly 32.50% Shell 0.23% Python 18.60%

atj2127decrypt's Introduction

ATJ2127 UPGRADE.HEX decryption

This extracts the files from ATJ2127 UPGRADE.HEX firmware upgrades, such as those used in the Sandisk Clip Sport.

You can compile this version on any 32-bit little-endian system (I think). Note that the code was automatically decompiled using a (custom) tool, and is very ugly.

Installation and setup

make decrypt
./decrypt firmware.hex

Debugging with the original binary

You don't need to do this if everything is working, but if something goes wrong you may wish to double check against the original decryption code. To do that you will need a little-endian MIPS32r2 compatible system. QEmu supports such a system with a command line such as:

qemu-system-mipsel -M malta -m 256 -kernel vmlinux-3.2.0-4-4kc-malta -hda debian_wheezy_mipsel_standard.qcow2 -append "root=/dev/sda1 console=tty0" -no-reboot -nographic -redir tcp:2222::22

Once you have your system running, download musl-libc (http://www.musl-libc.org/), compile and install it. You must do this manually as Debian does not include a statically-linked version of musl. You can then build using 'Makefile.mips'.

Note that by default decrypt.c and the assembly-language code always call the C functions. In the mips binary, two versions of each function are present: an assembly-language version, ending in _asm, and a C version, ending in _c -- so it is easy to switch between them.

Bugs and TODOs:

  • MBREC not correctly decoded.
  • Code is hideous (bug) and needs to be cleaned up from its auto-generated state (todo)

atj2127decrypt's People

Contributors

nfd 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.