diff --git a/assets/img/after_patch.png b/assets/images/after_patch.png similarity index 100% rename from assets/img/after_patch.png rename to assets/images/after_patch.png diff --git a/assets/img/aik.png b/assets/images/aik.png similarity index 100% rename from assets/img/aik.png rename to assets/images/aik.png diff --git a/assets/img/alias_off.png b/assets/images/alias_off.png similarity index 100% rename from assets/img/alias_off.png rename to assets/images/alias_off.png diff --git a/assets/img/append.png b/assets/images/append.png similarity index 100% rename from assets/img/append.png rename to assets/images/append.png diff --git a/assets/img/arg.png b/assets/images/arg.png similarity index 100% rename from assets/img/arg.png rename to assets/images/arg.png diff --git a/assets/img/banana.png b/assets/images/banana.png similarity index 100% rename from assets/img/banana.png rename to assets/images/banana.png diff --git a/assets/img/default_prop.png b/assets/images/default_prop.png similarity index 100% rename from assets/img/default_prop.png rename to assets/images/default_prop.png diff --git a/assets/img/default_prop_edited.png b/assets/images/default_prop_edited.png similarity index 100% rename from assets/img/default_prop_edited.png rename to assets/images/default_prop_edited.png diff --git a/assets/img/devpref.png b/assets/images/devpref.png similarity index 100% rename from assets/img/devpref.png rename to assets/images/devpref.png diff --git a/assets/img/disable_lmk.png b/assets/images/disable_lmk.png similarity index 100% rename from assets/img/disable_lmk.png rename to assets/images/disable_lmk.png diff --git a/assets/img/docker_abomination.png b/assets/images/docker_abomination.png similarity index 100% rename from assets/img/docker_abomination.png rename to assets/images/docker_abomination.png diff --git a/assets/img/docker_build.png b/assets/images/docker_build.png similarity index 100% rename from assets/img/docker_build.png rename to assets/images/docker_build.png diff --git a/assets/img/docker_installer.png b/assets/images/docker_installer.png similarity index 100% rename from assets/img/docker_installer.png rename to assets/images/docker_installer.png diff --git a/assets/img/docker_patch.png b/assets/images/docker_patch.png similarity index 100% rename from assets/img/docker_patch.png rename to assets/images/docker_patch.png diff --git a/assets/img/edl_bootog.png b/assets/images/edl_bootog.png similarity index 100% rename from assets/img/edl_bootog.png rename to assets/images/edl_bootog.png diff --git a/assets/img/f5-selinux.png b/assets/images/f5-selinux.png similarity index 100% rename from assets/img/f5-selinux.png rename to assets/images/f5-selinux.png diff --git a/assets/img/kosher-sparkler-350px.jpg b/assets/images/kosher-sparkler-350px.jpg similarity index 100% rename from assets/img/kosher-sparkler-350px.jpg rename to assets/images/kosher-sparkler-350px.jpg diff --git a/assets/img/kosher-sparkler.jpg b/assets/images/kosher-sparkler.jpg similarity index 100% rename from assets/img/kosher-sparkler.jpg rename to assets/images/kosher-sparkler.jpg diff --git a/assets/img/leo-counterfeit.png b/assets/images/leo-counterfeit.png similarity index 100% rename from assets/img/leo-counterfeit.png rename to assets/images/leo-counterfeit.png diff --git a/assets/img/listall.png b/assets/images/listall.png similarity index 100% rename from assets/img/listall.png rename to assets/images/listall.png diff --git a/assets/img/0x00-3000.webp b/assets/images/press/0x00-3000.webp similarity index 100% rename from assets/img/0x00-3000.webp rename to assets/images/press/0x00-3000.webp diff --git a/assets/img/0x00-600.webp b/assets/images/press/0x00-600.webp similarity index 100% rename from assets/img/0x00-600.webp rename to assets/images/press/0x00-600.webp diff --git a/assets/img/0x01-1000.png b/assets/images/press/0x01-1000.png similarity index 100% rename from assets/img/0x01-1000.png rename to assets/images/press/0x01-1000.png diff --git a/assets/img/nokia_6300_4G-back-LightCharcoal.png b/assets/images/press/nokia_6300_4G-back-LightCharcoal.png similarity index 100% rename from assets/img/nokia_6300_4G-back-LightCharcoal.png rename to assets/images/press/nokia_6300_4G-back-LightCharcoal.png diff --git a/assets/img/nokia_6300_4G-emotional-Range.png b/assets/images/press/nokia_6300_4G-emotional-Range.png similarity index 100% rename from assets/img/nokia_6300_4G-emotional-Range.png rename to assets/images/press/nokia_6300_4G-emotional-Range.png diff --git a/assets/img/nokia_6300_4G-front-LightCharcoal.png b/assets/images/press/nokia_6300_4G-front-LightCharcoal.png similarity index 100% rename from assets/img/nokia_6300_4G-front-LightCharcoal.png rename to assets/images/press/nokia_6300_4G-front-LightCharcoal.png diff --git a/assets/img/nokia_6300_4G-side-LightCharcoal.png b/assets/images/press/nokia_6300_4G-side-LightCharcoal.png similarity index 100% rename from assets/img/nokia_6300_4G-side-LightCharcoal.png rename to assets/images/press/nokia_6300_4G-side-LightCharcoal.png diff --git a/assets/img/python.png b/assets/images/python.png similarity index 100% rename from assets/img/python.png rename to assets/images/python.png diff --git a/assets/img/pythoooon.png b/assets/images/pythoooon.png similarity index 100% rename from assets/img/pythoooon.png rename to assets/images/pythoooon.png diff --git a/assets/img/qhsusb-zadig.gif b/assets/images/qhsusb-zadig.gif similarity index 100% rename from assets/img/qhsusb-zadig.gif rename to assets/images/qhsusb-zadig.gif diff --git a/assets/img/qhsusb.png b/assets/images/qhsusb.png similarity index 100% rename from assets/img/qhsusb.png rename to assets/images/qhsusb.png diff --git a/assets/img/reload_policy.png b/assets/images/reload_policy.png similarity index 100% rename from assets/img/reload_policy.png rename to assets/images/reload_policy.png diff --git a/assets/img/repack_unsigned.png b/assets/images/repack_unsigned.png similarity index 100% rename from assets/img/repack_unsigned.png rename to assets/images/repack_unsigned.png diff --git a/assets/img/repackimg_signed.png b/assets/images/repackimg_signed.png similarity index 100% rename from assets/img/repackimg_signed.png rename to assets/images/repackimg_signed.png diff --git a/assets/img/setenforce.png b/assets/images/setenforce.png similarity index 100% rename from assets/img/setenforce.png rename to assets/images/setenforce.png diff --git a/assets/img/settings-alias-off.gif b/assets/images/settings-alias-off.gif similarity index 100% rename from assets/img/settings-alias-off.gif rename to assets/images/settings-alias-off.gif diff --git a/assets/img/settings_alias.png b/assets/images/settings_alias.png similarity index 100% rename from assets/img/settings_alias.png rename to assets/images/settings_alias.png diff --git a/assets/img/testpoint.png b/assets/images/testpoint.png similarity index 100% rename from assets/img/testpoint.png rename to assets/images/testpoint.png diff --git a/assets/img/unpack.png b/assets/images/unpack.png similarity index 100% rename from assets/img/unpack.png rename to assets/images/unpack.png diff --git a/assets/img/usb_storage.png b/assets/images/usb_storage.png similarity index 100% rename from assets/img/usb_storage.png rename to assets/images/usb_storage.png diff --git a/assets/img/webide/explorer_6m7BG7biit.png b/assets/images/webide/explorer-manifest.png similarity index 100% rename from assets/img/webide/explorer_6m7BG7biit.png rename to assets/images/webide/explorer-manifest.png diff --git a/assets/img/sdk_website.png b/assets/images/webide/sdk-download.png similarity index 100% rename from assets/img/sdk_website.png rename to assets/images/webide/sdk-download.png diff --git a/assets/img/waterfox_classic.png b/assets/images/webide/waterfox-download.png similarity index 100% rename from assets/img/waterfox_classic.png rename to assets/images/webide/waterfox-download.png diff --git a/assets/img/webide/waterfox_JcSK8c27C8.png b/assets/images/webide/waterfox-menu1.png similarity index 100% rename from assets/img/webide/waterfox_JcSK8c27C8.png rename to assets/images/webide/waterfox-menu1.png diff --git a/assets/img/webide/waterfox_OAKEMdhreW.png b/assets/images/webide/waterfox-menu2.png similarity index 100% rename from assets/img/webide/waterfox_OAKEMdhreW.png rename to assets/images/webide/waterfox-menu2.png diff --git a/assets/img/webide/waterfox_oPpnVjRfFU.png b/assets/images/webide/webide-loadapp.png similarity index 100% rename from assets/img/webide/waterfox_oPpnVjRfFU.png rename to assets/images/webide/webide-loadapp.png diff --git a/assets/img/webide/waterfox_zj5i1eQss0.png b/assets/images/webide/webide-remote.png similarity index 100% rename from assets/img/webide/waterfox_zj5i1eQss0.png rename to assets/images/webide/webide-remote.png diff --git a/assets/img/whatever.png b/assets/images/whatever.png similarity index 100% rename from assets/img/whatever.png rename to assets/images/whatever.png diff --git a/index.md b/index.md index 67cc2be16f..b61d7218a4 100644 --- a/index.md +++ b/index.md @@ -3,7 +3,7 @@ *Source code [provided by HMD] for B2G, Linux 4.9 kernel and certain LGPL-2.1 licensed libraries used on the 6300 4G can be found in [`leo-v20` branch of this repository]. Note that it doesn't contain proprietary code from third parties and thus cannot be used to compile a fully working KaiOS firmware.*
- +
3. On Windows 10/11, typing `python` or `python3` within Command Prompt/Windows Terminal will run the Microsoft Store version of Python. To override this default into running the locally installed version, toggle off App Installer (python.exe) and App Installer (python3.exe) under: - Windows 10: Settings → Apps → [Apps & features] → App execution aliases - Windows 11: Settings → Apps → Advanced app settings → App execution aliases - + 4. Open Command Prompt/Windows Terminal with administrator privileges and run this command to install the required dependencies for EDL: ```console pip3 install pyusb pyserial capstone keystone-engine docopt ``` -![Screenshot of a console window showing the successful process of collecting and downloading dependencies after typing the above command](assets/img/pythoooon.png) +![Screenshot of a console window showing the successful process of collecting and downloading dependencies after typing the above command](assets/images/pythoooon.png) 5. Extract the previously downloaded EDL package, open Drivers, Windows and run `Qualcomm_Diag_QD_Loader_2016_driver.exe` with administrator rights. Proceed with installation and leave everything as default, restart the computer if it prompts you to do so.- +
6. Switch your phone to EDL mode and connect it to your computer. Either: @@ -123,7 +123,7 @@ In both cases, the phone's screen should blink with an 'enabled by KaiOS' logo t 7. To replace the installed `qcusbser` driver with `libusb-win32` for use with edl.py, download and open [Zadig] (do NOT use the version included in the EDL package). Tick Options, List All Devices and select `QHSUSB__BULK` (your device in EDL mode) in the main dropdown menu. In the target driver box—to which the green arrow is pointing—click the up/down arrows until you see `libusb-win32` and then click Replace Driver.- +
> [!NOTE] @@ -194,13 +194,13 @@ You can disconnect the phone from your computer for now. #### Automatic patching with `8k-boot-patcher` 1. Download and install [Docker Desktop]. Once set up, open the program, click Accept on this box and let the Docker Engine start before exiting. -![Screenshot of a window titled as 'Docker Subscription Service Agreement' which declares that you will have to accept Docker's Subscription Service Agreements, Data Processing Agreement and Data Privacy Policy in order to use the program, and the free scope of it is limited to personal and small business uses. The window also lists the options to view the full agreements, accept them or reject and close the program.](assets/img/docker_abomination.png) +![Screenshot of a window titled as 'Docker Subscription Service Agreement' which declares that you will have to accept Docker's Subscription Service Agreements, Data Processing Agreement and Data Privacy Policy in order to use the program, and the free scope of it is limited to personal and small business uses. The window also lists the options to view the full agreements, accept them or reject and close the program.](assets/images/docker_abomination.png) 2. Use [Git] to clone/download the boot patcher toolkit by typing this into Command Prompt/Terminal. This will download the toolkit and have Docker set it up. Do not omit the dot/period at the end of this command, this tells Docker where our downloaded toolkit are located on the system. ```console git clone https://gitlab.com/suborg/8k-boot-patcher.git && cd 8k-boot-patcher && docker build -t 8kbootpatcher . ``` -![Screenshot of a macOS Terminal window showing some logs in purple text after typing the command above](assets/img/docker_build.png) +![Screenshot of a macOS Terminal window showing some logs in purple text after typing the command above](assets/images/docker_build.png) 3. Copy the `boot.img` file we've just pulled from our phone to the desktop and do not change its name. Type this into Command Prompt/Terminal to run the patching process: - Windows: `docker run --rm -it -v %cd%/Desktop:/image 8kbootpatcher` @@ -227,16 +227,16 @@ Boot image patched! ``` That's it! On your desktop there will be two new image files, the modified `boot.img` and the original `boot-orig.img`. You can now head to [part 4]. -![Screenshot of boot.img and boot-orig.img files as shown on desktop](assets/img/after_patch.png) +![Screenshot of boot.img and boot-orig.img files as shown on desktop](assets/images/after_patch.png) #### Manual patching with Android Image Kitchen 1. Extract the Android Image Kitchen tools and copy the boot image we've just obtained over to the root of the extracted folder. -![Screenshot of a list of folders and files contained in the extracted Android Image Kitchen folder](assets/img/aik.png) +![Screenshot of a list of folders and files contained in the extracted Android Image Kitchen folder](assets/images/aik.png) 2. Open the folder in Command Prompt/Terminal and type `unpackimg boot.img`. This will split the image file and unpack the ramdisk to their subdirectories. -![Screenshot of a Windows Command Prompt window showing some logs of the boot partition extracting process after typing the command above](assets/img/unpack.png) +![Screenshot of a Windows Command Prompt window showing some logs of the boot partition extracting process after typing the command above](assets/images/unpack.png) > [!WARNING] > **Be sure to edit the files correctly, else the phone won't boot!** @@ -262,7 +262,7 @@ That's it! On your desktop there will be two new image files, the modified `boot ro.zygote=zygote32 ```- +
4. Open `ramdisk/init.qcom.early_boot.sh` in Notepad++ and add `setenforce 0` as a new line at the end of the file. @@ -284,12 +284,12 @@ That's it! On your desktop there will be two new image files, the modified `boot ```- +
5. Go back to the root Android Image Kitchen folder and open `split_img/boot.img-cmdline` in Notepad++. Without adding a new line, scroll to the end of the first line and append `androidboot.selinux=permissive enforcing=0`. -![Screenshot of the modified content of the boot.img-cmdline file](assets/img/append.png) +![Screenshot of the modified content of the boot.img-cmdline file](assets/images/append.png) 6. Open `ramdisk/init.rc` (NOT `ramdisk/init`) and delete line 393 `setprop selinux.reload_policy 1` or mark a comment as shown. This will ultimately prevent SELinux from overwriting the policy changes we made above. @@ -316,13 +316,13 @@ That's it! On your desktop there will be two new image files, the modified `boot chown root system /sys/module/lowmemorykiller/parameters/minfree chmod 0664 /sys/module/lowmemorykiller/parameters/minfree ``` -![Screenshot of the modified content of the init.rc file, with line 393 marked as comment which has the same effects as deleting the line altogether, and line 421 added to disable the Low Memory Killer module](assets/img/f5-selinux.png) +![Screenshot of the modified content of the init.rc file, with line 393 marked as comment which has the same effects as deleting the line altogether, and line 421 added to disable the Low Memory Killer module](assets/images/f5-selinux.png) 7. And that's a wrap! Open the root Android Image Kitchen folder in a command-line window and type `repackimg` to package our modified boot partition. - + -![Screenshot of a Windows Command Prompt window showing some logs of the fully successful boot partition process after typing the above command](assets/img/repackimg_signed.png) +![Screenshot of a Windows Command Prompt window showing some logs of the fully successful boot partition process after typing the above command](assets/images/repackimg_signed.png) *If you happen to encounter an error during the signing process, that's likely because the process uses `java` to power the `boot-signer.jar` sequence and you don't have it installed. The image will still be packaged and ready for flashing, but if you're a perfectionist, you can install JRE and try again.* @@ -354,7 +354,7 @@ python edl.py -w boot boot.img -loader 800t.mbn #### Next steps - Now that you've rooted your phone, to install applications with 'forbidden' permissions, connect your phone to a WebIDE session, open Device Preferences in the right pane, clear the value of `devtools.apps.forbidden-permissions`, then restart B2G by either reboot the phone or hold the top Power button and select *Memory Cleaner, Deep Clean Memory*. -![Screenshot of a WebIDE window in which the location of Device Preferences is highlighted in the right pane and the value of devTools.apps.forbiddenPermissions has been emptied](assets/img/devpref.png) +![Screenshot of a WebIDE window in which the location of Device Preferences is highlighted in the right pane and the value of devTools.apps.forbiddenPermissions has been emptied](assets/images/devpref.png) - If you wish to retain privileged permissions after restoring the phone to its unrooted state, before doing so, back up all data, sideload [Luxferre's CrossTweak] then press # to perform a privileged factory reset — this will wipe all data of the phone and let you set up with a privileged session. This session will last until an OTA update overrides or you choose to factory reset normally yourself. - After rooting, you can spoof SELinux's Enforced status for WhatsApp VoIP by typing these commands one-by-one into the rooted ADB shell. This will last until a restart.