[Release] UpdateCDN - download 3DS FW contents, create installable .cia

Discussion in '3DS - ROM Hacking, Translations and Utilities' started by cearp, Dec 14, 2014.

  1. cearp
    OP

    cearp the ticket master

    Member
    7,510
    4,744
    May 26, 2008
    Tuvalu
    Ok so here is something I was working on recently - 'UpdateCDN'
    It downloads the titles ('programs') that make up a 3DS FW update and create .cias to use with devmenu (import all - L+R+A is useful here!)
    It uses the CSV files on http://yls8.mtheall.com/ninupdates/reports.php - without the work this guy did to get this data in the first place this would not exist!

    From my 4.5 JPN emunand, I manually updated to 6.3, and then manually downgraded (via an ugly trick/hack) to 5.1. It all worked fine!
    I tried to go from 4.5 JPN to 5.0 KOR, but my system was still Japanese. I had some duplicate (Korean) titles, like eshop, safety warning, settings, etc, which didn't load when I opened them. So to change regions (surely it must be possible) we will have to do something more involved.

    So, you download the csv file you want, for example, 5.0.0-11 Korean, and this tool will download everything, and create 'perfect' (as perfect as we will get them I think) cia files that will install on your 3DS.
    You don't need to download any files for 2.0.0-2 - 9.4.0-21 because I downloaded virtually all of them and included them in a zip. (I left out one Japanese fw that didn't have a name, it was after 8.1 and before 9.0, I don't think anyone will miss it)

    The tool is a python file, it requires make_cdn_cia. I have included a mac version that works for me. I have not included a windows exe version, but I am sure it is not hard to find/someone can compile it. -- name the exe make_cdn_cia.exe and put it in the folder with the UpdateCDN.py. (It should work fine, but I have not tested it on windows.)
    I have not used python before, so maybe the things I am doing are not the best way, but it seems fine to me :)

    By default the titles are downloaded into folders based on when they were last updated. (This can be turned on with -nosort)
    When I download FW 9.4.0-21 JPN, title '0004001B00010002' has not been updated since 2.0.0-2 (maybe before, the site 'began' with 2.0.0-2).
    So this title will be in a folder called 2.0.0-2. If you are above FW 2.0.0-2, you do not need to install that cia.
    If you are on 8.0.0-18, and want to go to 9.4.0-21, simply ignore all the cias in the folders equal and below 8.0.0-18.
    (I could have let the user input a 'source' FW and 'target' FW to only download titles are are required but, it would have been more work. - maybe later, but it's not neccesary)

    Dir Output
    UpdateCDN
    -9.4.0-12 (folder created from CSV filename, 9.4.0-21.csv will make a folder called 9.4.0-21)
    --JPN (separate folder for each region you specify)
    ---raw (where titles are downloaded to)
    ---cia (where cia files are output to)

    Here is how to use it / the help output you get when you type: python UpdateCDN.py -h
    You need to specify an input file and at least one region.
    Code:
    inputfile  CSV file that contains title information, ideally from:
              http://yls8.mtheall.com/ninupdates/reports.php
    -JPN        Download JPN titles
    -EUR        Download EUR titles
    -USA        Download USA titles
    -KOR        Download KOR titles
    -CHN        Download CHN titles
    -TWN        Download TWN titles
    -ALL        Download all regions
    -nosort    Turn OFF sorting of the titles into folders based on their debut
              fw. For example, if title X was added in FW 4.0.0 and not
              updated since, by default it is placed in a folder called 4.0.0.
              So, if you are on 4.0.0 or above, you will not need to install
              it.
    -nobuild    Turn OFF generation of CIA files, titles will be downloaded
              only.
    -h, --help  show this help message and exit
    What would be great is to have an edited devmenu/homebrew title manager that lets us view system titles/downgrade titles etc. Then we would be able to downgrade a lot neater and easier without leaving unused titles still installed. (Maybe region change would be possible then too)

    Of course, be careful with using this, it's only on emunand (since we mere mortals don't have devmenu on sysnand), but make a emunand backup. :)

    Thanks for friendxsis for help and letting me know that what i wanted to do was possible, riku for help, http://yls8.mtheall.com - the guy who does this, sbJFn5r for the python files I based some of this off!

    for windows people try this:

    https://github.com/ctrdev/ctrsdk/blob/master/tools/make_cdn_cia/bin/make_cdn_cia.exe?raw=true
    put it in the folder with UpdateCDN.py, it should/might work :)
     

    Attached Files:



  2. Zeffy

    Zeffy Member

    Newcomer
    49
    30
    Dec 12, 2014
    Gambia, The
    This is really neat, nice job!
     
    Margen67 and Gomza like this.
  3. Apache Thunder

    Apache Thunder I have cameras in your head!

    Member
    4,102
    4,033
    Oct 7, 2007
    United States
    Levelland, Texas
    I wonder if one could find a way to downgrade the internal nand using this. If the files are unedited, they should still pass signature checks. It's just a matter of finding a way of installing them without the console exploding. :P

    I suppose only those with a NAND mod to restore backups would be brave enough to try and develop something to make that a reality. :P

    Of coarse you still have to have an exploitable firmware running as obviously you can't just install stuff without a way of running homebrew. So even then, not sure what use would come of it. Perhaps if for some odd reason users of Gateway on fw 9.2 wanted to downgrade to 4.5 if Gateway fails to provide as many features for the new firmware support (like emuNand).

    But this is mainly for those wanting to modify their emunand installation. :P
     
  4. hundshamer

    hundshamer GBAtemp Advanced Maniac

    Blacklisted Trader
    1,810
    806
    May 22, 2009
    United States
    I have a mod. Sadly I'm more hardware than software. I can test if the case ever arisen.
     
    cearp likes this.
  5. loco365

    loco365 GBAtemp Guru

    Member
    5,458
    2,674
    Sep 1, 2010
    I'm actually really curious, but is there perhaps files for the 1.1 (Or was it 1.2?) update that included the White Knuckles music video? I'd really like to reinstall that on an emuNAND.
     
  6. LinkmstrYT

    LinkmstrYT ( ͡° ͜ʖ ͡°)

    Member
    1,462
    801
    Dec 16, 2013
    United States
    You wanted to see where I live? You stalker...
    Well, I came in to expect something like being able to upgrade/downgrade 3DS firmwares. Oh well, this is still pretty neat though.
     
  7. loco365

    loco365 GBAtemp Guru

    Member
    5,458
    2,674
    Sep 1, 2010
    Well, when you think hard about it, 9.0-9.2 support will probably not run under emuNAND, so anything you install will install to sysNAND, which means you will be physically downgrading your system if you install these CIAs. You'd have to be absurdly careful when installing these to ensure you don't accidentally brick your system, such as having a NAND flasher just in case.

    The benefit to this though, is that you can upgrade to a GW-compatible firmware, then downgrade to 4.X and have even more Gateway support though, such as emuNAND.
     
  8. Rinnux

    Rinnux GBAtemp Advanced Fan

    Member
    655
    313
    Aug 3, 2010
    United States
    I don't see any reason why 9.0-9,2 wouldn't support emunand.
     
  9. loco365

    loco365 GBAtemp Guru

    Member
    5,458
    2,674
    Sep 1, 2010
    You know how the Gateway team said that if you're on 4.X to stay there? Well, if you're not, you might soon be able to.
     
    Margen67 likes this.
  10. Rinnux

    Rinnux GBAtemp Advanced Fan

    Member
    655
    313
    Aug 3, 2010
    United States
    I think they said that because they didn't want people to have to wait for support and they didn't want to promise support then run into some unforeseeable roadblock.
     
    rainparadesamurai likes this.
  11. andre104623

    andre104623 GBAtemp Advanced Fan

    Member
    681
    214
    Apr 9, 2014
    United States
    Philadelphia, PA
    So let me get this straight so "in theory" if my jap new 3ds is hacked with the upcoming gateway exploit and if it has emunand I could install a USA update and have English?!

    Did you see there video? I didn't see no roadblock
     
  12. Rinnux

    Rinnux GBAtemp Advanced Fan

    Member
    655
    313
    Aug 3, 2010
    United States
    I know. I'm just saying they didn't want to make promises JUST IN CASE something did happen.
     
  13. loco365

    loco365 GBAtemp Guru

    Member
    5,458
    2,674
    Sep 1, 2010
    They mentioned that they had 9.X support actually working before the proof video was released. Before that, anything higher than 4.5 was on their to-do list, and nothing more.
     
    Margen67 likes this.
  14. Duo8

    Duo8 I don't like video games

    Member
    3,440
    1,140
    Jul 16, 2013
    What was the "hack"? Did you change the version number?
     
    DarkRioru likes this.
  15. Apache Thunder

    Apache Thunder I have cameras in your head!

    Member
    4,102
    4,033
    Oct 7, 2007
    United States
    Levelland, Texas
    They probably told 4.5 users to stay on 4.5 because future firmware updates from Nintendo may block Gateway, and thus they don't want to be getting complaints from 4.5 users who accidentally updated to 9.3/9.4 trying to get to the "new" supported firmware. I don't think they said that because 9.2 support will have less features. Though it might have less features in the beginning since they are building things off a new exploit, so the old launcher.dat method will likely not be what they use in the new exploit.

    But ultimately, the new 9.0-9.2 support should eventually have emuNand support. If 9.3/9.4 does indeed block Gateway's exploit like everyone seems to be expecting, then that's all the more reason to work on getting emunand working. That may be why they haven't released the update yet. They want emuNand working out of the box. ;)
     
  16. LinkmstrYT

    LinkmstrYT ( ͡° ͜ʖ ͡°)

    Member
    1,462
    801
    Dec 16, 2013
    United States
    You wanted to see where I live? You stalker...
    In other words, you're saying that when Gateway releases their 9.0-9.2 support, it might be possible to downgrade sysNAND firmware to a more compatible one if the new 9.0-9.2 support doesn't have emuNAND features.
     
  17. loco365

    loco365 GBAtemp Guru

    Member
    5,458
    2,674
    Sep 1, 2010
    Exactly. They showed homebrew and dev menu stuff working, so it seems they have patched the system somehow. If my theory is correct, downgrading will become possible soon.
     
    Margen67 likes this.
  18. LinkmstrYT

    LinkmstrYT ( ͡° ͜ʖ ͡°)

    Member
    1,462
    801
    Dec 16, 2013
    United States
    You wanted to see where I live? You stalker...
    Well, from this release, it might be the start of it. Of course, we don't know until someone gives it a try and share results. Right now, we can only speculate if this release can actually downgrade sysNAND using Gateway's 9.0-9.2 support. Of course, I'm sure that downgrading would have some problems besides bricking like the New3DS since firmwares before 8.1 weren't exactly made for it and might cause some issues.
     
  19. ninjadudexp

    ninjadudexp GBAtemp Regular

    Member
    110
    21
    Aug 8, 2010
    United States
    This is intresting tho, i dont know if anyone has tested it on there own emunand, but from the video GW was posting, there installing .cia straight to the sysnand, so i guess its possible
     
  20. Duo8

    Duo8 I don't like video games

    Member
    3,440
    1,140
    Jul 16, 2013
    cearp use python make_cdn_cia so it works cross platform.
     
    cearp likes this.