Firefly开源社区

标题: 【Android10】【AIO-3399J】otg_mode不能连接ADB,在设置之中配置之后还是不行! [打印本页]

作者: wb4916    时间: 2021-4-21 16:06
标题: 【Android10】【AIO-3399J】otg_mode不能连接ADB,在设置之中配置之后还是不行!
刷机之后不能连接ADB,在设置之中配置之后还是不行!
AIO-3399J连接PC之后不能通过MTP模式和电脑之间互相传送文件。

在系统之后就可以了!
echo otg >> "/sys/devices/platform/ff770000.syscon/ff770000.syscon:usb2-phy@e450/otg_mode"


https://blog.csdn.net/yhm2046/article/details/104782144
rk3399 android10 usb不识别解决办法

V:\rk3399_q_test\device\rockchip\rk3399\init.rk3399.rc

# update cpusets feature nodes for rk3399 tablet
    write /dev/cpuset/foreground/cpus 0-5
    write /dev/cpuset/foreground/boost/cpus 4-5
    write /dev/cpuset/background/cpus 0
    write /dev/cpuset/system-background/cpus 0-3
    write /dev/cpuset/top-app/cpus 0-5
    write /sys/devices/system/cpu/cpufreq/policy4/interactive/target_loads "65 1008000:70 1200000:75 1416000:80 1608000:90"
    write /sys/devices/platform/ff770000.syscon/ff770000.syscon:usb2-phy@e450/otg_mode otg//加这一句





console:/ $
/sys/devices/platform/ff770000.syscon/ff770000.syscon:usb2-phy@e450/otg_mode" <
[  298.894090] type=1400 audit(1618914596.872:111): avc: denied { associate } for comm="Binder:250_4" name="globalAlert" scontext=u:object_r:proc_net:s0 tcontext=u:object_r:proc:s0 tclass=filesystem permissive=1
[  298.894311] type=1400 audit(1618914818.297:112): avc: denied { append } for comm="sh" name="otg_mode" dev="sysfs" ino=14185 scontext=u:r:shell:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1
[  298.894913] type=1400 audit(1618914818.297:112): avc: denied { append } for comm="sh" name="otg_mode" dev="sysfs" ino=14185 scontext=u:r:shell:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1
[  298.895034] type=1400 audit(1618914818.297:113): avc: denied { open } for comm="sh" path="/sys/devices/platform/ff770000.syscon/ff770000.syscon:usb2-phy@e450/otg_mode" dev="sysfs" ino=14185 scontext=u:r:shell:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1
[  298.900137] xhci-hcd xhci-hcd.5.auto: remove, state 4
[  298.900270] usb usb8: USB disconnect, device number 1
console:/ $ [  298.905470] xhci-hcd xhci-hcd.5.auto: USB bus 8 deregistered
[  298.906840] xhci-hcd xhci-hcd.5.auto: remove, state 4
[  298.906930] usb usb7: USB disconnect, device number 1
[  298.917613] xhci-hcd xhci-hcd.5.auto: USB bus 7 deregistered
[  300.172401] phy phy-ff770000.syscon:usb2-phy@e450.2: charger = USB_SDP_CHARGER
[  300.483179] android_work: sent uevent USB_STATE=CONNECTED
[  300.498150] configfs-gadget gadget: high-speed config #1: b
[  300.498634] android_work: sent uevent USB_STATE=CONFIGURED



串口的截图:

Android的截图:







OTG QQ图片20210421160429.png (185.06 KB, 下载次数: 1681)

OTG QQ图片20210421160429.png

Screenshot_20210420-103358.png (264.88 KB, 下载次数: 1751)

Screenshot_20210420-103358.png

作者: jpchen    时间: 2021-4-21 17:53
在设置中,点击connect to pc 就可以连接到pc, 同时传送文件可以点击usb file tranfer就可以进行文件操作
作者: wb4916    时间: 2021-4-22 09:58
jpchen 发表于 2021-4-21 17:53
在设置中,点击connect to pc 就可以连接到pc, 同时传送文件可以点击usb file tranfer就可以进行文件操作

请问您是否拿AIO-3399J刷Android10的固件测试呢过?您使用SDK编译或者预编译固件IMG都可以!

正常情况下,这样配置是可以链接电脑的,但是现在故障就是连接不了!
原因待查!

源代码
Android10.0 SDK
https://pan.baidu.com/share/init?surl=yu7vwGOYrjhoB2GRNqDveg
提取码:zdfn   


固件
Android10.0 系统
https://pan.baidu.com/share/init?surl=6GRNULQT-xbSYgfRMQ5ICg
提取码:1234   
作者: jpchen    时间: 2021-4-22 10:31
wb4916 发表于 2021-4-22 09:58
请问您是否拿AIO-3399J刷Android10的固件测试呢过?您使用SDK编译或者预编译固件IMG都可以!

正常情况 ...

现在验证的固件AIO-3399J_Android10_HDMI_210331.7z  

点击connect to pc 会有如下的log打印,同时adb shell 连接正常
  1. text=u:object_r:sysfs:s0 tclass=file permissive=1
  2. [   50.469614] xhci-hcd xhci-hcd.5.auto: remove, state 4
  3. [   50.469666] usb usb8: USB disconnect, device number 1
  4. [   50.472085] xhci-hcd xhci-hcd.5.auto: USB bus 8 deregistered
  5. [   50.473143] xhci-hcd xhci-hcd.5.auto: remove, state 4
  6. [   50.473182] usb usb7: USB disconnect, device number 1
  7. [   50.474929] xhci-hcd xhci-hcd.5.auto: USB bus 7 deregistered
  8. [   51.724990] phy phy-ff770000.syscon:usb2-phy@e450.2: charger = USB_SDP_CHARGER
  9. [   52.036706] android_work: sent uevent USB_STATE=CONNECTED
  10. [   52.054654] configfs-gadget gadget: high-speed config #1: b
  11. [   52.061056] android_work: sent uevent USB_STATE=CONFIGURED
复制代码

作者: wb4916    时间: 2021-4-22 17:26
jpchen 发表于 2021-4-22 10:31
现在验证的固件AIO-3399J_Android10_HDMI_210331.7z  

点击connect to pc 会有如下的log打印,同时adb ...

1、在预编译固件里面没有找到您说到的:connect to pc,只有File Transfer。


2、为了保证效果,在刷预编译固件之前首先擦除了EMMC!


主要LOG:
(刷机重启之后)
console:/sys/devices/platform/ff770000.syscon/ff770000.syscon:usb2-phy@e450 $
cat otg_mode
host





(USB配置为File Transfer之后)
console:/sys/devices/platform/ff770000.syscon/ff770000.syscon:usb2-phy@e450 $
[ 1098.503563] init: processing action (sys.usb.config=none && sys.usb.configfs=1) from (/vendor/etc/init/hw/init.rk30board.usb.rc:93)
[ 1098.515377] init: processing action (sys.usb.config=none && sys.usb.configfs=1) from (/init.usb.configfs.rc:1)
[ 1098.516839] android_work: did not send uevent (0 0           (null))
[ 1098.527444] init: Sending signal 9 to service 'adbd' (pid 3356) process group...
[ 1098.533684] libprocessgroup: Successfully killed process cgroup uid 0 pid 3356 in 5ms
[ 1098.534102] init: Service 'adbd' (pid 3356) received signal 9
[ 1098.547663] init: processing action (init.svc.adbd=stopped) from (/vendor/etc/init/hw/init.rk30board.usb.rc:97)
[ 1098.548251] init: processing action (init.svc.adbd=stopped) from (/init.usb.configfs.rc:14)
[ 1098.555794] init: processing action (sys.usb.config=mtp,adb && sys.usb.configfs=1) from (/vendor/etc/init/hw/init.rk30board.usb.rc:105)
[ 1098.559141] init: processing action (sys.usb.config=mtp,adb && sys.usb.configfs=1) from (/init.usb.configfs.rc:32)
[ 1098.559342] init: starting service 'adbd'...
[ 1098.586926] read descriptors
[ 1098.586970] read strings
[ 1098.590129] dwc3 fe800000.dwc3: failed to enable ep0out

console:/sys/devices/platform/ff770000.syscon/ff770000.syscon:usb2-phy@e450 $


(强制配置otg_mode为OTG模式)
console:/sys/devices/platform/ff770000.syscon/ff770000.syscon:usb2-phy@e450 $
echo otg >> otg_mode
[ 1143.161529] type=1400 audit(1619075386.143:171): avc: denied { getattr } for comm="memtrack@1.0-se" path="/sys/kernel/debug/mali0/ctx/1128_3/mem_profile" dev="debugfs" ino=26239 scontext=u:r:hal_memtrack_default:s0 tcontext=u:object_r:debugfs:s0 tclass=file permissive=1
[ 1143.161658] type=14console:/sys/devices/platform/ff770000.syscon/ff770000.syscon:usb2-phy@e450 $
0 audit(1619075465.531:172): avc: denied { append } for comm="sh" name="otg_mode" dev="sysfs" ino=14185 scontext=u:r:shell:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1
[ 1143.162248] type=1400 audit(1619075465.531:172): avc: denied { append } for comm="sh" name="otg_mode" dev="sysfs" ino=14185 scontext=u:r:shell:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1
[ 1143.162322] type=1400 audit(1619075465.531:173): avc: denied { open } for comm="sh" path="/sys/devices/platform/ff770000.syscon/ff770000.syscon:usb2-phy@e450/otg_mode" dev="sysfs" ino=14185 scontext=u:r:shell:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1
[ 1143.167964] xhci-hcd xhci-hcd.5.auto: remove, state 4
[ 1143.168033] usb usb8: USB disconnect, device number 1
[ 1143.173778] xhci-hcd xhci-hcd.5.auto: USB bus 8 deregistered
[ 1143.175089] xhci-hcd xhci-hcd.5.auto: remove, state 4
[ 1143.175233] usb usb7: USB disconnect, device number 1
[ 1143.182390] xhci-hcd xhci-hcd.5.auto: USB bus 7 deregistered


console:/sys/devices/platform/ff770000.syscon/ff770000.syscon:usb2-phy@e450 $


console:/sys/devices/platform/ff770000.syscon/ff770000.syscon:usb2-phy@e450 $
[ 1144.458672] phy phy-ff770000.syscon:usb2-phy@e450.2: charger = USB_SDP_CHARGER
[ 1144.775359] android_work: sent uevent USB_STATE=CONNECTED
[ 1144.848388] configfs-gadget gadget: high-speed config #1: b
[ 1144.848693] android_work: sent uevent USB_STATE=CONFIGURED


console:/sys/devices/platform/ff770000.syscon/ff770000.syscon:usb2-phy@e450 $


console:/sys/devices/platform/ff770000.syscon/ff770000.syscon:usb2-phy@e450 $


console:/sys/devices/platform/ff770000.syscon/ff770000.syscon:usb2-phy@e450 $


console:/sys/devices/platform/ff770000.syscon/ff770000.syscon:usb2-phy@e450 $




(确认配置otg_mode为otg模式了!)
console:/sys/devices/platform/ff770000.syscon/ff770000.syscon:usb2-phy@e450 $
cat otg_mode
otg
[ 1190.569679] type=1400 audit(1619075465.531:173): avc: denied { open } for comm="sh" path="/sys/devices/platform/ff770000.syscon/ff770000.syscon:usb2-phy@e450/otg_mode" dev="sysfs" ino=14console:/sys/devices/platform/ff7780000.syscon/ff770000.syscon:usb2-phy@e450 $
5 scontext=u:r:shell:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1
[ 1190.569812] type=1400 audit(1619075512.939:174): avc: denied { read } for comm="cat" name="otg_mode" dev="sysfs" ino=14185 scontext=u:r:shell:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1


console:/sys/devices/platform/ff770000.syscon/ff770000.syscon:usb2-phy@e450 $


可以看见WIN10找到AIO-3399J。
使用贵司的SDK编译也是同样的效果!












03OTG.png (204.7 KB, 下载次数: 1775)

03OTG.png

10不能OTG.png (196.01 KB, 下载次数: 1640)

10不能OTG.png

11OTG.png (230.17 KB, 下载次数: 1695)

11OTG.png

01.png (165.29 KB, 下载次数: 1744)

01.png

02.png (245.26 KB, 下载次数: 1732)

02.png

Screenshot_20210422-070650.png (37.36 KB, 下载次数: 1692)

Screenshot_20210422-070650.png

Screenshot_20210422-070716.png (71.37 KB, 下载次数: 1677)

Screenshot_20210422-070716.png

Screenshot_20210422-070728.png (77.91 KB, 下载次数: 1685)

Screenshot_20210422-070728.png

Screenshot_20210422-070744.png (86.49 KB, 下载次数: 1721)

Screenshot_20210422-070744.png

Screenshot_20210422-070754.png (86.1 KB, 下载次数: 1678)

Screenshot_20210422-070754.png

Screenshot_20210422-070805.png (85.92 KB, 下载次数: 1634)

Screenshot_20210422-070805.png

Screenshot_20210422-070814.png (83.92 KB, 下载次数: 1732)

Screenshot_20210422-070814.png

Screenshot_20210422-070825.png (82.37 KB, 下载次数: 1674)

Screenshot_20210422-070825.png

Screenshot_20210422-070835.png (61.37 KB, 下载次数: 1666)

Screenshot_20210422-070835.png

Screenshot_20210422-070848.png (75.21 KB, 下载次数: 1717)

Screenshot_20210422-070848.png

Screenshot_20210422-070900.png (80.04 KB, 下载次数: 1728)

Screenshot_20210422-070900.png

Screenshot_20210422-070930.png (112.49 KB, 下载次数: 1664)

Screenshot_20210422-070930.png

Screenshot_20210422-071001.png (51.85 KB, 下载次数: 1715)

Screenshot_20210422-071001.png

Screenshot_20210422-071026.png (51.24 KB, 下载次数: 1699)

Screenshot_20210422-071026.png

Screenshot_20210422-070544.png (475.1 KB, 下载次数: 1825)

Screenshot_20210422-070544.png

Screenshot_20210422-070557.png (164.66 KB, 下载次数: 1778)

Screenshot_20210422-070557.png

Screenshot_20210422-070607.png (82.15 KB, 下载次数: 1695)

Screenshot_20210422-070607.png

Screenshot_20210422-070618.png (82.23 KB, 下载次数: 1712)

Screenshot_20210422-070618.png

Screenshot_20210422-070629.png (60.16 KB, 下载次数: 1689)

Screenshot_20210422-070629.png

Screenshot_20210422-070640.png (63.99 KB, 下载次数: 1727)

Screenshot_20210422-070640.png

作者: jpchen    时间: 2021-4-22 17:32
wb4916 发表于 2021-4-22 17:26
1、在预编译固件里面没有找到您说到的:connect to pc,只有File Transfer。

设置里面的connected devices 点击进去就有connect to pc 选项
作者: wb4916    时间: 2021-4-22 17:52
jpchen 发表于 2021-4-22 17:32
设置里面的connected devices 点击进去就有connect to pc 选项

请问connected devices在设置的哪一个菜单下面?
咱俩使用的是一个固件嘛?

我找遍了Settings,找不到connected devices呀!


Screenshot_20210422-074705.png (81.01 KB, 下载次数: 1685)

Screenshot_20210422-074705.png

Screenshot_20210422-074714.png (85.15 KB, 下载次数: 1706)

Screenshot_20210422-074714.png

Screenshot_20210422-074727.png (81.79 KB, 下载次数: 1694)

Screenshot_20210422-074727.png

预编译固件RK3399 AOI-J配置ADB的过程 MobaXterm_COM7SiliconLabsCP210xUSBtoUARTBrid.zip

51.66 KB, 下载次数: 2, 下载积分: 灯泡 -1 , 经验 -1


作者: jpchen    时间: 2021-4-22 17:56
wb4916 发表于 2021-4-22 17:52
请问connected devices在设置的哪一个菜单下面?
咱俩使用的是一个固件嘛?

看到么,很大个字哦



作者: wb4916    时间: 2021-4-22 18:10
jpchen 发表于 2021-4-22 17:56
看到么,很大个字哦

使用贵司的Android10的SDK,请问如何配置系统编译的时候
1、Connect to PC就默认打开呢????
2、开发者默认可以默认打开嘛?3、Default USB configuration默认为File Transfer?
4、系统语言默认为中文

这样可以给我的调试带来方便!
编译之后一刷机,不需要进行这么多配置的步骤了!

作者: jpchen    时间: 2021-4-22 19:28
wb4916 发表于 2021-4-22 18:10
使用贵司的Android10的SDK,请问如何配置系统编译的时候
1、Connect to PC就默认打开呢????
2、开 ...

可以参照wiki 自己修改
https://wiki.t-firefly.com/zh_CN ... _customization.html




欢迎光临 Firefly开源社区 (https://dev.t-firefly.com/) Powered by Discuz! X3.1