RELEASE Firmware Version Inspector - get FW version from NAND dump

Discussion in 'Switch - Exploits, Custom Firmwares & Soft Mods' started by shchmue, Aug 18, 2018.

  1. GothicIII

    GothicIII GBAtemp Advanced Fan

    Member
    5
    Jan 4, 2015
    Gambia, The
    How about installing the pycryptodome module like it is told on 1st page?
     
  2. shchmue
    OP

    shchmue GBAtemp Advanced Fan

    Member
    7
    Dec 23, 2013
    United States
    Currently up to date with 8.0.1 filenames and I added support for using the officially-dumped device.keys file from biskeydump and the prod.keys that contains biskeys dumped by Lockpick/Lockpick_RCM
     
    Draxzelex, Taorn and charlieb like this.
  3. JungleJackNL

    JungleJackNL Newbie

    Newcomer
    1
    Jun 6, 2019
    Netherlands Antilles
    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.

    upload_2019-6-7_0-48-7.
     
    Last edited by JungleJackNL, Jun 7, 2019
  4. JungleJackNL

    JungleJackNL Newbie

    Newcomer
    1
    Jun 6, 2019
    Netherlands Antilles
    I fixed my issue. Maybe i have overlooked this part, but if someone runs into this issue; on Github there is a file named crypto,py and the file needs to be placed in the root of Phyton. Maybe it was just dumb to not download it, but i didnt. Now it works.
     
  5. shchmue
    OP

    shchmue GBAtemp Advanced Fan

    Member
    7
    Dec 23, 2013
    United States
    that should be in the same folder as FVI.py
     
  6. mynameispotato

    mynameispotato Newbie

    Newcomer
    1
    Jun 11, 2019
    Italy
    Hi, I tried to install the command "
    pip install pycryptodome"
    but I always have this error
     

    Attached Files:

  7. Taorn

    Taorn GBAtemp Regular

    Member
    4
    May 27, 2017
    United States
    You need to execute pip from the cmd. Search for cmd or cmd.exe and try it there.
     
    mynameispotato likes this.
  8. mynameispotato

    mynameispotato Newbie

    Newcomer
    1
    Jun 11, 2019
    Italy
    I tried to give the administrator command but it gives me this error
     

    Attached Files:

    • er1.PNG
      er1.PNG
      File size:
      3.8 KB
      Views:
      0
  9. FajitaJohn

    FajitaJohn Member

    Newcomer
    2
    Nov 1, 2018
    Austria
    Hey guys, getting the "/Contents/ not found" error some users experienced before.
    As far as I know, my Keys should be correct (copied them from the prod.keys file and split the 64-digit part up into two 32-digit parts, just like a user reported before)

    Any ideas?

    /Edit: Maybe related, but when I try dumping my keys with lockpick, I get an error that says I should reboot and try again (which I did and didn't work)

    /EDIT2: My bad. Seems like my Keys were wrong... Dunno why. They were created by LockPick. biskeydump, however, provided the correct keys.
    Looks like my Backup was made on 3.0.2 :)
     
    Last edited by FajitaJohn, Jun 16, 2019
  10. shchmue
    OP

    shchmue GBAtemp Advanced Fan

    Member
    7
    Dec 23, 2013
    United States
    updated for 8.1.0! seems like this is getting more use lately thanks to atmosphere emunand :)
     
    hippy dave likes this.
  11. profiden

    profiden Member

    Newcomer
    1
    Jan 18, 2014
    United States
    I am getting this error:

    > python FVI.py -b=device.keys .\full.00.bin
    Firmware Version Inspector - by shchmue

    Usage: FVI.py [-b=/path/to/biskeyfile] <dumpfile>
    biskeyfile must contain the following lines:
    BIS Key 2 (crypt): <32-digit hex key>
    BIS Key 2 (tweak): <32-digit hex key>
    or
    bis_key_02 = <64-digit hex key>
    omit -b if System partition already decrypted (eg. dumped with HacDiskMount)
    dumpfile must be NAND dump (eg. Hekate rawnand.bin dump) or System partition


    This is my format device.keys file:
    secure_boot_key = asdf
    tsec_key = asdf
    device_key = asdf
    bis_key_00 = asdf
    bis_key_01 = asdf
    bis_key_02 = asdf
    bis_key_03 = asdf


    I am using a splitted nand from SX OS and a device.keys (from biskeydump).
     
    Last edited by profiden, Jun 21, 2019
  12. shchmue
    OP

    shchmue GBAtemp Advanced Fan

    Member
    7
    Dec 23, 2013
    United States
    i think the error is due to the `.\` syntax but also this tool unfortunately does not support split dumps. good idea for a feature, since many people use them

    edit: that syntax is fine, maybe it's the relative path to the bis key file? either way it's not going to work on a split dump right now
     
    Last edited by shchmue, Jun 22, 2019
  13. aos10

    aos10 ❤ Zelda ❤\(^o^)/

    Member
    11
    Apr 10, 2012
    Saudi Arabia
    i am getting this error

    H:\My Switch Backup\Backup 4.1>python FVI.py -b=keys.txt rawnand.bin
    python: can't open file 'FVI.py': [Errno 2] No such file or directory
     
  14. aos10

    aos10 ❤ Zelda ❤\(^o^)/

    Member
    11
    Apr 10, 2012
    Saudi Arabia
    is biskeys.txt is the same of keys.txt?
     
  15. DarthFern

    DarthFern Newbie

    Newcomer
    1
    Nov 22, 2018
    United States

    C:\Users\mrc48>AppData\Local\Programs\Python\Python37-32>python FVI.py D:\switch games\nand\biskeydump.txt D:\switch games\nand\rawnand.bin
    'AppData\Local\Programs\Python\Python37-32' is not recognized as an internal or external command,
    operable program or batch file.


    Honestly have no idea what I'm doing. this is where I am so far.
     
    Last edited by DarthFern, Jul 12, 2019
  16. Garou

    Garou GBAtemp Maniac

    Member
    7
    Jan 13, 2015
    where did you install python?
    and did you select add python to PATH while installing?

    [​IMG]

    although I think I have an idea on where you install it so try this
    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"
    
     
  17. Saebas

    Saebas Newbie

    Newcomer
    1
    Jul 13, 2019
    Chile
    Hi guys. I'm trying to check the firmware of my first backup.

    I tried using Python 3.7 64bit on windows 10, but I got the same error again and again saying it didn't found the BIS keys.

    So I tried with Python 32bit, but now it says this:

    E:\test>python FVI.py [-b=biskeydump64.txt] rawnand.bin
    Traceback (most recent call last):
    File "FVI.py", line 9, in <module>
    from Crypto import XTSN
    File "E:\test\Crypto.py", line 2, in <module>
    from Crypto.Cipher import AES
    ModuleNotFoundError: No module named 'Crypto.Cipher'; 'Crypto' is not a package
     
  18. shchmue
    OP

    shchmue GBAtemp Advanced Fan

    Member
    7
    Dec 23, 2013
    United States
    did you follow the instructions, particularly the pip bit
     
  19. DarthFern

    DarthFern Newbie

    Newcomer
    1
    Nov 22, 2018
    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"
    Firmware Version Inspector - by shchmue

    Dump is full EMMC raw NAND.
    Traceback (most recent call last):
    File "C:\Users\mrc48\AppData\Local\Programs\Python\Python37\FVI.py", line 187, in <module>
    crypt = bytes.fromhex(line[key_index:key_index+0x20])
    ValueError: non-hexadecimal number found in fromhex() arg at position 0


    I reinstalled everything and tried again. Closer but not sure what this error means.
     
  20. shchmue
    OP

    shchmue GBAtemp Advanced Fan

    Member
    7
    Dec 23, 2013
    United States
    that's to do with the format of your bis key file. what's it look like?
     
Loading...