Android_usb Cannot enable 'adb'


seems as “USB-Debugging” can’t be enabled. I connected my VIM Pro over USB-C cable and fired up adb shell on my notebook, but no device could be found, and also I don’t see any device found in Windows Device Manager.

Then i connected USB Serial Console cable and checked log when activating USB Debugging on VIM Pro and there is see that error: android_usb: Cannot enable ‘adb’ (-22)

My VIM Pro is running: Vim_Nougat_170321.7z ROM flashed successful with Burning Tool, before flashing this I have had what ever version is flashed in production (but was Android 6 i think). I did not check if adb was working there.

[ 5746.995282@1] hdmitx: audio: aout notify rate 48000
[ 5746.999869@1] hdmitx: audio: aout notify size 16
[ 5747.004617@1] hdmitx: audio: no update
[ 5747.008306@1] aml_snd_m8_card aml_m8_snd.47: i2s/958 same source
[ 5747.037846@1] aml_snd_m8_card aml_m8_snd.47: I2S playback enable
[ 5747.038221@1] aml_snd_m8_card aml_m8_snd.47: IEC958 playback enable
[ 5748.114477@2] type=1400 audit(1420076149.990:2325): avc: denied { getattr } for pid=7882 comm="usbtestpm" path="/vendor" dev="rootfs" ino=6654 scontext=u:r:usbpm:s0 tcontext=u:object_r:rootfs:s0 tclass=lnk_file permissive=0
[ 5748.873405@2] type=1400 audit(1420076150.750:2326): avc: denied { getattr } for pid=7884 comm="logcat" path="/vendor" dev="rootfs" ino=6654 scontext=u:r:logcat:s0 tcontext=u:object_r:rootfs:s0 tclass=lnk_file permissive=0
[ 5748.921291@2] android_usb: Cannot enable 'adb' (-22)
[ 5748.922535@3] android_usb: Cannot enable 'adb' (-22)android_usb: Cannot enable 'adb' (-22)
[ 5751.965531@0] aml_snd_m8_card aml_m8_snd.47: I2S playback disable
[ 5751.966224@0] aml_snd_m8_card aml_m8_snd.47: IEC958 playback disable
[ 5751.972905@0] aml_spdif_dai: share the same clock
[ 5751.977216@0] aml_audio_hw: IEC958 16bit
[ 5751.981954@0] hdmitx: audio: aout notify rate 48000
[ 5751.986175@0] hdmitx: audio: aout notify size 16
[ 5751.991016@0] hdmitx: audio: no update

Upgrade mode is working without any problem and device is recognized by Burning Tool!


Developer Mode is enabled on the Nougat install I presume?


yes because “USB debugging” option is under Developer mode, i am however not sure if it was enabled, or I enabled it myself by hitting build number many times until developer mode was enabled.


The version of Vim_Nougat_170321.7z didn’t support for usb adb function.
We will release the new Rom supporting the usb adb function in this week.

Burning Tool no Device

@terry ok now it is clear why it does not work.


With new ROM (Vim_Nougat_Root_170421.7z) it does works

C:\> adb shell
kvim:/ $ su
kvim:/ #


Looks like from source built Nougat also has issues - can’t connect via ADB:

And on VIM2 screen no pop-up comes up to authorize debugging from computer :neutral_face:

In Developer options USB debugging is enabled.

OTA update process?

The source code on Github is active for ADB.
Maybe the enviroment of your host PC has problem.
Did you connect VIM2 via adb successfully with official ROM?
What’s the system of your host PC? Ubuntu or Windows?


For VIM_Nougat_170901

ADB over USB

  1. The USB-C cable is connected to my PC.

  2. I enable adb debugging on my device (Vim Pro) : Settings–>Developer options —> USB debugging
    Open a terminal and type:

$ adb shell

Appear error : device unauthorized. Please check the confirmation dialog on you device.


You need to check the confirmation dialog on your VIM


I check Vim - Android Settings again. I make sure Developer options —> USB debugging to enable


What’s the system of your host PC? Ubuntu or Windows?
This usually happens when you miss accepting the RSA Key Notification at first.

You can kill adb server firstly, then type adb shell command again.

# adb kill-server
# adb shell

Have a try. Thanks


Dear Terry

Thank you for your support. It can work now.


The problem is that confirmation dialog does not come up :neutral_face: I am trying to run ADB on Nougat VTV build and maybe the problem is that VTV app is launched as soon as Android boots up and after quitting VTV the allow debugging dialog does not come up :neutral_face:

I will do a clean Nougat build (without VTV) and check on it if I have ADB issue there too.