All Functions Modules Pages
os

Functions

NUMBER os.master ()
 Allows to switch on unsafe mode in the PSVita. More...
 
NUMBER os.access ()
 Allows to know the access mode set in the PSVita (Safe or Unsafe). More...
 
NUMBER os.taicfgreload ()
 Allows to do a config.txt reload from the "tai" folder (henkaku). More...
 
NUMBER os.confignp ()
 Allows to enable PSN Activation in the file "CONFIG/NP". More...
 
NIL os.debug ()
 Enables the editor in the error screen (Debugger), to edit the script. More...
 
STRING os.language ()
 The language set or determined in the VITA. More...
 
NIL os.delay (NUMBER milliseconds)
 Allows a system delay. More...
 
STRING os.nick ()
 User Nick. More...
 
STRING os.mac ()
 Obtains the MAC adress of the console. More...
 
STRING os.swversion ()
 Identifies the firmware currently installed on the device. More...
 
TABLE os.devinfo (STRING device)
 Obtains information from the storage capacity of the partition (device). More...
 
NIL os.swapmem ()
 Lets you swap memory cards between accounts without a need to reformat. More...
 
NUMBER os.ram ()
 Obtains the free RAM. More...
 
NUMBER os.totalram ()
 Obtains the total amount of RAM. More...
 
NUMBER os.cpu ()
 The current speed of the CPU. More...
 
NIL os.cpu (NUMBER speed)
 Sets or changes the CPU speed to the specified speed. More...
 
NUMBER os.bus ()
 The current CPU frequency. More...
 
NUMBER os.gpuclock ()
 The current speed of the GPU. More...
 
NIL os.gpuclock (NUMBER speed)
 Sets or changes GPU speed at the specified speed. More...
 
NUMBER os.crossbarclock ()
 The current speed of the GPU Cross. More...
 
NIL os.crossbarclock (NUMBER speed)
 Sets or changes the speed of GPU Cross at the specified speed. More...
 
NIL os.exit ()
 Closes the homebrew. More...
 
NIL os.restart ()
 Restart the homebrew. More...
 
STRING os.password ()
 Gets the console password. More...
 
STRING os.login ()
 The email of user. More...
 
STRING os.psnregion ()
 The region of the user according to the PSN. More...
 
NUMBER os.brightness ()
 It allows to know the current brightness level. More...
 
STRING os.titleid ()
 The identifier of the running application. More...
 
STRING os.idps ()
 It allows to know an id that contains specific information on the console. More...
 
STRING os.psid ()
 Let you know a unique 20 byte hexsequence inside your PS Vita/PSTV. More...
 
STRING os.account ()
 Allow know the serial number (account_id) associated in the PSVita with the CMA when transferring data. More...
 
NIL os.message (STRING mje)
 Show a message. More...
 
NUMBER os.message (STRING mje, NUMBER mode)
 Show a message. More...
 
NIL os.uri (STRING cmd)
 Enables the use of URIs commands. More...
 
NUMBER os.newuri (STRING cmd)
 Allows to create a new URI command to access the < ID > of the app in execution. More...
 
NUMBER os.newuri (STRING cmd, STRING id)
 Allows to create a new URI command to access the indicated < ID> More...
 
NUMBER os.browser (STRING cmd)
 Launch web browser app. More...
 
STRING os.arg ()
 Allows you to know the structure and arguments with which the application was called. More...
 
NUMBER os.requiere (STRING path)
 Allows to use ONELua API to add external modules. More...
 
NIL os.updatedb (STRING path)
 Allows to rebuild database, will lose the bubble configuration on livearea (complete restore). More...
 
NIL os.rebuilddb ()
 Allows to rebuild database, will lose the bubble configuration on livearea (complete restore). More...
 
NUMBER os.golivearea ()
 Lets go to 'livearea' without closing the application or press the 'PS' button. More...
 

Detailed Description

OS functions.

Function Documentation

NUMBER os.master ( )

Allows to switch on unsafe mode in the PSVita.

Returns
1 if success, 0 otherwise.
NUMBER os.access ( )

Allows to know the access mode set in the PSVita (Safe or Unsafe).

Returns
Returns the value 1 if we got full access (unsafe), or 0 if we got limited access (safe).
NUMBER os.taicfgreload ( )

Allows to do a config.txt reload from the "tai" folder (henkaku).

Returns
1 if success, 0 otherwise.
NUMBER os.confignp ( )

Allows to enable PSN Activation in the file "CONFIG/NP".

Returns
1 if success, 0 otherwise.
NIL os.debug ( )

Enables the editor in the error screen (Debugger), to edit the script.

Returns
Nothing.
STRING os.language ( )

The language set or determined in the VITA.

Returns
The language set in the VITA (upper case), any of the following:
  • JAPANESE
  • ENGLISH
  • FRENCH
  • SPANISH
  • GERMAN
  • ITALIAN
  • DUTCH
  • PORTUGUESE
  • RUSSIAN
  • KOREAN
  • CHINESE_T
  • CHINESE_S
  • FINNISH
  • SWEDISH
  • DANISH
  • NORWEGIAN
  • POLISH
  • PORTUGUESE_BR
  • TURKISH
NIL os.delay ( NUMBER  milliseconds)

Allows a system delay.

Parameters
millisecondsDelay duration (in milliseconds).
Returns
Nothing.
STRING os.nick ( )

User Nick.

Returns
The User's Nick configured in the PSP.
STRING os.mac ( )

Obtains the MAC adress of the console.

Returns
The MAC adress in format: XX:XX:XX:XX:XX:XX
STRING os.swversion ( )

Identifies the firmware currently installed on the device.

Returns
The system version and the version of henkaku example, '3.60)(変革-6'.
TABLE os.devinfo ( STRING  device)

Obtains information from the storage capacity of the partition (device).

Parameters
deviceThe device: "gro0:", "grw0:", "os0:", "pd0:", "sa0:", "tm0:", "ud0:", "ur0:", "ux0:", "vd0:", "vs0:"
Returns
A table with the following fields:
  • max: Total capacity of the partition in bytes.
  • free: Amount of free memory of the partition in bytes.
  • used: Amount of used memory of the partition in bytes.
NIL os.swapmem ( )

Lets you swap memory cards between accounts without a need to reformat.

Returns
Nothing.
NUMBER os.ram ( )

Obtains the free RAM.

Returns
The amount of free RAM in bytes..
NUMBER os.totalram ( )

Obtains the total amount of RAM.

Returns
The total amount of RAM in bytes (calculated when ONElua starts).
NUMBER os.cpu ( )

The current speed of the CPU.

Returns
CPU speed in which you are the VITA (values 41-444).
Note
The default speed is 333Mhz.
NIL os.cpu ( NUMBER  speed)

Sets or changes the CPU speed to the specified speed.

Parameters
speedIt is the new CPU clock speed should be from 41 to 444.
Returns
Nothing.
NUMBER os.bus ( )

The current CPU frequency.

Returns
The frequency of the CPU on which is the VITA (values 41-222).
Note
The default speed is 222MHz.
NUMBER os.gpuclock ( )

The current speed of the GPU.

Returns
GPU speed which is the VITA (values 41-166).
Note
The default speed is 111Mhz.
NIL os.gpuclock ( NUMBER  speed)

Sets or changes GPU speed at the specified speed.

Parameters
speedIt is the new GPU clock speed should be from 41 to 166.
Returns
Nothing.
NUMBER os.crossbarclock ( )

The current speed of the GPU Cross.

Returns
GPU Cross speed in which you are the VITA (values 111-222).
Note
The default speed is 111Mhz.
NIL os.crossbarclock ( NUMBER  speed)

Sets or changes the speed of GPU Cross at the specified speed.

Parameters
speedIt is the new GPU Cross clock speed should be 111 to 222.
Returns
Nothing.
NIL os.exit ( )

Closes the homebrew.

Returns
Nothing.
NIL os.restart ( )

Restart the homebrew.

Returns
Nothing.
STRING os.password ( )

Gets the console password.

Returns
The password configured in the console.
STRING os.login ( )

The email of user.

Returns
The email user configured in the VITA.
STRING os.psnregion ( )

The region of the user according to the PSN.

Returns
The region of the user according to the PSN configured in the VITA.
NUMBER os.brightness ( )

It allows to know the current brightness level.

Returns
A number with the current brightness level (values 21-65536).
STRING os.titleid ( )

The identifier of the running application.

Returns
A string with the identifier of the running application (9 digits).
STRING os.idps ( )

It allows to know an id that contains specific information on the console.

Returns
The id information from your console (16 digits).
STRING os.psid ( )

Let you know a unique 20 byte hexsequence inside your PS Vita/PSTV.

Note
It is recommended not to show the public this information.
Returns
The psid of the console.
STRING os.account ( )

Allow know the serial number (account_id) associated in the PSVita with the CMA when transferring data.

Note
Documents/PSVita/XXXXXXXXXXX <– account_id.
Returns
A string with the serial number.
NIL os.message ( STRING  mje)

Show a message.

Parameters
mjeThe message to show.
Returns
Nothing.
Note
Only show "Quit" option.
NUMBER os.message ( STRING  mje,
NUMBER  mode 
)

Show a message.

Parameters
mjeThe message to show.
modeNumeric value: 1 for advanced message (with YES or NO options).
Returns
A numeric value according to the message reply:
  • 1: If the reply is YES.
  • 0: If the reply is NO.
NIL os.uri ( STRING  cmd)

Enables the use of URIs commands.

Parameters
cmdSome URI command available.
Note
Visit VitaDevWiki for more information.
Returns
Nothing.
NUMBER os.newuri ( STRING  cmd)

Allows to create a new URI command to access the < ID > of the app in execution.

Parameters
cmdNew URI command to be created.
Note
In case of an existing command, will get overwritten wih the new < ID > access.
Returns
The numeric value 1 in case of success, otherwise 0.
NUMBER os.newuri ( STRING  cmd,
STRING  id 
)

Allows to create a new URI command to access the indicated < ID>

Parameters
cmdNew URI command to be created.
idapp ID.
Note
In case of an existing command, will get overwritten wih the new < ID > access.
Returns
The numeric value 1 in case of success, otherwise 0.
NUMBER os.browser ( STRING  cmd)

Launch web browser app.

Returns
A numerical value of 1 on success, 0 otherwise.
STRING os.arg ( )

Allows you to know the structure and arguments with which the application was called.

Note
This function only returns values the first time it is run, it is recommended to save them to a global variable.
Returns
A string, with structure and arguments, example, "psgm:play?titleid=<ID>".
NUMBER os.requiere ( STRING  path)

Allows to use ONELua API to add external modules.

Parameters
pathPath to the prx.
Returns
1 if success, 0 otherwise.
NIL os.updatedb ( STRING  path)

Allows to rebuild database, will lose the bubble configuration on livearea (complete restore).

Returns
Nothing.
Note
It is highly recommended to restart the console inmediately with function power.restart()
NIL os.rebuilddb ( )

Allows to rebuild database, will lose the bubble configuration on livearea (complete restore).

Returns
Nothing.
Note
It is highly recommended to restart the console inmediately with function power.restart()
NUMBER os.golivearea ( )

Lets go to 'livearea' without closing the application or press the 'PS' button.

Returns
A numerical value 1 in case of success, 0 otherwise.