Skip to content

Commit

Permalink
Removed wget dependency for aria2c and attempt at fixing Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
0x11DFE committed Jun 20, 2024
1 parent 99b1702 commit 81793a2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-on-schedule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Install APT packages
uses: daaku/gh-action-apt-install@v4
with:
packages: wget dos2unix zip p7zip aria2
packages: dos2unix zip p7zip aria2

- name: Install Python 3.12
run: |
Expand All @@ -56,8 +56,8 @@ jobs:
- name: Install pip for Python 3.12
run: |
wget https://bootstrap.pypa.io/get-pip.py
sudo python3.12 get-pip.py
aria2c https://bootstrap.pypa.io/get-pip.py
python3.12 get-pip.py
rm get-pip.py
- name: Checkout submodules
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ Effortlessly extract and manage system properties from Pixel OTA updates with th
### Environment Setup & Acquisition

- Ensure a Unix-like environment with **Bash**.
- Install **core utilities**: `dos2unix`, `wget`, `aria2`, `zip`, `unzip`, `p7zip`, `curl`, `jq`, and Python ^3.10.
- Install **core utilities**: `dos2unix`, `aria2`, `zip`, `unzip`, `p7zip`, `curl`, `jq`, and Python ^3.10.
```bash
# Install python3.12
sudo add-apt-repository ppa:deadsnakes/ppa -y
sudo apt-get update
sudo apt-get install python3.12 python3.12-venv python3.12-distutils
# Install python-pip
wget https://bootstrap.pypa.io/get-pip.py && python3.12 get-pip.py && rm get-pip.py
aria2c https://bootstrap.pypa.io/get-pip.py && python3.12 get-pip.py && rm get-pip.py
```

- Clone the project alongside its submodules:
Expand Down
3 changes: 2 additions & 1 deletion download_latest_ota_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,6 @@ for device_name in "$@"; do # Loop over each argument (device name)
done

# Download the build using aria2
aria2c -Z -m0 -x16 -s16 -j16 --enable-rpc=false --optimize-concurrent-downloads=true --disable-ipv6=true --allow-overwrite=true --remove-control-file=true --always-resume=true --download-result=full --summary-interval=0 -d ./dl "${BUILD_URL_LIST[@]}"
# aria2c -Z -m0 -x16 -s16 -j16 --enable-rpc=false --optimize-concurrent-downloads=true --disable-ipv6=true --allow-overwrite=true --remove-control-file=true --always-resume=true --download-result=full --summary-interval=0 -d ./dl "${BUILD_URL_LIST[@]}"
aria2c -d ./dl "${BUILD_URL_LIST[@]}"
print_message "Download complete" info
6 changes: 3 additions & 3 deletions requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ declare PARTITIONS2EXTRACT=("product" "vendor" "system" "system_ext")
[[ $(type -t "print_message") != function ]] && . ./util_functions.sh

# Install required packages and libs
install_packages "wget" "zip" "p7zip" "dos2unix" "aria2" "python3.12"
install_packages "zip" "p7zip" "dos2unix" "aria2" "python3.12"

# Check if python3.12 pip module installed
python3.12 -m pip -V &>/dev/null || print_message "Could not find pip module in python3.12, To fix this issue simply wget and install https://bootstrap.pypa.io/get-pip.py from python3.12" error
python3.12 -m pip -V &>/dev/null || print_message "Could not find pip module in python3.12, To fix this issue simply aria2c and install https://bootstrap.pypa.io/get-pip.py from python3.12" error

# Check if payload_dumper is available
payload_dumper -h &>/dev/null || print_message "Could not find payload_dumper executable. Install it using python3.12 -m pip install payload_dumper/" error

# Install imjtool if not already installed
while [ ! -f "./imjtool" ]; do
print_message "./imjtool not found. Installing imjtool…" info
wget --tries=inf --show-progress -q -O "imjtool" "http://newandroidbook.com/tools/imjtool"
aria2c "http://newandroidbook.com/tools/imjtool"
done

0 comments on commit 81793a2

Please sign in to comment.