-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
editing hosts file on HP Chromebook X2 71.0.3578.27 #9
Comments
So it looks like the rooting script needs updating a bit. Hopefully I'll get that sorted quite soon. In the meantime, I took out my OG Flip (arm) on v72 and just tried the script again on this device for the first time in a little while. I did notice an error from sed near the start, as it couldn't find /etc/init/arc-setup-env. It turns out that the location on the filesystem of the pair of flags that tell /usr/sbin/arc-setup to set up a writable container mount and to make Android boot with ro.debuggable has been recently changed (again), and, at least in v72, these are now in /usr/share/arc-setup/config.json. I guess something like the following has to be added to the script now.
After running the above in the CrOS shell, rebooting CrOS, and then also changing the 'ro' to 'rw' in init.rc and rebooting Android
Everything was then writable as normal. Hopefully that'll be the same for you? (Although I wouldn't be surprised if there may be something different in v71)... Oh, and regarding the issue with the hosts, not too sure about that - I do remember having trouble with a relative symlink there at some point myself, but I can't recall the specifics now, unfortunately. I think it might have been problematic having a relative symlink that's pointing outside of the container, maybe? It was a while back now and I can't remember now whether I got it working or if I just dropped the attempt in favor of figuring out how to get the system writable again. |
Editing I haven't been submitting pull requests against the script as I figured that you might want to merge the two branches and get things up to speed in the future. Perhaps it's worth waiting for v73 to hit dev? My understanding is that canary on some devices is running Android Pie in ARC++ and I assume some further tweaks will be needed when that change lands. As for editing init.rc to mount rootfs as rw, I presume this can be done in the script and applied to |
Apologies for the delayed response. I was waiting until after I'd had a proper chance to look into why the symlinked hosts file wasn't working. Unfortunately I haven't been able to figure it out yet either.
My initial thought was that it could be to do with the ongoing "Hardening against malicious stateful data" efforts, which have lately included much blocking of symlinks etc. on the stateful partition, with some whitelisting. I'm not too familiar with some of the vagaries of the cryptohome mount flow etc., so am unsure about this at this point. The arc++ container-bundle readme has the following:
If the issue were caused by the symlink blocking policy, then per /sbin/cros_startup (source) we should normally be able to manage it by either creating /usr/share/cros/startup/disable_stateful_security_hardening, or maybe just adding the correct file path into the file located at /usr/share/cros/startup/symlink_exceptions/arc-symlink-exceptions.txt However, those didn't work for me, and I am still unsure about whether this actually is the cause of the issue.
Yes, I imagine some changes may be needed, and as you suggest, once the dust settles on P, it might be a good time to tidy up the script/merge the branches and such. In the meantime, if it isn't too much trouble, please feel free to let me know of any major issues or potential improvements though.
Oh yes, sure. I've added this to the script now. I was just intending to emphasise in my comment for anyone else reading at the time, that the config.json fix wouldn't work without also doing the init.rc fix. |
Is there an updated script to address these issues? |
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.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:
Is ignored and I get the following:
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.
The text was updated successfully, but these errors were encountered: