VBox Buy a license
Back to home

Scripting

VBox HTTP scripting

Keep VBox in the foreground while calling commands. Read /var/mobile/VBoxResult.txt for the result: 1 means success, 0 failure and 2 still running. Wait one second between reads while the result is 2.

ActionRequest
Create a profilehttp://127.0.0.1:8080/cmd?fun=newRecord
Restore original profilehttp://127.0.0.1:8080/cmd?fun=originRecord
Restore next profilehttp://127.0.0.1:8080/cmd?fun=nextRecord
Restore first profilehttp://127.0.0.1:8080/cmd?fun=firstRecord
Activate a profilehttp://127.0.0.1:8080/cmd?fun=setRecord&recordName=2020-07-03-21-24-13-52
Delete a profilehttp://127.0.0.1:8080/cmd?fun=deleteRecord&recordName=2020-07-03-21-24-13-52
Delete all profileshttp://127.0.0.1:8080/cmd?fun=deleteAllRecords
Export profile parametershttp://127.0.0.1:8080/cmd?fun=getRecordParam&recordName=2020-07-03-21-24-13-52&saveFilePath=/var/mobile/test.plist
Get current profile namehttp://127.0.0.1:8080/cmd?fun=getCurrentRecordName
Get current parametershttp://127.0.0.1:8080/cmd?fun=getCurrentRecordParam&saveFilePath=/var/mobile/test.plist
List profile nameshttp://127.0.0.1:8080/cmd?fun=getAllRecordNames&saveFilePath=/var/mobile/record.txt
Rename a profilehttp://127.0.0.1:8080/cmd?fun=setRecordName&oldName=2020-07-03-21-24-13-52&newName=2020
Set profile parametershttp://127.0.0.1:8080/cmd?fun=setRecordParam&recordName=2020-07-03-21-24-13-52&filePath=/var/mobile/test.plist
Set current parametershttp://127.0.0.1:8080/cmd?fun=setCurrentRecordParam&filePath=/var/mobile/test.plist
Export backupshttp://127.0.0.1:8080/cmd?fun=exportData&exportKeychain=0
Import backupshttp://127.0.0.1:8080/cmd?fun=importData&importKeychain=0

The current, disabled or nonexistent profile cannot be selected with setRecord. Disabled profiles and the original profile cannot be renamed. Parameter commands require the file paths shown above.

Each exported tar archive represents a profile and is stored in /var/mobile/VBox_export. Place archives in that directory before importing. Use exportKeychain=0 and importKeychain=0 for transfers between devices or system versions because Keychain data is not portable and may cause activation problems. The supplied source repeats 0 for same-device exports as well; this guide preserves that value rather than inferring a different setting.