Skip to content
Scarlett Yuko edited this page Mar 13, 2023 · 2 revisions

Welcome to the Pollen Wiki!

This Wiki will teach you how to modify Pollen to your liking. I would recommend doing this so Pollen can be full to your liking.

Note

device policies cannot be changed. So any policy starting device cannot be modified

Contribution

  • If you plan on making your modified version of Pollen public please follow these guidelines!
  • Make the code Free and Open-Source on GitHub
  • Fork the original Pollen repo on GitHub then paste the modified code
  • Do not sell it
  • Give Credit
    • You can do this by including this in the Pollen script echo "# Pollen - https://github.com/mercuryworkshop/pollen #"

Getting Your Policies

  • Method I
    • If your school hasn't blocked chrome://policy go there and click "Export to JSON"
    • Open the JSON file you downloaded
  • Method II
    • If it is blocked run this script
    mkdir -p /tmp/overlay/etc/opt/chrome/policies/managed
    echo '{"URLBlocklist": []}' > /tmp/overlay/etc/opt/chrome/policies/managed/policy.json
    cp -a -L /etc/* /tmp/overlay/etc 2> /dev/null
    mount --bind /tmp/overlay/etc /etc
    
    • Then do method I

Editing Policies

  • Open the policies.json file
  • Remove everything that isn't in
    "chromePolicies": {
    }
    
    • Remove all the policies you would not like to change
    • Remove these from the policies you would like the change
      "level": "",
      "scope": "",
      "source": "",
      
    • Modify "value": to the correctly modified value
    • Remove the formatting from the policies. It should like something like this after all these steps (Just an example of one policy) "AllowDeletingBrowserHistory": { "value": true }
    • Note add a "," to the end of every policy until the last one

Modifying Pollen

  • Copy the modified policy you made
  • In Crosh install Pollen into /home/
  • Run the command cd home && nano pollen.sh
  • Paste the copied policies into echo '{*paste policies here*}' > /tmp/overlay/etc/opt/chrome/policies/managed/policy.json
  • Save file
  • Bam you modified Pollen!

Example

  • Here's an example of modified Pollen
#!/bin/bash

if [ $(id -u) -ne 0 ]; then
    echo "Run this script as root (sudo)"
    exit
fi

echo "+########################################################+"
echo "# Welcome To Modified Pollen (v Version Number Here)!    #"
echo "# Descriptio                                             #"
echo "# -------------------------------------------------------#"
echo "# Credit:                                                #"
echo "# Your Name - Role Description                           #"
echo "# Pollen - https://github.com/mercuryworkshop/pollen     #"
echo "+########################################################+"

mkdir -p /tmp/overlay/etc/opt/chrome/policies/managed
echo '{"URLBlocklist": []", AllowDeletingBrowserHistory": true' > /tmp/overlay/etc/opt/chrome/policies/managed/policy.json
cp -a -L /etc/* /tmp/overlay/etc 2> /dev/null
mount --bind /tmp/overlay/etc /etc

echo ""
echo "Custom Pollen has been successfully applied!"
Clone this wiki locally