I just built a userdebug
version of AOSP 10.0 for my Pixel 4 XL; it does contain an su
binary in /system/xbin/su
.
It differs from what many mean by "rooting" in that it doesn't let you actually run su
from on the phone itself (say, within termuxTermux). It can only be executed by root or a member of the shell
group, which is what is used while running an adb shell session. However, it still is a way to run things as root; it merely requires an adb connection to do so.
If your USB cable doesn't carry data or your USB port is broken/faulty, you wouldn't be able to run things as root anymore (unless you had already set up adb
on the device to run over TCP).
I later put magiskMagisk on my otherwise-AOSP ROM and now have two su
binaries; the magiskMagisk one is installed in /sbin/su
. Magisk's /sbin/su
will let me run things as root without an adb connection active.