Skip to content

Commit 0f6a257

Browse files
log apk install issues into stderr
1 parent a4865fc commit 0f6a257

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

magiskmodule/customize.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,14 +164,14 @@ APK="$MODPATH"/v4afx.apk
164164
pm list packages | grep -q "^package:$VIPERFXPACKAGE$" && APK_UPGRADE=true || APK_UPGRADE=false
165165
APK_SIZE=$(stat -c %s "$APK")
166166
installAPK() {
167-
pm install --install-location 1 --pkg "$VIPERFXPACKAGE" -S "$APK_SIZE" < "$APK" &>/dev/null
167+
pm install --install-location 1 --pkg "$VIPERFXPACKAGE" -S "$APK_SIZE" < "$APK" >&2
168168
}
169169
installAPK || {
170-
$APK_UPGRADE && pm uninstall -k "$VIPERFXPACKAGE" &>/dev/null
170+
$APK_UPGRADE && pm uninstall -k "$VIPERFXPACKAGE" >&2
171171
APK_UPGRADE=false
172172
installAPK
173173
} || abort "Failed to install V4AFX!"
174-
! $APK_UPGRADE && pm disable "$VIPERFXPACKAGE" &>/dev/null
174+
! $APK_UPGRADE && pm disable "$VIPERFXPACKAGE" >&2
175175

176176
ui_print "- Configuring ViPER4Android"
177177
VIPERFXPREFS="$(pm dump "$VIPERFXPACKAGE" | grep dataDir | head -n 1 | cut -d'=' -f2)"
@@ -189,7 +189,7 @@ set_perm_recursive "$FOLDER" "$VIPERFXPREFSOWNER" sdcard_rw 771 660 u:object_r:s
189189
pm set-permission-flags "$VIPERFXPACKAGE" android.permission.POST_NOTIFICATIONS user-fixed
190190
}
191191
# this disables battery optimization
192-
[ "$API" -ge 30 ] && dumpsys deviceidle whitelist +"$VIPERFXPACKAGE" >/dev/null
192+
[ "$API" -ge 30 ] && dumpsys deviceidle whitelist +"$VIPERFXPACKAGE" >&2
193193
# this disables automatic permissions revoke if unused
194194
[ "$API" -ge 30 ] && appops set --uid "$VIPERFXPACKAGE" AUTO_REVOKE_PERMISSIONS_IF_UNUSED ignore
195195

0 commit comments

Comments
 (0)