Skip to content

Instantly share code, notes, and snippets.

@uchks
Last active October 5, 2022 07:41
Show Gist options
  • Save uchks/0ba920bf39b18cad7217250171feaf74 to your computer and use it in GitHub Desktop.
Save uchks/0ba920bf39b18cad7217250171feaf74 to your computer and use it in GitHub Desktop.
A proper guide to install the Kernel Discord Modification, because all of the other guides are ass.

Kernel Discord Installation.md 👋
A proper guide to install the Kernel Discord Modification, because all of the other guides are ass.

Contents:
Windows Installation
macOS Installation
Linux Installation - Not Available
OpenAsar
Compatibility Plugins

Windows Installation

I'm going to be using Discord Canary as the example for installing Kernel, adjust as needed when following through this guide.

Pre-Requisites:
Discord

I. Naviagate to Installer GUI Releases Page & download Kernel-Windows.exe.
II. Open Kernel-Windows.exe and click Install.
III. Under Suggested Applications click the + symbol next to your Discord installation.
IV. Create a "Kernel path".
IV-I. For creating a "Kernel path", I used the Discord directory. Press Win Key + R and the Run prompt will appear.
IV-II. Put in %localappdata%\DiscordCanary and click OK.
IV-III. Create a new folder that'd be recognizable, I created a folder named "kernel".
V. After creating a "Kernel path", click Browse, and find your kernel path, Select Folder.
V-I. If you did put your folder in the Discord directory, just paste %localappdata%\DiscordCanary in the Address Bar and do the above.
VI. Click Continue and ensure you have Download kernel.asar and Create packages folder toggled, and click Install.

Kernel should be successfully installed!
Want to ensure it? Open your Discord Application and Toggle Developer Tools.
Open the console, and scroll all the way up until you see something like [Kernel] Loading packages....
This means you've successfully installed Kernel!

macOS Installation

I'm going to be using Discord Canary as the example for installing Kernel, adjust as needed when following through this guide.

Pre-Requisites:
Discord Git
Node.js
pnpm - Install via npm i -g pnpm when Node.js is installed

I. Navigate to Installer-CLI Releases Page & download kernel-installer-x86_64-macos.
I-II. Once downloaded, I recommend renaming the file to something like installer, however, it's not necessary.
II. Navigate to Electron Releases Page & download kernel.asar.
III. Navigate to your "Applications" folder, right click on your Discord application, and click "Show Package Contents"
IV. Open the "Contents folder, and keep it open.
IV-II. Personally, I created a folder called "Kernel" inside the "Contents" folder, just to hold kernel.asar & kernel-installer-x86_64-macos there, for convenience sakes.
IV-III. You do not need to hold the files there, but keep kernel.asar & kernel-installer-x86_64-macos in a directory you'll remember.
V. Now, open a Terminal window in the folder you contain kernel-installer-x86_64-macos and run the following commands:
chmod 755 kernel-installer-x86_64-macos (This command makes the installer an executable)
kernel-installer-x86_64-macos -i "/Applications/Discord Canary.app/Contents" -k "/Applications/Discord Canary.app/Contents/Kernel" (This command installs Kernel, replace the directories as seen fit)

Kernel should be successfully installed!
Want to ensure it? Open your Discord Application and Toggle Developer Tools.
Open the console, and scroll all the way up until you see something like [Kernel] Loading packages....
This means you've successfully installed Kernel!

OpenAsar

This is completely optional, however, OpenAsar is an open-source alternative to Discord's app.asar. A rewrite to improve speed & remove telemetry. This section is going to assume you've already got Kernel installed and injected, so if you haven't already, please do so.

I. Quit your Discord version.
II. Navigate to OpenAsar, click Install, and download for whichever client you're using. app.asar should be downloaded, rename it to app-original.asar.
III. Navigate to your "Applications" folder, right click on your Discord application, and click "Show Package Contents"
IV. Open the "Contents folder, and open the "Resources" folder.
IV-II. In this folder, you should already have a file named app-original.asar, I suggest renaming it to something like app-og.asar so you have a backup of the original.
V. Move your download OpenAsar app-original.asar to the "Resources" folder.

OpenAsar should now be installed! Want to ensure it? Open your Discord client and navigate to User Settings and scroll down the left column until you see something like Host 0.0.284 | OpenAsar .........
You've successfully installed OpenAsar.

Compatibility Plugins

Kernel has compatibility layers, so you can use the plugins from all of your other favourite clients like BetterDiscord & Powercord.

Links:
pc-compat (Powercord Compatibility Layer)
bd-compat (BetterDiscord Compatibility Layer)

Installing compatibility layers are simple.
I. Use Git to clone one of the compatibility layer repositories to the Packages folder in your Kernel directory.
i.e. git clone https://github.com/username/repository

That's it. You've already installed the compatibility layer. Just restart Discord and check your settings to ensure it installed correctly.

@uchks
Copy link
Author

uchks commented Jun 22, 2022

This is still a "work-in-progress", however, I would like to believe this is still far easier to understand compared to previous guides, at least for macOS users.

@uchks
Copy link
Author

uchks commented Aug 21, 2022

Added Windows Installation, thankfully they use a GUI installation for Windows users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment