RK3568 android 11 增加自定义API

commit 1516085b166501b98497f93c0aca3190a1692e95
Author: rockemd <rockemd2020@163.com>
Date:   Fri Oct 15 19:21:20 2021 +0800

    add rockemdApi
    make api-stubs-docs-update-current-api
    make api-stubs-docs-non-updatable-update-current-api

diff --git a/device/rockchip/rk356x/device.mk b/device/rockchip/rk356x/device.mk
old mode 100644
new mode 100755
index 8b1fd0e..7a965b9
--- a/device/rockchip/rk356x/device.mk
+++ b/device/rockchip/rk356x/device.mk
@@ -66,6 +66,7 @@ PRODUCT_COPY_FILES += vendor/rockchip/common/phone/etc/spn-conf.xml:system/etc/s
 PRODUCT_PROPERTY_OVERRIDES += \
     ro.product.ota.host = www.rockchip.com:2300 \
     ro.vendor.sdkversion = $(CURRENT_SDK_VERSION) \
+    ro.product.apiversion = 1.0.0 \
     vendor.gralloc.disable_afbc = 0
 
 PRODUCT_COPY_FILES += \
diff --git a/frameworks/base/api/current.txt b/frameworks/base/api/current.txt
old mode 100644
new mode 100755
index e909181..094de39
--- a/frameworks/base/api/current.txt
+++ b/frameworks/base/api/current.txt
@@ -7613,6 +7613,21 @@ package android.app.blob {
 
 }
 
+package android.app.rockemd {
+
+  public class RockemdSmartApi {
+    method @NonNull public String getApiVersion();
+  }
+
+}
+
 package android.app.job {
 
   public class JobInfo implements android.os.Parcelable {
@@ -10193,6 +10208,7 @@ package android.content {
     field public static final String HARDWARE_PROPERTIES_SERVICE = "hardware_properties";
     field public static final String INPUT_METHOD_SERVICE = "input_method";
     field public static final String INPUT_SERVICE = "input";
+    field public static final String ROCKEMD_SMARTAPI_SERVICE = "rockemdsmartapi";
     field public static final String IPSEC_SERVICE = "ipsec";
     field public static final String JOB_SCHEDULER_SERVICE = "jobscheduler";
     field public static final String KEYGUARD_SERVICE = "keyguard";
diff --git a/frameworks/base/core/java/android/app/SystemServiceRegistry.java b/frameworks/base/core/java/android/app/SystemServiceRegistry.java
old mode 100644
new mode 100755
index e599a5c..5868a2b
--- a/frameworks/base/core/java/android/app/SystemServiceRegistry.java
+++ b/frameworks/base/core/java/android/app/SystemServiceRegistry.java
@@ -43,6 +43,8 @@ import android.app.usage.IUsageStatsManager;
 import android.app.usage.NetworkStatsManager;
 import android.app.usage.StorageStatsManager;
 import android.app.usage.UsageStatsManager;
+import android.app.rockemd.IRockemdSmartApi;
+import android.app.rockemd.RockemdSmartApi;
 import android.appwidget.AppWidgetManager;
 import android.bluetooth.BluetoothManager;
 import android.companion.CompanionDeviceManager;
@@ -786,6 +788,15 @@ public final class SystemServiceRegistry {
                 return new UserManager(ctx, service);
             }});
 
+        registerService(Context.ROCKEMD_SMARTAPI_SERVICE, RockemdSmartApi.class,
+                new CachedServiceFetcher<RockemdSmartApi>() {
+            @Override
+            public RockemdSmartApi createService(ContextImpl ctx) {
+                IBinder b = ServiceManager.getService(Context.ROCKEMD_SMARTAPI_SERVICE);
+                IRockemdSmartApi service = IRockemdSmartApi.Stub.asInterface(b);
+                return new RockemdSmartApi(ctx, service);
+            }});
+
         registerService(Context.APP_OPS_SERVICE, AppOpsManager.class,
                 new CachedServiceFetcher<AppOpsManager>() {
             @Override
diff --git a/frameworks/base/core/java/android/app/rockemd/IRockemdSmartApi.aidl b/frameworks/base/core/java/android/app/rockemd/IRockemdSmartApi.aidl
new file mode 100755
index 0000000..e0861de
--- /dev/null
+++ b/frameworks/base/core/java/android/app/rockemd/IRockemdSmartApi.aidl
@@ -0,0 +1,14 @@
+package android.app.rockemd;
+
+/** {@hide} */
+interface IRockemdSmartApi
+{
+    String getApiVersion();
+}
\ No newline at end of file
diff --git a/frameworks/base/core/java/android/app/rockemd/RockemdSmartApi.java b/frameworks/base/core/java/android/app/rockemd/RockemdSmartApi.java
new file mode 100755
index 0000000..79c2422
--- /dev/null
+++ b/frameworks/base/core/java/android/app/rockemd/RockemdSmartApi.java
@@ -0,0 +1,115 @@
+package android.app.rockemd;
+
+import android.content.Context;
+import android.os.RemoteException;
+import android.util.Slog;
+
+import android.annotation.SystemService;
+import android.annotation.SystemApi;
+import android.annotation.NonNull;
+
+import java.util.Objects;
+
+@SystemService(Context.ROCKEMD_SMARTAPI_SERVICE)
+public class RockemdSmartApi {
+    private final Context mContext;
+    private final IRockemdSmartApi mService;
+
+    /** {@hide} */
+    public RockemdSmartApi(Context context, IRockemdSmartApi service) {
+        mContext = Objects.requireNonNull(context);
+        mService = Objects.requireNonNull(service);
+    }
+
+	@NonNull
+	public String getApiVersion() {
+        if (mService != null) {
+            try {
+                return mService.getApiVersion();
+            } catch (RemoteException e) {
+                Slog.e("getApiVersion", "RemoteException " + e);
+            }
+        }
+        return null;
+    }
+
+} 
\ No newline at end of file
diff --git a/frameworks/base/core/java/android/content/Context.java b/frameworks/base/core/java/android/content/Context.java
old mode 100644
new mode 100755
index 8472144..c346ebc
--- a/frameworks/base/core/java/android/content/Context.java
+++ b/frameworks/base/core/java/android/content/Context.java
@@ -3421,6 +3421,7 @@ public abstract class Context {
             WIFI_RTT_RANGING_SERVICE,
             NSD_SERVICE,
             AUDIO_SERVICE,
+            ROCKEMD_SMARTAPI_SERVICE,
             AUTH_SERVICE,
             FINGERPRINT_SERVICE,
             //@hide: FACE_SERVICE,
@@ -3944,6 +3945,12 @@ public abstract class Context {
     public static final String VIBRATOR_SERVICE = "vibrator";
 
     /**
+     * ROCKEMD_SMARTAPI_SERVICE
+     */
+    @SuppressLint("ServiceName")
+    public static final String ROCKEMD_SMARTAPI_SERVICE = "rockemdsmartapi";
+
+    /**
      * Use with {@link #getSystemService(String)} to retrieve a {@link
      * android.app.StatusBarManager} for interacting with the status bar.
      *
diff --git a/frameworks/base/non-updatable-api/current.txt b/frameworks/base/non-updatable-api/current.txt
old mode 100644
new mode 100755
index f0d6871..8e93bca
--- a/frameworks/base/non-updatable-api/current.txt
+++ b/frameworks/base/non-updatable-api/current.txt
@@ -7613,6 +7613,21 @@ package android.app.blob {
 
 }
 
+package android.app.rockemd {
+
+  public class RockemdSmartApi {
+    method @NonNull public String getApiVersion();
+  }
+
+}
+
 package android.app.job {
 
   public class JobInfo implements android.os.Parcelable {
@@ -10193,6 +10208,7 @@ package android.content {
     field public static final String HARDWARE_PROPERTIES_SERVICE = "hardware_properties";
     field public static final String INPUT_METHOD_SERVICE = "input_method";
     field public static final String INPUT_SERVICE = "input";
+    field public static final String ROCKEMD_SMARTAPI_SERVICE = "rockemdsmartapi";
     field public static final String IPSEC_SERVICE = "ipsec";
     field public static final String JOB_SCHEDULER_SERVICE = "jobscheduler";
     field public static final String KEYGUARD_SERVICE = "keyguard";
diff --git a/frameworks/base/services/core/java/com/android/server/rockemd/RockemdSmartApiService.java b/frameworks/base/services/core/java/com/android/server/rockemd/RockemdSmartApiService.java
new file mode 100755
index 0000000..86c0c33
--- /dev/null
+++ b/frameworks/base/services/core/java/com/android/server/rockemd/RockemdSmartApiService.java
@@ -0,0 +1,167 @@
+package com.android.server.rockemd;
+  
+import android.app.rockemd.IRockemdSmartApi;
+import android.content.Context;
+import android.os.Build;
+import android.os.UserHandle;
+import android.os.SystemProperties;
+import android.util.Slog;
+import java.util.List;
+import android.content.Intent;
+import android.app.ActivityManager;
+import android.provider.Settings;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+public class RockemdSmartApiService extends IRockemdSmartApi.Stub {
+	private Context mContext;
+	private static final String TAG = "RockemdSmartApiService";
+	public static final boolean DEBUG = true;
+
+    public RockemdSmartApiService(Context context) {
+        mContext = context;
+        Slog.d(TAG, "================RockemdSmartApiService=======================");
+    }
+
+
+	/*
+	*
+	*	getApiVersion
+	*/
+	public String getApiVersion() {
+        if (DEBUG)
+            Slog.d(TAG, "===================getApiVersion==================");
+        String Version = SystemProperties.get("ro.product.apiversion");
+        return Version;
+    }
+
+
+
+}
\ No newline at end of file
diff --git a/frameworks/base/services/java/com/android/server/SystemServer.java b/frameworks/base/services/java/com/android/server/SystemServer.java
index 72ebc90..c4fee60 100755
--- a/frameworks/base/services/java/com/android/server/SystemServer.java
+++ b/frameworks/base/services/java/com/android/server/SystemServer.java
@@ -180,6 +180,7 @@ import com.android.server.webkit.WebViewUpdateService;
 import com.android.server.wm.ActivityTaskManagerService;
 import com.android.server.wm.WindowManagerGlobalLock;
 import com.android.server.wm.WindowManagerService;
+import com.android.server.rockemd.RockemdSmartApiService;
 
 import dalvik.system.VMRuntime;
 
@@ -1132,6 +1133,12 @@ public final class SystemServer {
             mSystemServiceManager.startService(DropBoxManagerService.class);
             t.traceEnd();
 
+            /* pengbin */
+            t.traceBegin("Startrockemdsmartapi");
+            ServiceManager.addService(Context.ROCKEMD_SMARTAPI_SERVICE, new RockemdSmartApiService(context));
+            t.traceEnd();
+            /* pengbin */
+
             t.traceBegin("StartVibratorService");
             vibrator = new VibratorService(context);
             ServiceManager.addService("vibrator", vibrator);

diff --git a/system/sepolicy/prebuilts/api/26.0/nonplat_sepolicy.cil b/system/sepolicy/prebuilts/api/26.0/nonplat_sepolicy.cil
old mode 100644
new mode 100755
index 2ed4efa..ad8a456
--- a/system/sepolicy/prebuilts/api/26.0/nonplat_sepolicy.cil
+++ b/system/sepolicy/prebuilts/api/26.0/nonplat_sepolicy.cil
@@ -17,11 +17,11 @@
 (typeattributeset property_type (asan_reboot_prop_26_0 audio_prop_26_0 boottime_prop_26_0 bluetooth_prop_26_0 config_prop_26_0 cppreopt_prop_26_0 ctl_bootanim_prop_26_0 ctl_bugreport_prop_26_0 ctl_console_prop_26_0 ctl_default_prop_26_0 ctl_dumpstate_prop_26_0 ctl_fuse_prop_26_0 ctl_mdnsd_prop_26_0 ctl_rildaemon_prop_26_0 dalvik_prop_26_0 debuggerd_prop_26_0 debug_prop_26_0 default_prop_26_0 device_logging_prop_26_0 dhcp_prop_26_0 dumpstate_options_prop_26_0 dumpstate_prop_26_0 ffs_prop_26_0 fingerprint_prop_26_0 firstboot_prop_26_0 hwservicemanager_prop_26_0 logd_prop_26_0 logpersistd_logging_prop_26_0 log_prop_26_0 log_tag_prop_26_0 mmc_prop_26_0 net_dns_prop_26_0 net_radio_prop_26_0 nfc_prop_26_0 overlay_prop_26_0 pan_result_prop_26_0 persist_debug_prop_26_0 persistent_properties_ready_prop_26_0 powerctl_prop_26_0 radio_prop_26_0 restorecon_prop_26_0 safemode_prop_26_0 serialno_prop_26_0 shell_prop_26_0 system_prop_26_0 system_radio_prop_26_0 vold_prop_26_0 wifi_log_prop_26_0 wifi_prop_26_0))
 (typeattributeset core_property_type (audio_prop_26_0 config_prop_26_0 cppreopt_prop_26_0 dalvik_prop_26_0 debuggerd_prop_26_0 debug_prop_26_0 default_prop_26_0 dhcp_prop_26_0 dumpstate_prop_26_0 ffs_prop_26_0 fingerprint_prop_26_0 logd_prop_26_0 net_radio_prop_26_0 nfc_prop_26_0 pan_result_prop_26_0 persist_debug_prop_26_0 powerctl_prop_26_0 radio_prop_26_0 restorecon_prop_26_0 shell_prop_26_0 system_prop_26_0 system_radio_prop_26_0 vold_prop_26_0))
 (typeattributeset log_property_type (log_prop_26_0 log_tag_prop_26_0 wifi_log_prop_26_0))
-(typeattributeset system_server_service (accessibility_service_26_0 account_service_26_0 activity_service_26_0 alarm_service_26_0 appops_service_26_0 appwidget_service_26_0 assetatlas_service_26_0 audio_service_26_0 autofill_service_26_0 backup_service_26_0 batterystats_service_26_0 battery_service_26_0 bluetooth_manager_service_26_0 cameraproxy_service_26_0 clipboard_service_26_0 contexthub_service_26_0 IProxyService_service_26_0 commontime_management_service_26_0 companion_device_service_26_0 connectivity_service_26_0 connmetrics_service_26_0 consumer_ir_service_26_0 content_service_26_0 country_detector_service_26_0 coverage_service_26_0 cpuinfo_service_26_0 dbinfo_service_26_0 device_policy_service_26_0 deviceidle_service_26_0 device_identifiers_service_26_0 devicestoragemonitor_service_26_0 diskstats_service_26_0 display_service_26_0 font_service_26_0 netd_listener_service_26_0 DockObserver_service_26_0 dreams_service_26_0 dropbox_service_26_0 ethernet_service_26_0 fingerprint_service_26_0 gfxinfo_service_26_0 graphicsstats_service_26_0 hardware_service_26_0 hardware_properties_service_26_0 hdmi_control_service_26_0 input_method_service_26_0 input_service_26_0 imms_service_26_0 ipsec_service_26_0 jobscheduler_service_26_0 launcherapps_service_26_0 location_service_26_0 lock_settings_service_26_0 media_projection_service_26_0 media_router_service_26_0 media_session_service_26_0 meminfo_service_26_0 midi_service_26_0 mount_service_26_0 netpolicy_service_26_0 netstats_service_26_0 network_management_service_26_0 network_score_service_26_0 network_time_update_service_26_0 notification_service_26_0 oem_lock_service_26_0 otadexopt_service_26_0 overlay_service_26_0 package_service_26_0 permission_service_26_0 persistent_data_block_service_26_0 pinner_service_26_0 power_service_26_0 print_service_26_0 processinfo_service_26_0 procstats_service_26_0 recovery_service_26_0 registry_service_26_0 restrictions_service_26_0 rttmanager_service_26_0 samplingprofiler_service_26_0 scheduling_policy_service_26_0 search_service_26_0 sec_key_att_app_id_provider_service_26_0 sensorservice_service_26_0 serial_service_26_0 servicediscovery_service_26_0 settings_service_26_0 shortcut_service_26_0 statusbar_service_26_0 storagestats_service_26_0 task_service_26_0 textclassification_service_26_0 textservices_service_26_0 telecom_service_26_0 trust_service_26_0 tv_input_service_26_0 uimode_service_26_0 updatelock_service_26_0 usagestats_service_26_0 usb_service_26_0 user_service_26_0 vibrator_service_26_0 voiceinteraction_service_26_0 vr_manager_service_26_0 wallpaper_service_26_0 webviewupdate_service_26_0 wifip2p_service_26_0 wifiscanner_service_26_0 wifi_service_26_0 wifiaware_service_26_0 window_service_26_0))
-(typeattributeset app_api_service (batteryproperties_service_26_0 gatekeeper_service_26_0 accessibility_service_26_0 account_service_26_0 activity_service_26_0 alarm_service_26_0 appops_service_26_0 appwidget_service_26_0 assetatlas_service_26_0 audio_service_26_0 autofill_service_26_0 backup_service_26_0 batterystats_service_26_0 bluetooth_manager_service_26_0 clipboard_service_26_0 contexthub_service_26_0 IProxyService_service_26_0 companion_device_service_26_0 connectivity_service_26_0 connmetrics_service_26_0 consumer_ir_service_26_0 content_service_26_0 country_detector_service_26_0 device_policy_service_26_0 deviceidle_service_26_0 device_identifiers_service_26_0 display_service_26_0 font_service_26_0 dreams_service_26_0 dropbox_service_26_0 ethernet_service_26_0 fingerprint_service_26_0 graphicsstats_service_26_0 hardware_properties_service_26_0 input_method_service_26_0 input_service_26_0 imms_service_26_0 ipsec_service_26_0 jobscheduler_service_26_0 launcherapps_service_26_0 location_service_26_0 media_projection_service_26_0 media_router_service_26_0 media_session_service_26_0 midi_service_26_0 mount_service_26_0 netpolicy_service_26_0 netstats_service_26_0 network_management_service_26_0 notification_service_26_0 package_service_26_0 permission_service_26_0 power_service_26_0 print_service_26_0 procstats_service_26_0 registry_service_26_0 restrictions_service_26_0 rttmanager_service_26_0 search_service_26_0 sec_key_att_app_id_provider_service_26_0 sensorservice_service_26_0 servicediscovery_service_26_0 settings_service_26_0 shortcut_service_26_0 statusbar_service_26_0 storagestats_service_26_0 textclassification_service_26_0 textservices_service_26_0 telecom_service_26_0 trust_service_26_0 tv_input_service_26_0 uimode_service_26_0 usagestats_service_26_0 usb_service_26_0 user_service_26_0 vibrator_service_26_0 voiceinteraction_service_26_0 wallpaper_service_26_0 webviewupdate_service_26_0 wifip2p_service_26_0 wifi_service_26_0 wifiaware_service_26_0))
-(typeattributeset ephemeral_app_api_service (batteryproperties_service_26_0 accessibility_service_26_0 account_service_26_0 activity_service_26_0 alarm_service_26_0 appops_service_26_0 appwidget_service_26_0 assetatlas_service_26_0 audio_service_26_0 autofill_service_26_0 backup_service_26_0 batterystats_service_26_0 bluetooth_manager_service_26_0 clipboard_service_26_0 IProxyService_service_26_0 companion_device_service_26_0 connectivity_service_26_0 connmetrics_service_26_0 consumer_ir_service_26_0 content_service_26_0 country_detector_service_26_0 deviceidle_service_26_0 device_identifiers_service_26_0 display_service_26_0 font_service_26_0 dreams_service_26_0 dropbox_service_26_0 graphicsstats_service_26_0 hardware_properties_service_26_0 input_method_service_26_0 input_service_26_0 imms_service_26_0 ipsec_service_26_0 jobscheduler_service_26_0 launcherapps_service_26_0 location_service_26_0 media_projection_service_26_0 media_router_service_26_0 media_session_service_26_0 midi_service_26_0 mount_service_26_0 netpolicy_service_26_0 netstats_service_26_0 network_management_service_26_0 notification_service_26_0 package_service_26_0 permission_service_26_0 power_service_26_0 print_service_26_0 procstats_service_26_0 registry_service_26_0 restrictions_service_26_0 rttmanager_service_26_0 search_service_26_0 sensorservice_service_26_0 servicediscovery_service_26_0 settings_service_26_0 statusbar_service_26_0 storagestats_service_26_0 textclassification_service_26_0 textservices_service_26_0 telecom_service_26_0 tv_input_service_26_0 uimode_service_26_0 usagestats_service_26_0 user_service_26_0 vibrator_service_26_0 voiceinteraction_service_26_0 webviewupdate_service_26_0))
+(typeattributeset system_server_service (accessibility_service_26_0 account_service_26_0 activity_service_26_0 alarm_service_26_0 appops_service_26_0 appwidget_service_26_0 assetatlas_service_26_0 audio_service_26_0 autofill_service_26_0 backup_service_26_0 batterystats_service_26_0 battery_service_26_0 bluetooth_manager_service_26_0 cameraproxy_service_26_0 clipboard_service_26_0 contexthub_service_26_0 IProxyService_service_26_0 commontime_management_service_26_0 companion_device_service_26_0 connectivity_service_26_0 connmetrics_service_26_0 consumer_ir_service_26_0 content_service_26_0 country_detector_service_26_0 coverage_service_26_0 cpuinfo_service_26_0 dbinfo_service_26_0 device_policy_service_26_0 deviceidle_service_26_0 device_identifiers_service_26_0 devicestoragemonitor_service_26_0 diskstats_service_26_0 display_service_26_0 font_service_26_0 netd_listener_service_26_0 DockObserver_service_26_0 dreams_service_26_0 dropbox_service_26_0 ethernet_service_26_0 fingerprint_service_26_0 gfxinfo_service_26_0 graphicsstats_service_26_0 hardware_service_26_0 hardware_properties_service_26_0 hdmi_control_service_26_0 input_method_service_26_0 input_service_26_0 imms_service_26_0 ipsec_service_26_0 jobscheduler_service_26_0 launcherapps_service_26_0 location_service_26_0 lock_settings_service_26_0 media_projection_service_26_0 media_router_service_26_0 media_session_service_26_0 meminfo_service_26_0 midi_service_26_0 mount_service_26_0 netpolicy_service_26_0 netstats_service_26_0 network_management_service_26_0 network_score_service_26_0 network_time_update_service_26_0 notification_service_26_0 oem_lock_service_26_0 otadexopt_service_26_0 overlay_service_26_0 package_service_26_0 permission_service_26_0 persistent_data_block_service_26_0 pinner_service_26_0 power_service_26_0 print_service_26_0 processinfo_service_26_0 procstats_service_26_0 recovery_service_26_0 registry_service_26_0 restrictions_service_26_0 rttmanager_service_26_0 samplingprofiler_service_26_0 scheduling_policy_service_26_0 search_service_26_0 sec_key_att_app_id_provider_service_26_0 sensorservice_service_26_0 serial_service_26_0 servicediscovery_service_26_0 settings_service_26_0 shortcut_service_26_0 statusbar_service_26_0 storagestats_service_26_0 task_service_26_0 textclassification_service_26_0 textservices_service_26_0 telecom_service_26_0 trust_service_26_0 tv_input_service_26_0 uimode_service_26_0 updatelock_service_26_0 usagestats_service_26_0 usb_service_26_0 user_service_26_0 vibrator_service_26_0 rockemdsmartapi_service_26_0 voiceinteraction_service_26_0 vr_manager_service_26_0 wallpaper_service_26_0 webviewupdate_service_26_0 wifip2p_service_26_0 wifiscanner_service_26_0 wifi_service_26_0 wifiaware_service_26_0 window_service_26_0))
+(typeattributeset app_api_service (batteryproperties_service_26_0 gatekeeper_service_26_0 accessibility_service_26_0 account_service_26_0 activity_service_26_0 alarm_service_26_0 appops_service_26_0 appwidget_service_26_0 assetatlas_service_26_0 audio_service_26_0 autofill_service_26_0 backup_service_26_0 batterystats_service_26_0 bluetooth_manager_service_26_0 clipboard_service_26_0 contexthub_service_26_0 IProxyService_service_26_0 companion_device_service_26_0 connectivity_service_26_0 connmetrics_service_26_0 consumer_ir_service_26_0 content_service_26_0 country_detector_service_26_0 device_policy_service_26_0 deviceidle_service_26_0 device_identifiers_service_26_0 display_service_26_0 font_service_26_0 dreams_service_26_0 dropbox_service_26_0 ethernet_service_26_0 fingerprint_service_26_0 graphicsstats_service_26_0 hardware_properties_service_26_0 input_method_service_26_0 input_service_26_0 imms_service_26_0 ipsec_service_26_0 jobscheduler_service_26_0 launcherapps_service_26_0 location_service_26_0 media_projection_service_26_0 media_router_service_26_0 media_session_service_26_0 midi_service_26_0 mount_service_26_0 netpolicy_service_26_0 netstats_service_26_0 network_management_service_26_0 notification_service_26_0 package_service_26_0 permission_service_26_0 power_service_26_0 print_service_26_0 procstats_service_26_0 registry_service_26_0 restrictions_service_26_0 rttmanager_service_26_0 search_service_26_0 sec_key_att_app_id_provider_service_26_0 sensorservice_service_26_0 servicediscovery_service_26_0 settings_service_26_0 shortcut_service_26_0 statusbar_service_26_0 storagestats_service_26_0 textclassification_service_26_0 textservices_service_26_0 telecom_service_26_0 trust_service_26_0 tv_input_service_26_0 uimode_service_26_0 usagestats_service_26_0 usb_service_26_0 user_service_26_0 vibrator_service_26_0 rockemdsmartapi_service_26_0 voiceinteraction_service_26_0 wallpaper_service_26_0 webviewupdate_service_26_0 wifip2p_service_26_0 wifi_service_26_0 wifiaware_service_26_0))
+(typeattributeset ephemeral_app_api_service (batteryproperties_service_26_0 accessibility_service_26_0 account_service_26_0 activity_service_26_0 alarm_service_26_0 appops_service_26_0 appwidget_service_26_0 assetatlas_service_26_0 audio_service_26_0 autofill_service_26_0 backup_service_26_0 batterystats_service_26_0 bluetooth_manager_service_26_0 clipboard_service_26_0 IProxyService_service_26_0 companion_device_service_26_0 connectivity_service_26_0 connmetrics_service_26_0 consumer_ir_service_26_0 content_service_26_0 country_detector_service_26_0 deviceidle_service_26_0 device_identifiers_service_26_0 display_service_26_0 font_service_26_0 dreams_service_26_0 dropbox_service_26_0 graphicsstats_service_26_0 hardware_properties_service_26_0 input_method_service_26_0 input_service_26_0 imms_service_26_0 ipsec_service_26_0 jobscheduler_service_26_0 launcherapps_service_26_0 location_service_26_0 media_projection_service_26_0 media_router_service_26_0 media_session_service_26_0 midi_service_26_0 mount_service_26_0 netpolicy_service_26_0 netstats_service_26_0 network_management_service_26_0 notification_service_26_0 package_service_26_0 permission_service_26_0 power_service_26_0 print_service_26_0 procstats_service_26_0 registry_service_26_0 restrictions_service_26_0 rttmanager_service_26_0 search_service_26_0 sensorservice_service_26_0 servicediscovery_service_26_0 settings_service_26_0 statusbar_service_26_0 storagestats_service_26_0 textclassification_service_26_0 textservices_service_26_0 telecom_service_26_0 tv_input_service_26_0 uimode_service_26_0 usagestats_service_26_0 user_service_26_0 vibrator_service_26_0 rockemdsmartapi_service_26_0 voiceinteraction_service_26_0 webviewupdate_service_26_0))
 (typeattributeset system_api_service (cpuinfo_service_26_0 dbinfo_service_26_0 diskstats_service_26_0 gfxinfo_service_26_0 hdmi_control_service_26_0 lock_settings_service_26_0 meminfo_service_26_0 network_score_service_26_0 oem_lock_service_26_0 persistent_data_block_service_26_0 serial_service_26_0 updatelock_service_26_0 wifiscanner_service_26_0 window_service_26_0))
-(typeattributeset service_manager_type (audioserver_service_26_0 batteryproperties_service_26_0 bluetooth_service_26_0 cameraserver_service_26_0 default_android_service_26_0 drmserver_service_26_0 dumpstate_service_26_0 fingerprintd_service_26_0 hal_fingerprint_service_26_0 gatekeeper_service_26_0 gpu_service_26_0 inputflinger_service_26_0 incident_service_26_0 installd_service_26_0 keystore_service_26_0 mediaserver_service_26_0 mediametrics_service_26_0 mediaextractor_service_26_0 mediacodec_service_26_0 mediadrmserver_service_26_0 mediacasserver_service_26_0 netd_service_26_0 nfc_service_26_0 radio_service_26_0 storaged_service_26_0 surfaceflinger_service_26_0 system_app_service_26_0 update_engine_service_26_0 virtual_touchpad_service_26_0 vr_hwc_service_26_0 accessibility_service_26_0 account_service_26_0 activity_service_26_0 alarm_service_26_0 appops_service_26_0 appwidget_service_26_0 assetatlas_service_26_0 audio_service_26_0 autofill_service_26_0 backup_service_26_0 batterystats_service_26_0 battery_service_26_0 bluetooth_manager_service_26_0 cameraproxy_service_26_0 clipboard_service_26_0 contexthub_service_26_0 IProxyService_service_26_0 commontime_management_service_26_0 companion_device_service_26_0 connectivity_service_26_0 connmetrics_service_26_0 consumer_ir_service_26_0 content_service_26_0 country_detector_service_26_0 coverage_service_26_0 cpuinfo_service_26_0 dbinfo_service_26_0 device_policy_service_26_0 deviceidle_service_26_0 device_identifiers_service_26_0 devicestoragemonitor_service_26_0 diskstats_service_26_0 display_service_26_0 font_service_26_0 netd_listener_service_26_0 DockObserver_service_26_0 dreams_service_26_0 dropbox_service_26_0 ethernet_service_26_0 fingerprint_service_26_0 gfxinfo_service_26_0 graphicsstats_service_26_0 hardware_service_26_0 hardware_properties_service_26_0 hdmi_control_service_26_0 input_method_service_26_0 input_service_26_0 imms_service_26_0 ipsec_service_26_0 jobscheduler_service_26_0 launcherapps_service_26_0 location_service_26_0 lock_settings_service_26_0 media_projection_service_26_0 media_router_service_26_0 media_session_service_26_0 meminfo_service_26_0 midi_service_26_0 mount_service_26_0 netpolicy_service_26_0 netstats_service_26_0 network_management_service_26_0 network_score_service_26_0 network_time_update_service_26_0 notification_service_26_0 oem_lock_service_26_0 otadexopt_service_26_0 overlay_service_26_0 package_service_26_0 permission_service_26_0 persistent_data_block_service_26_0 pinner_service_26_0 power_service_26_0 print_service_26_0 processinfo_service_26_0 procstats_service_26_0 recovery_service_26_0 registry_service_26_0 restrictions_service_26_0 rttmanager_service_26_0 samplingprofiler_service_26_0 scheduling_policy_service_26_0 search_service_26_0 sec_key_att_app_id_provider_service_26_0 sensorservice_service_26_0 serial_service_26_0 servicediscovery_service_26_0 settings_service_26_0 shortcut_service_26_0 statusbar_service_26_0 storagestats_service_26_0 task_service_26_0 textclassification_service_26_0 textservices_service_26_0 telecom_service_26_0 trust_service_26_0 tv_input_service_26_0 uimode_service_26_0 updatelock_service_26_0 usagestats_service_26_0 usb_service_26_0 user_service_26_0 vibrator_service_26_0 voiceinteraction_service_26_0 vr_manager_service_26_0 wallpaper_service_26_0 webviewupdate_service_26_0 wifip2p_service_26_0 wifiscanner_service_26_0 wifi_service_26_0 wificond_service_26_0 wifiaware_service_26_0 window_service_26_0))
+(typeattributeset service_manager_type (audioserver_service_26_0 batteryproperties_service_26_0 bluetooth_service_26_0 cameraserver_service_26_0 default_android_service_26_0 drmserver_service_26_0 dumpstate_service_26_0 fingerprintd_service_26_0 hal_fingerprint_service_26_0 gatekeeper_service_26_0 gpu_service_26_0 inputflinger_service_26_0 incident_service_26_0 installd_service_26_0 keystore_service_26_0 mediaserver_service_26_0 mediametrics_service_26_0 mediaextractor_service_26_0 mediacodec_service_26_0 mediadrmserver_service_26_0 mediacasserver_service_26_0 netd_service_26_0 nfc_service_26_0 radio_service_26_0 storaged_service_26_0 surfaceflinger_service_26_0 system_app_service_26_0 update_engine_service_26_0 virtual_touchpad_service_26_0 vr_hwc_service_26_0 accessibility_service_26_0 account_service_26_0 activity_service_26_0 alarm_service_26_0 appops_service_26_0 appwidget_service_26_0 assetatlas_service_26_0 audio_service_26_0 autofill_service_26_0 backup_service_26_0 batterystats_service_26_0 battery_service_26_0 bluetooth_manager_service_26_0 cameraproxy_service_26_0 clipboard_service_26_0 contexthub_service_26_0 IProxyService_service_26_0 commontime_management_service_26_0 companion_device_service_26_0 connectivity_service_26_0 connmetrics_service_26_0 consumer_ir_service_26_0 content_service_26_0 country_detector_service_26_0 coverage_service_26_0 cpuinfo_service_26_0 dbinfo_service_26_0 device_policy_service_26_0 deviceidle_service_26_0 device_identifiers_service_26_0 devicestoragemonitor_service_26_0 diskstats_service_26_0 display_service_26_0 font_service_26_0 netd_listener_service_26_0 DockObserver_service_26_0 dreams_service_26_0 dropbox_service_26_0 ethernet_service_26_0 fingerprint_service_26_0 gfxinfo_service_26_0 graphicsstats_service_26_0 hardware_service_26_0 hardware_properties_service_26_0 hdmi_control_service_26_0 input_method_service_26_0 input_service_26_0 imms_service_26_0 ipsec_service_26_0 jobscheduler_service_26_0 launcherapps_service_26_0 location_service_26_0 lock_settings_service_26_0 media_projection_service_26_0 media_router_service_26_0 media_session_service_26_0 meminfo_service_26_0 midi_service_26_0 mount_service_26_0 netpolicy_service_26_0 netstats_service_26_0 network_management_service_26_0 network_score_service_26_0 network_time_update_service_26_0 notification_service_26_0 oem_lock_service_26_0 otadexopt_service_26_0 overlay_service_26_0 package_service_26_0 permission_service_26_0 persistent_data_block_service_26_0 pinner_service_26_0 power_service_26_0 print_service_26_0 processinfo_service_26_0 procstats_service_26_0 recovery_service_26_0 registry_service_26_0 restrictions_service_26_0 rttmanager_service_26_0 samplingprofiler_service_26_0 scheduling_policy_service_26_0 search_service_26_0 sec_key_att_app_id_provider_service_26_0 sensorservice_service_26_0 serial_service_26_0 servicediscovery_service_26_0 settings_service_26_0 shortcut_service_26_0 statusbar_service_26_0 storagestats_service_26_0 task_service_26_0 textclassification_service_26_0 textservices_service_26_0 telecom_service_26_0 trust_service_26_0 tv_input_service_26_0 uimode_service_26_0 updatelock_service_26_0 usagestats_service_26_0 usb_service_26_0 user_service_26_0 vibrator_service_26_0 rockemdsmartapi_service_26_0 voiceinteraction_service_26_0 vr_manager_service_26_0 wallpaper_service_26_0 webviewupdate_service_26_0 wifip2p_service_26_0 wifiscanner_service_26_0 wifi_service_26_0 wificond_service_26_0 wifiaware_service_26_0 window_service_26_0))
 (typeattributeset hwservice_manager_type (default_android_hwservice_26_0 fwk_display_hwservice_26_0 fwk_scheduler_hwservice_26_0 fwk_sensor_hwservice_26_0 hal_audio_hwservice_26_0 hal_bluetooth_hwservice_26_0 hal_bootctl_hwservice_26_0 hal_camera_hwservice_26_0 hal_configstore_ISurfaceFlingerConfigs_26_0 hal_contexthub_hwservice_26_0 hal_drm_hwservice_26_0 hal_dumpstate_hwservice_26_0 hal_fingerprint_hwservice_26_0 hal_gatekeeper_hwservice_26_0 hal_gnss_hwservice_26_0 hal_graphics_allocator_hwservice_26_0 hal_graphics_composer_hwservice_26_0 hal_graphics_mapper_hwservice_26_0 hal_health_hwservice_26_0 hal_ir_hwservice_26_0 hal_keymaster_hwservice_26_0 hal_light_hwservice_26_0 hal_memtrack_hwservice_26_0 hal_nfc_hwservice_26_0 hal_oemlock_hwservice_26_0 hal_omx_hwservice_26_0 hal_power_hwservice_26_0 hal_renderscript_hwservice_26_0 hal_sensors_hwservice_26_0 hal_telephony_hwservice_26_0 hal_thermal_hwservice_26_0 hal_tv_cec_hwservice_26_0 hal_tv_input_hwservice_26_0 hal_usb_hwservice_26_0 hal_vibrator_hwservice_26_0 hal_vr_hwservice_26_0 hal_weaver_hwservice_26_0 hal_wifi_hwservice_26_0 hal_wifi_supplicant_hwservice_26_0 hidl_allocator_hwservice_26_0 hidl_base_hwservice_26_0 hidl_manager_hwservice_26_0 hidl_memory_hwservice_26_0 hidl_token_hwservice_26_0 system_wifi_keystore_hwservice_26_0))
 (typeattributeset same_process_hwservice (hal_graphics_mapper_hwservice_26_0 hal_renderscript_hwservice_26_0))
 (typeattributeset coredomain_hwservice (fwk_display_hwservice_26_0 fwk_scheduler_hwservice_26_0 fwk_sensor_hwservice_26_0 hidl_allocator_hwservice_26_0 hidl_manager_hwservice_26_0 hidl_memory_hwservice_26_0 hidl_token_hwservice_26_0 system_wifi_keystore_hwservice_26_0))
@@ -1399,6 +1399,8 @@
 (roletype object_r user_service_26_0)
 (typeattribute vibrator_service_26_0)
 (roletype object_r vibrator_service_26_0)
+(typeattribute rockemdsmartapi_service_26_0)
+(roletype object_r rockemdsmartapi_service_26_0)
 (typeattribute voiceinteraction_service_26_0)
 (roletype object_r voiceinteraction_service_26_0)
 (typeattribute vr_manager_service_26_0)
diff --git a/system/sepolicy/prebuilts/api/26.0/private/service_contexts b/system/sepolicy/prebuilts/api/26.0/private/service_contexts
old mode 100644
new mode 100755
index ff97d66..580b3c7
--- a/system/sepolicy/prebuilts/api/26.0/private/service_contexts
+++ b/system/sepolicy/prebuilts/api/26.0/private/service_contexts
@@ -158,6 +158,7 @@ usagestats                                u:object_r:usagestats_service:s0
 usb                                       u:object_r:usb_service:s0
 user                                      u:object_r:user_service:s0
 vibrator                                  u:object_r:vibrator_service:s0
+rockemdsmartapi                           u:object_r:rockemdsmartapi_service:s0
 virtual_touchpad                          u:object_r:virtual_touchpad_service:s0
 voiceinteraction                          u:object_r:voiceinteraction_service:s0
 vr_hwc                                    u:object_r:vr_hwc_service:s0
diff --git a/system/sepolicy/prebuilts/api/26.0/public/service.te b/system/sepolicy/prebuilts/api/26.0/public/service.te
old mode 100644
new mode 100755
index da540db..c53edf2
--- a/system/sepolicy/prebuilts/api/26.0/public/service.te
+++ b/system/sepolicy/prebuilts/api/26.0/public/service.te
@@ -135,6 +135,7 @@ type usagestats_service, app_api_service, ephemeral_app_api_service, system_serv
 type usb_service, app_api_service, system_server_service, service_manager_type;
 type user_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type;
 type vibrator_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type;
+type rockemdsmartapi_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type;
 type voiceinteraction_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type;
 type vr_manager_service, system_server_service, service_manager_type;
 type wallpaper_service, app_api_service, system_server_service, service_manager_type;
diff --git a/system/sepolicy/prebuilts/api/27.0/nonplat_sepolicy.cil b/system/sepolicy/prebuilts/api/27.0/nonplat_sepolicy.cil
old mode 100644
new mode 100755
index da550c1..2ff4a15
--- a/system/sepolicy/prebuilts/api/27.0/nonplat_sepolicy.cil
+++ b/system/sepolicy/prebuilts/api/27.0/nonplat_sepolicy.cil
@@ -18,11 +18,11 @@
 (typeattributeset property_type (audio_prop_27_0 boottime_prop_27_0 bluetooth_prop_27_0 config_prop_27_0 cppreopt_prop_27_0 ctl_bootanim_prop_27_0 ctl_bugreport_prop_27_0 ctl_console_prop_27_0 ctl_default_prop_27_0 ctl_dumpstate_prop_27_0 ctl_fuse_prop_27_0 ctl_mdnsd_prop_27_0 ctl_rildaemon_prop_27_0 dalvik_prop_27_0 debuggerd_prop_27_0 debug_prop_27_0 default_prop_27_0 device_logging_prop_27_0 dhcp_prop_27_0 dumpstate_options_prop_27_0 dumpstate_prop_27_0 ffs_prop_27_0 fingerprint_prop_27_0 firstboot_prop_27_0 hwservicemanager_prop_27_0 logd_prop_27_0 logpersistd_logging_prop_27_0 log_prop_27_0 log_tag_prop_27_0 mmc_prop_27_0 net_dns_prop_27_0 net_radio_prop_27_0 netd_stable_secret_prop_27_0 nfc_prop_27_0 overlay_prop_27_0 pan_result_prop_27_0 persist_debug_prop_27_0 persistent_properties_ready_prop_27_0 powerctl_prop_27_0 radio_prop_27_0 restorecon_prop_27_0 safemode_prop_27_0 serialno_prop_27_0 shell_prop_27_0 system_prop_27_0 system_radio_prop_27_0 vold_prop_27_0 wifi_log_prop_27_0 wifi_prop_27_0 qemu_prop qemu_cmdline radio_noril_prop opengles_prop))
 (typeattributeset core_property_type (audio_prop_27_0 config_prop_27_0 cppreopt_prop_27_0 dalvik_prop_27_0 debuggerd_prop_27_0 debug_prop_27_0 default_prop_27_0 dhcp_prop_27_0 dumpstate_prop_27_0 ffs_prop_27_0 fingerprint_prop_27_0 logd_prop_27_0 net_radio_prop_27_0 nfc_prop_27_0 pan_result_prop_27_0 persist_debug_prop_27_0 powerctl_prop_27_0 radio_prop_27_0 restorecon_prop_27_0 shell_prop_27_0 system_prop_27_0 system_radio_prop_27_0 vold_prop_27_0))
 (typeattributeset log_property_type (log_prop_27_0 log_tag_prop_27_0 wifi_log_prop_27_0))
-(typeattributeset system_server_service (accessibility_service_27_0 account_service_27_0 activity_service_27_0 alarm_service_27_0 appops_service_27_0 appwidget_service_27_0 assetatlas_service_27_0 audio_service_27_0 autofill_service_27_0 backup_service_27_0 batterystats_service_27_0 battery_service_27_0 bluetooth_manager_service_27_0 broadcastradio_service_27_0 cameraproxy_service_27_0 clipboard_service_27_0 contexthub_service_27_0 IProxyService_service_27_0 commontime_management_service_27_0 companion_device_service_27_0 connectivity_service_27_0 connmetrics_service_27_0 consumer_ir_service_27_0 content_service_27_0 country_detector_service_27_0 coverage_service_27_0 cpuinfo_service_27_0 dbinfo_service_27_0 device_policy_service_27_0 deviceidle_service_27_0 device_identifiers_service_27_0 devicestoragemonitor_service_27_0 diskstats_service_27_0 display_service_27_0 font_service_27_0 netd_listener_service_27_0 DockObserver_service_27_0 dreams_service_27_0 dropbox_service_27_0 ethernet_service_27_0 fingerprint_service_27_0 gfxinfo_service_27_0 graphicsstats_service_27_0 hardware_service_27_0 hardware_properties_service_27_0 hdmi_control_service_27_0 input_method_service_27_0 input_service_27_0 imms_service_27_0 ipsec_service_27_0 jobscheduler_service_27_0 launcherapps_service_27_0 location_service_27_0 lock_settings_service_27_0 media_projection_service_27_0 media_router_service_27_0 media_session_service_27_0 meminfo_service_27_0 midi_service_27_0 mount_service_27_0 netpolicy_service_27_0 netstats_service_27_0 network_management_service_27_0 network_score_service_27_0 network_time_update_service_27_0 notification_service_27_0 oem_lock_service_27_0 otadexopt_service_27_0 overlay_service_27_0 package_service_27_0 package_native_service_27_0 permission_service_27_0 persistent_data_block_service_27_0 pinner_service_27_0 power_service_27_0 print_service_27_0 processinfo_service_27_0 procstats_service_27_0 recovery_service_27_0 registry_service_27_0 restrictions_service_27_0 rttmanager_service_27_0 samplingprofiler_service_27_0 scheduling_policy_service_27_0 search_service_27_0 sec_key_att_app_id_provider_service_27_0 sensorservice_service_27_0 serial_service_27_0 servicediscovery_service_27_0 settings_service_27_0 shortcut_service_27_0 statusbar_service_27_0 storagestats_service_27_0 task_service_27_0 textclassification_service_27_0 textservices_service_27_0 telecom_service_27_0 timezone_service_27_0 trust_service_27_0 tv_input_service_27_0 uimode_service_27_0 updatelock_service_27_0 usagestats_service_27_0 usb_service_27_0 user_service_27_0 vibrator_service_27_0 voiceinteraction_service_27_0 vr_manager_service_27_0 wallpaper_service_27_0 webviewupdate_service_27_0 wifip2p_service_27_0 wifiscanner_service_27_0 wifi_service_27_0 wifiaware_service_27_0 window_service_27_0))
-(typeattributeset app_api_service (batteryproperties_service_27_0 gatekeeper_service_27_0 accessibility_service_27_0 account_service_27_0 activity_service_27_0 alarm_service_27_0 appops_service_27_0 appwidget_service_27_0 assetatlas_service_27_0 audio_service_27_0 autofill_service_27_0 backup_service_27_0 batterystats_service_27_0 bluetooth_manager_service_27_0 clipboard_service_27_0 contexthub_service_27_0 IProxyService_service_27_0 companion_device_service_27_0 connectivity_service_27_0 connmetrics_service_27_0 consumer_ir_service_27_0 content_service_27_0 country_detector_service_27_0 device_policy_service_27_0 deviceidle_service_27_0 device_identifiers_service_27_0 display_service_27_0 font_service_27_0 dreams_service_27_0 dropbox_service_27_0 ethernet_service_27_0 fingerprint_service_27_0 graphicsstats_service_27_0 hardware_properties_service_27_0 input_method_service_27_0 input_service_27_0 imms_service_27_0 ipsec_service_27_0 jobscheduler_service_27_0 launcherapps_service_27_0 location_service_27_0 media_projection_service_27_0 media_router_service_27_0 media_session_service_27_0 midi_service_27_0 mount_service_27_0 netpolicy_service_27_0 netstats_service_27_0 network_management_service_27_0 notification_service_27_0 package_service_27_0 permission_service_27_0 power_service_27_0 print_service_27_0 procstats_service_27_0 registry_service_27_0 restrictions_service_27_0 rttmanager_service_27_0 search_service_27_0 sec_key_att_app_id_provider_service_27_0 sensorservice_service_27_0 servicediscovery_service_27_0 settings_service_27_0 shortcut_service_27_0 statusbar_service_27_0 storagestats_service_27_0 textclassification_service_27_0 textservices_service_27_0 telecom_service_27_0 trust_service_27_0 tv_input_service_27_0 uimode_service_27_0 usagestats_service_27_0 usb_service_27_0 user_service_27_0 vibrator_service_27_0 voiceinteraction_service_27_0 wallpaper_service_27_0 webviewupdate_service_27_0 wifip2p_service_27_0 wifi_service_27_0 wifiaware_service_27_0))
-(typeattributeset ephemeral_app_api_service (batteryproperties_service_27_0 accessibility_service_27_0 account_service_27_0 activity_service_27_0 alarm_service_27_0 appops_service_27_0 appwidget_service_27_0 assetatlas_service_27_0 audio_service_27_0 autofill_service_27_0 backup_service_27_0 batterystats_service_27_0 bluetooth_manager_service_27_0 clipboard_service_27_0 IProxyService_service_27_0 companion_device_service_27_0 connectivity_service_27_0 connmetrics_service_27_0 consumer_ir_service_27_0 content_service_27_0 country_detector_service_27_0 deviceidle_service_27_0 device_identifiers_service_27_0 display_service_27_0 font_service_27_0 dreams_service_27_0 dropbox_service_27_0 graphicsstats_service_27_0 hardware_properties_service_27_0 input_method_service_27_0 input_service_27_0 imms_service_27_0 ipsec_service_27_0 jobscheduler_service_27_0 launcherapps_service_27_0 location_service_27_0 media_projection_service_27_0 media_router_service_27_0 media_session_service_27_0 midi_service_27_0 mount_service_27_0 netpolicy_service_27_0 netstats_service_27_0 network_management_service_27_0 notification_service_27_0 package_service_27_0 permission_service_27_0 power_service_27_0 print_service_27_0 procstats_service_27_0 registry_service_27_0 restrictions_service_27_0 rttmanager_service_27_0 search_service_27_0 sensorservice_service_27_0 servicediscovery_service_27_0 settings_service_27_0 statusbar_service_27_0 storagestats_service_27_0 textclassification_service_27_0 textservices_service_27_0 telecom_service_27_0 tv_input_service_27_0 uimode_service_27_0 usagestats_service_27_0 user_service_27_0 vibrator_service_27_0 voiceinteraction_service_27_0 webviewupdate_service_27_0))
+(typeattributeset system_server_service (accessibility_service_27_0 account_service_27_0 activity_service_27_0 alarm_service_27_0 appops_service_27_0 appwidget_service_27_0 assetatlas_service_27_0 audio_service_27_0 autofill_service_27_0 backup_service_27_0 batterystats_service_27_0 battery_service_27_0 bluetooth_manager_service_27_0 broadcastradio_service_27_0 cameraproxy_service_27_0 clipboard_service_27_0 contexthub_service_27_0 IProxyService_service_27_0 commontime_management_service_27_0 companion_device_service_27_0 connectivity_service_27_0 connmetrics_service_27_0 consumer_ir_service_27_0 content_service_27_0 country_detector_service_27_0 coverage_service_27_0 cpuinfo_service_27_0 dbinfo_service_27_0 device_policy_service_27_0 deviceidle_service_27_0 device_identifiers_service_27_0 devicestoragemonitor_service_27_0 diskstats_service_27_0 display_service_27_0 font_service_27_0 netd_listener_service_27_0 DockObserver_service_27_0 dreams_service_27_0 dropbox_service_27_0 ethernet_service_27_0 fingerprint_service_27_0 gfxinfo_service_27_0 graphicsstats_service_27_0 hardware_service_27_0 hardware_properties_service_27_0 hdmi_control_service_27_0 input_method_service_27_0 input_service_27_0 imms_service_27_0 ipsec_service_27_0 jobscheduler_service_27_0 launcherapps_service_27_0 location_service_27_0 lock_settings_service_27_0 media_projection_service_27_0 media_router_service_27_0 media_session_service_27_0 meminfo_service_27_0 midi_service_27_0 mount_service_27_0 netpolicy_service_27_0 netstats_service_27_0 network_management_service_27_0 network_score_service_27_0 network_time_update_service_27_0 notification_service_27_0 oem_lock_service_27_0 otadexopt_service_27_0 overlay_service_27_0 package_service_27_0 package_native_service_27_0 permission_service_27_0 persistent_data_block_service_27_0 pinner_service_27_0 power_service_27_0 print_service_27_0 processinfo_service_27_0 procstats_service_27_0 recovery_service_27_0 registry_service_27_0 restrictions_service_27_0 rttmanager_service_27_0 samplingprofiler_service_27_0 scheduling_policy_service_27_0 search_service_27_0 sec_key_att_app_id_provider_service_27_0 sensorservice_service_27_0 serial_service_27_0 servicediscovery_service_27_0 settings_service_27_0 shortcut_service_27_0 statusbar_service_27_0 storagestats_service_27_0 task_service_27_0 textclassification_service_27_0 textservices_service_27_0 telecom_service_27_0 timezone_service_27_0 trust_service_27_0 tv_input_service_27_0 uimode_service_27_0 updatelock_service_27_0 usagestats_service_27_0 usb_service_27_0 user_service_27_0 vibrator_service_27_0 rockemdsmartapi_service_27_0 voiceinteraction_service_27_0 vr_manager_service_27_0 wallpaper_service_27_0 webviewupdate_service_27_0 wifip2p_service_27_0 wifiscanner_service_27_0 wifi_service_27_0 wifiaware_service_27_0 window_service_27_0))
+(typeattributeset app_api_service (batteryproperties_service_27_0 gatekeeper_service_27_0 accessibility_service_27_0 account_service_27_0 activity_service_27_0 alarm_service_27_0 appops_service_27_0 appwidget_service_27_0 assetatlas_service_27_0 audio_service_27_0 autofill_service_27_0 backup_service_27_0 batterystats_service_27_0 bluetooth_manager_service_27_0 clipboard_service_27_0 contexthub_service_27_0 IProxyService_service_27_0 companion_device_service_27_0 connectivity_service_27_0 connmetrics_service_27_0 consumer_ir_service_27_0 content_service_27_0 country_detector_service_27_0 device_policy_service_27_0 deviceidle_service_27_0 device_identifiers_service_27_0 display_service_27_0 font_service_27_0 dreams_service_27_0 dropbox_service_27_0 ethernet_service_27_0 fingerprint_service_27_0 graphicsstats_service_27_0 hardware_properties_service_27_0 input_method_service_27_0 input_service_27_0 imms_service_27_0 ipsec_service_27_0 jobscheduler_service_27_0 launcherapps_service_27_0 location_service_27_0 media_projection_service_27_0 media_router_service_27_0 media_session_service_27_0 midi_service_27_0 mount_service_27_0 netpolicy_service_27_0 netstats_service_27_0 network_management_service_27_0 notification_service_27_0 package_service_27_0 permission_service_27_0 power_service_27_0 print_service_27_0 procstats_service_27_0 registry_service_27_0 restrictions_service_27_0 rttmanager_service_27_0 search_service_27_0 sec_key_att_app_id_provider_service_27_0 sensorservice_service_27_0 servicediscovery_service_27_0 settings_service_27_0 shortcut_service_27_0 statusbar_service_27_0 storagestats_service_27_0 textclassification_service_27_0 textservices_service_27_0 telecom_service_27_0 trust_service_27_0 tv_input_service_27_0 uimode_service_27_0 usagestats_service_27_0 usb_service_27_0 user_service_27_0 vibrator_service_27_0 rockemdsmartapi_service_27_0 voiceinteraction_service_27_0 wallpaper_service_27_0 webviewupdate_service_27_0 wifip2p_service_27_0 wifi_service_27_0 wifiaware_service_27_0))
+(typeattributeset ephemeral_app_api_service (batteryproperties_service_27_0 accessibility_service_27_0 account_service_27_0 activity_service_27_0 alarm_service_27_0 appops_service_27_0 appwidget_service_27_0 assetatlas_service_27_0 audio_service_27_0 autofill_service_27_0 backup_service_27_0 batterystats_service_27_0 bluetooth_manager_service_27_0 clipboard_service_27_0 IProxyService_service_27_0 companion_device_service_27_0 connectivity_service_27_0 connmetrics_service_27_0 consumer_ir_service_27_0 content_service_27_0 country_detector_service_27_0 deviceidle_service_27_0 device_identifiers_service_27_0 display_service_27_0 font_service_27_0 dreams_service_27_0 dropbox_service_27_0 graphicsstats_service_27_0 hardware_properties_service_27_0 input_method_service_27_0 input_service_27_0 imms_service_27_0 ipsec_service_27_0 jobscheduler_service_27_0 launcherapps_service_27_0 location_service_27_0 media_projection_service_27_0 media_router_service_27_0 media_session_service_27_0 midi_service_27_0 mount_service_27_0 netpolicy_service_27_0 netstats_service_27_0 network_management_service_27_0 notification_service_27_0 package_service_27_0 permission_service_27_0 power_service_27_0 print_service_27_0 procstats_service_27_0 registry_service_27_0 restrictions_service_27_0 rttmanager_service_27_0 search_service_27_0 sensorservice_service_27_0 servicediscovery_service_27_0 settings_service_27_0 statusbar_service_27_0 storagestats_service_27_0 textclassification_service_27_0 textservices_service_27_0 telecom_service_27_0 tv_input_service_27_0 uimode_service_27_0 usagestats_service_27_0 user_service_27_0 vibrator_service_27_0 rockemdsmartapi_service_27_0 voiceinteraction_service_27_0 webviewupdate_service_27_0))
 (typeattributeset system_api_service (cpuinfo_service_27_0 dbinfo_service_27_0 diskstats_service_27_0 gfxinfo_service_27_0 hdmi_control_service_27_0 lock_settings_service_27_0 meminfo_service_27_0 network_score_service_27_0 oem_lock_service_27_0 overlay_service_27_0 persistent_data_block_service_27_0 serial_service_27_0 updatelock_service_27_0 wifiscanner_service_27_0 window_service_27_0))
-(typeattributeset service_manager_type (audioserver_service_27_0 batteryproperties_service_27_0 bluetooth_service_27_0 cameraserver_service_27_0 default_android_service_27_0 drmserver_service_27_0 dumpstate_service_27_0 fingerprintd_service_27_0 hal_fingerprint_service_27_0 gatekeeper_service_27_0 gpu_service_27_0 inputflinger_service_27_0 incident_service_27_0 installd_service_27_0 keystore_service_27_0 mediaserver_service_27_0 mediametrics_service_27_0 mediaextractor_service_27_0 mediacodec_service_27_0 mediadrmserver_service_27_0 netd_service_27_0 nfc_service_27_0 radio_service_27_0 storaged_service_27_0 surfaceflinger_service_27_0 system_app_service_27_0 thermal_service_27_0 update_engine_service_27_0 virtual_touchpad_service_27_0 vr_hwc_service_27_0 accessibility_service_27_0 account_service_27_0 activity_service_27_0 alarm_service_27_0 appops_service_27_0 appwidget_service_27_0 assetatlas_service_27_0 audio_service_27_0 autofill_service_27_0 backup_service_27_0 batterystats_service_27_0 battery_service_27_0 bluetooth_manager_service_27_0 broadcastradio_service_27_0 cameraproxy_service_27_0 clipboard_service_27_0 contexthub_service_27_0 IProxyService_service_27_0 commontime_management_service_27_0 companion_device_service_27_0 connectivity_service_27_0 connmetrics_service_27_0 consumer_ir_service_27_0 content_service_27_0 country_detector_service_27_0 coverage_service_27_0 cpuinfo_service_27_0 dbinfo_service_27_0 device_policy_service_27_0 deviceidle_service_27_0 device_identifiers_service_27_0 devicestoragemonitor_service_27_0 diskstats_service_27_0 display_service_27_0 font_service_27_0 netd_listener_service_27_0 DockObserver_service_27_0 dreams_service_27_0 dropbox_service_27_0 ethernet_service_27_0 fingerprint_service_27_0 gfxinfo_service_27_0 graphicsstats_service_27_0 hardware_service_27_0 hardware_properties_service_27_0 hdmi_control_service_27_0 input_method_service_27_0 input_service_27_0 imms_service_27_0 ipsec_service_27_0 jobscheduler_service_27_0 launcherapps_service_27_0 location_service_27_0 lock_settings_service_27_0 media_projection_service_27_0 media_router_service_27_0 media_session_service_27_0 meminfo_service_27_0 midi_service_27_0 mount_service_27_0 netpolicy_service_27_0 netstats_service_27_0 network_management_service_27_0 network_score_service_27_0 network_time_update_service_27_0 notification_service_27_0 oem_lock_service_27_0 otadexopt_service_27_0 overlay_service_27_0 package_service_27_0 package_native_service_27_0 permission_service_27_0 persistent_data_block_service_27_0 pinner_service_27_0 power_service_27_0 print_service_27_0 processinfo_service_27_0 procstats_service_27_0 recovery_service_27_0 registry_service_27_0 restrictions_service_27_0 rttmanager_service_27_0 samplingprofiler_service_27_0 scheduling_policy_service_27_0 search_service_27_0 sec_key_att_app_id_provider_service_27_0 sensorservice_service_27_0 serial_service_27_0 servicediscovery_service_27_0 settings_service_27_0 shortcut_service_27_0 statusbar_service_27_0 storagestats_service_27_0 task_service_27_0 textclassification_service_27_0 textservices_service_27_0 telecom_service_27_0 timezone_service_27_0 trust_service_27_0 tv_input_service_27_0 uimode_service_27_0 updatelock_service_27_0 usagestats_service_27_0 usb_service_27_0 user_service_27_0 vibrator_service_27_0 voiceinteraction_service_27_0 vr_manager_service_27_0 wallpaper_service_27_0 webviewupdate_service_27_0 wifip2p_service_27_0 wifiscanner_service_27_0 wifi_service_27_0 wificond_service_27_0 wifiaware_service_27_0 window_service_27_0))
+(typeattributeset service_manager_type (audioserver_service_27_0 batteryproperties_service_27_0 bluetooth_service_27_0 cameraserver_service_27_0 default_android_service_27_0 drmserver_service_27_0 dumpstate_service_27_0 fingerprintd_service_27_0 hal_fingerprint_service_27_0 gatekeeper_service_27_0 gpu_service_27_0 inputflinger_service_27_0 incident_service_27_0 installd_service_27_0 keystore_service_27_0 mediaserver_service_27_0 mediametrics_service_27_0 mediaextractor_service_27_0 mediacodec_service_27_0 mediadrmserver_service_27_0 netd_service_27_0 nfc_service_27_0 radio_service_27_0 storaged_service_27_0 surfaceflinger_service_27_0 system_app_service_27_0 thermal_service_27_0 update_engine_service_27_0 virtual_touchpad_service_27_0 vr_hwc_service_27_0 accessibility_service_27_0 account_service_27_0 activity_service_27_0 alarm_service_27_0 appops_service_27_0 appwidget_service_27_0 assetatlas_service_27_0 audio_service_27_0 autofill_service_27_0 backup_service_27_0 batterystats_service_27_0 battery_service_27_0 bluetooth_manager_service_27_0 broadcastradio_service_27_0 cameraproxy_service_27_0 clipboard_service_27_0 contexthub_service_27_0 IProxyService_service_27_0 commontime_management_service_27_0 companion_device_service_27_0 connectivity_service_27_0 connmetrics_service_27_0 consumer_ir_service_27_0 content_service_27_0 country_detector_service_27_0 coverage_service_27_0 cpuinfo_service_27_0 dbinfo_service_27_0 device_policy_service_27_0 deviceidle_service_27_0 device_identifiers_service_27_0 devicestoragemonitor_service_27_0 diskstats_service_27_0 display_service_27_0 font_service_27_0 netd_listener_service_27_0 DockObserver_service_27_0 dreams_service_27_0 dropbox_service_27_0 ethernet_service_27_0 fingerprint_service_27_0 gfxinfo_service_27_0 graphicsstats_service_27_0 hardware_service_27_0 hardware_properties_service_27_0 hdmi_control_service_27_0 input_method_service_27_0 input_service_27_0 imms_service_27_0 ipsec_service_27_0 jobscheduler_service_27_0 launcherapps_service_27_0 location_service_27_0 lock_settings_service_27_0 media_projection_service_27_0 media_router_service_27_0 media_session_service_27_0 meminfo_service_27_0 midi_service_27_0 mount_service_27_0 netpolicy_service_27_0 netstats_service_27_0 network_management_service_27_0 network_score_service_27_0 network_time_update_service_27_0 notification_service_27_0 oem_lock_service_27_0 otadexopt_service_27_0 overlay_service_27_0 package_service_27_0 package_native_service_27_0 permission_service_27_0 persistent_data_block_service_27_0 pinner_service_27_0 power_service_27_0 print_service_27_0 processinfo_service_27_0 procstats_service_27_0 recovery_service_27_0 registry_service_27_0 restrictions_service_27_0 rttmanager_service_27_0 samplingprofiler_service_27_0 scheduling_policy_service_27_0 search_service_27_0 sec_key_att_app_id_provider_service_27_0 sensorservice_service_27_0 serial_service_27_0 servicediscovery_service_27_0 settings_service_27_0 shortcut_service_27_0 statusbar_service_27_0 storagestats_service_27_0 task_service_27_0 textclassification_service_27_0 textservices_service_27_0 telecom_service_27_0 timezone_service_27_0 trust_service_27_0 tv_input_service_27_0 uimode_service_27_0 updatelock_service_27_0 usagestats_service_27_0 usb_service_27_0 user_service_27_0 vibrator_service_27_0 rockemdsmartapi_service_27_0 voiceinteraction_service_27_0 vr_manager_service_27_0 wallpaper_service_27_0 webviewupdate_service_27_0 wifip2p_service_27_0 wifiscanner_service_27_0 wifi_service_27_0 wificond_service_27_0 wifiaware_service_27_0 window_service_27_0))
 (typeattributeset hwservice_manager_type (default_android_hwservice_27_0 fwk_display_hwservice_27_0 fwk_scheduler_hwservice_27_0 fwk_sensor_hwservice_27_0 hal_audio_hwservice_27_0 hal_bluetooth_hwservice_27_0 hal_bootctl_hwservice_27_0 hal_broadcastradio_hwservice_27_0 hal_camera_hwservice_27_0 hal_configstore_ISurfaceFlingerConfigs_27_0 hal_contexthub_hwservice_27_0 hal_drm_hwservice_27_0 hal_cas_hwservice_27_0 hal_dumpstate_hwservice_27_0 hal_fingerprint_hwservice_27_0 hal_gatekeeper_hwservice_27_0 hal_gnss_hwservice_27_0 hal_graphics_allocator_hwservice_27_0 hal_graphics_composer_hwservice_27_0 hal_graphics_mapper_hwservice_27_0 hal_health_hwservice_27_0 hal_ir_hwservice_27_0 hal_keymaster_hwservice_27_0 hal_light_hwservice_27_0 hal_memtrack_hwservice_27_0 hal_neuralnetworks_hwservice_27_0 hal_nfc_hwservice_27_0 hal_oemlock_hwservice_27_0 hal_omx_hwservice_27_0 hal_power_hwservice_27_0 hal_renderscript_hwservice_27_0 hal_sensors_hwservice_27_0 hal_telephony_hwservice_27_0 hal_tetheroffload_hwservice_27_0 hal_thermal_hwservice_27_0 hal_tv_cec_hwservice_27_0 hal_tv_input_hwservice_27_0 hal_usb_hwservice_27_0 hal_vibrator_hwservice_27_0 hal_vr_hwservice_27_0 hal_weaver_hwservice_27_0 hal_wifi_hwservice_27_0 hal_wifi_offload_hwservice_27_0 hal_wifi_supplicant_hwservice_27_0 hidl_allocator_hwservice_27_0 hidl_base_hwservice_27_0 hidl_manager_hwservice_27_0 hidl_memory_hwservice_27_0 hidl_token_hwservice_27_0 system_net_netd_hwservice_27_0 system_wifi_keystore_hwservice_27_0 thermalcallback_hwservice_27_0))
 (typeattributeset same_process_hwservice (hal_graphics_mapper_hwservice_27_0 hal_renderscript_hwservice_27_0))
 (typeattributeset coredomain_hwservice (fwk_display_hwservice_27_0 fwk_scheduler_hwservice_27_0 fwk_sensor_hwservice_27_0 hidl_allocator_hwservice_27_0 hidl_manager_hwservice_27_0 hidl_memory_hwservice_27_0 hidl_token_hwservice_27_0 system_net_netd_hwservice_27_0 system_wifi_keystore_hwservice_27_0))
@@ -1567,6 +1567,8 @@
 (roletype object_r user_service_27_0)
 (typeattribute vibrator_service_27_0)
 (roletype object_r vibrator_service_27_0)
+(typeattribute rockemdsmartapi_service_27_0)
+(roletype object_r rockemdsmartapi_service_27_0)
 (typeattribute voiceinteraction_service_27_0)
 (roletype object_r voiceinteraction_service_27_0)
 (typeattribute vr_manager_service_27_0)
diff --git a/system/sepolicy/prebuilts/api/27.0/private/service_contexts b/system/sepolicy/prebuilts/api/27.0/private/service_contexts
old mode 100644
new mode 100755
index a82243f..de64159
--- a/system/sepolicy/prebuilts/api/27.0/private/service_contexts
+++ b/system/sepolicy/prebuilts/api/27.0/private/service_contexts
@@ -159,6 +159,7 @@ usagestats                                u:object_r:usagestats_service:s0
 usb                                       u:object_r:usb_service:s0
 user                                      u:object_r:user_service:s0
 vibrator                                  u:object_r:vibrator_service:s0
+rockemdsmartapi                           u:object_r:rockemdsmartapi_service:s0
 virtual_touchpad                          u:object_r:virtual_touchpad_service:s0
 voiceinteraction                          u:object_r:voiceinteraction_service:s0
 vr_hwc                                    u:object_r:vr_hwc_service:s0
diff --git a/system/sepolicy/prebuilts/api/27.0/public/service.te b/system/sepolicy/prebuilts/api/27.0/public/service.te
old mode 100644
new mode 100755
index e97b864..53cabf4
--- a/system/sepolicy/prebuilts/api/27.0/public/service.te
+++ b/system/sepolicy/prebuilts/api/27.0/public/service.te
@@ -138,6 +138,7 @@ type usagestats_service, app_api_service, ephemeral_app_api_service, system_serv
 type usb_service, app_api_service, system_server_service, service_manager_type;
 type user_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type;
 type vibrator_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type;
+type rockemdsmartapi_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type;
 type voiceinteraction_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type;
 type vr_manager_service, system_server_service, service_manager_type;
 type wallpaper_service, app_api_service, system_server_service, service_manager_type;
diff --git a/system/sepolicy/prebuilts/api/28.0/private/service_contexts b/system/sepolicy/prebuilts/api/28.0/private/service_contexts
old mode 100644
new mode 100755
index 5ec45a2..dadffd5
--- a/system/sepolicy/prebuilts/api/28.0/private/service_contexts
+++ b/system/sepolicy/prebuilts/api/28.0/private/service_contexts
@@ -171,6 +171,7 @@ usagestats                                u:object_r:usagestats_service:s0
 usb                                       u:object_r:usb_service:s0
 user                                      u:object_r:user_service:s0
 vibrator                                  u:object_r:vibrator_service:s0
+rockemdsmartapi                           u:object_r:rockemdsmartapi_service:s0
 virtual_touchpad                          u:object_r:virtual_touchpad_service:s0
 voiceinteraction                          u:object_r:voiceinteraction_service:s0
 vold                                      u:object_r:vold_service:s0
diff --git a/system/sepolicy/prebuilts/api/28.0/public/service.te b/system/sepolicy/prebuilts/api/28.0/public/service.te
old mode 100644
new mode 100755
index 3526049..0b6934a
--- a/system/sepolicy/prebuilts/api/28.0/public/service.te
+++ b/system/sepolicy/prebuilts/api/28.0/public/service.te
@@ -148,6 +148,7 @@ type usagestats_service, app_api_service, ephemeral_app_api_service, system_serv
 type usb_service, app_api_service, system_server_service, service_manager_type;
 type user_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type;
 type vibrator_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type;
+type rockemdsmartapi_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type;
 type voiceinteraction_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type;
 type vr_manager_service, system_server_service, service_manager_type;
 type wallpaper_service, app_api_service, system_server_service, service_manager_type;
diff --git a/system/sepolicy/prebuilts/api/29.0/private/service_contexts b/system/sepolicy/prebuilts/api/29.0/private/service_contexts
old mode 100644
new mode 100755
index 96d553b..c692b56
--- a/system/sepolicy/prebuilts/api/29.0/private/service_contexts
+++ b/system/sepolicy/prebuilts/api/29.0/private/service_contexts
@@ -204,6 +204,7 @@ usagestats                                u:object_r:usagestats_service:s0
 usb                                       u:object_r:usb_service:s0
 user                                      u:object_r:user_service:s0
 vibrator                                  u:object_r:vibrator_service:s0
+rockemdsmartapi                           u:object_r:rockemdsmartapi_service:s0
 virtual_touchpad                          u:object_r:virtual_touchpad_service:s0
 voiceinteraction                          u:object_r:voiceinteraction_service:s0
 vold                                      u:object_r:vold_service:s0
diff --git a/system/sepolicy/prebuilts/api/29.0/public/service.te b/system/sepolicy/prebuilts/api/29.0/public/service.te
old mode 100644
new mode 100755
index a2193d0..331454e
--- a/system/sepolicy/prebuilts/api/29.0/public/service.te
+++ b/system/sepolicy/prebuilts/api/29.0/public/service.te
@@ -175,6 +175,7 @@ type usagestats_service, app_api_service, ephemeral_app_api_service, system_serv
 type usb_service, app_api_service, system_server_service, service_manager_type;
 type user_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type;
 type vibrator_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type;
+type rockemdsmartapi_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type;
 type voiceinteraction_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type;
 type vr_manager_service, system_server_service, service_manager_type;
 type wallpaper_service, app_api_service, system_server_service, service_manager_type;
diff --git a/system/sepolicy/prebuilts/api/30.0/private/service_contexts b/system/sepolicy/prebuilts/api/30.0/private/service_contexts
old mode 100644
new mode 100755
index 5c6f1a4..1ab541b
--- a/system/sepolicy/prebuilts/api/30.0/private/service_contexts
+++ b/system/sepolicy/prebuilts/api/30.0/private/service_contexts
@@ -232,6 +232,7 @@ usagestats                                u:object_r:usagestats_service:s0
 usb                                       u:object_r:usb_service:s0
 user                                      u:object_r:user_service:s0
 vibrator                                  u:object_r:vibrator_service:s0
+rockemdsmartapi                           u:object_r:rockemdsmartapi_service:s0
 virtual_touchpad                          u:object_r:virtual_touchpad_service:s0
 voiceinteraction                          u:object_r:voiceinteraction_service:s0
 vold                                      u:object_r:vold_service:s0
diff --git a/system/sepolicy/prebuilts/api/30.0/public/service.te b/system/sepolicy/prebuilts/api/30.0/public/service.te
old mode 100644
new mode 100755
index f27772e..1f6fa69
--- a/system/sepolicy/prebuilts/api/30.0/public/service.te
+++ b/system/sepolicy/prebuilts/api/30.0/public/service.te
@@ -191,6 +191,7 @@ type usagestats_service, app_api_service, ephemeral_app_api_service, system_serv
 type usb_service, app_api_service, system_server_service, service_manager_type;
 type user_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type;
 type vibrator_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type;
+type rockemdsmartapi_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type;
 type voiceinteraction_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type;
 type vr_manager_service, system_server_service, service_manager_type;
 type wallpaper_service, app_api_service, system_server_service, service_manager_type;
diff --git a/system/sepolicy/private/service_contexts b/system/sepolicy/private/service_contexts
old mode 100644
new mode 100755
index 5c6f1a4..1ab541b
--- a/system/sepolicy/private/service_contexts
+++ b/system/sepolicy/private/service_contexts
@@ -232,6 +232,7 @@ usagestats                                u:object_r:usagestats_service:s0
 usb                                       u:object_r:usb_service:s0
 user                                      u:object_r:user_service:s0
 vibrator                                  u:object_r:vibrator_service:s0
+rockemdsmartapi                           u:object_r:rockemdsmartapi_service:s0
 virtual_touchpad                          u:object_r:virtual_touchpad_service:s0
 voiceinteraction                          u:object_r:voiceinteraction_service:s0
 vold                                      u:object_r:vold_service:s0
diff --git a/system/sepolicy/public/service.te b/system/sepolicy/public/service.te
old mode 100644
new mode 100755
index f27772e..1f6fa69
--- a/system/sepolicy/public/service.te
+++ b/system/sepolicy/public/service.te
@@ -191,6 +191,7 @@ type usagestats_service, app_api_service, ephemeral_app_api_service, system_serv
 type usb_service, app_api_service, system_server_service, service_manager_type;
 type user_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type;
 type vibrator_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type;
+type rockemdsmartapi_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type;
 type voiceinteraction_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type;
 type vr_manager_service, system_server_service, service_manager_type;
 type wallpaper_service, app_api_service, system_server_service, service_manager_type;

技术交流群: 微信号

<think>好的,我需要帮助用户在RK3568平台的Android 11上找到添加设置APN的API方法。首先,我需要回顾一下Android系统中APN设置的相关知识。APN(接入点名称)是设备连接到移动网络所需的配置信息,通常涉及数据库和ContentProvider的操作。 在Android中,APN信息存储在telephony数据库中,访问这些数据需要特定的权限。用户可能需要使用ContentResolver来操作apn表。不过,直接修改APN可能需要系统权限或签名级别的权限,因为普通应用无法修改这些设置。根据用户提供的引用[1],看起来他们之前处理过跳转到设置界面的Intent,比如移动网络设置。但用户现在需要的是通过API进行设置,而不是通过界面。 接下来,我需要考虑RK3568平台的特殊性。引用[3]提到在RK3568的硬件相关代码中,有关于rild(Radio Interface Layer Daemon)的库路径和参数的设置。这可能意味着在修改APN时,需要确保RILD正确配置,以便与基带通信。不过,APN设置通常是在上层处理,可能不直接涉及RILD的配置。 用户可能需要创建一个具有系统权限的应用,或者修改系统代码来添加API。根据Android的版本差异,Android 11对APN的管理可能有变化,需要确认是否仍然使用Telephony.Carriers类。通常,添加APN的步骤包括: 1. 检查写入APN的权限,可能需要系统签名或特权权限。 2. 使用ContentResolver插入新的APN条目到Telephony.Carriers表中。 3. 确保插入的APN字段正确,如name、apn、type、mcc、mnc等。 4. 可能需要设置为默认APN,这涉及更新数据库中的selected字段。 引用[2]提到了平台签名相关的文件,这可能意味着用户的应用需要平台签名才能获得必要的权限。引用[4]涉及启动动画,可能与当前问题无关。 需要验证在Android 11中,插入APN的方法是否仍然有效。查阅Android官方文档,发现从Android 10开始,对APN的写入权限更加严格,只有系统应用或具有Carrier Privileges的应用才能修改APN。因此,用户可能需要将应用作为系统应用安装,或者使用系统API。 可能的代码步骤包括使用ContentValues插入新的APN条目,然后通过TelephonyManager设置默认APN。同时,需要在AndroidManifest.xml中添加必要的权限,如WRITE_APN_SETTINGS,但该权限可能只对系统应用有效。 另外,用户可能需要通过Settings.Global类设置特定的属性,或者使用隐藏的API,这需要反射或者访问@SystemApi注解的方法。但使用隐藏API可能有兼容性问题,尤其是在不同设备上。 总结步骤: - 创建具有系统权限的应用。 - 使用ContentResolver插入APN。 - 处理权限问题,可能需要平台签名。 - 验证APN配置是否生效,可能需要重启或重新注册网络。 还需要考虑RK3568的具体实现,是否有自定义的Telephony设置,可能需要查阅厂商提供的文档或代码示例。例如,检查是否有特定的系统属性或配置需要调整,如引用[3]中提到的LIB_PATH_PROPERTY,但可能不直接相关。 最后,生成相关问题,帮助用户深入理解APN设置的各个方面。</think>### RK3568 Android 11 设置APN的API实现方法 #### 1. **权限与系统要求** - **系统权限**:修改APN需要应用具备`WRITE_APN_SETTINGS`权限(需系统签名或特权应用)[^1]。 - **AndroidManifest配置**: ```xml <uses-permission android:name="android.permission.WRITE_APN_SETTINGS" /> ``` #### 2. **APN数据库操作** APN信息存储在`content://telephony/carriers`中,通过`ContentResolver`操作: ```java ContentValues values = new ContentValues(); values.put("name", "My APN"); values.put("apn", "internet.example.com"); values.put("mcc", "310"); // 美国MCC values.put("mnc", "260"); // 美国MNC values.put("type", "default,supl"); ContentResolver resolver = context.getContentResolver(); Uri uri = resolver.insert(Uri.parse("content://telephony/carriers"), values); ``` #### 3. **设为默认APN** 需更新`carriers`表的`apn_id`字段(需系统权限): ```java if (uri != null) { long apnId = ContentUris.parseId(uri); TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); tm.setPreferredApn(apnId); // 需要系统权限或反射调用[^2] } ``` #### 4. **RK3568平台适配** - **系统签名**:应用需使用平台签名(如`platform.x509.pem`)。 - **RILD配置**:确保`rild.libpath`和`rild.libargs`属性正确指向基带库(参考`rild.c`中的定义)[^3]。 #### 5. **完整代码示例** ```java public class ApnManager { public static boolean addApn(Context context, String name, String apn, String mcc, String mnc) { try { ContentValues cv = new ContentValues(); cv.put("name", name); cv.put("apn", apn); cv.put("mcc", mcc); cv.put("mnc", mnc); cv.put("type", "default,supl"); Uri newUri = context.getContentResolver().insert( Uri.parse("content://telephony/carriers"), cv ); return newUri != null; } catch (Exception e) { Log.e("APN", "Insert failed: " + e.getMessage()); return false; } } } ``` #### 6. **验证与调试** - **查看APN列表**:通过`adb shell`执行`content query --uri content://telephony/carriers`。 - **网络重置**:修改APN后可能需要重启或调用`TelephonyManager.reloadCarriers()`(需系统权限)。 --- ###
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值