hikey: Enable USB tethering support
am: d2f8a83
* commit 'd2f8a838bc5bdb075ae694faca13b5e7c2b9ed9d':
hikey: Enable USB tethering support
Change-Id: Ia2844a61a7401d30547620684ac402e4afc5f3e6
diff --git a/init.hikey.rc b/init.hikey.rc
index d8cc95b..b7b08a4 100644
--- a/init.hikey.rc
+++ b/init.hikey.rc
@@ -108,6 +108,16 @@
disabled
oneshot
+service dhcpcd_usb0 /system/bin/dhcpcd -dABKL
+ group dhcp
+ disabled
+ oneshot
+
+service iprenew_usb0 /system/bin/dhcpcd -n
+ class main
+ disabled
+ oneshot
+
service dhcpcd_bt-pan /system/bin/dhcpcd -dABKL
group dhcp
disabled
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index 69ebf40..22be7bf 100644
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -64,4 +64,19 @@
<item>"softap.*"</item>
</string-array>
+ <!-- List of regexpressions describing the interface (if any) that represent tetherable
+ USB interfaces. If the device doesn't want to support tethering over USB this should
+ be empty. An example would be "usb.*" -->
+ <string-array translatable="false" name="config_tether_usb_regexs">
+ <item>"usb\\d"</item>
+ <item>"rndis\\d"</item>
+ </string-array>
+
+ <!-- Array of allowable ConnectivityManager network types for tethering -->
+ <!-- Common options are [1, 4] for TYPE_WIFI and TYPE_MOBILE_DUN or
+ [0,1,5,7] for TYPE_MOBILE, TYPE_WIFI, TYPE_MOBILE_HIPRI and TYPE_BLUETOOTH -->
+ <integer-array translatable="false" name="config_tether_upstream_types">
+ <item>1</item>
+ </integer-array>
+
</resources>