Giter Club home page Giter Club logo

ragnaroek's Introduction

Ragnaroek

Ragnaroek is a tool for interacting with the bootloaders of Samsung devices.

It's meant to serve as a hackable platform for research into various Samsung bootloader protocols, as well as a replacement for the semi-maintained Heimdall flash tool.

In addition to Heimdall's features, this project also strives to support more obscure use cases. These include dumping memory via upload mode or flashing Samsung smartwatches via wireless download mode.

History

Ragnaroek was started at spline late one night after a multi-hour long futile attempt to hack wireless download mode support into Heimdall.

Project status

Some older devices (Galaxy S3, S5) have working flashing. Some newer devices (e.g. Galaxy A40) have working protocol initialization, but not flashing. Yet others (such as some of the Intel-based Samsung tablets) don't even have that.

Testing of new devices is always appreciated! Just remember that bricking is always a possibility.

Attention: Currently the GUI and flashing via USB instead of Wifi is not supported.

Usage

The CLI's arguments may change frequently, as it's under very active development. Therefore, they're not documented in this README. Instead, look at the tool's help output:

cargo run --bin ragnaroek-cli -- --help

To start the GUI (experimental, missing major features):

cargo run --bin ragnaroek-gui

Compilation

cargo build --all-features --release

Tests

Test coverage of the codebase is currently quite low. Only the Odin archive and PIT parsers are somewhat covered. A test harness for automatically testing against real devices would be appreciated.

To run the tests:

cargo test --all --all-features

Resources

ragnaroek's People

Contributors

casept avatar jrtberlin avatar

Stargazers

 avatar

Watchers

Florent Revest avatar MagneFire avatar  avatar  avatar  avatar

ragnaroek's Issues

SM-A515F PIT dumping is broken

Works in Grimler's Heidmall fork:

SM-A515F-pitdump-heimdall.zip

ragnaroek-cli output:

[DEBUG USB] Connected
[DEBUG DL] Handshaking
[TRACE USB] Send: [0x4F, 0x44, 0x49, 0x4E, ]
[TRACE USB] Recv blocking: [0x4C, 0x4F, 0x4B, 0x45, ]
[DEBUG DL] Handshake OK
[DEBUG SESS] Beginning session
[TRACE CMD] Cmd: SessionStart, Arg1: 0x0, Arg2: 0x4
[TRACE USB] Send: [0x64, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4, <1015 trailing 0's cut>]
[TRACE USB] Recv blocking: [0x64, 0x0, 0x0, 0x0, 0x0, 0x80, 0x3, <1 trailing 0's cut>]
[TRACE CMD] Cmd reply: SessionStart, Arg: 0x38000
[TRACE SESS] Version is newer than 1, negotiating packet size 1048576
[TRACE CMD] Cmd: SessionStart, Arg1: 0x5, Arg2: 0x100000
[TRACE USB] Send: [0x64, 0x0, 0x0, 0x0, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, <1013 trailing 0's cut>]
[TRACE USB] Recv blocking: [0x64, <7 trailing 0's cut>]
[TRACE CMD] Cmd reply: SessionStart, Arg: 0x0
[DEBUG SESS] Negotiated session params: SessionParams { supports_compression: true, proto_version: V3, max_file_part_size: 1048576, max_seq_file_parts: 30, max_seq_size_bytes: 31457280, timeout: 120s }
[INFO  USB] Setting timeout: 120s
[INFO  PIT] Start PIT download
[DEBUG PIT] Initiating PIT download
[TRACE CMD] Cmd: TransferPIT, Arg1: 0x1
[TRACE USB] Send: [0x65, 0x0, 0x0, 0x0, 0x1, <1019 trailing 0's cut>]

A40 hangs when attempting to flash

ragnaroek log:

[DEBUG USB] Connected
[DEBUG DL] Handshaking
[TRACE USB] Send: [0x4F, 0x44, 0x49, 0x4E, ]
[TRACE USB] Recv blocking: [0x4C, 0x4F, 0x4B, 0x45, ]
[DEBUG DL] Handshake OK
[DEBUG SESS] Beginning session
[TRACE CMD] Cmd: SessionStart, Arg1: 0x0, Arg2: 0x4
[TRACE USB] Send: [0x64, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4, <1015 trailing 0's cut>]
[TRACE USB] Recv blocking: [0x64, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, <1 trailing 0's cut>]
[TRACE CMD] Cmd reply: SessionStart, Arg: 0x30000
[TRACE SESS] Version is newer than 1, negotiating packet size 1048576
[TRACE CMD] Cmd: SessionStart, Arg1: 0x5, Arg2: 0x100000
[TRACE USB] Send: [0x64, 0x0, 0x0, 0x0, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, <1013 trailing 0's cut>]
[TRACE USB] Recv blocking: [0x64, <7 trailing 0's cut>]
[TRACE CMD] Cmd reply: SessionStart, Arg: 0x0
[DEBUG SESS] Negotiated session params: SessionParams { supports_compression: false, proto_version: V3, max_file_part_size: 1048576, max_seq_file_parts: 30, max_seq_size_bytes: 31457280, timeout: 120s }
[INFO  USB] Setting timeout: 120s
[INFO  PIT] Start PIT download
[DEBUG PIT] Initiating PIT download
[TRACE CMD] Cmd: TransferPIT, Arg1: 0x1
[TRACE USB] Send: [0x65, 0x0, 0x0, 0x0, 0x1, <1019 trailing 0's cut>]

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.