An Android device's OS is rooted when
SU binary ( AKA superuser, childish called root ) is present in Android's filesystem. Hence push a matching
SU binary to Android OS, what can be done by means of ADB
Code:
adb devices
adb push <LOCATION-OF-SUITABLE-SU-BINARY-ON-COMPUTER> /data/local/tmp/
adb shell "chmod +x /data/local/tmp/su"