Fixing accessibility problem on Qin F21 Pro

Can someone please test this? I did, and it seems to work, no guarantees (not sure). If it works, maybe I can patch the framework so that we don’t need a module. I don’t have egate to test.

First, before flashing the module, open any app on your Qin F21 Pro.

Then:

adb shell pidof (package_name)

Close the app from recents.

Run the command again, should return no pid.

Flash the module and try the same process again.

no-kill.zip (331.7 KB)

Found something in:

/system/framework/services.jar → classes.dex → ActivityManagerService.smali

Here is the line that seems to kill app process when closed in recents:

invoke-virtual {this, ...}, Lcom/android/server/am/ActivityManagerService;->removeProcessLocked(...)

This is for all app processes, not just egate.

3 Likes

Scratch that, doesn’t seem to be working, or at least reliably.

1 Like

Was about to tell you I tested it with music apps that stop playback when closing the apps and it doesn’t seem to work.

3 Likes

It’s possible that it may work if I recompile services.jar

1 Like

Alright, the solution is 100 percent in ActivityManagerService

Check out these logs when swiping the app from recents (the app uses accessibility for it’s service)

adb logcat | findstr net.kollnig.greasemilkyway


ActivityManager: Killing 7733:net.kollnig.greasemilkyway/u0a136 (adj 100): remove task

If this is fixed, the problem of apps getting killed gets fixed.

I’m trying to patch services.jar

Must have tried 10 patches so far.

4 Likes

i found this post about the accseibility isuue on xda has anyone tried this
https://xdaforums.com/t/guide-xiaomi-qin-f21-pro-custom-firmware-root-playstore-certified.4405615/post-89897237

is it possible to make egate always run in the backaground/ make it start up again and grant itself acsesibility

im testing out FNG now and if you turn off battery saver or whitlist the app (adb shell dumpsys deviceidle whitelist +com.fb.fluid) then even after reboot it automitcally starts the accseibilty again. so maybe with admin privleges you can make is so battery optimazion id always off for egate and cant be changed by the user

After reboot is not the issue. Open the app, then swipe from recents.

1 Like

eGate has done that for a long time.

1 Like

okay so swiping up kills it but rebooting satrts it up again. why doesnt egate restarting the accseibiltiy every time not work on qin

Bug in the activity manager

services.jar

1 Like

on my device when i swipe up from recents the logcat shows it tries to resart buy duraspeed kills it

  1. 08-06 10:48:03.218   952   979 D DuraSpeed: Caller com.fb.fluid need suppress, the suppress list = [com.fb.fluid]
    08-06 10:48:03.218   952   979 D ActivityManager: bringUpServiceLocked, suppress to start service!
    

The issue is only very little to do with duraspeed. If you patch it, it will still happen.

1 Like

i ran this command adb shell settings put global setting.duraspeed.enabled 0
and FNG restarted after i swiped up from recents - took like 5 seconds

Can you send logs

sure give me a min

1 Like

screen record https://drive.google.com/file/d/1Lv0wGbQjarUoI-YnLTJth_K9tBRUUC02/view?usp=sharing

Got egate installed?

logcat hope its the right one https://drive.google.com/file/d/18RMnP86i7nzIElfxL_0uvdVt-NIIZ5xe/view?usp=sharing