android_sdk/apps/Quectel_RILv3.6.24/chatBinary files differ
android_sdk/apps/Quectel_RILv3.6.24/ip-downBinary files differ
android_sdk/apps/Quectel_RILv3.6.24/ip-upBinary files differ
android_sdk/apps/Quectel_RILv3.6.24/libreference-ril.soBinary files differ
android_sdk/apps/Quectel_RILv3.6.24/ql-ril.conf
New file @@ -0,0 +1,62 @@ #This file is in a state of unavailability. #In most cases, there is no need to open any option. #In special cases, please use it under the guidance of FAE. #LTE_SignalStrength=-1 #LTE_Is_Report_SignalStrength=1 #At_Cmds_For_Customer_Initialize=at+csq;at+cgreg?;at+cops?;at+qcfg="nwscanmodeex" #Icc_Constants=EF_ICCID #support_CDMPhone=1 #URC_delay_mseconds=2000 #Query_Available_Networks=1 #Sim_Hot_Plugging=1 #0-not support; 1-support low level; 2-support high level #at_qcrmcall=1 #Recovery_App= #ATT_Test=1 #need_switch_CMT_to_CMTI=1 #RevokeClientIDIndication=1 #PS_ONLY=1 #check_data_stall=1 #POLL_CALL_STATE=1 #support_fota=1 #url and local path should start with 'fota:'. such as 'fota:/data/EC200Txxxxxxx.bin' #autoUnlockPin=1 #check_sms_manually=1 #support_x55_loopback=1 #manifest_path=/odm/etc/vintf/xxx.xml #xxx.xml is the name of manifest,such as manifest_m50_nonpayment_cell.xml #usb_port_path1= #usb_port_path2= #use_dsda=1 #RIL_REQUEST_SHUTDOWN_SUPPORT=0 #RM500Voice=1 #SetPreferredNetworkType_NR=1 #asr_support_gps=1 #support_mdm_rndis=1 #BG95_ECM=1 #ASR_ECM=1 #RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE_SUPPORT=0 #RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL_SUPPORT=0 #NO_USE_PROFILE_ID=1 #asr_zhanrui_support_ipv6=1 #not_support_0b00=1 #ue_function_mode=1 ##1 data only 2 data voice 3 data_voice_roaming 4 voice only #active_query_network_resident=1 #asr_zhanrui_support_ipv6=1' #plane_mode_0=1 #use_MTK=1 #auto_suspend_ignore_platform=1 #enable_em05_suspend_workaround=1 #auto_suspend_delay_time= #asr_support_gps=1 #support_gnssrawdata=1 #Dial_log_tcp_port=9000 #The general range is 1~65535 #libnetutils_path= #libcutils_path= #stop_sent_at=1 #vzw_test=1 #quectel_libril=1 #support_mbim=1; #support_ecm=1; #support_esim=1; #lte_signalstrength_to_nsa_endc=1 #disable_ims=1 #qcfg_nat=1 android_sdk/apps/canutils.rarBinary files differ
android_sdk/apps/mt7601u.binBinary files differ
android_sdk/build.sh
New file @@ -0,0 +1,211 @@ #!/bin/bash # this project absolute path PRJ_PATH=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd) # top project absolute path TOP_PATH=$(realpath $PRJ_PATH/..) # SDK build workspace SDK_DIR=/work/sdk_build # binaries build prefix install path PRFX_PATH=$PRJ_PATH/install # binaries finally install path if needed #INST_PATH=/tftp # download taballs path TARBALL_PATH=$PRJ_PATH/tarballs # config file path CONF_FILE=$TOP_PATH/config.json #4g files path FILES_PATCH_4G=$PRJ_PATH/apps/Quectel_RILv3.6.24 #wifi firmware path FILES_PATCH_WIFI=$PRJ_PATH/apps # shell script will exit once get command error set -e #+-------------------------+ #| Shell script functions | #+-------------------------+ function pr_error() { echo -e "\033[40;31m $1 \033[0m" } function pr_warn() { echo -e "\033[40;33m $1 \033[0m" } function pr_info() { echo -e "\033[40;32m $1 \033[0m" } # decompress a packet to destination path function do_unpack() { tarball=$1 dstpath='pwd' if [[ $# == 2 ]] ; then dstpath=$2 fi pr_info "decompress $tarball => $dstpath" mkdir -p $dstpath case $tarball in *.tar.gz) tar -xzf $tarball -C $dstpath ;; *.tgz) tar -xzf $tarball -C $dstpath ;; *.tar.bz2) tar -xjf $tarball -C $dstpath ;; *.tar.xz) tar -xJf $tarball -C $dstpath ;; *.tar.zst) tar -I zstd -xf $tarball -C $dstpath ;; *.tar) tar -xf $tarball -C $dstpath ;; *.zip) unzip -qo $tarball -d $dstpath ;; *) pr_error "decompress Unsupport packet: $tarball" return 1; ;; esac } # parser configure file and export environment variable function export_env() { export BOARD=`jq -r ".board" $CONF_FILE | tr 'A-Z' 'a-z'` export SDK_VER=`jq -r ".android.sdk_ver" $CONF_FILE` export SDK_PATH=`jq -r ".android.sdk_path" $CONF_FILE` export ARCH=arm64 if [[ $BOARD =~ igkboard-rk3568 ]] ; then LUNCH_BOARD=rk3568_t-userdebug fi PYTHON_VERSION=$(python --version 2>&1 | awk '{print $2}' | cut -d. -f1) if [ $PYTHON_VERSION != "3" ] ; then PYTHON_VERSION=$(python --version 2>&1) pr_error "ERROR: This SDK build need Python3, current version is $PYTHON_VERSION" pr_warn "You can use 'sudo update-alternatives --config python' command to switch it" exit fi } function do_fetch() { SDK_FPATH=$SDK_PATH/$SDK_VER PATCH_FLAG="$SDK_DIR/kernel-5.10/arch/arm64/configs/rockchip_defconfig" if [ -e $PATCH_FLAG ] ; then pr_warn "SDK source code fetched already, skip do fetch" fi if [ ! -d $SDK_DIR/.repo ] ; then SDK_FILE=$SDK_PATH/$SDK_VER.tar.bz2 if [ ! -e $SDK_FILE ] ; then pr_error "ERROR: SDK package '$SDK_FILE' doesn't exist!" exit fi pr_info "decompress SDK tarball $SDK_FILE..." do_unpack $SDK_FILE $SDK_DIR fi cd $SDK_DIR if [ ! -e $PATCH_FLAG ] ; then pr_info "repo sync to checkout source code..." ./.repo/repo/repo sync -l fi if ! grep -q '^CONFIG_CAN=y' $PATCH_FLAG ; then pr_info "patch for android..." cd kernel-5.10 patch -p1 < $PRJ_PATH/patches/kernel.patch cd ../vendor/rockchip/common/ patch -p1 < $PRJ_PATH/patches/4g_patch/vendor.patch cd $SDK_DIR/device/rockchip/common/ patch -p1 < $PRJ_PATH/patches/4g_patch/device_rockchip.patch cd $SDK_DIR/device/google/atv/ patch -p1 < $PRJ_PATH/patches/4g_patch/device_google.patch cd $SDK_DIR/hardware/interfaces/ patch -p1 < $PRJ_PATH/patches/4g_patch/hardware_interfaces.patch cd $SDK_DIR/hardware/ril/ patch -p1 < $PRJ_PATH/patches/4g_patch/hardware_ril.patch cd $SDK_DIR/frameworks/opt/telephony/ patch -p1 < $PRJ_PATH/patches/4g_patch/frameworks_opt_telephony.patch pr_info "copy 4G RIL library..." cp -f $FILES_PATCH_4G/ip-* $SDK_DIR/vendor/rockchip/common/phone/etc/ppp/ cp -f $FILES_PATCH_4G/ql-ril.conf $SDK_DIR/vendor/rockchip/common/phone/etc/ppp/ cp -f $FILES_PATCH_4G/chat $SDK_DIR/vendor/rockchip/common/phone/bin/ cp -f $FILES_PATCH_4G/libreference-ril.so $SDK_DIR/vendor/rockchip/common/phone/lib/libreference-ril-em05.so pr_info "copy wifi firmware..." cp -f $FILES_PATCH_WIFI/mt7601u.bin $SDK_DIR/vendor/rockchip/common/wifi/firmware cd fi } function do_build() { pr_info "Choose your board" cd $SDK_DIR source build/envsetup.sh lunch $LUNCH_BOARD ./build.sh -AUCKu pr_info "System image will be installed to $SDK_DIR/rockdev/Image-rk3568_t" ls ./rockdev/Image-rk3568_t } #+-------------------------+ #| Shell script body entry | #+-------------------------+ export_env pr_warn "start build android sdk for ${BOARD}" do_fetch do_build android_sdk/patches/4g_patch/device_google.patch
New file @@ -0,0 +1,13 @@ diff --git a/overlay/TvFrameworkOverlay/res/values/config.xml b/overlay/TvFrameworkOverlay/res/values/config.xml index eba2806..d83fbe4 100644 --- a/overlay/TvFrameworkOverlay/res/values/config.xml +++ b/overlay/TvFrameworkOverlay/res/values/config.xml @@ -30,7 +30,7 @@ <bool name="config_sms_capable">false</bool> <!-- This device does not support mobile data. --> - <bool name="config_mobile_data_capable">false</bool> + <bool name="config_mobile_data_capable">true</bool> <!-- Control the default UI mode type to use when there is no other type override happening. One of the following values (See Configuration.java): android_sdk/patches/4g_patch/device_rockchip.patch
New file @@ -0,0 +1,65 @@ diff --git a/BoardConfig.mk b/BoardConfig.mk index 0d1c886..11f299b 100755 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -297,7 +297,7 @@ BOARD_FORCE_UDISK_VISIBLE ?= true BOARD_DISABLE_SAFE_MODE ?= true #enable 3g dongle -BOARD_HAVE_DONGLE ?= false +BOARD_HAVE_DONGLE ?= true #for boot and shutdown animation ringing BOOT_SHUTDOWN_ANIMATION_RINGING ?= false @@ -328,7 +328,7 @@ BOARD_BLUETOOTH_LE_SUPPORT ?= true BOARD_WIFI_SUPPORT ?= true #for rk 4g modem -BOARD_HAS_RK_4G_MODEM ?= false +BOARD_HAS_RK_4G_MODEM ?= true #for rk DLNA PRODUCT_HAVE_DLNA ?= false diff --git a/modules/4g_modem.mk b/modules/4g_modem.mk index 5037d9e..7c84692 100644 --- a/modules/4g_modem.mk +++ b/modules/4g_modem.mk @@ -18,7 +18,7 @@ PRODUCT_PACKAGES += \ CarrierDefaultApp \ CarrierConfig \ rild \ - librk-ril \ + libreference-ril-em05 \ dhcpcd PRODUCT_COPY_FILES += vendor/rockchip/common/phone/etc/apns-full-conf.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/apns-conf.xml @@ -35,14 +35,14 @@ DEVICE_MANIFEST_FILE += device/rockchip/common/4g_modem/manifest.xml ifeq ($(strip $(TARGET_ARCH)), arm64) PRODUCT_PROPERTY_OVERRIDES += \ - vendor.rild.libpath=/vendor/lib64/librk-ril.so + vendor.rild.libpath=/vendor/lib64/libreference-ril-em05.so PRODUCT_COPY_FILES += \ - $(LOCAL_PATH)/4g_modem/bin64/dhcpcd:$(TARGET_COPY_OUT_VENDOR)/bin/dhcpcd \ - $(LOCAL_PATH)/4g_modem/lib64/librk-ril.so:$(TARGET_COPY_OUT_VENDOR)/lib64/librk-ril.so + $(LOCAL_PATH)/../4g_modem/bin64/dhcpcd:$(TARGET_COPY_OUT_VENDOR)/bin/dhcpcd \ + $(LOCAL_PATH)/../4g_modem/lib64/librk-ril.so:$(TARGET_COPY_OUT_VENDOR)/lib64/librk-ril.so else PRODUCT_PROPERTY_OVERRIDES += \ - vendor.rild.libpath=/vendor/lib/librk-ril.so + vendor.rild.libpath=/vendor/lib/libreference-ril-em05.so PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/4g_modem/bin32/dhcpcd:$(TARGET_COPY_OUT_VENDOR)/bin/dhcpcd \ diff --git a/overlay_wifi_only/frameworks/base/core/res/res/values/config.xml b/overlay_wifi_only/frameworks/base/core/res/res/values/config.xml index 33e8c93..bf4f825 100644 --- a/overlay_wifi_only/frameworks/base/core/res/res/values/config.xml +++ b/overlay_wifi_only/frameworks/base/core/res/res/values/config.xml @@ -22,5 +22,5 @@ If true, this means that the device supports data connectivity through the telephony network. This can be overridden to false for devices that support voice and/or sms . --> - <bool name="config_mobile_data_capable">false</bool> + <bool name="config_mobile_data_capable">true</bool> </resources> android_sdk/patches/4g_patch/device_rockchip_rk356x.patch
New file @@ -0,0 +1,12 @@ diff --git a/device.mk b/device.mk index d25c3ef..34141d7 100644 --- a/device.mk +++ b/device.mk @@ -70,6 +70,7 @@ PRODUCT_PROPERTY_OVERRIDES += \ ro.ril.ecclist=112,911 \ ro.opengles.version=196610 \ wifi.interface=wlan0 \ + rild.libpath=/vendor/lib64/libreference-ril-em05.so \ ro.audio.monitorOrientation=true \ debug.nfc.fw_download=false \ debug.nfc.se=false \ android_sdk/patches/4g_patch/frameworks_opt_telephony.patch
New file @@ -0,0 +1,13 @@ diff --git a/src/java/com/android/internal/telephony/uicc/IccCardStatus.java b/src/java/com/android/internal/telephony/uicc/IccCardStatus.java index ec07780c8f..cdf9b3578e 100644 --- a/src/java/com/android/internal/telephony/uicc/IccCardStatus.java +++ b/src/java/com/android/internal/telephony/uicc/IccCardStatus.java @@ -88,7 +88,7 @@ public class IccCardStatus { @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) public IccCardApplicationStatus[] mApplications; - public IccSlotPortMapping mSlotPortMapping; + public IccSlotPortMapping mSlotPortMapping = new IccSlotPortMapping(); public void setCardState(int state) { switch(state) { android_sdk/patches/4g_patch/hardware_interfaces.patch
New file @@ -0,0 +1,75 @@ diff --git a/compatibility_matrices/compatibility_matrix.7.xml b/compatibility_matrices/compatibility_matrix.7.xml index 26b8d63c5..d1ae04aba 100644 --- a/compatibility_matrices/compatibility_matrix.7.xml +++ b/compatibility_matrices/compatibility_matrix.7.xml @@ -516,6 +516,20 @@ <instance>default</instance> </interface> </hal> + + <hal format="hidl" optional="true"> + <name>android.hardware.radio.config</name> + <!-- + See compatibility_matrix.4.xml on versioning of radio config HAL. + --> + <version>1.0</version> + <version>1.1</version> + <interface> + <name>IRadioConfig</name> + <instance>default</instance> + </interface> + </hal> + <hal format="aidl" optional="true"> <name>android.hardware.radio.config</name> <version>1</version> @@ -524,7 +538,8 @@ <instance>default</instance> </interface> </hal> - <hal format="aidl" optional="true"> + + <hal format="aidl" optional="true"> <name>android.hardware.radio.data</name> <version>1</version> <interface> @@ -584,6 +599,29 @@ <instance>slot3</instance> </interface> </hal> + + <hal format="hidl" optional="true"> + <name>android.hardware.radio</name> + <version>1.1</version> + <version>1.2</version> + <version>1.3</version> + <version>1.4</version> + <version>1.5</version> + <interface> + <name>IRadio</name> + <instance>slot1</instance> + <instance>slot2</instance> + <instance>slot3</instance> + </interface> + </hal> + <hal format="hidl" optional="true"> + <name>android.hardware.radio.deprecated</name> + <version>1.0</version> + <interface> + <name>IOemHook</name> + <instance>slot1</instance> + </interface> + </hal> <hal format="hidl" optional="true"> <name>android.hardware.radio</name> <version>1.2</version> @@ -592,7 +630,8 @@ <instance>slot1</instance> </interface> </hal> - <hal format="hidl" optional="true"> + + <hal format="hidl" optional="true"> <name>android.hardware.renderscript</name> <version>1.0</version> <interface> android_sdk/patches/4g_patch/hardware_ril.patch
New file @@ -0,0 +1,14 @@ diff --git a/rild/rild.rc b/rild/rild.rc index f6beb54..ac97129 100644 --- a/rild/rild.rc +++ b/rild/rild.rc @@ -1,5 +1,5 @@ -service vendor.ril-daemon /vendor/bin/hw/rild - class main - user radio - group radio cache inet misc audio log readproc wakelock +service ril-daemon /vendor/bin/hw/rild -l /vendor/lib64/libreference-ril-em05.so + class main + user root + group radio cache inet misc audio sdcard_rw log capabilities BLOCK_SUSPEND NET_ADMIN NET_RAW android_sdk/patches/4g_patch/vendor.patch
New file @@ -0,0 +1,16 @@ diff --git a/phone/phone.mk b/phone/phone.mk index 61881e4..cf0a2bd 100755 --- a/phone/phone.mk +++ b/phone/phone.mk @@ -8,8 +8,9 @@ PRODUCT_COPY_FILES += \ $(CUR_PATH)/phone/etc/ppp/ip-down:system/etc/ppp/ip-down \ $(CUR_PATH)/phone/etc/ppp/ip-up:system/etc/ppp/ip-up \ $(CUR_PATH)/phone/etc/ppp/call-pppd:system/etc/ppp/call-pppd \ - $(CUR_PATH)/phone/etc/operator_table:system/etc/operator_table - + $(CUR_PATH)/phone/etc/operator_table:system/etc/operator_table \ + $(CUR_PATH)/phone/lib/libreference-ril-em05.so:vendor/lib64/libreference-ril-em05.so \ + $(CUR_PATH)/phone/etc/ppp/ql-ril.conf:system/etc/ql-ril.conf ifeq ($(strip $(PRODUCT_MODEM)), DTS4108C) PRODUCT_COPY_FILES += \ $(CUR_PATH)/phone/bin/rild_dts4108c:system/bin/rild \ android_sdk/patches/kernel.patch
New file Diff too large