1 import /init.environ.rc
4 import init.ssd_nomuser.rc
8 # Set init and its forked children's oom_adj.
9 write /proc/1/oom_score_adj -1000
11 # Apply strict SELinux checking of PROT_EXEC on mmap/mprotect calls.
12 #write /sys/fs/selinux/checkreqprot 0
14 # Set the security context for the init process.
15 # This should occur before anything else (e.g. ueventd) is started.
18 # Set the security context of /adb_keys if present.
23 write /proc/bootprof "INIT: usr/eng build setting"
25 mkdir /mnt 0775 root system
33 # Backward compatibility
34 symlink /system/etc /etc
35 symlink /sys/kernel/debug /d
37 # Right now vendor lives on the same filesystem as system,
38 # but someday that may change.
39 symlink /system/vendor /vendor
41 # Create cgroup mount point for cpu accounting
43 mount cgroup none /acct cpuacct
46 # Backwards Compat - XXX: Going away in G*
47 symlink /mnt/sdcard /sdcard
50 mkdir /data 0771 system system
51 mkdir /cache 0770 system cache
52 mkdir /config 0500 root root
54 # See storage config details at http://source.android.com/tech/storage/
55 mkdir /mnt/shell 0700 shell shell
56 mkdir /mnt/media_rw 0700 media_rw media_rw
57 mkdir /storage 0751 root sdcard_r
59 # Directory for putting things only root should see.
60 mkdir /mnt/secure 0700 root root
61 # Create private mountpoint so we can MS_MOVE from staging
62 mount tmpfs tmpfs /mnt/secure mode=0700,uid=0,gid=0
64 # Directory for staging bindmounts
65 mkdir /mnt/secure/staging 0700 root root
67 # Directory-target for where the secure container
68 # imagefile directory will be bind-mounted
69 mkdir /mnt/secure/asec 0700 root root
71 # Secure container public mount points.
72 mkdir /mnt/asec 0700 root system
73 mount tmpfs tmpfs /mnt/asec mode=0755,gid=1000
75 # Filesystem image public mount points.
76 mkdir /mnt/obb 0700 root system
77 mount tmpfs tmpfs /mnt/obb mode=0755,gid=1000
79 write /proc/sys/kernel/panic_on_oops 1
80 write /proc/sys/kernel/hung_task_timeout_secs 0
81 write /proc/cpu/alignment 4
82 write /proc/sys/kernel/sched_latency_ns 10000000
83 write /proc/sys/kernel/sched_wakeup_granularity_ns 2000000
84 write /proc/sys/kernel/sched_compat_yield 1
85 write /proc/sys/kernel/sched_child_runs_first 0
86 write /proc/sys/kernel/randomize_va_space 2
87 write /proc/sys/kernel/kptr_restrict 2
88 write /proc/sys/kernel/dmesg_restrict 1
89 write /proc/sys/vm/mmap_min_addr 32768
90 write /proc/sys/kernel/sched_rt_runtime_us 950000
91 write /proc/sys/kernel/sched_rt_period_us 1000000
93 # change key_provisioning
94 mkdir /data/key_provisioning
95 chmod 0777 /data/key_provisioning
98 mount cgroup none /dev/cpuctl cpu
99 chown system system /dev/cpuctl
100 chown system system /dev/cpuctl/tasks
101 chmod 0660 /dev/cpuctl/tasks
102 write /dev/cpuctl/cpu.shares 1024
103 write /dev/cpuctl/cpu.rt_runtime_us 950000
104 write /dev/cpuctl/cpu.rt_period_us 1000000
106 mkdir /dev/cpuctl/apps
107 chown system system /dev/cpuctl/apps/tasks
108 chmod 0666 /dev/cpuctl/apps/tasks
109 write /dev/cpuctl/apps/cpu.shares 1024
110 write /dev/cpuctl/apps/cpu.rt_runtime_us 800000
111 write /dev/cpuctl/apps/cpu.rt_period_us 1000000
113 #USB function for factory mode
114 # write /sys/class/android_usb/android0/enable 0
115 # write /sys/class/android_usb/android0/idVendor 0e8d
116 # write /sys/class/android_usb/android0/idProduct 2006
117 # write /sys/class/android_usb/android0/f_acm/instances 1
118 # write /sys/class/android_usb/android0/functions mass_storage,adb,acm
119 # write /sys/class/android_usb/android0/enable 1
121 # setprop sys.usb.state mass_storage,adb,acm
123 mkdir /dev/cpuctl/apps/bg_non_interactive
124 chown system system /dev/cpuctl/apps/bg_non_interactive/tasks
125 chmod 0666 /dev/cpuctl/apps/bg_non_interactive/tasks
127 write /dev/cpuctl/apps/bg_non_interactive/cpu.shares 52
128 write /dev/cpuctl/apps/bg_non_interactive/cpu.rt_runtime_us 700000
129 write /dev/cpuctl/apps/bg_non_interactive/cpu.rt_period_us 1000000
131 # Allow everybody to read the xt_qtaguid resource tracking misc dev.
132 # This is needed by any process that uses socket tagging.
133 chmod 0644 /dev/xt_qtaguid
135 # Healthd can trigger a full boot from charger mode by signaling this
136 # property when the power button is held.
137 on property:sys.boot_from_charger_mode=1
141 # Load properties from /system/ + /factory after fs mount.
142 on load_all_props_action
145 # Mount filesystems and start core system services.
152 # Load properties from /system/ + /factory after fs mount. Place
153 # this in another action so that the load will be scheduled after the prior
154 # issued fs triggers have completed.
155 trigger load_all_props_action
161 write /proc/bootprof "INIT:Mount_START"
162 mount_all /fstab.mt8127
164 #change partition permissions
165 exec /system/bin/chmod 0640 /dev/block/platform/mtk-msdc.0/by-name/boot
166 exec /system/bin/chown root:system /dev/block/platform/mtk-msdc.0/by-name/boot
167 exec /system/bin/chmod 0640 /dev/block/platform/mtk-msdc.0/by-name/recovery
168 exec /system/bin/chown root:system /dev/block/platform/mtk-msdc.0/by-name/recovery
169 exec /system/bin/chmod 0640 /dev/block/platform/mtk-msdc.0/by-name/secro
170 exec /system/bin/chown root:system /dev/block/platform/mtk-msdc.0/by-name/secro
171 exec /system/bin/chmod 0660 /dev/block/platform/mtk-msdc.0/by-name/seccfg
172 exec /system/bin/chown root:system /dev/block/platform/mtk-msdc.0/by-name/seccfg
173 exec /system/bin/chmod 0660 /dev/block/platform/mtk-msdc.0/by-name/proinfo
174 exec /system/bin/chown root:system /dev/block/platform/mtk-msdc.0/by-name/proinfo
175 exec /system/bin/chmod 0660 /dev/block/platform/mtk-msdc.0/by-name/otp
176 exec /system/bin/chown root:system /dev/block/platform/mtk-msdc.0/by-name/otp
177 exec /system/bin/chmod 0660 /dev/block/platform/mtk-msdc.0/by-name/nvram
178 exec /system/bin/chown root:system /dev/block/platform/mtk-msdc.0/by-name/nvram
179 exec /system/bin/chmod 0660 /dev/block/platform/mtk-msdc.0/by-name/para
180 exec /system/bin/chown root:system /dev/block/platform/mtk-msdc.0/by-name/para
181 exec /system/bin/chmod 0660 /dev/block/platform/mtk-msdc.0/by-name/logo
182 exec /system/bin/chown root:system /dev/block/platform/mtk-msdc.0/by-name/logo
183 exec /system/bin/chown root:system /dev/block/platform/mtk-msdc.0/by-name/para
184 write /proc/bootprof "INIT:Mount_END"
187 # once everything is setup, no need to modify /
188 mount rootfs rootfs / ro remount
189 # mount shared so changes propagate into child namespaces
190 mount rootfs rootfs / shared rec
191 mount tmpfs tmpfs /mnt/secure private rec
193 # We chown/chmod /data again so because mount is run as root + defaults
194 chown system system /system/data
195 chmod 0777 /system/data
197 # Same reason as /data above
198 chown system cache /cache
200 # We restorecon /cache in case the cache partition has been reset.
201 restorecon_recursive /cache
203 mkdir /cache/recovery 0770 system system
205 #mount yaffs2 mtd@nvram /nvram nandboot
206 mount ext4 /dev/block/platform/mtk-msdc.0/by-name/SEC_RO /system/secro
207 mount ext4 /dev/block/platform/mtk-msdc.0/by-name/SEC_RO /system/secro ro remount
209 # This may have been created by the recovery system with odd permissions
210 chown system cache /cache/recovery
211 chmod 0770 /cache/recovery
212 # This may have been created by the recovery system with the wrong context.
213 restorecon /cache/recovery
215 #change permissions on vmallocinfo so we can grab it from bugreports
216 chown root log /proc/vmallocinfo
217 chmod 0440 /proc/vmallocinfo
219 chown root log /proc/slabinfo
220 chmod 0440 /proc/slabinfo
222 #change permissions on kmsg & sysrq-trigger so bugreports can grab kthread stacks
223 chown root system /proc/kmsg
224 chmod 0440 /proc/kmsg
225 chown root system /proc/sysrq-trigger
226 chmod 0220 /proc/sysrq-trigger
227 chown system log /proc/last_kmsg
228 chmod 0440 /proc/last_kmsg
230 # create the lost+found directories, so as to enforce our permissions
231 mkdir /cache/lost+found 0770 root root
233 # make the selinux kernel policy world-readable
234 chmod 0444 /sys/fs/selinux/policy
236 # create the lost+found directories, so as to enforce our permissions
237 mkdir /cache/lost+found 0770 root root
239 restorecon_recursive /protect_f
240 restorecon_recursive /protect_s
243 # We chown/chmod /data again so because mount is run as root + defaults
244 chown system system /data
246 # We restorecon /data in case the userdata partition has been reset.
249 # Create dump dir and collect dumps.
250 # Do this before we mount cache so eventually we can use cache for
251 # storing dumps on platforms which do not have a dedicated dump partition.
252 mkdir /data/dontpanic 0750 root log
254 # Collect apanic data, free resources and re-arm trigger
255 copy /proc/apanic_console /data/dontpanic/apanic_console
256 chown root log /data/dontpanic/apanic_console
257 chmod 0640 /data/dontpanic/apanic_console
259 copy /proc/apanic_threads /data/dontpanic/apanic_threads
260 chown root log /data/dontpanic/apanic_threads
261 chmod 0640 /data/dontpanic/apanic_threads
263 write /proc/apanic_console 1
264 # create basic filesystem structure
265 mkdir /data/nvram 2770 root system
266 mkdir /data/misc 01771 system misc
267 mkdir /data/misc/adb 02750 system shell
268 mkdir /data/misc/bluetoothd 0770 bluetooth bluetooth
269 mkdir /data/misc/bluetooth 0770 system system
270 mkdir /data/misc/keystore 0700 keystore keystore
271 mkdir /data/misc/keychain 0771 system system
272 mkdir /data/misc/sms 0770 system radio
273 mkdir /data/misc/vpn 0770 system vpn
274 mkdir /data/misc/systemkeys 0700 system system
275 # give system access to wpa_supplicant.conf for backup and restore
276 mkdir /data/misc/wifi 0770 wifi wifi
277 chmod 0660 /data/misc/wifi/wpa_supplicant.conf
278 mkdir /data/local 0771 shell shell
279 mkdir /data/local/tmp 0771 shell shell
280 mkdir /data/data 0771 system system
281 mkdir /data/app-private 0771 system system
282 mkdir /data/app-asec 0700 root root
283 mkdir /data/app-lib 0771 system system
284 mkdir /data/app 0771 system system
285 mkdir /data/property 0700 root root
286 mkdir /data/ssh 0750 root shell
287 mkdir /data/ssh/empty 0700 root root
289 # create dalvik-cache, so as to enforce our permissions
290 mkdir /data/dalvik-cache 0771 system system
292 # create resource-cache and double-check the perms
293 mkdir /data/resource-cache 0771 system system
294 chown system system /data/resource-cache
295 chmod 0771 /data/resource-cache
297 # create the lost+found directories, so as to enforce our permissions
298 mkdir /data/lost+found 0770
299 mkdir /cache/lost+found 0770
301 # double check the perms, in case lost+found already exists, and set owner
302 chown root root /data/lost+found
303 chmod 0770 /data/lost+found
304 chown root root /cache/lost+found
305 chmod 0770 /cache/lost+found
307 mkdir /data/drm 0770 drm drm
310 mkdir /data/misc/dhcp 0770 dhcp dhcp
311 chown dhcp dhcp /data/misc/dhcp
313 # device info interface
314 #insmod /system/lib/modules/devinfo.ko
315 #mknod /dev/devmap c 196 0;
316 chmod 0444 /dev/devmap
317 chown root system /dev/devmap
319 # load driver base driver
320 insmod /system/lib/modules/mtk_drvb_75.ko
321 mknod /dev/drvb c 176 0
326 ## Custom pos-fs area (START)
327 write /proc/sys/vm/overcommit_memory 1
328 write /proc/sys/vm/min_free_order_shift 4
329 chown root system /sys/module/lowmemorykiller/parameters/adj
330 chmod 0664 /sys/module/lowmemorykiller/parameters/adj
331 chown root system /sys/module/lowmemorykiller/parameters/minfree
332 chmod 0664 /sys/module/lowmemorykiller/parameters/minfree
334 # Tweak background writeout
335 write /proc/sys/vm/dirty_expire_centisecs 200
336 write /proc/sys/vm/dirty_background_ratio 5
338 # Permissions for System Server and daemons.
339 chown radio system /sys/android_power/state
340 chown radio system /sys/android_power/request_state
341 chown radio system /sys/android_power/acquire_full_wake_lock
342 chown radio system /sys/android_power/acquire_partial_wake_lock
343 chown radio system /sys/android_power/release_wake_lock
344 chown system system /sys/power/autosleep
345 chown system system /sys/power/state
346 chown system system /sys/power/wakeup_count
347 chown radio system /sys/power/wake_lock
348 chown radio system /sys/power/wake_unlock
349 chmod 0660 /sys/power/state
350 chmod 0660 /sys/power/wake_lock
351 chmod 0660 /sys/power/wake_unlock
353 chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_rate
354 chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/timer_rate
355 chown system system /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
356 chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
357 chown system system /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
358 chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
359 chown system system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
360 chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
361 chown system system /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
362 chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
363 chown system system /sys/devices/system/cpu/cpufreq/interactive/boost
364 chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boost
365 chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse
366 chown system system /sys/devices/system/cpu/cpufreq/interactive/input_boost
367 chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/input_boost
368 chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
369 chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
371 # Assume SMP uses shared cpufreq policy for all CPUs
372 chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
373 chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
375 chown system system /sys/class/timed_output/vibrator/enable
376 chown system system /sys/class/leds/keyboard-backlight/brightness
377 chown system system /sys/class/leds/lcd-backlight/brightness
378 chown system system /sys/class/leds/button-backlight/brightness
379 chown system system /sys/class/leds/jogball-backlight/brightness
380 chown system system /sys/class/leds/red/brightness
381 chown system system /sys/class/leds/green/brightness
382 chown system system /sys/class/leds/blue/brightness
383 chown system system /sys/class/leds/red/device/grpfreq
384 chown system system /sys/class/leds/red/device/grppwm
385 chown system system /sys/class/leds/red/device/blink
386 chown system system /sys/class/leds/red/brightness
387 chown system system /sys/class/leds/green/brightness
388 chown system system /sys/class/leds/blue/brightness
389 chown system system /sys/class/leds/red/device/grpfreq
390 chown system system /sys/class/leds/red/device/grppwm
391 chown system system /sys/class/leds/red/device/blink
392 chown system system /sys/class/timed_output/vibrator/enable
393 chown system system /sys/module/sco/parameters/disable_esco
394 chown system system /sys/kernel/ipv4/tcp_wmem_min
395 chown system system /sys/kernel/ipv4/tcp_wmem_def
396 chown system system /sys/kernel/ipv4/tcp_wmem_max
397 chown system system /sys/kernel/ipv4/tcp_rmem_min
398 chown system system /sys/kernel/ipv4/tcp_rmem_def
399 chown system system /sys/kernel/ipv4/tcp_rmem_max
400 chown root radio /proc/cmdline
402 # Define TCP buffer sizes for various networks
403 # ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
404 setprop net.tcp.buffersize.default 4096,87380,110208,4096,16384,110208
405 setprop net.tcp.buffersize.wifi 524288,1048576,2097152,262144,524288,1048576
406 setprop net.tcp.buffersize.lte 524288,1048576,2097152,262144,524288,1048576
407 setprop net.tcp.buffersize.umts 4094,87380,110208,4096,16384,110208
408 setprop net.tcp.buffersize.hspa 4094,87380,262144,4096,16384,262144
409 setprop net.tcp.buffersize.hsupa 4094,87380,262144,4096,16384,262144
410 setprop net.tcp.buffersize.hsdpa 4094,87380,262144,4096,16384,262144
411 setprop net.tcp.buffersize.hspap 4094,87380,1220608,4096,16384,1220608
412 setprop net.tcp.buffersize.edge 4093,26280,35040,4096,16384,35040
413 setprop net.tcp.buffersize.gprs 4092,8760,11680,4096,8760,11680
414 setprop net.tcp.buffersize.evdo 4094,87380,262144,4096,16384,262144
416 # Set this property so surfaceflinger is not started by system_init
417 setprop system_init.startsurfaceflinger 0
420 chown root diag /sys/module/tpd_setting/parameters/tpd_calmat
421 chown root diag /sys/module/tpd_setting/parameters/tpd_em_debounce_time
422 chown root diag /sys/module/tpd_debug/parameters/tpd_em_log
423 chown root diag /sys/module/tpd_debug/parameters/tpd_em_log_to_fs
425 chmod 0777 /dev/pmem_multimedia
426 chmod 0777 /dev/mt6516-isp
427 chmod 0777 /dev/mt6516-IDP
428 chmod 0777 /dev/mt9p012
429 chmod 0777 /dev/mt6516_jpeg
430 chmod 0777 /dev/FM50AF
433 mkdir /data/misc/rtc 0770 system system
436 #insmod /system/lib/modules/m4u.ko
437 #mknod /dev/M4U_device c 188 0
438 chmod 0444 /dev/M4U_device
441 chmod 0666 /dev/hwmsensor
442 chmod 0666 /dev/msensor
443 chmod 0666 /dev/gsensor
444 chmod 0666 /dev/alsps
447 insmod /system/lib/modules/vcodec_kernel_driver.ko
448 mknod /dev/Vcodec c 189 0
449 chmod 0666 /dev/Vcodec
455 chmod 0666 /dev/mtgpio
458 rm /data/mtknfc_server
460 ## Custom pos_fs area (END)
462 # Separate location for storing security policy files on data
463 mkdir /data/security 0711 system system
465 # Reload policy from /data/security if present.
466 setprop selinux.reload_policy 1
468 # Set SELinux security contexts on upgrade or policy update.
469 restorecon_recursive /data
471 # If there is no fs-post-data action in the init.<device>.rc file, you
472 # must uncomment this line, otherwise encrypted filesystems
474 # Set indication (checked by vold) that we have finished this action
475 setprop vold.post_fs_data_done 1
484 domainname localdomain
486 # Define RIL properties
487 setprop rild.nw.operlist /system/etc/ril/oper.lis
489 chmod 0777 /system/bin/mtk_agpsd
491 # Start default class, this line is very important!!
497 class_start late_start
499 on property:vold.decrypt=trigger_default_encryption
502 on property:vold.decrypt=trigger_encryption
506 on property:vold.decrypt=trigger_reset_main
509 on property:vold.decrypt=trigger_load_persist_props
512 on property:vold.decrypt=trigger_post_fs_data
515 on property:vold.decrypt=trigger_restart_min_framework
518 on property:vold.decrypt=trigger_restart_framework
521 class_start late_start
522 start permission_check
524 on property:vold.decrypt=trigger_shutdown_framework
525 class_reset late_start
528 ## Daemon processes to be run by init.
531 # Update the second boot logo
532 # service bootlogoupdater /system/bin/boot_logo_updater
535 service ueventd /sbin/ueventd
538 seclabel u:r:ueventd:s0
540 service logd /system/bin/logd
542 socket logd stream 0666 logd logd
543 socket logdr seqpacket 0666 logd logd
544 socket logdw dgram 0222 logd logd
547 service kisd /system/bin/kisd
551 service console /system/bin/sh
557 seclabel u:r:shell:s0
559 on property:sys.powerctl=*
560 powerctl ${sys.powerctl}
562 on property:ro.debuggable=1
565 # adbd is controlled via property triggers in init.<platform>.usb.rc
566 service adbd /sbin/adbd --root_seclabel=u:r:su:s0
568 socket adbd stream 660 system system
572 # adbd on at boot in emulator
573 on property:ro.kernel.qemu=1
575 service servicemanager /system/bin/servicemanager
581 service vold /system/bin/vold
583 socket vold stream 0660 root mount
586 # One shot invocation to deal with encrypted volume.
587 service defaultcrypto /system/bin/vdc --wait cryptfs mountdefaultencrypted
590 # vold will set vold.decrypt to trigger_restart_framework (default
591 # encryption) or trigger_restart_min_framework (other encryption)
593 # One shot invocation to encrypt unencrypted volumes
594 service encrypt /system/bin/vdc --wait cryptfs enablecrypto inplace default
597 # vold will set vold.decrypt to trigger_restart_framework (default
600 service netd /system/bin/netd
602 socket netd stream 0660 root system
603 socket dnsproxyd stream 0660 root inet
604 socket mdns stream 0660 root system
606 #service debuggerd /system/bin/debuggerd
609 service ril-daemon /system/bin/rild
611 socket rild stream 660 root radio
612 socket rild-debug stream 660 radio system
614 group radio cache inet misc audio log
616 # adbd is controlled via property triggers in init.<platform>.usb.rc
617 service adbd /sbin/adbd
620 service drvbd /system/bin/drvbd
625 ## Custom service area (START)
626 # Please add custom service below
627 service nvram_daemon /system/bin/nvram_daemon
633 service NvRAMAgent /system/bin/nvram_agent_binder
637 service mdlogger /system/bin/mdlogger
640 group shell system radio sdcard_rw inet
644 service dualmdlogger /system/bin/dualmdlogger
647 group shell system radio sdcard_rw inet
651 service factory_no_image /system/bin/factory
655 service factory_with_image /sbin/factory
660 ## Custom service area (END)
663 on property:sys.mtk.no.factoryimage=1
664 start factory_no_image
666 on property:sys.mtk.no.factoryimage=0
667 start factory_with_image
669 #mass_storage,adb,acm
670 on property:ro.boot.usbconfig=0
671 write /sys/class/android_usb/android0/iSerial $ro.serialno
672 write /sys/class/android_usb/android0/enable 0
673 write /sys/class/android_usb/android0/idVendor 0e8d
674 write /sys/class/android_usb/android0/idProduct 2006
675 write /sys/class/android_usb/android0/f_acm/instances 1
676 write /sys/class/android_usb/android0/functions mass_storage,adb,acm
677 write /sys/class/android_usb/android0/enable 1
681 on property:ro.boot.usbconfig=1
682 write /sys/class/android_usb/android0/enable 0
683 write /sys/class/android_usb/android0/iSerial " "
684 write /sys/class/android_usb/android0/idVendor 0e8d
685 write /sys/class/android_usb/android0/idProduct 2007
686 write /sys/class/android_usb/android0/f_acm/instances 1
687 write /sys/class/android_usb/android0/functions acm
688 write /sys/class/android_usb/android0/bDeviceClass 02
689 write /sys/class/android_usb/android0/enable 1