Hacking Hardware Picofly - a HWFLY switch modchip

renoob

Active Member
Newcomer
Joined
Feb 6, 2023
Messages
42
Trophies
0
XP
157
Country
France
I have found where the unique_id of the current rp2040 is stored in the original firmware:
0x20025978
$1 = 0x20025978 "\346aA\004\003y\247\071W\003"
(gdb) x/8x $r0
0x20025978: 0xe6 0x61 0x41 0x04 0x03 0x79 0xa7 0x39

and this is the output of micropython:
MPY: soft reboot
e6 61 41 4 3 79 a7 39
MicroPython v1.19.1-841-g3446d440f on


Cross Referenced unique_id example code in ghidra with firmware,found where it is,little this and little that and here we are
(rp2040 was live debuged)
 

vittorio

Well-Known Member
Member
Joined
May 12, 2014
Messages
243
Trophies
0
Age
26
XP
972
Country
Italy
This is the ID of the chip, not stored one for encryption, still finding where its compared

Anyway. the function is at 0x10002608 which is called at boot
I've seen this function
Post automatically merged:

if we try to put the keys manually like it says here https://github.com/CTCaer/hekate/issues/559
Post automatically merged:

Post automatically merged:

@Tafty
 
Last edited by vittorio,

Switch_Maniac

Well-Known Member
Member
Joined
Dec 16, 2018
Messages
183
Trophies
0
XP
652
Country
United States
The sdloader used in this firmware is wrong/bad that’s why it says for Ubuntu. It clears out the keys, that’s why BEK is missing. Someone that understands the firmware better needs to swap out the sdloader code with hwfly or spacecraft sdloader. You cannot patch it with hwfly toolbox because it’s not in the same location
 

HenryMin

Well-Known Member
Member
Joined
Jun 19, 2020
Messages
141
Trophies
0
XP
1,139
Country
Korea, South
I've seen this function
Post automatically merged:

if we try to put the keys manually like it says here https://github.com/CTCaer/hekate/issues/559
Post automatically merged:

Post automatically merged:

@Tafty
> hekate_keys.ini is not something that hekate actually supports. I don't know what you are talking about.
Also refrain from illegally posting even a single part of the keys.

hekate_keys.ini was used in some shitty closed source cfw packs, because original tx firmware wipes BEK. You should not post thoese keys tho :P
 
  • Like
Reactions: binkinator

TheSynthax

Well-Known Member
Member
Joined
Apr 29, 2018
Messages
220
Trophies
0
XP
509
Country
United States
> hekate_keys.ini is not something that hekate actually supports. I don't know what you are talking about.
Also refrain from illegally posting even a single part of the keys.

hekate_keys.ini was used in some shitty closed source cfw packs, because original tx firmware wipes BEK. You should not post thoese keys tho :P
Does that mean any console that used the original TX firmware without manually backup up first could never be restored to stock?
 

HenryMin

Well-Known Member
Member
Joined
Jun 19, 2020
Messages
141
Trophies
0
XP
1,139
Country
Korea, South
Does that mean any console that used the original TX firmware without manually backup up first could never be restored to stock?
The keys are stored in bootrom, and normally they will be loaded to keyslot at boot. But TX firmware just wipe keyslot at boot to prevent other CFW to boot(It was their DRM lol), so it is not permanent.
 
  • Like
Reactions: binkinator

Piorjade

Well-Known Member
Member
Joined
Nov 8, 2015
Messages
142
Trophies
0
XP
407
Country
Gambia, The
Don't know how the compiler packs Pico code into .uf2 files, but I couldn't find the HWFLY-NX public key signature (0x69 repeating) in the latest unlocked dump. If the uf2 is uncompressed then this firmware really is using different BCTs, but I guess we can already safely bet on that.

In the meantime, I'm currently writing PIO code to sniff eMMC traffic using an external CLK signal. CMD line is almost done, though I don't know yet how to know when I need to sniff 136 bit packages and when I need to sniff 48bit packages. This protocol is pretty annoying tbh.

I don't think I'll be able to even write a prototype for the glitching part, because I don't have a CPU flex cable to test this whole thing out. I have some MOSFETs (slightly different ones from the one linked here) but they're so damn small that I don't trust myself to solder it on the tiny capacitors on the switch lmao.
 

TheSynthax

Well-Known Member
Member
Joined
Apr 29, 2018
Messages
220
Trophies
0
XP
509
Country
United States
Probably better to solder some 40AWG enamel magnet wire to the caps and the fets if you don't have super good eyes, steady hands, and/or a microscope.
Don't know how the compiler packs Pico code into .uf2 files, but I couldn't find the HWFLY-NX public key signature (0x69 repeating) in the latest unlocked dump. If the uf2 is uncompressed then this firmware really is using different BCTs, but I guess we can already safely bet on that.

In the meantime, I'm currently writing PIO code to sniff eMMC traffic using an external CLK signal. CMD line is almost done, though I don't know yet how to know when I need to sniff 136 bit packages and when I need to sniff 48bit packages. This protocol is pretty annoying tbh.

I don't think I'll be able to even write a prototype for the glitching part, because I don't have a CPU flex cable to test this whole thing out. I have some MOSFETs (slightly different ones from the one linked here) but they're so damn small that I don't trust myself to solder it on the tiny capacitors on the switch lmao.
 
  • Like
Reactions: binkinator

vittorio

Well-Known Member
Member
Joined
May 12, 2014
Messages
243
Trophies
0
Age
26
XP
972
Country
Italy
Don't know how the compiler packs Pico code into .uf2 files, but I couldn't find the HWFLY-NX public key signature (0x69 repeating) in the latest unlocked dump. If the uf2 is uncompressed then this firmware really is using different BCTs, but I guess we can already safely bet on that.

In the meantime, I'm currently writing PIO code to sniff eMMC traffic using an external CLK signal. CMD line is almost done, though I don't know yet how to know when I need to sniff 136 bit packages and when I need to sniff 48bit packages. This protocol is pretty annoying tbh.

I don't think I'll be able to even write a prototype for the glitching part, because I don't have a CPU flex cable to test this whole thing out. I have some MOSFETs (slightly different ones from the one linked here) but they're so damn small that I don't trust myself to solder it on the tiny capacitors on the switch lmao.
https://github.com/hwfly-nx/firmware/blob/master/firmware/src/mmc_sniffer.c
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Sicklyboy @ Sicklyboy:
    I'm planning to start building it back up though. Plus, Usenet automation around music downloading has gotten so much better since then
  • Psionic Roshambo @ Psionic Roshambo:
    I used to use high end headphones and speakers JBL back when they made good speakers lol X-Fi Fatality edition sound card on PCI with XP back when Windows had good sound....
  • SylverReZ @ SylverReZ:
    @Sicklyboy, Using a Fiio DAC and Betron headphones.
    +1
  • Sicklyboy @ Sicklyboy:
    I use AKG K7XX headphones for daily use, but Meze 99 Classics when I want to *enjoy* the music
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    I mean built in sound on mobo's has gotten way better but still XP handled sound better and X-Fi was still better than onboard audio even to this day
  • Psionic Roshambo @ Psionic Roshambo:
    Hell not sure what was going on but for like a few weeks MP3's sounded muffled, some driver or Windows update fixed it. Thank god lol
  • Sicklyboy @ Sicklyboy:
    Oh boy Massdrop has $1100 IEMs. Want, but not at that price lmao. https://drop.com/buy/campfire-audio-andromeda-emerald-sea-iem
  • Sicklyboy @ Sicklyboy:
    I'd sooner buy the Meze 109 Pro if I was dropping that much on headphones. I don't even like buds/IEMs
  • Sicklyboy @ Sicklyboy:
    I got the Google Pixel Pro buds, they're good enough for when I need portable audio. And some really cheap IEMs that Dankpods recommends, I think the KZ ZSN Pro
    +1
  • K3Nv2 @ K3Nv2:
    I'd stick with cheapo Chinese $10 ones quality is actually becoming on pair with name brand since name Brand usually quads the price up anyway loose one bud that's another $200
  • Sicklyboy @ Sicklyboy:
    My Pixel Pro buds shit the bed a month or two ago. My wireless charger (which they do support Qi charging) absolutely COOKED them. Caused some problem that caused the case to heat up to 180F+
  • Sicklyboy @ Sicklyboy:
    They were like 9 months out of warranty but I hit up Google support anyway and told them how hot they were getting and they replaced them with new ones because they wanted these for failure analysis lol
  • Psionic Roshambo @ Psionic Roshambo:
    lol wireless charging
  • K3Nv2 @ K3Nv2:
    Yeah that's why I can't bring myself to even spend $100 on wireless earbuds
  • Psionic Roshambo @ Psionic Roshambo:
    I think it's a cool idea but damn
  • Sicklyboy @ Sicklyboy:
    Apparently the case has a problem with >15W wireless chargers. Google design fault, that one.
  • K3Nv2 @ K3Nv2:
    I could live with wireless charging if the damn standard case doesn't block connection
  • Xdqwerty @ Xdqwerty:
    how is wireless charging possible?
  • K3Nv2 @ K3Nv2:
    Dbz said everyone has raging energy senses
    +1
  • cearp @ cearp:
    you mean generally, how does the concept work?
    +1
  • K3Nv2 @ K3Nv2:
    Copper conducting electricity or something
  • Sicklyboy @ Sicklyboy:
    @Xdqwerty, power through a coil of wire causes an electromagnetic field to be generated. Another coil of wire can be set up to harness the power from that electromagnetic field and turn it into usable energy for charging a device
    Xdqwerty @ Xdqwerty: @Sicklyboy, 1) ohkay 2) https://www.youtube.com/watch?v=n5K3jc6Q3HU