get_bootimg_from_payload.bin #26
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
name: get_bootimg_from_payload.bin | |
on: | |
watch: | |
types: [started] | |
env: | |
ROM_URL: https://hugeota.d.miui.com/21.3.31/miui_ALIOTH_21.3.31_25fc8f0d66_11.0.zip | |
TZ: Asia/Shanghai | |
jobs: | |
make: | |
runs-on: ubuntu-latest | |
steps: | |
- name: install Python 3.7 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.7 | |
- name: Initialization environment | |
run: | | |
cd ~ | |
pip install bsdiff4 | |
python -m pip install protobuf | |
- name: Clean Up Disk Space | |
run: | | |
docker rmi `docker images -q` | |
sudo rm -rf /usr/share/dotnet /etc/mysql /etc/php /etc/apt/sources.list.d | |
sudo -E apt-get -y purge azure-cli ghc* zulu* hhvm llvm* firefox google* dotnet* powershell openjdk* mysql* php* | |
sudo -E apt-get -y autoremove --purge | |
sudo -E apt-get clean | |
- name: Clone the tools source code | |
run: | | |
cd ~ | |
git clone https://github.com/vm03/payload_dumper.git | |
- name: Download the ROM | |
run: | | |
cd ~ | |
wget -O rom.zip $ROM_URL | |
- name: unzip the ROM | |
run: | | |
cd ~ | |
unzip rom.zip -d payload_dumper | |
- name: extract the payload.bin | |
run: | | |
cd ~ | |
cd payload_dumper | |
python payload_dumper.py payload.bin | |
- name: Upload the bootimg to WeTransfer | |
run: | | |
cd ~ | |
curl -sL https://git.io/file-transfer | sh | |
./transfer wet ~/payload_dumper/output/boot.img |