Editing XRegistry.sys

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 8: Line 8:


=Rebuild, regenerate, restore processes=
=Rebuild, regenerate, restore processes=
The PS3 system always tries to keep a record of everything that was made before (like the number of users that was created by storing their number in a cumulative counter that never decreases). For this reason when new info from another xRegistry.sys needs to be added to the local xRegistry.sys the system does a selective "merging" of their values
The PS3 system always tryes to keep a record of everything that was made before (like the number of users that was created by storing his number in a cumulative counter that never decreases). For this reason when new info from another xregistry.sys needs to be added to the local xRegistry.sys the system does a selective "merging" of his values


This processes changes the values inside xRegistry.sys, but also can involve a whole rebuild of xRegistry.sys when new entries are added (like when going from 1.00 firmware to 4.66 firmware)
This processes changes the values inside xRegistry.sys, but also can involve a whole rebuild of xRegistry.sys when new entries are added (like when going from 1.00 firmware to 4.66 firmware)
Line 18: Line 18:


==Restore default settings==
==Restore default settings==
Some settings of xRegistry.sys (the ones that appears in XMB {{icon category settings}} column) can be restored to their default values by rebooting the PS3 in [[Recovery Menu]] and using the option 2: ''Restore Default Settings''
Some settings of xRegistry.sys (the ones that appears in XMB {{icon category settings}} column) can de restored to his default values by rebooting the PS3 in [[Recovery Menu]] and using the option 2: ''Restore Default Settings''


==Backup and Restore from a HDD backup==
==Backup and Restore from a HDD backup==
Line 30: Line 30:
**For NAND flash. xRegistry.sys is stored in real FLASH... unknown kill method <!--i dont have a NAND, never tryed, and im not going to suggest to erase it manually, if someone knows please explain the method here-->
**For NAND flash. xRegistry.sys is stored in real FLASH... unknown kill method <!--i dont have a NAND, never tryed, and im not going to suggest to erase it manually, if someone knows please explain the method here-->


= xRegistry.sys access from GameOS =
=xRegistry.sys access from gameOS=
*[[Talk:VSH#xRegistry_Access]]
*http://www.psdevwiki.com/ps3/Talk:VSH#xRegistry.h
*https://github.com/Estwald/irismanager-4-x/blob/master/source/sysregistry.c
*https://github.com/Estwald/irismanager-4-x/blob/master/source/sysregistry.c
*https://github.com/Zarh/ManaGunZ/blob/master/MGZ/source/xreg.h https://github.com/Zarh/ManaGunZ/blob/master/MGZ/source/xreg.c
*https://github.com/Zarh/ManaGunZ/blob/master/MGZ/source/xreg.h https://github.com/Zarh/ManaGunZ/blob/master/MGZ/source/xreg.c
Line 37: Line 37:


=Structure=
=Structure=
Whole file size is 0x40000, seems to be divided in 4 areas of 0x10000 bytes each and only the first two are used
*The entries in the tables are officially codenamed '''key''' and '''value''' as can be seen in this LV1 strings:
**Registry Value NotFound
**Registry Key AlreadyPresent
**Registry AddKey Failed
**Registry Key NotFound
**x3mw:Registry:Addkey
**AddToCache error @ AddKey
**Setvalue error happened /setting/categoryVersion [%x]
The '''key''' is the setting itself (as a more abstract concept), and the '''value''' is the data stored by the key
==Header==
==Header==
The header is 0x10 length and seems to contain static values
The header consists of a 0x10 bytes (seems to be static).


  BC AD AD BC 00 00 00 90 00 00 00 02 BC AD AD BC
  BC AD AD BC 00 00 00 90 00 00 00 02 BC AD AD BC
Line 61: Line 48:
| 0x0 || 0x4 || '''header_mark''' || BC AD AD BC ||  
| 0x0 || 0x4 || '''header_mark''' || BC AD AD BC ||  
|-
|-
| 0x4 || 0x4 || {{cellcolors|#ff6666}} ''unk_header_1'' || 00 00 00 90 || binary flags ? (144 in decimal... and... 10010000 in binary)
| 0x4 || 0x4 || {{cellcolors|#ff6666}} ''unknown'' || 00 00 00 90 || ?
|-
|-
| 0x8 || 0x4 || {{cellcolors|#ff6666}} ''unk_header_2'' || 00 00 00 02 || fileformat revision ?
| 0x8 || 0x4 || {{cellcolors|#ff6666}} ''unknown'' || 00 00 00 02 || ?
|-
|-
| 0xC || 0x4 || '''header_mark''' || BC AD AD BC ||  
| 0xC || 0x4 || '''header_mark''' || BC AD AD BC ||  
Line 69: Line 56:
|}
|}


*Speculation
==Index Entries==
**Because are in the header... this values should be something generic that affects all the settings inside the file
**'''unk_header_2''' could be the xregistry.sys fileformat revision, if this is true it means there must be a previous version of it, used in some old retail firmwares, or maybe even older in pre-retail firmware or prototype PS3 models, the changes in between v1 and v2 could affect all entries in the file (such missing fields for security purposes in v1 that was added in v2) and as a consequence the whole file format structure could be different
 
==Key Table==


{| class="wikitable"
{| class="wikitable"
Line 79: Line 62:
! Offset !! Length !! Name !! Example !! Notes
! Offset !! Length !! Name !! Example !! Notes
|-
|-
| 0x0 || 0x2 || {{cellcolors|#ff6666}} ''unk_key'' || 25 A0 || <strike>Entry ID</strike> ?
| 0x0 || 0x2 || {{cellcolors|#ff6666}} ''unknown'' || 25 A0 || <strike>Entry ID</strike> ?
|-{{cellcolors|lightgrey}}
| colspan="5" |
|-
|-
| 0x2 || 0x2 || '''key_length''' || 00 20 ||  
| 0x2 || 0x2 || '''setting_name_length''' || 00 20 ||  
|-
|-
| 0x4 || 0x1 || '''key_type''' || 00 || 0 = Unlocked / In use<br>1 = Locked / Inactive<br>2 = Hidden / Never used<br>3 = Directory
| 0x4 || 0x1 || '''setting_type''' || 00 || 0 = Unlocked / In use<br>1 = Locked / Inactive<br>2 = Hidden / Never used<br>3 = Directory
|-
|-
| 0x5 || ''variable'' || '''key''' || /setting/parental/passwordNumber ||  
| 0x5 || ''variable'' || '''setting_name''' || /setting/parental/passwordNumber ||  
|-
|-
| 0x5 + '''key_length''' || 0x1 || '''null''' || 00 || Entry terminator
| 0x5 + '''setting_name_length''' || 0x01 || '''null''' || 00 || Entry terminator
|}
|}


Line 97: Line 78:
**The entry 0xAABBCCDDEE0000 can be used inside the table to overwrite and old entry, the rests of the old entry are visibles after the seventh byte (''etting...'' instead of ''/setting''), seems to be related with the users that has been created/erased before... it can be an error of the process that updates the file, or maybe are the rests of groups of entries that was erased or disabled
**The entry 0xAABBCCDDEE0000 can be used inside the table to overwrite and old entry, the rests of the old entry are visibles after the seventh byte (''etting...'' instead of ''/setting''), seems to be related with the users that has been created/erased before... it can be an error of the process that updates the file, or maybe are the rests of groups of entries that was erased or disabled


==Value Table==
==Data Entries==
There is a 0x10 length area at offset 0xFFF0 that seems to be a bit special, is copyed here as example, some values in it seems to be generic, note the value 0x4D26 is repeated two times, actually, it looks like two groups of two values each: 0x4D26007A and 0x4D260062
The entry data begins at 0xFFF0. There is a 2 byte marker here (0x4D26) indicating it's the data section, continued by a table of data entries.
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
0000FFF0  4D 26 00 7A 4D 26 00 62 00 04 00 00 00 00 00 00  M&.zM&.b........
 
After that the data table starts at offset 0x10000 entries are concatenated, the big areas filled with zeroes (that looks like gaps) are actually delimited by the data entries, so by reading all the entries consecutivelly it can be mapped all the data table


{| class="wikitable"
{| class="wikitable"
Line 109: Line 85:
! Offset !! Length !! Name !! Example || Notes
! Offset !! Length !! Name !! Example || Notes
|-
|-
| 0x0 || 0x2 || {{cellcolors|#ff6666}} ''unk_value_1'' || 00 00 || <strike>Flags</strike>, or parent-child hierarchy info, or timestamps ?. Usually zeroes
| 0x0 || 0x2 || {{cellcolors|#ff6666}} ''unknown'' || 00 00 || <strike>Flags</strike> ?
|-
|-
| 0x2 || 0x2 || '''key_offset''' || 00 86 || Indicates the owner of this '''value'''<br>+ 0x10 of the static header = absolute offset
| 0x2 || 0x2 || '''entry_offset''' || 00 86 || + 0x10 of the static header = absolute entry offset
|-
|-
| 0x4 || 0x2 || {{cellcolors|#ff6666}} ''unk_value_2'' || 81 2D || <strike>Entry ID</strike> or 16 bits checksum ? (candidates are [https://en.wikipedia.org/wiki/BSD_checksum BSD16] and CRC16)
| 0x4 || 0x2 || {{cellcolors|#ff6666}} ''unknown'' || 81 2D || <strike>Entry ID</strike> ?
|-{{cellcolors|lightgrey}}
| colspan="5" |
|-
|-
| 0x6 || 0x2 || '''value_length''' || 00 04 ||  
| 0x6 || 0x2 || '''data_length''' || 00 04 ||  
|-
|-
| 0x8 || 0x1 || '''value_type''' || 01 || 0 = boolean<br>1 = integer<br>2 = string
| 0x8 || 0x1 || '''data_type''' || 01 || 0 = boolean<br>1 = integer<br>2 = string
|-
|-
| 0x9 || ''variable'' || '''value''' || 00 00 55 53 ||  
| 0x9 || ''variable'' || '''data''' || 00 00 55 53 ||  
|-
|-
| 0x9 + '''value_length''' || 0x1 || '''null''' || 00 || Entry terminator
| 0x9 + '''data_length''' || 0x1 || '''null''' || 00 || Entry terminator
|}
|}


Line 842: Line 816:
| /setting/browser/ifilter  
| /setting/browser/ifilter  
| ?
| ?
| 0, 1
| 0
|-
|-
| /setting/browser/ifilterAddress  
| /setting/browser/ifilterAddress  
Line 866: Line 840:
| /setting/browser/trendEula  
| /setting/browser/trendEula  
| Determine whether or not TrendMicro EULA was accepted  
| Determine whether or not TrendMicro EULA was accepted  
| 0, 1
| 0
|-
|-
| /setting/browser/trendEnable  
| /setting/browser/trendEnable  
| Enable or disable TrendMicro internet filter  
| Enable or disable TrendMicro internet filter  
| 0, 1
| 0
|-
|-
| /setting/dlna/dlnaFlag  
| /setting/dlna/dlnaFlag  
Line 1,538: Line 1,512:
| /setting/browser/trendTtl  
| /setting/browser/trendTtl  
| ?
| ?
| 0, 1
| 0
|-
|-
| /setting/browser/trendRegistered  
| /setting/browser/trendRegistered  
| ?
| ?
| 0, 1
| 0
|-
|-
| /setting/browser/debugMenu  
| /setting/browser/debugMenu  
| {{icon category settings}} ⇨ '''[Debug Settings]''' ⇨ '''[Internet Browser Debug]'''<br>Web Browser Debug Menu. See [[Web Browser]]
| {{icon category settings}} ⇨ '''[Debug Settings]''' ⇨ '''[Internet Browser Debug]''' ?<br>Web Browser Debug Menu. See [[Web Browser]]
| 0 = disabled, 1 = enabled
| 0 = disabled, 1 = enabled
|-
|-
Line 1,673: Line 1,647:
|-
|-
| /setting/browser/browserType  
| /setting/browser/browserType  
| Allows to choose the web browser by clicking {{padtriangle}} over {{icon category network}} ⇨ '''[Engine]''' ?
| ?
| 0=Webkit, 1=Silk
| 0
|-
|-
| /setting/xmb/yconExplained  
| /setting/xmb/yconExplained  
Please note that all contributions to PS3 Developer wiki are considered to be released under the GNU Free Documentation License 1.2 (see PS3 Developer wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following hCaptcha:

Cancel Editing help (opens in new window)