Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Startup Init Lite
提交
c6305d31
S
Startup Init Lite
项目概览
OpenHarmony
/
Startup Init Lite
大约 1 年 前同步成功
通知
3
Star
37
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Startup Init Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c6305d31
编写于
7月 29, 2021
作者:
O
openharmony_ci
提交者:
Gitee
7月 29, 2021
浏览文件
操作
浏览文件
下载
差异文件
!72 更新USB CFG文件
Merge pull request !72 from bigA2021/master
上级
993580a8
07d7ff94
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
18 addition
and
330 deletion
+18
-330
services/etc/init.usb.cfg
services/etc/init.usb.cfg
+8
-138
services/etc/init.usb.configfs.cfg
services/etc/init.usb.configfs.cfg
+10
-192
未找到文件。
services/etc/init.usb.cfg
浏览文件 @
c6305d31
{
"jobs" : [{
"name" : "post-fs-data",
"cmds" : [
"chown system system /sys/class/android_usb/android0/f_mass_storage/lun/file",
"chmod 0660 /sys/class/android_usb/android0/f_mass_storage/lun/file",
"chown system system /sys/class/android_usb/android0/f_rndis/ethaddr",
"chmod 0660 /sys/class/android_usb/android0/f_rndis/ethaddr",
"mkdir /data/misc/adb 02750 system shell",
"mkdir /data/adb 0700 root root"
]
}, {
"name" : "boot",
"cmds" : [
"setparam sys.usb.configfs 0"
]
}, {
"name" : "param:sys.usb.config=none && param:sys.usb.configfs=0",
"condition" : "sys.usb.config=none && sys.usb.configfs=0",
"cmds" : [
"stop adbd",
"write /sys/class/android_usb/android0/enable 0",
"write /sys/class/android_usb/android0/bDeviceClass 0",
"setparam sys.usb.state ${sys.usb.config}"
]
}, {
"name" : "param:sys.usb.config=adb && param:sys.usb.configfs=0",
"condition" : "sys.usb.config=adb && sys.usb.configfs=0",
"cmds" : [
"write /sys/class/android_usb/android0/enable 0",
"write /sys/class/android_usb/android0/idVendor 18d1",
"write /sys/class/android_usb/android0/idProduct 4EE7",
"write /sys/class/android_usb/android0/functions ${sys.usb.config}",
"write /sys/class/android_usb/android0/enable 1",
"start adbd",
"setparam sys.usb.state ${sys.usb.config}"
]
}, {
"name" : "param:sys.usb.config=accessory && param:sys.usb.configfs=0",
"condition" : "sys.usb.config=accessory && sys.usb.configfs=0",
"cmds" : [
"write /sys/class/android_usb/android0/enable 0",
"write /sys/class/android_usb/android0/idVendor 18d1",
"write /sys/class/android_usb/android0/idProduct 2d00",
"write /sys/class/android_usb/android0/functions ${sys.usb.config}",
"write /sys/class/android_usb/android0/enable 1",
"setparam sys.usb.state ${sys.usb.config}"
]
}, {
"name" : "param:sys.usb.config=accessory,adb && param:sys.usb.configfs=0",
"condition" : "sys.usb.config=accessory,adb && sys.usb.configfs=0",
"cmds" : [
"write /sys/class/android_usb/android0/enable 0",
"write /sys/class/android_usb/android0/idVendor 18d1",
"write /sys/class/android_usb/android0/idProduct 2d01",
"write /sys/class/android_usb/android0/functions ${sys.usb.config}",
"write /sys/class/android_usb/android0/enable 1",
"start adbd",
"setparam sys.usb.state ${sys.usb.config}"
]
}, {
"name" : "param:sys.usb.config=audio_source && param:sys.usb.configfs=0",
"condition" : "sys.usb.config=audio_source && sys.usb.configfs=0",
"cmds" : [
"write /sys/class/android_usb/android0/enable 0",
"write /sys/class/android_usb/android0/idVendor 18d1",
"write /sys/class/android_usb/android0/idProduct 2d02",
"write /sys/class/android_usb/android0/functions ${sys.usb.config}",
"write /sys/class/android_usb/android0/enable 1",
"setparam sys.usb.state ${sys.usb.config}"
]
}, {
"name" : "param:sys.usb.config=audio_source,adb && param:sys.usb.configfs=0",
"condition" : "sys.usb.config=audio_source,adb && sys.usb.configfs=0",
"cmds" : [
"write /sys/class/android_usb/android0/enable 0",
"write /sys/class/android_usb/android0/idVendor 18d1",
"write /sys/class/android_usb/android0/idProduct 2d03",
"write /sys/class/android_usb/android0/functions ${sys.usb.config}",
"write /sys/class/android_usb/android0/enable 1",
"start adbd",
"setparam sys.usb.state ${sys.usb.config}"
]
}, {
"name" : "param:sys.usb.config=accessory,audio_source && param:sys.usb.configfs=0",
"condition" : "sys.usb.config=accessory,audio_source && sys.usb.configfs=0",
"cmds" : [
"write /sys/class/android_usb/android0/enable 0",
"write /sys/class/android_usb/android0/idVendor 18d1",
"write /sys/class/android_usb/android0/idProduct 2d04",
"write /sys/class/android_usb/android0/functions ${sys.usb.config}",
"write /sys/class/android_usb/android0/enable 1",
"setparam sys.usb.state ${sys.usb.config}"
]
}, {
"name" : "param:sys.usb.config=accessory,audio_source,adb && param:sys.usb.configfs=0",
"condition" : "sys.usb.config=accessory,audio_source,adb && sys.usb.configfs=0",
"cmds" : [
"write /sys/class/android_usb/android0/enable 0",
"write /sys/class/android_usb/android0/idVendor 18d1",
"write /sys/class/android_usb/android0/idProduct 2d05",
"write /sys/class/android_usb/android0/functions ${sys.usb.config}",
"write /sys/class/android_usb/android0/enable 1",
"start adbd",
"setparam sys.usb.state ${sys.usb.config}"
]
}, {
"name" : "boot && param:persist.sys.usb.config=*",
"condition" : "boot && persist.sys.usb.config=*",
...
...
@@ -111,54 +11,24 @@
"setparam sys.usb.config ${persist.sys.usb.config}"
]
}, {
"name" : "param:sys.usb.typec.mode=dfp",
"condition" : "sys.usb.typec.mode=dfp",
"cmds" : [
"write /sys/class/dual_role_usb/otg_default/mode ${sys.usb.typec.mode}",
"setparam sys.usb.typec.state ${sys.usb.typec.mode}"
]
}, {
"name" : "param:sys.usb.typec.mode=ufp",
"condition" : "sys.usb.typec.mode=ufp",
"cmds" : [
"write /sys/class/dual_role_usb/otg_default/mode ${sys.usb.typec.mode}",
"setparam sys.usb.typec.state ${sys.usb.typec.mode}"
]
}, {
"name" : "param:sys.usb.typec.data_role=device",
"condition" : "sys.usb.typec.data_role=device",
"cmds" : [
"write /sys/class/dual_role_usb/otg_default/data_role ${sys.usb.typec.data_role}",
"setparam sys.usb.typec.state ${sys.usb.typec.data_role}"
]
}, {
"name" : "param:sys.usb.typec.data_role=host",
"condition" : "sys.usb.typec.data_role=host",
"cmds" : [
"write /sys/class/dual_role_usb/otg_default/data_role ${sys.usb.typec.data_role}",
"setparam sys.usb.typec.state ${sys.usb.typec.data_role}"
]
}, {
"name" : "param:sys.usb.typec.power_role=source",
"condition" : "sys.usb.typec.power_role=source",
"name" : "param:sys.usb.config=none && param:sys.usb.configfs=0",
"condition" : "sys.usb.config=none && sys.usb.configfs=0",
"cmds" : [
"write /sys/class/dual_role_usb/otg_default/power_role ${sys.usb.typec.power_role}",
"setparam sys.usb.typec.state ${sys.usb.typec.power_role}"
"stop hdcd"
]
}, {
"name" : "param:sys.usb.
typec.power_role=sink
",
"condition" : "sys.usb.
typec.power_role=sink
",
"name" : "param:sys.usb.
config=hdc && param:sys.usb.configfs=0
",
"condition" : "sys.usb.
config=hdc && sys.usb.configfs=0
",
"cmds" : [
"write /sys/class/dual_role_usb/otg_default/power_role ${sys.usb.typec.power_role}",
"setparam sys.usb.typec.state ${sys.usb.typec.power_role}"
"start hdcd"
]
}
],
"services" : [{
"name" : "
adb
d",
"name" : "
hdc
d",
"path" : ["/system/bin/hdcd"],
"socket" : [
"
adb
d seqpacket 660 system system false"
"
hdc
d seqpacket 660 system system false"
],
"disabled" : 1
}
...
...
services/etc/init.usb.configfs.cfg
浏览文件 @
c6305d31
...
...
@@ -4,214 +4,32 @@
"condition" : "sys.usb.config=none && sys.usb.configfs=1",
"cmds" : [
"write /config/usb_gadget/g1/UDC none",
"stop
adb
d",
"stop
hdc
d",
"setparam sys.usb.ffs.ready 0",
"write /config/usb_gadget/g1/bDeviceClass 0",
"write /config/usb_gadget/g1/bDeviceSubClass 0",
"write /config/usb_gadget/g1/bDeviceProtocol 0",
"rm /config/usb_gadget/g1/configs/b.1/f1",
"rm /config/usb_gadget/g1/configs/b.1/f2",
"rm /config/usb_gadget/g1/configs/b.1/f3",
"rmdir /config/usb_gadget/g1/functions/rndis.gs4",
"setparam sys.usb.state ${sys.usb.config}"
]
}, {
"name" : "param:init.svc.
adb
d=stopped",
"condition" : "init.svc.
adb
d=stopped",
"name" : "param:init.svc.
hdc
d=stopped",
"condition" : "init.svc.
hdc
d=stopped",
"cmds" : [
"setparam sys.usb.ffs.ready 0"
]
}, {
"name" : "param:sys.usb.config=
adb
&& param:sys.usb.configfs=1",
"condition" : "sys.usb.config=
adb
&& sys.usb.configfs=1",
"name" : "param:sys.usb.config=
hdc
&& param:sys.usb.configfs=1",
"condition" : "sys.usb.config=
hdc
&& sys.usb.configfs=1",
"cmds" : [
"start
adb
d"
"start
hdc
d"
]
}, {
"name" : "param:sys.usb.ffs.ready=1 && param:sys.usb.config=
adb
&& param:sys.usb.configfs=1",
"condition" : "sys.usb.ffs.ready=1 && sys.usb.config=
adb
&& sys.usb.configfs=1",
"name" : "param:sys.usb.ffs.ready=1 && param:sys.usb.config=
hdc
&& param:sys.usb.configfs=1",
"condition" : "sys.usb.ffs.ready=1 && sys.usb.config=
hdc
&& sys.usb.configfs=1",
"cmds" : [
"write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration adb",
"symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1",
"write /config/usb_gadget/g1/UDC ${sys.usb.controller}",
"setparam sys.usb.state ${sys.usb.config}"
]
}, {
"name" : "param:sys.usb.config=mtp && param:sys.usb.configfs=1",
"condition" : "sys.usb.config=mtp && sys.usb.configfs=1",
"cmds" : [
"write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration mtp",
"symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1",
"write /config/usb_gadget/g1/UDC ${sys.usb.controller}",
"setparam sys.usb.state ${sys.usb.config}"
]
}, {
"name" : "param:sys.usb.config=mtp,adb && param:sys.usb.configfs=1",
"condition" : "sys.usb.config=mtp,adb && sys.usb.configfs=1",
"cmds" : [
"start adbd"
]
}, {
"name" : "param:sys.usb.ffs.ready=1 && param:sys.usb.config=mtp,adb && param:sys.usb.configfs=1",
"condition" : "sys.usb.ffs.ready=1 && sys.usb.config=mtp,adb && sys.usb.configfs=1",
"cmds" : [
"write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration mtp_adb",
"symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1",
"symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2",
"write /config/usb_gadget/g1/UDC ${sys.usb.controller}",
"setparam sys.usb.state ${sys.usb.config}"
]
}, {
"name" : "param:sys.usb.config=ptp && param:sys.usb.configfs=1",
"condition" : "sys.usb.config=ptp && sys.usb.configfs=1",
"cmds" : [
"write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration ptp",
"symlink /config/usb_gadget/g1/functions/ptp.gs1 /config/usb_gadget/g1/configs/b.1/f1",
"write /config/usb_gadget/g1/UDC ${sys.usb.controller}",
"setparam sys.usb.state ${sys.usb.config}"
]
}, {
"name" : "param:sys.usb.config=ptp,adb && param:sys.usb.configfs=1",
"condition" : "sys.usb.config=ptp,adb && sys.usb.configfs=1",
"cmds" : [
"start adbd"
]
}, {
"name" : "param:sys.usb.ffs.ready=1 && param:sys.usb.config=ptp,adb && param:sys.usb.configfs=1",
"condition" : "sys.usb.ffs.ready=1 && sys.usb.config=ptp,adb && sys.usb.configfs=1",
"cmds" : [
"write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration ptp_adb",
"symlink /config/usb_gadget/g1/functions/ptp.gs1 /config/usb_gadget/g1/configs/b.1/f1",
"symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2",
"write /config/usb_gadget/g1/UDC ${sys.usb.controller}",
"setparam sys.usb.state ${sys.usb.config}"
]
}, {
"name" : "param:sys.usb.config=accessory && param:sys.usb.configfs=1",
"condition" : "sys.usb.config=accessory && sys.usb.configfs=1",
"cmds" : [
"write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration accessory",
"symlink /config/usb_gadget/g1/functions/accessory.gs2 /config/usb_gadget/g1/configs/b.1/f1",
"write /config/usb_gadget/g1/UDC ${sys.usb.controller}",
"setparam sys.usb.state ${sys.usb.config}"
]
}, {
"name" : "param:sys.usb.config=accessory,adb && param:sys.usb.configfs=1",
"condition" : "sys.usb.config=accessory,adb && sys.usb.configfs=1",
"cmds" : [
"start adbd"
]
}, {
"name" : "param:sys.usb.ffs.ready=1 && param:sys.usb.config=accessory,adb && param:sys.usb.configfs=1",
"condition" : "sys.usb.ffs.ready=1 && sys.usb.config=accessory,adb && sys.usb.configfs=1",
"cmds" : [
"write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration accessory_adb",
"symlink /config/usb_gadget/g1/functions/accessory.gs2 /config/usb_gadget/g1/configs/b.1/f1",
"symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2",
"write /config/usb_gadget/g1/UDC ${sys.usb.controller}",
"setparam sys.usb.state ${sys.usb.config}"
]
}, {
"name" : "param:sys.usb.config=audio_source && param:sys.usb.configfs=1",
"condition" : "sys.usb.config=audio_source && sys.usb.configfs=1",
"cmds" : [
"write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration audiosource",
"symlink /config/usb_gadget/g1/functions/audio_source.gs3 /config/usb_gadget/g1/configs/b.1/f1",
"write /config/usb_gadget/g1/UDC ${sys.usb.controller}",
"setparam sys.usb.state ${sys.usb.config}"
]
}, {
"name" : "param:sys.usb.config=audio_source,adb && param:sys.usb.configfs=1",
"condition" : "sys.usb.config=audio_source,adb && sys.usb.configfs=1",
"cmds" : [
"start adbd"
]
}, {
"name" : "param:sys.usb.ffs.ready=1 && param:sys.usb.config=audio_source,adb && param:sys.usb.configfs=1",
"condition" : "sys.usb.ffs.ready=1 && sys.usb.config=audio_source,adb && sys.usb.configfs=1",
"cmds" : [
"write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration audiosource_adb",
"symlink /config/usb_gadget/g1/functions/audio_source.gs3 /config/usb_gadget/g1/configs/b.1/f1",
"symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2",
"write /config/usb_gadget/g1/UDC ${sys.usb.controller}",
"setparam sys.usb.state ${sys.usb.config}"
]
}, {
"name" : "param:sys.usb.config=accessory,audio_source && param:sys.usb.configfs=1",
"condition" : "sys.usb.config=accessory,audio_source && sys.usb.configfs=1",
"cmds" : [
"write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration accessory_audiosource",
"symlink /config/usb_gadget/g1/functions/accessory.gs2 /config/usb_gadget/g1/configs/b.1/f1",
"symlink /config/usb_gadget/g1/functions/audio_source.gs3 /config/usb_gadget/g1/configs/b.1/f2",
"write /config/usb_gadget/g1/UDC ${sys.usb.controller}",
"setparam sys.usb.state ${sys.usb.config}"
]
}, {
"name" : "param:sys.usb.config=accessory,audio_source,adb && param:sys.usb.configfs=1",
"condition" : "sys.usb.config=accessory,audio_source,adb && sys.usb.configfs=1",
"cmds" : [
"start adbd"
]
}, {
"name" : "param:sys.usb.ffs.ready=1 && param:sys.usb.config=accessory,audio_source,adb && param:sys.usb.configfs=1",
"condition" : "sys.usb.ffs.ready=1 && sys.usb.config=accessory,audio_source,adb && sys.usb.configfs=1",
"cmds" : [
"write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration accessory_audiosource_adb",
"symlink /config/usb_gadget/g1/functions/accessory.gs2 /config/usb_gadget/g1/configs/b.1/f1",
"symlink /config/usb_gadget/g1/functions/audio_source.gs3 /config/usb_gadget/g1/configs/b.1/f2",
"symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3",
"write /config/usb_gadget/g1/UDC ${sys.usb.controller}",
"setparam sys.usb.state ${sys.usb.config}"
]
}, {
"name" : "param:sys.usb.config=midi && param:sys.usb.configfs=1",
"condition" : "sys.usb.config=midi && sys.usb.configfs=1",
"cmds" : [
"write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration midi",
"symlink /config/usb_gadget/g1/functions/midi.gs5 /config/usb_gadget/g1/configs/b.1/f1",
"write /config/usb_gadget/g1/UDC ${sys.usb.controller}",
"setparam sys.usb.state ${sys.usb.config}"
]
}, {
"name" : "param:sys.usb.config=midi,adb && param:sys.usb.configfs=1",
"condition" : "sys.usb.config=midi,adb && sys.usb.configfs=1",
"cmds" : [
"start adbd"
]
}, {
"name" : "param:sys.usb.ffs.ready=1 && param:sys.usb.config=midi,adb && param:sys.usb.configfs=1",
"condition" : "sys.usb.ffs.ready=1 && sys.usb.config=midi,adb && sys.usb.configfs=1",
"cmds" : [
"write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration midi_adb",
"symlink /config/usb_gadget/g1/functions/midi.gs5 /config/usb_gadget/g1/configs/b.1/f1",
"symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2",
"write /config/usb_gadget/g1/UDC ${sys.usb.controller}",
"setparam sys.usb.state ${sys.usb.config}"
]
}, {
"name" : "param:sys.usb.config=rndis && param:sys.usb.configfs=1",
"condition" : "sys.usb.config=rndis && sys.usb.configfs=1",
"cmds" : [
"mkdir /config/usb_gadget/g1/functions/rndis.gs4",
"write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration rndis",
"symlink /config/usb_gadget/g1/functions/rndis.gs4 /config/usb_gadget/g1/configs/b.1/f1",
"write /config/usb_gadget/g1/UDC ${sys.usb.controller}",
"setparam sys.usb.state ${sys.usb.config}"
]
}, {
"name" : "param:sys.usb.config=rndis,adb && param:sys.usb.configfs=1",
"condition" : "sys.usb.config=rndis,adb && sys.usb.configfs=1",
"cmds" : [
"start adbd"
]
}, {
"name" : "param:sys.usb.ffs.ready=1 && param:sys.usb.config=rndis,adb && param:sys.usb.configfs=1",
"condition" : "sys.usb.ffs.ready=1 && sys.usb.config=rndis,adb && sys.usb.configfs=1",
"cmds" : [
"mkdir /config/usb_gadget/g1/functions/rndis.gs4",
"write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration rndis_adb",
"symlink /config/usb_gadget/g1/functions/rndis.gs4 /config/usb_gadget/g1/configs/b.1/f1",
"symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2",
"write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration hdc",
"symlink /config/usb_gadget/g1/functions/ffs.hdc /config/usb_gadget/g1/configs/b.1/f1",
"write /config/usb_gadget/g1/UDC ${sys.usb.controller}",
"setparam sys.usb.state ${sys.usb.config}"
]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录