How to run adb shell after optee build on Hikey960?

I following hikey960 AOSP op-tee build (https://optee.readthedocs.io/building/aosp/aosp.html) for TEE studying
I finished image flash without error. I try to run adb shell for xtest. but adb devices not attached.
After I flashed boot, dt, system, vendor, userdata img (builded AOSP), I can be run ADB
What’s the problem?
Please help. Thanks in advance.

Please try this:

  • run dmesg or lsusb and find the idVendor and idProduct for the appropriate hikey960 connection
  • add the line below to /etc/udev/rules.d/51-android.rules
SUBSYSTEM=="usb", ATTR{idVendor}=="idVendor from dmesg or lsusb", ATTR{idProduct}=="idProduct from dmesg or lsusb", MODE="0600", OWNER="your username"
  • adb kill-server
  • adb start-server
  • adb devices

If it doesn’t work, then you’re stuck with using adb over tcpip. See the 2nd item under https://optee.readthedocs.io/building/aosp/aosp.html#known-issues for details.