A few questions about TWLN/TWLP partitions

Discussion in '3DS - Flashcards & Custom Firmwares' started by Wojton, Apr 2, 2016.

  1. Wojton
    OP

    Wojton GBAtemp Regular

    Member
    180
    66
    Mar 7, 2014
    Poland
    In reference to my previous thread, which seems to be dead by now, I'd like to ask a few more questions regarding TWLN/TWLP partitions. It seems that they are partially corrupted on my O3DS running 10.7.0-32E with A9LH. I can launch DS titles, but can't set up DS internet connection, trying to do that through DS connection settings ends up in freeze on the "looking for access points" screen. Because of that, DS games throw out an error while trying to connect to WFC. I've decribed the problem in detail in the previous thread.

    From what I've learned, TWLN (and perhaps TWLP too?) partition is at fault. Unfortunatelly, I haven't made a backup of these partitions (at the time when I was installing A9LH, Plailect's guide didn't say to make it). I'm also not entirely sure when the problem started, restoring my oldest sysNAND backup (9.2, used with rxTools) doesn't fix the issue. So here are my questions:
    • Is there any way I can "rebuild" these partitions without a NAND backup that was made when DS mode was functioning properly? I went as far as downgrading to 2.1 firmware and then updating to 10.7, but the problem is still there.
    • Can I crossflash TWLN/TWLP from another, functioning 3DS, running the same firmware with A9LH?
    • Is there some console-specific data (like MAC adress) stored in TWLN/TWLP, that I'd need to replace after crossflashing these partitions from another system?
    • I can browse the TWLN/TWLP partitions with GodMode9, can I try replacing some of the files present there with those taken from a 3DS with working DS mode? If so, which files are related to DS internet connection setup app? Does GodMode9 show ALL the files in these partitions (I'm asking that because TWLN/TWLP dump files are significatly bigger than total size of all the files shown by GodMode9 on these partitions)?
    • Any other ideas on how can I get DS Mode back to work properly?

    Thanks in advance for helping me out.
     
    Last edited by Wojton, Apr 2, 2016
  2. Gray_Jack

    Gray_Jack GBAtemp Advanced Fan

    Member
    722
    261
    Jan 13, 2016
    Maybe @d0k3 may know the answers
     
  3. d0k3

    d0k3 3DS Homebrew Legend

    Member
    2,560
    2,579
    Dec 3, 2004
    Gambia, The
    Take note that I changed your list above to use numbers instead of bullet points. In general: this does not sound like a corrupted partition to me. The problem may be somewhere else.

    1. Why don't you have a pre FW 2.1 SysNAND backup with these partitions working?
    2. No idea maybe it would work fine, but if you try it, let us know about the results. And make a backup.
    3. See above
    4. See above. Look around on 3dbrew.org and DSibrew.org for info on these files. As for these files, that most likely has to do with cluster sizes (ie. each file uses up at least x byte, even if the actual file size is lower). GodMode9 shows all files.
    5. Nope, but if you get yourself properly informed, I'm pretty sure you will manage to do it.
     
    Last edited by d0k3, Apr 2, 2016
    Wojton and Gray_Jack like this.
  4. Wojton
    OP

    Wojton GBAtemp Regular

    Member
    180
    66
    Mar 7, 2014
    Poland
    1.I have a sysNAND backup made before A9LH installation. It's 9.2 sysNAND (+10.6 emuNAND) that I've used with menuhax+rxTools setup. Thing is, after restoring it (I've tried both 9.2 sysNAND and 10.6 emuNAND from that setup), the problem is still there, which leads me to believe that it started earlier - unfortunatelly, I can't exactly pinpoint when, because it's not often I try to play DS games on my 3DS (I have DS Lite for that). Back when I was using rxTools, I've had a problem with initial setup ("Data suite" installation) and someone suggested to download TWL_FIRM and AGB_FIRM with 3DNUS and replace the existing ones in my sysNAND. After doing it I no longer had a problem with rxTools, but now I'm thinking perhaps this is what started the DS mode problem? I can't tell for sure. I've had a multiple other NAND backups, some made before I even installed rxTools (back on 10.3 FW with menuhax 2.1) but I've deleted most of them realising that I probably won't be using rxTools again... and then I found out about the DS Mode problem.

    2.I certainly will ;)

    4.I've been looking on 3dbrew.org so often lately that I can nearly tell TWL partition structure from memory :D I've also tried uninstalling all TWL cia's from NAND with FBI (yes, the console still works fine after that, in case you were wondering) and reinstalling the files downloaded by 3DNUS (DS version data, DS INTERNET app, Download Play, DS Cart Whitelist), but it didn't make a difference - it still freezes when I try to setup a DS connection. I've also compared the contents of TWLN partition from old rxTools and current A9LH NAND backup and aside from 1 DS app, which I don't think is related to the problem, they are identical.

    5.At this point, I have tried everything I can think of. I'll try cross flashing TWLN parition from my friend's 3DS later.
     
    Last edited by Wojton, Apr 2, 2016
    d0k3 likes this.
  5. Wojton
    OP

    Wojton GBAtemp Regular

    Member
    180
    66
    Mar 7, 2014
    Poland
    I have cross-flashed TWLN parition from my friend's 3DS, with fully functioning DS Mode. It hasn't fixed my problem, but I'll share what I have learned, maybe someone will find it useful at some point:
    1. Yes, you can cross-flash the TWLN partition from another 3DS. It does NOT cause a brick, but you might not be able to get into DS Mode, unless some console-specific files are restored from original TWLN partition (read below).
    2. Deleting all files in TWLN parition results in a semi-brick (black screen on startup). It's fixable with A9LH/3DS recovery mode.
    3. Using a hex editor, I've compared all of the files present on TWLN partitions of two, different, old 3DS's, both running 10.7.0-32E. All of the files in TWLN dumps taken from different 3DS's are identical, except:
    • TWLN/shared2/0000 -> no idea what is this file, it has exactly same size on but completely different contents on each 3DS system. My guess is that this file is crucial for DS Mode functionality, but its contents are a mystery.
    • TWLN/sys/log/inspect.log -> this log contains some console-specific data, like 3DS serial number and a MAC-adress (although it does not match the MAC of the console)
    • TWLN/sys/log/product.log -> this is a 3DS hardware check log, probably left by factory (judging by the timestamp)
    • TWLN/title/0003000f/484e4841/content/cmd/0000000(3).cmd ->the first byte of that file differs between systems, it corresponds to the last character in the filename.
    All of the other files present on TWLN partitions are byte-to-bye identical on both TWLN dumps.

    After restoring TWLN dump taken from 3DS with fully functioning DS Mode and replacing the above files with the ones taken from my own TWLN dump, I could get into DS Mode (through Internet settings->Nintendo DS connections), but it was still freezing, exactly like with my own TWLN. So it looks like either the problem lies somewhere else, as d0k3 suspected, or I have corrupted one of the above files long before installing A9LH, Either way, with no NAND backups dating back before the problem started (I don't even know what that date is), I'm not able to fix it as of now. Oh well, I can live with that :)
     
    Last edited by Wojton, Apr 7, 2016
    d0k3 likes this.
  6. Wojton
    OP

    Wojton GBAtemp Regular

    Member
    180
    66
    Mar 7, 2014
    Poland
    Another update: I have finally fixed the issue. Turns out that TWLN had nothing to do with it. The Wi-Fi module didnt have proper contact with the motherboard. I've dissasembled my 3DS, unplugged it, plugged it back and the DS mode works like a charm! :)
     
    Arubaro, dark_samus3 and d0k3 like this.
  7. d0k3

    d0k3 3DS Homebrew Legend

    Member
    2,560
    2,579
    Dec 3, 2004
    Gambia, The
    Thanks for sharing this, by the way. Might help in further research!
     
  8. d0k3

    d0k3 3DS Homebrew Legend

    Member
    2,560
    2,579
    Dec 3, 2004
    Gambia, The
    That one. I checked that file, it is a 2MB big FAT12 image, with no files in it for me. Now, if you really got two different ones, it would be pretty interesting what the real difference is. Good thing is: Most recent GodMode9 can mount images (you need to compile yourself from source), and so can OSFMount on Windows.

    EDIT: Or, check out this post: https://gbatemp.net/threads/release...rowser-for-the-3ds.420027/page-8#post-6242644
     
    Last edited by d0k3, Apr 8, 2016
    Wojton and WhoAmI? like this.
  9. WhoAmI?

    WhoAmI? PASTA's dirty animal

    Member
    1,273
    1,009
    Mar 15, 2015
    Poké Ball
    Off topic but that Image Mount thing sounds like fun!! :D
     
  10. d0k3

    d0k3 3DS Homebrew Legend

    Member
    2,560
    2,579
    Dec 3, 2004
    Gambia, The
    Off-topic, too, but it also allows you to mount NAND images now :). But, let's stay on track.
     
    WhoAmI? likes this.
  11. Wojton
    OP

    Wojton GBAtemp Regular

    Member
    180
    66
    Mar 7, 2014
    Poland
    By "different contents" I meant that these files show up completely differently in hex editor. I haven't actually extracted their contents, bad choice of words :) I no longer have my friend's TWLN partition dump since my own works fine. I can tell you however that it was very likely empty aswell, because replacing this file had no effect on DS mode functionality.
     
    Last edited by Wojton, Apr 9, 2016
  12. Asia81

    Asia81 In my Ecchi World <3

    Member
    4,861
    2,341
    Nov 15, 2014
    France
    Albi
    why setup wfc for ds?
    the server is dead...
     
  13. Wojton
    OP

    Wojton GBAtemp Regular

    Member
    180
    66
    Mar 7, 2014
    Poland