diff --git a/device/rockchip/common/rootdir/ueventd.rockchip.rc b/device/rockchip/common/rootdir/ueventd.rockchip.rc
index c7844de0a28..623aa78e8e5 100644
--- a/device/rockchip/common/rootdir/ueventd.rockchip.rc
+++ b/device/rockchip/common/rootdir/ueventd.rockchip.rc
@@ -71,6 +71,7 @@ import /vendor/etc/ueventd.car.rc
# for radio
/dev/ttyUSB* 0660 system radio
+/dev/cdc-wdm0 0660 system radio
# for mali-t764
/dev/mali0 0666 system system
diff --git a/device/rockchip/common/sepolicy/vendor/file_contexts b/device/rockchip/common/sepolicy/vendor/file_contexts
index 8cb5ee1af80..f331e9c7993 100644
--- a/device/rockchip/common/sepolicy/vendor/file_contexts
+++ b/device/rockchip/common/sepolicy/vendor/file_contexts
@@ -183,6 +183,8 @@
/sys/class/rfkill(/.*)? u:object_r:sysfs_bluetooth_writable:s0
/proc/bluetooth/sleep/lpm u:object_r:sysfs_bluetooth_writable:s0
+/dev/cdc-wdm[0-9]* u:object_r:radio_device:s0
+
#for FriendlyThing
/dev/i2c-[3-8] u:object_r:i2c_device:s0
/dev/spidev.* u:object_r:spi_device:s0
diff --git a/device/rockchip/common/sepolicy/vendor/rild.te b/device/rockchip/common/sepolicy/vendor/rild.te
new file mode 100644
index 00000000000..10d1d5ea915
--- /dev/null
+++ b/device/rockchip/common/sepolicy/vendor/rild.te
@@ -0,0 +1 @@
+allow rild usb_serial_device:chr_file rw_file_perms;
diff --git a/device/rockchip/rk356x/nanopi5/BoardConfig.mk b/device/rockchip/rk356x/nanopi5/BoardConfig.mk
index 0e7f5c62f4c..015eefe75ef 100644
--- a/device/rockchip/rk356x/nanopi5/BoardConfig.mk
+++ b/device/rockchip/rk356x/nanopi5/BoardConfig.mk
@@ -72,3 +72,6 @@ ifeq ($(strip $(BOARD_USES_AB_IMAGE)), true)
TARGET_RECOVERY_FSTAB := device/rockchip/rk356x/nanopi5/recovery.fstab_AB
endif
+# Use the non-open-source parts, if they're present
+-include vendor/quectel/ec20/BoardConfigPartial.mk
+
diff --git a/device/rockchip/rk356x/nanopi5/device.mk b/device/rockchip/rk356x/nanopi5/device.mk
index 32b93ea37dd..5d728c145d0 100644
--- a/device/rockchip/rk356x/nanopi5/device.mk
+++ b/device/rockchip/rk356x/nanopi5/device.mk
@@ -127,6 +127,12 @@ include device/friendlyelec/nanopi3/input/keyboards.mk
PRODUCT_COPY_FILES += \
device/rockchip/rk356x/nanopi5_box/remote_config/fe6e0030_pwm.kl:system/usr/keylayout/fe6e0030_pwm.kl
+# Quectel
+$(call inherit-product-if-exists, vendor/quectel/ec20/device-partial.mk)
+
+PRODUCT_PROPERTY_OVERRIDES += \
+ persist.vendor.radio.no_modem_board=1
+
# vendor apps
$(call inherit-product-if-exists, vendor/friendlyelec/apps/device-partial.mk)
diff --git a/device/rockchip/rk356x/nanopi5/init.rk356x.rc b/device/rockchip/rk356x/nanopi5/init.rk356x.rc
index 77c31b6056f..62f9b408469 100644
--- a/device/rockchip/rk356x/nanopi5/init.rk356x.rc
+++ b/device/rockchip/rk356x/nanopi5/init.rk356x.rc
@@ -31,6 +31,10 @@ on property:ro.cold_boot_done=true && property:persist.vendor.init_usb=1
on property:persist.vendor.init_usb=0 && property:persist.sys.usb.config=adb
write /d/usb/fcc00000.dwc3/mode device
+on property:persist.vendor.radio.no_modem_board=1
+ setprop ro.radio.noril yes
+ stop vendor.ril-daemon
+
on boot
chown system system /sys/class/thermal/thermal_zone0/policy
chown system system /sys/class/thermal/thermal_zone1/policy
diff --git a/device/rockchip/rk3588/nanopi6/BoardConfig.mk b/device/rockchip/rk3588/nanopi6/BoardConfig.mk
index c89452ab9d9..045b99d48f3 100644
--- a/device/rockchip/rk3588/nanopi6/BoardConfig.mk
+++ b/device/rockchip/rk3588/nanopi6/BoardConfig.mk
@@ -73,3 +73,6 @@ ifeq ($(strip $(BOARD_USES_AB_IMAGE)), true)
TARGET_RECOVERY_FSTAB := device/rockchip/rk3588/nanopi6/recovery.fstab_AB
endif
+# Use the non-open-source parts, if they're present
+-include vendor/quectel/ec20/BoardConfigPartial.mk
+
diff --git a/device/rockchip/rk3588/nanopi6/device.mk b/device/rockchip/rk3588/nanopi6/device.mk
index c193d569556..1075ee5e0f7 100644
--- a/device/rockchip/rk3588/nanopi6/device.mk
+++ b/device/rockchip/rk3588/nanopi6/device.mk
@@ -132,6 +132,12 @@ include device/friendlyelec/nanopi3/input/keyboards.mk
PRODUCT_COPY_FILES += \
device/rockchip/rk3588/nanopi6_box/remote_config/fd8b0030_pwm.kl:system/usr/keylayout/fd8b0030_pwm.kl
+# Quectel
+$(call inherit-product-if-exists, vendor/quectel/ec20/device-partial.mk)
+
+PRODUCT_PROPERTY_OVERRIDES += \
+ persist.vendor.radio.no_modem_board=1
+
# vendor apps
$(call inherit-product-if-exists, vendor/friendlyelec/apps/device-partial.mk)
diff --git a/device/rockchip/rk3588/nanopi6/init.rk3588.rc b/device/rockchip/rk3588/nanopi6/init.rk3588.rc
index 52417b41e61..9e30576aede 100644
--- a/device/rockchip/rk3588/nanopi6/init.rk3588.rc
+++ b/device/rockchip/rk3588/nanopi6/init.rk3588.rc
@@ -25,6 +25,10 @@ on property:ro.cold_boot_done=true && property:persist.vendor.init_usb=1
on property:persist.vendor.init_usb=0 && property:persist.sys.usb.config=adb
write /d/usb/fc000000.usb/mode device
+on property:persist.vendor.radio.no_modem_board=1
+ setprop ro.radio.noril yes
+ stop vendor.ril-daemon
+
on charger
chown system system /sys/class/devfreq/fb000000.gpu/governor
chown system system /sys/class/devfreq/fb000000.gpu/min_freq
diff --git a/hardware/ril/libril/Android.mk b/hardware/ril/libril/Android.mk
index 12b58cf97c9..02f6194a4e5 100644
--- a/hardware/ril/libril/Android.mk
+++ b/hardware/ril/libril/Android.mk
@@ -1,5 +1,7 @@
# Copyright 2006 The Android Open Source Project
+ifneq ($(ENABLE_VENDOR_LIBRIL),true)
+
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
@@ -48,3 +50,5 @@ LOCAL_NOTICE_FILE:= $(LOCAL_PATH)/NOTICE
LOCAL_SANITIZE := integer
include $(BUILD_SHARED_LIBRARY)
+
+endif
diff --git a/hardware/ril/reference-ril/Android.mk b/hardware/ril/reference-ril/Android.mk
index 8aeba233223..f9598f94864 100644
--- a/hardware/ril/reference-ril/Android.mk
+++ b/hardware/ril/reference-ril/Android.mk
@@ -1,5 +1,7 @@
# Copyright 2006 The Android Open Source Project
+ifneq ($(ENABLE_VENDOR_LIBRIL),true)
+
# XXX using libutils for simulator build only...
#
LOCAL_PATH:= $(call my-dir)
@@ -56,3 +58,5 @@ else
LOCAL_NOTICE_FILE:= $(LOCAL_PATH)/NOTICE
include $(BUILD_EXECUTABLE)
endif
+
+endif
diff --git a/hardware/rockchip/gnss/libgps/Android.mk b/hardware/rockchip/gnss/libgps/Android.mk
index c0485c29ee7..f0733ea4fd5 100644
--- a/hardware/rockchip/gnss/libgps/Android.mk
+++ b/hardware/rockchip/gnss/libgps/Android.mk
@@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+ifneq ($(BUILD_WITH_EC20),true)
LOCAL_PATH := $(call my-dir)
# HAL module implemenation, not prelinked and stored in
@@ -29,3 +30,4 @@ LOCAL_CFLAGS := -Wno-unused-parameter -Wno-unused-variable -Wno-format -Wno
LOCAL_SHARED_LIBRARIES := liblog libc libcutils libm libhardware libutils
include $(BUILD_SHARED_LIBRARY)
+endif
diff --git a/system/core/init/devices.cpp b/system/core/init/devices.cpp
index d29ffd604f4..987ffb7df9b 100644
--- a/system/core/init/devices.cpp
+++ b/system/core/init/devices.cpp
@@ -563,6 +563,11 @@ void DeviceHandler::HandleUevent(const Uevent& uevent) {
int device_id = uevent.minor % 128 + 1;
devpath = StringPrintf("/dev/bus/usb/%03d/%03d", bus_id, device_id);
}
+
+ // add by quectel for mknod /dev/cdc-wdm0
+ } else if (uevent.subsystem == "usbmisc" && !uevent.device_name.empty()) {
+ devpath = "/dev/" + uevent.device_name;
+
} else if (StartsWith(uevent.subsystem, "usb")) {
// ignore other USB events
return;
diff --git a/vendor/quectel/ec20/BoardConfigPartial.mk b/vendor/quectel/ec20/BoardConfigPartial.mk
new file mode 100644
index 00000000000..ba589463f5a
--- /dev/null
+++ b/vendor/quectel/ec20/BoardConfigPartial.mk
@@ -0,0 +1,21 @@
+#
+# Copyright 2016 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+BUILD_WITH_EC20 ?= false
+
+BOARD_HAS_GPS := false
+BOARD_HAVE_DONGLE := false
+
diff --git a/vendor/quectel/ec20/config/apns-conf.xml b/vendor/quectel/ec20/config/apns-conf.xml
new file mode 100644
index 00000000000..186d07d904a
--- /dev/null
+++ b/vendor/quectel/ec20/config/apns-conf.xml
@@ -0,0 +1,14749 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/vendor/quectel/ec20/config/device_framework_matrix.xml b/vendor/quectel/ec20/config/device_framework_matrix.xml
new file mode 100644
index 00000000000..0ea4ce79cb7
--- /dev/null
+++ b/vendor/quectel/ec20/config/device_framework_matrix.xml
@@ -0,0 +1,37 @@
+
+
+ android.hardware.radio
+ 1.1
+ 1.5
+ 1.6
+
+ IRadio
+ slot1
+
+
+
+ android.hardware.radio
+ 1.2
+
+ ISap
+ slot1
+
+
+
+ android.hardware.radio.config
+ 1.0
+ 1.1
+
+ IRadioConfig
+ default
+
+
+
+ android.hardware.gnss
+ 1.0
+
+ IGnss
+ default
+
+
+
diff --git a/vendor/quectel/ec20/config/gnss.xml b/vendor/quectel/ec20/config/gnss.xml
new file mode 100644
index 00000000000..6fc26eda2c8
--- /dev/null
+++ b/vendor/quectel/ec20/config/gnss.xml
@@ -0,0 +1,11 @@
+
+
+ android.hardware.gnss
+ hwbinder
+ 1.0
+
+ IGnss
+ default
+
+
+
diff --git a/vendor/quectel/ec20/config/manifest.xml b/vendor/quectel/ec20/config/manifest.xml
new file mode 100644
index 00000000000..4174f06a792
--- /dev/null
+++ b/vendor/quectel/ec20/config/manifest.xml
@@ -0,0 +1,17 @@
+
+
+ android.hardware.radio
+ hwbinder
+ @1.5::IRadio/slot1
+ @1.2::ISap/slot1
+
+
+ android.hardware.radio.config
+ hwbinder
+ 1.1
+
+ IRadioConfig
+ default
+
+
+
diff --git a/vendor/quectel/ec20/device-partial.mk b/vendor/quectel/ec20/device-partial.mk
new file mode 100644
index 00000000000..ed88d554912
--- /dev/null
+++ b/vendor/quectel/ec20/device-partial.mk
@@ -0,0 +1,59 @@
+#
+# Copyright 2016 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+ifeq ($(BUILD_WITH_EC20),true)
+
+ENABLE_VENDOR_LIBRIL := true
+
+DEVICE_MANIFEST_FILE += vendor/quectel/ec20/config/manifest.xml
+DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE += vendor/quectel/ec20/config/device_framework_matrix.xml
+
+PRODUCT_PACKAGES += \
+ libquectel-ril \
+ CarrierDefaultApp \
+ CarrierConfig \
+ messaging \
+ rild
+
+PRODUCT_COPY_FILES += \
+ vendor/quectel/ec20/libquectel-ril/ql-ril.conf:vendor/etc/ql-ril.conf \
+ vendor/quectel/ec20/config/apns-conf.xml:system/etc/apns-conf.xml
+
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.radio.ril_wait=3000 \
+ ro.telephony.default_network=9 \
+ vendor.rild.libpath=/vendor/lib64/libquectel-ril.so
+
+PRODUCT_VENDOR_PROPERTIES += \
+ keyguard.no_require_sim?=true \
+ ro.com.android.dataroaming?=true
+
+
+ifeq ($(BOARD_HAS_GPS),true)
+
+DEVICE_MANIFEST_FILE += vendor/quectel/ec20/config/gnss.xml
+
+PRODUCT_PACKAGES += \
+ gps.default \
+ android.hardware.gnss@1.0-impl \
+ android.hardware.gnss@1.0-service
+
+PRODUCT_COPY_FILES += \
+ vendor/quectel/ec20/libquectel-gps/gps_cfg.inf:vendor/etc/gps_cfg.inf
+
+endif
+
+endif ### BUILD_WITH_EC20 ###
diff --git a/vendor/quectel/ec20/libquectel-gps/Android.mk b/vendor/quectel/ec20/libquectel-gps/Android.mk
new file mode 100644
index 00000000000..c0c291b2f71
--- /dev/null
+++ b/vendor/quectel/ec20/libquectel-gps/Android.mk
@@ -0,0 +1,46 @@
+#
+# Copyright 2016 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+ifeq ($(BUILD_WITH_EC20),true)
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_SUFFIX := .so
+LOCAL_MODULE:= gps.default
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+LOCAL_MODULE_RELATIVE_PATH := hw
+
+LOCAL_VENDOR_MODULE := true
+LOCAL_CHECK_ELF_FILES := false
+
+LOCAL_SRC_FILES_arm := armeabi/gps.default.so
+LOCAL_SRC_FILES_arm64 := arm64-v8a/gps.default.so
+
+LOCAL_SHARED_LIBRARIES := \
+ android.hardware.gnss@1.0 \
+ libc \
+ libcutils \
+ libdl \
+ liblog \
+ libm \
+
+LOCAL_MODULE_TARGET_ARCHS := arm arm64
+LOCAL_MULTILIB := both
+include $(BUILD_PREBUILT)
+
+endif ### BUILD_WITH_EC20 ###
diff --git a/vendor/quectel/ec20/libquectel-gps/arm64-v8a/gps.default.so b/vendor/quectel/ec20/libquectel-gps/arm64-v8a/gps.default.so
new file mode 100644
index 00000000000..fa05a768eca
Binary files /dev/null and b/vendor/quectel/ec20/libquectel-gps/arm64-v8a/gps.default.so differ
diff --git a/vendor/quectel/ec20/libquectel-gps/armeabi/gps.default.so b/vendor/quectel/ec20/libquectel-gps/armeabi/gps.default.so
new file mode 100644
index 00000000000..c2007b6925f
Binary files /dev/null and b/vendor/quectel/ec20/libquectel-gps/armeabi/gps.default.so differ
diff --git a/vendor/quectel/ec20/libquectel-gps/doc/Quectel_Android_GNSS_Driver_User_Guide_V1.3.pdf b/vendor/quectel/ec20/libquectel-gps/doc/Quectel_Android_GNSS_Driver_User_Guide_V1.3.pdf
new file mode 100644
index 00000000000..963868d9b17
Binary files /dev/null and b/vendor/quectel/ec20/libquectel-gps/doc/Quectel_Android_GNSS_Driver_User_Guide_V1.3.pdf differ
diff --git a/vendor/quectel/ec20/libquectel-gps/doc/Quectel_Disclaimer_for_Software_BETA_Version.pdf b/vendor/quectel/ec20/libquectel-gps/doc/Quectel_Disclaimer_for_Software_BETA_Version.pdf
new file mode 100644
index 00000000000..d1b1b0c4ce0
Binary files /dev/null and b/vendor/quectel/ec20/libquectel-gps/doc/Quectel_Disclaimer_for_Software_BETA_Version.pdf differ
diff --git a/vendor/quectel/ec20/libquectel-gps/doc/ReleaseNotes.txt b/vendor/quectel/ec20/libquectel-gps/doc/ReleaseNotes.txt
new file mode 100644
index 00000000000..fce3d4be19f
--- /dev/null
+++ b/vendor/quectel/ec20/libquectel-gps/doc/ReleaseNotes.txt
@@ -0,0 +1,50 @@
+Release Notes
+[Quectel_Android_GPS_Driver_V2.2.12_beta]
+Date: 24/6/2022
+enhancement:
+1. support L76K
+2. support LC29H
+fix:
+
+[Quectel_Android_GPS_Driver_V2.2.11_beta]
+Date: 21/6/2022
+enhancement:
+ 1. add ql-gps.conf to config the path of libcutils
+fix:
+
+[Quectel_Android_GPS_Driver_V2.2.7_beta]
+Date: 4/8/2021
+enhancement:
+ 1. add NMEA statement parsing for Indian NAVIC (irnss) satellite.
+fix:
+
+[Quectel_Android_GPS_Driver_V2.2.6_beta]
+Date: 3/8/2021
+enhancement:
+ 1. add NMEA statement parsing for Beidou and QZSS satellite.
+fix:
+
+[Quectel_Android_GPS_Driver_V2.2.5_beta]
+Date: 4/6/2021
+enhancement:
+ 1. add nmea statement crc checksum.
+fix:
+
+[Quectel_Android_GPS_Driver_V2.2.4_beta]
+Date: 12/25/2020
+enhancement:
+ 1. add debug log printing control.
+fix:
+
+[Quectel_Android_GPS_Driver_V2.2.3_beta]
+Date: 8/6/2020
+enhancement:
+ 1. add nmea statement printing control
+fix:
+ 1. fix a failed item of Android10 cts test.
+
+[Quectel_Android_GPS_Driver_V2.2.2_beta]
+Date: 1/9/2020
+enhancement:
+ 1. add gnss rawdata function.
+fix:
diff --git a/vendor/quectel/ec20/libquectel-gps/gps_cfg.inf b/vendor/quectel/ec20/libquectel-gps/gps_cfg.inf
new file mode 100644
index 00000000000..9592154ab18
--- /dev/null
+++ b/vendor/quectel/ec20/libquectel-gps/gps_cfg.inf
@@ -0,0 +1,21 @@
+#you can modify this config file to adapt your demand.
+#the line start with ';' means not support
+#the line start with '#' means use default config
+
+NMEA_PORT_PATH=rild-nmea
+;RMC_HZ=1
+;NMEA_PORT_PATH=/dev/ttyO1
+;BAUD_RATE=9600
+;DATA_BITS=8
+;STOP_BITS=1
+;PARITY_TYPE=N
+;FLOW_CONTROL=N
+;LOG_LEVEL=LOG_DEBUG
+
+;LOG_TYPE=
+;LOG_PATH=
+;FUNC_NMEA=
+;FUNC_XTRA=
+;FUNC_AGPS
+;I2C_ADDR=
+;NMEA_LOG_LEVEL=
\ No newline at end of file
diff --git a/vendor/quectel/ec20/libquectel-ril/Android.mk b/vendor/quectel/ec20/libquectel-ril/Android.mk
new file mode 100644
index 00000000000..ffaa85948c0
--- /dev/null
+++ b/vendor/quectel/ec20/libquectel-ril/Android.mk
@@ -0,0 +1,56 @@
+#
+# Copyright 2016 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+ifeq ($(BUILD_WITH_EC20),true)
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_SUFFIX := .so
+LOCAL_MODULE:= libquectel-ril
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+
+LOCAL_VENDOR_MODULE := true
+LOCAL_CHECK_ELF_FILES := false
+
+LOCAL_SRC_FILES_arm := armeabi/libquectel-ril.so
+LOCAL_SRC_FILES_arm64 := arm64-v8a/libquectel-ril.so
+
+LOCAL_SHARED_LIBRARIES := \
+ android.hardware.radio.config@1.0 \
+ android.hardware.radio.config@1.1 \
+ android.hardware.radio.config@1.2 \
+ android.hardware.radio@1.0 \
+ android.hardware.radio@1.1 \
+ android.hardware.radio@1.2 \
+ libc++ \
+ libc \
+ libcutils \
+ libdl \
+ libhidlbase \
+ libhidltransport \
+ liblog \
+ libm \
+ libnetutils \
+ libril \
+ libutils
+
+LOCAL_MODULE_TARGET_ARCHS := arm arm64
+LOCAL_MULTILIB := both
+include $(BUILD_PREBUILT)
+
+endif ### BUILD_WITH_EC20 ###
diff --git a/vendor/quectel/ec20/libquectel-ril/arm64-v8a/libquectel-ril.so b/vendor/quectel/ec20/libquectel-ril/arm64-v8a/libquectel-ril.so
new file mode 100644
index 00000000000..4ed32d1eeec
Binary files /dev/null and b/vendor/quectel/ec20/libquectel-ril/arm64-v8a/libquectel-ril.so differ
diff --git a/vendor/quectel/ec20/libquectel-ril/armeabi/libquectel-ril.so b/vendor/quectel/ec20/libquectel-ril/armeabi/libquectel-ril.so
new file mode 100644
index 00000000000..dd5697ea007
Binary files /dev/null and b/vendor/quectel/ec20/libquectel-ril/armeabi/libquectel-ril.so differ
diff --git a/vendor/quectel/ec20/libquectel-ril/doc/Quectel_Android_RIL_Driver_User_Guide_V2.0.pdf b/vendor/quectel/ec20/libquectel-ril/doc/Quectel_Android_RIL_Driver_User_Guide_V2.0.pdf
new file mode 100644
index 00000000000..10b964f630a
Binary files /dev/null and b/vendor/quectel/ec20/libquectel-ril/doc/Quectel_Android_RIL_Driver_User_Guide_V2.0.pdf differ
diff --git a/vendor/quectel/ec20/libquectel-ril/doc/ReleaseNote.txt b/vendor/quectel/ec20/libquectel-ril/doc/ReleaseNote.txt
new file mode 100644
index 00000000000..db918c6f53e
--- /dev/null
+++ b/vendor/quectel/ec20/libquectel-ril/doc/ReleaseNote.txt
@@ -0,0 +1,249 @@
+Release Notes
+[Quectel_Android_RIL_Driver_V3.5.04]
+1. Modify signal acquisition mainly by AT+QCSQ command to obtain, adjust the 5G rsrp signal reported filling.
+2. When QMICTL_SYNC_REQ is sent, sometimes the module is not ready. Added a 1s return delay before sending is completed.
+
+[Quectel_Android_RIL_Driver_V3.4.99]
+1.9X07 platform does not use RIL to send AT+CNMA to module to confirm the receiving status of SMS
+
+[Quectel_Android_RIL_Driver_V3.4.98]
+1. Solve the unisoc module USB mode dial crash problem
+2. Remove the first four bits of MEID 0x00
+
+[Quectel_Android_RIL_Driver_V3.4.9]
+1.Add onWaitSubInfoReady when requestSIM_IO is executed to AT+QCCID
+
+[Quectel_Android_RIL_Driver_V3.4.7]
+1.Added module model judgment for reporting GMT time
+
+[Quectel_Android_RIL_Driver_V3.4.6]
+1.Solved the problem of NDK compiling RIL library in high Android version printing not in Radio buffer
+2.Added the GMT time judgment for reporting the EC20 model
+
+[Quectel_Android_RIL_Driver_V3.4.5]
+1.Added automatic retrieval of libnetutils.so and libcutils.so in the /apex directory.
+2.Solve the problem of probability dump when RIL library handles dial-up disconnection.
+
+[Quectel_Android_RIL_Driver_V3.4.4]
+1.Modify the problem that 2g cannot send text messages.
+
+[Quectel_Android_RIL_Driver_V3.4.3]
+1.Qualcomm pcie nics require up rmnet_mhi0
+
+[Quectel_Android_RIL_Driver_V3.4.3]
+1.The RM500Q pcie NIC can be up only when its name is RMnet_mhi0.
+2.EC600N module pass +CTZE: reported time time GMT time,Increase judgment distinction.
+3.Add daylight saving time when converting local time to GMT. Subtract daylight saving time from the conversion.
+
+[Quectel_Android_RIL_Driver_V3.4.2]
+1.support UC200A
+2.Added invalid ipv6 address detection to solve the problem of slow first ping of domain names
+
+[Quectel_Android_RIL_Driver_V3.4.1]
+1.support L76K GLL nmea
+2.support EM060K
+3.fix wtpci do_query
+4.fix parseServingCell_5G
+5.fix modem parsing sms report ">" instead of "> "
+6.reduce number of gps config files
+7.support ZDA Nmea
+
+[Quectel_Android_RIL_Driver_V3.4.0]
+1.Added SUPPORT_MDM_RNDis switch control to support Qualcomm MDM module RNDIS network card mode
+
+[Quectel_Android_RIL_Driver_V3.3.99]
+1 support EM05G
+
+[Quectel_Android_RIL_Driver_V3.3.98]
+1 support EC800G
+
+[Quectel_Android_RIL_Driver_V3.3.97]
+1 CellIdentity 中是multiline不是singleline否则CellIdentity为空上层不会自动拨号
+2 pcie中展锐的vid写错了另外展锐的试探打开FD的时候需要()起来
+[Quectel_Android_RIL_Driver_V3.3.96]
+1.Android versions after 8.1 directly return the RIL_Init call for RILD
+
+[Quectel_Android_RIL_Driver_V3.3.95]
+1.The value RIL_CELL_INFO_TYPE_NONE should be assigned to cellInfoType when the module is not resident
+
+[Quectel_Android_RIL_Driver_V3.3.93][Castle]
+1.improve the action of LOG print when ql-ndk.c dlopen libcutils failed
+2.Added unisoc EC200D
+
+[Quectel_Android_RIL_Driver_v3.3.92][Castle]
+1.recode ql-pci.c and fix port name cause sometimes the path isn't which i thought
+2.set ZHANRUI pci mode to normal
+
+[Quectel_Android_RIL_Driver_V3.3.91]
+1. Add EC800N adaptation.
+2. Add the manifest_{sku}. XML file path parsing in the ODM directory.
+3.Fixed the FAILURE to report IP addresses caused by abnormal zhanrui AT
+4.Remove the reboot RILd mechanism
+5.Make the libnetutils and libcutils paths into configuration files for the customer to fill in
+6.Fix the error in the PCIE IP address
+
+[Quectel_Android_RIL_Driver_V3.3.90]
+1.Add AT+CSQ instruction return value RSSI is 99 invalid value judgment.
+2.Set the timeout duration of the recv() and send() functions when obtaining the IP address of a NIC to 3 seconds.
+3.Fix RIL_UNSOL_NITZ_TIME_RECEIVED Incorrect year and last parameter with a space.
+
+[Quectel_Android_RIL_Driver_V3.3.89]
+1.Added LTE ONLY and WCDMA ONLY network locking support for ASR modules
+
+[Quectel_Android_RIL_Driver_V3.3.88]
+1.Remove the logic that the RIL library disconnects modules from the network when switching network modes. The modules
+will be disconnected automatically when switching network modes.
+
+[Quectel_Android_RIL_Driver_V3.3.87]
+1.Adds DNS strings first and last character detection, or removes Spaces if they are Spaces. Fixed RIL library parsing
+crash in some cases when modules return DNS strings with Spaces.
+
+[Quectel_Android_RIL_Driver_V3.3.86]
+1.unisoc platform 4G 5G model dial related instructions are different, do distinguish processing.
+
+[Quectel_Android_RIL_Driver_V3.3.80]
+1. support MTK platform
+
+[Quectel_Android_RIL_Driver_V3.3.70]
+1. ATT 3g bypass
+2. support qcom platform ECM/rndis mode
+3. support EM06K
+4. support android12
+5. avoid gsm cdma keeping switch when use verizon sim
+6. due to platform difference roll back ASR ipv6 address report use config file to control it ,default to use dhcp getting ipv4 address only
+
+[Quectel_Android_RIL_Driver_V3.3.60]
+1. fix ASR report time error
+2. if AP is also zhanrui chip pci need to check again to confirm module exsiting
+3. support ASR's platform ipv6 setup_data_call
+4. fix some error when unlock pin
+5. support verizon compatible with normal operator
+6. support report emergency broadcast
+
+[Quectel_Android_RIL_Driver_V3.3.50]
+1. support BG95 PPP
+2. support EC200A
+3. ql_is_5G() used to indentify if support 5G, not chip type
+4. fix wrong memcpy when no detect usb modem
+
+[Quectel_Android_RIL_Driver_V3.3.40]
+1. add android version 70 coresponding to RIL version 12
+2. fix the problem that the network card under rndis is not recognized
+3. update user guide
+4. modify the requestdeviceidentity section
+5. add evdo_rssi signal conversion
+6. support pcie RM500U
+7. add a 'usbnet' option to conf
+
+[Quectel_Android_RIL_Driver_V3.3.30]
+1. support EC600
+2. CGDCOUNT not support IPv4, so change it to IP
+3. fix cmux mode cannot obtain NMEA port
+4. add autosuspend function on cmux mode
+5. add tools of mpstat and iperf
+6. fix a former bug in old version of RM500 DIAL
+7. support IRadio1.3/1.4
+8. support EC200S
+9. support RM500U module
+
+[Quectel_Android_RIL_Driver_V3.3.20]
+1. Android9.0 support ISAP 1.2
+2. if established multipul dataprofile's DataCall don't need to report RIL_UNSOL_DATA_CALL_LIST_CHANGED otherwise will interfere other connections
+3. pdp only support ipv4 should be pdp_type not auth_type
+4. remove AT data_interface this AT need reboot to take effect and if not reboot this will block AT command
+5. CTZE local time convert to GMT time
+6. add RM500Voice Config
+7. change pdp type to compatible with Android 10
+
+[Quectel_Android_RIL_Driver_V3.3.10]
+1. fix at_tok_scanf use memory after free
+2. when register 5G_SA, use C5GREG to query PS/CS state
+3. when register 5G_SA, get signalstrengh by RSPR in AT+QENG="servingcell"
+4. support switch 5g networkPreferrence
+5. if android version is lower than android10 then don't use 5g setNetWorkPreferrence
+6. fix a logical error in last version of using data5gRegistration add AT to check MEID
+
+[Quectel_Android_RIL_Driver_V3.3.00]
+1. change CNMI prevent the same sms reporting twice and imeisv
+2. support IRadioSap VTS test (Android10)
+3. support IRadioConfig VTS test (Android10)
+4. display cdc-wdm patch for android6/10
+5. detect PCIE ports before USB ports
+6. when /dev/mhi_DUN is at port, set usbmodem as urcport
+7. add conf RIL_REQUEST_SHUTDOWN_SUPPORT
+8. decode ACT of cops&cgreg 's type as int not hexint
+
+[Quectel_Android_RIL_Driver_V3.2.0]
+1. update cellInfo function
+2. support radioConfig1.1/1.2
+3. add RADIO CAPABILITY for 5G modem
+4. update RIL_REQUEST_DEVICE_IDENTITY function
+5. update preferredNetworkType function
+6. add Add configuration items for manifest.xml path
+7. support IRadio 1.4
+
+[Quectel_Android_RIL_Driver_V3.1.0]
+1. support fota
+2. make sure sim pin could show up and add config could remember the last time's pin code
+3. add one more situation which needs clear dataStall's package counts
+4. support pci
+
+[Quectel_Android_RIL_Driver_V3.0.0]
+1. support EC200H
+2. update for BGxx
+3. Modify at timeout algorithm
+4. fix: mbim disconnect, not report data call change event
+5. add: query data call state in requestDataCallList()
+6. fix wrong close usbmon fd
+7. add cdc-wdm patch for android5
+
+[Quectel_Android_RIL_Driver_V2.9.0]
+1. Add ASR module to get the at command of operator IP
+2. add ril-ecm
+3. Support multi-party calls
+4. set 4 bytes aligned for mbim parameters
+5. support IRadio1.2
+6. add tools/qfirehose qlog
+7. support UL AGG
+
+[Quectel_Android_RIL_Driver_V2.8.0]
+1. add qmi revoke and fix some problem when mms retry
+2. improve the first positioning speed at boot
+3. support EC200S-CN
+4. make volte conference call can hangup each paticipator
+5. change rx_urb_size 32KB to 16KB. if set as 32KB, X55 will rx wrong pkt
+
+[Quectel_Android_RIL_Driver_V2.7.0]
+1. support EC100Y-CN
+2. modify the match of android_version
+3. add AT&T test case
+4. fix sim card hotplug out/in, but ril do not report sim state change to RILJ
+5. support multi setup data call
+
+[Quectel_Android_RIL_Driver_V2.6.0]
+1. add get cell Info
+2. fix ril unreport sim pulled out when sim pin
+3. modify sim status when card do hotplug in both normal state and locked state like pin or puk
+4. modify requestSetPreferredNetworkType when module is ASR
+5. add OMA part
+
+[Quectel_Android_RIL_Driver_V2.5.0]
+1. support EG20&RG500
+2. reconstruct QMI&MBIM code
+3. close datafwd
+4. remove unused MBIM command
+5. fix VTS setNetworkSelectionModeManual&iccCloseLogicalChannel fail
+
+[Quectel_Android_RIL_Driver_V2.4.0]
+1. fix quectel-CM compile issue
+2. fix some memory leak error
+3. MBIM support IPv6
+4. add EG20&RG500
+
+[Quectel_Android_RIL_Driver_V2.3.0]
+1. it is not necessary to turn off GPS before injecting time / Xtra
+2. support sim hot plugging
+3. fix a former bug that is caused by pthread without a wait so in gobi mode setupdata may goes ahead of detached thread
+
+[Quectel_Android_RIL_Driver_V2.2.0]
+Three years ago, it was no longer reflected
diff --git a/vendor/quectel/ec20/libquectel-ril/ql-ril.conf b/vendor/quectel/ec20/libquectel-ril/ql-ril.conf
new file mode 100644
index 00000000000..2de3f9c4c55
--- /dev/null
+++ b/vendor/quectel/ec20/libquectel-ril/ql-ril.conf
@@ -0,0 +1,36 @@
+#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
+#RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE_SUPPORT=0
+#RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL_SUPPORT=0
+#RM500Voice=1
+#SetPreferredNetworkType_NR=1
+#asr_support_gps=1
+#IPv4v6_was_also_successful=1
+#usbnet=mbim
diff --git a/vendor/quectel/ec20/libril/Android.mk b/vendor/quectel/ec20/libril/Android.mk
new file mode 100644
index 00000000000..88341158fc6
--- /dev/null
+++ b/vendor/quectel/ec20/libril/Android.mk
@@ -0,0 +1,57 @@
+#
+# Copyright 2016 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+ifeq ($(ENABLE_VENDOR_LIBRIL),true)
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_SUFFIX := .so
+LOCAL_MODULE:= libril
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+LOCAL_VENDOR_MODULE := true
+
+LOCAL_SRC_FILES_arm := armeabi/libril.so
+LOCAL_SRC_FILES_arm64 := arm64-v8a/libril.so
+
+LOCAL_SHARED_LIBRARIES := \
+ android.hardware.radio.config@1.0 \
+ android.hardware.radio.config@1.1 \
+ android.hardware.radio.config@1.2 \
+ android.hardware.radio@1.0 \
+ android.hardware.radio@1.1 \
+ android.hardware.radio@1.2 \
+ android.hardware.radio@1.3 \
+ android.hardware.radio@1.4 \
+ android.hardware.radio@1.5 \
+ libc++ \
+ libc \
+ libcutils \
+ libdl \
+ libhardware_legacy \
+ libhidlbase \
+ libhwbinder \
+ liblog \
+ libm \
+ librilutils \
+ libutils
+
+LOCAL_MODULE_TARGET_ARCHS := arm arm64
+LOCAL_MULTILIB := both
+include $(BUILD_PREBUILT)
+
+endif ### ENABLE_VENDOR_LIBRIL ###
diff --git a/vendor/quectel/ec20/libril/arm64-v8a/libril.so b/vendor/quectel/ec20/libril/arm64-v8a/libril.so
new file mode 100644
index 00000000000..5f07421e5a3
Binary files /dev/null and b/vendor/quectel/ec20/libril/arm64-v8a/libril.so differ
diff --git a/vendor/quectel/ec20/libril/armeabi/libril.so b/vendor/quectel/ec20/libril/armeabi/libril.so
new file mode 100644
index 00000000000..8b4ac2dcf05
Binary files /dev/null and b/vendor/quectel/ec20/libril/armeabi/libril.so differ
diff --git a/vendor/rockchip/common/phone/phone.mk b/vendor/rockchip/common/phone/phone.mk
index 61881e46424..87db54ff0f3 100644
--- a/vendor/rockchip/common/phone/phone.mk
+++ b/vendor/rockchip/common/phone/phone.mk
@@ -4,34 +4,38 @@ CUR_PATH := vendor/rockchip/common
#########################################################
# 3G Dongle SUPPORT
#########################################################
+ifeq ($(strip $(BOARD_HAVE_DONGLE)),true)
+
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
+PRODUCT_PACKAGES += \
+ rild \
+ chat
+
+ifneq ($(BUILD_WITH_EC20),true)
+PRODUCT_PACKAGES += \
+ usb_dongle \
+ usb_modeswitch \
+ libril-rk29-dataonly
+endif
+
ifeq ($(strip $(PRODUCT_MODEM)), DTS4108C)
PRODUCT_COPY_FILES += \
$(CUR_PATH)/phone/bin/rild_dts4108c:system/bin/rild \
$(CUR_PATH)/phone/lib/libreference-ril-dts4108c.so:system/lib/libreference-ril.so \
$(CUR_PATH)/phone/lib/libril-dts4108c.so:system/lib/libril.so
-endif
-
-ifeq ($(strip $(BOARD_HAVE_DONGLE)),true)
-PRODUCT_PACKAGES += \
- rild \
- libril-rk29-dataonly \
- usb_dongle \
- usb_modeswitch \
- chat
-PRODUCT_PROPERTY_OVERRIDES +=ro.boot.noril=false
-else
-PRODUCT_PROPERTY_OVERRIDES +=ro.boot.noril=true
endif
+PRODUCT_PROPERTY_OVERRIDES += ro.boot.noril=false
+endif
PRODUCT_PROPERTY_OVERRIDES += \
keyguard.no_require_sim=true \
ro.com.android.dataroaming=true \
- ril.function.dataonly=1
+ ril.function.dataonly=1
+