PS3 Looking for info on pkg files

Discussion in 'Homebrew Development' started by pink1, Jun 13, 2018.

  1. 1,124
    1,305
    272
    pink1

    pink1 Moderator Developer

    Joined:
    Feb 25, 2015
    Messages:
    1,124
    Likes Received:
    1,305
    Trophy Points:
    272
    Gender:
    Male
    I've been wanting to make a pkg tool for a while to use in other projects and have about everything I need. I can decrypt, extract, repack and encrypt a pkg file using the original header. What I'm having trouble with is making a header for a new pkg I don't understand how to get bytes 0x60 - 0x80. I've been trying to read the wiki and python code but I'm not getting very far at it.
    If anyone can point me to something to study up on or explain it to me I'd be really grateful.
     
  2. 2,742
    2,303
    372
    sandungas

    sandungas Moderator Developer

    Joined:
    Dec 31, 2014
    Messages:
    2,742
    Likes Received:
    2,303
    Trophy Points:
    372
    Location:
    Babylon 20xxE series
    Zazenora and pink1 like this.
  3. 7,411
    6,044
    622
    bguerville

    bguerville Moderator Developer

    Joined:
    Feb 25, 2015
    Messages:
    7,411
    Likes Received:
    6,044
    Trophy Points:
    622
    Location:
    Earth
    pink1 likes this.
  4. 128
    90
    57
    catalinnc

    catalinnc Member

    Joined:
    Dec 26, 2015
    Messages:
    128
    Likes Received:
    90
    Trophy Points:
    57
    for retail pkgs is very clear...see here:
    http://www.psdevwiki.com/ps3/PKG_files
    Code:
    digest 0x60 0x10 09 8B A2 CA 2D 30 30 1F 8B 5B 82 79 C6 70 35 F3 sha1 from debug files and attributes together merged in one block
    pkg_data_riv 0x70 0x10 D5 FA 15 9E 7F AC 82 70 BB 3E 0C EB 97 3D 30 11 aes-128-ctr iv. Used with gpkg_key to decrypt data.
    header_cmac_hash 0x80 0x10 48 0D 86 60 9F 26 8E 7F 4F B4 DA A4 33 1E 9A A1 CMAC OMAC hash from 0x00-0x7F. PS3 gpkg_key used as key.
    you dont really need to calculate the digest at all (use a random number)...
    _

    p.s. for debug pkgs i can't help at all...
    _
     
    Zazenora likes this.
  5. 1,124
    1,305
    272
    pink1

    pink1 Moderator Developer

    Joined:
    Feb 25, 2015
    Messages:
    1,124
    Likes Received:
    1,305
    Trophy Points:
    272
    Gender:
    Male
    Thanks. I've been trying to study the wiki and the digest is the part I was really having problems trying to understand. I'm trying to do debug pkgs but if I can get it working I may try to add HAN signing just because it would be nice to have the code ready to make and sign a pkg for HAN with.

    Debug pkgs use the digest as the key to encrypt so if we can just use a random number that will be great.

    PS. It's been a long time since we've talked hope all is well bud :)
     
  6. 128
    90
    57
    catalinnc

    catalinnc Member

    Joined:
    Dec 26, 2015
    Messages:
    128
    Likes Received:
    90
    Trophy Points:
    57
    more info on debug pkgs...

    on 0x60 is indeed the encryption key (sort of - actually you have to manipulate that value to get the real key) - you can use a random number

    on 0x70 is the iv key (this is obtained from the encryption [email protected] [manipulated in a diff way!] xored with the klic)...

    on 0x80 is some kind of hash that i dont know...
    _
     
    Zazenora, pink1 and bguerville like this.
  7. 128
    90
    57
    catalinnc

    catalinnc Member

    Joined:
    Dec 26, 2015
    Messages:
    128
    Likes Received:
    90
    Trophy Points:
    57
    this hash is a chunk of sha1 of the data before it...
    _
     
    pink1 likes this.
  8. 1,124
    1,305
    272
    pink1

    pink1 Moderator Developer

    Joined:
    Feb 25, 2015
    Messages:
    1,124
    Likes Received:
    1,305
    Trophy Points:
    272
    Gender:
    Male
    I’ve been studying the python scripts and am getting a better idea of how to port the header code. I have a lot of c# pkg code that I’ve collected over the years for everything other than the header so I don’t need to port much. This is the first time I’ve messed with photon so I was letting it intimidate me more than it should have.

    I’m still very interested in getting as much info on it as I can to get a better understanding and to be able to add comments to the code for reference.
     
  9. 192
    55
    32
    ayassinsayed

    ayassinsayed Member

    Joined:
    Mar 16, 2018
    Messages:
    192
    Likes Received:
    55
    Trophy Points:
    32
    Gender:
    Male
    Sent from my iPhone using Tapatalk
     
    Last edited: Jun 19, 2018
  10. 130
    34
    32
    Incorruptable

    Incorruptable Member

    Joined:
    May 22, 2018
    Messages:
    130
    Likes Received:
    34
    Trophy Points:
    32
    Location:
    Ireland
    Hello All,

    This appears to be the thread to ask my questions.

    I have 4.81 OFW with HAN 0.5 installed, I can import and install the ‘PS3 fan utility control’ alright but it does not launch because it returns error.

    I have converted Minecraft and installed successfully transferring the LIC.EDAT file from USB, but this is not possible with a CFW .pkg to my knowledge, is that correct?

    Is there anything available that can control the fan and monitor temps on a OFW 4.81 HAN enabled console?

    Have you had any success in working a way of facilitating install of a .pkg on HAN?
     
    Last edited: Jun 22, 2018
  11. 7,411
    6,044
    622
    bguerville

    bguerville Moderator Developer

    Joined:
    Feb 25, 2015
    Messages:
    7,411
    Likes Received:
    6,044
    Trophy Points:
    622
    Location:
    Earth
    There will be no fan control on ofw until a kernel exploit is made available.

    I dunno what you mean by facilitating pkg installation. Pkg installation cannot really be improved... Do you maybe mean pkg file transfer? If so the answer is no, not for the moment, although there might be a way to use ftp, it requires further research.

    If you need to copy a lose file like lic.dat, you can use the PETT tutorial or wait until the 4.0 update is released.
     
    Zazenora likes this.
  12. 130
    34
    32
    Incorruptable

    Incorruptable Member

    Joined:
    May 22, 2018
    Messages:
    130
    Likes Received:
    34
    Trophy Points:
    32
    Location:
    Ireland
    Thank you for your reply.

    Apologies for asking questions if the answer is, or should be obvious,

    Are you saying i can transfer a CFW designed pkg like fan control and transfer the lic.dat using the PETT method to get it working?
     
  13. 7,411
    6,044
    622
    bguerville

    bguerville Moderator Developer

    Joined:
    Feb 25, 2015
    Messages:
    7,411
    Likes Received:
    6,044
    Trophy Points:
    622
    Location:
    Earth
    No. Fan control is homebrew and homebrews cannot work on HAN & never will. You can install them fine but they cannot run!
    Like I said already, no fan control on ofw until a kernel exploit is released.

    However you can use PETT to copy a file like lic.dat to the internal hdd. It's also possible to modify an existing exploit like the HAN installer to copy any other files such as lic.dat. Additionally, in the next 4.0 update, there will be a dedicated file copier but there is no planned release date yet.
     
  14. 130
    34
    32
    Incorruptable

    Incorruptable Member

    Joined:
    May 22, 2018
    Messages:
    130
    Likes Received:
    34
    Trophy Points:
    32
    Location:
    Ireland
    Thanks for all your answers,

    so in short, if i want additional fan control, i need to take a hacksaw to the outer case and rig up a 12v DC PC fan.
     
  15. 688
    256
    97
    psykosis

    psykosis Developer Developer

    Joined:
    Dec 7, 2014
    Messages:
    688
    Likes Received:
    256
    Trophy Points:
    97
    In short, CFW or no fan control.
     
  16. 4,221
    3,784
    372
    DeViL303

    DeViL303 Developer PSX-Place Supporter

    Joined:
    Jan 23, 2016
    Messages:
    4,221
    Likes Received:
    3,784
    Trophy Points:
    372
    Gender:
    Male
    Location:
    Ireland
    Home Page:
    You don't need to go that far, you can get one of these that will increase the speed of the fan but still have it controlled by the system. It will just run stronger.

    https://www.ebay.com/itm/Playstatio...elerator-Controller-resist-YLOD-/190647913368

     
  17. 130
    34
    32
    Incorruptable

    Incorruptable Member

    Joined:
    May 22, 2018
    Messages:
    130
    Likes Received:
    34
    Trophy Points:
    32
    Location:
    Ireland
    Thats great help, thank you.

    I am not overly worried about burning out the fan either, i have a small graveyard of 4 fat PS3's all with fans and PSU's intact.
     
  18. 7,411
    6,044
    622
    bguerville

    bguerville Moderator Developer

    Joined:
    Feb 25, 2015
    Messages:
    7,411
    Likes Received:
    6,044
    Trophy Points:
    622
    Location:
    Earth
    Sorry @pink1 I just realised that this thread has gone completely off-topic.
    Were you actually done with the pkg header info request?
    If not, we should maybe move the off topic posts to a new thread?
     
  19. 130
    34
    32
    Incorruptable

    Incorruptable Member

    Joined:
    May 22, 2018
    Messages:
    130
    Likes Received:
    34
    Trophy Points:
    32
    Location:
    Ireland
    My Apologies, you can delete all my posts if you wish
     
  20. 7,411
    6,044
    622
    bguerville

    bguerville Moderator Developer

    Joined:
    Feb 25, 2015
    Messages:
    7,411
    Likes Received:
    6,044
    Trophy Points:
    622
    Location:
    Earth
    No worries.
    No point deleting the posts, moving them to a new thread will do just fine, if ever pink1 still has needs for this thread.
     

Share This Page