CerisWhite / CrAnberry

Rooting the ChromeOS Android Subsystem post v77
Other
40 stars 8 forks source link

Script fails on x86/x86_64 #12

Closed gyit918 closed 3 years ago

gyit918 commented 3 years ago

if anyone can help me just say something

gyit918 commented 3 years ago

Screenshot 2021-10-06 3 59 27 PM

gyit918 commented 3 years ago

im losing my mind with this

gyit918 commented 3 years ago

and cranberry dont close it

CerisWhite commented 3 years ago

Please refrain from creating multiple issues and spamming each thread with one-line responses.

How did you run the script to begin with? Did it produce any errors? I need information to help you. Can you show me the output of ls -al /opt/google/containers/android and ls -al /usr/local/cranberry at the very least?

gyit918 commented 3 years ago

ok

gyit918 commented 3 years ago

![Uploading Screenshot 2021-10-06 7.49.39 PM.png…]()

gyit918 commented 3 years ago

it saying its root

gyit918 commented 3 years ago

but why is root checker saying its not

gyit918 commented 3 years ago

i cant run gamegurdian

CerisWhite commented 3 years ago

For the last time, stop sending several single-line responses. Put it all in one message or no one is going to assist you.

gyit918 commented 3 years ago

srry

gyit918 commented 3 years ago

but whats the promblem then can you help me run gamegurdian plz it has root so whats going on

CerisWhite commented 3 years ago

The screenshot you sent doesn't seem to want to load so you should just copy and paste your terminal output here for me to look through. Make sure you mark it correctly, like this: ``` Terminal output ```

gyit918 commented 3 years ago

ok

gyit918 commented 3 years ago

total 604144 drwxr-xr-x. 3 root root 4096 Oct 6 20:05 . drwxr-xr-x. 6 root root 4096 Sep 23 02:22 .. -rw-r--r--. 1 root root 16352 Sep 22 23:32 config.json dr-x------. 4 android-root android-root 4096 Sep 23 02:18 rootfs -rw-r--r--. 1 root root 517652480 Sep 23 04:55 system.original.img lrwxrwxrwx. 1 root root 38 Oct 6 20:05 system.raw.img -> /usr/local/cranberry/system.rooted.img -rw-r--r--. 1 root root 343728 Sep 23 02:28 ureadahead.pack -rw-r--r--. 1 root root 99999744 Sep 23 02:30 vendor.raw.img

but this is what pops up when i go to root checker Screenshot 2021-10-06 8 07 31 PM im losing my mind

CerisWhite commented 3 years ago

OK, yes. Something is definitely wrong here. Because the system image is intact, I'd like you to try downloading a terminal emulator (like this one: https://play.google.com/store/apps/details?id=jackpal.androidterm) and doing su in the terminal to see if you gain root access. If it errors out, please show me what it says so I can adjust my script as needed.

gyit918 commented 3 years ago

will do ok image

CerisWhite commented 3 years ago

also try /system/xbin/su and tell me what it says

gyit918 commented 3 years ago

ok Screenshot 2021-10-06 8 32 58 PM

CerisWhite commented 3 years ago

That's... not what I expected to see. In fact, it seems like the script didn't finish running at all. Run revert.sh: curl https://raw.githubusercontent.com/CerisWhite/CrAnberry/main/revert.sh | sudo sh

Reboot and then attempt to use the script once more, then copy the terminal output from it to here again so I can take a look at it. Something is failing in the middle of the copy process and I need to determine what.

gyit918 commented 3 years ago

ok but i could have sworn it said reboot and enjoy

gyit918 commented 3 years ago

should i remove roofts verifacation

gyit918 commented 3 years ago

0+0 records in 0+0 records out 0 bytes copied, 3.2802e-05 s, 0.0 kB/s mke2fs 1.45.6 (20-Mar-2020) Discarding device blocks: done
Creating filesystem with 384000 4k blocks and 96000 inodes Filesystem UUID: 397e805f-400f-4ea3-b76d-2e8d2d044070 Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912

Allocating group tables: done
Writing inode tables: done
Creating journal (8192 blocks): done Writing superblocks and filesystem accounting information: done

SELinux set to Permissive.

Copying files into new android image Errors about acct, dev, or oem are normal

mkdir: cannot create directory '/usr/local/cranberry/new/acct': File exists mkdir: cannot create directory '/usr/local/cranberry/new/dev': File exists stat: cannot statx '/usr/local/cranberry/supersu/supersu.zip': No such file or directory

File did not download correctly! Retrying.

Unzipping SuperSU...

sh: 200: /usr/local/bin/busybox: not found Installing SU.

cp: cannot stat '/usr/local/cranberry/supersu/armv7/su': No such file or directory cp: cannot stat '/usr/local/cranberry/supersu/armv7/su': No such file or directory cp: cannot stat '/usr/local/cranberry/supersu/armv7/su': No such file or directory cp: cannot stat '/usr/local/cranberry/supersu/armv7/supolicy': No such file or directory cp: cannot stat '/usr/local/cranberry/supersu/armv7/libsupol.so': No such file or directory chmod: cannot access '/usr/local/cranberry/new/system/xbin/su': No such file or directory chmod: cannot access '/usr/local/cranberry/new/system/xbin/daemonsu': No such file or directory chmod: cannot access '/usr/local/cranberry/new/system/xbin/sugote': No such file or directory chmod: cannot access '/usr/local/cranberry/new/system/xbin/supolicy': No such file or directory chmod: cannot access '/usr/local/cranberry/new/system/lib/libsupol.so': No such file or directory chown: cannot access '/usr/local/cranberry/new/system/xbin/su': No such file or directory chown: cannot access '/usr/local/cranberry/new/system/xbin/daemonsu': No such file or directory chown: cannot access '/usr/local/cranberry/new/system/xbin/sugote': No such file or directory chown: cannot access '/usr/local/cranberry/new/system/xbin/supolicy': No such file or directory chown: cannot access '/usr/local/cranberry/new/system/lib/libsupol.so': No such file or directory chgrp: cannot access '/usr/local/cranberry/new/system/xbin/su': No such file or directory chgrp: cannot access '/usr/local/cranberry/new/system/xbin/daemonsu': No such file or directory chgrp: cannot access '/usr/local/cranberry/new/system/xbin/sugote': No such file or directory chgrp: cannot access '/usr/local/cranberry/new/system/xbin/supolicy': No such file or directory chgrp: cannot access '/usr/local/cranberry/new/system/lib/libsupol.so': No such file or directory chcon: cannot access '/usr/local/cranberry/new/system/xbin/su': No such file or directory chcon: cannot access '/usr/local/cranberry/new/system/xbin/daemonsu': No such file or directory chcon: cannot access '/usr/local/cranberry/new/system/xbin/sugote': No such file or directory chcon: cannot access '/usr/local/cranberry/new/system/xbin/supolicy': No such file or directory chcon: cannot access '/usr/local/cranberry/new/system/lib/libsupol.so': No such file or directory cp: cannot stat '/usr/local/cranberry/supersu/armv7/su': No such file or directory chmod: cannot access '/usr/local/cranberry/new/system/bin/.ext/.su': No such file or directory chown: cannot access '/usr/local/cranberry/new/system/bin/.ext/.su': No such file or directory chgrp: cannot access '/usr/local/cranberry/new/system/bin/.ext/.su': No such file or directory chcon: cannot access '/usr/local/cranberry/new/system/bin/.ext/.su': No such file or directory cp: cannot stat '/usr/local/cranberry/supersu/armv7/su': No such file or directory cp: cannot stat '/usr/local/cranberry/supersu/armv7/su': No such file or directory cp: cannot stat '/usr/local/cranberry/supersu/armv7/su': No such file or directory chmod: cannot access '/opt/google/containers/android/rootfs/android-data/data/adb/su/bin/su': No such file or directory chmod: cannot access '/opt/google/containers/android/rootfs/android-data/data/adb/su/bin/daemonsu': No such file or directory chmod: cannot access '/opt/google/containers/android/rootfs/android-data/data/adb/su/bin/sugote': No such file or directory chown: cannot access '/opt/google/containers/android/rootfs/android-data/data/adb/su/bin/su': No such file or directory chown: cannot access '/opt/google/containers/android/rootfs/android-data/data/adb/su/bin/daemonsu': No such file or directory chown: cannot access '/opt/google/containers/android/rootfs/android-data/data/adb/su/bin/sugote': No such file or directory chgrp: cannot access '/opt/google/containers/android/rootfs/android-data/data/adb/su/bin/su': No such file or directory chgrp: cannot access '/opt/google/containers/android/rootfs/android-data/data/adb/su/bin/daemonsu': No such file or directory chgrp: cannot access '/opt/google/containers/android/rootfs/android-data/data/adb/su/bin/sugote': No such file or directory chcon: cannot access '/opt/google/containers/android/rootfs/android-data/data/adb/su/bin/su': No such file or directory chcon: cannot access '/opt/google/containers/android/rootfs/android-data/data/adb/su/bin/daemonsu': No such file or directory chcon: cannot access '/opt/google/containers/android/rootfs/android-data/data/adb/su/bin/sugote': No such file or directory cp: cannot stat '/usr/local/cranberry/supersu/armv7/supolicy': No such file or directory chmod: cannot access '/opt/google/containers/android/rootfs/android-data/data/adb/su/bin/supolicy': No such file or directory chown: cannot access '/opt/google/containers/android/rootfs/android-data/data/adb/su/bin/supolicy': No such file or directory chgrp: cannot access '/opt/google/containers/android/rootfs/android-data/data/adb/su/bin/supolicy': No such file or directory chcon: cannot access '/opt/google/containers/android/rootfs/android-data/data/adb/su/bin/supolicy': No such file or directory cp: cannot stat '/usr/local/cranberry/supersu/armv7/libsupol.so': No such file or directory chmod: cannot access '/opt/google/containers/android/rootfs/android-data/data/adb/su/lib/libsupol.so': No such file or directory chown: cannot access '/opt/google/containers/android/rootfs/android-data/data/adb/su/lib/libsupol.so': No such file or directory chgrp: cannot access '/opt/google/containers/android/rootfs/android-data/data/adb/su/lib/libsupol.so': No such file or directory chcon: cannot access '/opt/google/containers/android/rootfs/android-data/data/adb/su/lib/libsupol.so': No such file or directory cp: cannot stat '/usr/local/cranberry/supersu/common/install-recovery.sh': No such file or directory chmod: cannot access '/usr/local/cranberry/new/system/etc/install-recovery.sh': No such file or directory chown: cannot access '/usr/local/cranberry/new/system/etc/install-recovery.sh': No such file or directory chgrp: cannot access '/usr/local/cranberry/new/system/etc/install-recovery.sh': No such file or directory chcon: cannot access '/usr/local/cranberry/new/system/etc/install-recovery.sh': No such file or directory cp: cannot stat '/usr/local/cranberry/supersu/common/install-recovery.sh': No such file or directory chmod: cannot access '/usr/local/cranberry/new/system/bin/daemonsu-service.sh': No such file or directory chown: cannot access '/usr/local/cranberry/new/system/bin/daemonsu-service.sh': No such file or directory chgrp: cannot access '/usr/local/cranberry/new/system/bin/daemonsu-service.sh': No such file or directory chcon: cannot access '/usr/local/cranberry/new/system/bin/daemonsu-service.sh': No such file or directory Do NOT edit /usr/share/arc-setup/config.json. Making changes to this file will permanently trash your new image. If you want to make changes to your system, remove the symlink, reboot, and mount it as a loop device using "mount -o loop,rw,sync /usr/local/cranberry/system.rooted.img /usr/local/cranberry/new"

Patching SELinux. Android apps will stop working until reboot.

/system/bin/sh: [1]: supolicy: not found chmod: /var/run/arc/sdcard/default/emulated/0/Download/policy.30_new: No such file or directory cp: cannot stat '/home/chronos/user/Downloads/policy.30_new': No such file or directory cp: cannot stat '/home/chronos/user/Downloads/policy.30_new': No such file or directory Reboot and enjoy!

CerisWhite commented 3 years ago

Your device is x86_64, right? I think I know what's going on

gyit918 commented 3 years ago

Your device is x86_64, right? I think I know what's going on

yes it is whats going on?? are you saying i cant root on x86_64

CerisWhite commented 3 years ago

It looks like I messed up something in this script and it broke x86 installations? I'm not entirely sure where I messed up but I'm working to correct it now. Can you do uname -m for me so I have a bit more info on what I'm working with?

gyit918 commented 3 years ago

will do Screenshot 2021-10-06 8 56 28 PM

gyit918 commented 3 years ago

ignore that just look at uname -n as you can see it is x86_64

CerisWhite commented 3 years ago

Apparently x86_64 has been broken for a while. I'm not sure what I did wrong but while I work it out, you can use this fork https://github.com/JamieHoSzeYui/CrAnberry

Run revert.sh, reboot, then use that fork's version of cranberry to root your image. Thank you for letting me know about this.

gyit918 commented 3 years ago

ok im happy

gyit918 commented 3 years ago

btw where did you learn this stuff

gyit918 commented 3 years ago

what the heck his isnt working either

CerisWhite commented 3 years ago

After looking at this a bit more closely, it seems like it's completely ignoring the if-else statements? Can anyone with a current version of x86_64 ChromeOS run bash --version and give me the output?

gyit918 commented 3 years ago

ceris white it works promblem was i forgot to put it into sudo sh

gyit918 commented 3 years ago

GNU bash, version 4.4.23(1)-release (x86_64-cros-linux-gnu) Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html

This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

CerisWhite commented 3 years ago

That doesn't quite add up. The script doesn't run unless you're root and I thought I did all the necessary error checking... Oh well. If you have root now, that's all that matters. Do you mean my script works or the fork I linked you to works?

gyit918 commented 3 years ago

yes but what is rw that you cant do and yes it was the forked link but for some reason i cant give root apps permission why??

CerisWhite commented 3 years ago

If possible, can you re-run my script now using the easy command (first curl https://raw.githubusercontent.com/CerisWhite/CrAnberry/main/revert.sh | sudo sh, reboot, and then curl https://raw.githubusercontent.com/CerisWhite/CrAnberry/main/cranberry.sh | sudo sh) and tell me if it works?

You can't "grant" permissions to apps with this method. There is no SU Manager present to manage su permissions, so any app that requests root privilege will be granted it without question. This is why this method is extremely dangerous to use and should only be used by people who know what they're doing.

CerisWhite commented 3 years ago

Since it seems like this was the result of using | sudo instead of | sudo sh, I'm going to close this. You'll still be able to respond to it though; Please tell me how running the script properly goes so I know if it's sane

gyit918 commented 3 years ago

Since it seems like this was the result of using | sudo instead of | sudo sh, I'm going to close this. You'll still be able to respond to it though; Please tell me how running the script properly goes so I know if it's sane

its good its good its good

If possible, can you re-run my script now using the easy command (first curl https://raw.githubusercontent.com/CerisWhite/CrAnberry/main/revert.sh | sudo bash, reboot, and then curl https://raw.githubusercontent.com/CerisWhite/CrAnberry/main/cranberry.sh | sudo bash) and tell me if it works?

You can't "grant" permissions to apps with this method. There is no SU Manager present to manage su permissions, so any app that requests root privilege will be granted it without question. This is why this method is extremely dangerous to use and should only be used by people who know what they're doing.

sure

gyit918 commented 3 years ago

what the hell curl https://raw.githubusercontent.com/CerisWhite/CrAnberry/main/revert.sh | sudo sh

Script must be run with sudo bash

gyit918 commented 3 years ago

yours didnt work again

gyit918 commented 3 years ago

oh wait it does i just had to do it again

CerisWhite commented 3 years ago

Script must be run with sudo bash

Sorry. I updated the readme to reflect this change but not my comment here. I modified the script so that it requires you to use sudo bash to run it to avoid someone running into the problem you did earlier and creating more issues. I'm glad it all works, though! Enjoy your rooted system. I'm still working out the details on installing supersu but we'll get there eventually

gyit918 commented 2 years ago

you there