Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

patchtool.exe error #3

Open
c0deisme opened this issue Apr 17, 2018 · 3 comments
Open

patchtool.exe error #3

c0deisme opened this issue Apr 17, 2018 · 3 comments

Comments

@c0deisme
Copy link

Command line to use to repeat this process :
C:\Users\Jeremy\Desktop\ps3mfw-builder-0.2.1-mod-master\ps3mfw.exe "D:/Downloads/REBUG_4.82.2_REX_PS3UPDAT_6eead68f81a66502294fd329d4087106.PUP" "C:/Users/Jeremy/Desktop/test.PUP" --3XX-DEX "false" --4XX-CEX "true" --dev3 "false" --355-CEX "false" --4XX-DEX "false" --tool-debug "true" --auto-cos "false" --341-CEX "false" --task-verbose "true" --debug-log "true" --silent "false" --sign-self "true" --sign-iso "true" --03-patch-oos --patch-lv1-um-qa "false" --patch-lv1-gameos-sysmgr-ability "false" --fwtype "4.xx" --patch-gameos-hdd-region-size "400GB" --patch-lv1-um-write-eprom-product-mode "false" --patch-lv1-lv2mem "false" --patch-lv1-mmap "false" --patch-lv1-encdec-ioctl-0x85 "false" --patch-lv1-gpu-4kb-iopage "false" --patch-lv1-sysmgr-disable-integrity-check "false" --patch-lv1-dispmgr-access "false" --patch-lv1-ata-region0-access "false" --patch-lv1-sm-del-encdec-key "false" --patch-lv1-iimgr-access "false" --patch-lv1-um-extract-pkg "false" --patch-lv1-peek-poke "false" --patch-lv1-storage-skip-acl-check "false" --patch-lv1-mfc-sr1-mask "false" --patch-lv1-otheros-plus-plus-cold-boot-fix "false" --patch-pup-search-in-game-disc "false" --patch-lv1-gameos-gos-mode-one "false" --patch-lv1-repo-node-lpar "false" --patch-lv1-otheros-plus-plus "false" --patch-lv1-htab-write "false" --patch-lv1-enable-dbgcard-calls "false" --patch-lv1-dabr-priv-mask "false" --gui false

PS3MFW Creator v0.2.1
Copyright (C) 2011 Project PS3MFW
This program comes with ABSOLUTELY NO WARRANTY;
This is free software, and you are welcome to redistribute it
under certain conditions; see COPYING for details.

Developed By :
Anonymous Developers

Selected tasks : 03_patch_oos
HOME=C:\Users\Jeremy
USERPROFILE=C:\Users\Jeremy
PATH=C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64_win\compiler;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;c:\program files (x86)\amd app\bin\x86_64;c:\program files (x86)\amd app\bin\x86;c:\windows\system32;c:\windows;c:\windows\system32\wbem;c:\windows\system32\windowspowershell\v1.0;c:\program files\git\cmd;C:\Users\Jeremy\AppData\Local\Microsoft\WindowsApps;C:\adb;C:\Program Files\Calibre2;C:\Program Files (x86)\Skype\Phone;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\dotnet;C:\Program Files (x86)\GNU\GnuPG\pub;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files (x86)\Universal Extractor;C:\Program Files (x86)\Universal Extractor\bin;C:\Program Files\Git\cmd;C:\Users\Jeremy\AppData\Local\Microsoft\WindowsApps;C:\Users\Jeremy\AppData\Local\atom\bin;C:\Users\Jeremy\AppData\Local\GitHubDesktop\bin;C:\Users\Jeremy\AppData\Roaming\itch\bin;C:\Users\Jeremy\AppData\Local\Microsoft\WindowsApps;C:\Program Files\GPAC;C:\Program Files\GPAC;C:\Program Files\GPAC;C:\ffmpeg\bin;;C:\Users\Jeremy\Desktop\ps3mfw-builder-0.2.1-mod-master\tools
Deleting output files
Executing command file delete -force -- ${::CUSTOM_PUP_DIR} ${::ORIGINAL_PUP_DIR} ${::HASH_DIR} ${::OUT_FILE}
Unpacking source PUP REBUG_4.82.2_REX_PS3UPDAT_6eead68f81a66502294fd329d4087106.PUP
Executing command pup_extract ${pup} ${dest}
Executing shell pkgtool.exe -debug yes -action unpack -type pup -in {D:\Downloads\REBUG_4.82.2_REX_PS3UPDAT_6eead68f81a66502294fd329d4087106.PUP} -out {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW}

checking pup version
Getting PUP version from: version.txt
Getting pup version OK! var = 4.82 (subversion:.2 REBUG RE)
Extracting tar file: update_files.tar into: update_files
Executing command ::tar::untar $tar -dir $dest
Searching for new SPKG tar.....
"spkg_hdr.tar" found in working dir. Using "NEW PKG" routine
Extracting tar file: spkg_hdr.tar into: spkg_hdr
Executing command ::tar::untar $tar -dir $dest
Unpacking all dev_flash files.....
unpkg-ing file: dev_flash_000.tar.aa.2017_08_24_192904
Executing command unpkg $pkg $dest
Executing shell pkgtool.exe -debug yes -action decrypt -type pkg -in {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash_000.tar.aa.2017_08_24_192904} -out {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash\dev_flash_000.tar.aa.2017_08_24_192904}

unpkg-ing file: dev_flash_001.tar.aa.2017_08_24_192904
Executing command unpkg $pkg $dest
Executing shell pkgtool.exe -debug yes -action decrypt -type pkg -in {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash_001.tar.aa.2017_08_24_192904} -out {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash\dev_flash_001.tar.aa.2017_08_24_192904}

unpkg-ing file: dev_flash_002.tar.aa.2017_08_24_192904
Executing command unpkg $pkg $dest
Executing shell pkgtool.exe -debug yes -action decrypt -type pkg -in {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash_002.tar.aa.2017_08_24_192904} -out {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash\dev_flash_002.tar.aa.2017_08_24_192904}

unpkg-ing file: dev_flash_003.tar.aa.2017_08_24_192904
Executing command unpkg $pkg $dest
Executing shell pkgtool.exe -debug yes -action decrypt -type pkg -in {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash_003.tar.aa.2017_08_24_192904} -out {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash\dev_flash_003.tar.aa.2017_08_24_192904}

unpkg-ing file: dev_flash_004.tar.aa.2017_08_24_192904
Executing command unpkg $pkg $dest
Executing shell pkgtool.exe -debug yes -action decrypt -type pkg -in {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash_004.tar.aa.2017_08_24_192904} -out {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash\dev_flash_004.tar.aa.2017_08_24_192904}

unpkg-ing file: dev_flash_005.tar.aa.2017_08_24_192904
Executing command unpkg $pkg $dest
Executing shell pkgtool.exe -debug yes -action decrypt -type pkg -in {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash_005.tar.aa.2017_08_24_192904} -out {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash\dev_flash_005.tar.aa.2017_08_24_192904}

unpkg-ing file: dev_flash_006.tar.aa.2017_08_24_192904
Executing command unpkg $pkg $dest
Executing shell pkgtool.exe -debug yes -action decrypt -type pkg -in {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash_006.tar.aa.2017_08_24_192904} -out {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash\dev_flash_006.tar.aa.2017_08_24_192904}

unpkg-ing file: dev_flash_007.tar.aa.2017_08_24_192904
Executing command unpkg $pkg $dest
Executing shell pkgtool.exe -debug yes -action decrypt -type pkg -in {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash_007.tar.aa.2017_08_24_192904} -out {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash\dev_flash_007.tar.aa.2017_08_24_192904}

unpkg-ing file: dev_flash_008.tar.aa.2017_08_24_192904
Executing command unpkg $pkg $dest
Executing shell pkgtool.exe -debug yes -action decrypt -type pkg -in {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash_008.tar.aa.2017_08_24_192904} -out {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash\dev_flash_008.tar.aa.2017_08_24_192904}

unpkg-ing file: dev_flash_009.tar.aa.2017_08_24_192904
Executing command unpkg $pkg $dest
Executing shell pkgtool.exe -debug yes -action decrypt -type pkg -in {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash_009.tar.aa.2017_08_24_192904} -out {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash\dev_flash_009.tar.aa.2017_08_24_192904}

unpkg-ing file: dev_flash_010.tar.aa.2017_08_24_192904
Executing command unpkg $pkg $dest
Executing shell pkgtool.exe -debug yes -action decrypt -type pkg -in {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash_010.tar.aa.2017_08_24_192904} -out {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash\dev_flash_010.tar.aa.2017_08_24_192904}

unpkg-ing file: dev_flash_011.tar.aa.2017_08_24_192904
Executing command unpkg $pkg $dest
Executing shell pkgtool.exe -debug yes -action decrypt -type pkg -in {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash_011.tar.aa.2017_08_24_192904} -out {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash\dev_flash_011.tar.aa.2017_08_24_192904}

unpkg-ing file: dev_flash_012.tar.aa.2017_08_24_192904
Executing command unpkg $pkg $dest
Executing shell pkgtool.exe -debug yes -action decrypt -type pkg -in {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash_012.tar.aa.2017_08_24_192904} -out {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash\dev_flash_012.tar.aa.2017_08_24_192904}

unpkg-ing file: dev_flash_013.tar.aa.2017_08_24_192904
Executing command unpkg $pkg $dest
Executing shell pkgtool.exe -debug yes -action decrypt -type pkg -in {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash_013.tar.aa.2017_08_24_192904} -out {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash\dev_flash_013.tar.aa.2017_08_24_192904}

unpkg-ing file: dev_flash_014.tar.aa.2017_08_24_192904
Executing command unpkg $pkg $dest
Executing shell pkgtool.exe -debug yes -action decrypt -type pkg -in {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash_014.tar.aa.2017_08_24_192904} -out {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash\dev_flash_014.tar.aa.2017_08_24_192904}

unpkg-ing file: dev_flash_015.tar.aa.2017_08_24_192904
Executing command unpkg $pkg $dest
Executing shell pkgtool.exe -debug yes -action decrypt -type pkg -in {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash_015.tar.aa.2017_08_24_192904} -out {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash\dev_flash_015.tar.aa.2017_08_24_192904}

unpkg-ing file: dev_flash_016.tar.aa.2017_08_24_192904
Executing command unpkg $pkg $dest
Executing shell pkgtool.exe -debug yes -action decrypt -type pkg -in {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash_016.tar.aa.2017_08_24_192904} -out {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash\dev_flash_016.tar.aa.2017_08_24_192904}

unpkg-ing file: dev_flash_017.tar.aa.2017_08_24_192904
Executing command unpkg $pkg $dest
Executing shell pkgtool.exe -debug yes -action decrypt -type pkg -in {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash_017.tar.aa.2017_08_24_192904} -out {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash\dev_flash_017.tar.aa.2017_08_24_192904}

unpkg-ing file: dev_flash_018.tar.aa.2017_08_24_192904
Executing command unpkg $pkg $dest
Executing shell pkgtool.exe -debug yes -action decrypt -type pkg -in {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash_018.tar.aa.2017_08_24_192904} -out {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash\dev_flash_018.tar.aa.2017_08_24_192904}

unpkg-ing file: dev_flash_019.tar.aa.2017_08_24_192904
Executing command unpkg $pkg $dest
Executing shell pkgtool.exe -debug yes -action decrypt -type pkg -in {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash_019.tar.aa.2017_08_24_192904} -out {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash\dev_flash_019.tar.aa.2017_08_24_192904}

unpkg-ing file: dev_flash_020.tar.aa.2017_08_24_192904
Executing command unpkg $pkg $dest
Executing shell pkgtool.exe -debug yes -action decrypt -type pkg -in {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash_020.tar.aa.2017_08_24_192904} -out {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash\dev_flash_020.tar.aa.2017_08_24_192904}

unpkg-ing file: dev_flash_021.tar.aa.2017_08_24_192904
Executing command unpkg $pkg $dest
Executing shell pkgtool.exe -debug yes -action decrypt -type pkg -in {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash_021.tar.aa.2017_08_24_192904} -out {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash\dev_flash_021.tar.aa.2017_08_24_192904}

unpkg-ing file: dev_flash_022.tar.aa.2017_08_24_192904
Executing command unpkg $pkg $dest
Executing shell pkgtool.exe -debug yes -action decrypt -type pkg -in {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash_022.tar.aa.2017_08_24_192904} -out {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash\dev_flash_022.tar.aa.2017_08_24_192904}

unpkg-ing file: dev_flash_023.tar.aa.2017_08_24_192904
Executing command unpkg $pkg $dest
Executing shell pkgtool.exe -debug yes -action decrypt -type pkg -in {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash_023.tar.aa.2017_08_24_192904} -out {D:\TEMP\TEMP\PS3MFW\PS3MFW-OFW\update_files\dev_flash\dev_flash_023.tar.aa.2017_08_24_192904}

Please WAIT.....copying unpacked OFW to MFW dirs.....
Executing command file copy {*}$args
******** Running task 03_patch_oos **********
Modifying CORE_OS file: emer_init.self
Unpacking CORE_OS files.....
unpkg-ing file: CORE_OS_PACKAGE.pkg
Executing command unpkg $pkg $dest
Executing shell pkgtool.exe -debug yes -action decrypt -type pkg -in {D:\TEMP\TEMP\PS3MFW\PS3MFW-MFW\update_files\CORE_OS_PACKAGE.pkg} -out {D:\TEMP\TEMP\PS3MFW\PS3MFW-MFW\update_files\CORE_OS_PACKAGE.unpkg}

cosunpkg-ing file: content
Executing command cosunpkg $pkg $dest
Executing shell cosunpkg {D:\TEMP\TEMP\PS3MFW\PS3MFW-MFW\update_files\CORE_OS_PACKAGE.unpkg\content} {D:\TEMP\TEMP\PS3MFW\PS3MFW-MFW\update_files\CORE_OS_PACKAGE}

CORE_OS unpacked
Modifying self/sprx emer_init.self
Decrypting self file: emer_init.self
Executing command unself $in $out
Executing shell scetool -d {D:\TEMP\TEMP\PS3MFW\PS3MFW-MFW\update_files\CORE_OS_PACKAGE\emer_init.self} {D:\TEMP\TEMP\PS3MFW\PS3MFW-MFW\update_files\CORE_OS_PACKAGE\emer_init.self.elf}

Patching emer_init.self.elf to create GameOS HDD region of size 400GB smaller than default
Executing command ::patch_elf $elf $search $offset $replace $mask
Executing command set buffer [shellex ${::PATCHTOOL} -debug $debugmode -action $patchaction -filename [file nativename $file] -search $mysearch -replace $myreplace -offset $replace_offset -mask $mymask -multi $multimode]
Executing shellex patchtool.exe -debug yes -action patch -filename {D:\TEMP\TEMP\PS3MFW\PS3MFW-MFW\update_files\CORE_OS_PACKAGE\emer_init.self.elf} -search 7D263850EB7800003BA000003B49FFF838000000 -replace 3F49 -offset 12 -mask {} -multi no

FATAL ERROR: patchtool.exe failed to execute! : couldn't execute "patchtool.exe": invalid argument
See D:/TEMP/TEMP/PS3MFW/ps3mfw.log for more info
Last lines of log :


*** Zlib Compression Level:-1 ***

[*] ELF written to D:\TEMP\TEMP\PS3MFW\PS3MFW-MFW\update_files\CORE_OS_PACKAGE\emer_init.self.elf.
Patching emer_init.self.elf to create GameOS HDD region of size 400GB smaller than default
Executing command ::patch_elf $elf $search $offset $replace $mask
Executing command set buffer [shellex ${::PATCHTOOL} -debug $debugmode -action $patchaction -filename [file nativename $file] -search $mysearch -replace $myreplace -offset $replace_offset -mask $mymask -multi $multimode]
Executing shellex patchtool.exe -debug yes -action patch -filename {D:\TEMP\TEMP\PS3MFW\PS3MFW-MFW\update_files\CORE_OS_PACKAGE\emer_init.self.elf} -search 7D263850EB7800003BA000003B49FFF838000000 -replace 3F49 -offset 12 -mask {} -multi no

FATAL ERROR: patchtool.exe failed to execute! : couldn't execute "patchtool.exe": invalid argument


FATAL ERROR: Unable to patch self emer_init.self.elf : patchtool.exe failed to execute! : couldn't execute "patchtool.exe": invalid argument
See D:/TEMP/TEMP/PS3MFW/ps3mfw.log for more info
Last lines of log :


*** Zlib Compression Level:-1 ***

[*] ELF written to D:\TEMP\TEMP\PS3MFW\PS3MFW-MFW\update_files\CORE_OS_PACKAGE\emer_init.self.elf.
Patching emer_init.self.elf to create GameOS HDD region of size 400GB smaller than default
Executing command ::patch_elf $elf $search $offset $replace $mask
Executing command set buffer [shellex ${::PATCHTOOL} -debug $debugmode -action $patchaction -filename [file nativename $file] -search $mysearch -replace $myreplace -offset $replace_offset -mask $mymask -multi $multimode]
Executing shellex patchtool.exe -debug yes -action patch -filename {D:\TEMP\TEMP\PS3MFW\PS3MFW-MFW\update_files\CORE_OS_PACKAGE\emer_init.self.elf} -search 7D263850EB7800003BA000003B49FFF838000000 -replace 3F49 -offset 12 -mask {} -multi no

FATAL ERROR: patchtool.exe failed to execute! : couldn't execute "patchtool.exe": invalid argument
FATAL ERROR: Unable to patch self emer_init.self.elf : patchtool.exe failed to execute! : couldn't execute "patchtool.exe": invalid argument


Error running script: Unable to patch self emer_init.self.elf : patchtool.exe failed to execute! : couldn't execute "patchtool.exe": invalid argument

this happens every single time, even when no task is selected

@Jump-Suit
Copy link

I have same problem!

@littlebalup
Copy link

You must run as admin : http://www.psx-place.com/threads/ps3mfw-builder-mod.1888/page-4#post-68039

Another thing:

Patching emer_init.self.elf to create GameOS HDD region of size 400GB smaller than default

You manually entered/eddited region size in OOS task (400GB). You must not do that or patches will no be complete.
You must select the size from the dropdown list. Only "10GB" or "22GB" supported.

screenshot_1
screenshot_2

@Abdouldima
Copy link

Ps3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants