3G Porting SOP Android

From ESS-WIKI
Revision as of 03:31, 10 August 2017 by Clayder.huang (talk | contribs)
Jump to: navigation, search

Introduction

Our Workflow about easily porting 3G/4G module.

How to do about dynamic change 3G/4G module in Android 6.0.1.

Please follow the SOP.

Step1 Push RIL code in vendor folder.

Step2 Add new module in check USB vid/pid script file. (check_mobile.sh)

Step3 Add create new module flag and ril daemon setting. (init.rc)


Push RIL code in vendor folder

(1) Get 3G/4G vendor provide ril source code and porting guide.

(2) Check vendor provide ril code and push to "vendor" folder. ( Reference: https://github.com/ADVANTECH-Corp/android_risc_vendor/tree/android-6.0.1_r22)

(3) Modify the Android.mk.  

  ifeq (foo,foo)
      #build shared library
       LOCAL_SHARED_LIBRARIES += \
        libcutils libutils
        LOCAL_CFLAGS += -DRIL_SHLIB
         LOCAL_MODULE:= libreference-ril                Modify-->  libvendor_name-ril
         include $(BUILD_SHARED_LIBRARY)
     else
     #build executable
      LOCAL_SHARED_LIBRARIES += \
        libril
      LOCAL_MODULE:= reference-ril                      Modify-->  vendor_name-ril
       include $(BUILD_EXECUTABLE)
      endif



Add New Module Check USB

(1) Add check_mobile.sh (Please reference device/fsl/imx6/rsb_4411_a1.mk and device/fsl/rsb_4411_a1/check_mobile.sh)

(2) Modify the check_mobile.sh

   --> Add your 3G/4G vendor and 
   --> Define and Setprop the vendor Flag.  (Example: setprop "ril.telit.start" "1" )
   --> Setprop module.                      (Example: setprop "ril.module" "telit" )

(3) Modify the init.rc.


(4) Reference : https://github.com/ADVANTECH-Corp/android_risc_device/commit/895a49ef16a00a8cbd93571803efee4aef2f3c20

Add New Module RIL Daemon

(1) Add your ril service and create RIL daemon in init.rc (2) Reference : https://github.com/ADVANTECH-Corp/android_risc_device/commit/895a49ef16a00a8cbd93571803efee4aef2f3c20