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

Docker container to overcome Python verion and dependency issues #10

Closed
toastie89 opened this issue Oct 11, 2019 · 2 comments
Closed

Docker container to overcome Python verion and dependency issues #10

toastie89 opened this issue Oct 11, 2019 · 2 comments

Comments

@toastie89
Copy link

Hi! I was running into issues with the Python version and dependencies which I finally fixed by using a Docker container. This might be helpful for others as well?

To unpack payload.bin we start from the Docker image continuumio/miniconda to install dependencies via Miniconda:

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:

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
@toastie89
Copy link
Author

Just opened a pull request to add in documentation #11

@cyxx
Copy link
Owner

cyxx commented Jan 30, 2020

Thanks for this. I am leaving the pull request as that can indeed be useful to others.
Another option, that I use, are "virtual environments".

@cyxx cyxx closed this as completed Jan 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants