Skip to content

Instantly share code, notes, and snippets.

View throwaway96's full-sized avatar

throwaway96

View GitHub Profile
@smx-smx
smx-smx / ffi.patch
Created November 28, 2023 01:29
PHP FFI Thread Safe patch
diff --git a/ext/ffi/ffi.c b/ext/ffi/ffi.c
index 9be5ac3405..81ac091750 100644
--- a/ext/ffi/ffi.c
+++ b/ext/ffi/ffi.c
@@ -922,9 +922,11 @@ static void zend_ffi_callback_hash_dtor(zval *zv) /* {{{ */
}
/* }}} */
-static void zend_ffi_callback_trampoline(ffi_cif* cif, void* ret, void** args, void* data) /* {{{ */
-{
@throwaway96
throwaway96 / lg-hostdiag.md
Created November 2, 2023 22:17
Instructions on how to open the LG Host Diagnostics (HostDiag) screen

HostDiag

The Host Diagnostics (HostDiag) screen shows various system information. It has been present on LG TVs since long before webOS. While it generally isn't very useful, it could come in handy in certain situations.

Opening

In general, to open HostDiag you must highlight "Channel Tuning" in the menu and press the "1" button 5 times. The menu can be opened with the menu button on the remote, but the steps after that vary a bit across webOS versions. Note that

webOS 6

@smx-smx
smx-smx / nand_extract.php
Last active November 1, 2023 20:38
nandsim helper
<?php
function kilo($n){ return $n * 1024; }
function mega($n){ return kilo($n) * 1024; }
function to_cmdline(array $cmd){
return implode(' ', array_map('escapeshellarg', $cmd));
}
function make_pipe(array ...$cmds){
$cmdlines = array_map('to_cmdline', $cmds);
@throwaway96
throwaway96 / dpf720-notes.md
Last active August 6, 2023 21:44
Notes on Digital Decor DPF720 digital picture frame

Introduction

The DPF720 is a digital picture frame with "Digital Decor" branding. It is based on an MStar MSPD21D SoC. The example I obtained did not come in the original box, but I believe I received all important components. Here is an (open box?) Amazon listing for it. This eBay listing (archive) seems to show the box.

Conventions

Unless otherwise noted: left/right are when viewing the assembled device from the front (i.e., looking at the screen); top/bottom of the board refers to its orientation when the device is assembled and upright.

Label

Contents

The label on the bottom refers to the device as "7 In. Ultra Slim Digital Picture Frame". The first few lines under that are:

@throwaway96
throwaway96 / webos-notes.md
Last active February 23, 2025 11:48
Notes about webOS stuff

Debugging apps (inspect)

Inspectability

Developer mode apps (those installed in /media/developer) are inspectable by default. Other apps (e.g., from the LG Content Store) are not inspectable by default, but you can add "inspectable": true to their appinfo.json to enable it. Debugging system apps (i.e., those in /usr/palm/applications) may require a special flag.

Ports

The developer mode app debugger listens on port 9998.

System service and system app debugging uses ports 5885 and 9999, respectively. However, debugging for these is not normally enabled.

Inspecting an app

@shinyquagsire23
shinyquagsire23 / gist:7ddd17d1569acb21920683866570cb35
Created February 23, 2023 07:43
LG MStar firmware disorganized notes -- Hotwords: AEON B2, MStar, LG DualUp Firmware, MST9W00V4, MST9U
DDC/CI Command Codes (antiquated MStar function, not real):
------
0xCC, 0xF1, 0xF0 - LG special? Only CC actually used.
3
1
0xC6
0xC8
0xF3
0xF5
0xB1
@throwaway96
throwaway96 / crashd.md
Last active May 31, 2025 15:16
crashd instructions

News

EOL (2024-07-21)

I'm not going to be maintaining this document anymore. I'm leaving it as-is since much of the FAQ section is still accurate and has yet to be incorporated into other resources.

Use CanI.RootMy.TV to find an exploit for your TV.

New exploit for webOS 3.5+: DejaVuln (2024-04-21)

@throwaway96
throwaway96 / notes.md
Last active May 30, 2025 01:24
Enabling debug and getting root on LG webOS by modifying NVM

Warnings

What you do with this information is your own responsibility. If you brick your TV trying this, it's not my fault. You should probably have some electronics experience if you want to attempt this.

This is going to involve opening your TV and attaching wires to the pins of an integrated circuit. If you're not comfortable with that, this is not for you.

This document is a work in progress.

debugstatus

LG TVs since at least the era of NetCast and "Global Platform" (webOS predecessors) have had the notion of a debug level, generally called "debugstatus". There are three modes: DEBUG, EVENT, and RELEASE. TVs normally operate in RELEASE mode. DEBUG mode enables a variety of logging and other debugging features in webOS, including access to the bootloader console and debug menus via serial. EVENT is similar to DEBUG, although it may not enable as much logging and has other relatively minor differences.

@Informatic
Informatic / 50-customca
Last active January 14, 2025 18:04
Let's Encrypt fix for webOS. Tested on 3.8 only, put this into /var/lib/webosbrew/init.d and you should be probably done.
#!/bin/sh
# Directory to store overlays in (one directory structure is created per overlay configured down below)
OVERLAY_BASE=/var/lib/webosbrew/customca
overlay() {
set -e
overlay_id="$(echo $1 | sed 's;/;__;g')"
unset TARGET SOURCE FSTYPE OPTIONS
eval $(findmnt -P $1)
@NeatMonster
NeatMonster / README.md
Last active August 25, 2024 20:55
A simple hexdump module for Python

Simple Hexdump

A simple hexdump module for Python.

Installation

The preferred installation method is:

pip install simple-hexdump