KryptoSynth

joined 2 years ago
1
submitted 6 months ago* (last edited 6 months ago) by KryptoSynth@ani.social to c/memes@sopuli.xyz
 

TranscriptionSpiderman (from the hit Sam Raimi movie Spiderman 2) standing on the right holding a finger up in the air reprimandingly.

A dialogue bubble coming out of him on the left that says "Don't talk to me or my family unless you've watched Arcane".

Arcane is a beautifully animated 2-season-long Netflix show with phenomenal character writing, immersive world building and a noteworthy soundtrack. It's about to air its final episodes this weekend and as a certified nobody, I highly recommend watching it.

Template
collapsed inline media

 

Warning: You might brick your controller! (Do this at your own discretion.)

Sister Reddit post

Preamble

About a month ago, Sony decided to forgo their still-functional Firmware Updater Tool (you get a "can't connect to the server" message and it doesn't let you download the firmware) and replace it with the PlayStation Accessories app.

This new app does not run on wine at all currently, so I decided to try and get the previous tool (I'll call it FWUpdater) working again.

PlayStation Accessories, on launch, connects to playstation's server (https://fwupdater.dl.playstation.net/fwupdater/info.json) and checks if it's version is up-to-date, then checks if there is a new firmware for the controllers. As it seems, FWUpdater uses the same URL to check its version as well. As these are completely different programs, and the server reports the latest version for PlayStation Accessories only, FWUpdater gets confused and just displays "can't connect to the server" (correct me if I'm wrong).

After some experimentation, I figured out I could just spoof the version reported from the server (with mitmproxy) and get FWUpdater to fetch the necessary firmware.

Prerequisites (Ensure everything is up-to-date)

  • Python
  • Wine
  • A Browser
  • A Terminal

Process

Step 1: mitmproxy

a. Install mitmproxy from your package manager (or grab the latest binaries from
mitmproxy.org and open a terminal in the mitmproxy folder.)

b. Run mitmproxy in the terminal.

c. Setup your browser (in the browser's proxy setting) to connect to mitmproxy (address set to localhost and port set to 8080):

collapsed inline media

d. Goto mitm.it and you should see the certificates:

collapsed inline media

e. Download the Linux certificate and install them to your system trust store, following the instructions on the above page for your specific distro (for Arch Linux, you move the certificate into /etc/ca-certificates/trust-source/anchors/ and run sudo update-ca-trust).

f. Revert the proxy settings in your browser and close mitmproxy.

Step 2: FWUpdater

a. Download the FWUpdater and extract it.

b. Create a new empty file, paste this in and save it as a python script (.py).

from mitmproxy import ctx
from mitmproxy import http
import json

def response(flow: http.HTTPFlow) -> None:
    if flow.request.pretty_url.endswith("/fwupdater/info.json"):
        data = json.loads(flow.response.get_text())
        data["ApplicationLatestVersion"] = "1.5.0.2"
        flow.response.text = json.dumps(data)

Step 3: Profit

a. Start mitmproxy in a terminal with the script:

mitmproxy -s "path/to/the/above/script.py"

b. Start FWUpdater with the following command:

HTTP_PROXY="http://localhost:8080/" wine "path/to/FWUpdater.exe"

c. Repeat Step 3 everytime you want to run the updater.

Troubleshooting

1. "FWUpdater doesn't detect controller"

a. Run wine control joy.cpl, change any one of these settings (unchecking "Disable hidraw" should fix it in most cases), and run FWUpdater again:

collapsed inline media

Hope this helps (And I hope I didn't miss anything lmao)