FrostySo / Ps4-Pkg-Sender

Sends pkg files to your ps4 remotely
85 stars 12 forks source link

Installing DLC/Theme Unlockers fail to install sometimes #3

Open FrostySo opened 4 years ago

FrostySo commented 4 years ago

Some pkg files fail to install. It has something to do with the handle_api_install_direct function in the ps4 pkg installer. People say it's the file size, but that has been disproven. It has something to do with the metadata/structure of the pkg file.

I tried to debug it but I couldn't get it to show the log output and nobody would help me out so I can't really debug it.

This issue does exist though and is the only issue to fix.

FrostySo commented 4 years ago

image

Using a pkg editor, we get this error here. This is an error with the pkg files themselves and this is why it's failing. I'm not a pro with the ps4 pkg file format, so I don't know if I can fix it. But all files that get this prompt here, will not install.

You can find the tool here: https://github.com/maxton/LibOrbisPkg/releases if you want to try it out for yourself. "PkgEditor-0.2.231.zip"

Needs a signed PFS digest and an image digest. Also needs the CONTENT_FLAGS to have GD_AC so it knows what type it is.

This is why it doesn't work for unlockers because they are not packaged correctly to meet the pkg file criteria.

Buzbee commented 4 years ago

I have an update made with PkgEditor-0.2.231 that wont install because it is identified as "unkown". Yeah you misspelled it. It sends with other pkg senders.

https://filecrypt.cc/Container/F74CC25048.html

FrostySo commented 4 years ago

I have an update made with PkgEditor-0.2.231 that wont install because it is identified as "unkown". Yeah you misspelled it.

What did I misspell exactly? I'm not sure I follow.

EDIT: Ah I see, I misspelled Unknown. Refer to the last reply to the post. It doesn't matter regardless.

It sends with other pkg senders.

https://filecrypt.cc/Container/F74CC25048.html

The link you sent keeps redirecting me to junk urls and ads. It doesn't redirect to the original link.

Also the identity thing does not matter too much as it's just there to tell you what the type of the file is. To the remote pkg installer, it sees only the {filename.pkg}. If it works with other pkg senders, I'm not sure what I'm doing wrong. It follows the API requirements exactly 1:1. I do not see any errors or flaws, anywhere.

Buzbee commented 4 years ago

To download the file you have to click the back button on the browser and click download again to get past ads. I only had to do it once with opera.

With it identified as unkown it would not even try to send to RPI. Nothing in status window.

Is it possible to relax the requirements or extend them? For example, your program doesnt allow whitespaces in name. Im not sure if other package installers remove the whitespaces before sending to RPI or if RPI just processes them with whitespaces.

Even if there are errors in the pkg themselves send them over to RPI anyways. If RPI wont install them as-is,maybe send them over by other ways. For example, if dlc wont send over as addon content try sending it over as an app and just see what happens. See what error messages you get or the 'that shouldnt have worked, so why the hell did it'. Thats how i troubleshoot when i cant figure out what the &^%$# is wrong. LOL

FrostySo commented 4 years ago

To download the file you have to click the back button on the browser and click download again to get past ads. I only had to do it once with opera.

With it identified as unkown it would not even try to send to RPI. Nothing in status window.

I tried the pkg files you gave me and it worked fine. The issue is this though, the RPI uses the CUSA title ID to see if the game exists or not. It says the other app is "installed" because they both have the same title id and I am not sure why the person who made RPI used title id instead of content id for checking when something exists. But If I uninstall both of them and install them 1 by 1, they seem to send fine for me. There's just no way of knowing whether an app is installed or not. I require this info because if the app is already installed and I remove the check, then how would it know if an app is already installed? It's a tough situation :/ if there was an api call that used the content ID instead, this problem would be gone. The only main problem is with DLC unlockers/theme's. You were right, it checks for the image path and if it doesn't have an image, RPI will fail to install the item.

Is it possible to relax the requirements or extend them? For example, your program doesnt allow whitespaces in name. Im not sure if other package installers remove the whitespaces before sending to RPI or if RPI just processes them with whitespaces.

I renamed the items with the white spaces check removed, it throws a 500 internal server bad request. After removing the whitespace, it installed fine. So I do think RPI cannot find paths with spaces.

Even if there are errors in the pkg themselves send them over to RPI anyways. If RPI wont install them as-is,maybe send them over by other ways. For example, if dlc wont send over as addon content try sending it over as an app and just see what happens. See what error messages you get or the 'that shouldnt have worked, so why the hell did it'. Thats how i troubleshoot when i cant figure out what the &^%$# is wrong. LOL

The errors you get is directly from RPI itself. I don't know how to get the actual debug output from RPI itself, as nobody would help me figure out how to get debug output working. Mira would only show kernal related debug outputs and nothing more. This is what makes it hard to understand the exact problem.

FrostySo commented 4 years ago

@Buzbee

After Countless hours I finally fixed some issues. Please try this and let me know how it goes.

Ps4-Pkg-Sender.zip

Buzbee commented 4 years ago

still throws 0x80990004 which is SCE_BGFT_ERROR_INVALID_ARGUMENT for some dlc

renames files with whitespaces and sends them successfully

you should rename them back though

and if program crashes (rename on next startup maybe use a temp txt file)

what else did u fix that i should test

FrostySo commented 4 years ago

still throws 0x80990004 which is SCE_BGFT_ERROR_INVALID_ARGUMENT for some dlc

I'm honestly not sure what the issue is for this. Does it work with any other sender? Also, I forgot to reset some of the parameters after a successful queue, could you try use this version and let me know if it still throws it.

Ps4-Pkg-Sender.zip

renames files with whitespaces and sends them successfully

you should rename them back though

and if program crashes (rename on next startup maybe use a temp txt file)

What would be the benefits of changing the name back to normal after? It isn't like replacing white spaces with a period will do them any bad. If they want the order to stay the same, I could just get an ascii character that's near 0x20 to keep sorting the same. But a period is 0x2E and a dash is 0x2D which is already pretty darn close.

what else did u fix that i should test

Nothing much really, I added process tracking so it should allow for multiple instances, to allow the sending of multiple pkg files to multiple ps4's at a time.

Buzbee commented 4 years ago

I dont like my files renamed especially when I didnt know a program was going to do it. How hard can it be to rename them back? iref-use version can send files without renaming them. Look at his source code to see how he does it.

https://github.com/iref-use/ps4-remote-pkg-sender

his version does not send those 2 dlc either

but his does send this one and yours gives http 500 error

Наследие.Коула.(CUSA00004).[v01.00].zip

FrostySo commented 4 years ago

I dont like my files renamed especially when I didnt know a program was going to do it. How hard can it be to rename them back?

Pretty easy but meh, I'm just lazy

iref-use version can send files without renaming them. Look at his source code to see how he does it.

He does rename them. He filters all of them with this pattern "/[^a-zA-Z0-9-_.]/g" I'm not sure how he does it without renaming it though. I don't really use JS all that much so I don't know how the functions react.

https://github.com/iref-use/ps4-remote-pkg-sender

his version does not send those 2 dlc either

but his does send this one and yours gives http 500 error

Наследие.Коула.(CUSA00004).[v01.00].zip

Try rename that pkg file and I bet you it will send after you do lol

ghost commented 2 years ago

getting error 0x80990004 on 1.07. pls help

FrostySo commented 2 years ago

getting error 0x80990004 on 1.07. pls help

Get a usb stick and install it manually through the debug settings.