This is a Python program which is able to modify the device policies on a Chrome OS system, based on lilac.
You must have Python 3 installed on Linux, with support for virtual environments and pip.
Clone this repository, and run the following commands:
python3 -m venv .venv
source .venv/bin/activate
pip3 install -r requirements.txt
usage: main.py [-h] {view,patch} ...
positional arguments:
{view,patch}
view Read the device settings without modifying anything.
patch Patch an existing device policy file.
options:
-h, --help show this help message and exit
- Make sure you are in developer mode and have rootfs verification off.
- Add
--disable-policy-key-verification
to the end of/etc/chrome_dev.conf
. - Edit
/etc/lsb-release
to change the release channel totestimage-channel
. - Run
main.py
with the correct arguments, specifying any policy files that are in/var/lib/devicesettings/
. - Copy the public key to
/var/lib/devicesettings/owner.key
. - Overwrite the original policy files with the patched versions.
- Locate the user data directory (this defaults to
~/.config/chromium
) or explicitly set it with--user-data-dir=DATA_DIR
. - Run
main.py
, specifying the policy file atDATA_DIR/stub_device_policy
. - Overwrite the original policy with the patched version.
- Copy the public key to
DATA_DIR/stub_owner.key
.
This repository is licensed under the GNU GPL v3.
ading2210/policyedit - A program to modify Chrome OS device policies
Copyright (C) 2024 ading2210
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.