From 066e9c3128ba24c559123274073ab52f329a08a0 Mon Sep 17 00:00:00 2001 From: TheFloW Date: Tue, 19 Jun 2018 23:53:09 +0200 Subject: [PATCH] Fixed gamecard mount detection --- CMakeLists.txt | 2 +- README.md | 4 ++ main.h | 2 +- main_context.c | 6 ++- modules/kernel/exports.yml | 1 - modules/kernel/main.c | 58 ++++++--------------- modules/kernel/vitashell_kernel.h | 3 +- modules/user/exports.yml | 1 - modules/user/main.c | 8 +-- modules/user/vitashell_user.h | 3 +- pkg/sce_sys/livearea/contents/template.xml | 2 +- resources/kernel.skprx | Bin 3395 -> 3387 bytes resources/user.suprx | Bin 1677 -> 1648 bytes usb.c | 10 +++- 14 files changed, 40 insertions(+), 60 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 42eba78c..2de5f81f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,7 @@ project(VitaShell) include("${VITASDK}/share/vita.cmake" REQUIRED) set(VITA_APP_NAME "VitaShell") set(VITA_TITLEID "VITASHELL") -set(VITA_VERSION "01.92") +set(VITA_VERSION "01.93") # Flags and includes set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -O3 -Wno-unused-variable -Wno-unused-but-set-variable -Wno-format-truncation -fno-lto") diff --git a/README.md b/README.md index 5db9d118..ea12eb68 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,10 @@ Credits Changelog --------- +### Changelog 1.93 +- Added xmc0: to partition list and added ability to mount xmc0:. +- Fixed ux0: mounting bug where it wasn't detected that the gamesd has already been mounted. + ### Changelog 1.92 - Added ability to mount gamesd ux0: - Fixed bug where the VitaShell kernel module was loaded but not started, thus it'd run out of memory after some launches. diff --git a/main.h b/main.h index a39bf484..c8af8928 100644 --- a/main.h +++ b/main.h @@ -53,7 +53,7 @@ // VitaShell version major.minor #define VITASHELL_VERSION_MAJOR 0x01 -#define VITASHELL_VERSION_MINOR 0x92 +#define VITASHELL_VERSION_MINOR 0x93 #define VITASHELL_VERSION ((VITASHELL_VERSION_MAJOR << 0x18) | (VITASHELL_VERSION_MINOR << 0x10)) diff --git a/main_context.c b/main_context.c index 1ee632bf..3237f222 100644 --- a/main_context.c +++ b/main_context.c @@ -332,7 +332,8 @@ void setContextMenuHomeVisibilities() { menu_home_entries[MENU_HOME_ENTRY_MOUNT_USB_UX0].visibility = CTX_INVISIBLE; } - if ((kernel_modid >= 0 || kernel_modid == 0x8002D013) && user_modid >= 0 && shellUserIsUx0Redirected() == 1) { + if ((kernel_modid >= 0 || kernel_modid == 0x8002D013) && user_modid >= 0 && + shellUserIsUx0Redirected("sdstor0:uma-pp-act-a", "sdstor0:uma-lp-act-entire") == 1) { menu_home_entries[MENU_HOME_ENTRY_MOUNT_UMA0].visibility = CTX_INVISIBLE; menu_home_entries[MENU_HOME_ENTRY_MOUNT_USB_UX0].visibility = CTX_INVISIBLE; } else { @@ -343,7 +344,8 @@ void setContextMenuHomeVisibilities() { menu_home_entries[MENU_HOME_ENTRY_MOUNT_GAMECARD_UX0].visibility = CTX_INVISIBLE; menu_home_entries[MENU_HOME_ENTRY_UMOUNT_GAMECARD_UX0].visibility = CTX_INVISIBLE; } else { - if ((kernel_modid >= 0 || kernel_modid == 0x8002D013) && user_modid >= 0 && shellUserIsUx0Redirected() == 1) { + if ((kernel_modid >= 0 || kernel_modid == 0x8002D013) && user_modid >= 0 && + shellUserIsUx0Redirected("sdstor0:gcd-lp-ign-entire", "sdstor0:gcd-lp-ign-entire") == 1) { menu_home_entries[MENU_HOME_ENTRY_MOUNT_GAMECARD_UX0].visibility = CTX_INVISIBLE; } else { menu_home_entries[MENU_HOME_ENTRY_UMOUNT_GAMECARD_UX0].visibility = CTX_INVISIBLE; diff --git a/modules/kernel/exports.yml b/modules/kernel/exports.yml index 1336daaa..b9f754d2 100644 --- a/modules/kernel/exports.yml +++ b/modules/kernel/exports.yml @@ -12,6 +12,5 @@ VitaShellKernel2: functions: - shellKernelIsUx0Redirected - shellKernelRedirectUx0 - - shellKernelUnredirectUx0 - shellKernelMountById - shellKernelGetRifVitaKey \ No newline at end of file diff --git a/modules/kernel/main.c b/modules/kernel/main.c index 88524d98..fdfef8d5 100644 --- a/modules/kernel/main.c +++ b/modules/kernel/main.c @@ -65,8 +65,6 @@ static SceIoDevice ux0_dev = { "ux0:", "exfatux0", ux0_blkdev, ux0_blkdev2, MOUN static SceIoMountPoint *(* sceIoFindMountPoint)(int id) = NULL; -static SceIoDevice *ori_dev = NULL, *ori_dev2 = NULL; - static SceUID hookid = -1; static tai_hook_ref_t ksceSysrootIsSafeModeRef; @@ -81,17 +79,22 @@ static int ksceSblAimgrIsDolcePatched() { return 1; } -int shellKernelIsUx0Redirected() { +int shellKernelIsUx0Redirected(const char *blkdev, const char *blkdev2) { + char k_blkdev[64], k_blkdev2[64]; + uint32_t state; ENTER_SYSCALL(state); SceIoMountPoint *mount = sceIoFindMountPoint(MOUNT_POINT_ID); if (!mount) { EXIT_SYSCALL(state); - return -1; + return 0; } - if (mount->dev == &ux0_dev && mount->dev2 == &ux0_dev) { + ksceKernelStrncpyUserToKernel(k_blkdev, blkdev, sizeof(k_blkdev)-1); + ksceKernelStrncpyUserToKernel(k_blkdev2, blkdev2, sizeof(k_blkdev2)-1); + + if (mount && mount->dev && strcmp(mount->dev->blkdev, k_blkdev) == 0 && strcmp(mount->dev->blkdev2, k_blkdev2) == 0) { EXIT_SYSCALL(state); return 1; } @@ -110,11 +113,6 @@ int shellKernelRedirectUx0(const char *blkdev, const char *blkdev2) { return -1; } - if (mount->dev != &ux0_dev && mount->dev2 != &ux0_dev) { - ori_dev = mount->dev; - ori_dev2 = mount->dev2; - } - ksceKernelStrncpyUserToKernel(ux0_blkdev, blkdev, sizeof(ux0_blkdev)-1); ksceKernelStrncpyUserToKernel(ux0_blkdev2, blkdev2, sizeof(ux0_blkdev2)-1); @@ -125,28 +123,6 @@ int shellKernelRedirectUx0(const char *blkdev, const char *blkdev2) { return 0; } -int shellKernelUnredirectUx0() { - uint32_t state; - ENTER_SYSCALL(state); - - SceIoMountPoint *mount = sceIoFindMountPoint(MOUNT_POINT_ID); - if (!mount) { - EXIT_SYSCALL(state); - return -1; - } - - if (ori_dev && ori_dev2) { - mount->dev = ori_dev; - mount->dev2 = ori_dev2; - - ori_dev = NULL; - ori_dev2 = NULL; - } - - EXIT_SYSCALL(state); - return 0; -} - int _shellKernelMountById(ShellMountIdArgs *args) { int res; @@ -165,12 +141,12 @@ int _shellKernelMountById(ShellMountIdArgs *args) { module_get_offset(KERNEL_PID, tai_info.modid, 0, 0x2DE1, (uintptr_t *)&sceAppMgrFindProcessInfoByPid); module_get_offset(KERNEL_PID, tai_info.modid, 0, 0x19B51, (uintptr_t *)&sceAppMgrMountById); break; - + case 0x1C9879D6: // 3.65 retail module_get_offset(KERNEL_PID, tai_info.modid, 0, 0x2DE1, (uintptr_t *)&sceAppMgrFindProcessInfoByPid); module_get_offset(KERNEL_PID, tai_info.modid, 0, 0x19E61, (uintptr_t *)&sceAppMgrMountById); break; - + case 0x54E2E984: // 3.67 retail case 0xC3C538DE: // 3.68 retail module_get_offset(KERNEL_PID, tai_info.modid, 0, 0x2DE1, (uintptr_t *)&sceAppMgrFindProcessInfoByPid); @@ -192,7 +168,7 @@ int _shellKernelMountById(ShellMountIdArgs *args) { return res; uint32_t appmgr_data_addr = (uint32_t)mod_info.segments[1].vaddr; - + SceUID process_id = ksceKernelGetProcessId(); void *info = sceAppMgrFindProcessInfoByPid((void *)(appmgr_data_addr + 0x500), process_id); @@ -215,7 +191,7 @@ int _shellKernelMountById(ShellMountIdArgs *args) { ksceKernelStrncpyUserToKernel(desired_mount_point, (uintptr_t)args->desired_mount_point, 15); if (args->klicensee) ksceKernelMemcpyUserToKernel(klicensee, (uintptr_t)args->klicensee, 0x10); - + res = sceAppMgrMountById(process_id, info + 0x580, args->id, args->process_titleid ? process_titleid : NULL, args->path ? path : NULL, args->desired_mount_point ? desired_mount_point : NULL, args->klicensee ? klicensee : NULL, mount_point); @@ -241,13 +217,13 @@ int shellKernelMountById(ShellMountIdArgs *args) { int shellKernelGetRifVitaKey(const void *license_buf, void *klicensee) { char k_license_buf[0x200]; char k_klicensee[0x10]; - + memset(k_klicensee, 0, sizeof(k_klicensee)); if (license_buf) ksceKernelMemcpyUserToKernel(k_license_buf, license_buf, sizeof(k_license_buf)); - - int res = ksceNpDrmGetRifVitaKey(k_license_buf, k_klicensee, NULL, NULL, NULL, NULL); + + int res = ksceNpDrmGetRifVitaKey(k_license_buf, k_klicensee, NULL, NULL, NULL, NULL); if (klicensee) ksceKernelMemcpyKernelToUser(klicensee, k_klicensee, sizeof(k_klicensee)); @@ -269,13 +245,13 @@ int module_start(SceSize args, void *argp) { case 0x9642948C: // 3.60 retail module_get_offset(KERNEL_PID, info.modid, 0, 0x138C1, (uintptr_t *)&sceIoFindMountPoint); break; - + case 0xA96ACE9D: // 3.65 retail case 0x3347A95F: // 3.67 retail case 0x90DA33DE: // 3.68 retail module_get_offset(KERNEL_PID, info.modid, 0, 0x182F5, (uintptr_t *)&sceIoFindMountPoint); break; - + default: return SCE_KERNEL_START_SUCCESS; } diff --git a/modules/kernel/vitashell_kernel.h b/modules/kernel/vitashell_kernel.h index 5bcf4d58..56654ce7 100644 --- a/modules/kernel/vitashell_kernel.h +++ b/modules/kernel/vitashell_kernel.h @@ -28,9 +28,8 @@ typedef struct { char *mount_point; } ShellMountIdArgs; -int shellKernelIsUx0Redirected(); +int shellKernelIsUx0Redirected(const char *blkdev, const char *blkdev2); int shellKernelRedirectUx0(const char *blkdev, const char *blkdev2); -int shellKernelUnredirectUx0(); int shellKernelMountById(ShellMountIdArgs *args); int shellKernelGetRifVitaKey(const void *license_buf, void *klicensee); diff --git a/modules/user/exports.yml b/modules/user/exports.yml index eb331918..c13f82cf 100644 --- a/modules/user/exports.yml +++ b/modules/user/exports.yml @@ -12,6 +12,5 @@ VitaShellUser: functions: - shellUserIsUx0Redirected - shellUserRedirectUx0 - - shellUserUnredirectUx0 - shellUserMountById - shellUserGetRifVitaKey \ No newline at end of file diff --git a/modules/user/main.c b/modules/user/main.c index 743bc3ac..656620f6 100644 --- a/modules/user/main.c +++ b/modules/user/main.c @@ -26,18 +26,14 @@ #include "vitashell_user.h" -int shellUserIsUx0Redirected() { - return shellKernelIsUx0Redirected(); +int shellUserIsUx0Redirected(const char *blkdev, const char *blkdev2) { + return shellKernelIsUx0Redirected(blkdev, blkdev2); } int shellUserRedirectUx0(const char *blkdev, const char *blkdev2) { return shellKernelRedirectUx0(blkdev, blkdev2); } -int shellUserUnredirectUx0() { - return shellKernelUnredirectUx0(); -} - int shellUserMountById(ShellMountIdArgs *args) { return shellKernelMountById(args); } diff --git a/modules/user/vitashell_user.h b/modules/user/vitashell_user.h index bf55f577..66640af7 100644 --- a/modules/user/vitashell_user.h +++ b/modules/user/vitashell_user.h @@ -21,9 +21,8 @@ #include -int shellUserIsUx0Redirected(); +int shellUserIsUx0Redirected(const char *blkdev, const char *blkdev2); int shellUserRedirectUx0(const char *blkdev, const char *blkdev2); -int shellUserUnredirectUx0(); int shellUserMountById(ShellMountIdArgs *args); int shellUserGetRifVitaKey(const void *license_buf, void *klicensee); diff --git a/pkg/sce_sys/livearea/contents/template.xml b/pkg/sce_sys/livearea/contents/template.xml index 8ec279d9..c1692b13 100644 --- a/pkg/sce_sys/livearea/contents/template.xml +++ b/pkg/sce_sys/livearea/contents/template.xml @@ -28,7 +28,7 @@ - v1.92 + v1.93 diff --git a/resources/kernel.skprx b/resources/kernel.skprx index 8962805d03419dee4277794410154fba8297a034..d0bc2ddc9238a307c33dc13fb8b72ee525be5e9d 100644 GIT binary patch delta 2415 zcmV-#36S=~8oL^h7zrXF0RR910029YA(sI_k-0ZP+=&1H+=&1H1poj501yBG0RR91 zoC5&>00062000627ytkOr~m)}1^@s601yBG0001B02cuO0000000000=#w!47a5@j z0000000062000000006200000006<0VF4cr+zJ2y00000U$cn;n*x7(Y*SSj0PwGm zyAn_+1KAKI*LG-)K_;CB6rpt6Z3lx6D#{-k)@_9rHdech01@qY$;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wd!a69{H%dw-1-UoVRs? z=ABbdlIA|P%bPO4-Yaf>&pOsq@^x&rm2dO2pP6c&m3Mz#f2QIVGbp+kD{h&dUC7Ji zDAMw@hWM_v|<4hkBHj+2ZF`Krx@-R3-%n2e vo0wl+FxBqve$DR%z3$)G#LJq~A9ijz7TrhE`xu{DM0|N-Nf`kPa7(nt%CbKfi^IqVBs0B&5 zOg3Z`mplO#U;+sN0gQezIgwGG^8?rj28OwtI~iv))$jI>PLw$Q@%fP>-cd)n1$AAU zN(ux-I=j86XRygKEeg^M;Xc^q=u~pS(e|WTDF@fCW0xEqkNAFM`p5Y)Vz)`|!T^mO z98HVt^7YhSsc`7sKmV{??jHC1;(MDf+`XP0Iqiw%`lus4leTsEXaDtNTQ z?kk!sXx0sA;Re9~X_{X8-r+ZpqzgVxG(9r|DdK@Z(Fy|K$M| zHU^?y_x}D0`kd9@>0+YUYpiE9@rI1vy(b%8rQWuOf6r|Cd$8~LAHDUJH~9+h%r^h~ zc1Gm(FNJr{E$@3)CS)=1{PjN5v!_nw9F#2EHN{=7{DXx26Dj$p`gSMNcTLnU(T;!V zmsfG;pl;1%>mPdGKRU}jT0ZB^*|?&v`$cW`MK4tg|NlR@bI&p3%2w{1A8mGIn;m?1 X(bD%x)3&EmzCF>DEwI1Wt6u^DHS9R_ diff --git a/usb.c b/usb.c index 39b490e1..79e5492a 100644 --- a/usb.c +++ b/usb.c @@ -65,7 +65,10 @@ int umountGamecardUx0() { sceAppMgrDestroyOtherApp(); // Restore ux0: patch - shellUserUnredirectUx0(); + if (checkFileExist("sdstor0:xmc-lp-ign-userext")) + shellUserRedirectUx0("sdstor0:xmc-lp-ign-userext", "sdstor0:xmc-lp-ign-userext"); + else + shellUserRedirectUx0("sdstor0:int-lp-ign-userext", "sdstor0:int-lp-ign-userext"); // Remount Memory Card remount(0x800); @@ -115,7 +118,10 @@ int umountUsbUx0() { sceAppMgrDestroyOtherApp(); // Restore ux0: patch - shellUserUnredirectUx0(); + if (checkFileExist("sdstor0:xmc-lp-ign-userext")) + shellUserRedirectUx0("sdstor0:xmc-lp-ign-userext", "sdstor0:xmc-lp-ign-userext"); + else + shellUserRedirectUx0("sdstor0:int-lp-ign-userext", "sdstor0:int-lp-ign-userext"); // Remount Memory Card remount(0x800);