Hello, i have decrypted a module with decrypter sample of PSPSDK.
I have try to load it with sceKernelLoadModule but it doesn't work, why ?
Is there a function to load decrypted module (ELF) ?
Thanks.
How to load decrypted modules ?
> Is there a function to load decrypted module (ELF) ?
The system can be tricked (along the lines of what you are trying to do)
Kernel memory module flag (0x1000) AND kernel thread required for most of this loading trickery.
http://forums.ps2dev.org/viewtopic.php?p=16537
(look for "LoadModule tips and tricks")
In general most PRXs must be loaded from a kernel thread. You can use them later from a user thread.
This can cause unrelated problems (BTW: I believe it is the root cause of DHCP not working), and the library entries can be tricky.
Which PRX are you loading, and what are you doing special ? (ie. there may be more specific advice)
----
FWIW:
The official system wants support libraries to be encrypted (for obvious reasons).
IMHO, if you already have the encrypted ELF file (ie. the PRX), you can load it directly. If you want to tweek the ELF file, you can load it first, then party on the loaded memory image. No need for "pspSdkInstallNoDeviceCheckPatch"
[ie. if trying to tweek a loadable PRX library, I suggest changing the library directly instead of changing the entire system]
The system can be tricked (along the lines of what you are trying to do)
Kernel memory module flag (0x1000) AND kernel thread required for most of this loading trickery.
http://forums.ps2dev.org/viewtopic.php?p=16537
(look for "LoadModule tips and tricks")
In general most PRXs must be loaded from a kernel thread. You can use them later from a user thread.
This can cause unrelated problems (BTW: I believe it is the root cause of DHCP not working), and the library entries can be tricky.
Which PRX are you loading, and what are you doing special ? (ie. there may be more specific advice)
----
FWIW:
The official system wants support libraries to be encrypted (for obvious reasons).
IMHO, if you already have the encrypted ELF file (ie. the PRX), you can load it directly. If you want to tweek the ELF file, you can load it first, then party on the loaded memory image. No need for "pspSdkInstallNoDeviceCheckPatch"
[ie. if trying to tweek a loadable PRX library, I suggest changing the library directly instead of changing the entire system]
Well I can probably guess why it is failing, you are trying to load a plain text kernel module which by default will not work. You can load plain text user modules such as pspnet but the kernel will refuse anything with the 0x1000 attribute which is born out if you install a kprintf handler.
As psppet says there is probably littlle real reason why you can't just load the original encrypted form, though if you really really really have to do it then (seeing as I am in a good mood) call pspSdkInstallNoPlainModuleCheckPatch in kernel mode to disable the check.
As psppet says there is probably littlle real reason why you can't just load the original encrypted form, though if you really really really have to do it then (seeing as I am in a good mood) call pspSdkInstallNoPlainModuleCheckPatch in kernel mode to disable the check.
In your tricks, you says :PspPet wrote:> Is there a function to load decrypted module (ELF) ?
The system can be tricked (along the lines of what you are trying to do)
Kernel memory module flag (0x1000) AND kernel thread required for most of this loading trickery.
http://forums.ps2dev.org/viewtopic.php?p=16537
(look for "LoadModule tips and tricks")
In general most PRXs must be loaded from a kernel thread. You can use them later from a user thread.
This can cause unrelated problems (BTW: I believe it is the root cause of DHCP not working), and the library entries can be tricky.
Which PRX are you loading, and what are you doing special ? (ie. there may be more specific advice)
----
FWIW:
The official system wants support libraries to be encrypted (for obvious reasons).
IMHO, if you already have the encrypted ELF file (ie. the PRX), you can load it directly. If you want to tweek the ELF file, you can load it first, then party on the loaded memory image. No need for "pspSdkInstallNoDeviceCheckPatch"
[ie. if trying to tweek a loadable PRX library, I suggest changing the library directly instead of changing the entire system]
"You can load encrypted files from the MS, but that leads to potential copyright problems.
Trying to load unencrypted PRX files fails [can't load a "PLAIN" module]"
Could the new function pspSdkInstallNoPlainModuleCheckPatch() of the PSPSDK solve the problem?
I have modify PRXdecrypt sample :
/* Check if we managed to decrypt the file */
if(*(unsigned short *)(check+0x5a) & 1)
{
/* Set decrypt buffer pointer */
*(unsigned int*)(check+0x24) = (unsigned int) g_decrypt_buf;
sceKernelCheckExecFile(g_data, check);
//output = g_decrypt_buf;
output = g_data;
}
else
output = g_data;
for writing g_data buffer instead g_decrypt_buf (decompressed but not decrypted) and i have noted only chnnlsv.prx (VSH module) module is not encrypted.
I think we can load decrypted modules but they must be compressed (PSP format) because chnnlsv.prx is in flash0 and he can be loaded.
"if you already have the encrypted ELF file (ie. the PRX), you can load it directly. If you want to tweek the ELF file, you can load it first, then party on the loaded memory image"
I will try that, thanks for your help.
Last edited by johnmph on Tue Aug 09, 2005 5:11 am, edited 1 time in total.
I had not seen your post message, i have used pspSdkInstallNoPlainModuleCheckPatch but i have a black screen and the psp shutdown.TyRaNiD wrote:Well I can probably guess why it is failing, you are trying to load a plain text kernel module which by default will not work. You can load plain text user modules such as pspnet but the kernel will refuse anything with the 0x1000 attribute which is born out if you install a kprintf handler.
As psppet says there is probably littlle real reason why you can't just load the original encrypted form, though if you really really really have to do it then (seeing as I am in a good mood) call pspSdkInstallNoPlainModuleCheckPatch in kernel mode to disable the check.
I will try to load encrypted module and then modify functions in memory if i found address where loaded module is stored.
Thanks