AZ
Ten years of iOS privacy protection plugins
AZ TUTORIALS · API reference

VBox · API reference

VBox is controlled through a local HTTP API using /cmd?fun=command¶meters. An "instance" in VBox is one record.

AZ tutorialsRead on siteUpdated 2026-11-01
ItemValue
HTTP base URLhttp://127.0.0.1:8080
MethodGET
Result file/var/mobile/VBoxResult.txt
Export folder/var/mobile/VBox_export

Before you call anything

  1. Keep the VBox main screen in the foreground while calling; do not send it to the background.

Return values

Read /var/mobile/VBoxResult.txt after the call:

ValueMeaning
1Success
0Failure
2Still running

Recommended polling

Wait one second after each call before reading the result. If it reads 2, wait another second and read again. That costs you at most one extra second.

Endpoint list

FunctionCommandParameters
Create an instancenewRecord—
Original instanceoriginRecord—
Next instancenextRecord—
First instancefirstRecord—
Switch to a specific instancesetRecordrecordName
Delete a specific instancedeleteRecordrecordName
Delete every instancedeleteAllRecords—
Get the current instance namegetCurrentRecordName—
Get every instance namegetAllRecordNamessaveFilePath
Rename an instancesetRecordNameoldName newName
Get a specific instance's parametersgetRecordParamrecordName saveFilePath
Get the current instance's parametersgetCurrentRecordParamsaveFilePath
Set a specific instance's parameterssetRecordParamrecordName filePath
Set the current instance's parameterssetCurrentRecordParamfilePath
Export an instanceexportDataexportKeychain
Import an instanceimportDataimportKeychain

Endpoint details

Instance names default to the creation time, for example 2020-07-03-21-24-13-52.

Create an instance

GET http://127.0.0.1:8080/cmd?fun=newRecord

Original instance

GET http://127.0.0.1:8080/cmd?fun=originRecord

Switches back to the real device environment.

Next instance

GET http://127.0.0.1:8080/cmd?fun=nextRecord

First instance

GET http://127.0.0.1:8080/cmd?fun=firstRecord

Switch to a specific instance

GET http://127.0.0.1:8080/cmd?fun=setRecord&recordName=2020-07-03-21-24-13-52
ParameterRequiredNotes
recordNameYesInstance name

You cannot switch in these cases

The instance currently in use, a disabled instance, or one that does not exist.

Delete a specific instance

GET http://127.0.0.1:8080/cmd?fun=deleteRecord&recordName=2020-07-03-21-24-13-52
ParameterRequiredNotes
recordNameYesInstance name

Delete every instance

GET http://127.0.0.1:8080/cmd?fun=deleteAllRecords

Get the current instance name

GET http://127.0.0.1:8080/cmd?fun=getCurrentRecordName

Get every instance name

GET http://127.0.0.1:8080/cmd?fun=getAllRecordNames&saveFilePath=/var/mobile/record.txt
ParameterRequiredNotes
saveFilePathYesWhere to save the list of names

Rename an instance

GET http://127.0.0.1:8080/cmd?fun=setRecordName&oldName=2020-07-03-21-24-13-52&newName=2020
ParameterRequiredNotes
oldNameYesCurrent name
newNameYesNew name

Warning

Disabled instances and the original instance cannot be renamed.

Get a specific instance's parameters

GET http://127.0.0.1:8080/cmd?fun=getRecordParam&recordName=2020-07-03-21-24-13-52&saveFilePath=/var/mobile/test.plist
ParameterRequiredNotes
recordNameYesInstance name
saveFilePathYesWhere to save the parameters (a plist)

Get the current instance's parameters

GET http://127.0.0.1:8080/cmd?fun=getCurrentRecordParam&saveFilePath=/var/mobile/test.plist
ParameterRequiredNotes
saveFilePathYesWhere to save the parameters (a plist)

Set a specific instance's parameters

GET http://127.0.0.1:8080/cmd?fun=setRecordParam&recordName=2020-07-03-21-24-13-52&filePath=/var/mobile/test.plist
ParameterRequiredNotes
recordNameYesInstance name
filePathYesPath to the edited parameter file

Set the current instance's parameters

GET http://127.0.0.1:8080/cmd?fun=setCurrentRecordParam&filePath=/var/mobile/test.plist
ParameterRequiredNotes
filePathYesPath to the edited parameter file

Correct flow: export the plist with a get endpoint, edit the fields, then write it back with a set endpoint.

Export an instance

GET http://127.0.0.1:8080/cmd?fun=exportData&exportKeychain=0
ParameterRequiredNotes
exportKeychainYes1 exports the Keychain too, 0 does not

Exports land in /var/mobile/VBox_export, one tar file per instance.

Keychain does not cross devices

Keychain data does not transfer between devices or iOS versions, and carrying it across often leaves the device stuck on the activation screen. If the data is going to another device, you must use exportKeychain=0. For a local backup and restore on the same device, exportKeychain=1 gives you more complete data.

Import an instance

GET http://127.0.0.1:8080/cmd?fun=importData&importKeychain=0
ParameterRequiredNotes
importKeychainYesSame rule as export: use 0 across devices

Put the tar file in /var/mobile/VBox_export before importing.

Lua example (TouchSprite)

lua
local http = require("szocket.http")

local BASE = "http://127.0.0.1:8080/cmd?fun="
local RESULT = "/var/mobile/VBoxResult.txt"

-- Call and wait for the result: true = success / false = failure
function VBox(query)
    local res, code = http.request(BASE .. query)
    if code ~= 200 then return false end
    while true do
        mSleep(1000)
        if isFileExist(RESULT) then
            local r = readFileString(RESULT)
            if r == "1" then return true, res end
            if r == "0" then return false, res end
            -- "2" means keep waiting
        end
    end
end

-- Create an instance
if VBox("newRecord") then toast("Instance created", 2) end

-- Current instance name
local ok, name = VBox("getCurrentRecordName")

-- Switch to a specific instance
VBox("setRecord&recordName=2020-07-03-21-24-13-52")

-- Export every instance (without Keychain, safe to move to another device)
VBox("exportData&exportKeychain=0")

Tip

Where getCurrentRecordName returns the name depends on the build. If the response body comes back empty, use getAllRecordNames to write the list to a file and read it from there.

For usage, see the VBox user guide.

Note

The interface and supported systems may change with updates. Back up important data before cleaning, resetting or deleting anything.