Skip to content

Commit

Permalink
reset dalvikvm heapgrowthlimit after execution
Browse files Browse the repository at this point in the history
this made some apps crash until reboot
  • Loading branch information
programminghoch10 committed Dec 12, 2023
1 parent ade02bf commit 8ac60ca
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions magiskmodule/system/bin/revancedcli
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@
[ -z "$MODPATH" ] && MODPATH=/data/adb/modules/revancedrepackaged
echo "modpath = $MODPATH" >&2

#echo " Increase Heap Growth limit from $(getprop dalvik.vm.heapgrowthlimit) to 4096m" >&2
resetprop dalvik.vm.heapgrowthlimit 4096m
HEAPLIMIT="$(getprop dalvik.vm.heapgrowthlimit)"
setHeapLimit() {
[ -z "$1" ] && setHeapLimit "$HEAPLIMIT" && return
#echo " Changing Heap Growth limit from $(getprop dalvik.vm.heapgrowthlimit) to $1" >&2
resetprop dalvik.vm.heapgrowthlimit "$1"
}
setHeapLimit 4096m
trap setHeapLimit EXIT

invoke() {
app_process \
Expand Down

0 comments on commit 8ac60ca

Please sign in to comment.