Problem Description:
I recently worked on a vehicle project and needed to debug some hardware devices. Under the Win10 system, Android Studio directly ran the project code, installed it on the hardware device, and reported the following error:
I also used the ADB command to manually install the apk, but still reported an error, as follows:
Right now:
E:\>adb install QQM.apk
Performing Streamed Install
adb: failed to run abb_exec. Error: closed
adb: connect error for write: closed
solve:
Run
setprop persist.sv.enable_adb_install 1 in the adb shell
As follows: Install QQ Music apk on the device.
E:\>adb shell
error: closed
E:\>adb devices
List of devices attached
E:\>adb kill-server
E:\>adb start-server
* daemon not running; starting now at tcp:5037
* daemon started successfully
E:\>adb shell
adb.exe: no devices/emulators found
E:\>adb devices
List of devices attached
ad039675 device
E:\>adb shell ####看这里
msmnile_gvmq:/ $ setprop persist.sv.enable_adb_install 1 ####看这里
msmnile_gvmq:/ $ exit
E:\>adb install QQM.apk
Performing Streamed Install
Success
Reason: The adb install switch on the device is not turned on, causing the apk to fail to install. Use the command to open the install permission.