简体   繁体   中英

Device recognized in ADB but not in shell

When I use ADB, my phone is recognized. However, once I enter the shell, the phone mysteriously disappears. This is weird especially because the shell lists "root@nozomi", as "nozomi" is the phone's code name.

在此处输入图片说明

And because it is not recognized, I can't, for example, push files:

在此处输入图片说明

The adb command is available both on your phone and your host/development machine. However, it is not much useful on your phone from the shell.

adb shell opens a unix command shell on your phone . Commands you enter here are executed on your phone.

When you execute adb devices in the adb shell, you ask your phone if it has any other phones connected to it via the android debugging interface. And clearly your phone tells you, that this is not the case.

Same thing holds for adb push you are asking your phone to push a file to another phone via adb. Since none are connected, you get the error message.

Try exiting the adb shell again and execute commands on the host machine instead.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM