It turns out to be rather straightforward to obtain command-line access to an Android phone, also when it is not rooted. Namely, one can use ADB – the Android Debug Bridge, a client-server tool that is part of the Android SDK Platform-Tools package. It requires a working Java runtime environment and is easy to use, following the clear instructions on the ADB homepage.