2
0
mirror of https://gitlab.com/Nanolx/NanoDroid synced 2024-11-03 23:15:54 +00:00

Patcher: check for supported dalvikvm options

This commit is contained in:
Christopher Roy Bratusek 2019-08-19 19:26:27 +02:00
parent b2029a6196
commit 38012a9611

View File

@ -347,8 +347,16 @@ call_dalvikvm () {
BOOTCLASSES=${BOOTCLASSES}:${jar}
done
DALVIKVM_OPTS="-verbose:gc -verbose:jit -verbose:jni \
-verbose:class -Xnodex2oat -Xnoimage-dex2oat"
supported_opts=$(dalvikvm --help 2>&1)
DALVIKVM_OPTS=""
[[ "${supported_opts}" == *\[no\]dex2oat* ]] && DALVIKVM_OPTS="${DALVIKVM_OPTS} -Xnodex2oat"
[[ "${supported_opts}" == *\[no\]image-dex2oat* ]] && DALVIKVM_OPTS="${DALVIKVM_OPTS} -Xnoimage-dex2oat"
[[ "${supported_opts}" == *verbose:*gc* ]] && DALVIKVM_OPTS="${DALVIKVM_OPTS} -verbose:gc"
[[ "${supported_opts}" == *verbose:*jit* ]] && DALVIKVM_OPTS="${DALVIKVM_OPTS} -verbose:jit"
[[ "${supported_opts}" == *verbose:*jni* ]] && DALVIKVM_OPTS="${DALVIKVM_OPTS} -verbose:jni"
[[ "${supported_opts}" == *verbose:*class* ]] && DALVIKVM_OPTS="${DALVIKVM_OPTS} -verbose:class"
if [ "${ROM_DEX_STATUS}" = "DEODEX" ]; then
/system/bin/dalvikvm \