====================
Non-RIL Source Files
====================
These files should be installed in the source tree as follows:

kernel/hikey-linaro/drivers/net/usb/Kconfig
kernel/hikey-linaro/drivers/net/usb/Makefile
kernel/hikey-linaro/drivers/net/usb/GobiUSBNet.c
kernel/hikey-linaro/drivers/net/usb/QMI.c
kernel/hikey-linaro/drivers/net/usb/QMI.h
kernel/hikey-linaro/drivers/net/usb/QMIDevice.c
kernel/hikey-linaro/drivers/net/usb/QMIDevice.h
kernel/hikey-linaro/drivers/net/usb/Structs.h
kernel/hikey-linaro/drivers/net/usb/gobi_usbnet.h
kernel/hikey-linaro/drivers/net/usb/usbnet.c
 - Gobi network driver
 - Path is taken from the reference platform build
 - copy the new files to the appropriate locations
 - merge the existing files to the appropriate locations
 - make sure this driver is enabled in the kernel .config file

kernel/hikey-linaro/drivers/usb/serial/sierra.c
 - Sierra Wireless serial driver
 - Path is taken from the reference platform build
 - copy the file to the appropriate location overwriting any existing file
 - make sure this driver is enabled in the kernel .config file
 - make sure qcserial driver is DISABLED in the kernel .config file

kernel/hikey-linaro/drivers/net/usb/sierra_net.c
 - Sierra Wireless network driver
 - copy the file to the appropriate location overwriting any existing file
 - make sure this driver is enabled in the kernel .config file

kernel/hikey-linaro/drivers/net/usb/cdc_ether.c
 - HL8548 usb driver
 - Path is taken from the reference platform build
 - copy the file to the appropriate location overwriting any existing file
 - make sure this driver is enabled in the kernel .config file

system/core/init/devices.cpp
 - the changes to switch MBIM mode to QMI mode during first enumeration.   
   
external/dhcpcd
hardware/sierra/external/dhcpcd_Q.patch
device/linaro/hikey/config.fs
 - dhcpcd required for HL8xxx modem data session.    
 - Get source code get from AOSP (ie: git clone https://android.googlesource.com/platform/external/dhcpcd)
 - Apply the patch and also add below lines into platform for DHCP client.
   PRODUCT_PACKAGES += dhcpcd \
                       dhcpcd-run-hooks
   TARGET_FS_CONFIG_GEN += device/linaro/hikey/config.fs 
   
device/linaro/hikey/overlay/frameworks/base/core/res/res/values/config.xml
 - this file is taken from our reference platform.
 - it may be necessary to merge the Sierra specific changes into the corresponding
   config.xml file on your platform. All Sierra changes are surrounded by comments
   containing SWISTART and SWISTOP.

frameworks/base/telephony/java/com/android/internal/telephony/DctConstants.java
 - we found that these changes are necessary to get the CDMAPhone object 
   to work correctly for MC8355 modems.
 - merge with the existing files.  All Sierra changes are surrounded by
   comments containing SWISTART and SWISTOP.

frameworks/opt/telephony/src/java/com/android/internal/telephony/Phone.java
frameworks/opt/telephony/src/java/com/android/internal/telephony/GsmCdmaPhone.java
frameworks/opt/telephony/src/java/com/android/internal/telephony/OemHookIndication.java
 - Data call not happening when coming out of Airplane mode
 - optional framework change to upport OEM unsolicited response from AT command base modem
 - changes are necessary for HL series FOTA through AVMS
 - comments containing SWISTART and SWISTOP
  
frameworks/opt/telephony/src/java/com/android/internal/telephony/ServiceStateTracker.java
 - we found that these changes are necessary to get the Phone object 
   to work well with MC7750 modems.
 - merge with the existing files.  All Sierra changes are surrounded by
   comments containing SWISTART and SWISTOP.

frameworks/opt/telephony/src/java/com/android/internal/telephony/BaseCommands.java
frameworks/opt/telephony/src/java/com/android/internal/telephony/GsmCdmaPhone.java 
frameworks/opt/telephony/src/java/com/android/internal/telephony/dataconnection/DcTracker.java 
packages/apps/Dialer/java/com/android/dialer/dialpadview/SpecialCharSequenceMgr.java 
 - Add support OMADM GUI.
 - merge with the existing files.  All Sierra changes are surrounded by
   comments containing SWISTART and SWISTOP. 
 
frameworks/base/core/java/com/android/server/BootReceiver.java
 - these changes are necessary to execute com.sierra.logs app
 - com.sierra.logs will execute logcat in root mode with these changes

frameworks/base/core/res/AndroidManifest.xml 
 - Required for com.sierra.logs app running in Android 5.x and later

packages/apps/CarrierConfig/assets/carrier_config_carrierid_1839_Verizon-Wireless.xml
 - Require for Verizon certication (Optional).
 


device/linaro/hikey/manifest.xml
 - HAL definition for reference.
 
device/linaro/hikey/sepolicy/device.te
device/linaro/hikey/sepolicy/dhcp.te
device/linaro/hikey/sepolicy/file.te
device/linaro/hikey/sepolicy/file_contexts
device/linaro/hikey/sepolicy/init-insmod-sh.te
device/linaro/hikey/sepolicy/kernel.te
device/linaro/hikey/sepolicy/property_contexts
device/linaro/hikey/sepolicy/rild.te
device/linaro/hikey/sepolicy/sierra_dhcpcd.te
device/linaro/hikey/sepolicy/sierra_config_ip.te
device/linaro/hikey/sepolicy/vendor_init.te
device/linaro/hikey/sepolicy/hal_gnss_default.te
device/linaro/hikey/sepolicy/shell.te
 - Configuration files for RIL running in SELinux.

===================
Binary/Target Files
===================

These files should be used on the target device file system as follows:
AndroidFS/vendor/bin/swihltrace
AndroidFS/vendor/bin/slqssdk
AndroidFS/vendor/bin/SierraDMLog
AndroidFS/vendor/bin/SierraFwDl7xxx
AndroidFS/vendor/bin/SierraImgMgr
AndroidFS/vendor/bin/SierraSARTool
AndroidFS/vendor/bin/DownloadTool
AndroidFS/vendor/lib64/libsierra-ril.so
AndroidFS/vendor/lib64/libsierraat-ril.so
AndroidFS/vendor/lib64/libsierrahl-ril.so
AndroidFS/vendor/lib64/libswims.so
AndroidFS/vendor/lib64/libswiqmiapi.so
AndroidFS/vendor/lib64/libDownloadTool.so
AndroidFS/vendor/lib/libDownloadTool.so
 - copy to the target device file system


AndroidFS/system/app/com.sierra.logs/com.sierra.logs.apk
 - Sample app for capturing Radio and Main Logs.
 
AndroidFS/system/app/swiomadm/swiomadm.apk
 - Sample app for display Sprint specific menu. The Sprint menu will show up by 
   enter specific code on dialer.   
 - Perform OMA DM Service.
 
AndroidFS/system/app/swifota/swifota.apk
 - Sample app for perform AVMS Service.
 
AndroidFS/system/app/simswitcher/simswitcher.apk 
 - Sample app for switching SIM slot. The active slot could be switched by press the slot buttons. 

AndroidFS/vendor/etc/init/android.hardware.gnss@2.0-service-swi.rc
AndroidFS/vendor/etc/vintf/manifest/android.hardware.gnss@2.0-service-swi.xml
AndroidFS/vendor/bin/hw/android.hardware.gnss@2.0-service-swi
 - for GNSS HAL 2.0, copy to /vendor on the target device file system.

AndroidFS/vendor/bin/hw/rild-swi
AndroidFS/vendor/bin/hw/android.hardware.radio.config@1.2-service-swi
AndroidFS/vendor/lib64/libril-swi.so
AndroidFS/vendor/lib64/librilutils.so
AndroidFS/vendor/etc/init/rild_swi.rc
AndroidFS/vendor/etc/init/android.hardware.radio.config@1.2-service-swi.rc
 - for Radio HAL 1.4 and RadioConfig HAL 1.2, copy to /vendor on the target device file system.

AndroidFS/vendor/bin/init.dhcpcd
 - copy to the target device file system
 - if you already have an existing file by the same name, do not merge them
   but instead rename this file to something else, and update init.rc
   with that name.

AndroidFS/vendor/bin/init.config.ip
AndroidFS/vendor/bin/ip
 - copy to the target device file system
 - IP config script for HL75xx series modem 

AndroidFS/vendor/bin/init.insmod.sh
 -  copy to the target device file system
 -  insmod USB driver for sierra modules
 
AndroidFS/vendor/etc/init/init.common.rc
AndroidFS/vendor/etc/init/rild.legacy.rc
AndroidFS/vendor/ueventd.rc 
 - these are taken from our reference platform.
 - merge the Sierra specific changes into your files.  All Sierra changes 
   are surrounded by comments containing SWISTART and SWISTOP.
 - Note that some of the lines are only applicable to a different type of
   Sierra Wireless modem, and so can be omitted.  These lines are:
     insmod /system/lib/modules/sierra_net.ko


======================
Network Interface Name 
======================

The network interface name is "usbx" or "wwanx" for HL, QMI or AT RIL where x is an integer, usually 0 or 1.
The exact value depends on what other usb network devices are on the target device.  

The following files:

AndroidFS/system/bin/init.dhcpcd

are hard-coded with usb0/wwan0.  If this is not the correct network name on your 
target device, please change usb0/wwan0 to the correct name.



=========================
Switch between HL/AT/QMI/AR RIL
=========================

QMI, HL, AR and AT RIL are included in the release package. The default setting is QMI RIL.
It is possible to switch between them by change the system property:
    persist.sys.ril.type=[QMI | HL | AT]
    rild.libpath=/vendor/lib64/[libsierra-ril.so | libsierrahl-ril.so | libsierraat-ril.so ] 

