Code:
adb shell "mount -o remount,rw /system"
adb push common/Superuser.apk /system/app/SuperSU/SuperSU.apk
adb shell chmod 0644 /system/app/SuperSU/SuperSU.apk
adb shell chcon u:object_r:system_file:s0 /system/app/SuperSU/SuperSU.apk
adb push common/install-recovery.sh /system/etc/install-recovery.sh
adb shell chmod 0755 /system/etc/install-recovery.sh
adb shell chcon u:object_r:toolbox_exec:s0 /system/etc/install-recovery.sh
adb shell push armv7/su /system/xbin/su
adb shell chmod 0755 /system/xbin/su
adb shell chcon u:object_r:system_file:s0 /system/xbin/su
adb push armv7/su /system/bin/.ext/.su
adb shell chmod 0755 /system/bin/.ext/.su
adb shell chcon u:object_r:system_file:s0 /system/bin/.ext/.su
adb push armv7/su /system/xbin/daemonsu
adb shell chmod 0755 /system/xbin/daemonsu
adb shell chcon u:object_r:system_file:s0 /system/xbin/daemonsu
adb push armv7/su /system/xbin/sugote
adb shell chmod 0755 /system/xbin/sugote
adb shell chcon u:object_r:zygote_exec:s0 /system/xbin/sugote
adb push armv7/supolicy /system/xbin/supolicy
adb shell chmod 0755 /system/xbin/supolicy
adb shell chcon u:object_r:system_file:s0 /system/xbin/supolicy
adb push armv7/libsupol.so /system/lib(64)/libsupol.so
adb shell chmod 0755 /system/lib\(64\)/libsupol.so
adb shell chcon u:object_r:system_file:s0 /system/lib\(64\)/libsupol.so
adb shell touch /system/etc/.installed_su_daemon
adb shell chmod 0644 /system/etc/.installed_su_daemon
adb shell chcon u:object_r:system_file:s0 /system/etc/.installed_su_daemon
adb shell cp /system/bin/sh /system/xbin/sugote-mksh
adb shell chmod 0755 /system/xbin/sugote-mksh
adb shell chcon u:object_r:system_file:s0 /system/xbin/sugote-mksh
adb shell cp /system/bin/app_process32 /system/bin/app_process32_original
adb shell chmod 0755 /system/bin/app_process32_original
adb shell chcon u:object_r:zygote_exec:s0 /system/bin/app_process32_original
adb shell mv /system/bin/app_process /system/bin/app_process_original
adb shell chmod 0755 /system/bin/app_process_original
adb shell chcon u:object_r:zygote_exec:s0 /system/bin/app_process_original
adb shell mv /system/bin/app_process32 /system/bin/app_process_init
adb shell chmod 0755 /system/bin/app_process_init
adb shell chcon u:object_r:system_file:s0 /system/bin/app_process_init
adb shell ln -s /system/xbin/daemonsu /system/bin/app_process
adb shell ln -s /system/xbin/daemonsu /system/bin/app_process32
adb shell ln -s /system/etc/install-recovery.sh /system/bin/install-recovery.sh
Great work on the script Fatih, this worked for me, but it took me a bit of extra stuff at the start and end of the process to work properly. I'll fill in the gaps for others who may be scratching their heads with the same problems I encountered.
First of all you need to obtain a later su.zip than the one you get pointed to by simply clicking through the links. If you go to:
http://www.supersu.com/download
...then be careful NOT to obtain the latest, but instead go for "Recovery V2.79 Flashable.zip MD5:f4ecbf5814215bf569ff3324fc1c91f5"
...because there is an issue with the latest (see here:
https://forum.xda-developers.com/showpos...count=1645)
V2.79 is the one I used, and worked fine.
I'm using Windows, so I copied your script into a file I called "rootandroid.bat" and placed it in my adb tools folder. I extracted the contents of the su.zip directly into this folder too (not into a subfolder, a lot of unzip programs do this by default to keep things organised, but I wanted to make sure the script could find adb and all the su files without any extra work, so everything needed to be at the same folder level).
Before running the .bat script, I opened a cmd prompt in my adb tools directory and executed the following commands:
adb connect 192.168.1.etc (make sure you use the IP where your own tinkerboard is connected)
adb root
adb connect 192.168.1.etc (have to do this again)
adb remount
then simply: rootandroid.bat
Pushing the apk takes a few seconds, the rest of the commands in the script execute quite quickly.
The last thing required is to open the SuperSU app and allow it to run the 'update binary' then reboot. EDIT: Just fixed a missing line, so this step might not be necessary now, but open the app and it will tell you.
That's it!
If someone follows the same method, and discovers I missed a step or gave unclear instructions, please reply to help others.