added support for UV-K6, K5(8) and UV-5R Plus

This commit is contained in:
matt 2023-08-02 16:15:25 +02:00
parent e042d2b7f3
commit 3d35059aba
3 changed files with 15 additions and 5 deletions

View File

@ -2,7 +2,7 @@
## Introduction ## Introduction
Web-based client-side Quansheng UV-K5 firmware patcher written in Javascript and HTML using [Bootstrap 4.6.0](https://getbootstrap.com/docs/4.6/getting-started/introduction/), jQuery and parts of the [SB Admin 2 Theme](https://startbootstrap.com/theme/sb-admin-2). Web-based client-side Quansheng firmware patcher written in Javascript and HTML using [Bootstrap 4.6.0](https://getbootstrap.com/docs/4.6/getting-started/introduction/), jQuery and parts of the [SB Admin 2 Theme](https://startbootstrap.com/theme/sb-admin-2).
It is based on the discoveries by the many contributors in the [uvmod-kitchen](https://github.com/amnemonic/Quansheng_UV-K5_Firmware/tree/main/uvmod_kitchen) and implements the same functionality in a modular and flexible javascript structure. It is based on the discoveries by the many contributors in the [uvmod-kitchen](https://github.com/amnemonic/Quansheng_UV-K5_Firmware/tree/main/uvmod_kitchen) and implements the same functionality in a modular and flexible javascript structure.
Visitors can generate a patched firmware image by selecting the desired patches. Patches modify the firmware on a binary level and can accept user input to customize variables. A custom base image can be supplied to allow support for mods that are compiled and linked directly into the firmware. Visitors can generate a patched firmware image by selecting the desired patches. Patches modify the firmware on a binary level and can accept user input to customize variables. A custom base image can be supplied to allow support for mods that are compiled and linked directly into the firmware.

View File

@ -8,8 +8,7 @@
<meta property="og:title" content=UVMOD - Online Quansheng Firmware Patcher> <meta property="og:title" content=UVMOD - Online Quansheng Firmware Patcher>
<meta property="og:site_name" content=UVMOD> <meta property="og:site_name" content=UVMOD>
<meta property="og:url" content=https://whosmatt.github.io/uvmod /> <meta property="og:url" content=https://whosmatt.github.io/uvmod />
<meta property="og:description" content="Web-based tool to generate a custom modded firmware for the Quansheng UV-K5 <meta property="og:description" content="Web-based tool to generate customizable modded firmware for the various Quansheng handheld radios.">
handheld radio">
<meta property="og:type" content=website> <meta property="og:type" content=website>
<meta property="og:image" content=https://whosmatt.github.io/uvmod/img/banner.webp> <meta property="og:image" content=https://whosmatt.github.io/uvmod/img/banner.webp>
@ -140,6 +139,11 @@
</div> </div>
<span id="useDefaultFirmwareSpan" class="form-control" readonly>Using stock v26 firmware</span> <span id="useDefaultFirmwareSpan" class="form-control" readonly>Using stock v26 firmware</span>
</div> </div>
<select class="form-control mt-2" id="firmwareVersionSelect">
<option value="2">Patch for UV-K5</option>
<option value="3">Patch for UV-K6, UV-K5(8)</option>
<option value="4">Patch for UV-5R Plus</option>
</select>
</div> </div>
<div class="mt-2"> <div class="mt-2">

View File

@ -70,9 +70,15 @@ function patch() {
.then((encoded_firmware) => { .then((encoded_firmware) => {
const unpacked_firmware = unpack(encoded_firmware); const unpacked_firmware = unpack(encoded_firmware);
const versionInfoString = new TextDecoder().decode(versionInfo.subarray(0, versionInfo.indexOf(0))); log(`Detected firmware version: ${new TextDecoder().decode(versionInfo.subarray(0, versionInfo.indexOf(0)))}`);
log(`Detected firmware version: ${versionInfoString}`);
// Adjust firmware version to allow cross flashing
const newVersionChar = document.getElementById("firmwareVersionSelect").value;
const newVersionCharCode = newVersionChar.charCodeAt(0);
versionInfo[0] = newVersionCharCode;
log(`Modified firmware version: ${new TextDecoder().decode(versionInfo.subarray(0, versionInfo.indexOf(0)))}`);
// Apply mods to unpacked firmware
const patched_firmware = applyMods(unpacked_firmware); const patched_firmware = applyMods(unpacked_firmware);
// Check size // Check size