[Testers needed] Injecting apps to H&S on a GW downgraded NAND

Discussion in '3DS - Homebrew Development and Emulators' started by d0k3, Nov 25, 2015.

  1. d0k3
    OP

    d0k3 3DS Homebrew Legend

    Member
    2,628
    2,649
    Dec 3, 2004
    Gambia, The
    Hi everyone, I'm currently improving app injection (to Health & Safety) in Decrypt9. Previously, injecting apps didn't work on downgraded NANDs, but now the detection routines have been improved (these changes are not public right now). To make sure my code really works, I need testers.

    Don't worry, you won't risk a brick of your SysNAND and if you follow the instructions, no damage will be done to EmuNAND either. If you want to help, write here in thread!
     
    Darkyose, AerGolem55 and Rizzorules like this.


  2. Rizzorules

    Rizzorules "What are you doing?" "Something unexpected."

    Member
    918
    367
    Aug 17, 2013
    Netherlands
    I would like to be a beta tester
     
    d0k3 likes this.
  3. sweis12

    sweis12 GBAtemp Maniac

    Member
    1,242
    513
    Oct 20, 2013
    Saint Kitts and Nevis
    I have an old 3ds with gateway downgraded to 4.2.0-9u
    I could give it a try. I have nothing to loose.
     
    d0k3 likes this.
  4. d0k3
    OP

    d0k3 3DS Homebrew Legend

    Member
    2,628
    2,649
    Dec 3, 2004
    Gambia, The
    Alright, great, the more the better! I'll put a new version up tomorrow. In the meantime, you can learn how to create the inject files here. You can't actually create the inject files now, cause Decrypt9 can't yet properly dump the app file from a GW downgraded NAND (tomorrow).

    Although the danger for your SysNAND is very small (injection has by now been tested by a lot of people, and the only change I'm introducing is reading, not writing some more stuff from the NAND), you can also test this on EmuNAND (your EmuNAND needs to be GW downgraded, of course).
     
    AerGolem55 and Rizzorules like this.
  5. sweis12

    sweis12 GBAtemp Maniac

    Member
    1,242
    513
    Oct 20, 2013
    Saint Kitts and Nevis
    I will try my Sysnand and see if it works. If it bricks I will cry though.
     
  6. d0k3
    OP

    d0k3 3DS Homebrew Legend

    Member
    2,628
    2,649
    Dec 3, 2004
    Gambia, The
    Don't worry, I'm careful, I don't have a hardmod yet myself :).

    @sweis12 & @Rizzorules : The attached release should fix the existing problems with H&S injection on a downgraded GW NAND. In fact, it should fix all existing issues with injection.

    Here's what needs to be tested (test #1):
    1. Dump the H&S app using the attached release, also read the output on screen. Method 1 (searching it in title.db) works, correct? Or, does it resort to method 2?
    2. Now, generate your inject file using this. You're free to inject anything you want, but for the next test (#2), System Updater or FBI would be a good choice.
    3. Inject it using the attached releases. Remember that you have to rename the .app you want to inject to 'hs.app'
    4. Now, does it work? Is your Health & Safety app replaced? Keep in mind this only works in GW mode or with some kind of CFW. Without, the Health & Safety app will either not work or not be displayed.
    If you have completed the first test and are willing to help further, do this (test #2):
    1. Now, update your previously GW downgraded system to something between 9.0.0 and 9.2.0. System updater is obviously a good choice to do that, and so is upgrading from a cart. I don't need to tell you that you have to be extra careful not the upgrade beyound 9.2, correct? ;).
    2. Repeat test #1 from it's first step. This time you are absolutely free to inject anything you like.
    Thanks in advance, both of you!
     

    Attached Files:

    Last edited by d0k3, Nov 25, 2015
    AerGolem55 likes this.
  7. Ammako

    Ammako GBAtemp Guru

    Member
    6,424
    3,546
    Dec 22, 2009
    Canada
    Out of curiosity, what's different between GW downgraded and a regular 3DS of the same version?
     
  8. Shadowtrance

    Shadowtrance GBAtemp Addict

    Member
    2,488
    1,517
    May 9, 2014
    Hervey Bay, Queensland
    Gateway is stupid and leaves files behind during the downgrade process which it shouldn't really do which therefore makes things like this (injecting apps) possibly have issues because of said leftover files.
    That's my understanding at least. :)
     
  9. d0k3
    OP

    d0k3 3DS Homebrew Legend

    Member
    2,628
    2,649
    Dec 3, 2004
    Gambia, The
    Exactly. Fact is, GW does a pretty messy job with basically anything. A simple explanation: Normally, a system app consists of one title meta data (TMD) file and multiple (execuable, manual, etc...) application (APP) files. In case of a regular update, these files may be replaced by newer versions, but the older ones will also be deleted in the process. GW's downgrade process, however, doesn't care about cleaning up, so now we have multiple TMDs for Health & Safety. The problem lies in deciding which is the correct one to inject to. With regular systems, that problem never happens.
     
    AerGolem55 likes this.
  10. d0k3
    OP

    d0k3 3DS Homebrew Legend

    Member
    2,628
    2,649
    Dec 3, 2004
    Gambia, The
    Just a quick note for testers.... if you need additional instructions, just write here in thread! Otherwise, this post and this thread should provide all the info you need.
     
    AerGolem55 likes this.
  11. ghost789

    ghost789 Newbie

    Newcomer
    8
    3
    Dec 7, 2015
    United States
    I have an old 3ds with gateway downgraded to 4.2.0-9u.and i have a try.
    i used Decrypt9WIP-d0k3-20151124-142119 to jump the H&S app,then it shows succeeded.i injected FBI.As you
    know,the injecting app didn't work on my sysNAND.It 's still the H&S app.I take a few photos.

    [​IMG]

    Now,i use Decrypt9WIP-d0k3-20151125-115441.Bad luck.I failed the first step.I just can't jump H&S app.

    [​IMG]


    My English is very poor .I hope you can understand what I said.
     
  12. d0k3
    OP

    d0k3 3DS Homebrew Legend

    Member
    2,628
    2,649
    Dec 3, 2004
    Gambia, The
    That Decrypt9 version doesn't yet contain the fix. Can you try the one from this post? http://gbatemp.net/threads/testers-...-on-a-gw-downgraded-nand.404059/#post-5827249
    And let me know if it works! I can't test myself cause I neither own a O3DS nor a GW.
     
    AerGolem55 likes this.
  13. ghost789

    ghost789 Newbie

    Newcomer
    8
    3
    Dec 7, 2015
    United States
    i tried it. The second photo is the results..I even can't jump H&S app.
     
  14. d0k3
    OP

    d0k3 3DS Homebrew Legend

    Member
    2,628
    2,649
    Dec 3, 2004
    Gambia, The
    Oh well, now I see it. But there is something very strange with that. The "System version 4.x" output - that was not coded by me. Where does this come from? :-?

    Anyways, just use the release attached to this post instead. But stay clear of the "experimental options" unless you know exactly what you do (the experimental features format your SD for EmuNAND, wiping your SD in the process).
     

    Attached Files:

    AerGolem55 likes this.
  15. ghost789

    ghost789 Newbie

    Newcomer
    8
    3
    Dec 7, 2015
    United States
    I failed again. It also has the "System version 4.x" .The same with the second picture.
    Can you tell me where the files should be placed?.
    i use the Browser to enter Decrypt9WIP.
     
  16. d0k3
    OP

    d0k3 3DS Homebrew Legend

    Member
    2,628
    2,649
    Dec 3, 2004
    Gambia, The
    Nevermind, I know where that text comes from. Forgot :).

    Anyways, if you can run it everything is alright, no need to change anything. There is still a problem in this fix. You've got a PM.
     
    AerGolem55 likes this.
  17. d0k3
    OP

    d0k3 3DS Homebrew Legend

    Member
    2,628
    2,649
    Dec 3, 2004
    Gambia, The
    Alright, background info: I worked with @ghost789 via pm on finding out why dumping / injection doesn't work for him. Here's the reason.

    Your CTRNAND is fragmented, and Decrypt9 can't handle fragmentation (for safety reasons, btw). There are only two softwares out there that can introduce (and possibly also handle) fragmentation to the CTRNAND (afaik): Gateway software and rxTools. Now, there is still a solution, but make sure you completely read everything before trying anything.
    • Dump your CTRNAND via Decrypt9
    • Mount the CTRNAND.bin in your mount tool of choice (I'm using OSFmount) in writable mode
    • Defragment it using a trusted defragmentation tool (I'd recommend Defraggler). There must be no fragmentation left
    • Additional safety hint: Don't do anything else while the CTRNAND is mounted in writable mode. Don't delete anything and don't copy anything there. Best to not do anything while it defragments at all.
    • Additional safety step: Completely check the defragmented CTRNAND via your tool of choice (Windows command line chkdsk is a good option)
    • Inject the defragmented CTRNAND.bin back into your NAND
    Now, there's a reason why the above is in red. If you do anything wrong, you can brick your 3DS. If you either have a NANDmod or this is on EmuNAND, make a backup and go ahead. If it is on SysNAND (with no NANDmod) and you still want to go ahead, also make a full backup, then make 110% sure you understood everything. Then read it over and check again. Then, and only then, go ahead.

    If you followed the above steps, Decrypt9 will be able to dump and inject Health & Safety.


    Edit and additional info (if the above sounded too drastic): Defraggler can be considered a safe tool, and I know of no instances where the CTRNAND injector did anything unexpected. I think (not know) that my instructions don't leave much room for error. It is just as I said - do it wrong, and your 3DS may be bricked. Also, rxTools does actual FAT writes to the CTRNAND, which can be considered more dangerous than what I suggested above. So does GW when downgrading. I myself wouldn't use either of the two or implement such dangerous stuff into Decrypt9.
     
    Last edited by d0k3, Dec 9, 2015
  18. ghost789

    ghost789 Newbie

    Newcomer
    8
    3
    Dec 7, 2015
    United States
    I am so sorry to hear the news .I think I can not test anymore.I do not want to brick my 3DS.
     
  19. Shadowtrance

    Shadowtrance GBAtemp Addict

    Member
    2,488
    1,517
    May 9, 2014
    Hervey Bay, Queensland
    TLDR: RxTools is bad, Gateway does things in messy ways, d0k3 the wizard can probably fix it. haha :P
     
    d0k3 likes this.
  20. d0k3
    OP

    d0k3 3DS Homebrew Legend

    Member
    2,628
    2,649
    Dec 3, 2004
    Gambia, The
    No, that is not about testing. That's the solution to make it work and of course your choice. I might have sounded a bit too drastic with what I wrote above, cause (as I added at the bottom of the previous post) a GW downgrade or any inject operation in rxTools is actually more dangerous than what I suggested above (given the user follows the instructions). People just don't know. In any case, just because something is less dangerous than something else (even if that something else is pretty common) does not mean that it should be approached in a careless manner.

    In any case, thanks for helping testing this so far, and don't follow the instructions above if you don't feel good about it.
     
    Last edited by d0k3, Dec 9, 2015
    AerGolem55 likes this.