Skip to content

Instantly share code, notes, and snippets.

View yifanlu's full-sized avatar

Yifan Lu yifanlu

View GitHub Profile
@yifanlu
yifanlu / vita-dumper-comparsion.md
Last active April 30, 2024 08:40
Vita Dumper Comparison
psvgamesd NoNpDrm Vitamin/MaiDumpTool
Dumps physical games
Dumps digital games, DLC, and updates
Compatible with legit DLC & updates
Saves usable on non-hacked Vitas
All original data untouched ❌❌
No problems saving after suspend ❌❌
Format can be converted to work with other tools
Installs physical games as bubbles
@yifanlu
yifanlu / Ghidra-OSX-Launcher-Script.scpt
Last active April 4, 2024 21:00
Ghidra.app launcher for OSX
@yifanlu
yifanlu / gist:e80db121d38aceb8cca0e03cefd5853b
Last active November 3, 2023 22:55
3DS System Transfer + NNID & eShop on new region
This is an ADVANCED guide and should not be attempted by anyone who does not COMPLETELY understand each step and what it does to their device. Additionally, the prerequisite is that you have already performed a region change on your 3DS. You also need access to another 3DS on the target region that you can format to a non-NNID linked state (you can use emuNAND here). For simplicity, I am going to assume you are region changing a N3DS from Japan to USA and have access to a USD O3DS. The guide is in two parts: System Transfer and NNID Linking. For those who wish to just have access to USA eShop (and the ability to download free games; if you only want to use eShop to purchase games, you do not have to link a NNID) you can skip to the second part.
To modify requests, I use Charles Proxy to set breakpoints so I can change requests and responses as they come in. However, you can do it in any why you choose. Also, since 9.2 eShop was disabled, you may have to additionally modify all requests from the 3DS to send a
@yifanlu
yifanlu / E80558325.md
Last active October 13, 2023 14:04
Vita 3.65 activation investigation (E-80558325)

On 7/29/2017, all hacked Vitas on 3.60 spoofing the latest firmware (3.65) were blocked from console activation. This is particularly odd because the PSN passphrase did not change in 3.65. Additionally with the release of ensō added to the confusion of what happened. Here is the result of a preliminary investigation of the situation.

Upon game activation, the Vita displays an dialog that shows the error number E-80558325. This error number is used in SceNpKdc, which is found in vs0:external/np_kdc.suprx. The error code itself is created when the activation response is received:

v5 = v45 | 0x80558300;

Here, v5 is the return code and v45 is the string error code from the server converted to a number. The request made to Sony's server looks like the following

@yifanlu
yifanlu / gpg_to_pem.py
Created July 12, 2015 15:20
Convert GnuPG key export to PEM (supports passphrase protected keys)
# requires https://github.com/mitchellrj/python-pgp
from pgp.packets import constants
from pgp.packets import parsers
from Crypto.PublicKey import RSA
import sys
"""
Converts an GnuPG key to a PEM key
If the input is password protected, the same password will be used to protect
the PEM output.
@yifanlu
yifanlu / dynarec.c
Created August 2, 2016 18:57
Vita dynarec example
#include <psp2/kernel/sysmem.h>
int dynarec_test(void)
{
int block;
int ret;
void *base;
int (*func)(void);
// allocate block in VM domain
@yifanlu
yifanlu / start.sh
Created December 6, 2018 06:15
PlayStation Classic root shell through UART serial
#!/bin/sh
# THIS IS NOT FOR REGULAR USERS!!!
# You need to solder to the UART port and short the two pads under the PCB near the charger.
# Baud rate: 921600
red_led () {
SLEEP=1
LOOP=1
if [ x"$1" != x ]; then LOOP=$1; fi
@yifanlu
yifanlu / spiway.patch
Created April 2, 2017 23:28
SPIway support for Spansion FL128SAIF00
diff --git a/SPIway.py b/SPIway.py
index f3a48b7..f79e52c 100644
--- a/SPIway.py
+++ b/SPIway.py
@@ -176,6 +176,22 @@ class SPIFlasher(TeensySerial):
print "Chip type: unknown (0x%02x)"%self.DEVICE_ID
self.close()
sys.exit(1)
+
+ if self.MF_ID == 0x01:

h-encore

h-encore, where h ⬆️👤 for hacks ➕ homebrews, is the 🥈 public jailbreak for the PS Vita™️ which supports the newest firmwares 3️⃣.6️⃣5️⃣, 3️⃣.6️⃣7️⃣ ➕ 3️⃣.6️⃣8️⃣. It allows ➡️👤 🛠️ kernel- ➕ user-modifications, change the ⏰ 🚄, install plugins, 🏃‍♂️ homebrews ➕ much more.

Requirements

  • Your device must be on firmware 3️⃣.6️⃣5️⃣, 3️⃣.6️⃣7️⃣ or 3️⃣.6️⃣8️⃣. Any other is ❌️ supported. If you're on a lower firmware, 🙏 decide 💅 to what firmware ➡️👤 🙏 to update, then 🔍️ for a trustable guide on /r/vitahacks (if ➡️👤 💡 how ➕ 🙏 to contribute, ➡️👤 🥫 edit this readme ➕ 🛠️ a pull request, such that fellow readers have got an easier life). Remember that on firmware 3️⃣.6️⃣5️⃣ ➡️👤 have got the possibility to install enso, the permanent hack, whereas on 3️⃣.6️⃣7️⃣ ➕ 3️⃣.6️⃣8️⃣ ➡️👤 ❌️.
  • If your device is a phat OLED model, ➡️👤 need a Memory ♠️ in order to install. There's no need for a Memory ♠️ on Slim/PS 📺️ mode
@yifanlu
yifanlu / gist:e0787ca48473cdf992f8
Created March 24, 2015 01:17
GetAccountStatus Response
<?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><GetAccountStatusResponse xmlns="urn:ecs.wsapi.broadon.com"><Version>2.0</Version><DeviceId>20117171042</DeviceId><MessageId>EC-20117171042-121712521</MessageId><TimeStamp>1427134562983</TimeStamp><ErrorCode>0</ErrorCode><ServiceStandbyMode>false</ServiceStandbyMode><AccountStatus>R</AccountStatus><ServiceURLs><Name>ContentPrefixURL</Name><URI>http://ccs.cdn.c.shop.nintendowifi.net/ccs/download</URI></ServiceURLs><ServiceURLs><Name>UncachedContentPrefixURL</Name><URI>https://ccs.c.shop.nintendowifi.net/ccs/download</URI></ServiceURLs><ServiceURLs><Name>SystemContentPrefixURL</Name><URI>http://nus.cdn.c.shop.nintendowifi.net/ccs/download</URI></ServiceURLs><ServiceURLs><Name>SystemUncachedContentPrefixURL</Name><URI>https://ccs.c.shop.nintendowifi.net/ccs/download</URI></ServiceURLs><Ser