Skip to content

Commit

Permalink
Merge pull request #26 from TheOfficialFloW/master
Browse files Browse the repository at this point in the history
added appmgr patch two allow memory card remount
  • Loading branch information
xyzz authored Jun 20, 2018
2 parents 39e6c7e + 75db0f1 commit 83f5b68
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions driver/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,32 @@ void patch_sdstor() {
}
}

// allow Memory Card remount
void patch_appmgr() {
tai_module_info_t appmgr_info;
appmgr_info.size = sizeof(tai_module_info_t);
if (taiGetModuleInfoForKernel(KERNEL_PID, "SceAppMgr", &appmgr_info) >= 0) {
uint32_t nop_nop_opcode = 0xBF00BF00;
switch (appmgr_info.module_nid) {
case 0xDBB29DB7: // 3.60 retail
case 0x1C9879D6: // 3.65 retail
taiInjectDataForKernel(KERNEL_PID, appmgr_info.modid, 0, 0xB338, &nop_nop_opcode, 4);
taiInjectDataForKernel(KERNEL_PID, appmgr_info.modid, 0, 0xB368, &nop_nop_opcode, 2);
break;

case 0x54E2E984: // 3.67 retail
case 0xC3C538DE: // 3.68 retail
taiInjectDataForKernel(KERNEL_PID, appmgr_info.modid, 0, 0xB344, &nop_nop_opcode, 4);
taiInjectDataForKernel(KERNEL_PID, appmgr_info.modid, 0, 0xB374, &nop_nop_opcode, 2);
break;
}
}
}

void _start() __attribute__ ((weak, alias("module_start")));
int module_start(SceSize args, void *argp) {
patch_sdstor();
patch_appmgr();
poke_gamecard();
register_sysevent();
redirect_ux0();
Expand Down

0 comments on commit 83f5b68

Please sign in to comment.