[Magisk] Aqq123:
[MENTION=4187311]Setialpha[/MENTION] I really appreciate all your work on this, and the frequent updates. I'm using the microG builds but wanted to check out the new patcher NanoDroid-patcher-18.0_beta1+vdex_7.zip so I tried running it on a clean device with just lineage-15.1-20180828-nightly-whyred-signed.zip (the latest official build at the moment) and Magisk-v16.7.zip installed. Deodexing works but the patch afterwards fails:

> Android 7.0 - 9.0 (SDK 27) detected
> device architecture: arm64
[...]
>> deodexing services.jar [VDEX]
[...]
[INFO] 1 out of 1 Vdex files have been processed
[INFO] 1 Dex files have been extracted in total
[INFO] Extracted Dex files are available in '/dev/tmp/install/dexpatcher'
[...]
adding: classes.dex (deflated 55%)
>> patching services.jar
CANNOT LINK EXECUTABLE "/system/bin/patchoat": "/system/lib64/libbase.so" is 64-bit instead of 32-bit
libc: CANNOT LINK EXECUTABLE "/system/bin/patchoat": "/system/lib64/libbase.so" is 64-bit instead of 32-bit
libc: Fatal signal 6 (SIGABRT), code -6 in tid 748 (patchoat), pid 748 (patchoat)

Removing LD_LIBRARY_PATH altogether from the call to dalvik-vm in CommonPatcher:430 ends up with just the same error, and with manual override to the 32-bit library paths (LD_LIBRARY_PATH="/system/lib:/system/vendor/lib:/vendor/lib" instead of ${C_LD}) also fails but in a different way:

CANNOT LINK EXECUTABLE "/system/bin/dalvikvm": "/system/lib/libnativehelper.so" is 32-bit instead of 64-bit
libc: CANNOT LINK EXECUTABLE "/system/bin/dalvikvm": "/system/lib/libnativehelper.so" is 32-bit instead of 64-bit
libc: Fatal signal 6 (SIGABRT), code -6 in tid 766 (dalvikvm), pid 766 (dalvikvm)

For the record, the libbase.so variants on the device are:

-rw-r--r-- 1 root root 67296 Jan 1 2009 /system/lib/libbase.so
-rw-r--r-- 1 root root 67296 Jan 1 2009 /vendor/lib/vndk-sp/libbase.so
-rwxr-x--- 1 root root 68816 Aug 23 16:52 /sbin/libbase.so
-rw-r--r-- 1 root root 68816 Jan 1 2009 /system/lib64/libbase.so
-rw-r--r-- 1 root root 68816 Jan 1 2009 /vendor/lib64/vndk-sp/libbase.so

The process does seem to work with the binaries you provided if I do it manually. Both the deodexing:

adb push vdexExtractor.arm64 /tmp/vdexExtractor

adb push zip.arm /tmp/zip

adb shell chmod a+x /tmp/vdexExtractor /tmp/zip

adb shell /tmp/vdexExtractor --debug=4 --file-override --ignore-crc-error --input=/system/framework/oat/arm64/services.vdex

adb shell mv -f /system/framework/oat/arm64/services.apk_classes.dex /system/framework/oat/arm64/classes.dex

adb shell /tmp/zip -j -m -v /system/framework/services.jar /system/framework/oat/arm64/classes.dex

And the patch:

adb push dexpatcher.dex /tmp

adb push hook_7.0-9.0_services.jar.dex /tmp

adb shell "/system/bin/dalvikvm -Xbootclasspath:$(ls -1 /system/framework/*.jar | tr $'\n' ':') -classpath /tmp/dexpatcher.dex lanchon.dexpatcher.Main --api-level 27 --debug --multi-dex-threaded --output /tmp --verbose /system/framework/services.jar /tmp/hook_7.0-9.0_services.jar.dex"

adb shell /tmp/zip -j -m -v /system/framework/services.jar /tmp/classes*.dex

Sorry I haven't figured out the full solution but I thought maybe it helps someone if I share a partial one here.