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

AWZ · API reference

AWZ is controlled through HTTP commands of the form /cmd?fun=command¶meters.

AZ tutorialsRead on siteUpdated 2026-11-01
ItemValue
On-device scriptshttp://127.0.0.1:1688/cmd?
From a computerhttp://device-LAN-IP:1688/cmd?
MethodGET
Result file/var/mobile/iggresult.txt
Parameter file/var/mobile/iggparams.txt
Record name list/var/mobile/iggrecords.txt

Before you call anything

  1. Turn on Enable HTTP script commands in AWZ Settings → Scripts.
  2. AWZ must be in the foreground before every command:
lua
runApp("AWZ")
mSleep(3 * 1000)  -- First launch verifies the license online; waiting 3 seconds is safe

Return values

The call returns JSON directly:

json
{"result": 1}

The same value is written to /var/mobile/iggresult.txt, and both always agree:

ValueMeaning
1Completed
2Running, not finished yet
3Reset succeeded but the IP address is a duplicate (newrecord only)
4Reached the last record (nextrecord only)
0Execution error
10Runtime environment error
100Product not activated, or the license expired

Endpoint list

FunctionCommand
Resetnewrecord
Next recordnextrecord
Activate a specific recordactiverecord
Activate the first / last recordactivefirstrecord · activelastrecord
Disable / re-enable a recorddisablerecord · enablerecord
Delete a specific recorddeleterecord
Clear every recorddeleteallrecords
Slim a specific recordthinrecord
Export a specific recordexportrecord
Export every recordexportallrecords
Import a record directlyimportdirect
Import a record in compatibility modeimportcompatible
Import an NZT recordimportnzt
Rename the current recordrenamecurrentrecord
Set / clear the current record's coordinatessetcurrentrecordlocation · clearcurrentrecordlocation
Get / set the current record's parametersgetcurrentrecordparam · setcurrentrecordparam
Get every record namegetallrecordnames
Clean App Store datacleanappstore
Uninstall the selected appsuninstallselectedapp
Sort by timeorderbytime · orderbytimedesc

Endpoint details

All addresses below use the on-device 127.0.0.1. From a computer, substitute the device's LAN IP.

Reset

GET http://127.0.0.1:1688/cmd?fun=newrecord

Generates a new device and creates a record. A return value of 3 means the reset worked but the IP duplicates an existing record — your script can decide whether to rotate the IP and retry.

Next record

GET http://127.0.0.1:1688/cmd?fun=nextrecord

Switches to the next record. A return value of 4 means you are already on the last one.

Activate a specific record

GET http://127.0.0.1:1688/cmd?fun=activerecord&record=record-id
ParameterRequiredNotes
recordYesRecord ID

Activate the first / last record

GET http://127.0.0.1:1688/cmd?fun=activefirstrecord
GET http://127.0.0.1:1688/cmd?fun=activelastrecord

Disable / re-enable a record

GET http://127.0.0.1:1688/cmd?fun=disablerecord&record=record-id
GET http://127.0.0.1:1688/cmd?fun=enablerecord&record=record-id
ParameterRequiredNotes
recordYesRecord ID

Delete a specific record

GET http://127.0.0.1:1688/cmd?fun=deleterecord&record=record-id

Clear every record

GET http://127.0.0.1:1688/cmd?fun=deleteallrecords

Wipes every record. This cannot be undone.

Slim a specific record

GET http://127.0.0.1:1688/cmd?fun=thinrecord&record=record-id

Trims the given record to reduce the disk space it uses.

Export a specific record

GET http://127.0.0.1:1688/cmd?fun=exportrecord&record=record-id

Exports to /var/mobile/exportdata/.

Export every record

GET http://127.0.0.1:1688/cmd?fun=exportallrecords&zip=file-name
ParameterRequiredNotes
zipYesFile name of the exported archive

Exports to /var/mobile/exportdata/.

Import a record directly

GET http://127.0.0.1:1688/cmd?fun=importdirect

Put the record to import in /var/mobile/importdata/ — either an exported folder or an exported zip.

Import a record in compatibility mode

GET http://127.0.0.1:1688/cmd?fun=importcompatible

Imports from /var/mobile/importdata/ in compatibility mode, accepting either a folder or a zip. Try this when a direct import fails.

Import an NZT record

GET http://127.0.0.1:1688/cmd?fun=importnzt

Put the NZT record in /var/mobile/nztdata/. It must be an unpacked folder or an unencrypted zip.

Rename the current record

GET http://127.0.0.1:1688/cmd?fun=renamecurrentrecord&name=new-name
ParameterRequiredNotes
nameYesNew name. URL-encode it if it contains non-ASCII characters

Tip

After renaming, the new name becomes the record ID. Later commands such as activerecord must use the new name.

Set / clear the current record's coordinates

GET http://127.0.0.1:1688/cmd?fun=setcurrentrecordlocation&location=longitude_latitude_place
GET http://127.0.0.1:1688/cmd?fun=clearcurrentrecordlocation
ParameterRequiredNotes
locationYesFormat longitude_latitude_place-name. The place name is optional, for example 116.7361382365_39.8887921413_Beijing

Get / set the current record's parameters

GET http://127.0.0.1:1688/cmd?fun=getcurrentrecordparam
GET http://127.0.0.1:1688/cmd?fun=setcurrentrecordparam
  • getcurrentrecordparam: writes the current record's parameters to /var/mobile/iggparams.txt
  • setcurrentrecordparam: reads /var/mobile/iggparams.txt and applies those parameters to the current record

Correct flow: get first, edit the fields in the file, then set. See Parameter file for the format.

Get every record name

GET http://127.0.0.1:1688/cmd?fun=getallrecordnames

The list of names is written to /var/mobile/iggrecords.txt.

Clean App Store data

GET http://127.0.0.1:1688/cmd?fun=cleanappstore

If "Clean App Store" is already enabled in the app settings, a reset runs it automatically and you do not need to call this.

Uninstall the selected apps

GET http://127.0.0.1:1688/cmd?fun=uninstallselectedapp

If "Uninstall apps" is already enabled in the app settings, a reset runs it automatically and you do not need to call this.

Sort by time

GET http://127.0.0.1:1688/cmd?fun=orderbytime
GET http://127.0.0.1:1688/cmd?fun=orderbytimedesc

orderbytime sorts the record list oldest first; orderbytimedesc sorts it newest first.

Parameter file

Path: /var/mobile/iggparams.txt

  • One parameter per line, separated by chr(10)
  • The name and value are separated by a colon :
  • Call getcurrentrecordparam and open the file to see the exact format
ParameterNotes
RecordIDRecord ID, e.g. wechat001
DeviceNameDevice name, e.g. xxxx iPhone
SystemVersioniOS version number, e.g. 10.3.1
IDFAIDFA
IDFVIDFV
62short32-digit short 62 code
62long344-digit full 62 code. When setting parameters, supplying either 62short or 62long is enough
UDIDDevice UDID
IMEIDevice IMEI
SerialNumDevice serial number
MACMAC address
SSIDWi-Fi network name
BSSIDWi-Fi BSSID
OpenUDIDOpenUDID

Lua example (TouchSprite)

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

local BASE = "http://127.0.0.1:1688/cmd?fun="

-- URL encoding (needed for non-ASCII names and place names)
function urlEncode(s)
    s = string.gsub(s, "([^%w%.%- ])", function(c)
        return string.format("%%%02X", string.byte(c))
    end)
    return string.gsub(s, " ", "+")
end

-- Call a command and return its result; a value of 2 means running, so it waits
function AWZ(query)
    local res, code = http.request(BASE .. query)
    if code ~= 200 then return nil end
    local result = sz.json.decode(res).result
    while result == 2 do
        mSleep(1000)
        result = tonumber(readFileString("/var/mobile/iggresult.txt"))
    end
    return result
end

-- 1. Launch AWZ (required before any command)
runApp("AWZ")
mSleep(3 * 1000)

-- 2. Reset, retrying when the IP is a duplicate
local r = AWZ("newrecord")
if r == 3 then
    toast("IP is a duplicate, rotate your IP and retry", 2)
elseif r == 100 then
    toast("Not activated, or the license expired", 2)
elseif r ~= 1 then
    toast("Reset failed: " .. tostring(r), 2)
end

-- 3. Rename the current record (new-name becomes the record ID)
AWZ("renamecurrentrecord&name=" .. urlEncode("139xxxxxxx John"))

-- 4. Set the coordinates
AWZ("setcurrentrecordlocation&location=" .. urlEncode("116.7361382365_39.8887921413_Beijing"))

-- 5. Activate a specific record
AWZ("activerecord&record=" .. urlEncode("Wechat001"))

-- 6. Walk every record
AWZ("activefirstrecord")
while true do
    -- ... your own logic here ...
    if AWZ("nextrecord") == 4 then break end
end

For usage, see the AWZ user guide.

Note

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