nolirium / aroc

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

No space errors on Chromebook X2 (soraka) 69.0.3497.14 #6

Open mmirg opened 6 years ago

mmirg commented 6 years ago

This seems to be not unlike the errors I received when testing aroc on a Pixelbook in issue #2 but the scripts seem to be using sparse files and shouldn't have a space issue anymore as per the allocation that I see in the script.

sudo du -sh /opt/google/containers/android/rootfs/root/
1.8G    /opt/google/containers/android/rootfs/root/
curl -Ls https://raw.githubusercontent.com/nolirium/aroc/master/01Root.sh | sudo sh
Test Rooting scripts for Android on Chrome OS

Version 0.25

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

Part 1 of 2

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 /etc/init/arc-setup-env to /usr/local/Backup
Setting 'export WRITABLE_MOUNT=1', 'export ANDROID_DEBUGGABLE=1' and (if variable exists) 'export SHARE_FONTS=0' in /etc/init/arc-setup-env
The file at /opt/google/containers/android/system.raw.img is already a symlink!
Removing symlink
Using /opt/google/containers/android/system.raw.img.bk
Creating new Android system image at /usr/local/Android_Images/system.raw.expanded.img

1774527488 bytes (1.8 GB, 1.7 GiB) copied, 12.0028 s, 148 MB/s
1800000+0 records in
1800000+0 records out
1843200000 bytes (1.8 GB, 1.7 GiB) copied, 15.0665 s, 122 MB/s

Formatting system.raw.expanded.img as ext4 filesystem

mke2fs 1.44.1 (24-Mar-2018)
Discarding device blocks: done                            
Creating filesystem with 450000 4k blocks and 112672 inodes
Filesystem UUID: fcfde133-c630-4ea0-8718-2bba63c65656
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 

Converting system.raw.expanded.img to sparse image
Mounting system.raw.expanded.img
SELinux successfully set to 'Permissive' temporarily
Copying Android system files

cp: error writing '/usr/local/Android_Images/Mounted/./system/priv-app/TelephonyProvider/TelephonyProvider.apk': No space left on device
cp: cannot create directory '/usr/local/Android_Images/Mounted/./system/priv-app/TelephonyProvider/oat/x86_64': No space left on device
cp: cannot create directory '/usr/local/Android_Images/Mounted/./system/priv-app/VpnDialogs': No space left on device
cp: cannot create directory '/usr/local/Android_Images/Mounted/./system/priv-app/WallpaperCropper': No space left on device
cp: cannot create directory '/usr/local/Android_Images/Mounted/./system/usr': No space left on device
cp: cannot create directory '/usr/local/Android_Images/Mounted/./system/xbin': No space left on device
cp: error writing '/usr/local/Android_Images/Mounted/./ueventd.cheets.rc': No space left on device
cp: error writing '/usr/local/Android_Images/Mounted/./ueventd.rc': No space left on device
cp: cannot create directory '/usr/local/Android_Images/Mounted/./var': No space left on device
cp: cannot create directory '/usr/local/Android_Images/Mounted/./vendor': No space left on device
Creating symlink to /usr/local/Android_Images/system.raw.expanded.img
SuperSU files not found in ~/Downloads! Attempting to download BusyBox and SuperSU now...
Downloading SuperSU-v2.82-SR3
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  5807  100  5807    0     0   9582      0 --:--:-- --:--:-- --:--:-- 13599
Unexpected file size. Trying again...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 6756k  100 6756k    0     0  1081k      0  0:00:06  0:00:06 --:--:-- 1359k
Unzipping SuperSU zip, and copying required directories to ~/Downloads.
sh: 236: /usr/local/bin/busybox: not found
cp: cannot stat 'common': No such file or directory
cp: cannot stat 'armv7': No such file or directory
Downloading SuperSU-v2.82-SR3
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 6756k  100 6756k    0     0  1096k      0  0:00:06  0:00:06 --:--:-- 1526k
Unzipping SuperSU zip, and copying required directories to ~/Downloads.
sh: 224: /usr/local/bin/busybox: not found
Unzipping SuperSU zip, and copying required directories to ~/Downloads.
sh: 236: /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
mkdir: cannot create directory ‘/usr/local/Android_Images/Mounted/system/priv-app/SuperSU’: No space left on device
chown: cannot access '/usr/local/Android_Images/Mounted/system/priv-app/SuperSU': No such file or directory
chgrp: cannot access '/usr/local/Android_Images/Mounted/system/priv-app/SuperSU': No such file or directory
sh: 712: cd: can't cd to /usr/local/Android_Images/Mounted/system/priv-app/SuperSU
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
sh: 319: cd: can't cd to /usr/local/Android_Images/Mounted/system/xbin
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
mkdir: cannot create directory ‘/usr/local/Android_Images/Mounted/system/bin/.ext’: No space left on device
Copying su to system/bin/.ext/.su and setting permissions and contexts
sh: 351: cd: can't cd to /usr/local/Android_Images/Mounted/system/bin/.ext
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
sh: 738: cd: can't cd to /usr/local/Android_Images/Mounted/system/xbin
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
cp: cannot create regular file '../xbin/sugote-mksh': No such file or directory
sh: 764: cd: can't cd to /usr/local/Android_Images/Mounted/system/xbin
chmod: cannot access '/usr/local/Android_Images/Mounted/system/xbin/sugote-mksh': No such file or directory
chcon: cannot access '/usr/local/Android_Images/Mounted/system/xbin/sugote-mksh': No such file or directory
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
sed: couldn't flush /usr/local/Android_Images/Mounted/system/../sedlGuqjP: No space left on device
Removing temporary files

Done!

Please check the output of this script for any errors.

Please reboot now, then run script 02SEPatch.sh.

Something seems to be odd in the creation of the blank image.

uname -m
x86_64

However the blank image seems to be 1800000 which corresponds to arm7. Increasing the count to 2200000 for arm7 allows the android files to be copied successfully but the script still fails downloading busybox and SuperSU.

nolirium commented 6 years ago

Thanks for the detailed report. Yes, it seems that something's not right there. I wonder if the script is failing to get the correct CPU architecture for Intel devices, for some reason. Unfortunately I only have an ARM Chromebook to test with.

I have suggested to someone who appears to have encountered the same issue that they might like to try this version of script 1, in which

ARCH="`uname -m`" has been changed to ARCH="`printf "getprop ro.product.cpu.abi" | android-sh`"

I'll post back once I know whether this works or not.

ghost commented 5 years ago

I'm actually having this same issue, I'm using a Kabylake, EVE, pixelbook. You may be onto something with it being intel based pixelbooks.

OScommander commented 5 years ago

Same issue with hp x360 14" Intel i3 chromebook.

nashi2000 commented 5 years ago

Yeah this is fixed by Smartguy1196 code update....