Skip to content

tsu's sudo triggers device hang when used in Termux:Widget plugin context #87

@Minabsapi

Description

@Minabsapi

Forwarded from termux/termux-widget#67

Problem description

Upon launching a script making use of tsu's sudo through the Termux:Widget module, the script fails and the device starts hanging, apparently due to a memory leak
That script when launched directly through Termux doesn't trigger any issue
Also no issue even with the shortcut when using agnostic-apollo 's sudo

Steps to reproduce

  1. Create this script in Termux 's ".shortcuts" folder

Toggle ADB

getprop init.svc.adbd | grep "running" && (sudo stop adbd) || (sudo start adbd)

Its effect is to toggle device's ADB Daemon on / off according to its state.

  1. Start it from Termux (not shortcut) to see for yourself this works as intended (if rooted).

  2. Create a new shortcut targeting it

Expected behavior

Should work as it would when launched directly through the Termux app

Actual behavior

stop will fail, and the device will start to hang a few seconds after

Screenshot

Additional information

  • Termux application version: 0.117
  • Termux:Widgets version: 0.13.0
  • tsu package version: unknown (removed; was supposedly current latest - 8.5.1)
  • Android OS version: 8.1.0
  • Device model: Xiaomi Mi A1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions