Hacking RELEASE Firmware Version Inspector - get FW version from NAND dump

DarthFern

Member
Newcomer
Joined
Nov 22, 2018
Messages
8
Trophies
0
Age
34
XP
58
Country
United States
that's to do with the format of your bis key file. what's it look like?

Like this but with the numbers from my biskey dump
 

Attachments

  • Screenshot (134).png
    Screenshot (134).png
    54.2 KB · Views: 216

DarthFern

Member
Newcomer
Joined
Nov 22, 2018
Messages
8
Trophies
0
Age
34
XP
58
Country
United States
that's to do with the format of your bis key file. what's it look like?

C:\Users\mrc48>C:\Users\mrc48\AppData\Local\Programs\Python\Python37\FVI.py -b="D:\switch games\nand\biskeydump 2.txt" "D:\switch games\nand\rawnand.bin"

C:\Users\mrc48>


Just tried the same prompt again and now it doesnt load anything anymore. Not sure what I'm doing wrong.
 

JAWS_XS

Well-Known Member
Newcomer
Joined
Feb 3, 2007
Messages
69
Trophies
0
XP
430
Country
United States
where did you install python?
Code:
%HOMEPATH%\AppData\Local\Programs\Python\Python37-32\python.exe FVI.py -b="D:\switch games\nand\biskeydump.txt" "D:\switch games\nand\rawnand.bin"

thanks! Once I typed it out like this it worked.

Thanks shchmue for making this tool! It was back in December when I made my nand backup. 4.1 non exfat.
 
Last edited by JAWS_XS,
  • Like
Reactions: shchmue

DarthFern

Member
Newcomer
Joined
Nov 22, 2018
Messages
8
Trophies
0
Age
34
XP
58
Country
United States
the key file doesn't have those angle brackets does it


C:\Users\mrc48>C:\Users\mrc48\AppData\Local\Programs\Python\Python37\FVI.py -b="D:\switch games\nand\biskeydump 2.txt" "D:\switch games\nand\rawnand.bin"

C:\Users\mrc48>


Ok I took the brackets off but now I can't get the tool to load anymore.
 

shchmue

Developer
OP
Developer
Joined
Dec 23, 2013
Messages
791
Trophies
1
XP
2,367
Country
United States

C:\Users\mrc48>C:\Users\mrc48\AppData\Local\Programs\Python\Python37\FVI.py -b="D:\switch games\nand\biskeydump 2.txt" "D:\switch games\nand\rawnand.bin"

C:\Users\mrc48>


Ok I took the brackets off but now I can't get the tool to load anymore.
that time you didn't type python first
 

designgears

Well-Known Member
Member
Joined
Aug 8, 2016
Messages
291
Trophies
0
XP
671
Country
United States
Ah yes it had the wrong titleid. Try it now?

Also, added 9.0.0 support.

The error is gone, but still not returning the version.

Code:
Firmware Version Inspector - by shchmue

Dump is System partition.
BIS keys not provided. Assuming dump already decrypted.
Found FAT boot sector!

Scanning root for /Contents/...
/Contents/ found at cluster 0x3 address 0x148000

Scanning root for /save/...
/save/ found at cluster 0x3c81 address 0xf340000

Scanning /save/ for System Savegame 8000000000000060...
Success! Found /save/8000000000000060.

Scanning /Contents/ for /registered/...
/registered/ found at cluster 0x5 address 0x150000

Scanning FAT for fragmentation...
/registered/ clusters:  ['0x5', '0x2fd8', '0x12b34']
Buffered 3 /registered/ clusters. Reading filenames...

Success! Found 174 NCA filenames.
System Version Title not found!

This is the error I got before, it wasn't able to find the most recent boot time so the date was bad.

Code:
Firmware Version Inspector - by shchmue

Dump is System partition.
BIS keys not provided. Assuming dump already decrypted.
Found FAT boot sector!

Scanning root for /Contents/...
/Contents/ found at cluster 0x3 address 0x148000

Scanning root for /save/...
/save/ found at cluster 0x3c81 address 0xf340000

Scanning /save/ for System Savegame 8000000000000060...
Success! Found /save/8000000000000060.
Traceback (most recent call last):
  File "FVI.py", line 276, in <module>
    most_recent_boot = get_modify_date_and_time(cluster, block_ptr)
  File "FVI.py", line 113, in get_modify_date_and_time
    time >> 11, (time >> 5) & 0x3f, time & 0x1f)
ValueError: month must be in 1..12
 
Last edited by designgears,

designgears

Well-Known Member
Member
Joined
Aug 8, 2016
Messages
291
Trophies
0
XP
671
Country
United States
Pushed a little update that supports the monolithic boot0+boot1+rawnand emummc bin

edit: realize i made a mistake, if you had trouble please try again with current version

I had to comment out "most_recent_boot = get_modify_date_and_time(cluster, block_ptr)", then it worked!

Code:
Firmware Version Inspector - by shchmue

Dump is full EMMC raw NAND.
Loaded BIS keys.

Found FAT boot sector!

Scanning root for /Contents/...
/Contents/ found at cluster 0x3 address 0x148000

Scanning root for /save/...
/save/ found at cluster 0x3c81 address 0xf340000

Scanning /save/ for System Savegame 8000000000000060...
Success! Found /save/8000000000000060.

Scanning /Contents/ for /registered/...
/registered/ found at cluster 0x5 address 0x150000

Scanning FAT for fragmentation...
/registered/ clusters:  ['0x5', '0x2fd8']
Buffered 2 /registered/ clusters. Reading filenames...

Success! Found 167 NCA filenames.

Firmware version found: 1.0.0 (no exFAT)
Most recent boot:

Here is the error I got before I commented that line out.
Code:
Firmware Version Inspector - by shchmue

Dump is full EMMC raw NAND.
Loaded BIS keys.

Found FAT boot sector!

Scanning root for /Contents/...
/Contents/ found at cluster 0x3 address 0x148000

Scanning root for /save/...
/save/ found at cluster 0x3c81 address 0xf340000

Scanning /save/ for System Savegame 8000000000000060...
Success! Found /save/8000000000000060.
Traceback (most recent call last):
  File "FVI.py", line 278, in <module>
    most_recent_boot = get_modify_date_and_time(cluster, block_ptr)
  File "FVI.py", line 115, in get_modify_date_and_time
    time >> 11, (time >> 5) & 0x3f, time & 0x1f)
ValueError: month must be in 1..12

If I dump time and date out I get zeros

Code:
Scanning /save/ for System Savegame 8000000000000060...
Success! Found /save/8000000000000060.
0
0
 
Last edited by designgears,

sh0wst0pper

Well-Known Member
Newcomer
Joined
Jun 6, 2018
Messages
99
Trophies
0
Age
43
XP
782
Country
United Kingdom
Thanks for this. I have my nand dumped with SX OS - how do i change the multiple .bin files to a single .bin file? Or can this app support the sx os dump?
 

shchmue

Developer
OP
Developer
Joined
Dec 23, 2013
Messages
791
Trophies
1
XP
2,367
Country
United States
I had to comment out "most_recent_boot = get_modify_date_and_time(cluster, block_ptr)", then it worked!
ahh is that a backup done before first boot? timestamps would be invalid then, i just added a try + except block to catch that

right now i'm working on porting this to C so i can release an exe and use an established FAT library instead of my janky one
 

designgears

Well-Known Member
Member
Joined
Aug 8, 2016
Messages
291
Trophies
0
XP
671
Country
United States
ahh is that a backup done before first boot? timestamps would be invalid then, i just added a try + except block to catch that

right now i'm working on porting this to C so i can release an exe and use an established FAT library instead of my janky one

I know I booted one of them, I bought it locally still on 1.0.0, had him boot it up to show me. They both throw the same error.
 

fixx1983

Well-Known Member
Newcomer
Joined
Aug 24, 2014
Messages
80
Trophies
0
Age
40
XP
716
Country
Italy
Hi, i'm trying this here Python stuff and got pretty far, but cannot seem to fix this error below. Installed the 32-bit version, did the pip install and renamed the Crypto folder to crypto. But still not getting the results. Any idea? Also tried to rename all the subfolders to use lowercase letters at the beginning of the foldername.. no lucky. Also, don't know if there should be an XTSN subfolder in site-packaged\crypto, but there is not.

View attachment 169282

I've the same identical issue, but there is no way I can bypass it. Tried almost anything in this topic.
 

AlejandraTr

New Member
Newbie
Joined
Oct 19, 2019
Messages
1
Trophies
0
Age
26
XP
43
Country
Spain
python3 /Users/Alejandra/Desktop/FVI-master/FVI.py -b=/Users/AlejandraTr/Desktop/biskeys.txt /Users/AlejandraTr/Desktop/Hack\ Switch/backup\ 8.0.0/25ac4d49/restore/rawnand.bin

Firmware Version Inspector - by shchmue

Dump is full EMMC raw NAND.

Loaded BIS keys.


Found FAT boot sector!


Scanning root for /Contents/...

/Contents/ not found.


I have this problem. Help!
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    NinStar @ NinStar: It will actually make it worse