Hacking Hardware Picofly - a HWFLY switch modchip

binkinator

Garfield’s Fitness Coach
Member
GBAtemp Patron
Joined
Mar 29, 2021
Messages
6,512
Trophies
2
XP
5,962
Country
United States
Hopely, will work.

By the way somebody knows a way to connect the MMC of a switch directely to a PC using a "SD Card" adapter? and using something like https://github.com/eliboa/NxNandManager to edit the Boot 0 and recover from a V2 or Lite with AutoRCM enabled?

I did this for my eMMC upgrade. Based on @evil_santa ’s recommend I used one of these:

https://www.aliexpress.us/item/3256803361643934.html

9CDE842B-A729-464E-A236-47D68BF76CFA.jpeg

It worked great for a direct copy from my original eMMC to my big one.

Have also heard good things about this one but haven’t used one myself:

https://www.tindie.com/products/ignas/emmc-reader-for-hac-emmc/

This software works for both:

https://github.com/ignasurba/mmcblkNX
 

Piorjade

Well-Known Member
Member
Joined
Nov 8, 2015
Messages
141
Trophies
0
XP
384
Country
Gambia, The
Now when I flashed the hwfly boot0 and rebooted before attempting to launch in HOS I was greated with the white led again as if this was it's first boot, this makes me believe its coded to rewrite boot0 If the data/checksum whatever doesn't match its own code.
I've said this before, but this is exactly what HWFLY-NX does too.

At boot it verifies that the BCTs are the same of the HWFLY, if not, it re-flashes them. Afterwards it does the same for the actual payload (SD loader).

This whole BEK thing is probably happening in the payload/SD loader, which is why it's useless to try to fix boot0 from Hekate, as the boot0 gets rewritten by the firmware before Hekate boots.
 

FruithatMods

Well-Known Member
Member
Joined
Dec 16, 2018
Messages
128
Trophies
0
Age
33
XP
415
Country
Germany
I've said this before, but this is exactly what HWFLY-NX does too.

At boot it verifies that the BCTs are the same of the HWFLY, if not, it re-flashes them. Afterwards it does the same for the actual payload (SD loader).

This whole BEK thing is probably happening in the payload/SD loader, which is why it's useless to try to fix boot0 from Hekate, as the boot0 gets rewritten by the firmware before Hekate boots.
This is actually a good thing.

During a HOS firmware update boot0 gets overwritten. If the rp2040 chip doesn't check boot0 and overwrite it when it is different we will not be able to boot into hekate after a fw update.
 
  • Like
Reactions: overcode

rulles

Member
Newcomer
Joined
Feb 7, 2023
Messages
21
Trophies
0
Age
33
XP
89
Country
Portugal
I did this for my eMMC upgrade. Based on @evil_santa ’s recommend I used one of these:

https://www.aliexpress.us/item/3256803361643934.html

View attachment 352786

It worked great for a direct copy from my original eMMC to my big one.

Have also heard good things about this one but haven’t used one myself:

https://www.tindie.com/products/ignas/emmc-reader-for-hac-emmc/

This software works for both:

https://github.com/ignasurba/mmcblkNX
From my understanding, you use this things to "clone" your emmc and replace by one more bigger.
Is that right?!
 

Piorjade

Well-Known Member
Member
Joined
Nov 8, 2015
Messages
141
Trophies
0
XP
384
Country
Gambia, The
This is actually a good thing.

During a HOS firmware update boot0 gets overwritten. If the rp2040 chip doesn't check boot0 and overwrite it when it is different we will not be able to boot into hekate after a fw update.
Yeah, exactly. But this is the reason we won't be able to make the current half-working firmware work via Hekate shenanigans. Either somebody somehow finds the payload in the binary .uf2 file and overwrites it, or we write this thing from scratch, which will take some time.
 

sith

Well-Known Member
Member
Joined
Apr 10, 2007
Messages
157
Trophies
1
XP
1,270
Country
United States
From my understanding, you use this things to "clone" your emmc and replace by one more bigger.
Is that right?!
seems that is what is being said, though that is completely unnecessary as you can just do everything through hekate, clone your nand bkp onto the larger emmc and then expand the partition. I put a 256gb in mine without anything other than the emmc board and a big microsd.

edit: bink points out below, only true for v1 consoles.
 
Last edited by sith,

FruithatMods

Well-Known Member
Member
Joined
Dec 16, 2018
Messages
128
Trophies
0
Age
33
XP
415
Country
Germany
Yeah, exactly. But this is the reason we won't be able to make the current half-working firmware work via Hekate shenanigans. Either somebody somehow finds the payload in the binary .uf2 file and overwrites it, or we write this thing from scratch, which will take some time.

I think we could do both.
If we know what exact payload it is writing to the emmc we can start looking for it in the uf2 or bin file.

It is better to have an rp2040 which can be updated from the beginning though incase there is some logic in this closed firmware which was badly coded.
 
  • Like
Reactions: impeeza

binkinator

Garfield’s Fitness Coach
Member
GBAtemp Patron
Joined
Mar 29, 2021
Messages
6,512
Trophies
2
XP
5,962
Country
United States
seems that is what is being said, though that is completely unnecessary as you can just do everything through hekate, clone your nand bkp onto the larger emmc and then expand the partition. I put a 256gb in mine without anything other than the emmc board and a big microsd.
As long as you’re on a V1, this is correct.
 
  • Like
Reactions: sith and impeeza

Piorjade

Well-Known Member
Member
Joined
Nov 8, 2015
Messages
141
Trophies
0
XP
384
Country
Gambia, The
I think we could do both.
If we know what exact payload it is writing to the emmc we can start looking for it in the uf2 or bin file.

It is better to have an rp2040 which can be updated from the beginning though incase there is some logic in this closed firmware which was badly coded.
We can find the payload that was written in the boot0 if somebody provides a boot0 dump after using the current firmware. We can look at the BCTs in the boot0 dump and find out where the payload was written. Then we'll need to look for the same payload in the .uf2 firmware.
 

FruithatMods

Well-Known Member
Member
Joined
Dec 16, 2018
Messages
128
Trophies
0
Age
33
XP
415
Country
Germany
We can find the payload that was written in the boot0 if somebody provides a boot0 dump after using the current firmware. We can look at the BCTs in the boot0 dump and find out where the payload was written. Then we'll need to look for the same payload in the .uf2 firmware.
Good! Then we are all on the same page.

If someone here has a switch with a removable emmc who wants to dump the firmware after attaching the waveshare board let us all know!
 

Piorjade

Well-Known Member
Member
Joined
Nov 8, 2015
Messages
141
Trophies
0
XP
384
Country
Gambia, The
Good! Then we are all on the same page.

If someone here has a switch with a removable emmc who wants to dump the firmware after attaching the waveshare board let us all know!
I don't know personally, but can't Hekate dump boot0 itself? That way no eMMC removing will be needed.
 
  • Like
Reactions: Tafty

Tafty

Well-Known Member
Member
Joined
Sep 23, 2016
Messages
116
Trophies
0
Age
35
XP
857
Country
Good! Then we are all on the same page.

If someone here has a switch with a removable emmc who wants to dump the firmware after attaching the waveshare board let us all know!

You can dump the boot0 with hekate... I can provide anyone with the boot0 based on the current Linux firmware we have, but I can't post it here obviously, so it makes more sense for anyone that wants it to PM me and I will send it across.
 

binkinator

Garfield’s Fitness Coach
Member
GBAtemp Patron
Joined
Mar 29, 2021
Messages
6,512
Trophies
2
XP
5,962
Country
United States
So, this only work in switch V1? In V2 that is not possible?!
V1 can boot up and act as an SD Card reader with a blank eMMC in place because you can inject a payload. Can’t do this with a Mariko. With Mariko you need a working eMMC so catch-22. This is where the cheap SDCard to eMMC reader comes in.
 
General chit-chat
Help Users
  • SylverReZ @ SylverReZ:
    Hope they made lots of spaget
  • K3N1 @ K3N1:
    Chill dog
  • SylverReZ @ SylverReZ:
    Chilli dog
  • Skelletonike @ Skelletonike:
    Damn, I'm loving the new zelda.
  • xtremegamer @ xtremegamer:
    loving the new zelda, i started a game, it was so fucking good, so i
    am waiting on my friend to get home so we can start a new one together
  • Skelletonike @ Skelletonike:
    I just dislike that they don't let me choose the voices before the game starts. Happened with botw as well, had to change to japanese and restart.
  • K3N1 @ K3N1:
    But the important question is can you choose gender
  • Skelletonike @ Skelletonike:
    Same way you can choose Gerald's gender.
  • Skelletonike @ Skelletonike:
    *Geralt, damn autocorrect.
  • Psionic Roshambo @ Psionic Roshambo:
    But can he be trans? Lol
  • K3N1 @ K3N1:
    Zelda transforms into link
  • Psionic Roshambo @ Psionic Roshambo:
    Link I'm not the princess your looking for.... *Pulls a crying game*
  • K3N1 @ K3N1:
    *skirt up* it's exactly what I always wanted
  • Skelletonike @ Skelletonike:
    Just scanned all my zelda amiibos, took a while but didn't get anything that cool, did get the lon lon ranch hylian fabrics though.
  • Skelletonike @ Skelletonike:
    It was pretty funny when I scanned wolf link and got a shit load of meat.
  • K3N1 @ K3N1:
    @Skelletonike, btw I ran that custom for mgs4 on the deck I'm amazed it got that far in game
  • K3N1 @ K3N1:
    Plug in*
  • K3N1 @ K3N1:
    Your favorite activity
  • BentlyMods @ BentlyMods:
    My fav actvity is:

    mario-dancing.gif
  • Psionic Roshambo @ Psionic Roshambo:
    Do the Mario lol
  • K3N1 @ K3N1:
    🍑
  • K3N1 @ K3N1:
    Whoever developed Bramble was smoking that good shit fucking gnomes
    K3N1 @ K3N1: Whoever developed Bramble was smoking that good shit fucking gnomes