Squashed 'LYNQ_PUBLIC/' changes from 6f35c858b..f6dab8fc7

f6dab8fc7 [Bugfix][API-1545][AUTOSUSPEND]Repeated sleep and wake-up can cause system time delay
1daddaa8b [Feature][T8TSK-289] add telephonyware to LYNQ_PUBLIC repo 0

git-subtree-dir: LYNQ_PUBLIC
git-subtree-split: f6dab8fc7227cfc57ddfc1703c62ed8a073f80bb
Change-Id: I9a8eca7c4731c47c094e869b9f858725c8183d1e
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/CMakeLists.txt b/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/CMakeLists.txt
new file mode 100644
index 0000000..9967672
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/CMakeLists.txt
@@ -0,0 +1,26 @@
+cmake_minimum_required(VERSION 2.6)
+
+project(uciwrapper)
+
+#add complie options
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -fPIC -O2 -Wall")
+
+#add ld options
+set(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -g -fPIC -O2")
+
+#add header files (-I -L)
+include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include")
+
+#add source file
+file(GLOB src_fils "${CMAKE_CURRENT_SOURCE_DIR}/properties.c")
+
+set(link_libs uci)
+
+add_library(uciwrapper SHARED ${src_fils})
+target_link_libraries(uciwrapper ${link_libs})
+#install
+install(TARGETS uciwrapper
+    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/LICENSE b/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/LICENSE
new file mode 100644
index 0000000..c5c6f3b
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/LICENSE
@@ -0,0 +1,31 @@
+Copyright Statement:
+
+This software/firmware and related documentation ("MediaTek Software") are
+protected under relevant copyright laws. The information contained herein is
+confidential and proprietary to MediaTek Inc. and/or its licensors. Without
+the prior written permission of MediaTek inc. and/or its licensors, any
+reproduction, modification, use or disclosure of MediaTek Software, and
+information contained herein, in whole or in part, shall be strictly
+prohibited.
+
+MediaTek Inc. (C) 2020. All rights reserved.
+
+BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
+THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
+RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER
+ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL
+WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
+NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH
+RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY,
+INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES
+TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO.
+RECEIVER EXPRESSLY ACKNOWLEDGES THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO
+OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES CONTAINED IN MEDIATEK
+SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE
+RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
+STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S
+ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE
+RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE
+MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE
+CHARGE PAID BY RECEIVER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/include/cutils/properties.h b/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/include/cutils/properties.h
new file mode 100644
index 0000000..412428f
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/include/cutils/properties.h
@@ -0,0 +1,133 @@
+/*
+ * Copyright (C) 2006 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.
+ */
+
+#ifndef __CUTILS_PROPERTIES_H
+#define __CUTILS_PROPERTIES_H
+
+#include <sys/cdefs.h>
+#include <stddef.h>
+#include <sys/system_properties.h>
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* System properties are *small* name value pairs managed by the
+** property service.  If your data doesn't fit in the provided
+** space it is not appropriate for a system property.
+**
+** WARNING: system/bionic/include/sys/system_properties.h also defines
+**          these, but with different names.  (TODO: fix that)
+*/
+#define PROPERTY_KEY_MAX   64
+#define PROPERTY_VALUE_MAX  96
+
+/* property_get: returns the length of the value which will never be
+** greater than PROPERTY_VALUE_MAX - 1 and will always be zero terminated.
+** (the length does not include the terminating zero).
+**
+** If the property read fails or returns an empty value, the default
+** value is used (if nonnull).
+*/
+int property_get(const char *key, char *value, const char *default_value);
+
+/* property_get_bool: returns the value of key coerced into a
+** boolean. If the property is not set, then the default value is returned.
+**
+* The following is considered to be true (1):
+**   "1", "true", "y", "yes", "on"
+**
+** The following is considered to be false (0):
+**   "0", "false", "n", "no", "off"
+**
+** The conversion is whitespace-sensitive (e.g. " off" will not be false).
+**
+** If no property with this key is set (or the key is NULL) or the boolean
+** conversion fails, the default value is returned.
+**/
+int8_t property_get_bool(const char *key, int8_t default_value);
+
+/* property_get_int64: returns the value of key truncated and coerced into a
+** int64_t. If the property is not set, then the default value is used.
+**
+** The numeric conversion is identical to strtoimax with the base inferred:
+** - All digits up to the first non-digit characters are read
+** - The longest consecutive prefix of digits is converted to a long
+**
+** Valid strings of digits are:
+** - An optional sign character + or -
+** - An optional prefix indicating the base (otherwise base 10 is assumed)
+**   -- 0 prefix is octal
+**   -- 0x / 0X prefix is hex
+**
+** Leading/trailing whitespace is ignored. Overflow/underflow will cause
+** numeric conversion to fail.
+**
+** If no property with this key is set (or the key is NULL) or the numeric
+** conversion fails, the default value is returned.
+**/
+int64_t property_get_int64(const char *key, int64_t default_value);
+
+/* property_get_int32: returns the value of key truncated and coerced into an
+** int32_t. If the property is not set, then the default value is used.
+**
+** The numeric conversion is identical to strtoimax with the base inferred:
+** - All digits up to the first non-digit characters are read
+** - The longest consecutive prefix of digits is converted to a long
+**
+** Valid strings of digits are:
+** - An optional sign character + or -
+** - An optional prefix indicating the base (otherwise base 10 is assumed)
+**   -- 0 prefix is octal
+**   -- 0x / 0X prefix is hex
+**
+** Leading/trailing whitespace is ignored. Overflow/underflow will cause
+** numeric conversion to fail.
+**
+** If no property with this key is set (or the key is NULL) or the numeric
+** conversion fails, the default value is returned.
+**/
+int32_t property_get_int32(const char *key, int32_t default_value);
+
+/* property_set: returns 0 on success, < 0 on failure
+*/
+int property_set(const char *key, const char *value);
+
+int property_list(void (*propfn)(const char *key, const char *value, void *cookie), void *cookie);
+
+#if defined(__BIONIC_FORTIFY)
+
+extern int __property_get_real(const char *, char *, const char *)
+    __asm__(__USER_LABEL_PREFIX__ "property_get");
+__errordecl(__property_get_too_small_error, "property_get() called with too small of a buffer");
+
+__BIONIC_FORTIFY_INLINE
+int property_get(const char *key, char *value, const char *default_value) {
+    size_t bos = __bos(value);
+    if (bos < PROPERTY_VALUE_MAX) {
+        __property_get_too_small_error();
+    }
+    return __property_get_real(key, value, default_value);
+}
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/include/sys/_system_properties.h b/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/include/sys/_system_properties.h
new file mode 100644
index 0000000..070853a
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/include/sys/_system_properties.h
@@ -0,0 +1,176 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *  * Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *  * Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _INCLUDE_SYS__SYSTEM_PROPERTIES_H
+#define _INCLUDE_SYS__SYSTEM_PROPERTIES_H
+
+#ifndef _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
+#error you should #include <sys/system_properties.h> instead
+#else
+#include <sys/system_properties.h>
+
+typedef struct prop_msg prop_msg;
+
+#define PROP_AREA_MAGIC   0x504f5250
+#define PROP_AREA_VERSION 0xfc6ed0ab
+#define PROP_AREA_VERSION_COMPAT 0x45434f76
+
+#define PROP_SERVICE_NAME "property_service"
+#define PROP_FILENAME "/dev/__properties__"
+
+#define PA_SIZE         (128 * 1024)
+
+#define SERIAL_VALUE_LEN(serial) ((serial) >> 24)
+#define SERIAL_DIRTY(serial) ((serial) & 1)
+
+__BEGIN_DECLS
+
+struct prop_msg {
+    unsigned cmd;
+    char name[PROP_NAME_MAX];
+    char value[PROP_VALUE_MAX];
+};
+
+#define PROP_MSG_SETPROP 1
+
+/*
+** Rules:
+**
+** - there is only one writer, but many readers
+** - prop_area.count will never decrease in value
+** - once allocated, a prop_info's name will not change
+** - once allocated, a prop_info's offset will not change
+** - reading a value requires the following steps
+**   1. serial = pi->serial
+**   2. if SERIAL_DIRTY(serial), wait*, then goto 1
+**   3. memcpy(local, pi->value, SERIAL_VALUE_LEN(serial) + 1)
+**   4. if pi->serial != serial, goto 2
+**
+** - writing a value requires the following steps
+**   1. pi->serial = pi->serial | 1
+**   2. memcpy(pi->value, local_value, value_len)
+**   3. pi->serial = (value_len << 24) | ((pi->serial + 1) & 0xffffff)
+*/
+
+#define PROP_PATH_RAMDISK_DEFAULT  "/default.prop"
+#define PROP_PATH_SYSTEM_BUILD     "/system/build.prop"
+#define PROP_PATH_VENDOR_BUILD     "/vendor/build.prop"
+#define PROP_PATH_LOCAL_OVERRIDE   "/data/local.prop"
+#define PROP_PATH_FACTORY          "/factory/factory.prop"
+
+/*
+** Map the property area from the specified filename.  This
+** method is for testing only.
+*/
+int __system_property_set_filename(const char *filename);
+
+/*
+** Initialize the area to be used to store properties.  Can
+** only be done by a single process that has write access to
+** the property area.
+*/
+int __system_property_area_init();
+
+/* Read the global serial number of the system properties
+**
+** Called to predict if a series of cached __system_property_find
+** objects will have seen __system_property_serial values change.
+** But also aids the converse, as changes in the global serial can
+** also be used to predict if a failed __system_property_find
+** could in-turn now find a new object; thus preventing the
+** cycles of effort to poll __system_property_find.
+**
+** Typically called at beginning of a cache cycle to signal if _any_ possible
+** changes have occurred since last. If there is, one may check each individual
+** __system_property_serial to confirm dirty, or __system_property_find
+** to check if the property now exists. If a call to __system_property_add
+** or __system_property_update has completed between two calls to
+** __system_property_area_serial then the second call will return a larger
+** value than the first call. Beware of race conditions as changes to the
+** properties are not atomic, the main value of this call is to determine
+** whether the expensive __system_property_find is worth retrying to see if
+** a property now exists.
+**
+** Returns the serial number on success, -1 on error.
+*/
+unsigned int __system_property_area_serial();
+
+/* Add a new system property.  Can only be done by a single
+** process that has write access to the property area, and
+** that process must handle sequencing to ensure the property
+** does not already exist and that only one property is added
+** or updated at a time.
+**
+** Returns 0 on success, -1 if the property area is full.
+*/
+int __system_property_add(const char *name, unsigned int namelen,
+                          const char *value, unsigned int valuelen);
+
+/* Update the value of a system property returned by
+** __system_property_find.  Can only be done by a single process
+** that has write access to the property area, and that process
+** must handle sequencing to ensure that only one property is
+** updated at a time.
+**
+** Returns 0 on success, -1 if the parameters are incorrect.
+*/
+int __system_property_update(prop_info *pi, const char *value, unsigned int len);
+
+/* Read the serial number of a system property returned by
+** __system_property_find.
+**
+** Returns the serial number on success, -1 on error.
+*/
+unsigned int __system_property_serial(const prop_info *pi);
+
+/* Wait for any system property to be updated.  Caller must pass
+** in 0 the first time, and the previous return value on each
+** successive call. */
+unsigned int __system_property_wait_any(unsigned int serial);
+
+/*  Compatibility functions to support using an old init with a new libc,
+ ** mostly for the OTA updater binary.  These can be deleted once OTAs from
+ ** a pre-K release no longer needed to be supported. */
+const prop_info *__system_property_find_compat(const char *name);
+int __system_property_read_compat(const prop_info *pi, char *name, char *value);
+int __system_property_foreach_compat(
+    void (*propfn)(const prop_info *pi, void *cookie),
+    void *cookie);
+
+/* Initialize the system properties area in read only mode.
+ * Should be done by all processes that need to read system
+ * properties.
+ *
+ * Returns 0 on success, -1 otherwise.
+ */
+int __system_properties_init();
+
+__END_DECLS
+
+#endif
+#endif
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/include/sys/system_properties.h b/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/include/sys/system_properties.h
new file mode 100644
index 0000000..feb5e40
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/include/sys/system_properties.h
@@ -0,0 +1,89 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *  * Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *  * Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _INCLUDE_SYS_SYSTEM_PROPERTIES_H
+#define _INCLUDE_SYS_SYSTEM_PROPERTIES_H
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+typedef struct prop_info prop_info;
+
+#define PROP_NAME_MAX   32
+#define PROP_VALUE_MAX  92
+
+/* Look up a system property by name, copying its value and a
+** \0 terminator to the provided pointer.  The total bytes
+** copied will be no greater than PROP_VALUE_MAX.  Returns
+** the string length of the value.  A property that is not
+** defined is identical to a property with a length 0 value.
+*/
+int __system_property_get(const char *name, char *value);
+
+/* Set a system property by name.
+**/
+int __system_property_set(const char *key, const char *value);
+
+/* Return a pointer to the system property named name, if it
+** exists, or NULL if there is no such property.  Use
+** __system_property_read() to obtain the string value from
+** the returned prop_info pointer.
+**
+** It is safe to cache the prop_info pointer to avoid future
+** lookups.  These returned pointers will remain valid for
+** the lifetime of the system.
+*/
+const prop_info *__system_property_find(const char *name);
+
+/* Read the value of a system property.  Returns the length
+** of the value.  Copies the value and \0 terminator into
+** the provided value pointer.  Total length (including
+** terminator) will be no greater that PROP_VALUE_MAX.
+**
+** If name is nonzero, up to PROP_NAME_MAX bytes will be
+** copied into the provided name pointer.  The name will
+** be \0 terminated.
+*/
+int __system_property_read(const prop_info *pi, char *name, char *value);
+
+/* Return a prop_info for the nth system property, or NULL if
+** there is no nth property.  Use __system_property_read() to
+** read the value of this property.
+**
+** This method is for inspecting and debugging the property
+** system.  Please use __system_property_find() instead.
+**
+** Order of results may change from call to call.  This is
+** not a bug.
+*/
+const prop_info *__system_property_find_nth(unsigned n);
+
+__END_DECLS
+
+#endif
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/properties.c b/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/properties.c
new file mode 100644
index 0000000..79f4c41
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/properties.c
@@ -0,0 +1,257 @@
+//SPDX-License-Identifier: MediaTekProprietary
+/*
+ * Copyright (C) 2006 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.
+ */
+
+#define LOG_TAG "libuciwrapper"
+// #define LOG_NDEBUG 0
+
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <unistd.h>
+//#include <cutils/sockets.h>
+#include <errno.h>
+#include <assert.h>
+
+#include <cutils/properties.h>
+#include <stdbool.h>
+#include <inttypes.h>
+#include <log/log.h>
+
+int8_t property_get_bool(const char *key, int8_t default_value) {
+    if (!key) {
+        return default_value;
+    }
+
+    int8_t result = default_value;
+    char buf[PROPERTY_VALUE_MAX] = {'\0',};
+
+    int len = property_get(key, buf, "");
+    if (len == 1) {
+        char ch = buf[0];
+        if (ch == '0' || ch == 'n') {
+            result = false;
+        } else if (ch == '1' || ch == 'y') {
+            result = true;
+        }
+    } else if (len > 1) {
+        if (!strcmp(buf, "no") || !strcmp(buf, "false") || !strcmp(buf, "off")) {
+            result = false;
+        } else if (!strcmp(buf, "yes") || !strcmp(buf, "true") || !strcmp(buf, "on")) {
+            result = true;
+        }
+    }
+
+    return result;
+}
+
+// Convert string property to int (default if fails); return default value if out of bounds
+static intmax_t property_get_imax(const char *key, intmax_t lower_bound, intmax_t upper_bound,
+                                  intmax_t default_value) {
+    if (!key) {
+        return default_value;
+    }
+
+    intmax_t result = default_value;
+    char buf[PROPERTY_VALUE_MAX] = {'\0',};
+    char *end = NULL;
+
+    int len = property_get(key, buf, "");
+    if (len > 0) {
+        int tmp = errno;
+        errno = 0;
+
+        // Infer base automatically
+        result = strtoimax(buf, &end, /*base*/0);
+        if ((result == INTMAX_MIN || result == INTMAX_MAX) && errno == ERANGE) {
+            // Over or underflow
+            result = default_value;
+            ALOGV("%s(%s,%" PRIdMAX ") - overflow", __FUNCTION__, key, default_value);
+        } else if (result < lower_bound || result > upper_bound) {
+            // Out of range of requested bounds
+            result = default_value;
+            ALOGV("%s(%s,%" PRIdMAX ") - out of range", __FUNCTION__, key, default_value);
+        } else if (end == buf) {
+            // Numeric conversion failed
+            result = default_value;
+            ALOGV("%s(%s,%" PRIdMAX ") - numeric conversion failed",
+                  __FUNCTION__, key, default_value);
+        }
+
+        errno = tmp;
+    }
+
+    return result;
+}
+
+int64_t property_get_int64(const char *key, int64_t default_value) {
+    return (int64_t)property_get_imax(key, INT64_MIN, INT64_MAX, default_value);
+}
+
+int32_t property_get_int32(const char *key, int32_t default_value) {
+    return (int32_t)property_get_imax(key, INT32_MIN, INT32_MAX, default_value);
+}
+
+#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
+#include <sys/_system_properties.h>
+
+#include <uci.h>
+#define UCI_CONFIG_FILE "/etc/config/radio_property"
+
+static pthread_mutex_t property_mutex = PTHREAD_MUTEX_INITIALIZER;
+
+int property_set(const char *key, const char *new_value) {
+
+    if (NULL == key || NULL == new_value) {
+        return 0;
+    }
+
+    pthread_mutex_lock(&property_mutex);
+
+    int retValue = 0;
+    int value = 0;
+    struct uci_context *_ctx = uci_alloc_context();
+    struct uci_ptr ptr;
+    struct uci_package *pkg = NULL;
+    memset(&ptr, 0, sizeof(ptr));
+
+    // replace '.' with '_' to avoid uci r/w error
+    char tmp_string[PROPERTY_KEY_MAX];
+    int str_i = 0;
+    strncpy(tmp_string, key, PROPERTY_KEY_MAX - 1);
+    for (str_i = 0; str_i < PROPERTY_KEY_MAX; str_i++) {
+        if (tmp_string[str_i] == '.') {
+            tmp_string[str_i] = '_';
+        }
+    }
+
+    ptr.package = "radio_property";
+    ptr.section = "property";
+    ptr.option = tmp_string;
+    if (strlen(new_value) == 0) {
+        ptr.value = ":empty";
+    } else {
+        ptr.value = new_value;
+    }
+    value = uci_set(_ctx, &ptr);
+    if (value == 0) {
+        value = uci_commit(_ctx, &ptr.p, false);
+        if (value == 0) {
+            retValue = 1;
+            ALOGV("property_set ok. %s=%s return %d\n", key, new_value, value);
+        } else {
+            ALOGE("property_set uci_commit fail %s=%s return %d\n", key, new_value, value);
+        }
+    } else {
+        ALOGE("uci_set fail %s=%s return %d\n", key, new_value, value);
+    }
+    uci_unload(_ctx, ptr.p);
+    uci_free_context(_ctx);
+    _ctx = NULL;
+
+    pthread_mutex_unlock(&property_mutex);
+    return retValue;
+}
+
+
+int property_get(const char *key, char *value, const char *default_value) {
+    if (NULL == key || NULL == value) {
+        return 0;
+    }
+
+    pthread_mutex_lock(&property_mutex);
+
+    int retValue = 0;
+    struct uci_context *uciCtx = uci_alloc_context();
+    const char *pValueData = NULL;
+    struct uci_package *pkg = NULL;
+    struct uci_element *e;
+
+    // replace '.' with '_' to avoid uci r/w error
+    char tmp_string[PROPERTY_KEY_MAX];
+    int str_i = 0;
+    strncpy(tmp_string, key, PROPERTY_KEY_MAX - 1);
+    for (str_i = 0; str_i < PROPERTY_KEY_MAX; str_i++) {
+        if (tmp_string[str_i] == '.') {
+            tmp_string[str_i] = '_';
+        }
+    }
+
+
+    if (UCI_OK != uci_load(uciCtx, UCI_CONFIG_FILE, &pkg)) {
+        if (default_value) {
+            int len = strlen(default_value);
+            memcpy(value, default_value, len);
+            value[len] = '\0';
+            retValue = 1;
+        }
+        ALOGE("%s(), uci load fail, file: %s\n", __FUNCTION__, UCI_CONFIG_FILE);
+        goto cleanup;
+    }
+
+    uci_foreach_element(&pkg->sections, e) {
+        struct uci_section *s = uci_to_section(e);
+        if (NULL != (pValueData = uci_lookup_option_string(uciCtx, s, tmp_string))) {
+            if (!strncmp(pValueData, ":empty", strlen(":empty"))) {
+                value[0] = '\0';
+            } else {
+                strncpy(value, pValueData, strlen(pValueData));
+            }
+            retValue = 1;
+            ALOGV("property_get, %s: %s\n", key, value);
+        }
+    }
+    if (!retValue) {
+        if (default_value) {
+            int len = strlen(default_value);
+            memcpy(value, default_value, len);
+            value[len] = '\0';
+            retValue = 1;
+            ALOGV("property_get use default value, %s: %s\n", key, value);
+        }
+    }
+
+    uci_unload(uciCtx, pkg);
+
+cleanup:
+    uci_free_context(uciCtx);
+    uciCtx = NULL;
+
+    pthread_mutex_unlock(&property_mutex);
+    return retValue;
+}
+
+
+struct property_list_callback_data {
+    void (*propfn)(const char *key, const char *value, void *cookie);
+    void *cookie;
+};
+
+static void property_list_callback(const prop_info *pi, void *cookie) {
+    char name[PROP_NAME_MAX];
+    char value[PROP_VALUE_MAX];
+    struct property_list_callback_data *data = cookie;
+
+    //__system_property_read(pi, name, value);
+    data->propfn(name, value, data->cookie);
+}
+
+int property_list(
+    void (*propfn)(const char *key, const char *value, void *cookie),
+    void *cookie) {
+    struct property_list_callback_data data = { propfn, cookie };
+    return 0;
+}
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/radio_property.config b/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/radio_property.config
new file mode 100644
index 0000000..92c0dc3
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/radio_property.config
@@ -0,0 +1,26 @@
+config radio_property 'property'
+	option persist_radio_default_sim '0'
+	option ro_telephony_sim_count '2'
+	option persist_radio_dsss_sim_disable '2'
+	option persist_ril_client_num '1'
+	option persist_radio_multisim_config 'dsds'
+	option persist_vendor_radio_simswitch '1'
+        option persist_vendor_radio_airplane_mode_on 'false'
+	option persist_mtk_volte_enable '1'
+	option ro_vendor_mtk_disable_cap_switch '0'
+	option persist_vendor_radio_data_sim '1'
+	option persist_vendor_ims_support '1'
+	option persist_mtk_volte_enable1 '3'
+	option ro_lynq_sw_version 'T800v01.MP1_RC201b01'
+	option persist_mtk_volte_enable2 '1'
+	option ro_product_device 'mt2735evb-ivt-main'
+	option ro_product_manufacture 'MobileTek'
+	option ro_lynq_hw_version 'T800v04.MP1-MR3'
+	option ro_product_oem 'MobileTek'
+	option ro_spk_volume_level '5'
+	option ro_boot_opt_ps1_rat 'N/Lf/Lt/W/G'
+	option ro_vendor_mtk_protocol1_rat_config 'N/Lf/Lt/W/G'
+	option persist_vendor_radio_mtk_ps2_rat 'Lf/Lt/W/G'
+	option ro_boot_opt_lte_support '1'
+
+