< >
1.添加开机启动服务
rk3399/device/rockchip/common$ git diff init.rockchip.rc
diff --git a/init.rockchip.rc b/init.rockchip.rc
index a0ade29..b202580 100755
--- a/init.rockchip.rc
+++ b/init.rockchip.rc
+#lance root
+service daemonsu /system/xbin/daemonsu --auto-daemon
+ class main
+ seclabel u:r:su:s0
+
+on property:sys.boot_completed=1
+ start daemonsu
rk3399/device/rockchip/common$ git diff sepolicy/file_contexts
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
index 728d4bc..0f45c30 100755
--- a/sepolicy/file_contexts
+++ b/sepolicy/file_contexts
+#myshell
+/system/xbin/daemonsu u:object_r:shell_exec:s0
2.新建root目录,将压缩包中arm64里面相应文件拷贝过来
libsupol.so su supolicy
3.device.mk中添加拷贝工作
rk3399/device/rockchip/rk3399$ git diff device.mk
diff --git a/device.mk b/device.mk
--- a/device.mk
+++ b/device.mk
+#copy root
+PRODUCT_COPY_FILES +=
+ $(LOCAL_PATH)/root/libsupol.so:system/lib64/libsupol.so
+ $(LOCAL_PATH)/root/su:system/xbin/su
+ $(LOCAL_PATH)/root/su:system/xbin/daemonsu
+ $(LOCAL_PATH)/root/supolicy:system/xbin/supolicy
4.编译烧录安装apk测试,
注:
如果不行先检查服务是否开启, dmesg | grep daemonsu
打开su apk,会提示更新二进制文件,点击取消。
注意:supersu不要更新二进制,否则会造成无法开机。
< >
1.添加开机启动服务
rk3399/device/rockchip/common$ git diff init.rockchip.rc
diff --git a/init.rockchip.rc b/init.rockchip.rc
index a0ade29..b202580 100755
--- a/init.rockchip.rc
+++ b/init.rockchip.rc
+#lance root
+service daemonsu /system/xbin/daemonsu --auto-daemon
+ class main
+ seclabel u:r:su:s0
+
+on property:sys.boot_completed=1
+ start daemonsu
rk3399/device/rockchip/common$ git diff sepolicy/file_contexts
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
index 728d4bc..0f45c30 100755
--- a/sepolicy/file_contexts
+++ b/sepolicy/file_contexts
+#myshell
+/system/xbin/daemonsu u:object_r:shell_exec:s0
2.新建root目录,将压缩包中arm64里面相应文件拷贝过来
libsupol.so su supolicy
3.device.mk中添加拷贝工作
rk3399/device/rockchip/rk3399$ git diff device.mk
diff --git a/device.mk b/device.mk
--- a/device.mk
+++ b/device.mk
+#copy root
+PRODUCT_COPY_FILES +=
+ $(LOCAL_PATH)/root/libsupol.so:system/lib64/libsupol.so
+ $(LOCAL_PATH)/root/su:system/xbin/su
+ $(LOCAL_PATH)/root/su:system/xbin/daemonsu
+ $(LOCAL_PATH)/root/supolicy:system/xbin/supolicy
4.编译烧录安装apk测试,
注:
如果不行先检查服务是否开启, dmesg | grep daemonsu
打开su apk,会提示更新二进制文件,点击取消。
注意:supersu不要更新二进制,否则会造成无法开机。
举报