Gerriarob / arob

Android rooting on Brunch Framework
40 stars 7 forks source link

Finally got root "working" sort of #4

Open Onoitsu2 opened 4 years ago

Onoitsu2 commented 4 years ago

I was able to follow your advice on dropping the script into the /usr/local folder and running from there.

It successfully installs su, and all commands run without error, however no app will show as if it had root.

I did notice that some of your chrgrp commands were off compared to aroc, whereas you have 657360 in a couple of points but 655360 in others. After I changed that to match (655360 for UID/GID), and also removed the /system/app/Superuser folder, I was able to adb shell into my ChromeOS's Android (connect 100.115.92.2:5555) and use the su binary. But the apk that is installed via your script does not seem to allow permissions properly be granted, no matter how many times you grant them. Even updating it in the system partition does not either (I changed it to allow RW mounting, but doesn't work with RO either)

Output from su -v shows "2.82:SUPERSU", and even whoami properly shows root, via adb shell (and simply shell when not using it). However no android apps are permitted this access, so I can only get it from console, is why I said it is "working." With the superuser.apk installed (from various makers of management apks I've tested too), it never even gets that far, as the console freezes 100% of the time after granting permissions for that action.

Using Rammus image by the way, v84 beta currently, but this very same outcome happens in v83 as well (I did a full erase of the drive and partitions and reinstall to ensure nothing was carried across in my tinkering, before going to v84 beta)

mmirg commented 4 years ago

I'm facing a similar issue but I'm not able to properly have superuser access granted to adb shell either. The SuperSU app indicates that it cannot detect root when I open it. Graphical applications are not able to request root access through SuperSU. I am able to request superuser access through adb shell and receive a prompt from SuperSU. However, when I grant access I repeatedly see toasts indicating that superuser access is being granted while the shell simply hangs. Attempting to obtain su access through an Android terminal results in a core dump and no prompt.

The only place where I am seemingly able to actually use the su binary is via android-sh when patching sepolicy. su -v shows the same output of 2.82:SUPERSU from both adb shell and android-sh.

Android terminal:

:/ $ su -v
2.82:SUPERSU
:/ $ su
Bad system call (core dumped)
159|:/ $ uname -a
Linux localhost 4.4.228-18594-g8229aa9b300b #1 SMP PREEMPT Wed Aug 5 02:07:30 PDT 2020 x86_64

adb shell Screenshot 2020-08-07 at 7 28 23 PM The SuperSU toast appears but superuser access is not granted.

SuperSU after attempting to obtain superuser access via adb shell: image The attempt is logged in SuperSU but does not work.

android-sh

:/ # su -v
2.82:SUPERSU
:/ # su -c whoami
root
311303 commented 4 years ago

I'm facing a similar issue but I'm not able to properly have superuser access granted to adb shell either. The SuperSU app indicates that it cannot detect root when I open it. Graphical applications are not able to request root access through SuperSU. I am able to request superuser access through adb shell and receive a prompt from SuperSU. However, when I grant access I repeatedly see toasts indicating that superuser access is being granted while the shell simply hangs. Attempting to obtain su access through an Android terminal results in a core dump and no prompt.

The only place where I am seemingly able to actually use the su binary is via android-sh when patching sepolicy. su -v shows the same output of 2.82:SUPERSU from both adb shell and android-sh.

Android terminal:

:/ $ su -v
2.82:SUPERSU
:/ $ su
Bad system call (core dumped)
159|:/ $ uname -a
Linux localhost 4.4.228-18594-g8229aa9b300b #1 SMP PREEMPT Wed Aug 5 02:07:30 PDT 2020 x86_64

adb shell Screenshot 2020-08-07 at 7 28 23 PM The SuperSU toast appears but superuser access is not granted.

SuperSU after attempting to obtain superuser access via adb shell: image The attempt is logged in SuperSU but does not work.

android-sh

:/ # su -v
2.82:SUPERSU
:/ # su -c whoami
root

I had the same problem.I use r83. I try to switch users in android-sh to users used by Android application(e.g u0_a70) su - u0_a70 When I used that user to execute su, supersu responded. However, after returning to Android application, executing su still returns bad system call. Have you solved it?

mmirg commented 4 years ago

I had the same problem.I use r83. I try to switch users in android-sh to users used by Android application(e.g u0_a70) su - u0_a70 When I used that user to execute su, supersu responded. However, after returning to Android application, executing su still returns bad system call. Have you solved it?

I'm afraid I haven't solved it, I will certainly post if I figure out anything relevant. I'm insufficiently familiar with how SuperSU functions (or how superuser access is obtained more generally on Android) to even have a sense of where to start looking or to understand what is failing.

ethanaobrien commented 3 years ago

@mmirg From what I have found, this script only mounts /system as RW to the chrome os system and not to the android system, which is why supersu says no root found and which is why it will hang if you use the shell. We would need to make /system RW from androids point of view