Switch to user plugin.
This commit is contained in:
parent
c5b5af679a
commit
0c8b48cc12
|
@ -9,46 +9,38 @@ if(NOT DEFINED CMAKE_TOOLCHAIN_FILE)
|
|||
endif()
|
||||
|
||||
project(MakePsmGreatAgain)
|
||||
include("$ENV{VITASDK}/share/vita.cmake" REQUIRED)
|
||||
include("${VITASDK}/share/vita.cmake" REQUIRED)
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wl,-q -Wall -O3 -std=gnu99")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -nostdlib")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -fno-exceptions")
|
||||
|
||||
include_directories(
|
||||
)
|
||||
|
||||
link_directories(
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
add_executable(${PROJECT_NAME}
|
||||
MakePsmGreatAgain.c
|
||||
if (NOT ${RELEASE})
|
||||
add_definitions(-DENABLE_LOGGING)
|
||||
endif()
|
||||
|
||||
add_executable(MakePsmGreatAgain
|
||||
MakePsmGreatAgain.c
|
||||
)
|
||||
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
SceSysmemForDriver_stub
|
||||
SceSysclibForDriver_stub
|
||||
SceModulemgrForDriver_stub
|
||||
SceThreadmgrForDriver_stub
|
||||
SceIofilemgrForDriver_stub
|
||||
SceUdcdForDriver_stub
|
||||
SceSysrootForKernel_stub
|
||||
SceUsbSerialForDriver_stub
|
||||
SceDebugForDriver_stub
|
||||
taihenForKernel_stub
|
||||
gcc
|
||||
)
|
||||
vita_create_self(${PROJECT_NAME}.skprx ${PROJECT_NAME}
|
||||
UNSAFE
|
||||
CONFIG ${CMAKE_SOURCE_DIR}/exports.yml
|
||||
)
|
||||
vita_create_stubs(${PROJECT_NAME}-stubs ${PROJECT_NAME} ${CMAKE_SOURCE_DIR}/exports.yml
|
||||
KERNEL
|
||||
target_link_libraries(MakePsmGreatAgain
|
||||
taihen_stub
|
||||
SceLibKernel_stub
|
||||
SceAppMgr_stub
|
||||
SceLibc_stub
|
||||
SceIofilemgr_stub
|
||||
)
|
||||
|
||||
install(DIRECTORY ${CMAKE_BINARY_DIR}/${PROJECT_NAME}-stubs/
|
||||
DESTINATION lib
|
||||
FILES_MATCHING PATTERN "*.a"
|
||||
set_target_properties(MakePsmGreatAgain
|
||||
PROPERTIES LINK_FLAGS "-nostdlib"
|
||||
)
|
||||
|
||||
install(FILES savestates.h
|
||||
DESTINATION include
|
||||
)
|
||||
vita_create_self(MakePsmGreatAgain.suprx MakePsmGreatAgain
|
||||
CONFIG ${CMAKE_SOURCE_DIR}/MakePsmGreatAgain.yml
|
||||
)
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2019 Silica
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -1,31 +1,41 @@
|
|||
//MakePSMGreatAgain
|
||||
//Build a wall and make Sony pay for it!
|
||||
//Probably with he money they stole from us
|
||||
//by deleting our PSM Purchases
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
// SilicaAndPina
|
||||
// IDU Spoofer/Package Installer Enabler
|
||||
// TAIHEN Edition!
|
||||
|
||||
#include <psp2/kernel/modulemgr.h>
|
||||
#include <taihen.h>
|
||||
#include <vitasdkkern.h>
|
||||
|
||||
#include <string.h>
|
||||
#include <vitasdk.h>
|
||||
#include "licenseinfo.h"
|
||||
|
||||
#define printf ksceDebugPrintf
|
||||
static SceUID CacheMounted;
|
||||
static tai_hook_ref_t CacheMounted_ref;
|
||||
|
||||
//e23e8c7b15a198 SUITE
|
||||
//e23e8c93b8ed90 UNITY
|
||||
static SceUID SuiteCheckDrm;
|
||||
static tai_hook_ref_t SuiteCheckDrm_ref;
|
||||
|
||||
static SceUID UnityCheckDrm;
|
||||
static tai_hook_ref_t UnityCheckDrm_ref;
|
||||
|
||||
static SceUID SecurityCritical;
|
||||
static tai_hook_ref_t SecurityCritical_ref;
|
||||
|
||||
static SceUID PeekPositive;
|
||||
static tai_hook_ref_t PeekPositive_ref;
|
||||
|
||||
static SceUID LoadModuleHook = -1;
|
||||
static tai_hook_ref_t LoadModuleHook_ref;
|
||||
|
||||
|
||||
char titleid[12];
|
||||
|
||||
int gameRunning = 0;
|
||||
int hookReleased = 0;
|
||||
|
||||
int getFileSize(const char *file) {
|
||||
SceUID fd = ksceIoOpen(file, SCE_O_RDONLY, 0);
|
||||
SceUID fd = sceIoOpen(file, SCE_O_RDONLY, 0);
|
||||
if (fd < 0)
|
||||
return fd;
|
||||
int fileSize = ksceIoLseek(fd, 0, SCE_SEEK_END);
|
||||
ksceIoClose(fd);
|
||||
int fileSize = sceIoLseek(fd, 0, SCE_SEEK_END);
|
||||
sceIoClose(fd);
|
||||
return fileSize;
|
||||
}
|
||||
|
||||
|
@ -42,333 +52,215 @@ int fileExists(const char *file) {
|
|||
|
||||
|
||||
int ReadFile(char *file, void *buf, int size) {
|
||||
SceUID fd = ksceIoOpen(file, SCE_O_WRONLY | SCE_O_CREAT | SCE_O_TRUNC, 0777);
|
||||
SceUID fd = sceIoOpen(file, SCE_O_WRONLY | SCE_O_CREAT | SCE_O_TRUNC, 0777);
|
||||
if (fd < 0)
|
||||
return fd;
|
||||
|
||||
int read = ksceIoRead(fd, buf, size);
|
||||
int read = sceIoRead(fd, buf, size);
|
||||
|
||||
ksceIoClose(fd);
|
||||
sceIoClose(fd);
|
||||
return read;
|
||||
}
|
||||
|
||||
|
||||
int WriteFile(char *file, void *buf, int size) {
|
||||
SceUID fd = ksceIoOpen(file, SCE_O_WRONLY | SCE_O_CREAT | SCE_O_TRUNC, 0777);
|
||||
SceUID fd = sceIoOpen(file, SCE_O_WRONLY | SCE_O_CREAT | SCE_O_TRUNC, 0777);
|
||||
if (fd < 0)
|
||||
return fd;
|
||||
|
||||
int written = ksceIoWrite(fd, buf, size);
|
||||
int written = sceIoWrite(fd, buf, size);
|
||||
|
||||
ksceIoClose(fd);
|
||||
sceIoClose(fd);
|
||||
return written;
|
||||
}
|
||||
|
||||
|
||||
static int secureHook = -1;
|
||||
static tai_hook_ref_t secureHook_ref;
|
||||
|
||||
static int rtcHook = -1;
|
||||
static tai_hook_ref_t rtcHook_ref;
|
||||
|
||||
static int runHook = -1;
|
||||
static tai_hook_ref_t runHook_ref;
|
||||
|
||||
static int isAllowedSerialHook = -1;
|
||||
static tai_hook_ref_t isAllowedSerial_ref;
|
||||
|
||||
|
||||
|
||||
int ret = 0;
|
||||
int pid;
|
||||
|
||||
unsigned int SUITE_LICENSE_VALID[2] = {0x7b15a198,0xe23e8c};
|
||||
unsigned int UNITY_LICENSE_VALID[2] = {0x93b8ed90,0xe23e8c};
|
||||
|
||||
char titleid[12];
|
||||
|
||||
int ksceRtcGetCurrentSecureTick_patched(unsigned int* timestamp) //fake valid time
|
||||
{
|
||||
printf("SceRtcGetSecure called!\n");
|
||||
static int sceCtrlPeekBufferPositive_patched(int port, SceCtrlData *ctrl, int count) {
|
||||
int ret = TAI_CONTINUE(int, PeekPositive_ref, port, ctrl, count);
|
||||
|
||||
ret = TAI_CONTINUE(int, secureHook_ref,timestamp);
|
||||
|
||||
pid = ksceKernelGetProcessId();
|
||||
ksceKernelGetProcessTitleId(pid,titleid,12);
|
||||
|
||||
|
||||
if(!strcmp(titleid,"PCSI00007")) //SUITE
|
||||
if((ctrl->buttons & (SCE_CTRL_START|SCE_CTRL_UP)) == (SCE_CTRL_START|SCE_CTRL_UP))
|
||||
{
|
||||
printf("Spoofing time to %x%x\n",SUITE_LICENSE_VALID[1],SUITE_LICENSE_VALID[0]);
|
||||
|
||||
timestamp[0] = SUITE_LICENSE_VALID[0];
|
||||
timestamp[1] = SUITE_LICENSE_VALID[1];
|
||||
return 0;
|
||||
sceAppMgrSetInfobarState(0, 0, 0);
|
||||
sceAppMgrLoadExec("app0:/eboot.bin", 0, 0);
|
||||
}
|
||||
|
||||
if(!strcmp(titleid,"PCSI00009")) //UNITY
|
||||
return ret;
|
||||
}
|
||||
|
||||
int sceAppUtilCacheMount_patched(){
|
||||
int ret;
|
||||
ret = TAI_CONTINUE(int, CacheMounted_ref);
|
||||
|
||||
sceIoMkdir("cache0:/_System",6);
|
||||
|
||||
if(!fileExists("cache0:/_System/Code"))
|
||||
{
|
||||
if(gameRunning)
|
||||
{
|
||||
printf("Releasing rtcHook\n");
|
||||
if(rtcHook >= 0)taiHookReleaseForKernel(rtcHook, rtcHook_ref);
|
||||
rtcHook = -1;
|
||||
hookReleased = 1;
|
||||
}
|
||||
sceClibPrintf("Writing 'Code'\n");
|
||||
if(!strcmp(titleid,"PCSI00007"))
|
||||
WriteFile("cache0:/_System/Code",&SUITE_CODE,sizeof(SUITE_CODE));
|
||||
else
|
||||
WriteFile("cache0:/_System/Code",&UNITY_CODE,sizeof(UNITY_CODE));
|
||||
}
|
||||
|
||||
if(!fileExists("cache0:/_System/target_kdbg_list.dat"))
|
||||
{
|
||||
sceClibPrintf("Writing 'target_kdbg_list'\n");
|
||||
if(!strcmp(titleid,"PCSI00007"))
|
||||
WriteFile("cache0:/_System/target_kdbg_list.dat",&SUITE_TARGET,sizeof(SUITE_TARGET));
|
||||
else
|
||||
WriteFile("cache0:/_System/target_kdbg_list.dat",&UNITY_TARGET,sizeof(UNITY_TARGET));
|
||||
}
|
||||
|
||||
if(!fileExists("cache0:/_System/vseed.dat"))
|
||||
{
|
||||
sceClibPrintf("Writing 'vseed'\n");
|
||||
if(!strcmp(titleid,"PCSI00007"))
|
||||
WriteFile("cache0:/_System/vseed.dat",&SUITE_VSEED,sizeof(SUITE_VSEED));
|
||||
else
|
||||
WriteFile("cache0:/_System/vseed.dat",&UNITY_VSEED,sizeof(UNITY_VSEED));
|
||||
}
|
||||
|
||||
if(!fileExists("cache0:/_System/protected_kconsole_cache.dat"))
|
||||
{
|
||||
sceClibPrintf("Writing 'protected_kconsole_cache'\n");
|
||||
if(!strcmp(titleid,"PCSI00007"))
|
||||
WriteFile("cache0:/_System/protected_kconsole_cache.dat",&SUITE_KCONSOLE, sizeof(SUITE_KCONSOLE));
|
||||
else
|
||||
WriteFile("cache0:/_System/protected_kconsole_cache.dat",&UNITY_KCONSOLE, sizeof(UNITY_KCONSOLE));
|
||||
}
|
||||
|
||||
if(!fileExists("cache0:/_System/psmdrmboot.dat"))
|
||||
{
|
||||
sceClibPrintf("Writing 'psmdrmboot'\n");
|
||||
if(!strcmp(titleid,"PCSI00007"))
|
||||
WriteFile("cache0:/_System/psmdrmboot.dat",&SUITE_PSMDRMBOOT, sizeof(SUITE_PSMDRMBOOT));
|
||||
else
|
||||
WriteFile("cache0:/_System/psmdrmboot.dat",&UNITY_PSMDRMBOOT, sizeof(UNITY_PSMDRMBOOT));
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ksceRtcGetCurrentTick_patched(unsigned int* timestamp) //fake valid time
|
||||
|
||||
|
||||
int ret0 (int *args)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
SceUID sceKernelLoadStartModule_patched(char *path, SceSize args, void *argp, int flags, SceKernelLMOption *option, int *status)
|
||||
{
|
||||
|
||||
|
||||
ret = TAI_CONTINUE(int, secureHook_ref,timestamp);
|
||||
|
||||
if(hookReleased) // sanity check
|
||||
SceUID ret;
|
||||
ret = TAI_CONTINUE(SceUID, LoadModuleHook_ref, path, args, argp, flags, option, status);
|
||||
|
||||
if(strstr(path,"libmono.suprx")) //PSM
|
||||
{
|
||||
printf("WARN: Hook was NOT released properly!\n");
|
||||
return ret;
|
||||
|
||||
SecurityCritical = taiHookFunctionExport(&SecurityCritical_ref,
|
||||
"SceLibMono",
|
||||
TAI_ANY_LIBRARY,
|
||||
0x02A867BC, //mono_security_enable_core_clr
|
||||
ret0);
|
||||
sceClibPrintf("SecurityCritical: %x\n",SecurityCritical);
|
||||
}
|
||||
|
||||
pid = ksceKernelGetProcessId();
|
||||
ksceKernelGetProcessTitleId(pid,titleid,12);
|
||||
|
||||
|
||||
if(!strcmp(titleid,"PCSI00009")) //UNITY (nice fail on license check lol https://twitter.com/SilicaDevs/status/1081758443495514112)
|
||||
if(strstr(path,"libpsm.suprx")) //PSM
|
||||
{
|
||||
printf("Spoofing time to %x%x\n",UNITY_LICENSE_VALID[1],UNITY_LICENSE_VALID[0]);
|
||||
|
||||
timestamp[0] = UNITY_LICENSE_VALID[0];
|
||||
timestamp[1] = UNITY_LICENSE_VALID[1];
|
||||
return 0;
|
||||
|
||||
PeekPositive = taiHookFunctionImport(&PeekPositive_ref,
|
||||
"SceLibPsm",
|
||||
TAI_ANY_LIBRARY,
|
||||
0xA9C3CED6, // sceCtrlPeekBufferPositive
|
||||
sceCtrlPeekBufferPositive_patched);
|
||||
sceClibPrintf("PeekPositive: %x\n",PeekPositive);
|
||||
}
|
||||
|
||||
if(strstr(path,"libScePsmEdata.suprx")) //PSM Unity
|
||||
{
|
||||
|
||||
UnityCheckDrm = taiHookFunctionOffset(&UnityCheckDrm_ref,
|
||||
ret,
|
||||
0,
|
||||
0x5a62, //PsmDrmBootCheck
|
||||
1,
|
||||
ret0);
|
||||
sceClibPrintf("UnityCheckDrm: %x\n",UnityCheckDrm);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int isAllowedSerial_patch(int arg1, int arg2, int arg3, int arg4) { //Not acturally needed for reF00D but kept to remain backwards-compadible with RePatch compati packs.
|
||||
TAI_CONTINUE(int, isAllowedSerial_ref,arg1,arg2,arg3,arg4);
|
||||
return 1;
|
||||
}
|
||||
|
||||
void _start() __attribute__ ((weak, alias ("module_start")));
|
||||
void module_start(SceSize argc, const void *args) {
|
||||
|
||||
static SceUID _ksceKernelLaunchAppPatched(void *args)
|
||||
{
|
||||
char *titleid = (char *)((uintptr_t *)args)[0];
|
||||
uint32_t flags = (uint32_t)((uintptr_t *)args)[1];
|
||||
char *path = (char *)((uintptr_t *)args)[2];
|
||||
void *unk = (void *)((uintptr_t *)args)[3];
|
||||
sceAppMgrAppParamGetString(0, 12, titleid, 256);
|
||||
|
||||
printf("Loading SELF: %s\n",path);
|
||||
|
||||
if ((flags == 0x1000000 && strstr(path, "PCSI00007"))) //SUITE
|
||||
{
|
||||
ksceIoMkdir("ux0:/cache",6);
|
||||
ksceIoMkdir("ux0:/cache/PCSI00007",6);
|
||||
ksceIoMkdir("ux0:/cache/PCSI00007/_System",6);
|
||||
|
||||
if(!fileExists("ux0:/cache/PCSI00007/_System/Code"))
|
||||
{
|
||||
printf("Writing 'Code'\n");
|
||||
WriteFile("ux0:/cache/PCSI00007/_System/Code",&SUITE_CODE,sizeof(SUITE_CODE));
|
||||
}
|
||||
|
||||
if(!fileExists("ux0:/cache/PCSI00007/_System/target_kdbg_list.dat"))
|
||||
{
|
||||
printf("Writing 'target_kdbg_list'\n");
|
||||
WriteFile("ux0:/cache/PCSI00007/_System/target_kdbg_list.dat",&SUITE_TARGET,sizeof(SUITE_TARGET));
|
||||
}
|
||||
|
||||
if(!fileExists("ux0:/cache/PCSI00007/_System/vseed.dat"))
|
||||
{
|
||||
printf("Writing 'vseed'\n");
|
||||
WriteFile("ux0:/cache/PCSI00007/_System/vseed.dat",&SUITE_VSEED,sizeof(SUITE_VSEED));
|
||||
}
|
||||
|
||||
//Write KConsole and PSMDrmBoot
|
||||
printf("Writing 'protected_kconsole_cache'\n");
|
||||
WriteFile("ux0:/cache/PCSI00007/_System/protected_kconsole_cache.dat",&SUITE_KCONSOLE, sizeof(SUITE_KCONSOLE));
|
||||
printf("Writing 'psmdrmboot'\n");
|
||||
WriteFile("ux0:/cache/PCSI00007/_System/psmdrmboot.dat",&SUITE_PSMDRMBOOT, sizeof(SUITE_PSMDRMBOOT));
|
||||
|
||||
//Add case to fix dots-tb's broken repatch plugin (TEMPORARY)
|
||||
if ((flags == 0x1000000 && strstr(path, "ux0:/patch/PCSI00007")))
|
||||
{
|
||||
char buf[1024];
|
||||
memset(buf,0x00,1024);
|
||||
char *NewPath;
|
||||
NewPath = path + sizeof("ux0:/patch/PCSI00007/") - 1;
|
||||
snprintf(buf,1024,"ux0:/repatch/PCSI00007/%s",NewPath);
|
||||
if(fileExists(buf))
|
||||
{
|
||||
ret = TAI_CONTINUE(int, runHook_ref, titleid, flags, buf, unk);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
if ((flags == 0x1000000 && strstr(path, "ux0:/app/PCSI00007")))
|
||||
{
|
||||
char buf[1024];
|
||||
memset(buf,0x00,1024);
|
||||
char *NewPath;
|
||||
NewPath = path + sizeof("ux0:/app/PCSI00007/") - 1;
|
||||
snprintf(buf,1024,"ux0:/repatch/PCSI00007/%s",NewPath);
|
||||
if(fileExists(buf))
|
||||
{
|
||||
ret = TAI_CONTINUE(int, runHook_ref, titleid, flags, buf, unk);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
ret = TAI_CONTINUE(int, runHook_ref, titleid, flags, path, unk);
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
if ((flags == 0x1000000 && strstr(path, "PCSI00009"))) //UNITY
|
||||
{
|
||||
ksceIoMkdir("ux0:/cache",6);
|
||||
ksceIoMkdir("ux0:/cache/PCSI00009",6);
|
||||
ksceIoMkdir("ux0:/cache/PCSI00009/_System",6);
|
||||
|
||||
if(strstr(path,"eboot.bin")) //MAIN SELF
|
||||
{
|
||||
|
||||
printf("Main Dev Suite running!\n");
|
||||
gameRunning = 0;
|
||||
hookReleased = 0;
|
||||
if(rtcHook <= 0)
|
||||
{
|
||||
rtcHook = taiHookFunctionExportForKernel(KERNEL_PID,
|
||||
&rtcHook_ref,
|
||||
"SceRtc",
|
||||
0x0351D827, // SceRtcForDriver
|
||||
0xDEC408D4, // ksceRtcGetCurrentTick
|
||||
ksceRtcGetCurrentTick_patched);
|
||||
printf("RtcHook: %x\n",rtcHook);
|
||||
}
|
||||
}
|
||||
|
||||
if(strstr(path,".self")){
|
||||
printf("Game Running!\n");
|
||||
gameRunning = 1;
|
||||
}
|
||||
|
||||
ksceIoMkdir("ux0:/cache/PCSI00009/_System",6);
|
||||
|
||||
if(!fileExists("ux0:/cache/PCSI00009/_System/Code"))
|
||||
{
|
||||
printf("Writing 'Code'\n");
|
||||
WriteFile("ux0:/cache/PCSI00009/_System/Code",&UNITY_CODE,sizeof(UNITY_CODE));
|
||||
}
|
||||
|
||||
if(!fileExists("ux0:/cache/PCSI00009/_System/target_kdbg_list.dat"))
|
||||
{
|
||||
printf("Writing 'target_kdbg_list'\n");
|
||||
WriteFile("ux0:/cache/PCSI00009/_System/target_kdbg_list.dat",&UNITY_TARGET,sizeof(UNITY_TARGET));
|
||||
}
|
||||
|
||||
if(!fileExists("ux0:/cache/PCSI00009/_System/vseed.dat"))
|
||||
{
|
||||
printf("Writing 'vseed'\n");
|
||||
WriteFile("ux0:/cache/PCSI00009/_System/vseed.dat",&UNITY_VSEED,sizeof(UNITY_VSEED));
|
||||
}
|
||||
|
||||
//Write KConsole and PSMDrmBoot
|
||||
printf("Writing 'protected_kconsole_cache'\n");
|
||||
WriteFile("ux0:/cache/PCSI00009/_System/protected_kconsole_cache.dat",&UNITY_KCONSOLE, sizeof(UNITY_KCONSOLE));
|
||||
printf("Writing 'psmdrmboot'\n");
|
||||
|
||||
WriteFile("ux0:/cache/PCSI00009/_System/psmdrmboot.dat",&UNITY_PSMDRMBOOT, sizeof(UNITY_PSMDRMBOOT));
|
||||
|
||||
|
||||
|
||||
|
||||
//Add case to fix dots-tb's broken repatch plugin (TEMPORARY)
|
||||
if ((flags == 0x1000000 && strstr(path, "ux0:/patch/PCSI00009")))
|
||||
{
|
||||
char buf[1024];
|
||||
memset(buf,0x00,1024);
|
||||
char *NewPath;
|
||||
NewPath = path + sizeof("ux0:/patch/PCSI00009/") - 1;
|
||||
snprintf(buf,1024,"ux0:/repatch/PCSI00009/%s",NewPath);
|
||||
if(fileExists(buf))
|
||||
{
|
||||
ret = TAI_CONTINUE(int, runHook_ref, titleid, flags, buf, unk);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
if ((flags == 0x1000000 && strstr(path, "ux0:/app/PCSI00009")))
|
||||
{
|
||||
char buf[1024];
|
||||
memset(buf,0x00,1024);
|
||||
char *NewPath;
|
||||
NewPath = path + sizeof("ux0:/app/PCSI00009/") - 1;
|
||||
snprintf(buf,1024,"ux0:/repatch/PCSI00009/%s",NewPath);
|
||||
if(fileExists(buf))
|
||||
{
|
||||
ret = TAI_CONTINUE(int, runHook_ref, titleid, flags, buf, unk);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
ret = TAI_CONTINUE(int, runHook_ref, titleid, flags, path, unk);
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
return TAI_CONTINUE(int, runHook_ref, titleid, flags, path, unk); // returns pid
|
||||
}
|
||||
|
||||
static SceUID ksceKernelLaunchApp_patched(char *titleid, uint32_t flags, char *path, void *unk)
|
||||
{
|
||||
uintptr_t args[4];
|
||||
args[0] = (uintptr_t)titleid;
|
||||
args[1] = (uintptr_t)flags;
|
||||
args[2] = (uintptr_t)path;
|
||||
args[3] = (uintptr_t)unk;
|
||||
|
||||
return ksceKernelRunWithStack(0x4000, _ksceKernelLaunchAppPatched, args);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void _start() __attribute__ ((weak, alias ("module_start")));
|
||||
int module_start(SceSize argc, const void *args)
|
||||
{
|
||||
|
||||
runHook = taiHookFunctionExportForKernel(KERNEL_PID, &runHook_ref, "SceProcessmgr", 0x7A69DE86, 0x71CF71FD, ksceKernelLaunchApp_patched);
|
||||
if (runHook < 0)
|
||||
runHook = taiHookFunctionExportForKernel(KERNEL_PID, &runHook_ref, "SceProcessmgr", 0xEB1F8EF7, 0x68068618, ksceKernelLaunchApp_patched);
|
||||
|
||||
secureHook = taiHookFunctionExportForKernel(KERNEL_PID,
|
||||
&secureHook_ref,
|
||||
"SceRtc",
|
||||
0x0351D827, // SceRtcForDriver
|
||||
0x401C0954, // ksceRtcGetCurrentSecureTick
|
||||
ksceRtcGetCurrentSecureTick_patched);
|
||||
if(fileExists("ux0:/repatch/PCSI00009/eboot.bin") || fileExists("ux0:/repatch/PCSI00007/eboot.bin"))
|
||||
if(!strcmp(titleid,"PCSI00007"))
|
||||
{
|
||||
isAllowedSerialHook = taiHookFunctionExportForKernel(KERNEL_PID,
|
||||
&isAllowedSerial_ref,
|
||||
"SceSblACMgr",
|
||||
0x9AD8E213, // SceSblACMgrForDriver
|
||||
0x062CAEB2, // isAllowedSerial
|
||||
isAllowedSerial_patch);
|
||||
printf("isAllowedSerialHook: %x\n",isAllowedSerialHook);
|
||||
tai_module_info_t tai_info;
|
||||
tai_info.size = sizeof(tai_module_info_t);
|
||||
taiGetModuleInfo("ScePsmDev", &tai_info);
|
||||
|
||||
SuiteCheckDrm = taiHookFunctionOffset(&SuiteCheckDrm_ref,
|
||||
tai_info.modid,
|
||||
0,
|
||||
0xbe2, //SuiteCheckDrm
|
||||
1,
|
||||
ret0);
|
||||
sceClibPrintf("SuiteCheckDrmHook: %x\n",SuiteCheckDrm);
|
||||
}
|
||||
printf("RunHook: %x\n",runHook);
|
||||
printf("SecureHook: %x\n",secureHook);
|
||||
|
||||
return SCE_KERNEL_START_SUCCESS;
|
||||
if(!strcmp(titleid,"PCSI00009"))
|
||||
{
|
||||
tai_module_info_t tai_info;
|
||||
tai_info.size = sizeof(tai_module_info_t);
|
||||
taiGetModuleInfo(TAI_MAIN_MODULE, &tai_info);
|
||||
if(strstr(tai_info.name, "Unity"))
|
||||
{
|
||||
PeekPositive = taiHookFunctionImport(&PeekPositive_ref,
|
||||
TAI_MAIN_MODULE,
|
||||
TAI_ANY_LIBRARY,
|
||||
0x15F81E8C, // sceCtrlPeekBufferPositive2
|
||||
sceCtrlPeekBufferPositive_patched);
|
||||
sceClibPrintf("PeekPositive: %x\n",PeekPositive);
|
||||
}
|
||||
}
|
||||
|
||||
if(!strcmp(titleid,"PCSI00007") || !strcmp(titleid,"PCSI00009")) // PSM Runtime & PSM Unity Runtime
|
||||
{
|
||||
sceClibPrintf("Silca: I like to see girls die :3\n");
|
||||
sceClibPrintf("Loaded!\n");
|
||||
sceClibPrintf("Running on %s\n",titleid);
|
||||
|
||||
CacheMounted = taiHookFunctionImport(&CacheMounted_ref,
|
||||
TAI_MAIN_MODULE,
|
||||
TAI_ANY_LIBRARY,
|
||||
0x0AA56143, //sceAppUtilCacheMount
|
||||
sceAppUtilCacheMount_patched);
|
||||
|
||||
|
||||
LoadModuleHook = taiHookFunctionImport(&LoadModuleHook_ref,
|
||||
TAI_MAIN_MODULE,
|
||||
TAI_ANY_LIBRARY,
|
||||
0x2DCC4AFA, //sceKernelLoadStartModule
|
||||
sceKernelLoadStartModule_patched);
|
||||
|
||||
sceClibPrintf("LoadModuleHook: %x\n",LoadModuleHook);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
int module_stop(SceSize argc, const void *args)
|
||||
{
|
||||
return SCE_KERNEL_STOP_SUCCESS;
|
||||
int module_stop(SceSize argc, const void *args) {
|
||||
|
||||
// release hooks
|
||||
if (CacheMounted >= 0) taiHookRelease(CacheMounted, CacheMounted_ref);
|
||||
if (SuiteCheckDrm >= 0) taiHookRelease(SuiteCheckDrm, SuiteCheckDrm_ref);
|
||||
if (LoadModuleHook >= 0) taiHookRelease(LoadModuleHook, LoadModuleHook_ref);
|
||||
if (SecurityCritical >= 0) taiHookRelease(SecurityCritical, SecurityCritical_ref);
|
||||
|
||||
return SCE_KERNEL_STOP_SUCCESS;
|
||||
}
|
||||
|
|
43
README.md
43
README.md
|
@ -1,32 +1,21 @@
|
|||
# MakePsmGreatAgain
|
||||
# IDUSpoof
|
||||
This is a plugin that spoofs IDU Mode (vshSysconIsIduMode) to allways return 0x1
|
||||
this has the effect of tricking whatever application's its configured for into thinking its running in IDU mode.
|
||||
in fact, if you do \*ALL it has the same effect as if you just enabled IDU mode!
|
||||
the advantage to this plugin is ofcource that you can specify exactly what apps idu is set for.
|
||||
|
||||
Modifications to the PSM Developer applications
|
||||
for example. if you want to enable the package installer. simply do
|
||||
\*NPXS10031
|
||||
ux0:tai/iduSpoof.suprx
|
||||
|
||||
or enable IDU settings without IDU Mode:
|
||||
|
||||
\*NPXS10015
|
||||
ux0:tai/iduSpoof.suprx
|
||||
|
||||
Re-Enables USB Serial Mode, and gives PSM Developer Applications infinite publishing licenses
|
||||
though keep in mind henkaku overwrites idu settings with its own.
|
||||
|
||||
Install under \*KERNEL
|
||||
|
||||
[How do i install PSM Dev?](https://pastebin.com/8mGXtC57)
|
||||
|
||||
Where gonna Build a wall and make Sony pay for it!
|
||||
Probably with he money they stole from us
|
||||
by deleting our PSM Purchases
|
||||
# V1.3 -
|
||||
Now works with reF00D plugin by dots_tb (as well as repatch)
|
||||
|
||||
Download: https://bitbucket.org/SilicaAndPina/makepsmgreatagain/downloads/MakePsmGreatAgain-v1.3.skprx
|
||||
|
||||
# v1.2 -
|
||||
Infinite Publishing License for PSM Dev for Unity (PCSI00009)
|
||||
PSM Dev for Unity, app/game launching acturally working now (fixed bugs that dots-tb didnt want to fix)
|
||||
|
||||
Download: https://bitbucket.org/SilicaAndPina/makepsmgreatagain/downloads/MakePsmGreatAgain-v1.2.skprx
|
||||
|
||||
# v1.0 -
|
||||
Automatically creates publishing license (if not allready created) at PSM Dev bootup (still need psm+ for development!)
|
||||
Re-Enable's SceUsbSerial for ALL applications (yes, if u want to use it on your own homebrew, YOU CAN!)
|
||||
Spoofs SecureTick to allways be within the valid period for the PsmDrmBoot and KConsole Cache (Publsihing License will never expire)
|
||||
Note: Only PSM Dev Suite supported in v1.0
|
||||
|
||||
Download: https://bitbucket.org/SilicaAndPina/makepsmgreatagain/downloads/MakePsmGreatAgain.skprx
|
||||
!! WORKS ON 3.65 And 3.68!!
|
||||
|
||||
Download: https://bitbucket.org/SilicaAndPina/iduspoof/downloads/iduSpoof.suprx
|
Loading…
Reference in New Issue