nolirium / aroc

Android root on Chrome OS
GNU General Public License v3.0
129 stars 51 forks source link

just doesn't work no matter what #32

Closed AnonCYTO closed 1 year ago

AnonCYTO commented 4 years ago

Is there a fix?

localhost / # curl -Ls https://raw.githubusercontent.com/nolirium/aroc/onescript/RootandSEpatch.sh | sudo sh
Rooting scripts for Android on Chrome OS

Version 0.27

Unofficial scripts to copy SuperSU files to an Android system image on Chrome OS

Be aware that modifying the system partition could cause automatic updates to fail (unlikely), may result in having to powerwash or restore from USB potentially causing loss of data! Please make sure important files are backed up.

Copying usr/share/arc-setup/config.json to /usr/local/Backup/arc-setup/config.json.old
Setting 'ANDROID_DEBUGGABLE: true' and 'WRITABLE_MOUNT: true' in /usr/share/arc-setup/config.json

Creating new Android system image at /usr/local/Android_Images/system.raw.expanded.img
Formatting system.raw.expanded.img as ext4 filesystem

Discarding device blocks: done                            
Creating filesystem with 441344 4k blocks and 110432 inodes
Filesystem UUID: ee0d40d6-0212-4403-8fff-abf6dc3389fd
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912

Allocating group tables: done                            
Writing inode tables: done                            
Writing superblocks and filesystem accounting information: done 

Mounting system.raw.expanded.img
SELinux successfully set to 'Permissive' temporarily
Copying Android system files
Moving original Android rootfs image to /opt/google/containers/android/system.raw.img.bk
Replacing original Android rootfs image path with symlink to /usr/local/Android_Images/system.raw.expanded.img
Downloading SuperSU-v2.82-SR5
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  5811  100  5811    0     0   3490      0  0:00:01  0:00:01 --:--:--  6295
Unexpected file size. Trying again...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 6721k  100 6721k    0     0   497k      0  0:00:13  0:00:13 --:--:--  957k
Unzipping SuperSU zip, and copying required directories to ~/Downloads.
sh: 244: /usr/local/bin/busybox: not found
cp: cannot stat 'common': No such file or directory
cp: cannot stat 'armv7': No such file or directory
Now placing SuperSU files. Locations as indicated by the SuperSU update-binary script.

Creating SuperSU directory in system/priv-app, copying SuperSU apk, and setting its permissions and contexts
cp: cannot stat '/home/chronos/user/Downloads/common/Superuser.apk': No such file or directory
chmod: cannot access '/usr/local/Android_Images/Mounted/system/priv-app/SuperSU/SuperSU.apk': No such file or directory
chcon: cannot access '/usr/local/Android_Images/Mounted/system/priv-app/SuperSU/SuperSU.apk': No such file or directory
chown: cannot access '/usr/local/Android_Images/Mounted/system/priv-app/SuperSU/SuperSU.apk': No such file or directory
chgrp: cannot access '/usr/local/Android_Images/Mounted/system/priv-app/SuperSU/SuperSU.apk': No such file or directory
Copying su to system/xbin/su,daemonsu,sugote, and setting permissions and contexts
cp: cannot stat '/home/chronos/user/Downloads/x86/su.pie': No such file or directory
cp: cannot stat '/home/chronos/user/Downloads/x86/su.pie': No such file or directory
cp: cannot stat '/home/chronos/user/Downloads/x86/su.pie': No such file or directory
chmod: cannot access '/usr/local/Android_Images/Mounted/system/xbin/su': No such file or directory
chmod: cannot access '/usr/local/Android_Images/Mounted/system/xbin/daemonsu': No such file or directory
chmod: cannot access '/usr/local/Android_Images/Mounted/system/xbin/sugote': No such file or directory
chown: cannot access '/usr/local/Android_Images/Mounted/system/xbin/su': No such file or directory
chown: cannot access '/usr/local/Android_Images/Mounted/system/xbin/daemonsu': No such file or directory
chown: cannot access '/usr/local/Android_Images/Mounted/system/xbin/sugote': No such file or directory
chgrp: cannot access '/usr/local/Android_Images/Mounted/system/xbin/su': No such file or directory
chgrp: cannot access '/usr/local/Android_Images/Mounted/system/xbin/daemonsu': No such file or directory
chgrp: cannot access '/usr/local/Android_Images/Mounted/system/xbin/sugote': No such file or directory
chcon: cannot access '/usr/local/Android_Images/Mounted/system/xbin/su': No such file or directory
chcon: cannot access '/usr/local/Android_Images/Mounted/system/xbin/daemonsu': No such file or directory
chcon: cannot access '/usr/local/Android_Images/Mounted/system/xbin/sugote': No such file or directory
Creating directory system/bin/.ext/.su
Copying su to system/bin/.ext/.su and setting permissions and contexts
cp: cannot stat '/home/chronos/user/Downloads/x86/su.pie': No such file or directory
chmod: cannot access '/usr/local/Android_Images/Mounted/system/bin/.ext/.su': No such file or directory
chcon: cannot access '/usr/local/Android_Images/Mounted/system/bin/.ext/.su': No such file or directory
chown: cannot access '/usr/local/Android_Images/Mounted/system/bin/.ext/.su': No such file or directory
chgrp: cannot access '/usr/local/Android_Images/Mounted/system/bin/.ext/.su': No such file or directory
Copying supolicy to system/xbin, libsupol to system/lib and setting permissions and contexts
cp: cannot stat '/home/chronos/user/Downloads/x86/supolicy': No such file or directory
chmod: cannot access '/usr/local/Android_Images/Mounted/system/xbin/supolicy': No such file or directory
chown: cannot access '/usr/local/Android_Images/Mounted/system/xbin/supolicy': No such file or directory
chgrp: cannot access '/usr/local/Android_Images/Mounted/system/xbin/supolicy': No such file or directory
chcon: cannot access '/usr/local/Android_Images/Mounted/system/xbin/supolicy': No such file or directory
cp: cannot stat '/home/chronos/user/Downloads/x86/libsupol.so': No such file or directory
chmod: cannot access '/usr/local/Android_Images/Mounted/system/lib/libsupol.so': No such file or directory
chown: cannot access '/usr/local/Android_Images/Mounted/system/lib/libsupol.so': No such file or directory
chgrp: cannot access '/usr/local/Android_Images/Mounted/system/lib/libsupol.so': No such file or directory
chcon: cannot access '/usr/local/Android_Images/Mounted/system/lib/libsupol.so': No such file or directory
Copying sh from system/bin/sh to system/xbin/sugote-mksh and setting permissions and contexts
Adding extra files system/etc/.installed_su_daemon and system/etc/install-recovery.sh
cp: cannot stat '/home/chronos/user/Downloads/common/install-recovery.sh': No such file or directory
chmod: cannot access '/usr/local/Android_Images/Mounted/system/etc/install-recovery.sh': No such file or directory
chown: cannot access '/usr/local/Android_Images/Mounted/system/etc/install-recovery.sh': No such file or directory
chgrp: cannot access '/usr/local/Android_Images/Mounted/system/etc/install-recovery.sh': No such file or directory
chcon: cannot access '/usr/local/Android_Images/Mounted/system/etc/install-recovery.sh': No such file or directory
Symlinking system/bin/install-recovery.sh to system/etc/install-recovery.sh
Adding system/bin/daemonsu-service.sh
cp: cannot stat '/home/chronos/user/Downloads/common/install-recovery.sh': No such file or directory
chmod: cannot access '/usr/local/Android_Images/Mounted/system/bin/daemonsu-service.sh': No such file or directory
chown: cannot access '/usr/local/Android_Images/Mounted/system/bin/daemonsu-service.sh': No such file or directory
chgrp: cannot access '/usr/local/Android_Images/Mounted/system/bin/daemonsu-service.sh': No such file or directory
chcon: cannot access '/usr/local/Android_Images/Mounted/system/bin/daemonsu-service.sh': No such file or directory
Creating file init.super.rc in Android rootfs
Adding daemonsu service to init.super.rc
Adding 'import /init.super.rc' to existing init.rc
Substituting '|mount rootfs rootfs / remount bind rw' for '|mount rootfs rootfs / remount bind ro' in existing init.rc
A backup of init.rc will be stored as init.rc.old
Attempting to install BusyBox into Android container
Executing './busybox --install -s ../xbin'
sh: 398: ./busybox: not found
Replacing absolute symlinks created by 'busybox --install' with relative symlinks

Now attempting to patch SE Linux.
If there is a problem with the next part of the script, run the separate patching script from GitHub after a reboot.

Creating temporary directory /opt/google/containers/android/rootfs/android-data/data/adb/su and subdirs
Copying contents of existing Android /system/lib to /opt/google/containers/android/rootfs/android-data/data/adb/su/lib
Copying contents of existing Android /sbin to /opt/google/containers/android/rootfs/android-data/data/adb/su/bin
Downloading SuperSU-v2.82-SR5
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 6721k  100 6721k    0     0   618k      0  0:00:10  0:00:10 --:--:-- 1224k
Unzipping SuperSU zip, and copying required directories to ~/Downloads.
sh: 233: /usr/local/bin/busybox: not found
Unzipping SuperSU zip, and copying required directories to ~/Downloads.
sh: 244: /usr/local/bin/busybox: not found
cp: cannot stat 'common': No such file or directory
cp: cannot stat 'armv7': No such file or directory
Copying su to /opt/google/containers/android/rootfs/android-data/data/adb/su/bin/su, and setting permissions and contexts
cp: cannot stat '/home/chronos/user/Downloads/x86/su.pie': No such file or directory
cp: cannot stat '/home/chronos/user/Downloads/x86/su.pie': No such file or directory
cp: cannot stat '/home/chronos/user/Downloads/x86/su.pie': 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
Copying supolicy to su/bin, libsupol to su/lib and setting permissions and contexts
cp: cannot stat '/home/chronos/user/Downloads/x86/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 '/home/chronos/user/Downloads/x86/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
Attempting to bind mount temp dir /data/adb/su/bin to /sbin within the Android container.
Attempting to bind mount temp dir /data/adb/su/lib to /system/lib within the Android container.

Any Android apps currently running may stop working now and may not function correctly until this script has completed and the system has been rebooted.

Checking for the presence of SuperSU...

Error!
SU binary not found! Unable to continue.

localhost / # sudo mv /opt/google/containers/android/system.raw.img.bk /opt/google/containers/android/system.raw.img
localhost / # 
khanhtranngoccva commented 4 years ago

Download the SuperSU zip manually. The link in the script now redirects to a download page instead of being instantly downloaded with "curl" or "wget". Also note that trying to root ARC++ (Android 9, CrOS 77+) will make the container bootloop with signal 9 (project abandoned)

khanhtranngoccva commented 4 years ago

If you use Chrome OS 77+, try this: github.com/gerriarob/arob. This project is used for Chrome OS on custom setups with Brunch framework, but make sure your PC runs an Intel x86_64 cpu and back up all your data first.