diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index ef7f229..8cd0c05 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -31,9 +31,9 @@ link_directories( ) add_executable(${PROJECT_NAME} + src/pup.c src/main.c src/ctrl.c - src/pup.c ) target_link_libraries(${PROJECT_NAME} @@ -63,7 +63,8 @@ vita_create_vpk(${PROJECT_NAME}.vpk ${VITA_TITLEID} eboot.bin FILE user.suprx user.suprx FILE kernel.skprx kernel.skprx FILE kmspico.skprx kmspico.skprx - FILE testkit.skprx testkit.skprx + FILE testkit_vita.skprx testkit_vita.skprx + FILE testkit_pstv.skprx testkit_pstv.skprx FILE vitaConfig.txt vitaConfig.txt FILE pstvConfig.txt pstvConfig.txt FILE app.info app.info diff --git a/app/pstvConfig.txt b/app/pstvConfig.txt index d860c2f..fc1069d 100644 --- a/app/pstvConfig.txt +++ b/app/pstvConfig.txt @@ -1,5 +1,23 @@ -load os0:kd/clockgen.skprx +# WARNING: DO NOT EDIT THIS FILE. IF YOU JUST WANT TO RUN A PLUGIN ON BOOT, +# EDIT ux0:tai/config.txt INSTEAD. IF YOU BREAK THIS FILE, YOUR VITA WILL NO +# LONGER BOOT. IF THAT HAPPENS, YOU CAN ENTER SAFE MODE AND RESET ALL SETTINGS +# TO RESET THIS FILE. THIS FILE IS UNIQUE TO EACH VITA MODEL. DO NOT BLINDLY +# USE SOMEONE ELSE'S CONFIG. +# +# PSP2 System Configuration for Release +# +# [NOTICE] +# +# This configuration is only for kernel_boot_loader_release.self. +# +- load ur0:tai/testkit.skprx +load os0:kd/clockgen.skprx +#load os0:kd/syscon.skprx +#load os0:kd/rtc.skprx + +#load os0:kd/sm_comm.skprx +#load os0:kd/ss_mgr.skprx load os0:kd/idstorage.skprx load os0:kd/ctrl.skprx @@ -19,10 +37,6 @@ load os0:kd/mtpif.skprx load os0:kd/post_ss_mgr.skprx load os0:kd/update_mgr.skprx -load os0:kd/usbstor.skprx -load os0:kd/usbstorvstor.skprx -load os0:kd/usbpspcm.skprx -- load ur0:tai/testkit.skprx load os0:kd/regmgr.skprx if USB_ENUM_WAKEUP @@ -30,10 +44,12 @@ load os0:kd/enum_wakeup.skprx else load os0:kd/vnz_wrapper.skprx +#load os0:kd/applier.skprx - load os0:kd/mgkeymgr.skprx load os0:kd/error.skprx +#load os0:kd/gcauthmgr.skprx load os0:kd/npdrm.skprx load os0:kd/ulobjmgr.skprx @@ -45,6 +61,9 @@ load os0:kd/wlanbt.skprx load os0:kd/usb_ether_smsc.skprx load os0:kd/usb_ether_rtl.skprx load os0:kd/bt.skprx +load os0:kd/usbstor.skprx +load os0:kd/usbstorvstor.skprx +load os0:kd/usbpspcm.skprx - load os0:kd/magicgate.skprx - load os0:kd/usbstormg.skprx diff --git a/app/src/main.c b/app/src/main.c index 82e4763..0801e65 100644 --- a/app/src/main.c +++ b/app/src/main.c @@ -95,12 +95,22 @@ void config() { int spoofer = 0; int activator = 0; + int pstv = sceKernelIsPSVitaTV(); +configMenuStart: psvDebugScreenClear(0); - - psvDebugScreenPrintf("Installation Type\n"); + + psvDebugScreenPrintf("Installation Type\n\n"); + psvDebugScreenPrintf("Please confirm: "); + if(pstv) + psvDebugScreenPrintf("(PlayStation Vita TV)\n"); + else + psvDebugScreenPrintf("(PlayStation Vita Handheld)\n"); + psvDebugScreenPrintf("If you use the wrong config you have to reinstall firmware!\n\n"); + psvDebugScreenPrintf("X: Full Install (spoofer + activator + testkit vsh)\n"); psvDebugScreenPrintf("O: Warning Message Install (spoofer + testkit vsh)\n"); psvDebugScreenPrintf("[]: Enso-less Install (testkit vsh)\n"); + psvDebugScreenPrintf("/\\: Switch machine type (VITA <-> PSTV)\n"); sceKernelDelayThread(100000); @@ -112,6 +122,10 @@ void config() case SCE_CTRL_CIRCLE: spoofer = 1; break; + case SCE_CTRL_TRIANGLE: + pstv = !pstv; + goto configMenuStart; + break; case SCE_CTRL_SQUARE: break; default: @@ -127,18 +141,20 @@ void config() if(spoofer) { psvDebugScreenPrintf("Writing testkit.skprx"); - CopyFile("app0:/testkit.skprx","ur0:tai/testkit.skprx"); //int pstv = vshSblAimgrIsGenuineDolce(); - my PSTV was not genuine :'( I need to buy a product key for it.. //In the meantime, sceKernelIsPSVitaTV() it is! - int pstv = sceKernelIsPSVitaTV(); + if(pstv) { CopyFile("app0:/pstvConfig.txt","ur0:tai/boot_config.txt"); + CopyFile("app0:/testkit_pstv.skprx","ur0:tai/testkit.skprx"); + } else { CopyFile("app0:/vitaConfig.txt","ur0:tai/boot_config.txt"); + CopyFile("app0:/testkit_vita.skprx","ur0:tai/testkit.skprx"); } } diff --git a/app/src/pup.h b/app/src/pup.h index ed285ae..4c75023 100644 --- a/app/src/pup.h +++ b/app/src/pup.h @@ -3,6 +3,9 @@ * https://github.com/Princess-of-Sleeping/PSV-PUP-Extractor */ +#ifndef __PUP_H__ +#define __PUP_H__ + #include #include @@ -81,9 +84,9 @@ typedef struct { SceUInt32 unknown_0x3C; } __attribute__((packed)) ScePlayStartionUpdatePackageHeader3; -char pup_type_buf[0x20]; -char pup_dec_dir[0x100]; -char temp_buff[0x2000]; +static char pup_type_buf[0x20]; +static char pup_dec_dir[0x100]; +static char temp_buff[0x2000]; int get_key(int type); @@ -99,4 +102,6 @@ void sceGetPlayStartionUpdatePackageFileEntryId(void *buff, int entry_id); int sceGetPlayStartionUpdatePackageInfo(ScePlayStartionUpdatePackageHeader1 *header); -int scePlayStartionUpdatePackageExtractStage1(char *ext_pup_path); \ No newline at end of file +int scePlayStartionUpdatePackageExtractStage1(char *ext_pup_path); + +#endif diff --git a/build.sh b/build.sh index e04197b..da3ecda 100644 --- a/build.sh +++ b/build.sh @@ -6,7 +6,11 @@ cd kernel/ cmake . make install -cd ../spoofer/ +cd ../spoofer_vita/ +make clean +make + +cd ../spoofer_pstv/ make clean make @@ -20,8 +24,9 @@ make install cd ../app/ mv ../kmspico/kmspico.skprx kmspico.skprx -mv ../spoofer/kDump.skprx testkit.skprx +mv ../spoofer_vita/kDump.skprx testkit_vita.skprx +mv ../spoofer_pstv/kDump.skprx testkit_pstv.skprx mv ../kernel/kernel.skprx kernel.skprx mv ../user/user.suprx user.suprx cmake . -make \ No newline at end of file +make diff --git a/spoofer/mmu_dump.o b/spoofer/mmu_dump.o deleted file mode 100644 index 39cdad8..0000000 Binary files a/spoofer/mmu_dump.o and /dev/null differ diff --git a/spoofer/LICENSE b/spoofer_pstv/LICENSE similarity index 100% rename from spoofer/LICENSE rename to spoofer_pstv/LICENSE diff --git a/spoofer/Makefile b/spoofer_pstv/Makefile similarity index 96% rename from spoofer/Makefile rename to spoofer_pstv/Makefile index aa23206..83d62e0 100644 --- a/spoofer/Makefile +++ b/spoofer_pstv/Makefile @@ -9,7 +9,7 @@ PLUGIN_LIBS = -ltaihen_stub -lSceSysclibForDriver_stub -lSceModulemgrForKernel_s PREFIX = arm-vita-eabi CC = $(PREFIX)-gcc -CFLAGS = -Wl,-q -Wall -O3 +CFLAGS = -Wl,-q -Wall -O0 ASFLAGS = $(CFLAGS) all: kDump.skprx diff --git a/spoofer/README.md b/spoofer_pstv/README.md similarity index 100% rename from spoofer/README.md rename to spoofer_pstv/README.md diff --git a/spoofer/exports.yml b/spoofer_pstv/exports.yml similarity index 100% rename from spoofer/exports.yml rename to spoofer_pstv/exports.yml diff --git a/spoofer_pstv/mmu_dump.c b/spoofer_pstv/mmu_dump.c new file mode 100644 index 0000000..9b93204 --- /dev/null +++ b/spoofer_pstv/mmu_dump.c @@ -0,0 +1,286 @@ +/* + * mmu_dump.c - Bare metal ARMv7 translation table dumper + * Copyright 2014 Yifan Lu + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include +#include +#include + +static int afe; + +#define DUMP_PATH "ux0:dump/" + +void _start() __attribute__ ((weak, alias ("module_start"))); + +static unsigned int pa2va(unsigned int pa) +{ + unsigned int va; + unsigned int vaddr; + unsigned int paddr; + unsigned int i; + + va = 0; + for (i = 0; i < 0x100000; i++) + { + vaddr = i << 12; + __asm__("mcr p15,0,%1,c7,c8,0\n\t" + "mrc p15,0,%0,c7,c4,0\n\t" : "=r" (paddr) : "r" (vaddr)); + if ((pa & 0xFFFFF000) == (paddr & 0xFFFFF000)) + { + va = vaddr + (pa & 0xFFF); + break; + } + } + return va; +} + +static void mmu_get_perms(int ap2, int ap1, int *ur, int *uw, int *pr, int *pw) +{ + /* AFE enabled, use simple permissions */ + if (afe) + { + *ur = ap1 > 1; + *uw = !ap2 && ap1 > 1; + *pr = 1; + *pw = !ap2 && ap1 < 2; + } + else + { + *pw = (!ap2 && ap1); + *pr = *pw || ap1; + *ur = ap1 > 1; + *uw = !ap2 && ap1 == 3; + } +} + +//magic +unsigned char magic[0x8] = { + 0xA5, 0x9D, 0xCE, 0xAB, 0x00, 0x01, 0x01 +}; + +//spoof +unsigned char testkit_pscode[0x8] = { + 0x00, 0x01, 0x01, 0x02, 0x02, 0x01, 0x00, 0x03 +}; + +static int mmu_dump_pages(unsigned int vaddr, unsigned int entry) +{ + int xn; + int ng; + int s; + int ap2; + int ap1; + int pr; + int pw; + int ur; + int uw; + unsigned int paddr; + SceUID fd; + + if ((entry & 0x3) == 0x1) /* large page */ + { + xn = entry & 0x8000; + ng = entry & 0x800; + s = entry & 0x400; + ap2 = entry & 0x200; + ap1 = (entry >> 4) & 3; + mmu_get_perms(ap2, ap1, &ur, &uw, &pr, &pw); + paddr = entry & 0xFFFF0000; + if( paddr >= 0x40201000 && paddr < 0x5FD00000 && paddr != 0x44C20000 && paddr != 0x44C30000 && paddr != 0x443C0000){ + if( (paddr-0x44300000) <= (0x44400000-0x44300000) ){ + + }else if ( (paddr-0x45020000) <= (0x45030000-0x45020000) ){ + }else{ + + + + + //spoofing happens here + int counter = 0; + for (counter = 0; counter < 0x1000; counter ++){ + if(memcmp((void*)vaddr + counter, magic, 7) == 0 && counter == 0x5B0){ + counter = counter + 4; + memcpy((void*) vaddr + counter, testkit_pscode, 8); + return 0; + } + } + } + } + else{ + + } + } + else if ((entry & 0x2)) /* small page */ + { + xn = entry & 1; + ng = entry & 0x800; + s = entry & 0x400; + ap2 = entry & 0x200; + ap1 = (entry >> 4) & 3; + mmu_get_perms(ap2, ap1, &ur, &uw, &pr, &pw); + paddr = entry & 0xFFFFF000; + //0x4434C000 + if( paddr >= 0x40201000 && paddr < 0x5FD00000){ + if( (paddr-0x47D80000) <= (0x47D90000-0x47D80000) ){ + }else if ( (paddr-0x44C09000) <= (0x44C1A000-0x44C09000) ){ + }else if ( (paddr-0x44300000) <= (0x44400000-0x44300000) ){ + }else if ( (paddr-0x45009000) <= (0x45019000-0x45009000) ){ + }else if ( (paddr-0x44700000) <= (0x44710000-0x44700000) ){ + }else{ + + + //spoofing also happens here + int counter = 0; + for (counter = 0; counter < 0x1000; counter ++){ + if(memcmp((void*)vaddr + counter, magic, 7) == 0 && counter == 0x5B0){ + counter = counter + 4; + memcpy((void*) vaddr + counter, testkit_pscode, 8); + return 0; + } + } + } + + } + else{ + } + } + else + { + } + return 1; +} + +static int mmu_dump_sections(unsigned int vaddr, unsigned int entry) +{ + int ns; + int ss; + int ng; + int s; + int ap1; + int ap2; + int domain; + int xn; + int pr; + int pw; + int ur; + int uw; + unsigned int paddr; + unsigned int i; + unsigned int *tbl; + + + if ((entry & 0x3) == 2) /* section or supersection */ + { + ns = entry & 0x80000; + ss = entry & 0x40000; + ng = entry & 0x20000; + s = entry & 0x10000; + ap2 = entry & 0x8000; + ap1 = (entry >> 10) & 3; + domain = (entry >> 5) & 15; + xn = entry & 0x10; + mmu_get_perms(ap2, ap1, &ur, &uw, &pr, &pw); + paddr = ss ? entry & 0xFF000000 : entry & 0xFFF00000; + + } + else if ((entry & 0x3) == 1) /* page table */ + { + domain = (entry >> 5) & 15; + ns = entry & 8; + paddr = entry & 0xFFFFFC00; + tbl = (unsigned int *)pa2va(paddr); + for (i = 0; i < 0x100; i++) + { + int ret = mmu_dump_pages(vaddr+(i<<12), tbl[i]); + if (ret == 0) { + return 0; + } + } + } + else if ((entry & 0x3) == 0) /* not mapped */ + { + } + else + { + } + return 1; +} + +int mmu_dump(void) +{ + unsigned int ttbr[2]; + int ttbcr; + int n; + unsigned int i = 0; + + unsigned int *ttb_vaddr[2]; + unsigned int entry; + + + __asm__("mrc p15,0,%0,c2,c0,0" : "=r" (ttbr[0])); + __asm__("mrc p15,0,%0,c2,c0,1" : "=r" (ttbr[1])); + __asm__("mrc p15,0,%0,c2,c0,2" : "=r" (ttbcr)); + + n = ttbcr & 0x7; + ttbr[0] &= (unsigned int)((int)0x80000000 >> (31 - 14 + 1 - n)); + ttbr[1] &= 0xFFFFC000; + + ttb_vaddr[0] = (unsigned int *)pa2va(ttbr[0]); + ttb_vaddr[1] = (unsigned int *)pa2va(ttbr[1]); + + for (i = 0; i < (1 << (12 - n)); i++) + { + entry = ttb_vaddr[0][i]; + int ret = mmu_dump_sections(i<<20, entry); + if(ret == 0){ + return 0; + } + } + + if (n) + { + for (i = ((~0xEFFF & 0xFFFF) >> n); i < 0x1000; i++) + { + entry = ttb_vaddr[1][i]; + int ret = mmu_dump_sections(i<<20, entry); + if(ret == 0){ + return 0; + } + } + } + return 1; +} + +int module_start(SceSize argc, const void *args) +{ + unsigned int sctlr; + + __asm__("mrc p15,0,%0,c1,c0,0" : "=r" (sctlr)); + afe = sctlr & 0x20000000; + mmu_dump(); + + return SCE_KERNEL_START_SUCCESS; +} + +int module_stop(SceSize argc, const void *args) +{ + return SCE_KERNEL_STOP_SUCCESS; +} + + diff --git a/spoofer_vita/LICENSE b/spoofer_vita/LICENSE new file mode 100644 index 0000000..5c304d1 --- /dev/null +++ b/spoofer_vita/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/spoofer_vita/Makefile b/spoofer_vita/Makefile new file mode 100644 index 0000000..83d62e0 --- /dev/null +++ b/spoofer_vita/Makefile @@ -0,0 +1,31 @@ +TITLE_ID = NIDUMP001 +TARGET = mDump +PSVITAIP = 192.168.1.115 + +PLUGIN_OBJS = mmu_dump.o +HEADERS = $(wildcard *.h) + +PLUGIN_LIBS = -ltaihen_stub -lSceSysclibForDriver_stub -lSceModulemgrForKernel_stub -lSceIofilemgrForDriver_stub + +PREFIX = arm-vita-eabi +CC = $(PREFIX)-gcc +CFLAGS = -Wl,-q -Wall -O0 +ASFLAGS = $(CFLAGS) + +all: kDump.skprx + +kDump.skprx: kDump.velf + vita-make-fself -c $< $@ + +kDump.velf: kDump.elf + vita-elf-create -e exports.yml $< $@ + +kDump.elf: $(PLUGIN_OBJS) + $(CC) $(CFLAGS) $^ $(PLUGIN_LIBS) -o $@ -nostdlib + +clean: + @rm -rf *.velf *.elf *.vpk *.skprx $(MAIN_OBJS) $(PLUGIN_OBJS) param.sfo eboot.bin + +send: eboot.bin + curl -T eboot.bin ftp://$(PSVITAIP):1337/ux0:/app/$(TITLE_ID)/ + @echo "Sent." diff --git a/spoofer_vita/README.md b/spoofer_vita/README.md new file mode 100644 index 0000000..31d7b32 --- /dev/null +++ b/spoofer_vita/README.md @@ -0,0 +1,7 @@ +# memdump +This homebrew can dump memory + +Credits: +anonymous - precious info + +yifanlu - for his mmu_dump code (which saves a lot of work when dumping both the table and memory!) diff --git a/spoofer_vita/exports.yml b/spoofer_vita/exports.yml new file mode 100644 index 0000000..b4b87cb --- /dev/null +++ b/spoofer_vita/exports.yml @@ -0,0 +1,8 @@ +vita_dump: + attributes: 0 + version: + major: 1 + minor: 1 + main: + start: module_start + stop: module_stop diff --git a/spoofer/mmu_dump.c b/spoofer_vita/mmu_dump.c similarity index 100% rename from spoofer/mmu_dump.c rename to spoofer_vita/mmu_dump.c