nolirium / aroc Goto Github PK
View Code? Open in Web Editor NEWAndroid root on Chrome OS
License: GNU General Public License v3.0
Android root on Chrome OS
License: GNU General Public License v3.0
So when I run the combined script on ChromeOS v83, it shows the above error after installed busybox. Any fix?
https://www.reddit.com/r/chromeos/comments/dufn1b/how_to_root_android_subsystem_on_chromebook/ found this but not sure if itll work, anyone wanna test it out?
busybox will refuse to install... and superSU too
somthing due to unprivileged but I did what the note said...
I'm running Version 63.0.3239.140 (Official Build) (64-bit)
uname -a output is: Linux localhost 3.18.0-16288-g64d05cf80004 #1 SMP PREEMPT Mon Jan 8 23:21:11 PST 2018 x86_64 Intel(R) Celeron(R) CPU N3060 @ 1.60GHz GenuineIntel GNU/Linux
Device is a Samsung XE500C13
After applying the scripts successfully, I was able to open apps installed via the playstore, but I did a reboot and after that 2nd reboot those apps and the playstore itself stopped working. Trying to re-enable the playstore functionality in chrome's settings led to an failure after accepting the terms and conditions with the "something went wrong" message.
The only solution was to rollback the OS img.
HP Chromebook X2
71.0.3578.21
11151.17.0 (Official Build) beta-channel soraka-unibuild (soraka)
Google_Soraka.10431.75.0
ARC Version
5090785
I used to be able to successfully edit the/system/etc/hosts
in ARC++ after rooting and have my edits reflected in network usage. As I'm not longer able to write directly to the system, I've modified the script to have a relative link to /data/hosts
so that I can continue to write to the file.
ls -l /system/etc/hosts
lrwxrwxrwx 1 u0_a55534 u0_a55534 16 2018-11-02 13:22 /system/etc/hosts -> ../../data/hosts
ls -l /data/hosts
-rw-r--r-- 1 root root 3772970 2018-11-02 22:37 /data/hosts
However, as of updating to 71.0.3578.27, making edits to my hosts file is not reflected in use.
For example, the following hosts file:
127.0.0.1 localhost
::1 localhost
127.0.0.1 untd.com
Is ignored and I get the following:
PING untd.com (64.136.45.220) 56(84) bytes of data.
64 bytes from www.dca.untd.com (64.136.45.220): icmp_seq=1 ttl=239 time=31.2 ms
64 bytes from www.dca.untd.com (64.136.45.220): icmp_seq=2 ttl=239 time=32.5 ms
I'm not sure if this is specifically root related and it could be something else that has changed on the ARC side for networking. I tried editing hosts in Chrome OS and the changes are respected on the Chrome OS side but not in Android.
ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope: Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:0 TX bytes:0
arc0 Link encap:Ethernet HWaddr de:ad:be:ef:fa:ce
inet addr:100.115.92.2 Bcast:100.115.92.3 Mask:255.255.255.252
inet6 addr: fe80::2ff:aaff:fe00:55/64 Scope: Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1862 errors:0 dropped:0 overruns:0 frame:0
TX packets:1765 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1191488 TX bytes:317975
Acer R11 running Version 71.0.3578.94 (Official Build) (64-bit)
I tried running the combined patch too, but that didn't seem to work
(I tried to use the Pull Request from smartguy1196:
#18)
These are the error logs:
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
ln: failed to create symbolic link '../bin/install-recovery.sh': File exists
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
ERROR: No running Android system found. Unable to patch sepolicy.```
First thank you for your effort for rooting chrome os.
You and Smartguy’s edited sorce code help me root chrome os.
Now I'm using chromebook plus v2(celeron) and chromebook 13 g1(Core m5)
I have problem with installing xposed on v2
Not like v2, 13 g1 has been passed very smoothly to root and install xposed using your original code.
v2 had have problem with rooting,using original code, so I've used smartguy code and it worked
But installing xposed is still not working.
I compared 2 laptop on xposed installer app.
13 g1 architecture is x86, v2 is x86_64
So whenever I flash framework, error said me wrong platform(please see my attatched photo)
I think reason I can't do flash framework on v2 is that it is not x86,but x86_64
is there any method to resolve it?
I've looked through all the issues. I downloaded sr5 (per @jbardi) and added the sleep (per @Venryx) and changed it from $arc_system to $system (per @Mygod). No errors, when running the single script. After rebooting the system image will not boot.
If I do it separately, on the second script I get
runcon: exec /system/bin/sh: Permission denied
failing on the following command:
printf 'su -c supolicy --file /var/run/arc/sdcard/default/emulated/0/Download/policy.30 /var/run/arc/sdcard/default/emulated/0/Download/policy.30_out --sdk=25 \n su -c "chmod 0644 /var/run/arc/sdcard/default/emulated/0/Download/policy.30_out"' | android-sh
I'm working with a freshly recovered pixelbook version 77. Dev channel
Hi~ greetings from Chinese chromebook user,I follow the readme file to finish root, the root and supersu works fine, but chinese font missing, and I tried to modify /system/etc/font.xml and want to put fonts into /system/font. all failed,these make no sense.finally trying to use unroot.sh to restore ,I even delete the whole android system and reinstall it. still a cross in a square except english. I think it's due to the policy30 and symbolic links.and while running unroot.sh I got traceback" sed: no such file or dictory"
请中文用户在备份前不要轻易尝试,android会丢失中文字体,貌似与软链接和selinux有关
model:Hana(lenovo chromebook yoga n23/flex11)
chromeos version 63 beta channel
Hello, I have Brunch Framework installed. I get the error that I need to be in developer mode to access system files. How can I enable developer mode?
Hi, I've been trying to root my chromebook for the last couple of weeks, but I just can't seem to get it to work...
I've rooted my chromebook before, usually I would use the following website: https://nolirium.blogspot.com/2016/12/android-on-chrome-os-rooting-shell.html
But lately it haven't been working, so i tried to search for other rooting methods online but it seems there are none...
right now I can run all android applications without any problems, I can't seem to figure out what the problem is...
I've rooted my chromebook 4-5 times before so I don't know what has changed since last... But if anyone would like to help me that would be great.
here are the following issues that I have when trying to run the script:
Also I do remember to restart the chromebook after I run a command... I restart by typing sudo reboot
I know this is not related but i am trying to get this working for days.
I am trying to use tincore keymapper but it complains about "uinput" not supported by kernel.
I can load (modprobe uinput
) from crOS shell but apps still complain.
I check in crOs shell /dev/... uinput
was there but i if check within android subsytem no "uinput
" was there. whole /dev/input folder was empty.
Basically android subsytem also does not detect any keyboard or mice.
As of Chrome OS Stable version 65, you can no longer install BusyBox. I downgraded back to 64 and re-rooted and BusyBox installed instantly, so I once again upgraded to 65 and although I am able to root, BusyBox will no longer install. Google changed something in 65 and none of the 4 BusyBox installers tested on the Play Store can write to /system even after being granted root access.
I know it is not directly related to your root scripts, but I was hoping that maybe it was something that could be worked around with a change of some kind in your scripts. Busybox is a necessity for me, so without being able to install it, I guess I'll have to move back to using my laptop and tablet. Was hoping a Chromebook could replace them.
Is there any way you can inject busybox with your scripts just like you install su into the image?
Well, I have been using this script since I belive Chrome OS v63, and I knew that one day we would reach a point where the rooting no longer works due to changes on Google's part, and it appears I have reached that point. Chrome OS v77 is the first version I have now been unable to get rooted with these scripts. OS v77 also appears to be the first stable release that is now using Android 9 Pie instead of Android 7 Nougat, so perhaps that has something to do with the inability to root with the current scripts?
Since there have been no updates on this project's code for 10 months, as well as no responses from the author on the Issues in quite some time, I have to assume this project has been abandoned. Hopefully someone can fork this and continue with it, but for now, I guess I'll be downgrading back to Chrome OS v76 and staying on that version for the foreseeable future.
As continuation of comment here: #23 (comment)
After resolving the issue in the thread above, I actually hit multiple errors when trying to run the script, and I ended up doing multiple things to try to resolve them. Enough that I don't know for sure if the problems I hit were derivative problems coming from the issue above (and my not properly cleaning the environment before trying again), or if I did indeed hit a genuine problem and found a genuine solution.
Anyway, the basic problem I hit (after the SuperSU issue above), is that this line in the combined script was failing:
cd $arc_system/priv-app
Here is the actual output:
Mounting system.raw.expanded.img
SELinux successfully set to 'Permissive' temporarily
Copying Android system files
Creating symlink to /usr/local/Android_Images/system.raw.expanded.img at original Android rootfs image file path
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
sh: 957: cd: can't cd to /usr/local/Android_Images/Mounted/system/priv-app
Copying su to system/xbin/su,daemonsu,sugote, and setting permissions and contexts
sh: 325: cd: can't cd to /usr/local/Android_Images/Mounted/system/xbin
cp: cannot create regular file '/usr/local/Android_Images/Mounted/system/xbin/su': No such file or directory
cp: cannot create regular file '/usr/local/Android_Images/Mounted/system/xbin/daemonsu': No such file or directory
cp: cannot create regular file '/usr/local/Android_Images/Mounted/system/xbin/sugote': 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
sh: 351: cd: can't cd to /usr/local/Android_Images/Mounted/system/bin
Copying su to system/bin/.ext/.su and setting permissions and contexts
Copying supolicy to system/xbin, libsupol to system/lib and setting permissions and contexts
sh: 988: cd: can't cd to /usr/local/Android_Images/Mounted/system/xbin
cp: cannot create regular file '/usr/local/Android_Images/Mounted/system/xbin/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
sh: 997: cd: can't cd to /usr/local/Android_Images/Mounted/system/lib
cp: cannot create regular file '/usr/local/Android_Images/Mounted/system/lib/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
I hit the same error like 3 or 4 times as I kept trying to run the combined script. (including after a [restore-backup]+restart cycle, I believe)
This was odd because when I ran the cd command manually in the shell, it succeeded every time. I eventually figured it must be a timing issue -- an earlier command changed the mounting or something so the script has to wait longer before being able to execute the cd command.
So to resolve it, I did the following:
echo "Creating SuperSU directory in system/priv-app [...]
sudo bash /home/user/[your user id here]/Downloads/RootScript_Fixed.sh
Anyway, this time, finally, the script succeeded and root became functional.
(Well technically, it got to the last step of calling the sepolicy_patch but failed because Android wasn't active since I hadn't [restore-backup]+restarted since last botched attempt; so I had to restart then run the regular 02SEPatch.sh
script, which then succeeded. But others shouldn't have this problem if they start from a fresh slate or run the [restore-backup]+restart cycle immediately before the steps above.)
Anyway, it took quite a while, and I'm not actually sure if the steps above (of adding the longer sleep) are the reason it ended up working, but I thought I'd mention what may have fixed it for me, so at least other people hitting the issue have a potential fix available.
I'm currently looking into it.
I'm referencing this question on the Stack Exchange. I'm gonna try forcing the shell script to install the x86_64 binary instead and see if that works
Hello, I have been trying to get rooted on both the Canary (73) and Stable (71) of Chrome OS but the same thing happens on both of them. Lot's of errors. I have a HP Chromebook 14 G5 (snappy).
Here is what I did and exactly what happened. (what it said in the terminal)
crosh> shell
chronos@localhost:/ sudo /usr/share/vboot/bin/make_dev_ssd.sh --remove_rootfs_verification
ERROR: YOU ARE TRYING TO MODIFY THE LIVE SYSTEM IMAGE /dev/mmcblk1.
The system may become unusable after that change, especially when you have
some auto updates in progress. To make it safer, we suggest you to only
change the partition you have booted with. To do that, re-execute this command
as:
sudo /usr/share/vboot/bin/make_dev_ssd.sh --remove_rootfs_verification --partitions 2
If you are sure to modify other partition, please invoke the command again and
explicitly assign only one target partition for each time (--partitions N )
Since that didn't work I did this.
chronos@localhost: sudo /usr/share/vboot/bin/make_dev_ssd.sh --remove_rootfs_verification --partitions
make_dev_ssd.sh: INFO: Kernel A: Disabled rootfs verification.
make_dev_ssd.sh: INFO: Backup of Kernel A is stored in: /mnt/stateful_partition/backups/kernel_A_20190107_193909.bin
make_dev_ssd.sh: INFO: Kernel A: Re-signed with developer keys successfully.
make_dev_ssd.sh: INFO: Successfully re-signed 1 of 1 kernel(s) on device /dev/mmcblk1.
(reboots)
chronos@localhost:/ curl -Ls https://raw.githubusercontent.com/nolirium/aroc/master/01Root.sh | sudo sh (everything goes fine....until the middle to the bottom)
id_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
sed: can't read /../init.rc: No such file or directory
Removing temporary files
Done!
Please check the output of this script for any errors.
Please reboot now, then run script 02SEPatch.sh.
What could be going wrong?
Can someone post the modified script which finanally worked on Chromebook X2. That will avoid every single person trying to modify the scripts.
I see that some here have been able to root. The current version of Nolirium script has some issue with Intel. I was stuck at No space left...issue. I modified th script and got passed that but encountered other errors. I was going to try to do more modifications but I think since some people here already got it to work can you just give us. The Test Script by NOlirium in another issue did not work for me. ONly when I updated the ARchitecture code to force X86 did I get past the Space Error.
mmirg can you post your modified version until NOlirium get time to update his version?
Samsung Chromebook Pro here running beta version of Chrome OS (Version 71.0.3578.71 (Official Build) beta (64-bit))
And for the love of the gods I can't figure out how to select and scroll down pages in crosh to copy the full logs I'll only copy a few lines...
Converting system.raw.expanded.img to sparse image
fallocate: fallocate failed: keep size mode is unsupported
Mounting system.raw.expanded.img
SELinux successfully set to 'Permissive' temporarily
Copying Android system files
Moving original rootfs image to /opt/google/containers/android/system.raw.img.bk
Creating symlink to /usr/local/Android_Images/system.raw.expanded.img
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
sh: 713: cd: can't cd to /usr/local/Android_Images/Mounted/system/priv-app
Copying su to system/xbin/su,daemonsu,sugote, and setting permissions and contexts
sh: 325: cd: can't cd to /usr/local/Android_Images/Mounted/system/xbin
cp: cannot create regular file '/usr/local/Android_Images/Mounted/system/xbin/su': No such file or directory
cp: cannot create regular file '/usr/local/Android_Images/Mounted/system/xbin/daemonsu': No such file or directory
cp: cannot create regular file '/usr/local/Android_Images/Mounted/system/xbin/sugote': 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
sh: 351: cd: can't cd to /usr/local/Android_Images/Mounted/system/bin
The company Chainfire sold SuperSU to seem to have abandoned the project, which left all the links to the actual binary dead from their website, which I assume is the reason I ran the script here and failed to install su.
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.
The process no longer works on Chrome OS v70 stable.
Technically this issue is not related to your script, because I have to remove root verification before I can even attempt to run your script, but I was hoping you may have an idea of how I might fix no longer being able to remove root verification since the v70 upgrade.
After upgrading to v70 the --remove_rootfs_verification no longer works. v70 installed to the alternate rootfs using kernal B on partition 4, and running rootdev -s shows me /dev/mmcblk0p5, so I ran the following command:
sudo /usr/share/vboot/bin/make_dev_ssd.sh --remove_rootfs_verification --partitions 4
When run, it shows the proper output as below:
make_dev_ssd.sh: INFO: Kernel B: Disabled rootfs verification.
make_dev_ssd.sh: INFO: Backup of Kernel B is stored in: /mnt/stateful_partition/backups/kernel_B_20181101_143134.bin
make_dev_ssd.sh: INFO: Kernel B: Re-signed with developer keys successfully.
make_dev_ssd.sh: INFO: Successfully re-signed 1 of 1 kernel(s) on device /dev/mmcblk0
However, when I reboot and then attempt to run the RootandSEpatch.sh it tells me that it is read only and that I have to remove root verification. I have tried over and over, and its a catch 22 as it never really removes root verification. I've been using your root script since version 63 I believe, but this is the first time I have been unable to remove root verification.
I have also tried the dev tool to remove verificaton as suggested in another forum:
sudo /usr/libexec/debugd/helpers/dev_features_rootfs_verification
That command is supposed to determin the rootfs and kernel pair being used and remove the root verificaton from the correct partition.
When typing the mount command, it shows that the partition is mounted rw, but it still does not work. This is the output of the mount command for the rootfs that is running on partition 4:
/dev/mmcblk0p5 on / type ext2 (rw,relatime,seclabel)
I am running an ASUS Chromebook Flip C302
I am not sure if it is just me or not, but after the latest update (on or around March 11, 2018), the script completes, but during the install there the ARC service dies repeatedly. After completion, no Android apps will run. I am going to return to the stock system image tonight. If time permits, I will attempt to root again and report. Thank you for all your support. This script is a huge time saver.
I have been trying to root my chromebook android subsystem for the last 4 days but really can't seem to figure it out so i have decided to ask you guys for help.
Hi! Your work here is amazing! sadly I'm unable to root a chromebook with ChromeOS 74 installed, I've managed to run all the first script flawlessly, however, the second script doesn't recognize the SU.... I don't know if is a issue related to android 9 and super su not getting along, maybe if we use Magisk instead of super su all the android versions could be covered?
Thanks for reading
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 / #
My android apps aren't working again and when i tried installing one, it gave me a "file not supported error"!
What do i do?
I am unable to root Android Pie on the latest beta channel release for the Chromebook X2. I had to make a small modification to the script to have it run properly as I am no longer able to mount /opt/google/containers/android/system.raw.img
while it is already mounted so I instead copied files from /opt/google/containers/android/rootfs/root to /usr/local/Android_Images/Mounted
after mounting system.raw.expanded.img
. However, after running the 01Root.sh
I had a failure running 02SEPatch.sh
because android-sh
could not be run. I was able to fix this by running setenforce 0
. However, upon reboot, Android apps did not work and Android did not appear to be running. I once again had an issue running android-sh
. Restoring system.raw.img.bk
does bring me back to a working unrooted Android container.
I'm receiving "out of space" errors when running the first script on a Pixelbook.
du -sh /opt/google/containers/android/rootfs/root/
2.0G /opt/google/containers/android/rootfs/root/
It seems like I need to increase the size of the image created by the script? Can I just try to double the size and see if it works?
curl -Ls https://raw.githubusercontent.com/nolirium/aroc/master/01Root.sh | sudo sh
Test Rooting scripts for Android on Chrome OS
Version 0.23
Unofficial scripts to copy SuperSU files to an Android system image on Chrome OS
Part 1 of 2
In order to modify system files, the Chrome OS system partition needs to have been mounted writeable.
If you haven't already disabled rootfs verification, you will need to do so before proceeding with this script.
You should be able to disable rootfs verification by running the following command, then rebooting.
sudo /usr/share/vboot/bin/make_dev_ssd.sh --remove_rootfs_verification --partitions 4
Alternatively, run the command below, then follow the prompt.
sudo /usr/share/vboot/bin/make_dev_ssd.sh --remove_rootfs_verification
Press Ctrl+C to cancel if you still need to do the above.
Be aware that modifying the system partition could cause automatic updates to fail, 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 '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
571884544 bytes (572 MB, 545 MiB) copied, 1 s, 572 MB/s
1060000+0 records in
1060000+0 records out
1085440000 bytes (1.1 GB, 1.0 GiB) copied, 7.61684 s, 143 MB/s
Formatting system.raw.expanded.img as ext4 filesystem
mke2fs 1.43.6 (29-Aug-2017)
Discarding device blocks: done
Creating filesystem with 265000 4k blocks and 66384 inodes
Filesystem UUID: 6f04eb04-681a-4175-851a-8b8ca4c43e13
Superblock backups stored on blocks:
32768, 98304, 163840, 229376
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
cp: error writing '/usr/local/Android_Images/Mounted/./system/priv-app/GoogleContacts/GoogleContacts.apk': No space left on device
cp: cannot create directory '/usr/local/Android_Images/Mounted/./system/priv-app/GoogleContacts/oat': No space left on device
cp: cannot create directory '/usr/local/Android_Images/Mounted/./system/priv-app/GoogleExtServicesRelease': No space left on device
cp: cannot create directory '/usr/local/Android_Images/Mounted/./system/priv-app/GoogleFeedbackRelease': No space left on device
cp: cannot create directory '/usr/local/Android_Images/Mounted/./system/priv-app/GoogleLoginServiceRelease': No space left on device
cp: cannot create directory '/usr/local/Android_Images/Mounted/./system/priv-app/GooglePackageInstallerRelease': No space left on device
cp: cannot create directory '/usr/local/Android_Images/Mounted/./system/priv-app/GoogleServicesFrameworkRelease': No space left on device
cp: cannot create directory '/usr/local/Android_Images/Mounted/./system/priv-app/HotwordEnrollmentOKGoogleCHROMEARC': No space left on device
cp: cannot create directory '/usr/local/Android_Images/Mounted/./system/priv-app/HotwordEnrollmentTGoogleCHROMEARC': No space left on device
cp: cannot create directory '/usr/local/Android_Images/Mounted/./system/priv-app/HotwordEnrollmentXGoogleCHROMEARC': No space left on device
cp: cannot create directory '/usr/local/Android_Images/Mounted/./system/priv-app/ManagedProvisioning': No space left on device
cp: cannot create directory '/usr/local/Android_Images/Mounted/./system/priv-app/MediaProvider': No space left on device
cp: cannot create directory '/usr/local/Android_Images/Mounted/./system/priv-app/MusicFX': No space left on device
cp: cannot create directory '/usr/local/Android_Images/Mounted/./system/priv-app/PhoneskyRelease': No space left on device
cp: cannot create directory '/usr/local/Android_Images/Mounted/./system/priv-app/PrebuiltGmsCoreRelease': No space left on device
cp: cannot create directory '/usr/local/Android_Images/Mounted/./system/priv-app/ProxyHandler': No space left on device
cp: cannot create directory '/usr/local/Android_Images/Mounted/./system/priv-app/Settings': No space left on device
cp: cannot create directory '/usr/local/Android_Images/Mounted/./system/priv-app/SettingsProvider': No space left on device
cp: cannot create directory '/usr/local/Android_Images/Mounted/./system/priv-app/Shell': No space left on device
cp: cannot create directory '/usr/local/Android_Images/Mounted/./system/priv-app/StatementService': No space left on device
cp: cannot create directory '/usr/local/Android_Images/Mounted/./system/priv-app/StorageManager': No space left on device
cp: cannot create directory '/usr/local/Android_Images/Mounted/./system/priv-app/SystemUI': No space left on device
cp: cannot create directory '/usr/local/Android_Images/Mounted/./system/priv-app/TelephonyProvider': 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
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: 688: cd: can't cd to /usr/local/Android_Images/Mounted/system/priv-app/SuperSU
cp: cannot create regular file '/usr/local/Android_Images/Mounted/system/priv-app/SuperSU/SuperSU.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: 290: cd: can't cd to /usr/local/Android_Images/Mounted/system/xbin
cp: cannot create regular file '/usr/local/Android_Images/Mounted/system/xbin/su': No such file or directory
cp: cannot create regular file '/usr/local/Android_Images/Mounted/system/xbin/daemonsu': No such file or directory
cp: cannot create regular file '/usr/local/Android_Images/Mounted/system/xbin/sugote': 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: 322: cd: can't cd to /usr/local/Android_Images/Mounted/system/bin/.ext
cp: cannot create regular file '/usr/local/Android_Images/Mounted/system/bin/.ext/.su': 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: 714: cd: can't cd to /usr/local/Android_Images/Mounted/system/xbin
cp: cannot create regular file '/usr/local/Android_Images/Mounted/system/xbin/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: error writing '/usr/local/Android_Images/Mounted/system/lib/libsupol.so': No space left on device
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: 740: 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: error writing '/usr/local/Android_Images/Mounted/system/etc/install-recovery.sh': No space left on device
Symlinking system/bin/install-recovery.sh to system/etc/install-recovery.sh
Adding system/bin/daemonsu-service.sh
cp: error writing '/usr/local/Android_Images/Mounted/system/bin/daemonsu-service.sh': No space left on device
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/../sedoWOQvh: 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.
I would like some help because I am unable to remove root verification on this version, when I run the command: sudo /usr/share/vboot/bin/make_dev_ssd.sh --remove_rootfs_verification --partitions
Unable to modify system!
In order to modify system files, the Chrome OS system partition needs to have been mounted writeable (i.e. rootfs verification disabled)."
I would like some help with this please.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.