From 508f7a60efb91cc41131446ba7674bb972a877f1 Mon Sep 17 00:00:00 2001 From: bmd <93396463+bmndc@users.noreply.github.com> Date: Wed, 4 Dec 2024 13:52:20 +0700 Subject: [PATCH] feat: Set up W2D functionalities, custom domain Pages deployment, add ToC --- .github/workflows/pages.yml | 43 +++++++++++++++++++++ CNAME | 1 + index.html | 40 +++++++++++-------- style.css | 9 ++++- w2d.js | 76 +++++++++++++++++++++++++++++++++++++ 5 files changed, 153 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/pages.yml create mode 100644 CNAME create mode 100644 w2d.js diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 0000000..5640380 --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,43 @@ +# Simple workflow for deploying static content to GitHub Pages +name: Deploy static content to Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: [$default-branch] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + # Single deploy job since we're just deploying + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Pages + uses: actions/configure-pages@v5 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + # Upload entire repository + path: '.' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/CNAME b/CNAME new file mode 100644 index 0000000..41de4fe --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +w2d.js.org \ No newline at end of file diff --git a/index.html b/index.html index 01aafcf..aee9929 100644 --- a/index.html +++ b/index.html @@ -5,12 +5,22 @@ Launch hidden settings on KaiOS +

Launch hidden settings on KaiOS

In order for the buttons on this page to function correctly, you need to open this page in the built-in Browser app on your KaiOS phone.

+

It's unclear how a page in the Settings app can be hidden on condition. My theory is, when you pop a SIM card into the phone, B2G looks up some information of the carrier and matches a certain ID with one of the default configurations under /system/b2g/defaults/customization/ (see GerdaOS's system and leo's system). If it finds a match, B2G will toggle Device Settings flags based on the JSON values, and decide whether to enable certain features of the phone or not.

Now, what this does is merely hiding the menus from the Settings app so that normal users cannot access it. But they can still be opened with other means.

mozActivity on Firefox OS and KaiOS 2.5, and webActivity on KaiOS 3+, is a system-level function which allows applications to share data, view and perform actions across each other. An app can register to handle a mozActivity/webActivity in its manifest.webapp file, and other apps can reference to a registered mozActivity/webActivity to perform actions e.g. sharing photos and videos from Gallery to Messages, or opening a page in the Settings app if the phone isn't connected to the Internet (see Web Activities on KaiOS).

@@ -18,47 +28,47 @@

Launch hidden settings on KaiOS

-

W2D KaiOS Jailbreak

+

W2D KaiOS Jailbreak

Under Settings, Device, the Developer menu consists of options to turn on ADB and DevTools for debugging purposes, plus a number of graphical debugging tools. On certain production devices this menu is hidden by default. Clicking this button below will attempt to open the menu. Works on both KaiOS 2.5 and KaiOS 3. (W2D: web-to-dev)

Once you connect to WebIDE, you can toggle the Device Settings flag developer.menu.enabled to have this menu shown permanently.

- +
-

Hotspot for JioPhones

+

Hotspot for JioPhones

Attempt to open Internet sharing menu under Settings, Network & Connectivity, which is hidden on JioPhones and newer, locked HMD/Nokia phones, although the hardware is perfectly capable of doing such thing. Works on both KaiOS 2.5 and KaiOS 3.

Note: On the latest JioPhone Prima 4G, the phone will appear to open the menu, then redirect to a blank page.

- +
-

Turn on Grayscale mode or change display contrast level

+

Turn on Grayscale mode or change display contrast level

Clicking the first button attempts to open the incomplete Color Filter menu, where you can set your screen to display black-and-white only or invert all colours. If you want to adjust the contrast level of the screen, click on the second button; Contrast option in the Color Filter menu does not do anything.

Use D-Pad Up and Down to increase or decrease the contrast level respectively.

- - + +
-

Turn off Flip open to answer

+

Turn off Flip open to answer

On some KaiOS flip or sliding phones, such as the Nokia 8110 4G and Nokia 2720 Flip, opening the phone will automatically answer any incoming calls. Clicking the button below will attempt to open the Answer Mode menu where you can disable that behaviour. On KaiOS 3 flip phones, you can access this menu under Settings, Personalization.

Alternatively, you can connect the phone to WebIDE and toggle the Device Settings flag phone.answer.flipopen.enabled.

- +
-

Readout (not recommended)

+

Attempt to open the Readout menu in Settings, where you can toggle KaiOS's in-built screen reader and change its speech rate. Only consider using this feature if you plan to only use default apps; most apps from KaiStore do not properly label their buttons, which makes this feature unusable.

On some phones with dedicated volume buttons, you can toggle this feature by repeatedly pressing the side volume buttons Vol+ and Vol-. You can also toggle the Device Settings flag accessibility.screenreader in WebIDE.

- +
-

Connect to ADB wirelessly (experimental)

+

Connect to ADB wirelessly (experimental)

If you don't have any USB cables nearby, this button below will attempt to open a 5555 port for adbd on your phone, so that you can connect to ADB on your computer over Wi-Fi by typing adb connect [your.phone.ip.address]:5555. For more details, see Sideloading and debugging third-party applications on BananaHackers Wiki website.

You can find your phone's local IP address (192.168.abc.def) by going to Settings, Network & Connectivity, Wi-Fi, Available networks and select the connected Wi-Fi access point; or download N4NO's My IP Address from KaiStore.

Before clicking this button, make sure both your phone and computer are on the same Wi-Fi network (you can tether to your computer), your phone allows at least one of these three permissions: engmodeExtension, jrdExtension, kaiosExtension, and you have turned on debugging mode on your phone.

- +
-

VoLTE/VoWiFi (may not work)

+

VoLTE/VoWiFi (may not work)

If your network provider doesn't support VoLTE/VoWiFi for your phone, the system may automatically hide the VoLTE/VoWiFi menu from the Network & Connectivity section. Clicking this button will attempt to bring up the menu. Because list items in this menu are not highlighted, you won't be able to select anything.

- +