BPI-M2U Run ADB Shell on BPI-M2U

The BPI-M2U transplant ADB Shell to BPI-M2U Linux How to run? 1. Connect BPI-M2U board USB OTG and PC USB. 2. PC Run cmd D: cd D:\BPI-M2U adb shell

If there are any of the following indent preformatted text by 4 spaces

Run: export TERM=dumb

1 Like

Hi there,

Thanks for the info. Is it possible to run VNC (remote desktop) through this thing? If so , how ? Also, it is interesting, that once you enter the “adb shell” command, you’re instantenously logged in as root, no username or password required, how can that be changed?

Cheers, markov85

You can disable adb shell which is “potentially dangerous” by renaming/deleting. S30-adbd.sh at location /var/lib/bananapi/bpi-autorun.d

Hi rmil,

Thanks for the info so far.

My question is, how can I make the adb shell to request username and password when started (on login). Because, currently, when you type “adb shell” on your home pc (which is hooked via USB cable to the USB OTG port of the board) you’re already starting as root - there’s no login prompt.

Cheers, markov85

As I knew, adbd doesn’t have the capability let you login the system use username as password. But SSH does, you can use adb to forward port from PC to board. For example, you can forward 2222 port on PC to 22 port on board, then use SSH/Putty/Bitvise to connect localhost(or 127.0.0.1) and port 2222 on PC, as the port is forward to 22 port on board, if openssh-server or dropbear is running on board, you will be asked username and password to login to system through SSH.

Hi markov85,

Since it is Server/Client application.

Three possibilities might be taken into consideration:

  1. Forcing adb-tools to use PAM authentication
  2. Chrooting server adb service daemon into some folder with limited rights.
  3. Make the adb damon start under some user i.e. “pi”.

Anyway would avoid using of the adb if you need a secure enviroment. SSH is much better solution if you have any kind of network enviroment.

Regards,

Milos

Hi,

How can I do this from Windows 10 ? How can I run this adb shell command from Windows 10, post instructions please!

Best Regards, markov85