Skip to content
This repository has been archived by the owner on Mar 6, 2022. It is now read-only.

Instructions for running in docker #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions README-docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Run in Docker
---
To unpack payload.bin we start from the Docker image [continuumio/miniconda](https://hub.docker.com/r/continuumio/miniconda/) to install dependencies via [Miniconda](https://docs.conda.io/en/latest/miniconda.html):
```
docker run --name payload.bin --rm -it \
-v `pwd`"/data":/opt/data \
continuumio/miniconda /bin/bash
```

In the container we install protobuf and clone the project:
```
conda install protobuf --yes
git clone --depth=1 https://github.com/cyxx/extract_android_ota_payload.git /opt/bin
```

Next download and unzip and OTA image, e.g. for [Oneplus](https://www.oneplus.com/de/support/softwareupgrade/):
```
url=https://oxygenos.oneplus.net/OnePlus6Oxygen_22_OTA_034_all_1909112343_31f86cec5f8d4c7b.zip
wget --output-document=/opt/data/image.zip $url
python -m zipfile -e /opt/data/image.zip /opt/data/image
```

And finally unpack the payload.bin:
```
python /opt/bin/extract_android_ota_payload.py /opt/data/image/payload.bin /opt/data/payload
```