This was a tricky one. I needed some files from my home server which has run level 3 (Full multi-user text mode). It means no Graphical User Interface is present, everything happens from the command line. It’s a server after all. So, installed adb from the command line, that’s an easy one, with wget
and android update sdk --no-ui
.
So, adb like a pro, but notice first thing you have List of devices attached with no permissions. Can’t use adb shell
or push files with adb push
, or anything for that matter, because Android can’t allow the host computer to access without permissions and permissions cannot be allowed because there’s no GUI to notice when USB is connecting.
What you need to do is to log in to your Linux server CLI and run as root tail -f /var/log/messages
, reconnect the Android phone to USB, take the “idVendor” from a line like:
kernel: usb 1-2: New USB device found, idVendor=XXXX, idProduct=XXXX
Then edit /etc/udev/rules.d/51-android.rules
(new file) and add line:
SUBSYSTEM=="usb", ATTR{idVendor}=="YOUR_FOUR_LETTER_ID_HERE", MODE="0666", GROUP="plugdev"
Then just reboot or if you don’t want to lose uptime run udevadm control --reload-rules
, then reconnect USB and voilĂ , there’s prompt in your phone!
Always beating challenges and learning new.
Thanks for reading! I need your attention for a moment.
Did your problem got solved? Did you enjoy this post? If so, consider thanking me on Patreon. Doing this is not free and I'd love you buy me a beer or coffee. If you do that, I might be able to help you if you didn't get your problem solved with this blog post. I know my shit around areas like website design, coding, blogging, digital marketing and SEO so if you want to do business with me in other ways let me know.