You can "suspend" user apps via cmd package suspend <packageName> (which acts kind of like pm disable; the differences are explained in this answer by @Firelord), and later unsuspend them using cmd package unsuspend <packageName> – which also works for user-installed apps. However: suspended packages seem no longer to be listed via cmd package list packages – not even if -u (uninstalled) or -d (disabled) is specified; not even dumpsys package seems to know them anymore.
So is there any way to obtain a list of suspended packages? The syntax output doesn't mention such. But as such apps are still shown in the launcher (though "grayed out"), there must be a way to detect them.
cmdcommand – both yield "unknown option -a"). The second one did the trick after a slight modification: I had to ommit the="true"for some reason I don't get. Butadb shell su -c grep 'suspended' /data/system/users/0/package-restrictions.xml | cut -d '"' -f2indeed did the trick, thanks! – Izzy Jun 13 '22 at 21:17grepback to the PC also works:adb shell su -c cat /data/system/users/0/package-restrictions.xml |grep 'suspended="true"'| cut -d '"' -f2– Izzy Jun 13 '22 at 21:25