Patcher: add baksmali 2.2.2 for use with SDK < 26 / use baksmali dev-build for SDK >= 26

merge-requests/23/head
Christopher Roy Bratusek 6 years ago
parent d18b32b807
commit e9a818dbc6

@ -91,11 +91,7 @@ NanoDroid officially supports the following Android versions:
* 7.0 / SDK 24 (Nougat)
* 7.1 / SDK 25 (Nougat)
* 8.0 / SDK 26 (Oreo)
* Patchers works, if you've previously manually deodexed services.jar
* [> Deodex Instructions](doc/DeodexServices.md)
* 8.1 / SDK 27 (Oreo)
* Patchers works, if you've previously manually deodexed services.jar
* [> Deodex Instructions](doc/DeodexServices.md)
* 9.0 / SDK 28 (Pie)
* Google Sync Adapters are not (yet) available
* Patchers works

@ -109,7 +109,6 @@ increase_module_version () {
dalvikize_jar () {
if [[ -f ${1} ]]; then
${ANDROID_HOME}/build-tools/27.0.3/dx --dex \
--min-sdk-version=26 \
--output="$(basename "${1}" .jar).dex" \
"${1}"
fi

@ -246,6 +246,14 @@ detect_sdk () {
[ "${SDK_VERSION}" -lt 16 ] && \
error " !! Android versions before Jelly Bean are not supported"
if [ "${SDK_VERSION}" -gt 25 ]; then
BAKSMALI="${BASEDIR}/baksmali_26.dex"
SMALI="${BASEDIR}/smali_26.dex"
else
BAKSMALI="${BASEDIR}/baksmali_25.dex"
SMALI="${BASEDIR}/smali_25.dex"
fi
if [ "${SDK_VERSION}" -lt 24 ]; then
ui_print " > Android 4.1 - 6.0 (SDK ${SDK_VERSION}) detected"
PATCH_HOOK="${BASEDIR}/hook_4.1-6.0_services.jar.dex"
@ -388,7 +396,7 @@ patch_services () {
ui_print " [1] baksmali services/classes.dex"
LD_LIBRARY_PATH=${C_LD} \
/system/bin/dalvikvm \
-classpath "${BASEDIR}/baksmali.dex" \
-classpath "${BAKSMALI}" \
org.jf.baksmali.Main \
x "${BASEDIR}/services.jar-mod/classes.dex" \
-b "/system/framework/${ARCH}/boot.oat" \
@ -399,7 +407,7 @@ patch_services () {
ui_print " [2] smali services/classes.dex"
LD_LIBRARY_PATH=${C_LD} \
/system/bin/dalvikvm \
-classpath "${BASEDIR}/smali.dex" \
-classpath "${SMALI}" \
org.jf.smali.Main \
a "${BASEDIR}/services.jar-deodex" \
-o "${BASEDIR}/services.jar-deodex/classes.dex" || \

Binary file not shown.
Loading…
Cancel
Save