I've been working on some stuff in Xna, and I've found some interesting stuff that has to do with making calls to the kernel.
IntroFirst off there is a class called KernelMethods, and in it, you can make kernel calls. But you can only make some restricted calls for things like Guide interfacing, and some network stuff. But it could be used to write small scripts to do some neat things once figured out. Basically it adds all the data that is needed for the call to a script in a PacketBuffer object, it then uses a dll import in a library called Net, to send the packet to the xbox itself and execute it.
My WorkAfter extracting the Xna Framework from my HDD, and decompiling it, I was able to disect it. While doing that I found some classes that make dll imports to Xam, Xact, D3D, Storage, and Net librarys. I've been able to take advantage of this and make some calls to interface with the guide. I've also been able to edit some values of my GamerProfile object in memory, and the changes stay too. I've written some classes that can make the restricted kernel calls, and get a blank packet buffer object from the GamerServicesDispatcher class. The only problem is, we can not make our own PacketBuffer and send it out. The class which does that is internal, and the dll import gives me a null reference exception when I localize it to my project. Although this is not unsigned code, or booting linux, it's a start, or maybe and end....
How to UseTo use any of the classes I have provided, add the following line to your games constructor:
CODE
this.Components.Add(new GamerServicesComponent(this));
To use the Kernel class, simply create a new Kernel object after the initialization code and call ExecuteKernelCall. That goes for the rest too, just create an instance of the class after the initialization code, and use the methods in them. The PacketBuffer object is a binary script that tells the kernel what to execute, and any data that is needed. The first int is always 0, the second int is the Calling Type Index, the rest can vary depending on the call you are making, but the next byte is ussually the player index.
CODE
int Zero;
int KernelCallType;
byte PlayerIndex;
Below is a list of the restricted calls you can make, although some do not work due to missing data in the packetbuffer:
CODE
BeginCheckStrings = 15,
DrawGuide = 3,
EndCheckStrings = 0x10,
FriendCollection_Dispose = 0x12,
FriendCollection_GetFriends = 0x11,
Gamer_AwardAchievement = 11,
Gamer_AwardPicture = 12,
Gamer_BeginGetAchievements = 13,
Gamer_BeginGetProfile = 9,
Gamer_EndGetAchievements = 14,
Gamer_EndGetProfile = 10,
Gamer_IsFriend = 8,
GamerServices_SetTitleName = 5,
GamerServices_Update = 6,
Guide_BeginShowKeyboardInput = 0x15,
Guide_BeginShowMessageBox = 0x13,
Guide_BeginShowStorageDeviceSelector = 0x17,
Guide_DelayNotifications = 0x23,
Guide_EnableScreenSaver = 0x22,
Guide_EndShowKeyboardInput = 0x16,
Guide_EndShowMessageBox = 20,
Guide_EndShowStorageDeviceSelector = 0x18,
Guide_SetNotificationPosition = 0x21,
Guide_ShowAchievements = 0x24,
Guide_ShowComposeMessage = 0x20,
Guide_ShowFriendRequest = 0x1d,
Guide_ShowFriends = 0x1b,
Guide_ShowGameInvite = 0x25,
Guide_ShowGamerCard = 0x1f,
Guide_ShowMarketplace = 0x26,
Guide_ShowMessages = 0x1a,
Guide_ShowPlayerReview = 30,
Guide_ShowPlayers = 0x1c,
Guide_ShowSignIn = 0x19,
KernelAsyncDispatcher_CleanUpAsyncOperation = 7,
Leaderboard_BeginPage = 0x39,
Leaderboard_BeginReadByRank = 0x37,
Leaderboard_BeginReadGamerList = 0x35,
Leaderboard_BeginReadPivotGamer = 0x36,
Leaderboard_Dispose = 0x34,
Leaderboard_EndPage = 0x3a,
Leaderboard_EndRead = 0x38,
NetworkSession_AddLocalGamer = 0x2d,
NetworkSession_BeginCreate = 0x27,
NetworkSession_BeginJoinInvited = 0x29,
NetworkSession_Destroy = 0x2c,
NetworkSession_EndCreate = 40,
NetworkSession_EndJoinInvited = 0x2a,
NetworkSession_Update = 0x2b,
RunUnitTest = 1,
SessionFinder_BeginFindSessions = 0x2e,
SessionFinder_BeginJoin = 0x30,
SessionFinder_Destroy = 50,
SessionFinder_EndFindSessions = 0x2f,
SessionFinder_EndJoin = 0x31,
SessionFinder_GetQualityOfService = 0x33,
TellKernelToCallManagedUnitTestFunction = 2,
WindowsMessage = 4
DownloadAll the classes and methods are documented so anyone should be able to figure them out eassily. If anyone can figure out how to send a custom packet buffer, or how to get the dll import to work, please let me know.