Skip to content

Commit 250a39f

Browse files
0cwapixincreate
andauthored
fix(magisk): fix magisk download package url and clean up extracts (#227)
Co-authored-by: Pa1NarK <69745008+pixincreate@users.noreply.github.com>
1 parent 7631886 commit 250a39f

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/fetcher.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ function get_latest_version() {
1313
grep -E 'refs/tags/' |
1414
sed 's/refs\/tags\///' |
1515
sort -V |
16-
tail -n1 |
17-
sed 's/canary-//'
16+
tail -n1
1817
)
1918

2019
if [[ GRAPHENEOS[UPDATE_TYPE] == "install" ]]; then
@@ -53,7 +52,7 @@ function get() {
5352
local url="${2}"
5453
local signature_url="${3:-}"
5554

56-
echo "Downloading \`${filename}\`..."
55+
echo "Downloading \`${filename}\` from `${url}`..."
5756

5857
# `my-avbroot-setup` is a special case as it is a git repository
5958
if [[ "${filename}" == "my-avbroot-setup" ]]; then

src/util_functions.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ function check_and_download_dependencies() {
6565
RETRY_COUNT=0 # Reset retry count for magisk
6666
while true; do
6767
# Magisk is an exception as it is an APK and hecne we do the get call directly and verif its existence
68-
get "magisk" "${MAGISK[URL]}/releases/download/canary-${VERSION[MAGISK]}/app-release.apk"
68+
get "magisk" "${MAGISK[URL]}/releases/download/${VERSION[MAGISK]}/app-release.apk"
6969
verify_downloads "magisk"
7070

7171
[[ "${ADDITIONALS[RETRY]}" == "true" ]] && [[ "${RETRY}" == "true" ]] || break
@@ -229,6 +229,9 @@ function patch_ota() {
229229
echo -e "Magisk is not enabled. Skipping...\n"
230230
fi
231231

232+
# Have to clear storage space because, `csig` results in storage runout
233+
rm -rf ${WORKDIR}/extracted/extracts/
234+
232235
# Python command to run the patch script
233236
python ${my_avbroot_setup}/patch.py "${args[@]}"
234237
fi

0 commit comments

Comments
 (0)