Merge "[Bugfix][T106BUG-253][ril] call lynq_get_urc_info, return 7000"
diff --git a/ap/app/zte_comm/at_ctl/src/atconfig/mnet_whitelist.c b/ap/app/zte_comm/at_ctl/src/atconfig/mnet_whitelist.c
index ef42c51..2438963 100755
--- a/ap/app/zte_comm/at_ctl/src/atconfig/mnet_whitelist.c
+++ b/ap/app/zte_comm/at_ctl/src/atconfig/mnet_whitelist.c
@@ -147,8 +147,8 @@
 		mnet_whitelist_add(single_cmd);

 		memset(single_cmd, 0, sizeof(single_cmd));

 	}

-	sc_cfg_set("customIndCmdList", PsmIndAtCmdPrefix);

-	sc_cfg_save();

+	//sc_cfg_set("customIndCmdList", PsmIndAtCmdPrefix);jb.qi add for nv wakeup when no network on 20231229

+	//sc_cfg_save();jb.qi add for nv wakeup when no network on 20231229

 	return;

 }

 

@@ -177,8 +177,8 @@
 		mnet_whitelist_del(single_cmd);

 		memset(single_cmd, 0, sizeof(single_cmd));

 	}

-	sc_cfg_set("customIndCmdList", PsmIndAtCmdPrefix);

-	sc_cfg_save();

+	//sc_cfg_set("customIndCmdList", PsmIndAtCmdPrefix);jb.qi add for nv wakeup when no network on 20231229

+	//sc_cfg_save();jb.qi add for nv wakeup when no network on 20231229

 	return;

 }

 

diff --git a/ap/app/zte_comm/at_ctl/src/atconfig/ps_pdp.c b/ap/app/zte_comm/at_ctl/src/atconfig/ps_pdp.c
index 0c20965..3e4f2e0 100755
--- a/ap/app/zte_comm/at_ctl/src/atconfig/ps_pdp.c
+++ b/ap/app/zte_comm/at_ctl/src/atconfig/ps_pdp.c
@@ -515,11 +515,11 @@
 				offset += sprintf(at_str+offset,"\"%s\",", info->act_info.gateway);

 				offset += sprintf(at_str+offset,"\"%s\",", info->act_info.pri_dns);

 				offset += sprintf(at_str+offset,"\"%s\",", info->act_info.sec_dns);

-				offset += sprintf(at_str+offset,"%d,", pdp_type);

 				offset += sprintf(at_str+offset,"\"%s\",", g_pdpinfo_mng[info->c_id-1].ip6addr);	

 				offset += sprintf(at_str+offset,"\"%s\",", info->act_info.gateway6);

 				offset += sprintf(at_str+offset,"\"%s\",", info->act_info.pri_dns6);

 				offset += sprintf(at_str+offset,"\"%s\"", info->act_info.sec_dns6);

+				offset += sprintf(at_str+offset,",%d", pdp_type);

 			}

 			break;

 		}

diff --git a/ap/app/zte_comm/zte_drv_ctrl/usb/zte_drv_usb_ctrl.c b/ap/app/zte_comm/zte_drv_ctrl/usb/zte_drv_usb_ctrl.c
index b27a915..77fb3b1 100755
--- a/ap/app/zte_comm/zte_drv_ctrl/usb/zte_drv_usb_ctrl.c
+++ b/ap/app/zte_comm/zte_drv_ctrl/usb/zte_drv_usb_ctrl.c
@@ -1820,7 +1820,74 @@
     return 0;

 }

 

+/*jb.qi add for usb wakelock on 20230918 start*/

+#define RPMSG_IOC_MAGIC     'R'

 

+/*ioctl cmd usd by device*/

+#define RPMSG_CREATE_CHANNEL          _IOW(RPMSG_IOC_MAGIC, 1, char *)

+#define RPMSG_GET_DATASIZE       _IOWR(RPMSG_IOC_MAGIC, 2, char *)

+#define RPMSG_SET_INT            _IOW(RPMSG_IOC_MAGIC, 3, char *)

+#define RPMSG_SET_INT_FLAG        _IOW(RPMSG_IOC_MAGIC, 4, char *)

+#define RPMSG_CLEAR_INT_FLAG      _IOW(RPMSG_IOC_MAGIC, 5, char *)

+#define RPMSG_SET_POLL_FLAG       _IOW(RPMSG_IOC_MAGIC, 6, char *)

+#define RPMSG_CLEAR_POLL_FLAG     _IOW(RPMSG_IOC_MAGIC, 7, char *)

+

+#define USB_PLUG_WAKE_CAP_DEV    "/dev/rpmsg50"

+

+int usbplug_fd = -1;

+

+int usbplug_icp_init(void)

+{

+    usbplug_fd = open(USB_PLUG_WAKE_CAP_DEV, O_RDWR);

+

+    if(0 > usbplug_fd){

+        printf("%s: open the channel(%s) error!\n", __func__, USB_PLUG_WAKE_CAP_DEV);

+        return -1;

+    }

+

+    if(0 > ioctl(usbplug_fd, RPMSG_CREATE_CHANNEL, 64)){

+        printf("%s: ioctl RPMSG_CREATE_CHANNEL fail!\n", __func__);

+        close(usbplug_fd);

+        usbplug_fd = -1;

+        return -1;

+    }

+

+    if(0 > ioctl(usbplug_fd, RPMSG_SET_INT_FLAG, NULL)){ //¿¿¿

+        printf("%s: ioctl RPMSG_SET_INT_FLAG fail!\n", __func__);

+        close(usbplug_fd);

+        usbplug_fd = -1;

+        return -1;

+    }

+

+    printf("yanming %s create success!\n",__func__);

+

+    return 0;

+}

+

+int usbplug_rpmsg_send(int value)

+{

+    int write_len = 0;

+    char usbplug_in[20]="usbplug_in";

+    char usbplug_out[20]="usbplug_out";

+

+    printf("usbplug_rpmsg_send value:%d\n",value);

+

+    if(value == 1){

+        write_len = write(usbplug_fd, usbplug_in, sizeof(usbplug_in));

+    }

+

+    if(value == 0){

+        write_len = write(usbplug_fd, usbplug_out, sizeof(usbplug_out));

+    }

+

+    if(write_len <0){

+        printf("usbplug rpmsg write FAIL\n");

+        close(usbplug_fd);

+    }

+

+    return write_len;

+}

+/*jb.qi add for usb wakelock on 20230918 end*/

 /*usbÈȰβåʼþ´¦Àí*/

 int usb_event_proc(unsigned short usb_msg, int usb_event)

 {

@@ -1853,6 +1920,7 @@
         {

             slog(USBCFGMNG_PRINT,SLOG_NORMAL, "[usbCfgMng] usb charger plugin \n");

         }

+	usbplug_rpmsg_send(1);//jb.qi add for usb wakelock on 20230918

         break;

     case MSG_CMD_DRV_USB_REMOVE:

         /*°Î³öʼþ´¦Àí*/

@@ -1870,6 +1938,7 @@
         {

             slog(USBCFGMNG_PRINT,SLOG_NORMAL, "[usbCfgMng] usb charger plugOut \n");

         }

+	usbplug_rpmsg_send(0);//jb.qi add for usb wakelock on 20230918

         break;

     default:

         break;

@@ -2023,6 +2092,15 @@
         slog(USBCFGMNG_PRINT,SLOG_ERR, "[usbCfgMng] warning: readfile %s fail \n", USB_PLUG_FILE_NAME);

         return -1;

     }

+    /*jb.qi add for usb wakelock on 20230918 start*/

+    printf("usbPlugtype:%d\n",usbPlugtype);

+    if(usbPlugtype == 1)

+	sc_cfg_set("usbplug_nv","1");

+   

+    if(usbPlugtype == 0)

+	sc_cfg_set("usbplug_nv","0");

+    usbplug_icp_init();

+    /*jb.qi add for usb wakelock on 20230918 end*/

     usb_usbCfgMngInit(usbPlugtype);

     if (usbPlugtype == 1 && cp_need_udisk == 1)

 		usb_sendUsbOperateRlt(2);

diff --git a/ap/os/linux/linux-3.4.x/drivers/net/zvnet/zvnet_dev.c b/ap/os/linux/linux-3.4.x/drivers/net/zvnet/zvnet_dev.c
index b940957..79cbb75 100755
--- a/ap/os/linux/linux-3.4.x/drivers/net/zvnet/zvnet_dev.c
+++ b/ap/os/linux/linux-3.4.x/drivers/net/zvnet/zvnet_dev.c
@@ -899,9 +899,9 @@
 				continue;

 			}

 	        if(unlikely(!(skb->dev->flags & IFF_UP))) {

-				dev_kfree_skb (skb);

 				if(printk_ratelimit())

 					zv_err("drop!!!%s is down.", skb->dev->name);

+				dev_kfree_skb (skb);

 	            continue;

 	        }

             if (fast_from_driver && fast_from_driver(skb, skb->dev))

@@ -921,8 +921,8 @@
         if(0 != (skb = zvnet_direct_read_skb(&g_zvnet_chn_info))) {

             //skb_debug_test(skb);

 	        if(unlikely(!(skb->dev->flags & IFF_UP))) {

-				dev_kfree_skb (skb);

 				zv_err("drop!!!%s is down.", skb->dev->name);

+				dev_kfree_skb (skb);

 	            continue;

 	        }

 #if 1

diff --git a/cap/zx297520v3/sources/meta-zxic-custom/conf/distro/vehicle_dc_ref.conf b/cap/zx297520v3/sources/meta-zxic-custom/conf/distro/vehicle_dc_ref.conf
index 5084741..5af9072 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/conf/distro/vehicle_dc_ref.conf
+++ b/cap/zx297520v3/sources/meta-zxic-custom/conf/distro/vehicle_dc_ref.conf
@@ -193,6 +193,7 @@
         liblynq-qser-voice \
         liblynq-qser-sim \
         liblynq-qser-sms \
+        liblynq-qser-thermal \
         liblynq-qser-data \
         liblynq-qser-network \
         liblynq-qser-gnss \
@@ -290,6 +291,7 @@
         lynq-qser-sim-demo \
         lynq-qser-sms-demo \
         lynq-qser-data-demo \
+        lynq-qser-thermal-demo \
         lynq-autosuspend \
 	lynq-atcid \
         lynq-qser-autosuspend-demo \
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_ref/fs/normal/rootfs/etc/init.d/first.sh b/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_ref/fs/normal/rootfs/etc/init.d/first.sh
index 08edd81..04cd5f7 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_ref/fs/normal/rootfs/etc/init.d/first.sh
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_ref/fs/normal/rootfs/etc/init.d/first.sh
@@ -35,9 +35,13 @@
 fi
 
 mkdir -p /tmp
-mount   -t  tmpfs   tmpfs    /tmp
+#l.yang modify for T106BUG-387 start 
+mount   -t  tmpfs   tmpfs    /tmp -o nodev,nosuid,noexec
+#l.yang modify for T106BUG-387 end
 mkdir -p /run
-mount   -t  tmpfs   tmpfs    /run
+#l.yang modify for T106BUG-387 start
+mount   -t  tmpfs   tmpfs    /run  -o nodev,nosuid,noexec
+#l.yang modify for T106BUG-387 end
 mkdir -p /dev/pts
 mount   -t  devpts  devpts   /dev/pts
 
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_ref/fs/normal/rootfs/etc/init.d/fscheck.sh b/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_ref/fs/normal/rootfs/etc/init.d/fscheck.sh
index 43539be..73e88e9 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_ref/fs/normal/rootfs/etc/init.d/fscheck.sh
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_ref/fs/normal/rootfs/etc/init.d/fscheck.sh
@@ -3,15 +3,11 @@
 #cppdemo > /dev/null 2>&1 &
 
 fscheck -f /etc_ro/fscheck/userdata.ini
-mkdir -p /mnt/oemdata/cache
-mkdir -p /mnt/oemdata/var/log
+
 #q.huang@20230920 add for network start
 mkdir -p /mnt/userdata/ril/network
 #q.huang@20230920 add for network end
-if [ ! -L /var/run ]; then
-  rm  -fr /var/run
-  ln -s  /run /var/run
-fi
+
 
 if [ -d "/etc/selinux" ];then
   /sbin/restorecon -RF /etc_rw  /mnt/userdata/  /mnt/oemdata/ 
@@ -23,6 +19,16 @@
 else
   /sbin/ubi_mount.sh  /mnt/oem     oem2     vol_oem     squashfs
 fi
+
+#l.yang modify for T106BUG-387 start 
+if [ -e /dev/mmcblk1p1 ]; then
+  mount -t ext4 /dev/mmcblk1p1 /var/log
+else
+  mkdir	-p /mnt/oemdata/log
+  mount  /mnt/oemdata/log /var/log
+fi
+#l.yang modify for T106BUG-387 start
+
 if [ $? -ne 0 ]; then
   flags_tool_static --switch
   reboot
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_ref/fs/normal/rootfs/etc_ro/default/default_parameter_sys b/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_ref/fs/normal/rootfs/etc_ro/default/default_parameter_sys
index 6d1c13f..0cc35f9e 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_ref/fs/normal/rootfs/etc_ro/default/default_parameter_sys
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_ref/fs/normal/rootfs/etc_ro/default/default_parameter_sys
@@ -76,7 +76,9 @@
 OS=TOS
 urlMobile=
 DNS_proxy=
-dnsmasqfile=/var/log/dnsmasq.log
+#l.yang modify fot T106BUG-387 start 
+dnsmasqfile=/mnt/userdata/log/dnsmasq.log
+#l.yang modify fot T106BUG-387 end
 dnsmasqfileSize=1024
 lan_domain_Enabled=1
 auto_connect_when_limited=no
@@ -116,7 +118,9 @@
 fota_ab_upgrade_total_size=0
 fota_ab_upgrade_updated_size=0
 fota_ab_aa_sync_status=2
-fota_ab_log_path=/cache/zte_fota_ab/upi_ab.log
+#l.yang modify fot T106BUG-387 start
+fota_ab_log_path=/mnt/userdata/zte_fota_ab/upi_ab.log
+#l.yang modify fot T106BUG-387 end
 fota_aa_auto_sync=0
 Login=admin
 Password=
@@ -147,10 +151,10 @@
 #syslogdÏà¹ØÅäÖÃ
 syslog_file_size=1
 syslog_file_num=5
-#you.chen modify for log
-print_level=3
+#jb.qi change for log on 20240110 start
+print_level=1
 syslog_level=1
-#you.chen modify for log
+#jb.qi change for log on 20240110 end
 
 skb_debug=
 seclog_switch=
@@ -381,13 +385,17 @@
 zcat_mode=CPUSB
 zlog_num=10
 zlog_size=100
-zlog_path=/mnt/userdata/zcat
-rule_file=/etc_ro/logrule/ati_std.rule
+#jb.qi change for nv_log on 20240110 start
+zlog_path=/mnt/oemdata/zcat
+rule_file=/etc_ro/logrule/all_3.rule
+#jb.qi change for nv_log on 20240110 end
 
-#ramdump´æ´¢Ä£Ê½
+#ramdump
 ramdump_mode=USB
 ramdump_device=/dev/mmcblk1p1
-ramdump_path=/cache
+#l.yang modify fot T106BUG-387 start
+ramdump_path=/mnt/userdata
+#l.yang modify fot T106BUG-387 end
 
 #ÕÕÏà»úͼƬ·Ö±æÂÊÏÔʾ¿ØÖÆ
 zcamera_interprolation=1
@@ -433,4 +441,4 @@
 DEBUG_INFO_FILE_PATH=/mnt/userdata
 DEBUG_INFO_FILE_NUM=2
 DEBUG_INFO_FILE_TOTAL_SIZE=1
-#debug info end
\ No newline at end of file
+#debug info end
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_ref/fs/normal/rootfs/etc_ro/default/default_parameter_user b/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_ref/fs/normal/rootfs/etc_ro/default/default_parameter_user
index 88d46cd..0ae23b1 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_ref/fs/normal/rootfs/etc_ro/default/default_parameter_user
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_ref/fs/normal/rootfs/etc_ro/default/default_parameter_user
@@ -14,7 +14,9 @@
 at_snap_flag=3
 at_wifi_mac=0
 auto_apn_index=0
-cid_reserved=1
+#xf.li@20240111 modify for T106BUG-480 start
+cid_reserved=0
+#xf.li@20240111 modify for T106BUG-480 end
 clear_pb_when_restore=no
 clear_sms_when_restore=no
 default_apn=3gnet
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_ref/fs/normal/rootfs/postinstall.sh b/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_ref/fs/normal/rootfs/postinstall.sh
index b8a5064..df788bf 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_ref/fs/normal/rootfs/postinstall.sh
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_ref/fs/normal/rootfs/postinstall.sh
@@ -1,6 +1,12 @@
 #!/bin/sh
 
-ln -s /mnt/oemdata/cache             cache
+set -e
+
+#l.yang modify for T106BUG-387 ,create a log file in the/var directory start
+rm -fr var/* && ln -s /run  var/run && mkdir -p  var/log
+#l.yang modify for T106BUG-387 ,create a log file in the/var directory end
+
+#ln -s /mnt/userdata/cache             cache
 ln -s /etc/init.d/fscheck.sh         ./etc/rcS.d/S14fscheck.sh
 ln -s /etc/init.d/zcatlog_config.sh  ./etc/rcS.d/S17zcatlog_config.sh
 ln -s /etc/init.d/shutdown_first.sh  ./etc/rcS.d/K01shutdown_first.sh
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/zxic-image.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/zxic-image.bb
index 4c9df17..b9d6b78 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/zxic-image.bb
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/zxic-image.bb
@@ -88,9 +88,6 @@
 fakeroot distro_rootfs_files_sysvinit() {
 	rm -rf ${IMAGE_ROOTFS}/boot
 	cp -arfp ${FS-DIR}/fs/${BOOT_CTL}/rootfs/*   ${IMAGE_ROOTFS}/
-	if [ -f ${IMAGE_ROOTFS}/postinstall.sh ]; then
-		cd ${IMAGE_ROOTFS} && sh postinstall.sh && rm -v ${IMAGE_ROOTFS}/postinstall.sh
-	fi
 
 	rm -rf ${IMAGE_ROOTFS}/etc/rc[0-6].d
 	rm -f ${IMAGE_ROOTFS}/etc/fstab
@@ -217,17 +214,9 @@
 
 ROOTFS_POSTPROCESS_COMMAND_remove += 'empty_var_volatile;'
 
-fakeroot do_ln_var(){
-	if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
-		rm -rf ${IMAGE_ROOTFS}/var
-		if ${@bb.utils.contains('DISTRO_FEATURES','oemfs','true','false',d)}; then
-			cd ${IMAGE_ROOTFS}/ && ln -snf mnt/oemdata/var var
-		else
-			cd ${IMAGE_ROOTFS}/ && ln -snf mnt/userdata/var var
-		fi
-	elif ${@bb.utils.contains('DISTRO_FEATURES','procd','true','false',d)}; then
-		rm -rf ${IMAGE_ROOTFS}/var
-		cd ${IMAGE_ROOTFS}/ && ln -snf tmp var
+fakeroot do_postinstall(){
+	if [ -f ${IMAGE_ROOTFS}/postinstall.sh ]; then
+		cd ${IMAGE_ROOTFS} && sh postinstall.sh && rm -v ${IMAGE_ROOTFS}/postinstall.sh
 	fi
 }
 
@@ -256,7 +245,7 @@
 }
 
 IMAGE_POSTPROCESS_COMMAND_prepend = ' \
-    do_ln_var; \
+    do_postinstall; \
     ${@bb.utils.contains("TCLIBC", "musl", "do_ln_musl_ld;", "", d)} \
     ${@bb.utils.contains("DISTRO_FEATURES", "selinux", "selinux_set_labels ;", "", d)} \
    '
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-at-common/liblynq-at-common.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-at-common/liblynq-at-common.bb
index f50d299..70f1504 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-at-common/liblynq-at-common.bb
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-at-common/liblynq-at-common.bb
@@ -3,7 +3,7 @@
 DESCRIPTION = "liblynq-at-common"
 LICENSE = "CLOSED"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=3f86c7f456a6d0bbeca155e65084eee1"
-DEPENDS += "liblynq-log liblynq-qser-autosuspend"
+DEPENDS += "liblynq-log liblynq-qser-autosuspend  liblynq-led"
 #inherit workonsrc
 WORKONSRC = "${TOPDIR}/../src/lynq/lib/liblynq-at-common/"
 FILESEXTRAPATHS_prepend :="${TOPDIR}/../src/lynq/lib/:"
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-qser-autosuspend/liblynq-qser-autosuspend.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-qser-autosuspend/liblynq-qser-autosuspend.bb
index 2f48049..45bfa6b 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-qser-autosuspend/liblynq-qser-autosuspend.bb
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-qser-autosuspend/liblynq-qser-autosuspend.bb
@@ -4,7 +4,7 @@
 LICENSE = "CLOSED"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff"
 
-DEPENDS += "${@bb.utils.contains('TARGET_PLATFORM', 'mt2735', 'audio-mixer-ctrl streamer1.0', '', d)}  liblynq-autosuspend liblynq-log at-ctl libsctel"
+DEPENDS += "${@bb.utils.contains('TARGET_PLATFORM', 'mt2735', 'audio-mixer-ctrl streamer1.0', '', d)}  liblynq-autosuspend liblynq-log liblynq-uci"
 #inherit workonsrc
 WORKONSRC = "${TOPDIR}/../src/lynq/lib/liblynq-qser-autosuspend/"
 FILESEXTRAPATHS_prepend :="${TOPDIR}/../src/lynq/lib/:"
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-qser-thermal/liblynq-qser-thermal.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-qser-thermal/liblynq-qser-thermal.bb
new file mode 100755
index 0000000..cdc8bd1
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-qser-thermal/liblynq-qser-thermal.bb
@@ -0,0 +1,53 @@
+#inherit externalsrc package
+
+DESCRIPTION = "liblynq-qser-thermal"
+LICENSE = "CLOSED"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff"
+DEPENDS += "liblynq-log"
+#inherit workonsrc
+WORKONSRC = "${TOPDIR}/../src/lynq/lib/liblynq-qser-thermal/"
+FILESEXTRAPATHS_prepend :="${TOPDIR}/../src/lynq/lib/:"
+SRC_URI = " \
+          file://liblynq-qser-thermal \
+          "
+
+SRC-DIR = "${S}/../liblynq-qser-thermal"
+
+TARGET_CC_ARCH += "${LDFLAGS}"
+BB_INCLUDE_ADD = "--sysroot=${STAGING_DIR_HOST}"
+BB_LDFLAGS_ADD = "--sysroot=${STAGING_DIR_HOST} -Wl,--hash-style=gnu"
+#Parameters passed to do_compile()
+
+FILES_${PN} = "${base_libdir}/*.so "
+
+FILES_${PN}-dev = "/test \
+                   ${includedir}"
+
+FILES_${PN}-doc = "/doc"
+
+FILES_${PN}-dbg ="${base_bindir}/.debug \
+                  ${base_libdir}/.debug \
+                  ${base_sbindir}/.debug"
+
+INSANE_SKIP_${PN} += "already-stripped"
+INSANE_SKIP_${PN} += "installed-vs-shipped"
+
+
+#INHIBIT_PACKAGE_STRIP = "1"
+do_compile () {
+		oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -Wl,--hash-style=gnu -DTELEPHONYWARE"
+}
+
+do_install () {
+    oe_runmake install -C ${SRC-DIR} ROOT=${D}
+	
+    if [ -d "${WORKONSRC}" ] ; then
+        install -d ${D}${includedir}/
+        cp -af ${SRC-DIR}/include/ ${D}${includedir}/
+    fi 
+}
+
+addtask bachclean
+do_bachclean () {
+    oe_runmake clean
+}
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/files/autosuspend_wakeup_count.c b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/files/autosuspend_wakeup_count.c
index 2a113a1..3f01e93 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/files/autosuspend_wakeup_count.c
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/files/autosuspend_wakeup_count.c
@@ -34,22 +34,22 @@
 //#include <cutils/properties.h>
 #define USER_LOG_TAG "PMS"
 #include <liblog/lynq_deflog.h>
+#include <include/lynq_uci.h>
+
 #include <log/log.h>
 #include <stdlib.h>
 #include "autosuspend_ops.h"
-
-#ifdef MOBILETEK_SUSPEND_CFG
+#include <sc_mnet_whitelist.h>
+#include <sc_at.h>
 #define SYS_POWER_STATE "/sys/power/state"
-#endif
 
-#ifdef MOBILETEK_TARGET_PLATFORM_T106
-#define SYS_POWER_STATE "/sys/power/autosleep"
-#endif
 #define SYS_POWER_WAKEUP_COUNT "/sys/power/wakeup_count"
 #define SYS_POWER_SPM_SUSPEND_CRTL "/sys/power/spm/suspend_ctrl"
 
 #define BASE_SLEEP_TIME 100000
 #define POSSIBLE_MAX_SLEEP_TIME 60000000
+#define LOG_UCI_MODULE "lynq_autosuspend"
+#define LOG_UCI_FILE "lynq_uci"
 
 static int state_fd;
 static int wakeup_count_fd;
@@ -231,22 +231,122 @@
     }       
 
     dlerror(); // Clear any previous dlerror
-    return;            
+    return;
 }
 #endif
 
 #ifdef MOBILETEK_TARGET_PLATFORM_T106
+int t106_set_blacklist(int blacklist_state)
+{
+    int ret;
+    char rsp[128];
+    char cmdstr[256];
+    if(blacklist_state == 0)
+    {
+        strcpy(cmdstr, "AT+SHELL=echo \"+CREG:+CGREG:+CEREG:^MODE:\" > /sys/module/at_io/parameters/at_psm_filter\r\n");
+    }
+    else
+    {
+        strcpy(cmdstr, "AT+SHELL=echo \"\" > /sys/module/at_io/parameters/at_psm_filter\r\n");
+    }
+    printf("cmd:%s\n",cmdstr);
+    ret = sc_at_send(1,cmdstr,rsp,sizeof(rsp));
+    printf("sc_at_send result:%d %s\n",ret,rsp);
+    return ret;
+
+}
+int t106_set_whitelist(void)
+{
+    char tmp[8];
+    int ret;
+    lynq_get_value(LOG_UCI_FILE, LOG_UCI_MODULE, "whitelist_state", tmp);
+    if(strlen(tmp) != 4)
+    {
+        RLOGD("the whitelist len is error\n");
+        return 0;
+    }
+    if(tmp[0] == '1')
+    {
+        ret = sc_mnet_whitelist_add(1);
+        if(ret)
+        {
+            RLOGD("sc_mnet_whitelist_add 1 fail\n");
+            return ret;
+        }
+        ret = sc_mnet_whitelist_add(5);
+        if(ret)
+        {
+            RLOGD("sc_mnet_whitelist_add 5 fail\n");
+            return ret;
+        }
+    }
+    if(tmp[1] == '1')
+    {
+        ret =  sc_mnet_whitelist_add(2);
+        if(ret)
+        {
+            RLOGD("sc_mnet_whitelist_add 2 fail\n");
+            return ret;
+        }
+    }
+    if(tmp[2] == '1')
+    {
+        ret =  sc_mnet_whitelist_add(3);
+        if(ret)
+        {
+            RLOGD("sc_mnet_whitelist_add 3 fail\n");
+            return ret;
+        }
+    }
+    if(tmp[3] == '1')
+    {
+        ret =  sc_mnet_whitelist_add(4);
+        if(ret)
+        {
+            RLOGD("sc_mnet_whitelist_add 4 fail\n");
+            return ret;
+        }
+    }
+
+    return 0;
+
+}
 int t106_early_suspend(void)
 {
+    int ret;
     RLOGD("t106_early_suspend start\n");
     system("zlog_nvctrl -m 1");
+    ret = t106_set_whitelist();
+    if(ret)
+    {
+        RLOGD("t106_set_whitelist ret=%d\n", ret);
+        return ret;
+    }
+    ret = t106_set_blacklist(0);
+    if(ret)
+    {
+        RLOGD("t106_set_blacklist ret=%d\n", ret);
+        return ret;
+    }
     return 0;
 }
 
 void t106_early_resume(void)
 {
+    int ret;
     RLOGD("t106_early_resume start\n");
+    ret = t106_set_blacklist(1);
+    if(ret)
+    {
+        RLOGD("t106_set_whitelist ret=%d\n", ret);
+    }
+    ret = sc_mnet_whitelist_clear();
+    if(ret)
+    {
+        RLOGD("sc_mnet_whitelist_clear ret=%d\n", ret);
+    }
     system("zlog_nvctrl -m 0");
+
     return NULL;
 }
 #endif
@@ -584,6 +684,15 @@
         ALOGI("Error creating semaphore: %s\n", buf);
         goto err_sem_init;
     }
+    if(sc_at_init(1)){
+        ALOGD("sc_at_init failed.\n");
+        return NULL;
+    }
+    if(sc_mnet_whitelist_init() != 0)
+    {
+        ALOGD("sc_mnet_whitelist_init failed.\n");
+        return NULL;
+    }
     ret = pthread_create(&suspend_thread, NULL, suspend_thread_func, NULL);
     if (ret) {
         strerror_r(ret, buf, sizeof(buf));
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/files/makefile b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/files/makefile
index 0441d43..a2eba39 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/files/makefile
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/files/makefile
@@ -47,6 +47,10 @@
     -llynq-uci \
     -llog \
     -lbsp \
+    -lsctel \
+    -latutils \
+    -latreg \
+    
 
 
 SOURCES = $(wildcard *.c )
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/lynq-autosuspend.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/lynq-autosuspend.bb
index 23076f4..96c90de 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/lynq-autosuspend.bb
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/lynq-autosuspend.bb
@@ -22,7 +22,7 @@
 LOCAL_C_INCLUDES = "-I. "
 
 DEPENDS = "liblynq-log liblynq-uci"
-DEPENDS += "${@bb.utils.contains('TARGET_PLATFORM', 'mt2735', 'audio-mixer-ctrl streamer1.0', '', d)} liblynq-log liblynq-uci libbsp"
+DEPENDS += "${@bb.utils.contains('TARGET_PLATFORM', 'mt2735', 'audio-mixer-ctrl streamer1.0', '', d)} liblynq-log liblynq-uci libbsp libsctel libatutils libatreg"
 LOCAL_LIBS = "-L. -ldl -lstdc++ -lpthread -llog"
 SOURCES = "$(wildcard *.c )"
 
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-fota-backup/files/lynq-fota-backup.cpp b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-fota-backup/files/lynq-fota-backup.cpp
index 2c4f1e0..84a727b 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-fota-backup/files/lynq-fota-backup.cpp
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-fota-backup/files/lynq-fota-backup.cpp
@@ -48,16 +48,21 @@
         return -1;

 

     }

-

-    //read fota upgrade flag, 0 :upgrade failed, 1:upgrade success

+    

     fread(&sync_flag,sizeof(int),1,fp);

-

+    

     if(sync_flag == FOTA_SYNC_FLAG)

     {

-        printf("upgrade flag is success ");

-        return 0;

+        ret = lynq_sync_system();

+        if(ret != 0)

+        {

+            printf("sync faild\n");

+            fclose(fp);

+        }

+       system("rm -rf /mnt/userdata/.back_up_flag");

+        

     }

-    else if(sync_flag != FOTA_SYNC_FLAG) 

+    else if(sync_flag != FOTA_SYNC_FLAG)

     {

         ret = lynq_fota_get_addr_value(tmp_addr);

         if(ret != 0)

@@ -81,8 +86,7 @@
         }

         

     }

-    

-

+   

     return 0;

 

 }

diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-irq-demo/files/lynq-irq-demo.cpp b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-irq-demo/files/lynq-irq-demo.cpp
index 0f8ddef..3b3bafc 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-irq-demo/files/lynq-irq-demo.cpp
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-irq-demo/files/lynq-irq-demo.cpp
@@ -144,8 +144,8 @@
             else
             {
                 printf("lynq_irq_uninstall success\n");
-                break;
             }
+            break;
         }
         else
         {
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-autosuspend-demo/files/lynq-qser-autosuspend-demo.cpp b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-autosuspend-demo/files/lynq-qser-autosuspend-demo.cpp
index 4437af4..fbaa297 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-autosuspend-demo/files/lynq-qser-autosuspend-demo.cpp
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-autosuspend-demo/files/lynq-qser-autosuspend-demo.cpp
@@ -29,12 +29,11 @@
     printf("-al [wakelock num]  --qser_wakelock_lock \n");
     printf("-rl [wakelock num]  --qser_wakelock_unlock \n");
     printf("-dl [wakelock num]  --qser_wakelock_destroy\n");
+    printf("-ws [whitelist num] --qser_whitelist_set\n");
+    printf("-wg                 --qser_whitelist_get\n");
     printf("-ccl                --check created locks\n");
     printf("-cll                --check lockup locks\n");
-    printf("-wla [id]           --qser_whitelist_add\n");
-    printf("-wld [id]           --qser_whitelist_del\n");
-    printf("-wlg                --qser_whitelist_get\n");
-    printf("-wlc                --qser_whitelist_clear\n");
+    printf("-cws                --check wakeup sources\n");
     printf("Please input an cmd:");
 }
 
@@ -90,9 +89,12 @@
     int num;
     int ret;
     int len;
-    char cmd[16];
+    FILE *fp;
+    char buf[256];
+    char cmd[64];
     char *cmd2;
     char *cmd1;
+    char tmp[8];
     qser_pm_cfg_t *qser_lpm_cfg = NULL;
     qser_lpm_cfg = (qser_pm_cfg_t *)malloc(sizeof(qser_pm_cfg_t));
     qser_lpm_cfg->wakeupin.wakeupin_pin = 50;
@@ -137,6 +139,7 @@
             if(cmd2 == NULL)
             {
                 printf("name is null\n");
+                continue;
             }
             len = strlen(cmd2);
             printf("len =%d\n", len);
@@ -157,6 +160,7 @@
              if(cmd2 == NULL)
             {
                 printf("fd is null\n");
+                continue;
             }
             num = atoi(cmd2);
             ret = qser_wakelock_lock(num);
@@ -176,6 +180,7 @@
             if(cmd2 == NULL)
             {
                 printf("fd is null\n");
+                continue;
             }
             num = atoi(cmd2);
             ret = qser_wakelock_unlock(num);
@@ -194,6 +199,7 @@
             if(cmd2 == NULL)
             {
                 printf("fd is null\n");
+                continue;
             }
             num = atoi(cmd2);
             ret = qser_wakelock_destroy(num);
@@ -207,6 +213,38 @@
                 printf("wakelock destroy success\n");
             }
         }
+        else if(strcmp(cmd1, "-ws") == 0)
+        {
+            if(cmd2 == NULL)
+            {
+                printf("num is null\n");
+                continue;
+            }
+            delete_enter(cmd2);
+            ret = qser_whitelist_set(cmd2);
+            if(ret != 0)
+            {
+                printf("qser_whitlist_set fail\n");
+                printf("ret=%d\n", ret);
+            }
+            else
+            {
+                printf("qser_whitlist_set success\n");
+            }
+        }
+        else if(strcmp(cmd1, "-wg") == 0)
+        {
+            ret = qser_whitelist_get(tmp);
+            if(ret != 0)
+            {
+                printf("qser_whitlist_set fail\n");
+            }
+            else
+            {
+                printf("qser_whitlist_set success\n");
+                printf("ret=%d, whilelist state is %s\n", ret, tmp);
+            }
+        }
         else if(strcmp(cmd1,"-ccl") == 0)
         {
             int ret;
@@ -230,38 +268,16 @@
                 printf("check created lock fail\n");
             }
         }
-        else if(strcmp(cmd1,"-wla") == 0)
+        else if(strcmp(cmd1,"-cws") == 0)
         {
-            num = atoi(cmd2);
-            ret = qser_whitelist_add(num);
-            if(ret != 0)
+            printf("start check active wakeup_sources  !!!\n");
+            memset(buf,0,sizeof(buf));
+            fp = popen("cat /sys/kernel/debug/wakeup_sources|sed -e 's/\"^ \"/\"unnamed\"/g' | awk '{print $6 \"\t\" $1}'| grep -v \"^0\" |sort -n \n","r");
+            while(fgets(buf, 255, fp) != NULL)
             {
-                printf("mnet_whitelist_add ret %d.\n", ret);
+                printf("%s", buf);
             }
-
-        }
-        else if(strcmp(cmd1,"-wld") == 0)
-        {
-            num = atoi(cmd2);
-            ret = qser_whitelist_del(num);
-            if(ret != 0)
-            {
-                printf("mnet_whitelist_del ret %d.\n", ret);
-            }
-        }
-        else if(strcmp(cmd1,"-wlg") == 0)
-        {
-            char* whitelist;
-            qser_whitelist_get(whitelist);
-            printf("mnet_whitelist_get :%s\n",whitelist);
-        }
-        else if(strcmp(cmd1,"-wlc") == 0)
-        {
-            ret = qser_whitelist_clear();
-            if(ret != 0)
-            {
-                printf("mnet_whitelist_clear ret %d.\n", ret);
-            }
+            pclose(fp);
         }
         else if(strcmp(cmd1, "-d") == 0)
         {
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-sms-demo/files/lynq-qser-sms-demo.cpp b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-sms-demo/files/lynq-qser-sms-demo.cpp
index 0cb7976..a7d62ec 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-sms-demo/files/lynq-qser-sms-demo.cpp
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-sms-demo/files/lynq-qser-sms-demo.cpp
@@ -145,7 +145,7 @@
     char msg[MSG_BUF] = {};

     QSER_sms_info_t  pt_sms_info;

    // sprintf(telephony_num,"10086");//请用户务必替换此号码,随意向运营商发短消息极有可能被封号。

-    sprintf(msg,"hello");

+    sprintf(msg,"\"Chello worrld-7bit-mr!./\"");

     strncpy(pt_sms_info.src_addr, argv[1], SMS_BUF);

     strncpy(pt_sms_info.sms_data, msg, MSG_BUF);

     pt_sms_info.format = QSER_SMS_7BIT;

diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-thermal-demo/files/lynq-qser-thermal-demo.cpp b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-thermal-demo/files/lynq-qser-thermal-demo.cpp
new file mode 100755
index 0000000..03a5926
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-thermal-demo/files/lynq-qser-thermal-demo.cpp
@@ -0,0 +1,49 @@
+#include <sys/types.h>

+#include <dirent.h>

+#include <unistd.h>

+#include <stdio.h>

+#include <string.h>

+#include <fcntl.h>

+#include <stdlib.h>

+#include <unistd.h>

+#include <dlfcn.h>

+

+#include"lynq-qser-thermal-demo.h"

+

+

+int (*get_thermal_zone)(int *numbers, int size);

+

+

+int main(int argc, char *argv[]){

+    int numbers[MAX_SIZE];

+    int ret = 0;

+    const char *lynq_libpath_thermal = "/lib/liblynq-qser-thermal.so";

+

+    void *dlHandle_thermal = dlopen(lynq_libpath_thermal, RTLD_NOW);

+    if (dlHandle_thermal == NULL) 

+    {

+        printf("dlopen dlHandle_thermal failed: %s\n", dlerror());

+        exit(EXIT_FAILURE);

+    }

+    get_thermal_zone = (int(*)(int *numbers, int size))dlsym(dlHandle_thermal,"get_thermal_zone");

+    if(NULL != get_thermal_zone)

+    {

+        ret = get_thermal_zone(numbers, MAX_SIZE);

+        if (ret <= 0) {

+            printf("get_thermal_zone error\n");

+            return -1;

+    }

+    }else{

+            printf("get_thermal_zone dlsym error\n");

+     }

+

+    for (int j = 0; j < ret; ++j) {

+        printf("[%s-%d] temp[%d] = %d \n", __func__, __LINE__, j, numbers[j]);

+    }

+

+    return 0;

+}

+

+

+

+

diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-thermal-demo/files/lynq-qser-thermal-demo.h b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-thermal-demo/files/lynq-qser-thermal-demo.h
new file mode 100755
index 0000000..6366538
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-thermal-demo/files/lynq-qser-thermal-demo.h
@@ -0,0 +1,5 @@
+#define MAX_SIZE 100

+#define MAX_LINES 5

+#define MAX_LINE_LENGTH 10

+

+

diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-thermal-demo/files/makefile b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-thermal-demo/files/makefile
new file mode 100755
index 0000000..4468ca5
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-thermal-demo/files/makefile
@@ -0,0 +1,49 @@
+SHELL = /bin/sh
+RM = rm -rf
+
+LOCAL_CFLAGS := -Wall \
+                -std=gnu++14 \
+                -g -Os \
+                -flto \
+                -fpermissive \
+
+ifeq ($(strip $(TARGET_PLATFORM)), T106)
+LOCAL_CFLAGS += -DBINDER_IPC_32BIT=1 -DHAVE_ENDIAN_H -DHAVE_PTHREADS -DHAVE_SYS_UIO_H -DHAVE_POSIX_FILEMAP -DHAVE_STRLCPY -DHAVE_PRCTL -DHAVE_MEMSET16 -DHAVE_MEMSET32 -DANDROID_SMP=0
+endif
+
+LOCAL_CFLAGS += -Werror=format-security
+
+$(warning ################# rock ROOT: $(ROOT),includedir:$(includedir),)
+
+LOCAL_PATH   = .
+
+LOCAL_C_INCLUDES = \
+  -I. \
+  -I$(LOCAL_PATH)/include/ \
+  -I$(ROOT)$(includedir)/ \
+
+LOCAL_LIBS := \
+    -L. \
+    -ldl \
+    -lstdc++ \
+    -llynq-qser-thermal \
+
+SOURCES = lynq-qser-thermal-demo.cpp
+
+EXECUTABLE = lynq-qser-thermal-demo
+
+OBJECTS=$(SOURCES:.cpp=.o)
+
+all: $(EXECUTABLE)
+
+$(EXECUTABLE): $(OBJECTS)
+	$(CXX) $(OBJECTS) $(LOCAL_LIBS) $(LOCAL_CFLAGS) $(LOCAL_C_INCLUDES) -o $@
+
+%.o : %.cpp
+	$(CXX) $(LOCAL_C_INCLUDES) $(LOCAL_CFLAGS) $(LOCAL_LIBS) -o $@ -c $<
+
+.PHONY: clean
+clean:
+	$(RM) $(OBJECTS) $(EXECUTABLE)
+	$(RM) $(OBJECTS_TOOL) $(EXECUTABLE)
+
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-thermal-demo/lynq-qser-thermal-demo.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-thermal-demo/lynq-qser-thermal-demo.bb
new file mode 100755
index 0000000..bfd0a84
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-thermal-demo/lynq-qser-thermal-demo.bb
@@ -0,0 +1,33 @@
+# Package summary
+SUMMARY = "lynq-qser-thermal-demo"
+# License, for example MIT
+LICENSE = "MIT"
+# License checksum file is always required
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+		  
+SRC_URI = "file://lynq-qser-thermal-demo.h file://lynq-qser-thermal-demo.cpp"
+
+SRC-DIR = "${S}/../lynq-qser-thermal-demo"
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+#Parameters passed to do_compile()
+EXTRA_OEMAKE = "'TARGET_PLATFORM = ${TARGET_PLATFORM}'\"
+EXTRA_OEMAKE += "'MOBILETEK_RIL_CFG = ${MOBILETEK_RIL_CFG}'"
+
+LOCAL_C_INCLUDES = "-I."
+
+LOCAL_LIBS = "-L. -ldl -g -Os -lstdc++"
+
+#INHIBIT_PACKAGE_STRIP = "1"
+S = "${WORKDIR}"
+
+#INHIBIT_PACKAGE_STRIP = "1"
+do_compile () {
+
+	${CXX} -Wall lynq-qser-thermal-demo.cpp ${LOCAL_LIBS} ${LOCAL_C_INCLUDES} -o lynq-qser-thermal-demo
+}
+
+do_install() {
+	install -d ${D}${bindir}/
+	install -m 0755 ${S}/lynq-qser-thermal-demo ${D}${bindir}/
+}
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-voice-demo/files/lynq-qser-voice-demo.cpp b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-voice-demo/files/lynq-qser-voice-demo.cpp
index 81185d9..d6ddaf1 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-voice-demo/files/lynq-qser-voice-demo.cpp
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-voice-demo/files/lynq-qser-voice-demo.cpp
@@ -24,6 +24,7 @@
     {3,   "qser_voice_call_answer"},

     {4,   "qser_voice_set_speech_volume"},

     {5,   "qser_voice_get_speech_volume"},

+    {6,   "qser_voice_set_dtmf"},

     {-1,    NULL}

 };

 

@@ -31,7 +32,6 @@
 

 typedef uint32_t voice_client_handle_type;

 

-static pthread_t s_lynq_voice_tid = -1;

 

 int (*qser_voice_call_client_init)(voice_client_handle_type *ph_voice);

 int (*qser_voice_call_client_deinit)(voice_client_handle_type );

@@ -48,6 +48,7 @@
 int (*qser_voice_call_answer)(voice_client_handle_type ,int  );

 int (*qser_voice_set_speech_volume)(const int volume);

 int (*qser_voice_get_speech_volume)(int *volume);

+int (*qser_voice_set_dtmf)(const char callnum);

 

 void *dlHandle_call = NULL;

 

@@ -156,6 +157,13 @@
             printf("qser_voice_get_speech_volume not defined or exported in %s\n", lynqLibPath_Call);

             return -1;

     }

+

+    qser_voice_set_dtmf = (int (*)(const char ))dlsym(dlHandle_call,"qser_voice_set_dtmf");

+    if(qser_voice_set_dtmf == NULL)    

+    {

+            printf("qser_voice_set_dtmf not defined or exported in %s\n", lynqLibPath_Call);

+            return -1;

+    }

     

     ret = qser_voice_call_client_init(&h_voice);

     if(ret != 0 )

@@ -244,6 +252,25 @@
                 break;

 

             }

+            case 6:

+            {

+                

+               int ret;

+               char inputChar;

+            

+               printf("Enter set dtmf\n");

+               scanf(" %c", &inputChar);

+               printf("inputChar is %c\n", inputChar);

+               ret = qser_voice_set_dtmf(inputChar);

+               

+               if (ret != 0) 

+               {

+                   printf("qser set voice dtmf failed\n");

+                   return -1;

+               }

+              break;

+            }

+            

             default:

                 print_help();

                 break;

diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/poweralarm-demo/files/poweralarm-demo.cpp b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/poweralarm-demo/files/poweralarm-demo.cpp
index 2e0f71f..0bca3bb 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/poweralarm-demo/files/poweralarm-demo.cpp
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/poweralarm-demo/files/poweralarm-demo.cpp
@@ -8,7 +8,7 @@
 

 

 #define INIT_SUCCESS    0

-

+#define RTC_DEINIT    -1

 typedef struct

 {

     int  cmdIdx;

@@ -285,6 +285,10 @@
                             printf("lynq rtc service deinit failed \n");

                             return -1;

                         }

+                        else

+                        {

+                            init_flag = RTC_DEINIT;

+                        }

                     }

                     break;

                 }

diff --git a/cap/zx297520v3/src/lynq/framework/lynq-atcid/lynq_atsvc_plugin.xml b/cap/zx297520v3/src/lynq/framework/lynq-atcid/lynq_atsvc_plugin.xml
index 1fa3af5..3ec11c8 100755
--- a/cap/zx297520v3/src/lynq/framework/lynq-atcid/lynq_atsvc_plugin.xml
+++ b/cap/zx297520v3/src/lynq/framework/lynq-atcid/lynq_atsvc_plugin.xml
@@ -10,7 +10,7 @@
   />
   <module name="/lib/liblynq-at-common.so"
                  register="lynq_register_at_common"
-                 cmd="AT+MNETCALL;AT+GTARNDIS;AT+CGIR;AT+LGMDS;AT+LRNDISHANDLE;AT+LEELSP"
+                 cmd="AT+MNETCALL;AT+GTARNDIS;AT+CGIR;AT+LGMDS;AT+LRNDISHANDLE;AT+LEELSP;AT+NETLED;AT+STATUSLED"
   />
   <module name="/lib/liblynq-at-factory.so"
                  register="lynq_register_at_factory"
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-at-common/liblynq-at-common.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-at-common/liblynq-at-common.cpp
index ea38faf..391d43c 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-at-common/liblynq-at-common.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-at-common/liblynq-at-common.cpp
@@ -7,6 +7,7 @@
 #include <liblog/lynq_deflog.h>
 #include "include/liblynq-at-common.h"
 #include <include/lynq-qser-autosuspend.h>
+#include <libled/lynq_led.h>
 
 DEFINE_LYNQ_LIB_LOG(LYNQ_AT_COMMON)
 
@@ -67,10 +68,54 @@
     return;
 }
 
+void lynq_handle_netled(char* input)
+{
+    int ret;
+    char buf[64] = {0};
+    int mode = input[strlen(input)-1]-'0';
+    ALOGE("lynq_handle_netled start\n");
+
+    ret = lynq_set_netled_on(mode);
+    if(ret != 0)
+    {
+        sprintf(buf,"+CME ERROR: 100\r\n");
+        handle_output(buf, strlen(buf), Response);
+    }
+    else
+    {
+        lynq_response_ok();
+    }
+
+    return;
+}
+
+void lynq_handle_statusled(char* input)
+{
+    int ret;
+    char buf[64] = {0};
+    int mode = input[strlen(input)-1]-'0';
+
+    ALOGE("lynq_handle_statusled start\n");
+    ret = lynq_set_statusled_on(mode);
+
+    if(ret != 0)
+    {
+        sprintf(buf,"+CME ERROR: 100\r\n");
+        handle_output(buf, strlen(buf), Response);
+    }
+    else
+    {
+        lynq_response_ok();
+    }
+
+    return;
+}
 static Command commands[] =
 {
     {"CGIR",lynq_handle_version},
     {"LEELSP",lynq_handle_autosuspend},
+    {"NETLED",lynq_handle_netled},
+    {"STATUSLED",lynq_handle_statusled},
     {NULL, NULL}
 };
 
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-at-common/makefile b/cap/zx297520v3/src/lynq/lib/liblynq-at-common/makefile
index e5a1c20..869f980 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-at-common/makefile
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-at-common/makefile
@@ -38,6 +38,8 @@
     -lpthread \

     -llynq-log \

     -llynq-qser-autosuspend \

+    -llynq-led \

+

 

 

 SOURCES = $(wildcard *.cpp)

diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-autosuspend/include/lynq-qser-autosuspend.h b/cap/zx297520v3/src/lynq/lib/liblynq-qser-autosuspend/include/lynq-qser-autosuspend.h
index dc769e1..5d3966a 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-autosuspend/include/lynq-qser-autosuspend.h
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-autosuspend/include/lynq-qser-autosuspend.h
@@ -64,10 +64,9 @@
 int qser_wakelock_unlock(int fd);
 int qser_wakelock_destroy(int fd);
 
-int qser_whitelist_add(int id);
-int qser_whitelist_del(int id);
-int qser_whitelist_get(char* whitelist);
-int qser_whitelist_clear(void);
+int qser_whitelist_set(char *whitelist);
+int qser_whitelist_get(char *whitelist);
+
 
 #ifdef __cplusplus
 }
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-autosuspend/lynq-qser-autosuspend.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-qser-autosuspend/lynq-qser-autosuspend.cpp
index 204660a..01ccd5d 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-autosuspend/lynq-qser-autosuspend.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-autosuspend/lynq-qser-autosuspend.cpp
@@ -12,7 +12,7 @@
 #include <lynq_autosuspend.h>
 #include "lynq-qser-autosuspend.h"
 #include "liblog/lynq_deflog.h"
-#include "sc_mnet_whitelist.h"
+#include <include/lynq_uci.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -26,10 +26,13 @@
 
 #define USER_LOG_TAG "LYNQ_QSER_AUTOSUSPEND"
 #define FILE_LOCK_TABLE "/tmp/.lock_table"
+#define LOG_UCI_MODULE "lynq_autosuspend"
+#define LOG_UCI_FILE "lynq_uci"
+
 #define UEVENT_MSG_LEN 128
 
 int device_fd;
-
+int g_init_flag = 0;
 struct dtr_uevent {
     const char *action;
     const char *path;
@@ -314,12 +317,17 @@
 {
     int ret;
     int num;
-
+    if(g_init_flag != 0)
+    {
+        LYERRLOG("g_init_flag is error\n");
+        return -1;
+    }
+    g_init_flag = 1;
     g_lpm_handler = qser_lpm_handler;
     ret = pthread_create(&thid,NULL,check_dtr,NULL);
     if(ret != 0)
     {
-        LYERRLOG("restart service fail");
+        LYERRLOG("pthread create fail, qser_lpm_init fail\n");
     }
     return ret;
 }
@@ -328,6 +336,12 @@
 int qser_lpm_deinit(void)
 {
     int ret;
+    if(g_init_flag != 1)
+    {
+        LYERRLOG("g_init_flag is error");
+        return -1;
+    }
+    g_init_flag = 0;
     ret = pthread_cancel(thid);
     close(device_fd);
     if(!ret)
@@ -445,80 +459,35 @@
     return ret;
 }
 
-int qser_whitelist_add(int id)
+int qser_whitelist_set(char *whitelist)
 {
     int ret;
-    if(sc_mnet_whitelist_init() != 0)
+    char cmd[64];
+    if(strlen(whitelist) != 4)
     {
-        LYINFLOG("sc_mnet_whitelist_init failed.\n");
+        LYINFLOG("string len is error\n");
         return -1;
     }
-
-    ret =  sc_mnet_whitelist_add(id);
-    LYINFLOG("sc_mnet_whitelist_add ret %d.\n", ret);
-
-    sc_mnet_whitelist_deinit();
+    sprintf(cmd, "uci set lynq_uci.lynq_autosuspend.whitelist_state='%s'", whitelist);
+    ret = system(cmd);
+    system("uci commit");
+    if(ret != 0)
+    {
+        LYINFLOG("qser_whitlist_set fail");
+    }
     return ret;
 
 }
 
-int qser_whitelist_del(int id)
+int qser_whitelist_get(char *whitelist)
 {
     int ret;
-    if(sc_mnet_whitelist_init() != 0)
-    {
-        LYINFLOG("sc_mnet_whitelist_init failed.\n");
-        return -1;
-    }
-
-    ret =  sc_mnet_whitelist_del(id);
-    LYINFLOG("qser_whitelist_del ret %d.\n", ret);
-
-    sc_mnet_whitelist_deinit();
+    ret = lynq_get_value(LOG_UCI_FILE, LOG_UCI_MODULE, "whitelist_state", whitelist);
+    LYERRLOG("ret =%d, whitelist_state is %s\n", ret, whitelist);
     return ret;
 
 }
 
-int qser_whitelist_get(char* whitelist)
-{
-    int ret;
-    if(sc_mnet_whitelist_init() != 0)
-    {
-        LYINFLOG("sc_mnet_whitelist_init failed.\n");
-        return -1;
-    }
-
-    whitelist = sc_mnet_whitelist_get();
-    if(NULL != whitelist)
-    {
-        LYINFLOG("sc_mnet_whitelist_get :%s\n",whitelist);
-        ret = 0;
-    }
-    else
-    {
-        LYINFLOG("sc_mnet_whitelist_get empty\n");
-        ret = -1;
-    }
-    sc_mnet_whitelist_deinit();
-    return ret;
-}
-
-int qser_whitelist_clear(void)
-{
-    int ret;
-    if(sc_mnet_whitelist_init() != 0)
-    {
-        LYINFLOG("sc_mnet_whitelist_init failed.\n");
-        return -1;
-    }
-    ret = sc_mnet_whitelist_clear();
-    LYINFLOG("sc_mnet_whitelist_clear ret %d\n", ret);
-    sc_mnet_whitelist_deinit();
-    return ret;
-
-}
-
-
 DEFINE_LYNQ_LIB_LOG(LYNQ_QSER_AUTOSUSPEND)
 
 #ifdef __cplusplus
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-autosuspend/makefile b/cap/zx297520v3/src/lynq/lib/liblynq-qser-autosuspend/makefile
index 4027a6d..a6ded06 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-autosuspend/makefile
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-autosuspend/makefile
@@ -31,7 +31,7 @@
     -lpthread \
     -llynq-autosuspend \
     -llynq-log \
-    -lsctel \
+    -llynq-uci \
 
 
 SOURCES = $(wildcard *.cpp)
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq-qser-data.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq-qser-data.cpp
index 395cf95..fb7494a 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq-qser-data.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq-qser-data.cpp
@@ -603,6 +603,61 @@
     return RESULT_ERROR;
 }
 
+int apn_xml_handle_clean()
+{
+    int node_num = 0;
+    int default_handle = LYNQ_APN_CHANNEL_MAX + 1;
+    xmlNodePtr node = NULL;
+    xmlNodePtr modify_node = NULL;
+    xmlChar *temp_char;
+    char temp_buff[12];
+
+    if(NULL == apn_table_xml_pdoc)
+    {
+        LYERRLOG("open xml file error");
+        goto FAILED;
+    }
+    
+    node = xmlDocGetRootElement(apn_table_xml_pdoc);
+    if (NULL == node)
+    {
+        LYERRLOG("xmlDocGetRootElement() error");
+        goto FAILED;
+    }
+    modify_node = node->xmlChildrenNode;
+    if(modify_node != NULL)
+    {
+        modify_node = modify_node->next;
+    }
+    else
+    {
+        LYERRLOG("modify_node is null\n");
+        goto FAILED;
+    }
+    while (modify_node != NULL)
+    {
+        temp_char = xmlGetProp(modify_node, "handle");
+        if (temp_char == NULL) 
+        {
+            modify_node = modify_node->next;
+            continue;
+        }
+        bzero(temp_buff,12);
+        snprintf(temp_buff,sizeof(temp_buff),"%d",default_handle);
+        xmlSetProp(modify_node,BAD_CAST"handle",(xmlChar *)temp_buff);
+        modify_node = modify_node->next;
+    }
+    xmlSaveFormatFileEnc(data_xml_path, apn_table_xml_pdoc, "UTF-8", 1);
+    return RESULT_OK;
+
+    FAILED:
+    // if (apn_table_xml_pdoc)
+    // {
+    //     xmlFreeDoc(apn_table_xml_pdoc);
+    // }
+    return RESULT_ERROR;
+}
+
 int apn_xml_add(qser_apn_add_s *apn,unsigned char *apn_num)
 {
     int node_num = 0;
@@ -1254,6 +1309,12 @@
         LYERRLOG("open xml file error");
         return RESULT_ERROR;
     }
+    ret = apn_xml_handle_clean();
+    if(ret != RESULT_OK)
+    {
+        LYERRLOG("clean handle error");
+        return RESULT_ERROR;
+    }
     g_lynq_qser_data_init_flag = 1;
     return RESULT_OK;
 }
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-thermal/include/lynq_qser_thermal.h b/cap/zx297520v3/src/lynq/lib/liblynq-qser-thermal/include/lynq_qser_thermal.h
new file mode 100755
index 0000000..d776dde
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-thermal/include/lynq_qser_thermal.h
@@ -0,0 +1,12 @@
+#ifndef _LYNQ_QSER_THERMAL_H_

+#define _LYNQ_QSER_THERMAL_H_

+

+#ifdef __cplusplus

+extern "C" {

+#endif

+#define MAX_SIZE 100

+int get_thermal_zone(int *numbers, int size);

+#ifdef __cplusplus

+}

+#endif

+#endif

diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-thermal/makefile b/cap/zx297520v3/src/lynq/lib/liblynq-qser-thermal/makefile
new file mode 100755
index 0000000..d1d6061
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-thermal/makefile
@@ -0,0 +1,88 @@
+SHELL = /bin/sh
+RM = rm -f
+
+LOCAL_CFLAGS := -Wall \
+                -g -Os \
+                -flto \
+                -fPIC \
+
+$(warning ################# C2K support: $(RAT_CONFIG_C2K_SUPPORT))
+ifeq ($(strip $(RAT_CONFIG_C2K_SUPPORT)), yes)
+    LOCAL_CFLAGS += -DC2K_SUPPORT
+
+endif
+
+ifeq ($(strip $(MTK_MULTI_SIM_SUPPORT)), dsds)
+    LOCAL_CFLAGS += -DANDROID_SIM_COUNT_2 \
+                     -DANDROID_MULTI_SIM \
+                     -DMODE_DSDS
+endif
+
+
+$(warning ################# TARGET_PLATFORM: $(TARGET_PLATFORM))
+ifeq ($(strip $(TARGET_PLATFORM)), mt2731)
+#$(warning #################add for debug $(ROOT), $(includedir))
+$(warning ################# TARGET_PLATFORM_MT2731)
+    LOCAL_CFLAGS += -DTARGET_PLATFORM_MT2731 \
+                    -DMD_93_SUPPORT
+else ifeq ($(strip $(TARGET_PLATFORM)), mt2635)
+$(warning ################# TARGET_PLATFORM_MT2635)
+    LOCAL_CFLAGS += -DTARGET_PLATFORM_MT2635 \
+                    -DMD_90_SUPPORT
+endif
+
+$(warning ################# RITA ROOT: $(ROOT),includedir:$(includedir))
+LOCAL_PATH   = .
+
+LOCAL_C_INCLUDES = \
+  -I. \
+  -I$(LOCAL_PATH)/include \
+
+
+LOCAL_LIBS := \
+    -L. \
+    -ldl \
+    -lpthread \
+    -luci \
+
+SOURCES = $(wildcard *.c wildcard *.h src/*.c)
+
+EXECUTABLE = liblynq-qser-thermal.so
+
+OBJECTS=$(SOURCES:.c=.o)
+
+DATE_FMT = +%Y-%m-%d
+ifdef SOURCE_DATE_EPOCH
+    BUILD_DATE ?= $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "$(DATE_FMT)" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "$(DATE_FMT)" 2>/dev/null || date -u "$(DATE_FMT)")
+else
+    BUILD_DATE ?= $(shell date "$(DATE_FMT)")
+endif
+
+.PHONY: build clean install pack_rootfs 
+
+all: build
+$(EXECUTABLE): $(OBJECTS)
+	$(CXX) -shared -Wl,--no-undefined $(OBJECTS) $(LOCAL_LIBS) $(LOCAL_CFLAGS) $(LOCAL_C_INCLUDES) -o $@
+
+%.o : %.c
+	$(CC) $(LOCAL_C_INCLUDES) $(LOCAL_CFLAGS) $(LOCAL_LIBS) -o $@ -c $< 
+
+build:  $(EXECUTABLE)
+	$(warning ########## build $(EXECUTABLE)  ##########)
+
+install:
+	mkdir -p $(ROOT)$(base_libdir)/
+	install $(EXECUTABLE) $(ROOT)$(base_libdir)/
+	mkdir -p $(ROOT)$(includedir)/$(NAME)/sdk
+
+pack_rootfs:
+	mkdir -p $(PACK_INITRAMFS_TO)$(base_libdir)/
+	cp -af $(EXECUTABLE) $(PACK_INITRAMFS_TO)$(base_libdir)/
+	$(CROSS)strip $(PACK_INITRAMFS_TO)$(base_libdir)/$(EXECUTABLE)
+	mkdir -p $(PACK_TO)$(base_libdir)/
+	cp -af $(EXECUTABLE) $(PACK_TO)$(base_libdir)/
+	$(CROSS)strip $(PACK_TO)$(base_libdir)/$(EXECUTABLE)
+
+.PHONY: clean
+clean:
+	$(RM) $(OBJECTS) $(EXECUTABLE)
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-thermal/src/lynq_qser_thermal.c b/cap/zx297520v3/src/lynq/lib/liblynq-qser-thermal/src/lynq_qser_thermal.c
new file mode 100755
index 0000000..30114f0
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-thermal/src/lynq_qser_thermal.c
@@ -0,0 +1,63 @@
+#include <stdio.h>

+#include "lynq_qser_thermal.h"

+

+

+void parseBuffer(const char *buf, int *numbers, int *count) {
+    int i = 0;

+    
+    while (buf[i] != '\0') {
+        while (buf[i] == ' ' || buf[i] == '\n') {
+            ++i;
+        }
+

+        int num = 0;

+
+        while (buf[i] >= '0' && buf[i] <= '9') {
+            num = num * 10 + (buf[i] - '0');
+            ++i;
+        }
+
+        numbers[(*count)++] = num;
+    }
+}
+

+

+int get_thermal_zone(int *numbers, int size) {

+    char path[] = "/sys/zx_tsc/tsc_value";

+    int ch;

+    char buf[MAX_SIZE];

+    int i = 0;

+    int count = 0;

+

+    if(NULL == numbers ){

+        printf("Error para\n");

+        return -1;

+    }

+

+    if(size < 6){

+        printf("Error para\n");

+        return -1;

+    }

+

+    FILE *file = fopen(path, "r");

+    if (file == NULL) {

+        printf("Error opening file.\n");

+        return -2;

+    }

+

+    while ((ch = fgetc(file)) != EOF && i < MAX_SIZE - 1) 

+    {

+        if (ch != '\0') {

+            buf[i++] = (char)ch;

+        }

+    }

+    

+    buf[i] = '\0';

+    fclose(file);

+

+    parseBuffer(buf, numbers, &count);

+

+    return count;

+}

+

+

diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-voice/include/lynq-qser-voice.h b/cap/zx297520v3/src/lynq/lib/liblynq-qser-voice/include/lynq-qser-voice.h
index 8666362..1fb0e01 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-voice/include/lynq-qser-voice.h
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-voice/include/lynq-qser-voice.h
@@ -94,19 +94,7 @@
 //Get voice speech volume
 int qser_voice_get_speech_volume(int *volume);
 
-//Set voice call waiting
-int qser_voice_call_setwaiting
-( 
-    int                                 h_voice, 
-    qser_voice_call_waiting_service_t e_service
-);
-
-//Get voice call waiting status
-int qser_voice_call_getwaitingstatus
-(
-    int                                 h_voice, 
-    qser_voice_call_waiting_service_t *pe_service
-);
+int qser_voice_set_dtmf(const char callnum);
 
 
 /*
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-voice/lynq-qser-voice.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-qser-voice/lynq-qser-voice.cpp
index a35a192..d32a69e 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-voice/lynq-qser-voice.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-voice/lynq-qser-voice.cpp
@@ -229,5 +229,11 @@
     return lynq_get_speech_volume(volume);
 }
 
+int qser_voice_set_dtmf(const char callnum)
+{
+   return lynq_set_DTMF(callnum);
+
+}
+
 DEFINE_LYNQ_LIB_LOG(LYNQ_QSER_CALL)
 
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-systime/lynq_systime.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-systime/lynq_systime.cpp
index fb00165..d349bd5 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-systime/lynq_systime.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-systime/lynq_systime.cpp
@@ -64,6 +64,8 @@
 extern int sc_rtc_time_get(int srcid, sc_rtc_time_get_cb rtc_notify);

 extern int sc_cfg_get(char *name, char* buf, int bufLen);

 extern int sc_cfg_set (char *name, char *value);

+extern int get_terminate_flag(void);

+

 

 

 char sync_from_rtc_cb_flag = 1;

@@ -230,6 +232,7 @@
     int ret = -1;

     int srcid = -1;

     int i = 0;

+    int count = 0;

     if ((srcid = sc_rtc_timer_init()) <= 0)

     {

         LYERRLOG("rtc_timer_demo:rtc_timer_init fail!\n");

@@ -264,6 +267,12 @@
         LYERRLOG("uninit failed \n");

         return -1;

     }

+    //xy.he add for T106BUG-413 2024-01-04

+    while((get_terminate_flag() == 0) && (count <100))

+    {

+        usleep(10*1000);

+        count ++;

+    }

     return 0;

 }

 

@@ -274,6 +283,7 @@
     LYDBGLOG("[%s][%d] enter.\n", __FUNCTION__, __LINE__);

     int ret = -1;

     int srcid = -1;

+    int count = 0;

     if ((srcid = sc_rtc_timer_init()) <= 0)

     {

         LYERRLOG("rtc_timer_demo:rtc_timer_init fail!\n");

@@ -291,7 +301,13 @@
         LYERRLOG("uninit failed \n");

         return -1;

     }

-    usleep(5000);

+    //xy.he add for T106BUG-413 2024-01-04

+    while((get_terminate_flag() == 0) && (count <100))

+    {

+        usleep(10*1000);

+        count ++;

+    }

+    printf("lynq_set_rtc_time_success\n");

     return 0;

 }

 

@@ -303,6 +319,7 @@
     int ret = -1;

     int srcid = -1;

     int i = 0;

+    int count = 0;

     if (NULL == ulsec)

     {

         LYERRLOG("NULL parameter!\n");

@@ -341,6 +358,12 @@
         LYERRLOG("uninit failed \n");

         return -1;

     }

+    //xy.he add for T106BUG-413 2024-01-04

+    while((get_terminate_flag() == 0) && (count <100))

+    {

+        usleep(10*1000);

+        count ++;

+    }

     return 0;

 }

 #endif

diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-systime/makefile b/cap/zx297520v3/src/lynq/lib/liblynq-systime/makefile
index d0e37e8..20fc50a 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-systime/makefile
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-systime/makefile
@@ -38,6 +38,7 @@
     -llynq-uci \

     -llynq-log \

     -lnvram \

+    -lscipc \

 

 

 SOURCES = $(wildcard *.cpp)

diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-uci/lynq_uci.config b/cap/zx297520v3/src/lynq/lib/liblynq-uci/lynq_uci.config
index 569b224..7193768 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-uci/lynq_uci.config
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-uci/lynq_uci.config
@@ -14,7 +14,8 @@
 config  lynq_autosuspend  'lynq_autosuspend'

         option auto_enable '0'

         option debug '1'

-

+        option whitelist_state '0000'

+        

 config debug_mode 'debug_mode'

        option sysinfo_debug_status '1'

        option check_file_size '228'

diff --git a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/main.cpp b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/main.cpp
index 8abbd7c..3f7bbf0 100755
--- a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/main.cpp
+++ b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/main.cpp
@@ -29,8 +29,8 @@
     int ret = 0;
     char socket_name[64]={0};
 
-    system("rm -rf /var/socket");
-    system("mkdir -p /var/socket");
+    system("rm -rf /var/run/socket");
+    system("mkdir -p /var/run/socket");
 
     if(argc < 3)
     {
@@ -39,7 +39,7 @@
     }
     if((argv[1] != NULL) && (argv[2]!=NULL))
     {
-        sprintf(socket_name,"/var/socket/%s",argv[1]);
+        sprintf(socket_name,"/var/run/socket/%s",argv[1]);
         if(LYNQ_E_SUCCESS != init_msg_dispatch(socket_name, atoi(argv[2])))
         {
             exit(1);
diff --git a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/socket-tool.cpp b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/socket-tool.cpp
index 24e4f22..990a910 100755
--- a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/socket-tool.cpp
+++ b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/socket-tool.cpp
@@ -22,7 +22,7 @@
     }
     if((argv[1] != NULL) && (argv[2]!=NULL))
     {
-        sprintf(socket_name_service,"/var/socket/%s",argv[1]);
+        sprintf(socket_name_service,"/var/run/socket/%s",argv[1]);
         //sprintf(socket_name_client,"/var/socket/%s-client",argv[1]);
         client_socket_fd = create_socket(AF_UNIX, SOCK_DGRAM,0, 0, NULL,socket_name_service, (void *)&g_client_local_addr, 2, 1);
         if(0 > client_socket_fd)
diff --git a/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/drivers/net/zvnet/zvnet_dev.c b/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/drivers/net/zvnet/zvnet_dev.c
old mode 100644
new mode 100755
index 94238d6..917ca39
--- a/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/drivers/net/zvnet/zvnet_dev.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/drivers/net/zvnet/zvnet_dev.c
@@ -832,9 +832,9 @@
 				continue;

 			}

 	        if(unlikely(!(skb->dev->flags & IFF_UP))) {

-				dev_kfree_skb (skb);

 				if(printk_ratelimit())

 					zv_err("drop!!!%s is down.", skb->dev->name);

+				dev_kfree_skb (skb);

 	            continue;

 	        }

 			skb->protocol = eth_type_trans(skb, skb->dev);

@@ -855,8 +855,8 @@
         if(0 != (skb = zvnet_direct_read_skb(&g_zvnet_chn_info))) {

             //skb_debug_test(skb);

 	        if(unlikely(!(skb->dev->flags & IFF_UP))) {

-				dev_kfree_skb (skb);

 				zv_err("drop!!!%s is down.", skb->dev->name);

+				dev_kfree_skb (skb);

 	            continue;

 	        }

 			skb->protocol = eth_type_trans(skb, skb->dev);

diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/Script/etc/options.auth b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/Script/etc/options.auth
index db0cc5a..1e34ddf 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/Script/etc/options.auth
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/Script/etc/options.auth
@@ -1,5 +1,5 @@
 #dev_name#

-logfile /var/log/pppd.log

+logfile /mnt/userdata/log/pppd.log

 debug

 local 192.168.2.1:192.168.2.100

 ms-dns 114.114.114.114

diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/Script/etc/options.noauth b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/Script/etc/options.noauth
index e00b17f..c7e6438 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/Script/etc/options.noauth
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/Script/etc/options.noauth
@@ -1,5 +1,5 @@
 #dev_name#

-logfile /var/log/pppd.log

+logfile /mnt/userdata/log/pppd.log

 debug

 local 192.168.2.1:192.168.2.100

 ms-dns 114.114.114.114

diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/Script/scripts/fota_release_space.sh b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/Script/scripts/fota_release_space.sh
index dfe8908..9cc1bb0 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/Script/scripts/fota_release_space.sh
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/Script/scripts/fota_release_space.sh
@@ -29,7 +29,7 @@
 killall sd_hotplug
 
 killall syslogd
-rm -rf /var/log
+rm -rf /mnt/userdata/log
 
 #EC 616000558980
 killall zte_mifi
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/adb/services.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/adb/services.c
index ba96def..f870096 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/adb/services.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/adb/services.c
@@ -162,38 +162,20 @@
     adb_close(fd);
 }
 
-int my_adb_reboot(int a,int b,void * p)
-{
-    return 0;
-}
-
 void reboot_service(int fd, void *arg)
 {
     char buf[100];
-    int pid, ret;
+    int  ret;
 
     sync();
-
-    /* Attempt to unmount the SD card first.
-     * No need to bother checking for errors.
-     */
-    pid = fork();
-    if (pid == 0) {
-        /* ask vdc to unmount it */
-        execl("/system/bin/vdc", "/system/bin/vdc", "volume", "unmount",
-                getenv("EXTERNAL_STORAGE"), "force", NULL);
-    } else if (pid > 0) {
-        /* wait until vdc succeeds or fails */
-        waitpid(pid, &ret, 0);
-    }
-
-    ret = my_adb_reboot(ANDROID_RB_RESTART2, 0, (char *) arg);
+    ret = system("reboot");
     if (ret < 0) {
         snprintf(buf, sizeof(buf), "reboot failed: %s\n", strerror(errno));
         writex(fd, buf, strlen(buf));
     }
     free(arg);
     adb_close(fd);
+    sleep(3);
 }
 
 #endif
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/at_ctl/inc/fota_update.h b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/at_ctl/inc/fota_update.h
index 0d2b9b2..5ebcdb4 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/at_ctl/inc/fota_update.h
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/at_ctl/inc/fota_update.h
@@ -8,7 +8,7 @@
 #define  ZFOTA_AT_PARA_LEN        16  

 #define NV_FOTA_UPGRADE_FLAG     			"fota_update_flag"

 

-#define FOTA_MAIN_PATH                             "/cache/zte_fota/"

+#define FOTA_MAIN_PATH                             "/mnt/userdata/zte_fota/"

 #define FOTA_DUA_MAIN_PATH                         FOTA_MAIN_PATH"dua/"

 #define FOTA_DUA_UPDATE_STATUS_FILE                FOTA_MAIN_PATH"update_status"

 #define NV_FOTA_UPGRADE_RESULT 					"fota_upgrade_result"

diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/at_ctl/src/atconfig/ps_pdp.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/at_ctl/src/atconfig/ps_pdp.c
index cca6719..ff164db 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/at_ctl/src/atconfig/ps_pdp.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/at_ctl/src/atconfig/ps_pdp.c
@@ -732,14 +732,14 @@
 						act_info->gateway,

 					 	act_info->pri_dns,

 					 	act_info->sec_dns,

-						&pdpinfo->pdp_type,

 						act_info->ip6,

 						act_info->gateway6,

 						act_info->pri_dns6,

-						act_info->sec_dns6

+						act_info->sec_dns6,

+						&pdpinfo->pdp_type

 					  };

 		act_info->ip46flag = V46_VALID;

-		parse_param("%d,%s,%s,%s,%s,%s,%d,%s,%s,%s,%s",at_paras,(void **)p3);

+		parse_param("%d,%s,%s,%s,%s,%s,%s,%s,%s,%s,%d",at_paras,(void **)p3);

 		//save_unicast_ip6addr(cid, act_info->ip6);

 		if(pdpinfo->pdp_type == PDP_EXT){

 			proc_netdev(cid, 1, act_info->ip);

diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/dhcp6/dhcp6c.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/dhcp6/dhcp6c.c
index bc6e8eb..a4b1594 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/dhcp6/dhcp6c.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/dhcp6/dhcp6c.c
@@ -149,7 +149,7 @@
 
 #define DHCP6C_CONF "/etc_ro/dhcp6c.conf"
 #define DHCP6C_PIDFILE "/var/run/dhcp6c.pid"
-#define DUID_FILE "/var/dhcp6c_duid"
+#define DUID_FILE "/var/run/dhcp6c_duid"
 
 int g_i_if_chinamobile_pd_diff = 0;
 static int pid;
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/dhcp6/dhcp6s.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/dhcp6/dhcp6s.c
index 9dcb413..c4d4b16 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/dhcp6/dhcp6s.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/dhcp6/dhcp6s.c
@@ -112,7 +112,7 @@
 struct host_decl *host = NULL;
 struct rootgroup *globalgroup = NULL;
 
-#define DUID_FILE "/var/dhcp6s_duid"
+#define DUID_FILE "/var/run/dhcp6s_duid"
 #define DHCP6S_CONF "/etc_ro/dhcp6s.conf"
 
 #define DH6_VALID_MESSAGE(a) \
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/dhcp6/lease.h b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/dhcp6/lease.h
index 2ccafa6..96bbb42 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/dhcp6/lease.h
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/dhcp6/lease.h
@@ -39,8 +39,8 @@
 #define ADDR_VALIDATE	2
 #define ADDR_ABANDON	3
 
-#define PATH_SERVER6_LEASE "/var/server6.leases"
-#define PATH_CLIENT6_LEASE "/var/client6.leases"
+#define PATH_SERVER6_LEASE "/var/run/server6.leases"
+#define PATH_CLIENT6_LEASE "/var/run/client6.leases"
 
 #define HASH_TABLE_COUNT 	4
 
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/fota_auto_sync/main.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/fota_auto_sync/main.c
index dcf4b12..ab58af6 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/fota_auto_sync/main.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/fota_auto_sync/main.c
@@ -42,7 +42,7 @@
 
 #define FILE_PATH_PROC_CMDLINE "/proc/cmdline"
 
-#define FOTA_SYNC_LOG_PATH "/cache/zte_fota_ab/upi_ab.log"
+#define FOTA_SYNC_LOG_PATH "/mnt/userdata/zte_fota_ab/upi_ab.log"
 
 
 /*******************************************************************************
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/include/fota_common.h b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/include/fota_common.h
index 9429d72..a74e436 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/include/fota_common.h
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/include/fota_common.h
@@ -214,7 +214,7 @@
 /***********************************************/
 
 
-#define 	ZTE_FOTA_MAIN_PATH							"/cache/zte_fota/"
+#define 	ZTE_FOTA_MAIN_PATH							"/mnt/userdata/zte_fota/"
 #define  	FOTAUPI										ZTE_FOTA_MAIN_PATH"upi.log"
 #define  	FOTARB										ZTE_FOTA_MAIN_PATH"lib.log"
 #define  	FOTADM										ZTE_FOTA_MAIN_PATH"dm.log"
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/libsqlite/sqlite3.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/libsqlite/sqlite3.c
index 29e1321..0b60e4d 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/libsqlite/sqlite3.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/libsqlite/sqlite3.c
@@ -29545,7 +29545,7 @@
   static const char *azDirs[] = {
      0,
      0,
-     "/var/tmp",
+     0,/*"/tmp",*/
      "/usr/tmp",
      "/tmp",
      0        /* List terminator */
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/libvoice/voice_buffer.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/libvoice/voice_buffer.c
index 56598f4..e236432 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/libvoice/voice_buffer.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/libvoice/voice_buffer.c
@@ -60,19 +60,19 @@
 

 #define VBUFFER_DEV_FLAGS  O_RDWR    

 

-#define VBUFFER_TX_FILE_NAME "/cache/tx.pcm"

-#define VBUFFER_RX_FILE_NAME "/cache/rx.pcm"

-#define VBUFFER_TX16_FILE_NAME "/cache/tx16.pcm"

-#define VBUFFER_RX16_FILE_NAME "/cache/rx16.pcm"

+#define VBUFFER_TX_FILE_NAME "/mnt/userdata/tx.pcm"

+#define VBUFFER_RX_FILE_NAME "/mnt/userdata/rx.pcm"

+#define VBUFFER_TX16_FILE_NAME "/mnt/userdata/tx16.pcm"

+#define VBUFFER_RX16_FILE_NAME "/mnt/userdata/rx16.pcm"

 

 

-#define VBUFFER_RTP_TX_FILE_NAME	 "/cache/rtp_tx.rtp"

-#define VBUFFER_RTP_RX_FILE_NAME 	"/cache/rtp_rx.rtp"

-#define VBUFFER_RTP_TX16_FILE_NAME	 "/cache/rtp_tx16.rtp"

-#define VBUFFER_RTP_RX16_FILE_NAME 	"/cache/rtp_rx16.rtp"

-#define VBUFFER_RTP_TX_PCM_FILE_NAME 	"/cache/rtp_tx_dec.pcm"

+#define VBUFFER_RTP_TX_FILE_NAME	 "/mnt/userdata/rtp_tx.rtp"

+#define VBUFFER_RTP_RX_FILE_NAME 	"/mnt/userdata/rtp_rx.rtp"

+#define VBUFFER_RTP_TX16_FILE_NAME	 "/mnt/userdata/rtp_tx16.rtp"

+#define VBUFFER_RTP_RX16_FILE_NAME 	"/mnt/userdata/rtp_rx16.rtp"

+#define VBUFFER_RTP_TX_PCM_FILE_NAME 	"/mnt/userdata/rtp_tx_dec.pcm"

 

-#define VBUFFER_RTP_FROM_NET_FILE_NAME 	"/cache/rtp_from_net.rtp"

+#define VBUFFER_RTP_FROM_NET_FILE_NAME 	"/mnt/userdata/rtp_from_net.rtp"

 #define ENABLE_RTP_TX_TEST

 

 #define RTP_TEST_WITH_NET_SOCKET

diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/binder/include/cutils/sockets.h b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/binder/include/cutils/sockets.h
index ed7ed05..fd01af8 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/binder/include/cutils/sockets.h
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/binder/include/cutils/sockets.h
@@ -34,7 +34,7 @@
 #ifdef ZXIC_RIL_SUPPORT
 #define ANDROID_SOCKET_DIR		"/dev/socket"
 #else
-#define ANDROID_SOCKET_DIR		"/var/socket"
+#define ANDROID_SOCKET_DIR		"/var/run/socket"
 #endif
 
 #ifdef __cplusplus
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/binder/libcutils/socket_local.h b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/binder/libcutils/socket_local.h
index ac97679..9bdb166 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/binder/libcutils/socket_local.h
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/binder/libcutils/socket_local.h
@@ -21,7 +21,7 @@
 #ifdef ZXIC_RIL_SUPPORT
 //#define ANDROID_RESERVED_SOCKET_PREFIX "/dev/socket/"
 #else
-#define ANDROID_RESERVED_SOCKET_PREFIX "/var/socket/"
+#define ANDROID_RESERVED_SOCKET_PREFIX "/var/run/socket/"
 #endif
 
 /*
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/binder/liblog/log_read.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/binder/liblog/log_read.c
index 08dbaa8..6f94e5a 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/binder/liblog/log_read.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/binder/liblog/log_read.c
@@ -65,7 +65,7 @@
 #ifdef ZXIC_RIL_SUPPORT
 #define ANDROID_RESERVED_SOCKET_PREFIX "/dev/socket/"
 #else
-#define ANDROID_RESERVED_SOCKET_PREFIX "/var/socket/"
+#define ANDROID_RESERVED_SOCKET_PREFIX "/var/run/socket/"
 #endif
 
 /* End of ../libcutils/socket_local.h */
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/libscipc/sc_ipc.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/libscipc/sc_ipc.c
index 7b32b99..04dc0c4 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/libscipc/sc_ipc.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/libscipc/sc_ipc.c
@@ -52,6 +52,8 @@
 static int s_local_fd = -1;

 static int s_local_key = -1;

 static int s_remote_fd = -1;

+//xy.he add for T106BUG-413 2024-01-04

+int terminate_loop_flag = 0;

 

 static pthread_t s_tid_dispatch;

 //static pthread_t s_tid_reader;

@@ -284,6 +286,8 @@
 

 	pthread_mutex_lock(&s_startupMutex);

     s_started = 1;

+    //xy.he add for T106BUG-413 2024-01-04

+    terminate_loop_flag = 0;

     pthread_cond_broadcast(&s_startupCond);

     pthread_mutex_unlock(&s_startupMutex);

 	

@@ -311,7 +315,9 @@
 

     if(-1 != s_local_fd)

         sc_ipc_destroy_msg_fd(s_local_fd);

-

+    //xy.he add for T106BUG-413 2024-01-04

+    terminate_loop_flag = 1;

+    

     return (void*)0;

 }

 

@@ -641,7 +647,7 @@
     int ret = 0;

     sc_ipc_msg msg = {0};

 

-	if(s_started)

+	if(!s_started)

 		goto Done;

 

     msg.type = 0;

@@ -680,3 +686,10 @@
 	return;

 }

 

+//xy.he add for T106BUG-413 2024-01-04

+int get_terminate_flag()

+{

+    return terminate_loop_flag;

+}

+

+

diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/libsctel/data/sc_data.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/libsctel/data/sc_data.c
index fa3d1f3..389799f 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/libsctel/data/sc_data.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/libsctel/data/sc_data.c
@@ -72,27 +72,47 @@
 	char pri_dns6[IPV6ADDLEN_MAX];

 	char sec_dns6[IPV6ADDLEN_MAX];

 	char at_cmd[128] = {0};

+	char str[512] = {0};

+	void *p[] = {str};

 	char *at_str = at_cmd;

-	void *p[] = {	&rsp->c_id, 

+	void *p0[] = {	&rsp->c_id, 

 					ip_type, 

 					ip,

 					gateway,

 					pri_dns,

 					sec_dns,

-					&rsp->pdp_type,

 					ip6,

 					gateway6,

 					pri_dns6,

-					sec_dns6

+					sec_dns6,

+					&rsp->pdp_type

+				};

+	void *p1[] = {	&rsp->c_id, 

+					ip_type, 

+					ip,

+					gateway,

+					pri_dns,

+					sec_dns,

+					&rsp->pdp_type

+				};

+	void *p2[] = {	&rsp->c_id, 

+					ip_type, 

+					ip6,

+					gateway6,

+					pri_dns6,

+					sec_dns6,

+					&rsp->pdp_type

 				};

 

 	offset += sprintf(at_str+offset,"AT+ZPDPACT=%d,\"%s\",\"%s\",,,", req->c_id, req->ip_type, req->apn);

 	offset += sprintf(at_str+offset,",%d,\"%s\",\"%s\"", req->auth_type, req->username, req->password);

 	offset += sprintf(at_str+offset,",\"%s\",,1,%d\r\n", req->challenge, req->act_type);

-	ret = get_modem_info(at_cmd, "%d,%s,%s,%s,%s,%s,%d,%s,%s,%s,%s", (void **)p);

+	ret = get_modem_info(at_cmd, "%s", (void **)p);

 	if(ret == 0){

+		ret = parse_param("%d,%s,%s,%s,%s,%s,%d", str, (void **)p2);

 		if(0 == strcmp("IP", ip_type))

 		{

+			parse_param("%d,%s,%s,%s,%s,%s,%d", str, (void **)p1);

 			strncpy(rsp->act_info.ip, ip, IPV4ADDLEN_MAX-1);

 			strncpy(rsp->act_info.gateway, gateway, IPV4ADDLEN_MAX-1);

 			strncpy(rsp->act_info.pri_dns, pri_dns, IPV4ADDLEN_MAX-1);

@@ -109,6 +129,11 @@
 		}

 		else if(0 == strcmp("IPV4V6", ip_type))

 		{

+			memset(ip6, 0, sizeof(ip6));

+			memset(gateway6, 0, sizeof(gateway6));

+			memset(pri_dns6, 0, sizeof(pri_dns6));

+			memset(sec_dns6, 0, sizeof(sec_dns6));

+			parse_param("%d,%s,%s,%s,%s,%s,%s,%s,%s,%s,%d", str, (void **)p0);

 			strncpy(rsp->act_info.ip, ip, IPV4ADDLEN_MAX-1);

 			strncpy(rsp->act_info.gateway, gateway, IPV4ADDLEN_MAX-1);

 			strncpy(rsp->act_info.pri_dns, pri_dns, IPV4ADDLEN_MAX-1);

diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_cc.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_cc.c
index 0d3cf4b..f84e878 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_cc.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_cc.c
@@ -465,6 +465,10 @@
 		goto exit;

 	}

 

+	//l.yang modify for bug id T106BUG-57 2023/9/13 start 

+	usleep(600000);

+	//l.yang modify for bug id T106BUG-57 2023/9/13 end

+

 	err = at_send_command_multiline("AT+CLCC", "+CLCC:", &response);

 	if (err < 0) {

 		RLOGD("ril_request_get_current_calls  err= %d", err);

@@ -625,15 +629,35 @@
 

 void requestAnswer(void *data __unused, size_t datalen __unused, RIL_Token t)

 {

-	at_send_command("ATA", NULL);

+	//l.yang modify for bug id T106BUG-54 2023/9/20 start 

+	ATResponse *p_response = NULL;

+	at_send_command("ATA", &p_response);

+	if( p_response->success == 0) 

+	{

+		goto error;

+	}

+	//l.yang modify for bug id T106BUG-54 2023/9/20 end 

 

 #ifdef WORKAROUND_ERRONEOUS_ANSWER

 	s_expectAnswer = 1;

 #endif /* WORKAROUND_ERRONEOUS_ANSWER */

 

+

 	/* success or failure is ignored by the upper layer here.

 	   it will call GET_CURRENT_CALLS and determine success that way */

+	   

 	RIL_onRequestComplete(t, RIL_E_SUCCESS, NULL, 0);

+

+	//l.yang modify for bug id T106BUG-268 2023/9/28 start 

+	at_response_free(p_response);

+	return;

+	//l.yang modify for bug id T106BUG-268 2023/9/28 end 

+     

+	//l.yang modify for bug id T106BUG-54 2023/9/20 start 

+error:

+	RIL_onRequestComplete(t, RIL_E_GENERIC_FAILURE, NULL, 0);

+	at_response_free(p_response);

+	//l.yang modify for bug id T106BUG-54 2023/9/20 end 

 }

 

 void requestConference(void *data __unused, size_t datalen __unused, RIL_Token t)

diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_ps.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_ps.c
index 03b128d..aba2754 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_ps.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_ps.c
@@ -804,10 +804,10 @@
 	const char *username = NULL;

 	const char *password = NULL;

 	const char *challenge = NULL;

-	/*act_typeΪ¼¤»î×éÍøÀàÐÍ£¬

-	 *0ΪAPºË±¾µØ²¦ºÅ,ÎÞЧ

-	 *1ΪCAPºË±¾µØ²¦ºÅ,

-	 *2ΪĬÈϲ¦ºÅ£¨normal£©,Æô¶¯Ä¬ÈÏ·ÓÉ,É豸ËùÓÐÓ¦Óö¼¿ÉÒÔÖ±½ÓÉÏÍø,Ö»Äܲ¥Ò»Â·;

+	/*act_typeΪ\BC\A4\BB\EE\D7\E9\CD\F8\C0\E0\D0ͣ\AC

+	 *0ΪAP\BA˱\BE\B5ز\A6\BA\C5,\CE\DEЧ

+	 *1ΪCAP\BA˱\BE\B5ز\A6\BA\C5,

+	 *2ΪĬ\C8ϲ\A6\BAţ\A8normal\A3\A9,\C6\F4\B6\AFĬ\C8\CF·\D3\C9,\C9豸\CB\F9\D3\D0Ӧ\D3ö\BC\BF\C9\D2\D4ֱ\BD\D3\C9\CF\CD\F8,ֻ\C4ܲ\A5һ·;

 	 */

 	const char *active_type = NULL;

 

@@ -913,9 +913,10 @@
 	}

 

 	cmd = atstr + strlen(atstr);

-	/*act_typeΪ¼¤»î×éÍøÀàÐÍ£¬0ΪAPºË±¾µØ²¦ºÅ,1ΪCAPºË±¾µØ²¦ºÅ,2ΪĬÈϲ¦ºÅ,Æô¶¯Ä¬ÈÏ·ÓÉ,É豸ËùÓÐÓ¦Óö¼¿ÉÒÔÖ±½ÓÉÏÍø,Ö»Äܲ¥Ò»Â·;*/

-	snprintf(cmd, sizeof(atstr) - strlen(atstr) - 1, ",,,%d", act_type);

-

+	/*act_typeΪ\BC\A4\BB\EE\D7\E9\CD\F8\C0\E0\D0ͣ\AC0ΪAP\BA˱\BE\B5ز\A6\BA\C5,1ΪCAP\BA˱\BE\B5ز\A6\BA\C5,2ΪĬ\C8ϲ\A6\BA\C5,\C6\F4\B6\AFĬ\C8\CF·\D3\C9,\C9豸\CB\F9\D3\D0Ӧ\D3ö\BC\BF\C9\D2\D4ֱ\BD\D3\C9\CF\CD\F8,ֻ\C4ܲ\A5һ·;*/

+	//xf.li@20240111 modify for T106BUG-480 start

+	snprintf(cmd, sizeof(atstr) - strlen(atstr) - 1, ",,1,%d", act_type);

+	//xf.li@20240111 modify for T106BUG-480 end

 	err = at_send_command_singleline_timeout(atstr, "+ZPDPACT:", &p_response, TIMEOUT_ZPDPACT);

 	if (err < 0 || (p_response->success == 0)) {

 		RLOGE("requestSetupDataCall err:%d", err);

diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/rild/rild.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/rild/rild.c
index 0602575..0a45733 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/rild/rild.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/rild/rild.c
@@ -159,7 +159,7 @@
 	}
 
 	sprintf(val,"%d",sock);
-	snprintf(key, sizeof(key), "/var/socket/%s", sname);	
+	snprintf(key, sizeof(key), "/var/run/socket/%s", sname);	
 	setenv(key, val, 1);
 	RLOGD("getRildSocket val:%s", getenv(key));
 	
@@ -332,8 +332,8 @@
 #endif
 
 	
-	system("rm -rf /var/socket");
-	system("mkdir -p /var/socket");
+	system("rm -rf /var/run/socket");
+	system("mkdir -p /var/run/socket");
 	if(0 > getRildSocket("rild") || 0 > getRildSocket("rild-debug")) {
 		RLOGD("getLogSocket fail.");
 		goto done;
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/test/player_demo/capture_demo.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/test/player_demo/capture_demo.c
index 2a2da17..78d5556 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/test/player_demo/capture_demo.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/test/player_demo/capture_demo.c
@@ -137,7 +137,7 @@
 	int audio_is_init = 0;

 	sc_audio_handle_t capture_handle = SC_AUDIO_INVALID_HANDLE;

 	sc_audio_pcm_config_t pcm_config;

-	char *fpath = "/var/capture.wav";

+	char *fpath = "/mnt/userdata/capture.wav";

 

 	audiodemo_log("capture_demo:Demo go.\n");

 	if(parseOpts(argc,argv) == -1) {		

diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/test/socket_demo/socket_main.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/test/socket_demo/socket_main.c
index 2c732cb..e96da51 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/test/socket_demo/socket_main.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/test/socket_demo/socket_main.c
@@ -56,14 +56,14 @@
 {

 	printf("Usage: %s\n", Opt);

 	printf("sock_create:type        create a new socket(eg. sock_create:1)\n");

-	printf("sock_createclient:type,addr,data       create a new client socket(eg. sock_createclient:1,/var/sockclient,data)\n");

-	printf("sock_createserver:type,addr,backlog       create a new server socket(eg. sock_createserver:1,/var/sockserver,30)\n");

-	printf("sock_bind:fd,addr        socket bind(eg. sock_bind:fd,/var/sockclient)\n");

+	printf("sock_createclient:type,addr,data       create a new client socket(eg. sock_createclient:1,/var/run/sockclient,data)\n");

+	printf("sock_createserver:type,addr,backlog       create a new server socket(eg. sock_createserver:1,/var/run/sockserver,30)\n");

+	printf("sock_bind:fd,addr        socket bind(eg. sock_bind:fd,/var/run/sockclient)\n");

 	printf("sock_listen:fd,backlog   socket listen(eg. sock_listen:fd,30)\n");

 	printf("sock_accept:fd           socket accept(eg. sock_accept:fd)\n");

-	printf("sock_conn:fd,srvaddr        conn server socket(eg. sock_conn:fd, /var/sockserver)\n");

+	printf("sock_conn:fd,srvaddr        conn server socket(eg. sock_conn:fd, /var/run/sockserver)\n");

 	printf("sock_send:fd,message         send socket message(eg. sock_send:fd,ipc test)\n");

-	printf("sock_sendto:fd,srvaddr,message   sendto socket message(eg. sock_sendto:fd,/var/sockserver,ipc test)\n");

+	printf("sock_sendto:fd,srvaddr,message   sendto socket message(eg. sock_sendto:fd,/var/run/sockserver,ipc test)\n");

 	printf("sock_write:fd,message         write socket message(eg. sock_write:fd,ipc test)\n");

 	printf("sock_recv:fd        recv socket message(eg. sock_recv: fd)\n");

 	printf("sock_recvfrom:fd        recvfrom socket message(eg. sock_recvfrom: fd)\n");

@@ -152,7 +152,7 @@
 

 	memset(&my_addr, 0, sizeof(struct sockaddr_un));

 	my_addr.sun_family = AF_UNIX;

-	strncpy(my_addr.sun_path, "/var/socktest", sizeof(my_addr.sun_path)-1);

+	strncpy(my_addr.sun_path, "/var/run/socktest", sizeof(my_addr.sun_path)-1);

 	

 	//·þÎñ¶Ë°ó¶¨µØÖ·

 	if(bind(serverfd, (struct sockaddr*)&my_addr, sizeof(my_addr)) == 0){

@@ -250,7 +250,7 @@
 	//¸ø¿Í»§¶Ë°ó¶¨µØÖ·

 	memset(&my_addr, 0, sizeof(struct sockaddr_un));

 	my_addr.sun_family = AF_UNIX;

-	strncpy(my_addr.sun_path, "/var/sockclient", sizeof(my_addr.sun_path)-1);

+	strncpy(my_addr.sun_path, "/var/run/sockclient", sizeof(my_addr.sun_path)-1);

 

 	//¿Í»§¶Ë°ó¶¨µØÖ·

 	if(bind(clientfd, (struct sockaddr*)&my_addr, sizeof(my_addr)) == 0){

@@ -1298,7 +1298,7 @@
 		}

 	}

 #else

-	snprintf(cmdstr, SOCKET_CMD_MAX_LEN, "sock_createclient:%d,%s,%s", 2, "/var/socketap", "send data to ap test");

+	snprintf(cmdstr, SOCKET_CMD_MAX_LEN, "sock_createclient:%d,%s,%s", 2, "/var/run/socketap", "send data to ap test");

                                                                            

 	socket_create_client(cmdstr, strlen(cmdstr));	

 #endif

diff --git a/update_version.sh b/update_version.sh
index 57852e6..c823225 100755
--- a/update_version.sh
+++ b/update_version.sh
@@ -1,8 +1,8 @@
 #!/bin/bash
 #export LYNQ_VERSION="T106_lynq_version_ap_build_sh"
-LYNQ_AP_VERSION="T106CN-ZS03.V2.01.01.02P52U02.AP.09.11"
-LYNQ_CAP_INSIDE_VERSION="CAP.09.11"
-LYNQ_CAP_VERSION="CAP.09.11"
+LYNQ_AP_VERSION="T106CN-ZS03.V2.01.01.02P54U02.AP.10.02"
+LYNQ_CAP_INSIDE_VERSION="CAP.10.02"
+LYNQ_CAP_VERSION="CAP.10.02"
 COMMIT_ID="$(git rev-parse HEAD)"
 
 LYNQ_SW_INSIDE_VERSION="LYNQ_CONFIG_VERSION = \"${LYNQ_AP_VERSION}_${LYNQ_CAP_INSIDE_VERSION}\""