Skip to content

Instantly share code, notes, and snippets.

@xfangfang
xfangfang / wiliwili_vita.md
Last active February 18, 2025 07:27
wiliwili (第三方B站客户端)PSV 平台编译指南

PSV

从一个全新的 ubuntu 24.10 (x86_64) 开始配置开发环境,推荐编译 gxm 版(gles2 版不再维护)

写环境变量到 .bashrc

echo "export VITASDK=/usr/local/vitasdk" >> ~/.bashrc
echo "export PATH=$VITASDK/bin:$PATH" >> ~/.bashrc
source ~/.bashrc
@xfangfang
xfangfang / build_steps.md
Last active July 23, 2023 21:01
Build wiliwili on Switchroot Ubuntu

wiliwili is a third-party bilibili client.
Switchroot is a group for open-source development on the Nintendo Switch.

Steps

We use the ffmpeg and mpv from the switchroot team to get hardware decoding support, but you can always switch to the main branches of ffmpeg and mpv to play videos using software decoding

1. Run L4T Megascript for a initial environment

2. Install dependencies

Switch TLS Dumping Guide (Charles)

This guide is for dumping Switch TLS traffic using the Charles web proxy. Please note that this is paid software.

Most Switch communications are over TLS - this includes NEX and Eagle communications (for Nintendo Switch Online)* as well as other servers such as BAAS (friends/status) and NPNS (notifications)

*NPLN, the new Switch online servers that Monster Hunter Rise demo used, cannot be dumped with Charles currently as it doesn't support gRPC - use grpc-dump to dump these communications - the gPRC section will explain this better.

While this doesn't carry much risk in theory, this is risky and could get your Switch banned as you must send your own Switch-unique client certificate.

Dumping Console-Unique Certificate

@xfangfang
xfangfang / switch-gdb-cheatsheet.md
Created May 28, 2023 08:49 — forked from jam1garner/switch-gdb-cheatsheet.md
GDB for Switch Modding Cheatsheet/Tutorial

This is a mini-tutorial of sorts for getting started with gdb on the Switch, with the target audience being people who want to mod and/or reverse games, with no prerequisite knowledge of gdb. The goal will be to walk you through some of the basic workflows needed to use a debugger on the Switch, while being brief enough for skimming for when you forget things.

If some part is unclear, your OS doesn't have install instructions, or you feel part of your workflow should be added here, feel free to comment any additions.

(If you only need a quick reference Jump to the Appendix)

Installing GDB

First off you'll need a version of GDB compatible with aarch64. This can be obtained via either a distribution of

@xfangfang
xfangfang / patchNXapps.md
Created May 10, 2023 23:38 — forked from Slluxx/patchNXapps.md
How to patch Nintendo Switch Applications in IDA

Patching the Youtube App

In short

  1. Extract the main NSO
  2. Convert it into an ELF (to strip header/hashes)
  3. Load it into Ida, find the function and patch the bytes back into the binary
  4. Convert the ELF back into NSO
  5. Use the nso as exefs patch or re-import it into the NCA/NSP