Turn on Enable HTTP script commands in RAZER's script settings.
RAZER must be in the foreground before every command:
lua
runApp("razer")mSleep(3 * 1000)
Return values
Commands return synchronously — the HTTP response is the JSON itself:
json
{"retcode": 1, "msg": "result description"}
The same data is written to /var/mobile/zorroresult.plist. When you call getcurrentrecordparam, that file gains an extra data node holding the parameters.
retcode
Meaning
1
Completed successfully
0
Execution error
2
Running (result file only; HTTP never returns this)
GET http://127.0.0.1:8844/cmd?fun=setparam&fakeapps=com.z.go1,com.z.go2&backupapps=com.z.go1,com.z.go2
Parameter
Notes
fakeapps
Bundle IDs of apps to spoof without backing up, comma-separated. These are the apps with a black checkmark in the app
backupapps
Bundle IDs of apps to spoof and back up, comma-separated. These are the apps with a red checkmark in the app
Next record
GET http://127.0.0.1:8844/cmd?fun=nextrecord
Activate a specific record
GET http://127.0.0.1:8844/cmd?fun=activerecord&record=record-id
Parameter
Required
Notes
record
Yes
Record ID. URL-encode it if it contains non-ASCII characters
Delete a specific record
GET http://127.0.0.1:8844/cmd?fun=deleterecord&record=record-id
Parameter
Required
Notes
record
Yes
Record ID
Get every record name
GET http://127.0.0.1:8844/cmd?fun=getallrecords
Get the current record name
GET http://127.0.0.1:8844/cmd?fun=getcurrentrecord
Set the current record's coordinates
GET http://127.0.0.1:8844/cmd?fun=setcurrentrecordlocation&location=longitude,latitude
Parameter
Required
Notes
location
Yes
Format longitude,latitude or longitude_latitude, for example 121.4997,31.2394
Clear the current record's coordinates
GET http://127.0.0.1:8844/cmd?fun=clearcurrentrecordlocation
Reset coordinates from the current IP
GET http://127.0.0.1:8844/cmd?fun=resetlocationbyip
Re-sets the current record's coordinates from your current network IP.
Get the current record's parameters
GET http://127.0.0.1:8844/cmd?fun=getcurrentrecordparam
The parameters are written to the data node of /var/mobile/zorroresult.plist. The parameter names you get here can be used directly with the change command below.
Set the current record's parameters
GET http://127.0.0.1:8844/cmd?fun=change&idfa=AFF18523-B306-4E04-BB4D-2DD6CE48C694&idfv=ADF28523-B306-4E04-BB4D-2DD6CE48C694&os=12.1.3&product=iPhone9%2C2&remark=xxxx
Pass only the parameters you want to change. Anything you omit stays as it is.
Values must be URL-encoded — iPhone9,2 becomes iPhone9%2C2, for example.
Parameter
Notes
name
Device name, mapped to DeviceName, e.g. xxxx iPhone
os
iOS version such as 11.2.6, mapped to SystemVersion. Also resets SystemBuildVersion, Safari and related parameters
idfa
Mapped to AdvertisingIdentifier
idfv
Mapped to IdentifierForVendor
product
Product type such as iPhone8,1, mapped to ProductType. Also resets HWModel, screen resolution and related parameters
UniqueDeviceID
UDID. Only useful for enterprise apps that call private APIs
remark
A note. Shown under the record in the list, same as adding a note by swiping left in the app
These are the officially documented parameters; others will be added later.
Restart the service
GET http://127.0.0.1:8844/cmd?fun=rebootservice
Restarts RAZER's background service.
Lua example (TouchSprite)
lua
local sz = require("sz")local http = require("szocket.http")local BASE = "http://127.0.0.1:8844/cmd?fun="-- URL encoding (needed for non-ASCII characters, commas and so on)function urlEncode(s) s = string.gsub(s, "([^%w%.%- ])", function(c) return string.format("%%%02X", string.byte(c)) end) return string.gsub(s, " ", "+")end-- Unified call: returns retcode plus the full JSONfunction RAZER(query) local res, code = http.request(BASE .. query) if code ~= 200 then return nil end local r = sz.json.decode(res) return r.retcode, rend-- Launch (required before any command)runApp("razer")mSleep(3 * 1000)-- 1. Choose apps: WeChat is spoofed only, Alipay is spoofed and backed upRAZER("setparam&fakeapps=com.tencent.xin&backupapps=com.alipay.iphoneclient")-- 2. Resetlocal ret, r = RAZER("newrecord")if ret == 100 then toast("Not activated, or the license expired", 2)elseif ret ~= 1 then toast("Reset failed: " .. tostring(r and r.msg), 2)end-- 3. Change the current record's parameters (values must be URL-encoded)RAZER("change&os=" .. urlEncode("12.1.3") .. "&product=" .. urlEncode("iPhone9,2") .. "&remark=" .. urlEncode("wechat001"))-- 4. Set the coordinatesRAZER("setcurrentrecordlocation&location=121.4997661114,31.2394855667")-- 5. Activate a specific recordRAZER("activerecord&record=" .. urlEncode("wechat001"))