Skip to content

dex2oat failure due to linker namespace inaccessibility #217

Closed

Description

@widagdag

Steps to reproduce/复现步骤

  1. When clicking re-optimize on all modules it shows "Optimization failed: return value is empty"
  2. rebooting, reinstalling, or try to turn on-and-off API call protection (just a random though) still same issues

Expected behaviour/预期行为

  1. The app should work normally (optimization done successfully)

Actual behaviour/实际行为

as mentioned, its shows optimization failed: return value is empty

Xposed Module List/Xposed 模块列表

1.Core Patch
2. F*ck for VIP
3. Re:Telegram
4. Telegram Speed Hook
5. TeleVip
6. WaEnhancer

Root implementation/Root 方案

Magisk Alpha 28102 (b7ca73f4-alpha)

System Module List/系统模块列表

Audio Jitter Silencer
Audio misc settings
brutal busybox
compatible-magisk mirroring
Encore Tweaks
PIF
Shamiko
Space saving ahead-of-time
systemless hosts
Tricky Store
TSupport Advance
Universal GMS Doze
Wifi Password Viewer for MMRL
YT Revanced
Zygisk-LSPosed 1.10.1 (7173) (by JingMatrix)
Zygisk Assistant 2.1.4
Zygisk Next 1.2.7
Zygisk Detach 1.19.3

LSPosed version/LSPosed 版本

1.10.1 (7173) latest available Debug version from action

Android version/Android 版本

Android Q (10) Nusantara OS EOL on Redmi 6A (Cactus)

Version requirement/版本要求

Logs/日志

LSPosed_2025-03-05T08_04_55.394.zip

Activity

  1. JingMatrix commented on Mar 5, 2025

    @JingMatrix
    Owner

    Maybe it is a SELinux problem. Please follow these instructions #189 (comment) and #189 (comment) to upload your dex2oat.log and share your output of adb command.

    To fix this problem, please follow this #142 (comment) and upload your avc.log.

  2. JingMatrix commented on Mar 5, 2025

    @JingMatrix
    Owner

    It could also be a problem of your system module Space saving ahead-of-time. Please try disable it.

  3. widagdag commented on Mar 5, 2025

    @widagdag
    Author

    Maybe it is a SELinux problem. Please follow these instructions #189 (comment) and #189 (comment) to upload your dex2oat.log and share your output of adb command.

    To fix this problem, please follow this #142 (comment) and upload your avc.log.

    for the 1st #189 command, the dex2oat.log is showing nothing. Or I do it wrong? (I plug my phone while enabling USB debugging, open platform tools from cmd then do adb start-server, after that I use this command adb logcat -s LSPosedDex2Oat dex2oat64 > dex2oat.log the output are exist but its only show this:
    --------- beginning of system
    --------- beginning of crash
    --------- beginning of main

    while for the 2nd command (adb shell su -c 'ls -aZ /data/adb/modules/zygisk_lsposed/bin') its show this:
    u:object_r:xposed_file:s0 .
    u:object_r:system_file:s0 ..
    u:object_r:dex2oat_exec:s0 dex2oat32
    u:object_r:dex2oat_exec:s0 dex2oat64
    u:object_r:xposed_file:s0 liboat_hook32.so
    u:object_r:xposed_file:s0 liboat_hook64.so

    for the avc.log, i still installing WSL since i've got no linux-installed device at the moment, will upload result later

  4. widagdag commented on Mar 5, 2025

    @widagdag
    Author

    It could also be a problem of your system module Space saving ahead-of-time. Please try disable it.

    already disable but problem still persist. Thanks for your time sir! wait i'll provide the avc.log later. Have a good day

  5. JingMatrix commented on Mar 5, 2025

    @JingMatrix
    Owner

    When you record your dex2oat.log, you should at the some time choose an app to Re-optimize from LSPosed manager.

  6. widagdag commented on Mar 5, 2025

    @widagdag
    Author

    When you record your dex2oat.log, you should at the some time choose an app to Re-optimize from LSPosed manager.

    Apparently, the problem now fixed. The optimization run successfully
    I think it's fixed with the setenforce command, well yes it's become permissive now

    but I'm sorry, unfortunately I can't reproduce the avc.log due to WSL limitation (can't access USB devices)
    I already follow this guide but I doesn't work.
    (*ps. I'm a Noob)

    Will try to search for a linux device to get the avc.log in the right way, I'll sent here ASAP when I get the log.

  7. JingMatrix commented on Mar 5, 2025

    @JingMatrix
    Owner

    You may try: install Termux, grant root permission to it, and run command

    sudo cat /proc/kmsg | grep avc > avc.log
    

    And then try to upload the avc.log file, which should located in some folder of Termux.

    BTW, why do you need WSL? Cannot you run adb directly in Windows?

  8. widagdag commented on Mar 5, 2025

    @widagdag
    Author

    You may try: install Termux, grant root permission to it, and run command

    sudo cat /proc/kmsg | grep avc > avc.log
    

    And then try to upload the avc.log file, which should located in some folder of Termux.

    BTW, why do you need WSL? Cannot you run adb directly in Windows?

    Ah! actually i've already installed and tried that in termux but apparently i'm doing it wrong. I ran su then remove the sudo now its work. the file already exist but the process in termux still not finished (or it won't stop until i forcefully stop it?) I can send it here now, wait

    for the WSL thing, when i run the command it says got a problem with grep and after i googled that, what i got is it's need linux environment so I install WSL as an alternative lol

  9. widagdag commented on Mar 5, 2025

    @widagdag
    Author

    here's the avc.log

    avc.log

    hope its correct

  10. JingMatrix commented on Mar 5, 2025

    @JingMatrix
    Owner

    When you record the log, did you do re-optimize of some app at the same time?

  11. widagdag commented on Mar 5, 2025

    @widagdag
    Author

    I forgot to do that, but now already did. I'll sent the new file now

    avc (1).log

  12. JingMatrix commented on Mar 5, 2025

    @JingMatrix
    Owner

    Please also upload your dex2oat.log as said in #217 (comment).

    You avc.log didn't capture useful information, there might be something wrong.

  13. widagdag commented on Mar 5, 2025

    @widagdag
    Author

    dex2oat.log only show this, again
    --------- beginning of system
    --------- beginning of crash
    --------- beginning of main

    1. open platform-tools through cmd
    2. run adb start-server
    3. adb devices showing successfully
    4. run the adb logcat -s LSPosedDex2Oat dex2oat64 > dex2oat.log while its running on cmd then
    5. open the lsposed, re-optimize some apps, open it, re-optimize again, and so-on
    6. result still same as mentioned above
  14. JingMatrix commented on Mar 5, 2025

    @JingMatrix
    Owner

    I see, SELinux shouldn't be disabled on your device.
    Please run adb shell su -c setenforce 1, and then collect the following logs when you re-optimize an app:

    adb logcat -s LSPosedDex2Oat dex2oat64 > dex2oat.log
    

    and

    adb shell su -c cat /proc/kmsg > avc.log
    

    This time, grep is removed for your convenience.

  15. 4 remaining items

  16. widagdag commented on Mar 5, 2025

    @widagdag
    Author

    Yes I did, even on all lsposed modules installed, i try to re-optimize all of them few times
    it didn't recorded on logs?

  17. JingMatrix commented on Mar 5, 2025

    @JingMatrix
    Owner

    Nope, no useful information found in your logs.
    Please upload your logs generated by LSPosed manager.

  18. widagdag commented on Mar 5, 2025

    @widagdag
    Author

    LSPosed_2025-03-06T04_38_24.322.zip
    I see, it's so strange 😔
    Here's the logs generated from lsposed

  19. JingMatrix commented on Mar 5, 2025

    @JingMatrix
    Owner

    I found the problem: you should use the debug version of LSPosed.

    Try again record the dex2oat.log and upload it. Also upload your LSPosed logs after re-optimize an app,

  20. widagdag commented on Mar 6, 2025

    @widagdag
    Author

    Pardon me, If I remember I already flash the debug version but I dunno (maybe I mistakenly changing by flashing the non-debug version in the middle of the process? because yesterday was so late night) I apologize for such inconvenience

    After I reflash the debug version and re-do the steps, its show new value. Here it is:

    dex2oat.log

    avc.log

    LSPosed_2025-03-06T07_47_09.602.zip

  21. JingMatrix commented on Mar 6, 2025

    @JingMatrix
    Owner

    The crucial part of logs is

    [ 2025-03-06T07:42:58.267    50218: 16010: 16010 D/LSPosedDex2Oat  ] dex2oat.c:94#int main(int, char **): dex2oat wrapper ppid=704
    [ 2025-03-06T07:42:58.268        0:   934:  1196 D/LSPosedDex2Oat  ] Sent fd of /apex/com.android.runtime/bin/dex2oat
    [ 2025-03-06T07:42:58.270        0:   934:  1196 D/LSPosedDex2Oat  ] Sent fd of /data/adb/modules/zygisk_lsposed/bin/liboat_hook64.so
    [ 2025-03-06T07:42:58.270    50218: 16010: 16010 D/LSPosedDex2Oat  ] dex2oat.c:123#int main(int, char **): sock: tmszznhfm7pwevzusc0xba2ba94ocd76 6
    [ 2025-03-06T07:42:58.270    50218: 16010: 16010 D/LSPosedDex2Oat  ] dex2oat.c:142#int main(int, char **): Set env LD_PRELOAD=/proc/16010/fd/7
    [ 2025-03-06T07:42:58.279    50218: 16010: 16010 F/linker          ] CANNOT LINK EXECUTABLE "/apex/com.android.runtime/bin/dex2oat": library "/proc/16010/fd/7" needed or dlopened by "/apex/com.android.runtime/bin/dex2oat" is not accessible for the namespace "(default)"
    

    It is still unclear what the cause for linker namespace inaccessibility yet.

  22. widagdag commented on Mar 7, 2025

    @widagdag
    Author

    Or is this a rom problem?
    Previously using Havoc R rom got no such problem. But I had to downgrade into lower version of rom due to heavy lags that occurred in this potato phone

  23. JingMatrix commented on Mar 7, 2025

    @JingMatrix
    Owner

    Previously before downgrade, what is Android version?

  24. widagdag commented on Mar 7, 2025

    @widagdag
    Author

    It's Android 11, I frequently install new build from github action time-to-time as soon as there's main/core + flashable zip update, but never had this issue before

  25. changed the title [-]Optimization Failed: Return Value is empty[/-] [+]`dex2oat` failure due to linker namespace inaccessibility[/+] on Jul 15, 2025
  26. JingMatrix commented on Jul 31, 2025

    @JingMatrix
    Owner
  27. JingMatrix commented on Jan 22, 2026

    @JingMatrix
    Owner

    @widagdag Please test the latest CI build to see if this problem is solved for you.

  28. widagdag commented on Jan 23, 2026

    @widagdag
    Author

    @widagdag Please test the latest CI build to see if this problem is solved for you.

    Currently my cactus (redmi 6A) was broken (but still have it, need repair) but I'm on ginkgo (redmi note 8) for now
    I'll check if the problem persist or maybe there's another issue. Will report if found any

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions