Welcome! Log In Create A New Profile

Advanced

Friend Code / Address Book Manipulation

Posted by supermario182 
Friend Code / Address Book Manipulation
November 18, 2009 07:22PM
Hello everyone, longtime homebrew user, firstime homebrew coder. Haven't started any actual coding yet but I have been looking over the development help and getting started guides.

Anyways, I want to program an channel that makes friend code management easier because I hate telling my friends how great it is to play Wii online and then have to explain why it sucks too. I searched the forums and didn't find anything on the subject of address book and friend code manipulation. I want to be able to search and modify the wii address book as well as friend codes for every game, and I want to find out if this functionality already exists or if I will have to hack it together somehow. Any help is appreciated, and if anyone could point me in the right direction, or maybe to something that at least explains how the codes are stored, if they are in game save files or somewhere else in the wii system, and wether or not its possible to modify it without needing some kind of encryption or signature to avoid corrupting the data.
Thanks for any help or advice.
Re: Friend Code / Address Book Manipulation
November 18, 2009 10:25PM
you will need an unencrypted file system dump, i believe that emails and fcs are stored both locally and externally

the fc can be added with the wii offline but is updated when connected to wifi (atleast that worked for me)

emails are stored in a directory, you will need to see how emails are stored so that you can recreate proper emails

you need the dump to for research purposes only, and maybe prototyping
Re: Friend Code / Address Book Manipulation
November 18, 2009 11:33PM
thanks for the info. i'll have to do some research on the file system dump.

its not the emails i care about though, its the wii friend codes in the address book and the friend codes and rosters that i want to be able to look up and add to (i havent been able to find out if friend codes and rosters are in individual game saves or if they are somewhere in the wii system data, but im guessing they are in the save files).

maybe i missed something but i think when you said they are stored locally and externally, you meant on the wii and on nintendo servers, and not in two different places in the wii's storage(like game saves and wii system data). but i think i get what your saying about it updating when you connect to wifi.


on another note, i've read that game saves are encrypted and signed, so if i did somehow add to friend rosters, is there a way to re-sign and encrypt it yet? or will the unencrypted file system dump help do that in some way?

thanks again and sorry for all the questions mashed together. i wish i had a better understanding of how these codes worked but i haven't found much info here or anywhere else on how these work. i have really high hopes for this project if i can figure out these key elements.
Re: Friend Code / Address Book Manipulation
November 19, 2009 02:29AM
For friend codes see here : [www.wiibrew.org]

It would be nice if friend codes can be added in batch with a program... say a pc program, you paste the friend codes then you send the app through wiiload to homebrew channel and the program that's sent adds them for you...

Though I guess most of the games require individual friend codes for themselves... so this can only work for messaging and so on...

Still it would be a step in the right direction.

If I wasn't too lazy I would've started creating this app myself :)
Re: Friend Code / Address Book Manipulation
November 19, 2009 05:18PM
Thanks for that resource.

That is a good idea about the batch upload, and it may be what this turns into if my vision cannot be realized. Ideally I want to setup a central hosted database that you use the channel to register a username with, so when someone else adds your username it will notify you and when accepted, each others friend codes will be transferred through the database and automatically into each others address books, and if I can ever figure out save files, into game friend rosters too. I've setup a project page for it in the homebrew wiki so I can organize resources and other info into it. Check out the Friend Code Manager Project!
Re: Friend Code / Address Book Manipulation
November 19, 2009 07:49PM
This sounds great if you can get it working (and I reckon you can, I have faith in you =P). Wish I could help, but I can't program and don't know much about friend codes or anything...
Re: Friend Code / Address Book Manipulation
November 20, 2009 01:52AM
I would love to see this. However i can not even get the hello world to compile correctly... I know shameful....
Re: Friend Code / Address Book Manipulation
November 20, 2009 06:04PM
Thanks for the support everyone. If I can get some free time this weekend I want to try a hello world project (or maybe for the wii it should be an "its a me, mario!" ) If anyone comes across any info you think might be useful please post it here or onto my wii brew wiki page Friend Code Manager Project. and if anyone wants to conrtibute artwork / music / sound fx or whatever to help it look a little more complete if I ever get a working version out that would be awesome. i'm also trying to think of a better name. something like wiiLive(pronounced both ways) or Liiv or WiiWarp. anyways, back to my reasearch and real job.
Re: Friend Code / Address Book Manipulation
November 21, 2009 02:35AM
I'll contribute (if it doesn't bother anyone :P) as much as I can, I don't have a lot of free time but I think this can get well organized (you seem very organized judging from the wiki page) and hopefully finished.

I'm researching right now - I'll add what I get to your wiki page so everyone interested can see it. I expect to act tomorrow.

I'll gather info about the rosters (game codes). I read NET0 and NET1 from a brawlsave backup I had and I saw some of my friend's names there. I have some ideas, gotta test them. I'll also see what/how/where does savegame manager writes/reads hoping to find something useful.

We'll need some testers! (writing to game saves doesn't seem that dangerous but I don't know how much damage can miswriting to /shared2/wc24/nwc24fl.bin do. People interested in testing this (my current wii has the new boot1) could add theirselves to the wikipage.

Sorry If I'm suggesting too many changes,
Aruskano

EDIT: I'm thinking this could be used to do [pseudo]profiles, allowing your brother and you to have 64 friends each (I'm using brawl atm). Further investigation still needed.
EDIT2: Awww. My tests aren't showing good things... I'm starting to think this can't be done, at least not with brawl friend codes and I don't expect things to be done in a very different way in other games or in the system menu.

UPDATE: Can anyone take a look at those files? (net0 and net1) take them off your brawl save (gotten through savegame manager). It's just that I haven't seen a single friend code there (nor mine, nor one of an added friend, nor one of an "awaiting registration" one).

I can see their nicknames, their messages and another name that I don't know where does the wii take it from (and I assume an ID of the icon and another one of the connection-rating is there)... but there's no friend code there (unless I skipped it).

My guesses are those kind of things (messages, nicknames, logo, connection rating, etc) are there to read them locally and not over the internet (reducing server usage) and it has some sort of "login data" to let the server know who are you, your friend code, your friends, your requests, which updates should be sent to you and so on.

If I'm right this will need deeper reversing (way higher than what can I give) than what I thought and we'll need to emulate the connection to the server from a homebrew app, which is probably not possible/very hard. Now that I think about it, adding friendcodes by writing them somewhere doesn't make much sense to me, I don't know why I think it could that easy. Still, I could've missed something.

Some facts:
-net0 = net1. Probably this is to read net1 in case net0 gets corrupted somehow. (Didn't test it since it would help much anyways)
-replacing net0 and net1 changes your FC and friends to one of those files. Erased my brawl data, extracted the save, replaced my original brawl data's net0 and net1 with the new ones and I had the game completed but with a brand-new friend code.
-I spent time on this that I should've spent on my chores but w.e.
-I want to go to the bed!
-We need help

I'll probably take a look at the system menu fcs tomorrow to see if I have better luck there.



-UPDATE NUMER 4444-

I got my friend's wii friendcode from /shared2/wc24/nwc24fl.bin, I was probably looking for friend codes in a wrong way in the brawl save (which makes me, once again, hope this can be done).

My friend's code: 0952-2639-5570-9869
HEX value stored there: 03 62 14 3A CF FF AD
Those are exactly the same.

This took me some minutes because the nwc24fl.bin structure is already documented, we'll still need some reversing at the game saves. Please, if anyone reading this can help with this, help out! Post here or at the wiki page.

Once I understand how those things are stored I'll start experimenting writing to those files. Right now I've to go.



Edited 5 time(s). Last edit at 11/21/2009 07:29PM by Aruskano.
Re: Friend Code / Address Book Manipulation
November 21, 2009 09:43PM
WOW! That's awesome Aruskano. You've been promoted to Head Researcher. I think we're still a ways off from figuring out friends rosters, but you've found some good info on them. Wii codes will probably be the easiest thing as the file structure is pretty well documented, and it will be a good starting point and be the basis of the system. I haven't had a chance to look at any of my actual Wii files yet, haven't even re-installed the home brew channel since the last update. I don't know what your programming skill is like or if you do. Have you worked on any other homebrew projects for Wii or anything?
Re: Friend Code / Address Book Manipulation
November 21, 2009 11:15PM
I do program. I don't have a curriculum yet but hopefully this will be the first thing there :P. I've done some stupid homebrew for the wii but nothing to be released (one of them is a program I used to teach geometry to my girlfriend's brother... judge it yourself), the point is... yes, I could [and will] work on this.

I'll review brawlsaves later since I think I did it wrong the first time (was expecting to see the number in pieces) but I won't have free time till today's night. I hope I will find new useful things.

Aruskano

Little update before I go: I discovered a cropping behaviour (the first byte of each friend code seems to be deleted [probably hidden somehow] but If you search the rest, they are there! something similar happens with nicknames [noticed it yesterday], I'll study this at night), a small step closer!

I will log on IRC to ask people to get specified nicknames, msgs and logos today's night to measure the lenght in bytes they occupy, that will help me a lot. Hope everyone has their brawl ready!

-UPDATE BEFORE SLEEPING-

Reversing went ok... it could have been better but it could have been worse too. I'm still walking forward. Not much to share. Stay tuned, tomorrow I will not have any time to spend on this so don't expect anything till monday.



Edited 2 time(s). Last edit at 11/22/2009 09:28AM by Aruskano.
Re: Friend Code / Address Book Manipulation
November 24, 2009 10:13PM
as an idea, this app would be ninty's worst enemy if it would download the data of friend codes from a website, a user can set a username and enter their FCs when needed and when the app is run it will update the rosters of people who have subsribed to a persons FC list thus killing the need for FCs and making the wii the uber elite console
Re: Friend Code / Address Book Manipulation
November 24, 2009 10:52PM
Yep, that's the idea :).

I'm having hard days... don't think I've forgotten this. Will be back soon.
Re: Friend Code / Address Book Manipulation
November 25, 2009 01:30AM
Quote
SteelSLasher
as an idea, this app would be ninty's worst enemy if it would download the data of friend codes from a website, a user can set a username and enter their FCs when needed and when the app is run it will update the rosters of people who have subsribed to a persons FC list thus killing the need for FCs and making the wii the uber elite console

Lol we could show Ninty who's boss. :)
Re: Friend Code / Address Book Manipulation
November 25, 2009 10:36PM
Quote
TopGun96
Quote
SteelSLasher
as an idea, this app would be ninty's worst enemy if it would download the data of friend codes from a website, a user can set a username and enter their FCs when needed and when the app is run it will update the rosters of people who have subsribed to a persons FC list thus killing the need for FCs and making the wii the uber elite console

Lol we could show Ninty who's boss. :)
I have actually made a plan for this, i make plans for almost every app in existence, i just dont have time and money to make it, in this case i had made some php to handle the fc subscription but its lost now, i should be able to reconstruct it as a drupal plugin. i also made a plan on a web browser based operating system, 6 months later chrome os is announced, i hated google for that

and we should take ninty on, all we have actually done is really just do things that the average user doesnt need we need to actually show that we are better than ninty then maybe they might get serious with us and take our opinions and act on them
Re: Friend Code / Address Book Manipulation
November 28, 2009 01:13AM
Ya no kidding. Its great that they are marketing games to everyone, but they are forgetting about us. They said they aren't going to focus on online because only 30% or something of wii's actually connect online. Well maybe if it didnt suck so bad more people would use it.
Re: Friend Code / Address Book Manipulation
November 28, 2009 11:50AM
Also, if we could make a wiimail lib that deals with local mails we "could" create an achievements system, i say "could" because i am not sure how to create a wiird hook code that will be able to execute our code mid-game

we could easily implement it into homebrew games and then use a homebrew app to sync achievement data with a server allowing for gamercards and thos ps3 trophy pics
Sorry, only registered users may post in this forum.

Click here to login