Hacking Editing Ticket.db

Status
Not open for further replies.

Madridi

Card Collector
Member
Joined
May 9, 2008
Messages
3,562
Trophies
2
Age
37
Location
Doha
XP
3,061
Country
Qatar
I'm on it. Already dumped ticket.db for both old sysNAND and current emuNAND.

Before going ahead and injecting, is there any tool that I could use to see the contents of each ticket.db? Even just showing how many tickets they contain would be enough. I tried extdata_tool from CTR toolkit, but it just says the file is corrupt or not a ticket database.
https://gbatemp.net/threads/wip-groovycia.414004/

GroovyCIA works. It shows any games/title that are in the Ticket.db
Yep, what Xenosaiga suggested. Keep in mind though that you will probably see duplicate tickets with the same console ID. This is a known bug in the program so don't get puzzled by it :)
 

Nephiel

Artificer
Member
Joined
Nov 3, 2002
Messages
179
Trophies
2
XP
483
Country
Yep, what Xenosaiga suggested. Keep in mind though that you will probably see duplicate tickets with the same console ID. This is a known bug in the program so don't get puzzled by it :)
Thanks! This was just what I needed.

Both ticket.dbs contain what I expected. The emuNAND db has the same titles as the original sysNAND db, plus all the CIAs I had ever installed since then, even from those games I had removed.

Injection of the original ticket.db into current emuNAND was successful. For the record, my sysNAND is on 9.0.0-20E and my emuNAND on 9.5.0-23E.

After injection, I see every CIA I had installed is gone: SaveDataFiler, legit CIAs, and CIAs from my own dumps all have empty slots in the Home Menu where their icons were. As expected, the files of these CIAs are still in the "Nintendo 3ds" folder on the SD card, but now they have no ticket on this system, so they are unavailable. They still appear in the Activity Log, though.

[offtopic]
I'd like to clear the Activity Log as well, but since the save is in the NAND I don't know how to do it.

My goal is to start from a clean slate on sysNAND with a9lh, but I don't want to lose my NNID and savegames. I have backups/dumps of everything, except the Mii Plaza and the rest of the games that come with the console - again, since the saves are in the NAND, I don't know how to back these up, other than dumping the whole NAND.
[/offtopic]
 
  • Like
Reactions: Madridi

MelonGx

Well-Known Member
Member
Joined
Jan 8, 2009
Messages
1,650
Trophies
1
XP
905
Country
China
WTF that System Transfer does not remove any fake ticket!
Just performed a SysNAND 9.2 - SysNAND 10.6 - System Transfer to 3DS-B EmuNAND - Downgrade 10.6 to 9.2, ticket.db still contained fake tickets.
Those fake tickets seemed eternally installed on that console.
 
Last edited by MelonGx,
  • Like
Reactions: cearp

Nephiel

Artificer
Member
Joined
Nov 3, 2002
Messages
179
Trophies
2
XP
483
Country
WTF that System Transfer does not remove any fake ticket!
Just performed a SysNAND 9.2 - SysNAND 10.6 - System Transfer to 3DS-B EmuNAND - Downgrade 10.6 to 9.2, ticket.db still contained fake tickets.
Those fake tickets seemed eternally installed on that console.
You mean the fakes were transferred to 3DS-B?
 

thaikhoa

Well-Known Member
Member
Joined
Sep 16, 2008
Messages
2,227
Trophies
0
XP
2,525
Country
Australia
WTF that System Transfer does not remove any fake ticket!
Just performed a SysNAND 9.2 - SysNAND 10.6 - System Transfer to 3DS-B EmuNAND - Downgrade 10.6 to 9.2, ticket.db still contained fake tickets.
Those fake tickets seemed eternally installed on that console.

I figured it out yesterday :D

Btw, the good reason when transferring system is you can keep your legit games on both systems. Make sure to keep transferred one away from NNID and downgrade mset to 4.5. :D
 
Last edited by thaikhoa,

MelonGx

Well-Known Member
Member
Joined
Jan 8, 2009
Messages
1,650
Trophies
1
XP
905
Country
China
You mean the fakes were transferred to 3DS-B?
Not tested yet.
3DS-B emuNAND already had fakes.

What I meant was that fakes still existed on 3DS-A after System Transferred.

--------------------- MERGED ---------------------------

I figured it out yesterday :D

Btw, the good reason when transferring system is you can keep your legit games on both systems. Make sure to keep transferred one away from NNID and downgrade mset to 4.5. :D
Yeah, that's pretty delicious :P
I did the clone thing 4 times.
It enabled backup/edit/restore e-shop gamesaves before SVDT was out.
 
  • Like
Reactions: thaikhoa

thaikhoa

Well-Known Member
Member
Joined
Sep 16, 2008
Messages
2,227
Trophies
0
XP
2,525
Country
Australia
Not tested yet.
3DS-B emuNAND already had fakes.

What I meant was that fakes still existed on 3DS-A after System Transferred.

--------------------- MERGED ---------------------------


Yeah, that's pretty delicious :P
I did the clone thing 4 times.
It enabled backup/edit/restore e-shop gamesaves before SVDT was out.
Awesomeness :D
 

stebrick

Well-Known Member
Newcomer
Joined
Mar 6, 2016
Messages
64
Trophies
0
Age
35
XP
118
Country
Hong Kong
May I ask is it possible to do it this way: https://gbatemp.net/threads/eshop-thinks-i-bought-something-that-i-havent-yet.412185/

You could use rxtools to dump your current Ticket.db, rename it, in dump the ticket.db from sysnand, inject it to your emunand, buy the game, in inject your first emunand ticket.db, after visiting the eshop it should download the real ticket, and there should not be a problem. This would prevent all possible problems from nand formating.
Also for the future: use other region cias, or make more backups from your ticket.db.
The other way would be to dump the ticket.db, and remove the Ticket from cia manualy and reinject it, but I haven't done this, so you would need to check the forum for this.

Oh, it just occurred to me that I still have an emunand backup from before I installed explorers, I make lots of emunand backups. Will restoring that help, if I do that instead of formatting?

Ty everyone for the advice; I restored my emunand backup, updated (the update errored out the first time and removed my theme, then it worked) and was able to buy the game with no incident :D

There appear to be two methods for cleaning ticket.db from the text I quoted above (not sure if they are correct so this is one of the reasons I posted them up here again) - either by Option 1 - dumping clean ticket.db and injecting it back whenever you need it; or Option 2 - through backing up the whole initial emunand (with clean ticket.db)

Though I am not sure of the following:-

1. How to dump (or backup) the ticket.db file ? (from emunand (not sysand) as insofar I haven't installed illegitimate cia to my unlinked emunand)
2. How to inject (or restore) ticket.db back to my emunand (not sysnand)?
3. If (1) and (2) are difficult or impossible to pull off, how to first backup the entire emunand (including ticket.db of course) and restore it later when I want my clean ticket.db back?

I am sorry if you find my questions dump because I am a newbie, who wanna do all the backup before installing any illegitimate cia...

Any reply would be greatly appreciated.
 
Last edited by stebrick,

stebrick

Well-Known Member
Newcomer
Joined
Mar 6, 2016
Messages
64
Trophies
0
Age
35
XP
118
Country
Hong Kong
OK i got another question,

Is it possible to use Emunand Tool to dump the whole emunand system together with ticket.db?

Link: https://gbatemp.net/threads/emunand-tool-release-and-support-thread.359239/

I am asking it because it appears to me that it is not possible to dump ticket.db merely by plugging SD card to the PC and clicking that button as it should have been stored at the console itself. Please feel free to correct me as I might have got it wrong.
 

Nephiel

Artificer
Member
Joined
Nov 3, 2002
Messages
179
Trophies
2
XP
483
Country
I'd say the easiest way to dump/restore ticket.db is Decrypt9.

Not 100% sure of this, but I don't think injecting the one from sysNAND into emuNAND would work unless both NANDs are still linked.

Also, buying a game and then restoring a ticket.db that was dumped before that purchase, would remove the ticket for that game, right? Does the ticket for that game simply get created again, just by using the eShop?
 

stebrick

Well-Known Member
Newcomer
Joined
Mar 6, 2016
Messages
64
Trophies
0
Age
35
XP
118
Country
Hong Kong
I'd say the easiest way to dump/restore ticket.db is Decrypt9.

Not 100% sure of this, but I don't think injecting the one from sysNAND into emuNAND would work unless both NANDs are still linked.

Also, buying a game and then restoring a ticket.db that was dumped before that purchase, would remove the ticket for that game, right? Does the ticket for that game simply get created again, just by using the eShop?

I just tested. Yes, Decrypt9 did the trick perfectly. And yes, installing a cia and then restoring a ticket.db that was dumped before would remove the new ticket. But by then you can't use the installed cia as it disappears from the home menu although the contents of it are still on your SD card (can be found in setting>software management). I guess if you want to use it again you have to delete the whole cia and install it again. Before doing so, it wont be able to create that relevant title key in ticket.db. I believe for the moment the ticket.db is not synced with the eShop. The mechanism of eshop is simply to check the title key from the ticket.db and compare it with its data base upon you install things from it.

What I am not sure is whether formatting EmuNAND (or restoring it to a previous backup) would help restore the ticket.db as someone in the previous reply within this thread said even formating NAND would not clear off the ticket.db. If this is the case (which I am not sure), should one take an extra step to inject a clean ticket.db from SysNAND into EmuNAND before restoration? ( I am not sure whether by doing so would collapse the whole system or bricked the console)?






p.s. The more I tested, the more I believe that ticket.db is a very danagerous thing if Ninentdo found a way to analyse it. Even custom made cia (not only those cracked cia games) relies upon this file....
 
Last edited by stebrick,
  • Like
Reactions: astronautlevel

Nephiel

Artificer
Member
Joined
Nov 3, 2002
Messages
179
Trophies
2
XP
483
Country
FWIW, if the ticket for an installed CIA is removed (by restoring an older ticket.db) but the files are still in the SD card, there's no need to delete and reinstall. Just try to install the same CIA again with DevMenu or BBM - it will take only a couple of seconds, because it will realize that the files already exist on the SD, and write only the ticket to db.

What I'd like to know is if the eShop does the same thing (checking if the games are in your NNID's purchases list, and writing their tickets to db).
 

KevinX8

Proud user of The Dark Theme
Member
Joined
May 12, 2016
Messages
960
Trophies
0
Age
32
Location
Down there
XP
995
Country
Hi I have Luma3DS CFW on my o3DS and I would like to know if its possible to regenerate a title.db with all my titles stored on my sd card.
See I removed my sd card without ejecting it first like I usually do with no problem but this time all the data disappeared afterwards. I used chkdsk to restore it and it did just fine apart from you guess it my title.db and import.db, both had been corrupted beyond usage. So I am just wondering now if its possible to just reconstruct them since all the title data is on the sd card just the title database thosen't know it.
 

The Real Jdbye

*is birb*
Member
Joined
Mar 17, 2010
Messages
22,599
Trophies
4
Location
Space
XP
12,575
Country
Norway
Hi I have Luma3DS CFW on my o3DS and I would like to know if its possible to regenerate a title.db with all my titles stored on my sd card.
See I removed my sd card without ejecting it first like I usually do with no problem but this time all the data disappeared afterwards. I used chkdsk to restore it and it did just fine apart from you guess it my title.db and import.db, both had been corrupted beyond usage. So I am just wondering now if its possible to just reconstruct them since all the title data is on the sd card just the title database thosen't know it.
Necrobumping to post an offtopic question is frowned upon.
Anyway, I don't think so. If you reinstall all your CIAs they will error immediately and the games should show up on your home menu again. Not sure if your save data will still be there so you'll just have to see.
 

cearp

瓜老外
Developer
Joined
May 26, 2008
Messages
8,673
Trophies
2
XP
8,100
Country
Tuvalu
WTF that System Transfer does not remove any fake ticket!
Just performed a SysNAND 9.2 - SysNAND 10.6 - System Transfer to 3DS-B EmuNAND - Downgrade 10.6 to 9.2, ticket.db still contained fake tickets.
Those fake tickets seemed eternally installed on that console.
strange, i'm very surprised...
i assumed it was all done online, nothing locally checked, but that idea is now wrong :)
 
  • Like
Reactions: Xenosaiga
Status
Not open for further replies.
General chit-chat
Help Users
  • No one is chatting at the moment.
  • JuanMena @ JuanMena:
    Will you give me mouth to mouth oxygen if my throat closes?
  • K3N1 @ K3N1:
    Nah the air can do that
  • K3N1 @ K3N1:
    Ask @x65943 he's trained for that stuff
  • JuanMena @ JuanMena:
    Kissing random dudes choking in celery? Really? Need to study for that?
  • K3N1 @ K3N1:
    Yes it requires a degree
  • K3N1 @ K3N1:
    I could also yank out the rest of my teeth but theirs professionals for that
  • x65943 @ x65943:
    If your throat closes, putting oxygen in your mouth will not solve anything - as you will be introducing oxygen prior to the area of obstruction
  • JuanMena @ JuanMena:
    Just kiss me Kyle.
  • x65943 @ x65943:
    You either need to be intubated to bypass obstruction or create a stoma inferior to the the area of obstruction to survive
  • x65943 @ x65943:
    "Just kiss me Kyle." And I thought all the godreborn gay stuff was a smear campaign
  • JuanMena @ JuanMena:
    If I die, tell my momma I won't be carrying Baby Jesus this christmas :sad::cry:
  • K3N1 @ K3N1:
    Smear campaigns are in The political section now?
  • JuanMena @ JuanMena:
    Chary! Chary! Chary, Chary, Chary!
  • Sonic Angel Knight @ Sonic Angel Knight:
    Pork Provolone :P
  • Psionic Roshambo @ Psionic Roshambo:
    Sounds yummy
  • K3N1 @ K3N1:
    Sweet found my Wii u PSU right after I ordered a new one :tpi:
  • JuanMena @ JuanMena:
    It was waiting for you to order another one.
    Seems like, your PSU was waiting for a partner.
  • JuanMena @ JuanMena:
    Keep them both
    separated or you'll have more PSUs each year.
  • K3N1 @ K3N1:
    Well one you insert one PSU into the other one you get power
  • JuanMena @ JuanMena:
    It literally turns it on.
  • K3N1 @ K3N1:
    Yeah power supplies are filthy perverts
  • K3N1 @ K3N1:
    @Psionic Roshambo has a new friend
    +1
  • JuanMena @ JuanMena:
    It's Kyle, the guy that went to school to be a Certified man Kisser.
  • Psionic Roshambo @ Psionic Roshambo:
    Cartmans hand has taco flavored kisses
  • A @ abraarukuk:
    hi guys
    A @ abraarukuk: hi guys