Hacking Hardware Picofly - a HWFLY switch modchip

binkinator

Garfield’s Fitness Coach
Member
GBAtemp Patron
Joined
Mar 29, 2021
Messages
6,511
Trophies
2
XP
6,155
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
142
Trophies
0
XP
407
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
34
XP
450
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
34
XP
107
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
142
Trophies
0
XP
407
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
188
Trophies
1
XP
1,551
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
34
XP
450
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,511
Trophies
2
XP
6,155
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
142
Trophies
0
XP
407
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
34
XP
450
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
142
Trophies
0
XP
407
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
36
XP
923
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,511
Trophies
2
XP
6,155
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.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    SylverReZ @ SylverReZ: https://www.youtube.com/watch?v=v9HgJ3SgjpA +1