Skip to content

Commit

Permalink
Replace uninstall script with chromebrew
Browse files Browse the repository at this point in the history
  • Loading branch information
uberhacker committed Nov 13, 2017
1 parent b9b5abe commit e590e0a
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 8 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Useful bash utility scripts for Chrome/Chromium OS systems.

## Overview
[Neverware](https://www.neverware.com/) disables the ability to perform a powerwash in [CloudReady](https://www.neverware.com/#getcloudready) and [Google](https://www.google.com/) disables execute permissions on certain directories to protect [Chromium OS](https://www.chromium.org/chromium-os). These scripts are useful to [powerwash](https://support.google.com/chromebook/answer/183084?hl=en) your Chromebook and reset to the factory settings, uninstall [Chromebrew](https://github.com/skycocker/chromebrew) if that is installed or mount your filesystem to be read/write.
[Neverware](https://www.neverware.com/) disables the ability to perform a [powerwash](https://support.google.com/chromebook/answer/183084?hl=en) in [CloudReady](https://www.neverware.com/#getcloudready) and [Google](https://www.google.com/) disables execute permissions on certain directories to protect [Chromium OS](https://www.chromium.org/chromium-os). These scripts are useful to [powerwash](https://support.google.com/chromebook/answer/183084?hl=en) your [Chromebook](https://www.google.com/chromebook/) and reset to the factory settings, install, remove or update [Chromebrew](https://github.com/skycocker/chromebrew) or remove rootfs verification and mount your filesystem to be read/write.

## WARNING
If used improperly, these scripts can render your system useless. Please proceed with caution and do not execute unless you know what you're doing. Review the `References` section below to understand the impact of the changes. As true of any open source software, I'm not responsible if you brick your system.
Expand All @@ -13,15 +13,20 @@ $ git clone https://github.com/uberhacker/chromebrew-scripts
$ sudo cp chromebrew-scripts/* /usr/local/bin
```
## Usage
Install Chromebrew: `$ chromebrew -i | --install`

Remove Chromebrew: `$ chromebrew -r | --remove`

Update Chromebrew: `$ chromebrew -u | --update`

Reset to factory settings: `$ powerwash`

Remove rootfs verification: `$ rootfs`

Mount the filesystem read/write: `$ rw`

Uninstall Chromebrew: `$ uninstall`

## References
- https://support.google.com/chromebook/answer/183084?hl=en
- https://neverware.zendesk.com/hc/en-us/articles/115000765287--Powerwash-via-the-cmd-line
- https://www.chromium.org/chromium-os/poking-around-your-chrome-os-device#TOC-Making-changes-to-the-filesystem
- https://sites.google.com/site/cr48ite/getting-technical/remove-rootfs-verification-make-read-write
32 changes: 32 additions & 0 deletions chromebrew
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash
VALID=
if test $1; then
OPTS="-i --install -r --remove -u --update"
for o in $OPTS; do
if [ $o == $1 ]; then
VALID=1
break
fi
done
fi
if [ -z "$VALID" ]; then
echo "Usage: chromebrew -i | --install | -r | --remove | -u | --update"
exit 1
fi
if [[ $1 == "-i" || $1 == "--install" ]]; then
command -v crew > /dev/null && { echo "chromebrew is currently installed."; exit 1; }
rm -f install.sh
curl -Ls git.io/vddgY -o install.sh && yes | bash install.sh
else
command -v crew > /dev/null || { echo "chromebrew is not installed. To install, execute 'chromebrew -i | --install'."; exit 1; }
fi
if [[ $1 == "-r" || $1 == "--remove" ]]; then
echo -n "WARNING! Are you sure you want to uninstall crew? [y/N]: "; read -n1 UNINSTALL
if [ "$UNINSTALL" == "y" ]; then
sudo dev_install --reinstall -y
fi
fi
if [[ $1 == "-u" || $1 == "--update" ]]; then
crew update
yes | crew upgrade
fi
5 changes: 0 additions & 5 deletions uninstall

This file was deleted.

0 comments on commit e590e0a

Please sign in to comment.