Homebrew [Release] CIAngel - download GOOD cias right on your 3ds :)

Kourin

Touhou Maniac
Member
Joined
Jan 24, 2016
Messages
1,018
Trophies
0
Age
28
Location
Ripple Star
XP
1,236
Country
Australia
This could be done without too much work using the xml download from 3dsdb. I've been looking at the data and it's a really clean structure, it'd be pretty easy to parse through. That's assuming C has an easily accessible XML DOM like C++/#.

If you want to get real fancy with the menu stuff you could even filter the list by Region just by using that node's value. :)

If possible, this sounds really good. Especially filtering by region.
 
  • Like
Reactions: AdventureSnivy

TheCruel

Developer
Banned
Joined
Dec 6, 2013
Messages
1,350
Trophies
2
XP
3,131
Country
United States
Is game data (screenshot/description) easily accessed from Nintendo's eshop servers too? Any known software that parses this? Would be nice to populate a GUI.
 

cearp

瓜老外
OP
Developer
Joined
May 26, 2008
Messages
8,728
Trophies
2
XP
8,519
Country
Tuvalu
This could be done without too much work using the xml download from 3dsdb. I've been looking at the data and it's a really clean structure, it'd be pretty easy to parse through. That's assuming C has an easily accessible XML DOM like C++/#.yeah but getting

If you want to get real fancy with the menu stuff you could even filter the list by Region just by using that node's value. :)
i'd rather get the information straight from cdn, that we are are not limited to the scene released... :) but not on the fly because doing that for 50, 500, 1000 titles will take a while.
so, make our own database
but sure, i know what you mean :) i agree!
but getting the information is not really what i'm worried about, it's displaying it.
displaying game names, like japanese names, how to navigage a list of 500 games...
CIA angel will have to advance from just text display, to something more complex
Is game data (screenshot/description) easily accessed from Nintendo's eshop servers too? Any known software that parses this? Would be nice to populate a GUI.
screenshots.. sure i guess so, we just need to figure it out :)
 
Last edited by cearp,

paradox355

Member
Newcomer
Joined
Dec 31, 2009
Messages
17
Trophies
0
XP
199
Country
United States
i'd rather get the information straight from cdn, that we are are not limited to the scene released... :) but not on the fly because doing that for 50, 500, 1000 titles will take a while.
so, make our own database
but sure, i know what you mean :) i agree!
but getting the information is not really what i'm worried about, it's displaying it.
displaying game names, like japanese names, how to navigage a list of 500 games...
CIA angel will have to advance from just text display, to something more complex

Yeah, getting the data from cdn is preferred and we don't want to parse that on the fly. I'm curious ... do the title names retrieved straight from cdn contain kana/kanji ? I've never seen that any lists I've looked at.
 

cearp

瓜老外
OP
Developer
Joined
May 26, 2008
Messages
8,728
Trophies
2
XP
8,519
Country
Tuvalu
Yeah, getting the data from cdn is preferred and we don't want to parse that on the fly. I'm curious ... do the title names retrieved straight from cdn contain kana/kanji ? I've never seen that any lists I've looked at.
yes i'm pretty sure some/most japanese games do. korean names, chinese names, weird european accents etc...
 

DogParty

Well-Known Member
Member
Joined
Sep 15, 2015
Messages
172
Trophies
0
Age
32
XP
908
Country
United States
The CIAngel has an option now for download enctitlekeys.bin, but it stills asking for a encrypted key...
Have a way to auto detect the key using enctitlekeys.bin from 3ds.nfshost.com?

Thanks!

Theoretically, it should be pretty easy. First, the encTitleKeys.bin file has to be loaded into memory. Then the titleId can be read from the text file. Once read, convert the String into an array of hex values. Use that array to find the entry in the encTitleKeys binary. Finally, the next 16 bits should be the encrypted title key! :)
 

cearp

瓜老外
OP
Developer
Joined
May 26, 2008
Messages
8,728
Trophies
2
XP
8,519
Country
Tuvalu
The CIAngel has an option now for download enctitlekeys.bin, but it stills asking for a encrypted key...
Have a way to auto detect the key using enctitlekeys.bin from 3ds.nfshost.com?

Thanks!
it will read the enctitlekeys.bin file in the CIAngel folder on sd card.
if you download in the app fromthe website, it will save to that file. but if you want to put your own file you can too.
enctitlekeys.bin parsing is nearly done, so dont worry about it now :) its not ready lol
 

DogParty

Well-Known Member
Member
Joined
Sep 15, 2015
Messages
172
Trophies
0
Age
32
XP
908
Country
United States
it will read the enctitlekeys.bin file in the CIAngel folder on sd card.
if you download in the app fromthe website, it will save to that file. but if you want to put your own file you can too.
enctitlekeys.bin parsing is nearly done, so dont worry about it now :) its not ready lol

I actually spent time last night writing encTitleKeys.bin parsing :) I just looked and saw you added more solid parsing which is a great idea if CIAngel is going to mature. Instead of actually making structs for each record, I just had the user enter the titleId using the keyboard and then searched thru the file for the matching bits. Then, I copied the following encTitleKey as a string and pass it to DownloadTitle. It's hacky but it allowed CIAngel to become a mobile app store if you have the titleId on hand.

I was thinking about making a pull request or a fork but ultimately decided this wasn't something I need on my GitHub :rofl:

Also, I noticed nim is suspiciously unimplemented in libctru. If we could get that working, we wouldn't even need the whole downloading/cia parts. Couldn't we just call nims:StartDownload with the ticket? I tried to implement it but couldn't get the service params right.
 
Last edited by DogParty,

cearp

瓜老外
OP
Developer
Joined
May 26, 2008
Messages
8,728
Trophies
2
XP
8,519
Country
Tuvalu
I actually spent time last night writing encTitleKeys.bin parsing :) I just looked and saw you added more solid parsing which is a great idea if CIAngel is going to mature. Instead of actually making structs for each record, I just had the user enter the titleId using the keyboard and then searched thru the file for the matching bits. Then, I copied the following encTitleKey as a string and pass it to DownloadTitle. It's hacky but it allowed CIAngel to become a mobile app store if you have the titleId on hand.

I was thinking about making a pull request or a fork but ultimately decided this wasn't something I need on my GitHub :rofl:

Also, I noticed nim is suspiciously unimplemented in libctru. If we could get that working, we wouldn't even need the whole downloading/cia parts. Couldn't we just call nims:StartDownload with the ticket? I tried to implement it but couldn't get the service params right.
i wrote added solid code? that a compliment :D

when i finish the encctitlekeys support, i will generate all the tickets, that is easy, that code is already set up.

enctitlekeysbin files might only be temporary, ideally i will take in a csv that is produced from some tool of mine, so i can dictate the format lol, either locally placedon the sd card or fetched from online, and parse that. then we can get names, region... etc
we can get these from cdn, but doing it on the fly for 1000+ titles is too much i think.
using the keyboard, we could do a search on the name of the game, or title id, then download that game :)

no matter what i don't really want to get rid of the cia production, i think it is useful.
but sure, making the stuff install straight to the 3ds from online would be a great option... but it doesn't seem so simple, i'm not sure where to start...!
but, as i said before, as long as the content is of the same region, eshop can handle the download itself and can queue 10 things at a time, download in sleep mode, maybe resumeable downloads (i'm not sure about that) - so i wouldn't worry too much about installing straight to the 3ds.
adding ticketing installation would be better, so we can do everything from within 1 app (then use eshop) - instead of using fbi/devmenu to install tickets or cias.
 
P

PaiiNSteven

Guest
Excuse me if this isn't new, I was helped by it atleast.
I actually found a database filled with title ids and encrypted title keys; -snip- Apparently its illegal? I dont wanna get suspended again ;-;
Also, this is really awesome. Crazy stuff.
 
Last edited by ,

DogParty

Well-Known Member
Member
Joined
Sep 15, 2015
Messages
172
Trophies
0
Age
32
XP
908
Country
United States
i wrote added solid code? that a compliment :D

when i finish the encctitlekeys support, i will generate all the tickets, that is easy, that code is already set up.

enctitlekeysbin files might only be temporary, ideally i will take in a csv that is produced from some tool of mine, so i can dictate the format lol, either locally placedon the sd card or fetched from online, and parse that. then we can get names, region... etc
we can get these from cdn, but doing it on the fly for 1000+ titles is too much i think.
using the keyboard, we could do a search on the name of the game, or title id, then download that game :)

no matter what i don't really want to get rid of the cia production, i think it is useful.
but sure, making the stuff install straight to the 3ds from online would be a great option... but it doesn't seem so simple, i'm not sure where to start...!
but, as i said before, as long as the content is of the same region, eshop can handle the download itself and can queue 10 things at a time, download in sleep mode, maybe resumeable downloads (i'm not sure about that) - so i wouldn't worry too much about installing straight to the 3ds.
adding ticketing installation would be better, so we can do everything from within 1 app (then use eshop) - instead of using fbi/devmenu to install tickets or cias.

Regarding the ticket installation, I'm unsure how it would work. I kept the tickets created through CIAngel and installed them through FBI but my eShop hasn't changed. I installed tickets for both my region (J) and U and nada. I imagine it might be a cert issue or potentially user error :P
 

cearp

瓜老外
OP
Developer
Joined
May 26, 2008
Messages
8,728
Trophies
2
XP
8,519
Country
Tuvalu
Regarding the ticket installation, I'm unsure how it would work. I kept the tickets created through CIAngel and installed them through FBI but my eShop hasn't changed. I installed tickets for both my region (J) and U and nada. I imagine it might be a cert issue or potentially user error :P
i imagine user error (sorry!)
naturally, only the region you are on's tickets will be useful with regards to eshop
or, have you had experience with redownloading stuff from eshop?
you just go to the game page, and go to the bottom of it, you can download it
 

mysamdog

Active Member
Newcomer
Joined
Feb 21, 2016
Messages
33
Trophies
0
Age
24
XP
90
Country
United States
I've decided that I won't be finishing the progress bar soon, as I had some issues with the latest commits to the master branch (it would just skip the actual downloading part and wait for another button press). I realised that the interface of the project needs a bit of work in order to make it easier to see what's going on so debugging is easier. Right now, it's just a bunch of button presses with no way of even knowing if the program is waiting for input, which was fine at first but even already is starting to break down and feel very limiting and useless with just 3 menu items. So, I've decided to start working on a toolkit to easily build interfaces that are easy to read and easy to debug, with well defined state so the user knows exactly what the program is doing. I'm still in the designing stage rn, but I have a pretty good idea of how everything is going to fit together and the work involved. When it's done, I'm planning on switching CIAngel over to it.

In the meantime, if anyone else wants to add the progress bar, it shouldn't be that hard as long as some of the other bugs in the projects are fixed first. The downloadfile function in utils.c has a filesize variable, and you can just count the number of times it fills and flushes the buffer to find out how much has been download. From there, you just print out a progress bar, wait for the next time the buffer is filled/empty, clear the line and print a new progress bar.
 
  • Like
Reactions: cearp

cearp

瓜老外
OP
Developer
Joined
May 26, 2008
Messages
8,728
Trophies
2
XP
8,519
Country
Tuvalu
Not exactly. Right now this is basically just a big group collaboration project and the only way to get a copy is to build it yourself. Other than that there's not an actual copy released yet.
Sorry buddy! Check the release tab on github!
As soon as it came out it has a release :)

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

I've decided that I won't be finishing the progress bar soon, as I had some issues with the latest commits to the master branch (it would just skip the actual downloading part and wait for another button press). I realised that the interface of the project needs a bit of work in order to make it easier to see what's going on so debugging is easier. Right now, it's just a bunch of button presses with no way of even knowing if the program is waiting for input, which was fine at first but even already is starting to break down and feel very limiting and useless with just 3 menu items. So, I've decided to start working on a toolkit to easily build interfaces that are easy to read and easy to debug, with well defined state so the user knows exactly what the program is doing. I'm still in the designing stage rn, but I have a pretty good idea of how everything is going to fit together and the work involved. When it's done, I'm planning on switching CIAngel over to it.

In the meantime, if anyone else wants to add the progress bar, it shouldn't be that hard as long as some of the other bugs in the projects are fixed first. The downloadfile function in utils.c has a filesize variable, and you can just count the number of times it fills and flushes the buffer to find out how much has been download. From there, you just print out a progress bar, wait for the next time the buffer is filled/empty, clear the line and print a new progress bar.
Hey no problems, thanks for your help so far! I look forward to the interface thing you are talking about :)
I will see if I can get a percent downloading show up somewhere, based on the info you gave :)
 

Traiver

Developer
Developer
Joined
Aug 1, 2014
Messages
1,326
Trophies
1
Location
???
XP
2,953
Country
United States
Do you have any info, where I can get the file, that is missing @cearp?

cats.jpg
 
  • Like
Reactions: XRaidersP

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    BakerMan @ BakerMan: It's Mayday fellas