-
Notifications
You must be signed in to change notification settings - Fork 55
/
umtprd.conf
184 lines (134 loc) · 5.04 KB
/
umtprd.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
#
# uMTP Responder config file
# Must be copied to /etc/umtprd/umtprd.conf
#
# Loop / daemon mode
# Set to 1 to don't shutdown uMTPrd when the link is disconnected.
loop_on_disconnect 0
# Force the default UID/GID to use for each storage file operations.
# Note : When no default UID/GID are specified the umtprd process UID/GID
# are used instead.
#default_uid 33
## group: mtp
#default_gid 33
#
# umask value for uploaded folders and files
#
# Uncomment the umask command line if you want to
# override the system default umask value for
# the uploaded folders and files.
#
# umask format description :
#
# umask 022
# ugo
#
# u : user/owner part of mask
# g : group part of mask
# o : others/not-in-group part of mask
#
# Octal digit definition in umask command :
#
# 0 : Any permission may be set. (Read, Write, eXecute)
# 1 : Setting of execute permission is prohibited. (Read and Write)
# 2 : Setting of write permission is prohibited. (Read and eXecute)
# 3 : Setting of write and execute permissions is prohibited. (Read only)
# 4 : Setting of read permission is prohibited. (Write and eXecute)
# 5 : Setting of read and execute permissions is prohibited. (Write only)
# 6 : Setting of read and write permissions is prohibited. (eXecute only)
# 7 : All permissions are prohibited from being set. (No permission)
#
# Example :
# User : Read, Write, eXecute. (0)
# Group : Read, eXecute but no Write. (2)
# Others : Read, eXecute but no Write, (2)
#umask 022
# Storage command : Create add a storage entry point. Up to 16 entry points supported
# Syntax : storage "PATH" "NAME" "OPTIONS"
# Possible store options :
# "rw" = read/write access
# "ro" = read only
# "notmounted" = not mounted by default
# "locked" = lock/unlock feature enabled
storage "/" "root folder" "rw"
storage "/home" "home folder" "ro"
storage "/www" "www folder" "ro,notmounted"
# Add the "locked" option to enable the store lock/unlock feature.
# Execute "umtprd -cmd:unlock" to unlock the locked stores and "umtprd -cmd:lock" to lock them again.
storage "/" "lockable root folder" "rw,locked"
# A user storage using another UID/GID for file operations.
storage "/home/user" "user folder" "rw,locked,uid=33,gid=33"
# Set the USB manufacturer string
manufacturer "Viveris Technologies"
# Set the USB Product string
product "Viveris Technologies"
# Set the USB Serial number string
serial "01234567"
# Set the MTP firmware version
firmware_version "Rev A"
# Set the USB interface string. Should be always "MTP"
interface "MTP"
# Set the USB Vendor ID, Product ID and class
usb_vendor_id 0x1D6B # Linux Foundation
usb_product_id 0x0100 # PTP Gadget
usb_class 0x6 # Image
usb_subclass 0x1 # Still Imaging device
usb_protocol 0x1 #
# Device version
usb_dev_version 0x3008
# inotify support
# If you want disable the events support (beta), uncomment the following line :
# no_inotify 0x1
# Sync when close
# Set this option to 0x1 to request all file data to be flushed from the RAM buffer to the
# internal storage after transfer is completed, this prevents data loss in the case where
# user un-plugged a non-battery-powered device too soon when there are still buffered data
# stayed in the RAM
# sync_when_close 0x0
#
# Internal buffers size
#
# Internal default usb_max_rd_buffer_size and usb_max_wr_buffer_size value set to 0x10000.
# Internal default read_buffer_cache_size value set to 0x100000.
# Uncomment the following lines to reduce the buffers sizes to fix USB issues on iMX6 based systems.
# usb_max_rd_buffer_size 0x200 # MAX usb read size. Must be a multiple of 512 and be less than read_buffer_cache_size
# usb_max_wr_buffer_size 0x200 # MAX usb write size. Must be a multiple of 512.
# read_buffer_cache_size 0x4000 # Read file cache buffer. Must be a 2^x value.
#
# USB gadget device driver path
#
########################################################################
#
# -- Generic FunctionFS Mode --
#
########################################################################
usb_functionfs_mode 0x1
usb_dev_path "/dev/ffs-mtp/ep0"
usb_epin_path "/dev/ffs-mtp/ep1"
usb_epout_path "/dev/ffs-mtp/ep2"
usb_epint_path "/dev/ffs-mtp/ep3"
usb_max_packet_size 0x200
########################################################################
#
# -- GadgetFS Mode : Atmel Sama5D2Xplained board --
#
########################################################################
#usb_functionfs_mode 0x0
#usb_dev_path "/dev/gadget/atmel_usba_udc"
#usb_epin_path "/dev/gadget/ep1"
#usb_epout_path "/dev/gadget/ep2"
#usb_epint_path "/dev/gadget/ep3"
# Max USB packet size
#usb_max_packet_size 0x200
########################################################################
#
# -- GadgetFS Mode : Raspberry PI Zero / Raspberry PI Zero W Boards --
#
########################################################################
#usb_functionfs_mode 0x0
#usb_dev_path "/dev/gadget/20980000.usb"
#usb_epin_path "/dev/gadget/ep1in"
#usb_epout_path "/dev/gadget/ep2out"
#usb_epint_path "/dev/gadget/ep3in"
# Max USB packet size
#usb_max_packet_size 0x200