RK3288/3399 Android Root方法

本ROOT方法适用于RK3288/RK3399 的Android 32/64位系统。

可以root的前提是:

板子本身具有root权限,即可以在adb下执行su切换到root账户,并且可以挂载/system分区为读写模式,一般RK3288开发板都是这种模式,即userdebug模式。

下面板子已验证可以成功root:

l  Firefly-RK3288 (Android 5.1)

l  Firefly-RK3399 (Android 7.1 64位)

l  TinkerBoard (RK3288 Android 5.1)

参考了tinkerBoard 论坛root方法https://tinkerboarding.co.uk/forum/thread-648.html 

执行Root之前先下载用到的文件:SuperSU-v2.79-201612051815.zip [内网下载]

Root方法(我使用的是Linux系统,Windows下可能稍有不同):

① 板子调试线连接电脑,依次输入

adb root
adb remount

=====================

如果是用网络连接adb,假设获取到的ip为192.168.1.100,则执行下面的指令:

 
  1. adb connect 192.168.1.100

  2. adb root

  3. adb connect 192.168.1.100

  4. adb remount

==================== 

② 解压SuperSU-v2.79-201612051815.zip,进入文件夹,对于Android 32位系统,依次输入以下指令:

 
  1. adb push common/Superuser.apk /system/app/SuperSU/SuperSU.apk

  2. adb shell chmod 0644 /system/app/SuperSU/SuperSU.apk

  3. adb shell chcon u:object_r:system_file:s0 /system/app/SuperSU/SuperSU.apk

  4.  
  5. adb push common/install-recovery.sh /system/etc/install-recovery.sh

  6. adb shell chmod 0755 /system/etc/install-recovery.sh

  7. adb shell chcon u:object_r:toolbox_exec:s0 /system/etc/install-recovery.sh

  8.  
  9. adb push armv7/su /system/bin/.ext/.su

  10. adb shell chmod 0755 /system/bin/.ext/.su

  11. adb shell chcon u:object_r:system_file:s0 /system/bin/.ext/.su

  12.  
  13. adb push armv7/su /system/xbin/daemonsu

  14. adb shell chmod 0755 /system/xbin/daemonsu

  15. adb shell chcon u:object_r:system_file:s0 /system/xbin/daemonsu

  16.  
  17. adb push armv7/su /system/xbin/sugote

  18. adb shell chmod 0755 /system/xbin/sugote

  19. adb shell chcon u:object_r:zygote_exec:s0 /system/xbin/sugote

  20.  
  21. adb push armv7/supolicy /system/xbin/supolicy

  22. adb shell chmod 0755 /system/xbin/supolicy

  23. adb shell chcon u:object_r:system_file:s0 /system/xbin/supolicy

  24.  
  25. adb push armv7/libsupol.so /system/lib/libsupol.so

  26. adb shell chmod 0755 /system/lib/libsupol.so

  27. adb shell chcon u:object_r:system_file:s0 /system/lib/libsupol.so

  28.  
  29. adb shell touch /system/etc/.installed_su_daemon

  30. adb shell chmod 0644 /system/etc/.installed_su_daemon

  31. adb shell chcon u:object_r:system_file:s0 /system/etc/.installed_su_daemon

  32.  
  33. adb shell cp /system/bin/sh /system/xbin/sugote-mksh

  34. adb shell chmod 0755 /system/xbin/sugote-mksh

  35. adb shell chcon u:object_r:system_file:s0 /system/xbin/sugote-mksh

  36.  
  37. adb shell cp /system/bin/app_process32 /system/bin/app_process32_original

  38. adb shell chmod 0755 /system/bin/app_process32_original

  39. adb shell chcon u:object_r:zygote_exec:s0 /system/bin/app_process32_original

  40.  
  41. adb shell mv /system/bin/app_process /system/bin/app_process_original

  42. adb shell chmod 0755 /system/bin/app_process_original

  43. adb shell chcon u:object_r:zygote_exec:s0 /system/bin/app_process_original

  44.  
  45. adb shell mv /system/bin/app_process32 /system/bin/app_process_init

  46. adb shell chmod 0755 /system/bin/app_process_init

  47. adb shell chcon u:object_r:system_file:s0 /system/bin/app_process_init

  48.  
  49. adb shell ln -s /system/xbin/daemonsu /system/bin/app_process

  50. adb shell ln -s /system/xbin/daemonsu /system/bin/app_process32

  51.  
  52. adb shell ln -s /system/etc/install-recovery.sh /system/bin/install-recovery.sh

Tips:可以把上面指令全部复制,然后粘贴到终端,这些指令会依次执行,但是别忘了最后一条指令的回车。 

执行完后,输入 adb reboot重启系统。

等待重启完成后,会发现应用了表里多了SuperSU的应用,打开之,会弹出窗口提示:
“SU二进制文件需要更新。。。”,点击继续,在弹出的窗口选择“常规方式”,等待安装完成,完成后点击重启即可。

 ③ 对SuperSU进行配置(可选)

配置的目的是对应用静默root授权,不弹出任何提示(有风险)。

打开SuperSU,点击设置à默认操作,选择“授权”;

再点击“显示通知”,取消后面的勾选即可。

 

以上步骤②中是适用于32位Android的root操作指令,64位系统稍有不同,指令如下:

 
  1. adb push common/Superuser.apk /system/app/SuperSU/SuperSU.apk

  2. adb shell chmod 0644 /system/app/SuperSU/SuperSU.apk

  3. adb shell chcon u:object_r:system_file:s0 /system/app/SuperSU/SuperSU.apk

  4.  
  5. adb push common/install-recovery.sh /system/etc/install-recovery.sh

  6. adb shell chmod 0755 /system/etc/install-recovery.sh

  7. adb shell chcon u:object_r:toolbox_exec:s0 /system/etc/install-recovery.sh

  8.  
  9. adb push arm64/su /system/bin/.ext/.su

  10. adb shell chmod 0755 /system/bin/.ext/.su

  11. adb shell chcon u:object_r:system_file:s0 /system/bin/.ext/.su

  12.  
  13. adb push arm64/su /system/xbin/daemonsu

  14. adb shell chmod 0755 /system/xbin/daemonsu

  15. adb shell chcon u:object_r:system_file:s0 /system/xbin/daemonsu

  16.  
  17. adb push arm64/su /system/xbin/sugote

  18. adb shell chmod 0755 /system/xbin/sugote

  19. adb shell chcon u:object_r:zygote_exec:s0 /system/xbin/sugote

  20.  
  21. adb push arm64/supolicy /system/xbin/supolicy

  22. adb shell chmod 0755 /system/xbin/supolicy

  23. adb shell chcon u:object_r:system_file:s0 /system/xbin/supolicy

  24.  
  25. adb push arm64/libsupol.so /system/lib64/libsupol.so

  26. adb shell chmod 0755 /system/lib64/libsupol.so

  27. adb shell chcon u:object_r:system_file:s0 /system/lib64/libsupol.so

  28.  
  29. adb shell touch /system/etc/.installed_su_daemon

  30. adb shell chmod 0644 /system/etc/.installed_su_daemon

  31. adb shell chcon u:object_r:system_file:s0 /system/etc/.installed_su_daemon

  32.  
  33. adb shell cp /system/bin/sh /system/xbin/sugote-mksh

  34. adb shell chmod 0755 /system/xbin/sugote-mksh

  35. adb shell chcon u:object_r:system_file:s0 /system/xbin/sugote-mksh

  36.  
  37. adb shell cp /system/bin/app_process32 /system/bin/app_process32_original

  38. adb shell chmod 0755 /system/bin/app_process32_original

  39. adb shell chcon u:object_r:zygote_exec:s0 /system/bin/app_process32_original

  40.  
  41. adb shell mv /system/bin/app_process /system/bin/app_process_original

  42. adb shell chmod 0755 /system/bin/app_process_original

  43. adb shell chcon u:object_r:zygote_exec:s0 /system/bin/app_process_original

  44.  
  45. adb shell mv /system/bin/app_process32 /system/bin/app_process_init

  46. adb shell chmod 0755 /system/bin/app_process_init

  47. adb shell chcon u:object_r:system_file:s0 /system/bin/app_process_init

  48.  
  49. adb shell ln -s /system/xbin/daemonsu /system/bin/app_process

  50. adb shell ln -s /system/xbin/daemonsu /system/bin/app_process32

  51.  
  52. adb shell ln -s /system/etc/install-recovery.sh /system/bin/install-recovery.sh

 以上SuperSU-v2.79-201612051815.zip文件及root指令可以在我资源分享中下载(压缩包中已经包含了操作指令:doRoot64.txt 和doRoot.txt)。

你可能感兴趣的:(开发板,开发板)