diff --git a/README.md b/README.md index dda4141..2387fd4 100644 --- a/README.md +++ b/README.md @@ -3,41 +3,46 @@ ## Quick: Manual intervention When opening the browser using the backup, these are the only need actions: + - brave://settings/getStarted - - Get started > On startup > Open the New Tab Page + - Get started > On startup > Open the New Tab Page - brave://settings/search - - Set Search engine + - Set Search engine ## Explanation Goal: Backup Brave Settings while disabling unnecessary features. Resources at: + - Brave: https://support.brave.app/hc/en-us/articles/360039248271-Group-Policy - Google: https://chromeenterprise.google/intl/en_us/policies/ ### Using Group-Based Policies (GBP) There are two groups: - - Mandatory (system-wide) <- use this one - - Stored at `/Library/Managed Preferences/com.brave.Browser.plist` - - It is an editable file. This tool can be used too `PlistBuddy` - - Commands: - ``` - sudo mkdir -p "/Library/Managed Preferences" - sudo chown root:wheel "/Library/Managed Preferences" - sudo chmod 755 "/Library/Managed Preferences" - # Run this see the effect - sudo killall cfprefsd - ``` - - Recommended (user-level) - - Stored at: `~/Library/Preferences/com.brave.Browser.plist` - - It is a binary and can be used via: - - `defaults read com.brave.Browser` - - `defaults delete com.brave.Browser` - - `defaults write com.brave.Browser DefaultSearchProviderEnabled -bool true` - - `defaults import com.brave.Browser ./com.brave.Browser.plist` +- Mandatory (system-wide) <- use this one + - Stored at `/Library/Managed Preferences/com.brave.Browser.plist` + - It is an editable file. This tool can be used too `PlistBuddy` + - Commands: + + ``` + sudo mkdir -p "/Library/Managed Preferences" + sudo chown root:wheel "/Library/Managed Preferences" + sudo chmod 755 "/Library/Managed Preferences" + + # Run this see the effect + sudo killall cfprefsd + ``` + +- Recommended (user-level) + - Stored at: `~/Library/Preferences/com.brave.Browser.plist` + - It is a binary and can be used via: + - `defaults read com.brave.Browser` + - `defaults delete com.brave.Browser` + - `defaults write com.brave.Browser DefaultSearchProviderEnabled -bool true` + - `defaults import com.brave.Browser ./com.brave.Browser.plist` Some policies only work if the instance is managed via MDM. Because of that, we have to rely on preferences too. @@ -47,11 +52,13 @@ Because of that, we have to rely on preferences too. This method is not recommened neither is documented; however, there is no other alternative. Whenever the browser is opened for the first time, this dir is created and populated: + - `~/Library/Application Support/BraveSoftware/Brave-Browser` Note: For testing purposes, after everything is backed up, feel free to completely delete it. Inside, there are four main files: + - `Brave-Browser/First Run` (empty file used as flag to skip "Welcome page") - `Brave-Browser/Local State` - `Brave-Browser//Preferences` @@ -65,6 +72,7 @@ These hashes change based on the machine, so be aware. ## How does the backup work? There are a few files: + ``` . ├── _assets All settings. @@ -88,6 +96,7 @@ There are a few files: ``` First, make sure to delete these files: + ``` rm -rf ./assets rm -rf '~/Library/Application Support/BraveSoftware/Brave-Browser' @@ -119,82 +128,93 @@ following the structure `./brave_debug.sh `. ## All preferences files - "Brave-Browser/Local State" - - Create empty file "Brave-Browser/First Run" - - Check asset file + - Create empty file "Brave-Browser/First Run" + - Check asset file - "Brave-Browser/Default/Preferences" - - Check asset file + - Check asset file - "Brave-Browser/Default/Secure Preferences" - - Search engine is set in "Default/Preferences" but unless - it is hashed in "Default/Secure Preferences", browser does not set it. - - `restore_on_startup: 5` sets "On startup: Open the New Tab Page". It needs to be hashed too. - ``` - { - "session": { - "restore_on_startup": 5 - } + - Search engine is set in "Default/Preferences" but unless + it is hashed in "Default/Secure Preferences", browser does not set it. + - `restore_on_startup: 5` sets "On startup: Open the New Tab Page". It needs to be hashed too. + ``` + { + "session": { + "restore_on_startup": 5 } - ``` + } + ``` ## All settings mapped --- + Brave 1.83.118 (Official Build) (arm64) Chromium: 141.0.7390.108 + --- ### Get started + - On startup >> "Open the New Tag page" - - [Secure Preferences]:session.restore_on_startup + - (Secure Preferences): session.restore_on_startup - New tab page shows >> "Blank page" - - brave.new_tab_page.shows_options + - brave.new_tab_page.shows_options ### Appearance + - Show tab groups in bookmarks >> OFF - - bookmark_bar.show_tab_groups + - bookmark_bar.show_tab_groups - Automatically pin new tab groups created on any device to the bookmarks >> OFF - - auto_pin_new_tab_groups + - auto_pin_new_tab_groups ### Shields + - Show the number of blocked items on the Shields icon >> OFF - - brave.shields.stats_badge_visible + - brave.shields.stats_badge_visible - Store contact information for future broken site reports >> OFF - - brave.webcompat.report.contact_info: "" (empty string) - - brave.webcompat.report.enable_save_contact_info: false + - brave.webcompat.report.contact_info: "" (empty string) + - brave.webcompat.report.enable_save_contact_info: false ### Privacy and security + - Only resolve .onion addresses in Tor windows >> OFF - - tor.onion_only_in_tor_windows + - tor.onion_only_in_tor_windows - Allow privacy-preserving product analytics (P3A) >> OFF - - [Local State]:brave.p3a.enabled + - (Local State): brave.p3a.enabled - Automatically send diagnostic reports >> OFF - - [Local State]:brave.user_experience_metrics.reporting_enabled + - (Local State): brave.user_experience_metrics.reporting_enabled ### Search engine + - Improve search suggestions >> OFF - - search.suggest_enabled + - search.suggest_enabled ### Extensions + - Media Router >> OFF - - media_router.enable_media_router + - media_router.enable_media_router - Widevine >> ON - - brave.widevine_opted_in + - brave.widevine_opted_in ### Autofill and passwords + - (Passwords.Settings) Sign in automatically >> OFF - - credentials_enable_autosignin + - credentials_enable_autosignin - Allow auto-fill in private windows >> OFF - - brave.autofill_private_windows + - brave.autofill_private_windows ### Languages + - Websites in your languages >> "en" - - intl.accept_languages - - intl.selected_languages + - intl.accept_languages + - intl.selected_languages ### System -- Memory Saver >> ON - - [Local State]:performance_tuning.high_efficiency_mode -- Energy Saver >> OFF - - [Local State]:performance_tuning.battery_saver_mode + +- Memory Saver >> ON + - (Local State): performance_tuning.high_efficiency_mode +- Energy Saver >> OFF + - (Local State): performance_tuning.battery_saver_mode