wb4916 发表于 2021-4-21 16:06:49

【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" <
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
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
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
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
xhci-hcd xhci-hcd.5.auto: remove, state 4
usb usb8: USB disconnect, device number 1
console:/ $ xhci-hcd xhci-hcd.5.auto: USB bus 8 deregistered
xhci-hcd xhci-hcd.5.auto: remove, state 4
usb usb7: USB disconnect, device number 1
xhci-hcd xhci-hcd.5.auto: USB bus 7 deregistered
phy phy-ff770000.syscon:usb2-phy@e450.2: charger = USB_SDP_CHARGER
android_work: sent uevent USB_STATE=CONNECTED
configfs-gadget gadget: high-speed config #1: b
android_work: sent uevent USB_STATE=CONFIGURED



串口的截图:

Android的截图:







jpchen 发表于 2021-4-21 17:53:09

在设置中,点击connect to pc 就可以连接到pc, 同时传送文件可以点击usb file tranfer就可以进行文件操作

wb4916 发表于 2021-4-22 09:58:45

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:43

wb4916 发表于 2021-4-22 09:58
请问您是否拿AIO-3399J刷Android10的固件测试呢过?您使用SDK编译或者预编译固件IMG都可以!

正常情况 ...

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

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

wb4916 发表于 2021-4-22 17:26:14

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编译也是同样的效果!












jpchen 发表于 2021-4-22 17:32:48

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




设置里面的connected devices 点击进去就有connect to pc 选项

wb4916 发表于 2021-4-22 17:52:40

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

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

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


jpchen 发表于 2021-4-22 17:56:08

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



看到么,很大个字哦


wb4916 发表于 2021-4-22 18:10:53

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:55

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

可以参照wiki 自己修改
https://wiki.t-firefly.com/zh_CN/Firefly-Android-Manual/system_customization.html
页: [1]
查看完整版本: 【Android10】【AIO-3399J】otg_mode不能连接ADB,在设置之中配置之后还是不行!