this repo is deprecated please use: https://github.com/android-rooting-tools This code is still ugly, please re-write it and send pull-requests, if you want to use this.