With physical access, root access is as simple as setting init=/bin/bash in the kernel parameters from a bootloader. No need for credentials or anything.
Physical access always means the device is pwned. You can install a keylogger or something similar.