You've already forked brave-origin-unlocker
mirror of
https://github.com/ObjectAscended/brave-origin-unlocker.git
synced 2026-06-21 12:42:34 +00:00
@@ -0,0 +1,3 @@
|
|||||||
|
dist/
|
||||||
|
.vscode/
|
||||||
|
.DS_Store
|
||||||
@@ -1,58 +1,79 @@
|
|||||||
# Brave Origin Windows Unlocker
|
# Brave Origin Unlocker
|
||||||
|
|
||||||
A TypeScript utility for unlocking Brave Origin features on Windows by modifying
|
A TypeScript utility for unlocking Brave Origin features on Windows and macOS by modifying the local application state.
|
||||||
the local application state.
|
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
This tool modifies the Brave Origin browser's local state configuration to
|
This tool modifies the Brave Origin browser's local state configuration to unlock premium features. It works by updating the `Local State` JSON file used by Brave to store user preferences and license validation status.
|
||||||
unlock premium features. It works by updating the `Local State` JSON file used
|
|
||||||
by Brave to store user preferences and license validation status.
|
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- ✅ Unlocks Brave Origin features
|
- ✅ Unlocks Brave Origin features
|
||||||
- ✅ Modifies purchase validation state
|
- ✅ Modifies purchase validation state
|
||||||
- ✅ Updates SKU credentials
|
- ✅ Updates SKU credentials
|
||||||
- ✅ Windows-compatible local data path handling
|
- ✅ Windows and macOS auto-detection & compatibility
|
||||||
|
- ✅ Easy execution and cross-compilation via Deno tasks
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
- **Deno** - Modern JavaScript/TypeScript runtime
|
- **Deno** - Modern JavaScript/TypeScript runtime
|
||||||
- **Windows OS** - Designed for Windows file paths
|
- **Windows OS or macOS** - Supported operating systems
|
||||||
- **Brave Origin** - The browser being modified
|
- **Brave Origin** - The browser being modified
|
||||||
- **File Write Permissions** - Access to `%LOCALAPPDATA%` directory
|
- **File Write Permissions** - Access to browser configurations
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
1. Install [Deno](https://deno.land/) if you haven't already
|
1. Install [Deno](https://deno.land/) if you haven't already.
|
||||||
2. Clone this repository:
|
2. Clone this repository:
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/ObjectAscended/brave-origin-windows-unlocker.git
|
git clone https://github.com/ObjectAscended/brave-origin-windows-unlocker.git
|
||||||
cd brave-origin-windows-unlocker
|
cd brave-origin-windows-unlocker
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## How to Run 🚀
|
||||||
|
|
||||||
|
The script automatically detects whether you are running on Windows or macOS. You can run the unlocker directly with:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
deno task unlock
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## How to Compile / Cross-Compile 📦
|
||||||
|
|
||||||
|
You can build standalone binaries for different operating systems and architectures using the pre-configured compilation tasks:
|
||||||
|
|
||||||
|
### Compile for Windows (x64)
|
||||||
|
```bash
|
||||||
|
deno task compile-win
|
||||||
|
```
|
||||||
|
|
||||||
|
### Compile for macOS Apple Silicon (ARM64)
|
||||||
|
```bash
|
||||||
|
deno task compile-mac-arm
|
||||||
|
```
|
||||||
|
|
||||||
|
### Compile for macOS Intel (x64)
|
||||||
|
```bash
|
||||||
|
deno task compile-mac-x64
|
||||||
|
```
|
||||||
|
|
||||||
|
These tasks will output the built binaries into the `dist/` directory.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Pre-Bundled Deno Binaries 🎉
|
## Pre-Bundled Deno Binaries 🎉
|
||||||
|
|
||||||
In our latest releases, we offer **pre-bundled Deno binaries** that make running
|
In our latest releases, we offer **pre-bundled Deno binaries** that make running the unlocker easier than ever! 🚀 You can download them from our [latest release page](https://github.com/ObjectAscended/brave-origin-windows-unlocker/releases/latest). These binaries ensure a smooth setup and save you time.
|
||||||
the Windows unlocker easier than ever! 🚀 You can download them from our
|
|
||||||
[latest release page](https://github.com/ObjectAscended/brave-origin-windows-unlocker/releases/latest).
|
|
||||||
These binaries ensure a smooth setup and save you time, so you can focus on
|
|
||||||
enjoying your experience without unnecessary hassle! 🕒
|
|
||||||
|
|
||||||
## Why Run the Windows Unlocker Instead of WSL? 🤔
|
## Why Run the Unlocker Natively? 🤔
|
||||||
|
|
||||||
Running the Windows unlocker natively is typically a better choice than running
|
Running the unlocker natively is typically a better choice than running a browser inside virtual/emulated environments. Here's why:
|
||||||
a browser inside WSL. Here's why:
|
|
||||||
|
|
||||||
1. **Performance**: The native Windows experience generally offers better
|
1. **Performance**: The native experience generally offers better performance than emulated environments. ⚡
|
||||||
performance than emulated environments like WSL. ⚡
|
2. **Simplicity**: You avoid complex setups and configurations, making it more straightforward for users of all levels. 🛠️
|
||||||
2. **Simplicity**: You avoid complex setups and configurations, making it more
|
3. **Compatibility**: Some features and functionalities might only work seamlessly in a native environment, ensuring you get the most out of your tools. 🔗
|
||||||
straightforward for users of all levels. 🛠️
|
4. **User Experience**: Enjoy a more intuitive interface and fewer problems managing dependencies. 😊
|
||||||
3. **Compatibility**: Some features and functionalities might only work
|
|
||||||
seamlessly in a Windows environment, ensuring you get the most out of your
|
|
||||||
tools. 🔗
|
|
||||||
4. **User Experience**: Enjoy a more intuitive interface and fewer problems
|
|
||||||
managing dependencies. 😊
|
|
||||||
|
|
||||||
Enjoy using our tool! 🎈
|
Enjoy using our tool! 🎈
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"tasks": {
|
||||||
|
"unlock": "deno run --allow-env --allow-read --allow-write unlock.ts",
|
||||||
|
"compile-win": "deno compile --allow-env --allow-read --allow-write --target x86_64-pc-windows-msvc --output dist/unlock-win.exe unlock.ts",
|
||||||
|
"compile-mac-arm": "deno compile --allow-env --allow-read --allow-write --target aarch64-apple-darwin --output dist/unlock-mac-arm unlock.ts",
|
||||||
|
"compile-mac-x64": "deno compile --allow-env --allow-read --allow-write --target x86_64-apple-darwin --output dist/unlock-mac-x64 unlock.ts"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,15 +1,38 @@
|
|||||||
const localAppData = Deno.env.get("LOCALAPPDATA");
|
const os = Deno.build.os;
|
||||||
|
|
||||||
|
let localStatePathPattern: (version: string) => string;
|
||||||
|
|
||||||
|
if (os === "windows") {
|
||||||
|
const localAppData = Deno.env.get("LOCALAPPDATA");
|
||||||
|
if (!localAppData) {
|
||||||
|
console.error("Error: LOCALAPPDATA environment variable not found.");
|
||||||
|
Deno.exit(1);
|
||||||
|
}
|
||||||
|
localStatePathPattern = (version) =>
|
||||||
|
`${localAppData}\\BraveSoftware\\${version}\\User Data\\Local State`;
|
||||||
|
} else if (os === "darwin") {
|
||||||
|
const homeDir = Deno.env.get("HOME");
|
||||||
|
if (!homeDir) {
|
||||||
|
console.error("Error: HOME environment variable not found.");
|
||||||
|
Deno.exit(1);
|
||||||
|
}
|
||||||
|
localStatePathPattern = (version) =>
|
||||||
|
`${homeDir}/Library/Application Support/BraveSoftware/${version}/Local State`;
|
||||||
|
} else {
|
||||||
|
console.error(`Error: Unsupported operating system: ${os}`);
|
||||||
|
Deno.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
const versions = ["Brave-Origin", "Brave-Origin-Beta", "Brave-Origin-Nightly"];
|
const versions = ["Brave-Origin", "Brave-Origin-Beta", "Brave-Origin-Nightly"];
|
||||||
let foundAny = false;
|
let foundAny = false;
|
||||||
|
|
||||||
for (const version of versions) {
|
for (const version of versions) {
|
||||||
const localStatePath =
|
const localStatePath = localStatePathPattern(version);
|
||||||
`${localAppData}\\BraveSoftware\\${version}\\User Data\\Local State`;
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const localState = JSON.parse(await Deno.readTextFile(localStatePath));
|
const localState = JSON.parse(await Deno.readTextFile(localStatePath));
|
||||||
|
|
||||||
|
localState.brave = localState.brave || {};
|
||||||
localState.brave.origin = { purchase_validated: true };
|
localState.brave.origin = { purchase_validated: true };
|
||||||
|
|
||||||
localState.skus = {
|
localState.skus = {
|
||||||
|
|||||||
Reference in New Issue
Block a user