Even though the user is the same uid=2000(shell)
, still the output of group
is very different when run on adb shell (rooted device) than on serial console.
So it seems that through adb shell the user belongs to more groups than when logged in on a serial console.
On other Linux systems it is the opposite - you have more rights when on serial console, since apparently you have direct physical access, but on Android (at least on Oreo) it does not seem logical, since adb can run over Wi-Fi for example.
What is the idea behind such decision?