RikkaApps/Riru

Attempt to self unload [Bug]

greyblue9 opened this issue · 0 comments

This is a bug of Riru itself

  • This is a bug of Riru, not a bug of a Riru module or something else

Other modules are disabled

  • Except Riru itself, all other Magisk modules are disabled

Zygisk are disabled

  • I know that Zygisk and Riru are not compatible and Zygisk has been disabled

Riru version

riru-v26.1.3.r517.f0b04c6463-debug

Android version

12

Device

Pixel 5

Describe the bug

I'm sorry, I don't know how to reproduce the bug without keeping other modules loaded (riru clipboard whitelist and LSPosed); but I wanted to see if this is potentially a bug or expected behavior.

I use an LSPosed module ("Always Correct") to enable input prediction in terminal apps, because I have many strings saved to make it easier to enter common commands. I noticed that the first time I open a terminal app, everything works as expected. But if I switch to a different app and then switch back, the prediction is no longer active.

I looked at my logcat and saw a message "attempt to self unload' logged by Riru. To check if that was the issue, I forked the Riru repository and made some simple edits to entry.cpp to disable unloading. After installing the modified version, everything is working as expected. You can see that Entry::Unload(jboolean is_child_zygote) is still called for both modules, because Riru logs "unload is not allow for this process", for each module.

The reason I'm assuming it might be a Riru bug is that two quite different modules seem to be doing the same thing, and if I patch Riru to disallow unloading, it works fine. Never had the issue when running Android 11. Thanks.

Relevant logs

--------- beginning of main
11-10 08:14:30.230 24458 24458 E opjohnwu.magis: Not starting debugger since process cannot load the jdwp agent.
11-10 08:14:30.231 24458 24458 D Riru64  : hooks restored
11-10 08:14:30.231 24458 24458 D Riru64  : riru_lsposed@lspd: specializeAppProcessPost
11-10 08:14:30.231 24458 24458 D ProcessState: Binder ioctl to enable oneway spam detection failed: Invalid argument
11-10 08:14:30.235 24458 24458 D LSPosed : skipped com.topjohnwu.magisk
11-10 08:14:30.235 24458 24458 D Riru64  : riru_clipboard_whitelist@clipboard_whitelist: unload is not allow for this process
11-10 08:14:30.235 24458 24458 D Riru64  : riru_lsposed@lspd: unload is not allow for this process
11-10 08:14:30.251 24458 24458 D CompatibilityChangeReporter: Compat change id reported: 171979766; UID 10155; state: ENABLED
11-10 08:14:30.290 24458 24458 V GraphicsEnvironment: ANGLE Developer option for 'com.topjohnwu.magisk' set to: 'default'
11-10 08:14:30.290 24458 24458 V GraphicsEnvironment: Neither updatable production driver nor prerelease driver is supported.
11-10 08:14:30.290 24458 24458 D NetworkSecurityConfig: No Network Security Config specified, using platform default
11-10 08:14:30.290 24458 24458 D NetworkSecurityConfig: No Network Security Config specified, using platform default
11-10 08:14:30.295 24458 24458 W libc    : Access denied finding property "ro.virtual_ab.enabled"
11-10 08:14:30.295 24458 24458 W opjohnwu.magisk: type=1400 audit(0.0:2349): avc: denied { read } for name="u:object_r:virtual_ab_prop:s0" dev="tmpfs" ino=12491 scontext=u:r:untrusted_app:s0:c155,c256,c512,c768 tcontext=u:object_r:virtual_ab_prop:s0 tclass=file permissive=0 app=com.topjohnwu.magisk
11-10 08:14:30.296 24458 24458 D CompatibilityChangeReporter: Compat change id reported: 1531297613045645771; UID 10155; state: DISABLED
11-10 08:14:30.296 24458 24458 D CompatibilityChangeReporter: Compat change id reported: 7528921493777479941; UID 10155; state: DISABLED
11-10 08:14:30.310 24458 24478 D vulkan  : searching for layers in '/data/app/~~pBA1iD2tHBeK6uLoNHsM3Q==/com.topjohnwu.magisk-QJrX2S7HfuuQyxEo8YvUZw==/lib/arm64'
11-10 08:14:30.310 24458 24458 W opjohnwu.magis: Accessing hidden field Ljava/util/Collections$SynchronizedCollection;->mutex:Ljava/lang/Object; (max-target-o, reflection, denied)
11-10 08:14:30.310 24458 24458 W opjohnwu.magis: Accessing hidden method Ljava/util/Collections$SynchronizedSet;-><init>(Ljava/util/Set;Ljava/lang/Object;)V (max-target-o, reflection, denied)
11-10 08:14:30.310 24458 24478 D vulkan  : searching for layers in '/data/app/~~pBA1iD2tHBeK6uLoNHsM3Q==/com.topjohnwu.magisk-QJrX2S7HfuuQyxEo8YvUZw==/base.apk!/lib/arm64-v8a'
11-10 08:14:30.310 24458 24458 W opjohnwu.magis: Accessing hidden method Ljava/util/Collections$SynchronizedCollection;-><init>(Ljava/util/Collection;Ljava/lang/Object;)V (max-target-o, reflection, denied)
11-10 08:14:30.312 24458 24478 D hw-ProcessState: Binder ioctl to enable oneway spam detection failed: Invalid argument
11-10 08:14:30.315 24458 24458 I AppCompatDelegate: The Activity's LayoutInflater already has a Factory installed so we can not install AppCompat's
11-10 08:14:30.321 24458 24478 I AdrenoVK-0: ===== BEGIN DUMP OF OVERRIDDEN SETTINGS =====
11-10 08:14:30.321 24458 24478 I AdrenoVK-0: ===== END DUMP OF OVERRIDDEN SETTINGS =====
11-10 08:14:30.321 24458 24478 I AdrenoVK-0: QUALCOMM build          : 4783c89, I46ff5fc46f
11-10 08:14:30.321 24458 24478 I AdrenoVK-0: Build Date              : 11/30/20
11-10 08:14:30.321 24458 24478 I AdrenoVK-0: Shader Compiler Version : EV031.31.04.01
11-10 08:14:30.321 24458 24478 I AdrenoVK-0: Local Branch            : QPR2
11-10 08:14:30.321 24458 24478 I AdrenoVK-0: Remote Branch           : 
11-10 08:14:30.321 24458 24478 I AdrenoVK-0: Remote Branch           : 
11-10 08:14:30.321 24458 24478 I AdrenoVK-0: Reconstruct Branch      : 
11-10 08:14:30.321 24458 24478 I AdrenoVK-0: Build Config            : S P 10.0.4 AArch64
11-10 08:14:30.321 24458 24478 I AdrenoVK-0: Driver Path             : /vendor/lib64/hw/vulkan.adreno.so
11-10 08:14:30.351 24458 24478 D hw-ProcessState: Binder ioctl to enable oneway spam detection failed: Invalid argument
11-10 08:14:30.742 24458 24481 V NativeCrypto: Registering com/google/android/gms/org/conscrypt/NativeCrypto's 294 native methods...
11-10 08:14:30.758 24458 24481 I ProviderInstaller: Installed default security provider GmsCore_OpenSSL
11-10 08:14:30.764 24458 24458 D CompatibilityChangeReporter: Compat change id reported: 171228096; UID 10155; state: ENABLED