Advertising (This ad goes away for registered users. You can Login or Register)

PS3 packages and how it leads to PSP signing

Forum rules
Forum rule Nº 15 is strictly enforced in this subforum.
arnold
Posts: 100
Joined: Tue Nov 23, 2010 10:17 am

Re: PS3 packages and how it leads to PSP signing

Post by arnold » Tue Jan 18, 2011 7:38 am

Bugz does not run on LuaPlayer.

-arnold
Advertising

Salmon
Posts: 68
Joined: Fri Jan 07, 2011 12:08 pm

Re: PS3 packages and how it leads to PSP signing

Post by Salmon » Tue Jan 18, 2011 7:46 am

arnold wrote:Try Bugz by InsertWittyName. If that loads after being signed... then it shouldn't be the problem I posted.

-arnold
Bugz exits to the XMB with the following error being displayed: "The game could not be started. (80020148)"
Advertising

User avatar
m0skit0
Guru
Posts: 3817
Joined: Mon Sep 27, 2010 6:01 pm

Re: PS3 packages and how it leads to PSP signing

Post by m0skit0 » Tue Jan 18, 2011 8:15 am

hamedia wrote:I thought of putting a compatibility list of tested homebrews myself
If you're going to test, do it with some logic. Do not test homebrews that require kernel mode, they will obviously not work ;)
Wololo wrote:I am myself quite confused about how the relocation can claim to be relative to an offset, when it's actually absolute...
IIRC GP is calculated relative to the data section generated for the ELF, thus it cannot be used as absolute because you cannot know what value it will have before relocation and before the data section is placed on memory. The fact is that some relocators replace GP-relative instructions by absolute pointers on relocation time, while others do not. I don't have any knowledge on how the PSP does it though.

@Mathieulh: I'll do some research about that static ELF if I find some time (and will).

NOTE (AGAIN): remember this is PROGRAMMING forum. Posts not conforming with the topic will be erased, and from now on their authors will be warned as well.
I wanna lots of mov al,0xb
Image
"just not into this RA stuffz"

bbtgp
Posts: 9
Joined: Mon Jan 17, 2011 8:59 am

Re: PS3 packages and how it leads to PSP signing

Post by bbtgp » Tue Jan 18, 2011 9:31 am

Heres my crappy attempt at loading a static elf http://www.bbtgp.net/downloads/StaticLoader.7z

I basically use the hbl method here.

Step one: extract the stubs from the static elf and compile them in with the loader prx.
Step two: embed the static elf into the loader.
Step three: sign and run.

The loader copies the elf to its proffered address and fixes its stubs with the loaders stubs that where linked by the kernel. Then jumps into it.

Tested with nesterj (included) on psp 3000 6.35. I thought about doing this dynamically in the encrypter but it wasn't worth the time.

Edit: forgot to set the gp... Edit2: fixed. Edit3: Fixed a critical bug.
Last edited by bbtgp on Wed Jan 19, 2011 12:40 am, edited 1 time in total.

User avatar
m0skit0
Guru
Posts: 3817
Joined: Mon Sep 27, 2010 6:01 pm

Re: PS3 packages and how it leads to PSP signing

Post by m0skit0 » Tue Jan 18, 2011 10:42 am

Just FYI HBL already has source code for ELF loading, both static and PRX.
I wanna lots of mov al,0xb
Image
"just not into this RA stuffz"

bbtgp
Posts: 9
Joined: Mon Jan 17, 2011 8:59 am

Re: PS3 packages and how it leads to PSP signing

Post by bbtgp » Tue Jan 18, 2011 10:47 am

I know, i just didn't want to be subject to the virus that is GPL.

User avatar
m0skit0
Guru
Posts: 3817
Joined: Mon Sep 27, 2010 6:01 pm

Re: PS3 packages and how it leads to PSP signing

Post by m0skit0 » Tue Jan 18, 2011 10:53 am

Fine with me, but abstain of such trolling comments. I don't want any holy wars starting around here. Let's stick to the topic.
I wanna lots of mov al,0xb
Image
"just not into this RA stuffz"

JJS
Big Beholder
Posts: 1416
Joined: Mon Sep 27, 2010 2:18 pm
Contact:

Re: PS3 packages and how it leads to PSP signing

Post by JJS » Tue Jan 18, 2011 11:52 am

Here is some crappy code that patches the type 7 relocations in a PRX to type 0. Source and Windows binary included. This does indeed fix the booting problem for the homebrews I tried.

Edit: Made it less crappy by removing the dependency on the VS runtime and making sure the file is a PRX before patching.
Attachments
fix-relocations.zip
(34.53 KiB) Downloaded 2938 times

wololo
Site Admin
Posts: 3612
Joined: Wed Oct 15, 2008 12:42 am
Location: Japan

Re: PS3 packages and how it leads to PSP signing

Post by wololo » Tue Jan 18, 2011 11:54 am

JJS wrote:Here is some crappy code that patches the type 7 relocations in a PRX to type 0. Source and Windows binary included. This does indeed fix the booting problem for the homebrews I tried.
Thanks, I was going to work on that just now :P
Now I think what we need is a tool that regroups all of these: prx + static elf loader + prx reloc 7 fixing...

(edit: I confirm that Wagic now runs fine on 5.00 OFW, will test on 6.35 and take a video :mrgreen: )
If you need US PSN Codes, this technique is what I recommend.

Looking for guest bloggers and news hunters here at wololo.net, PM me!

User avatar
m0skit0
Guru
Posts: 3817
Joined: Mon Sep 27, 2010 6:01 pm

Re: PS3 packages and how it leads to PSP signing

Post by m0skit0 » Tue Jan 18, 2011 11:58 am

Instead of a static ELF loader, why not including dummy relocations that actually do nothing? That is, convert a static ELF to a PRX with no actual relocations.
I wanna lots of mov al,0xb
Image
"just not into this RA stuffz"

Post Reply

Return to “Programming and Security”