This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rooting Android
#11
(07-08-2017, 08:26 AM)bedalus Wrote:
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 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/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. 

That's it!

If someone follows the same method, and discovers I missed a step or gave unclear instructions, please reply to help others.

With this, I think I have figured out how to install the xposed framework but would like a chat about something first before I post it if you don't mind please?
Reply
#12
Code:
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/bin/.ext/.su
adb shell chmod 0755 /system/bin/.ext/.su
adb shell chcon u:object_r:system_file:s0 /system/bin/.ext/.su

I think you incorrectly doubled the same lines.  One of them should be this instead:

adb 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
Reply
#13
I've never used xposed, you might be better off opening a new thread to discuss that.
Reply
#14
If you are looking to root your android, follow these simple steps to root your smartphone.
http://pc4u.org/root-android-how-to-root...-computer/
Hope its really very helpful to you.
Reply
#15
I seem to have a problem with your script, it seems that it just wont eat these two lines:

The code:

Code:
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


The proof:
[Image: 6YBY3VQ0THuoYES8b8FrBA.png]
Reply
#16
(12-14-2017, 02:41 PM)welo78 Wrote: I seem to have a problem with your script, it seems that it just wont eat these two lines:

The code:

Code:
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


The proof:
[Image: 6YBY3VQ0THuoYES8b8FrBA.png]

I had the same issue. It was something to do with ADB not allowing it to execute. After the push command in the script I changed:



PHP Code:
adb shell chmod 0755 /system/lib\(64\)/libsupol.so
adb shell chcon u
:object_r:system_file:s0 /system/lib\(64\)/libsupol.so 

to:


PHP Code:
adb shell
chmod 0755 
/system/lib\(64\)/libsupol.so
chcon u
:object_r:system_file:s0 /system/lib\(64\)/libsupol.so
exit 

And it worked fine when I ran it again.
Reply
#17
(12-14-2017, 02:52 PM)MrRobinson Wrote:
(12-14-2017, 02:41 PM)welo78 Wrote: I seem to have a problem with your script, it seems that it just wont eat these two lines:

The code:

Code:
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


The proof:
[Image: 6YBY3VQ0THuoYES8b8FrBA.png]

I had the same issue. It was something to do with ADB not allowing it to execute. After the push command in the script I changed:



PHP Code:
adb shell chmod 0755 /system/lib\(64\)/libsupol.so
adb shell chcon u
:object_r:system_file:s0 /system/lib\(64\)/libsupol.so 

to:


PHP Code:
adb shell
chmod 0755 
/system/lib\(64\)/libsupol.so
shell chcon u
:object_r:system_file:s0 /system/lib\(64\)/libsupol.so
exit 

And it worked fine when I ran it again.

still no luck [Image: qSy_KzOJQJ2Du303_Jy34w.png]
Reply
#18
ok for those who get the problems specified here , I suggest running cmd instead of powershell and running it as administrator ... script successfully completed when using cmd as admin
Reply
#19
Please give me a ready-made script file - rootandroid.bat

Thank you in advance.
Reply
#20
Thank people! Im root my device  

I corrected the script in these lines 
adb shell chmod 0755 /system/lib\(64\)/libsupol.so
adb shell chcon u:object_r:system_file:s0 /system/lib\(64\)/libsupol.so 

And deleted duplicate lines 
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 

My finished script file is attached to the letter.
All good luck in obtaining ROOT rights! 



Here is the source code of the correct script!!!!!

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 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


Attached Files
.zip   rootandroid.zip (Size: 570 bytes / Downloads: 116)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)