The default setting of OTG USB3.0 is devices mode
Temporary modification method
adb shell setprop persist.usb.mode 2Code modification method
-
Android7.1/Android10
- In the
device/rockchip/CPU_TYPE/PRODUCT_TYPE/system.propfile, add the following content:
persist.usb.mode=2 - In the
-
Android11/Android12
- In the
device/rockchip/CPU_TYPE/PRODUCT_TYPE/PRODUCT_TYPE.mkfile, add the following content:
PRODUCT_PROPERTY_OVERRIDES += persist.usb.mode=otg - In the
-
Delete build.prop in the out directory
rm out/target/product/PRODUCT_TYPE/obj/ETC/system_build_prop_intermediates/build.prop

