Skip to content

Conversation

@JingMatrix
Copy link
Owner

Let us simply first disable oat hook to debug issues #217 #349 #391.

We need testers to confirm if recent problems of `dex2oat` are caused by the `oat` hook.
@JingMatrix
Copy link
Owner Author

@widagdag, @mineketchup, @grandpajive, @44C38B8

Please test CI builds under this working-in-progress pull-requests:

  1. Flash current testing build (debug version): https://github.com/JingMatrix/LSPosed/actions/runs/17439097613 and reboot
  2. Test if De-optimize function in the LSPosed manager context menu is working
  3. No matter if it works, upload the logs generated by the manager after the above test

@grandpajive
Copy link

I was able to successfully re-optimize with this build.

Logs are attached.
LSPosed_2025-09-03T12_19_42.009474.zip

@JingMatrix
Copy link
Owner Author

@grandpajive Are you sure? From the logs, dex2oat crashes and produces a lot of errors.
Please reboot and redo the experiment.
If possible, please disable all unrelated modules.

[ 2025-09-03T22:12:41.905     1082: 19202: 19202 I/dex2oat64       ] isSwordfishLaunchAppEnabled_ 1 isSwordfishInstallAppEnabled_ 1
[ 2025-09-03T22:12:41.906     1082: 19202: 19202 W/dex2oat64       ] Obsolete flag --compact-dex-level ignored
[ 2025-09-03T22:12:41.907     1082: 19202: 19202 I/dex2oat64       ] /apex/com.android.art/bin/dex2oat64 --output-vdex-fd=8 --class-loader-context-fds=10:11:12 --class-loader-context=PCL[]{PCL[/system/framework/org.apache.http.legacy.jar]#PCL[/system_ext/framework/androidx.window.extensions.jar]#PCL[/system_ext/framework/androidx.window.sidecar.jar]} --classpath-dir=/data/app/~~I3MBu51WB67RtXA5k9GElA==/com.heytap.pictorial-f6PqXJc0pCSyl-5gzR5QWg== --input-vdex-fd=13 --compiler-filter=verify --compilation-reason=cmdline --compact-dex-level=none --max-image-block-size=524288 --resolve-startup-const-strings=true --generate-mini-debug-info -j4 --comments=app-name:com.heytap.pictorial,app-version-name:40.9.49.1,app-version-code:500094910,art-version:352090000 --inline-max-code-units=0
[ 2025-09-03T22:12:41.990     1082: 19202: 19202 I/dex2oat64       ] Using CollectorTypeCMC GC.
[ 2025-09-03T22:12:41.990     1082: 19202: 19202 E/dex2oat64       ] Error reading named image component header for /system/framework/boot.art, error: Failed to open oat file '/system/framework/arm64/boot.oat' when validating it for image '/system/framework/boot.art': In oat file '/system/framework/boot.oat': truncated oat header, size = 3909992 < 68 + 2019913825
[ 2025-09-03T22:12:41.990     1082: 19202: 19202 E/dex2oat64       ] Could not create image space with image file '/system/framework/boot.art:/system/framework/boot-framework-adservices.art'. Attempting to fall back to imageless running. Error was: Failed to open oat file '/system/framework/arm64/boot.oat' when validating it for image '/system/framework/boot.art': In oat file '/system/framework/boot.oat': truncated oat header, size = 3909992 < 68 + 2019913825
[ 2025-09-03T22:12:41.990     1082: 19202: 19202 W/dex2oat64       ] Bump pointer space is not aligned to 2048KB. This can lead to longer stop-the-world pauses for compaction
[ 2025-09-03T22:12:42.180     1082: 19202: 19202 I/dex2oat64       ] isSwordfishLaunchAppEnabled_ 1 isSwordfishInstallAppEnabled_ 1
[ 2025-09-03T22:12:42.195     1082: 19202: 19202 I/dex2oat64       ] Large app, accepted running with swap.
[ 2025-09-03T22:12:42.618     1082: 19202: 19202 I/dex2oat64       ] FastVerify is ok, finish verify and return
[ 2025-09-03T22:12:42.666     1082: 19202: 19214 F/libc            ] Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xfd00000000000478 in tid 19214 (Mini-debug-info), pid 19202 (dex2oat)
[ 2025-09-03T22:12:42.708     1082: 19217: 19217 F/DEBUG           ] Process name is /apex/com.android.art/bin/dex2oat64 --zip-fd=6 --zip-location=/data/app/~~I3MBu51WB67RtXA5k9GElA==/com.heytap.pictorial-f6PqXJc0pCSyl-5gzR5QWg==/base.apk --oat-fd=7 --oat-location=/data/app/~~I3MBu51WB67RtXA5k9GElA==/com.heytap.pictorial-f6PqXJc0pCSyl-5gzR5QWg==/oat/arm64/base.odex --output-vdex-fd=8 --swap-fd=9 --class-loader-context-fds=10:11:12 --class-loader-context=PCL[]{PCL[/system/framework/org.apache.http.legacy.jar]#PCL[/system_ext/framework/androidx.window.extensions.jar]#PCL[/system_ext/framework/androidx.window.sidecar.jar]} --classpath-dir=/data/app/~~I3MBu51WB67RtXA5k9GElA==/com.heytap.pictorial-f6PqXJc0pCSyl-5gzR5QWg== --input-vdex-fd=13 --instruction-set=arm64 --instruction-set-features=default --instruction-set-variant=oryon --compiler-filter=verify --compilation-reason=cmdline --compact-dex-level=none --max-image-block-size=524288 --resolve-startup-const-strings=true --generate-mini-debug-info --runtime-arg -Xtarget-sdk-version:34 --runtime-arg -Xhidden-api-policy:enabled -j4 --runtime-arg -Xms64m --runtime-arg -Xmx512m --comments=app-name:com.heytap.pictorial,app-version-name:40.9.49.1,app-version-code:500094910,art-version:352090000 --inline-max-code-units=0, uid is 1082, not key_process
[ 2025-09-03T22:12:42.708     1082: 19217: 19217 F/DEBUG           ] keyProcess: 0
[ 2025-09-03T22:12:42.708     1082: 19217: 19217 F/DEBUG           ] *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
[ 2025-09-03T22:12:42.708     1082: 19217: 19217 F/DEBUG           ] Build fingerprint: 'OnePlus/PKX110/OP60F5L1:15/AP3A.240617.008/V.2706437-826238-836968:user/release-keys'
[ 2025-09-03T22:12:42.708     1082: 19217: 19217 F/DEBUG           ] Revision: '0'
[ 2025-09-03T22:12:42.708     1082: 19217: 19217 F/DEBUG           ] ABI: 'arm64'
[ 2025-09-03T22:12:42.708     1082: 19217: 19217 F/DEBUG           ] Timestamp: 2025-09-03 22:12:42.688209281+0800
[ 2025-09-03T22:12:42.708     1082: 19217: 19217 F/DEBUG           ] Process uptime: 2s
[ 2025-09-03T22:12:42.708     1082: 19217: 19217 F/DEBUG           ] Cmdline: /apex/com.android.art/bin/dex2oat64 --zip-fd=6 --zip-location=/data/app/~~I3MBu51WB67RtXA5k9GElA==/com.heytap.pictorial-f6PqXJc0pCSyl-5gzR5QWg==/base.apk --oat-fd=7 --oat-location=/data/app/~~I3MBu51WB67RtXA5k9GElA==/com.heytap.pictorial-f6PqXJc0pCSyl-5gzR5QWg==/oat/arm64/base.odex --output-vdex-fd=8 --swap-fd=9 --class-loader-context-fds=10:11:12 --class-loader-context=PCL[]{PCL[/system/framework/org.apache.http.legacy.jar]#PCL[/system_ext/framework/androidx.window.extensions.jar]#PCL[/system_ext/framework/androidx.window.sidecar.jar]} --classpath-dir=/data/app/~~I3MBu51WB67RtXA5k9GElA==/com.heytap.pictorial-f6PqXJc0pCSyl-5gzR5QWg== --input-vdex-fd=13 --instruction-set=arm64 --instruction-set-features=default --instruction-set-variant=oryon --compiler-filter=verify --compilation-reason=cmdline --compact-dex-level=none --max-image-block-size=524288 --resolve-startup-const-strings=true --generate-mini-debug-info --runtime-arg -Xtarget-sdk-version:34 --runtime-arg -Xhidden-api-policy:enabled -j4 --runtime-arg -Xms64m --runtime-arg -Xmx512m --comments=app-name:com.heytap.pictorial,app-version-name:40.9.49.1,app-version-code:500094910,art-version:352090000 --inline-max-code-units=0
[ 2025-09-03T22:12:42.708     1082: 19217: 19217 F/DEBUG           ] pid: 19202, tid: 19214, name: Mini-debug-info  >>> /apex/com.android.art/bin/dex2oat64 <<<
[ 2025-09-03T22:12:42.708     1082: 19217: 19217 F/DEBUG           ] uid: 1082
[ 2025-09-03T22:12:42.708     1082: 19217: 19217 F/DEBUG           ] tagged_addr_ctrl: 0000000000000001 (PR_TAGGED_ADDR_ENABLE)
[ 2025-09-03T22:12:42.708     1082: 19217: 19217 F/DEBUG           ] pac_enabled_keys: 000000000000000f (PR_PAC_APIAKEY, PR_PAC_APIBKEY, PR_PAC_APDAKEY, PR_PAC_APDBKEY)
[ 2025-09-03T22:12:42.708     1082: 19217: 19217 F/DEBUG           ] signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xfd00000000000478
[ 2025-09-03T22:12:42.708     1082: 19217: 19217 F/DEBUG           ]     x0  0000000000000022  x1  0000000000003000  x2  00000000000001cd  x3  0000000000000022
[ 2025-09-03T22:12:42.708     1082: 19217: 19217 F/DEBUG           ]     x4  0000000000000000  x5  0000000000000011  x6  0000000000000000  x7  0000000000000000
[ 2025-09-03T22:12:42.708     1082: 19217: 19217 F/DEBUG           ]     x8  fd00000000000440  x9  fd00000000000440  x10 0000000000000008  x11 0000000000002fff
[ 2025-09-03T22:12:42.708     1082: 19217: 19217 F/DEBUG           ]     x12 0000000000000038  x13 000000000000000d  x14 aaaaaaaaaaaaaaab  x15 000000734040b1b0
[ 2025-09-03T22:12:42.708     1082: 19217: 19217 F/DEBUG           ]     x16 00000073f83e5f08  x17 00000073f837de8c  x18 0000007338e34000  x19 0000000000003000
[ 2025-09-03T22:12:42.708     1082: 19217: 19217 F/DEBUG           ]     x20 0000000000003000  x21 00000073f1ecc180  x22 00000073f1ecc188  x23 0000000000003000
[ 2025-09-03T22:12:42.708     1082: 19217: 19217 F/DEBUG           ]     x24 fd00000000000000  x25 0000007338ffbf80  x26 b400007335e0d0a0  x27 0000000000000000
[ 2025-09-03T22:12:42.708     1082: 19217: 19217 F/DEBUG           ]     x28 0000007338ffb888  x29 0000007338ffb380
[ 2025-09-03T22:12:42.708     1082: 19217: 19217 F/DEBUG           ]     lr  00000073f833c5e0  sp  0000007338ffb340  pc  00000073f833c164  pst 0000000080001000
[ 2025-09-03T22:12:42.708     1082: 19217: 19217 F/DEBUG           ] 13 total frames
[ 2025-09-03T22:12:42.708     1082: 19217: 19217 F/DEBUG           ] backtrace:
[ 2025-09-03T22:12:42.708     1082: 19217: 19217 F/DEBUG           ]   NOTE: Function names and BuildId information is missing for some frames due
  NOTE: to unreadable libraries. For unwinds of apps, only shared libraries
  NOTE: found under the lib/ directory are readable.
  NOTE: On this device, run setenforce 0 to make the libraries readable.
  NOTE: Unreadable libraries:
  NOTE:   /apex/com.android.art/bin/dex2oat64
[ 2025-09-03T22:12:42.708     1082: 19217: 19217 F/DEBUG           ]       #00 pc 0000000000063164  /apex/com.android.runtime/lib64/bionic/libc.so (je_malloc+220) (BuildId: 7c0e50df90e96ccb96f72b8661b3677b)
[ 2025-09-03T22:12:42.708     1082: 19217: 19217 F/DEBUG           ]       #01 pc 000000000004e850  /apex/com.android.runtime/lib64/bionic/libc.so (malloc+72) (BuildId: 7c0e50df90e96ccb96f72b8661b3677b)
[ 2025-09-03T22:12:42.708     1082: 19217: 19217 F/DEBUG           ]       #02 pc 00000000000197f4  /apex/com.android.art/lib64/liblzma.so (LzmaEnc_AllocAndInit+672) (BuildId: 36fa3eca0d2526991e2d42f9bd27f6da)
[ 2025-09-03T22:12:42.708     1082: 19217: 19217 F/DEBUG           ]       #03 pc 0000000000015bbc  /apex/com.android.art/lib64/liblzma.so (Lzma2Enc_Encode2+404) (BuildId: 36fa3eca0d2526991e2d42f9bd27f6da)
[ 2025-09-03T22:12:42.708     1082: 19217: 19217 F/DEBUG           ]       #04 pc 0000000000024af4  /apex/com.android.art/lib64/liblzma.so (XzEnc_Encode+1192) (BuildId: 36fa3eca0d2526991e2d42f9bd27f6da)
[ 2025-09-03T22:12:42.708     1082: 19217: 19217 F/DEBUG           ]       #05 pc 0000000000025060  /apex/com.android.art/lib64/liblzma.so (Xz_Encode+244) (BuildId: 36fa3eca0d2526991e2d42f9bd27f6da)
[ 2025-09-03T22:12:42.708     1082: 19217: 19217 F/DEBUG           ]       #06 pc 0000000000c62b44  /apex/com.android.art/lib64/libart.so (art::XzCompress(art::ArrayRef<unsigned char const>, std::__1::vector<unsigned char, std::__1::allocator<unsigned char>>*, int, unsigned long)+224) (BuildId: 420f4eae3f8d7bc30ec7b85fd31e01d7)
[ 2025-09-03T22:12:42.708     1082: 19217: 19217 F/DEBUG           ]       #07 pc 000000000073e548  /apex/com.android.art/lib64/libart.so (std::__1::vector<unsigned char, std::__1::allocator<unsigned char>> art::debug::MakeMiniDebugInfoInternal<art::ElfTypes64>(art::InstructionSet, art::InstructionSetFeatures const*, art::ElfTypes64::Addr, unsigned long, art::ElfTypes64::Addr, unsigned long, art::debug::DebugInfo const&) (.__uniq.339465620920129914816466203913438088973)+448) (BuildId: 420f4eae3f8d7bc30ec7b85fd31e01d7)
[ 2025-09-03T22:12:42.708     1082: 19217: 19217 F/DEBUG           ]       #08 pc 000000000009ab84  /apex/com.android.art/bin/dex2oat64
[ 2025-09-03T22:12:42.708     1082: 19217: 19217 F/DEBUG           ]       #09 pc 000000000047a8d0  /apex/com.android.art/lib64/libart.so (art::ThreadPoolWorker::Run()+308) (BuildId: 420f4eae3f8d7bc30ec7b85fd31e01d7)
[ 2025-09-03T22:12:42.708     1082: 19217: 19217 F/DEBUG           ]       #10 pc 000000000065829c  /apex/com.android.art/lib64/libart.so (art::ThreadPoolWorker::Callback(void*)+168) (BuildId: 420f4eae3f8d7bc30ec7b85fd31e01d7)
[ 2025-09-03T22:12:42.708     1082: 19217: 19217 F/DEBUG           ]       #11 pc 00000000000a3f28  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+196) (BuildId: 7c0e50df90e96ccb96f72b8661b3677b)
[ 2025-09-03T22:12:42.708     1082: 19217: 19217 F/DEBUG           ]       #12 pc 000000000009638c  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+68) (BuildId: 7c0e50df90e96ccb96f72b8661b3677b)

@grandpajive
Copy link

You're right.

I rebooted and re-optimized one module. It was successful without the dex2oat errors.
Attaching log.
LSPosed_2025-09-03T12_40_39.450845.zip

@JingMatrix
Copy link
Owner Author

@grandpajive This time the log is correct. However, you installed the release build from GitHub Actions.
Could you please flash the debug build from GitHub Actions, and redo the test, then upload logs.
Thanks for helping the debugging process.

@grandpajive
Copy link

grandpajive commented Sep 3, 2025 via email

@44C38B8
Copy link

44C38B8 commented Sep 3, 2025

用了这个版本后,问题似乎得到了解决,现在LSPosed管理器和LuckyTool中都提示可以正常优化dex。然而我在日志中还是发现了一些dex2oat错误。以下是日志:
LSPosed_2025-09-04T07_51_52.541016.zip

@44C38B8
Copy link

44C38B8 commented Sep 4, 2025

补充:一些模块功能依旧不正常

@JingMatrix
Copy link
Owner Author

@44C38B8 Please specify which modules are not working properly, more details are preferred.
Also, it would be helpful to compared with the behavior of dex2oat of LSPosed-IT version. Please flash it, start logging

adb logcat -s Magisk lspd nativeloader AndroidRuntime LSPosed LSPosed-Bridge LSPlant LSPosedContext LSPlt LSPosedService Dobby '*:F' zygiskd64 zygisk-core64 zygisk-ptrace64 zygiskd32 zygisk-core32 zygisk-ptrace32 dex2oat64 dex2oat32 LSPosedDex2Oat > lsposed.log

do your test with modules or the De-optimize context menu, then stop the logcat via Ctrl+C and finally upload lsposed.log.

@mineketchup
Copy link

Re-optimize shows no error with this build

Log:
LSPosed_2025-09-04.zip

@44C38B8
Copy link

44C38B8 commented Sep 4, 2025

似乎是对系统app进行hook的模块都不正常,如luckytool和FKcolorOS,对第三方app进行hook的模块正常工作,如哔哩漫游。
我用LSPosed-it在luckytool中执行了一次优化,又在LSPosed管理器中对软件更新进行了一次重新优化。以下是logcat日志
lsposed.log.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants