-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
+ parallel download support + decryption after download enabled
- Loading branch information
1 parent
dc6296f
commit ea6c68f
Showing
8 changed files
with
903 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Sphinx Documentation | ||
|
||
on: | ||
push: | ||
branches: ["master"] | ||
|
||
jobs: | ||
build-deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Install dependencies | ||
run: pip install -r docs/requirements.txt && pip install -r requirements.txt | ||
|
||
- name: Build | ||
# Create .nojekyll file to disable Jekyll processing | ||
run: | | ||
cd docs | ||
make html | ||
touch build/html/.nojekyll | ||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: docs/build/html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# samloader3 | ||
|
||
Cross plattform Firmware downloader and decryptor for Samsung devices with maximum download speed. | ||
A list of API examples are given in the documentation available at [Github-Pages](https://matrixeditor.github.io/samloader3). | ||
|
||
> [!NOTE] | ||
> This project was formerly hosted at `nlscc/samloader`, and has moved from `samloader/samloader` to an refactored and updated version with enhanced CLI support and an API documentation. | ||
## Installation | ||
|
||
You can easily install it by using the `pip` package manager. | ||
|
||
```console | ||
pip install git+https://github.com/MatrixEditor/samloader3.git | ||
``` | ||
|
||
## CLI | ||
|
||
The interface procided here is separated into two layers. In The first one, one can set basic options, such as the device's country code, model name or a global timeout value. Next, you will | ||
operate on a shell that takes commands with arguments as input. | ||
|
||
```console | ||
$ python3 -m samloader3 -M "SM-A336B" -R "SFR" | ||
(sl3)> # type commands here | ||
``` | ||
|
||
### List firmware information | ||
|
||
Utilizing the `list` command you can list all available firmwares for a specific model within | ||
the selected region. | ||
|
||
> [!NOTE] | ||
> Make sure to always set the device's model name and region code, otherwise you won't get any | ||
> valid results. For simplicity, we don't write the model and region code explicitly. | ||
Using this command without any arguments will result in a table view that displays all available | ||
versions: | ||
|
||
<p align="center"> | ||
|
||
![cmd_list](/docs/cmd_list.png) | ||
|
||
</p> | ||
|
||
> [!TIP] | ||
> If you just want to list the latest firmware use `-l` and if you want to print out the version | ||
> strings only, use `-q`. Using `-v VERSION` you can also view details on one specific version. | ||
|
||
### Download Firmware | ||
|
||
With this updated version of `samloader`, you can download multiple firmware files at one (though, most likely not a real use case) and accelerate to the maximum download speed. Using one version | ||
string from the output before, simply run the following command: | ||
|
||
```console | ||
(sl3)> download -o "/path/to/destination/" "$version1" "$version2" ... | ||
``` | ||
|
||
As these files can be huge, once canceled, the donwload will resume at the current download | ||
position. You can disable that behaviour using `--no-cache`. With a special version identifier (`*`) you can download all firmware binaries at once. | ||
|
||
> [!WARNING] | ||
> Because of some issues with python.rich, parallel download is disabled by default. It can be | ||
> enabled using `--parallel`. | ||
To decrypt files directly after downloading them, use `--decrypt`. | ||
|
||
|
||
## Decrypt Firmware | ||
|
||
The decryption command (`decrypt`) is designd to operate on one file only. You just have | ||
to provide a version number and the file path: | ||
|
||
```console | ||
(sl3)> decrypt -v "$version" "/path/to/firmware.zip.enc4" | ||
``` | ||
|
||
> [!TIP] | ||
> If you only want to generate the decryption key, use `--key-only`. Note that the actual | ||
> key is the MD5 value | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
[project] | ||
name = "samloader3" | ||
version = "1.0.0" | ||
description="Updated implementation of the Samsung-Firmware Downloader (samloader)" | ||
authors = [ | ||
{ name="MatrixEditor", email="not@supported.com" }, | ||
] | ||
readme = "README.md" | ||
classifiers = [ | ||
'Intended Audience :: Science/Research', | ||
'License :: OSI Approved :: MIT License', | ||
|
||
# These versions are subject to be approved | ||
# 'Programming Language :: Python :: 3.8', | ||
# 'Programming Language :: Python :: 3.9', | ||
# 'Programming Language :: Python :: 3.10', | ||
'Programming Language :: Python :: 3.11', | ||
] | ||
|
||
[project.urls] | ||
"Homepage" = "https://github.com/MatrixEditor/samloader3" | ||
"API-Docs" = "https://matrixeditor.github.io/samloader3" | ||
|
||
[project.scripts] | ||
samloader3 = "samloader3.cli:run_with_args" | ||
|
||
[tool.setuptools.packages.find] | ||
where = ["."] | ||
include = ["samloader3*"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
__version__ = "1.0.0" | ||
__authors__ = ("MatrixEditor", ) | ||
__author__ = ", ".join(__authors__) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters