As in title if i try to unload the plugin and load it again i get the same errors like in #20 thread.
But for me the solution in this thread doesn't work, just the same behaviour without any change.
void _start() attribute((weak, alias("module_start")));
int module_start()
{
unload_allowed_uid =
taiHookFunctionImportForKernel(KERNEL_PID,
&unload_allowed_hook, // Output a reference
"SceKernelModulemgr", // Name of module being hooked
0x11F9B314, // NID specifying SceSblACMgrForKernel
0xBBA13D9C, // Function NID
unload_allowed_patched); // Name of the hook function
log("Module started and function hooked", 35);
return SCE_KERNEL_START_SUCCESS;
}
int module_stop()
{
taiHookReleaseForKernel(unload_allowed_uid, unload_allowed_hook);
return SCE_KERNEL_STOP_SUCCESS;
}
Module loaded with taiLoadStartKernelModule() and unloaded with taiStopUnloadKernelModule()
PS VITA PHAT 3.68 H-Encore
As in title if i try to unload the plugin and load it again i get the same errors like in #20 thread. But for me the solution in this thread doesn't work, just the same behaviour without any change.
Code:
include "kmodule.h"
static tai_hook_ref_t unload_allowed_hook; static SceUID unload_allowed_uid;
int ksaveTestFile() { uint32_t state; ENTER_SYSCALL(state);
}
int unload_allowed_patched(void) { int ret; ret = TAI_CONTINUE(int, unload_allowed_hook); return 1; // always allowed }
void log(char * text, int size) { SceUID fdlog = ksceIoOpen("ux0:data/vitaBtLog/log.txt", SCE_O_WRONLY | SCE_O_CREAT, 0777); ksceIoWrite(fdlog, text, size); ksceIoClose(fdlog); }
void _start() attribute((weak, alias("module_start"))); int module_start() { unload_allowed_uid = taiHookFunctionImportForKernel(KERNEL_PID, &unload_allowed_hook, // Output a reference "SceKernelModulemgr", // Name of module being hooked 0x11F9B314, // NID specifying SceSblACMgrForKernel 0xBBA13D9C, // Function NID unload_allowed_patched); // Name of the hook function
}
int module_stop() { taiHookReleaseForKernel(unload_allowed_uid, unload_allowed_hook); return SCE_KERNEL_STOP_SUCCESS; }