d4rken-org / sdmaid-se

SD Maid 2/SE is Android's most thorough cleaning tool.
https://play.google.com/store/apps/details?id=eu.darken.sdmse
GNU General Public License v3.0
2.69k stars 420 forks source link

Xiaomi HyperOS Use Appcontrol issue #1371

Closed hominju closed 2 months ago

hominju commented 2 months ago

Describe the bug When I need to force stop the application, it cannot find the keyword: "force stop"? It is also possible that sd maid cannot operate.

Another problem is that when using the Traditional Chinese interface in the MIUI system, the search keyword should be "結束執行" instead of "強制停止" . Is the keyword search error causing the inability to execute?

To Reproduce Steps to reproduce the behavior:

  1. Go to 'AppControl'
  2. Click on 'an Application ex, google drive'
  3. Scroll down to 'force stop app button'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Smartphone (please complete the following information):

Debug log eu.darken.sdmse_logfile_1723936229884.log

Screenshots/Video Screenshot_2024-08-18-06-50-58-891_com miui securitycenter Screenshot_2024-08-18-07-05-28-940_com miui securitycenter IMG_20240818_070917

Additional context Add any other context about the problem here.

d4rken commented 2 months ago

Thanks for the report.

From the log it look like clicking the force stop button is not the issue, it breaks down before that:

2024-08-17T23:11:06.628Z  D/SDMSE:Automation:Crawler: Not a viable root node: android.view.accessibility.AccessibilityNodeInfo@800070f9; boundsInParent: Rect(0, 0 - 1080, 2400); boundsInScreen: Rect(0, 0 - 1080, 2400); boundsInWindow: Rect(0, 0 - 1080, 2400); packageName: com.miui.securitycenter; className: android.widget.FrameLayout; text: null; error: null; maxTextLength: -1; stateDescription: null; contentDescription: null; tooltipText: null; containerTitle: null; viewIdResName: null; uniqueId: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; importantForAccessibility: true; visible: true; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null]; isTextSelectable: false (spec=Spec(parent=SDMSE:AppControl:Automation:AOSP:Specs, label=CachedCaString("尋找「強制停止」按鈕(關鍵詞:[強制停止])")))

SD Maid thinks it's not the correct screen to work on yet.

2024-08-17T23:11:12.827Z  V/SDMSE:Automation:Crawler:Common: Looking for window identifiers: [com.duokan.phone.remotecontroller, 萬能遙控, com.xiaomi.mitv.phone.remotecontroller.XMRCApplication]

Looks okay at first glance as 萬能遙控 is visible on the screen here:

2024-08-17T23:11:13.561Z  V/SDMSE:Automation:Crawler: crawl():-----------11: className=android.widget.TextView, text='萬能遙控', isClickable=false, isEnabled=true, viewIdResourceName=com.miui.securitycenter:id/app_manager_details_applabel, pkgName=com.miui.securitycenter, identity=47ced7a
2024-08-17T23:11:13.561Z  V/SDMSE:Automation:Crawler: crawl():-----------11: className=android.widget.TextView, text='版本:6.7.0', isClickable=false, isEnabled=true, viewIdResourceName=com.miui.securitycenter:id/app_manager_details_appversion, pkgName=com.miui.securitycenter, identity=8ea55a5

Ah it is because the settings package that SD Maid is looking for is com.android.settings but for Xiaomi it's com.miui.securitycenter.

Need extra behavior here :eyes:

d4rken commented 2 months ago

1375 will fix the window detection but it might still break down later on a different step. I'll try to find a MIUI device to test with, maybe I can get this working without extra updates.

d4rken commented 2 months ago

Closing this as I could test it with the fix from #1375 on a Redmi A2 @ MIUI14.

If this doesn't work in the next update, please reopen the ticket and provide a new debug log.

:pray: