-
-
Notifications
You must be signed in to change notification settings - Fork 27
Command Reference
Make sure to follow the correct syntax and provide the required arguments for each command.
You can configure these commands in the package.ini
file by specifying them under the corresponding options. Make sure to provide the necessary arguments as described for each command.
Ultrahand currently supports the following commands:
-
reboot
: Restarts the system. Can also be used to reboot into Hekate / UMS or Hekate ini boot entries by entry name.- Usage:
reboot
orreboot hekate
orreboot ums
or-
reboot boot <NAME_OF_BOOT_ENTRY>
(for entries withinhekate_ipl.ini
) -
reboot ini <NAME_OF_INI_ENTRY>
orreboot ini <NAME_OF_INI_ENTRY> <DUPLICATE_INDEX>
-
- Usage:
-
shutdown
: Shuts down the system or all bluetooth controllers.- Usage:
shutdown
orshutdown controllers
- Usage:
-
backlight
: Modify the current backlight value.- Usage:
backlight on
orbacklight off
orbacklight <PERCENTAGE_INTEGER>
- Usage:
-
make
ormkdir
: Creates a directory.- Usage:
mkdir <directory_path>
- Usage:
-
copy
orcp
: Copies a file or diectory.- Usage:
copy <source_file_path> <destination_file_path>
- Usage:
-
mirror_copy
ormirror_cp
: Mirrors the contents of a directory.- Usage:
mirror_copy <source_file_path> <destination_file_path>
- Usage:
-
delete
ordel
: Deletes a file or directory.- Usage:
delete <file_path>
- Usage:
-
mirror_delete
ormirror_del
: Uses contents of a source directory as for files to remove within the destination path.- Usage:
mirror_delete <source_file_path> <destination_file_path>
- Usage:
-
move
ormv
: Moves/renames a file/directory to a new location/label.- Usage:
move <file_path> <destination_directory_path>
- Usage:
-
download
: Downloads files from a specified URL to a local destination.- Usage:
download <file_url> <destination_file_path>
- Usage:
-
unzip
: Extracts files from a specified ZIP archive to a local destination.- Usage:
unzip <zip_file_path> <destination_file_path>
- Usage:
-
set-ini-val
orset-ini-value
: Edits/makes an INI file by updating/adding a section with a desired key-value pair.- Usage:
set-ini-val <file_to_edit> <desired_section> <desired_key> <desired_value>
- Usage:
-
set-ini-key
: Edits an INI file by updating a section with a new key.- Usage:
set-ini-key <file_to_edit> <desired_section> <desired_key> <desired_new_key>
- Usage:
-
remove-ini-section
: Remove a section from an INI file.- Usage:
remove-ini-section <ini_file_path> <section_name>
- Usage:
-
hex-by-offset
: Edits the contents of a file at a specified offset with the provided hex data.- Usage:
hex-by-offset <file_path> <offset> <hex_data>
- Usage:
-
hex-by-custom-offset
: Edits the contents of a file at a specified custom pattern offset with the provided hex data.- Usage:
hex-by-custom-offset <file_path> <custom_pattern> <offset> <hex_data>
- Usage:
-
hex-by-swap
: Edits the contents of a file by replacing a specified hex data with another.- Usage:
hex-by-swap <file_path> <hex_data_to_replace> <hex_data_replacement>
- Usage:
-
hex-by-decimal
: Edits the contents of a file by replacing a specified decimal data with another.- Usage:
hex-by-decimal <file_path> <decimal_data_to_replace> <decimal_data_replacement>
- Usage:
-
hex-by-rdecimal
: Edits the contents of a file by replacing a specified reverse decimal data with another.- Usage:
hex-by-rdecimal <file_path> <decimal_data_to_replace> <decimal_data_replacement>
- Usage:
-
hex-by-string
: Edits the contents of a file by replacing a specified string data with another.- Usage:
hex-by-string <file_path> <string_data_to_replace> <string_data_replacement>
- Usage:
-
pchtxt2ips
: Converts a .pchtxt mod into a .ips.- Usage:
pchtxt2ips <pchtxt_file_path> <output_file_path>
- Usage:
-
pchtxt2cheat
: Converts and installs a .pchtxt mod into a cheat.- Usage:
pchtxt2cheat <pchtxt_file_path>
- Usage:
-
*
(Asterisk):- The asterisk * is often used as a wildcard or placeholder, representing a value that will be dynamically filled in during execution. It's commonly used in contexts where specific values are expected, and the actual value will be determined at runtime.
-
package_source
:- Package source allows users to forward one Ultrahand package ini from another. Can help users organize their code as well as chain up longer menus.
- Used with
;mode=forwarder
, calledpackage_source /path/to/forwarder_package.ini
.
-
list_source
:- List source is a way to store variables for dropdown menus within the package.ini. It's used as a placeholder for the individual values within the list source variable. The code replaces list_source references with the corresponding value.
-
list_file_source
:- Similar to
list_source
but utilizes a text file directory as input with the text file containing each entry separated by newlines.
- Similar to
-
file_source
:-
Representation of a source file or resource. It's a placeholder for the actual filename or source location. The code replaces source with the appropriate file path when executing certain commands.
Here's a breakdown of the additional variables accessible by use of
file_source
:-
file_name
: The name of the individual file. -
folder_name
: The name of the parent folder for the file.
-
-
file_source
in anon:
section implies that a command or action should be executed when a specific source is "on" or enabled. -
file_source
in anoff:
section implies that a command or action should be executed when a specific source is "off" or disabled. -
Evaluates the state of a toggle or a condition and then selects the appropriate command for execution based on whether the source is on or off.
-
For
file_source
function toggles, please refer to the Broomstick package example.
-
-
ini_file_source
:- Similar to
list_file_source
but utilizes entry names from an ini file for its list value. It also retains other ini functions similar toini_file
.
- Similar to
-
json_file_source
:- This command is used to define a JSON data source. It specifies a file path to a JSON file that contains data. This JSON data source is used for various purposes within the code.
- The code reads data from the specified JSON file, and based on the context and logic in the code, it may perform actions or operations using this data.
- In some cases, it might also accept an additional argument (e.g., jsonKey) to indicate a specific key or property within the JSON data to be used for display or processing.
- This command is used to retrieve structured data from JSON files and incorporate it into the program's functionality.
Here's a breakdown of the additional variables accessible by use of
json_file_source
:-
jsonPath
: The file path to the JSON data source. -
jsonKey
: An optional key within the JSON data for specific data retrieval. -
For information on
json_file_source
function implementations, please refer to the Easy Installer package example.
- Description: Returns the vendor of the device's RAM.
- Example: Displays "Samsung" for a device with Samsung RAM.
- Description: Returns the model number of the RAM in the device.
- Example: Displays "M471A1K43BB1-CTD" as the model number.
- Description: Returns the Atmosphere version installed on the device.
- Example: Displays "1.4.0" for Atmosphere version 1.4.0.
- Description: Returns the Horizon OS version.
- Example: Displays "17.0.0" for Horizon OS version 17.0.0.
- Description: Returns the CPU speedo value of the device.
- Example: Displays "0x1F" for the device's CPU speedo value.
- Description: Returns the CPU IDDQ value of the device.
- Example: Displays "0x03" for the device's CPU IDDQ value.
- Description: Returns the GPU speedo value of the device.
- Example: Displays "0x2A" for the device's GPU speedo value.
- Description: Returns the GPU IDDQ value of the device.
- Example: Displays "0x04" for the device's GPU IDDQ value.
- Description: Returns the SOC speedo value of the device.
- Example: Displays "0x10" for the device's SOC speedo value.
- Description: Returns the SOC IDDQ value of the device.
- Example: Displays "0x05" for the device's SOC IDDQ value.
- Description: Slices a string based on the provided start and end indices.
-
Parameters:
-
<STRING>
: The string to be sliced. -
<START_INDEX>
: The starting index of the slice. -
<END_INDEX>
: The ending index of the slice.
-
-
Example:
{slice("Test String", 0, 4)}
returns "Test".
- Description: Converts a decimal number to a hexadecimal string.
-
Parameters:
-
<DECIMAL>
: The decimal number to convert.
-
-
Example:
{decimal_to_hex(255)}
returns "FF".
- Description: Converts an ASCII string to its hexadecimal representation.
-
Parameters:
-
<ASCII>
: The ASCII string to convert.
-
-
Example:
{ascii_to_hex("Test")}
returns "54657374".
- Description: Converts a hexadecimal string to reverse-endian hexadecimal.
-
Parameters:
-
<HEX>
: The hexadecimal string to convert.
-
-
Example:
{hex_to_rhex("12345678")}
returns "78563412".
- Description: Converts a hexadecimal string to its decimal representation.
-
Parameters:
-
<HEX>
: The hexadecimal string to convert.
-
-
Example:
{hex_to_decimal("FF")}
returns "255".
- Description: Splits a string based on a pattern and returns a specific portion.
-
Parameters:
-
<STRING>
: The string to split. -
<PATTERN>
: The pattern used to split the string. -
<INDEX>
: The index of the split portion to return.
-
-
Example:
{split("Test - String", " - ", 0)}
returns "Test".
- Description: Returns the current value of a trackbar or slider.
- Example: Used in trackbars to display the current selected value.
- Description: Returns the current index of a selection or list.
- Example: Used to indicate the position of an item in a list or dropdown.
-
Description: Fetches an item from a list defined earlier using
list_source
. -
Parameters:
-
<INDEX>
: Index of the item in the list.
-
-
Example:
{list_source(0)}
fetches the first item in the list.
- Description: Fetches a value from a JSON source based on the provided key.
-
Parameters:
-
<KEY>
: The key to look up in the JSON object.
-
-
Example:
{json_source("title")}
fetches the value associated with the "title" key in a JSON object.
- Description: Returns the value of a key in a specific section of an INI file.
-
Parameters:
-
<SECTION>
: The section in the INI file. -
<KEY>
: The key within the section.
-
-
Example:
{ini_file("Settings", "Language")}
returns the value for the "Language" key under the "Settings" section.
- Documentation coming soon.
Notice: Advancements are faster than my ability to make clear documentation right now. Once things settle down, I'll work more on this wiki a bit. Lot's of new packages can be created with the improvements that have been added to v1.3.6+.