[关闭]
@AMG 2021-08-04T07:50:57.000000Z 字数 13161 阅读 40158

AMG使用指南

AMG 全息备份 一键新机 全球定位 脚本调用


1. 安装说明

支持IOS 8/9/10/11/12/13

建议测试机型:5C(无锁无ID) 刷机后系统为10.3.3,将CYDIA里的依赖包全部装好后,安装AMG,测试效果最为清楚。

其它设备由于可能存在某些冲突插件,导致闪退、清理无效等状况,不作为效果判断依据。

所测试应用请务必从苹果商店下载,其它渠道下载可能导致应用被修改或添加监测代码。

如果搞不定越狱后出现的各种情况,建议请专业的技术人员安装及调试。

官方源地址:repo.amg789.com;
官方源地址:repo.amg789.com;
官方源地址:repo.amg789.com;
官方源地址:repo.amg789.com;
官方源地址:repo.amg789.com;
官方源地址:repo.amg789.com;
官方源地址:repo.amg789.com;
官方源地址:repo.amg789.com;
官方源地址:repo.amg789.com;
官方源地址:repo.amg789.com;

安装前请先卸载其它一键新机软件或插件,否则可能影响AMG正常使用;

安装前请检查设备时间是否正确,请确保设备时间正确后再安装;

一定一定要把CYDIA里面必要的依赖包安装好,否则可能安装失败或各种错误;
一定一定要把CYDIA里面必要的依赖包安装好,否则可能安装失败或各种错误;
一定一定要把CYDIA里面必要的依赖包安装好,否则可能安装失败或各种错误;
一定一定要把CYDIA里面必要的依赖包安装好,否则可能安装失败或各种错误;
一定一定要把CYDIA里面必要的依赖包安装好,否则可能安装失败或各种错误;
一定一定要把CYDIA里面必要的依赖包安装好,否则可能安装失败或各种错误;
一定一定要把CYDIA里面必要的依赖包安装好,否则可能安装失败或各种错误;

image.png-124.5kB

CYDIA红字请自行百度或查询各大论坛以及淘宝渠道解决;

如遇闪退,先检查一下越狱状态,或多装几遍试试;

目前支持的版本有IOS 8/9/10/11/12/13,以下用IOS10举例:
image.png-151.2kB
20191223_060349_297.png-104.8kB
image.png-113.9kB
image.png-1267.1kB
image.png-45.8kB
如果源添加失败或刷新失败(还是显示旧版)或安装包下载失败请多尝试几次或尝试更换网络;

PDD专属版源地址不同,安装及购买请咨询代理商

2.61版网盘链接: https://pan.baidu.com/s/1PJOUmPY8gunAk10_XfSYeQ 提取码: ehk4

deb包安装方法

deb包安装方法:将下载好的deb包拉到CYDIA安装目录后重启(有时候要重启两遍),如果是不完美越狱的机器,请重新越狱后等待几分钟即可自动安装好
​​

看不到CYDIA安装目录的机器,进CYDIA重新安装AFC2后,重新拔插数据线连接电脑就可以看到了
​​

还有个简单点的deb包安装方法,添加雷锋源 apt.abcydia.com
搜索 filza文件管理器
然后 把deb包拉到某个自己能找到的目录
打开手机上的filza,找到那个deb文件
点击文件安装 等一会儿提示要注销设备了
注销完就安装上了
不懂的,请百度:filza安装deb

2. 使用说明

开始之前,先检查一下设置内容;
image.png-120kB
如果不需要保存记录,仅仅创建一个新的设备信息,则可将《备份数据》开关关掉;
一键新机智能飞行模式:一键新机后,自动开关一次飞行模式;
切换记录智能飞行模式:切换记录后,自动开关一次飞行模式;
首页底部的IP如果在一键新机或切换记录后未改变,则以红色字体提醒;
《伪装位置》《随机位置》开关打开状态下,每次一键新机模拟的位置会定位在全国随机范围,如果为关闭状态,则定位在最后一次设置的位置;
如果要指定位置定位,请将《随机位置》开关关闭,并手动设置所需位置(点击目标位置后后提交);
首次打开建议检查 IOS的“设置”-“隐私”--“定位”查看是否有定位权限,并设置好默认位置;
如果需要将设备伪装成iPad,可打开《伪装机型为iPad》开关;
image.png-112kB
image.png-461.4kB
网络类型建议不更改;
运营商类型目前仅有国内三大运营商,后期会不断增加。

一键新机举例:
选择要多开的应用,以下以电报为例;
image.png-51.6kB
image.png-92.9kB
勾选电报之后再返回主页,点击《一键新机》;
image.png-53kB
image.png-49.4kB
可以看到已经生成了一个以当前时间命名的空记录,所选应用会在该记录底部显示,新记录的设备信息在首页的《设备信息》选项内可以查看;

当前记录会以打钩提示,点击下一条会按顺序切换记录;
《原始机器》为空记录,点击《原始机器》作用与首页的《原始机器》按钮功能相同;
一键新机后,即可打开应用执行对应操作如注册或登录账号等;
如需伪装多个应用请在目标应用内勾选多个应用选项;

导入某NXX应用数据

image.png-42kB
如果需要导入某NXX应用的文档,可以将数据导入设备的 /var/mobile/iGrimace 文件夹(如果没有,请手动创建此文件夹),然后点击
image.png-34.4kB
提示:
还原记录前请记得在《目标应用》里勾选对应的应用
除非某个应用不能正常打开,否则不建议开启《同时导入Keychain》开关
《同时导入Keychain》开关可能导致设备无法连接,如非必要请勿打开
由于是复制文档,导入前请检查设备空间是否足够
看不到 /var/mobile/iGrimace 路径的设备,重装AFC2再拔插数据线即可看到
原本有安装NXX的设备,只要文档路径没动过,安装AMG后即可直接按操作导入

3. 脚本调用

记录文件路径:  /var/mobile/AMG/

-- AMG脚本例子 本例子仅供参考,实际运行时请根据实际情况自行调整 此处以触动精灵为例

    require "TSLib"
    local sz = require("sz");

local http = require("szocket.http");
if isFileExist(userPath().."/plugin/ts.so") == false then  --未下载 ts.so插件
    dialog("未下载 ts.so插件,进入触动,点击右下角更多,在“插件”菜单里下载官方插件ts.so", 0)
    lua_exit()
end
local ts = require("ts")
local plist = ts.plist

---------------------------------------将此段放开头-----------------------------------------

--检查AMG是否在前台
function Check_AMG()
    if isFrontApp("com.superdev.AMG") == 0 then
        runApp("com.superdev.AMG") 
        mSleep(3000) 
    end
end

--检查执行结果
function Check_AMG_Result()
    ::get_amg_result::
    mSleep(3000)         --根据所选应用数量和备份文件大小来增加等待时间,如果有开智能飞行模式,建议时间在15秒以上,当然,运行脚本时不建议开智能飞行,直接用脚本判断IP更准确
    local result_file =  "/var/mobile/amgResult.txt"
    if isFileExist(result_file) then
        local amg_result = readFileString(result_file)
        if amg_result == "0" then
            return false
        elseif amg_result == "1" then
            return true
        elseif amg_result == "2" then
            toast("执行中",1)
            goto get_amg_result
        end
    end
end




local AMG = {
    Original = (function()  --原始机器
            Check_AMG()
            local res, code = http.request("http://127.0.0.1:8080/cmd?fun=originRecord")
            if code == 200 then
                return Check_AMG_Result()
            end
        end),
    New = (function()   --一键新机
            Check_AMG()
            local res, code = http.request("http://127.0.0.1:8080/cmd?fun=newRecord")
            if code == 200 then
                return Check_AMG_Result()
            end
        end),
    Get_Name = (function()  --获取当前记录名称
            Check_AMG()
            local res, code = http.request("http://127.0.0.1:8080/cmd?fun=getCurrentRecordName")
            if code == 200 then
                if Check_AMG_Result() == true then
                    return res
                end
            end
        end),
    Next = (function()  --下一条
            Check_AMG()
            local res, code = http.request("http://127.0.0.1:8080/cmd?fun=nextRecord");
            if code == 200 then
                return Check_AMG_Result()
            end
        end),
    First = (function() --还原第一条记录
            Check_AMG()
            local res, code = http.request("http://127.0.0.1:8080/cmd?fun=firstRecord");
            if code == 200 then
                return Check_AMG_Result()
            end
        end),
    Get_Param = (function() --获取当前记录参数并保存到指定文件夹
            Check_AMG()
            local param_file = userPath().."/lua/AMG_Param.plist"   --此处可自行修改保存路径和文件名
            if isFileExist(param_file) then delFile(param_file) end
            local res, code = http.request("http://127.0.0.1:8080/cmd?fun=getCurrentRecordParam&saveFilePath="..param_file);
            if code == 200 then
                if Check_AMG_Result() == true then
                    return param_file
                end
            end 
        end),
    Set_Param = (function(param_file)  --设置当前记录参数
            Check_AMG()
            local res, code = http.request("http://127.0.0.1:8080/cmd?fun=setCurrentRecordParam&filePath="..param_file);
            if code == 200 then
                return Check_AMG_Result()
            end 
        end),
    Get_Spec_Param = (function(record_name) --获取指定记录参数并保存到指定文件夹
            Check_AMG()
            local param_file = userPath().."/lua/AMG_Param.plist"   --此处可自行修改保存路径和文件名
            if isFileExist(param_file) then delFile(param_file) end
            local res, code = http.request("http://127.0.0.1:8080/cmd?fun=getRecordParam&recordName="..record_name.."&saveFilePath="..param_file);
            if code == 200 then
                if Check_AMG_Result() == true then
                    return param_file
                end
            end 
        end),
    Set_Spec_Param = (function(record_name,param_file)  --设置指定记录参数
            Check_AMG()
            local res, code = http.request("http://127.0.0.1:8080/cmd?fun=setRecordParam&recordName="..record_name.."&filePath="..param_file);
            if code == 200 then
                return Check_AMG_Result()
            end 
        end),
    Get_All_Record = (function()  --获取所有记录名称并写入指定文件
            Check_AMG()
            local all_record_file = userPath().."/lua/AMG_All_Record.plist"     --此处可自行修改保存路径和文件名
            if isFileExist(all_record_file) then delFile(all_record_file) end
            local res, code = http.request("http://127.0.0.1:8080/cmd?fun=getAllRecordNames&saveFilePath="..all_record_file);
            if code == 200 then
                if Check_AMG_Result() == true then
                    return all_record_file
                end
            end 
        end),
    Recover = (function(record_name)  --还原指定记录
            Check_AMG()
            local res, code = http.request("http://127.0.0.1:8080/cmd?fun=setRecord&recordName="..record_name);
            if code == 200 then
                return Check_AMG_Result()
            end
        end),
    Rename = (function(old_name,new_name)  --重命名
            Check_AMG()
            local res, code = http.request("http://127.0.0.1:8080/cmd?fun=setRecordName&oldName="..old_name.."&newName="..new_name);
            if code == 200 then
                return Check_AMG_Result()
            end
        end),
    Delete = (function(record_name)  --删除指定记录
            Check_AMG()
            local res, code = http.request("http://127.0.0.1:8080/cmd?fun=deleteRecord&recordName="..record_name);
            if code == 200 then
                return Check_AMG_Result()
            end
        end),
    Delete_All = (function()  --删除所有记录
            Check_AMG()
            local res, code = http.request("http://127.0.0.1:8080/cmd?fun=deleteAllRecords");
            if code == 200 then
                return Check_AMG_Result()
            end
        end),
    Disable = (function(record_name)  --禁用指定记录
            Check_AMG()
            local res, code = http.request("http://127.0.0.1:8080/cmd?fun=disableRecord&recordName="..record_name);
            if code == 200 then
                return Check_AMG_Result()
            end
        end),
    Enable = (function(record_name)  --启用指定记录
            Check_AMG()
            local res, code = http.request("http://127.0.0.1:8080/cmd?fun=enableRecord&recordName="..record_name);
            if code == 200 then
                return Check_AMG_Result()
            end
        end),
    Disable_All = (function()  --禁用所有记录
            Check_AMG()
            local res, code = http.request("http://127.0.0.1:8080/cmd?fun=disableAllRecord");
            if code == 200 then
                return Check_AMG_Result()
            end
        end),
    Enable_All = (function()  --启用所有记录
            Check_AMG()
            local res, code = http.request("http://127.0.0.1:8080/cmd?fun=enableAllRecord");
            if code == 200 then
                return Check_AMG_Result()
            end
        end)
}


---------------------------------------将此段放开头-----------------------------------------



--以下为脚本运行示例

if AMG.Original() == true then
    toast("原始机器", 3)
end

--一键新机
if AMG.New() == true then
    toast("一键新机", 3)
end

--还原第一条记录
if AMG.First() == true then
    toast("还原第一条记录", 3)
end

--还原指定记录
local record_name = "A10086"    --可以通过多种方式获取指定记录,此记录必须存在
if AMG.Recover(record_name) == true then
    toast("已切换至"..record_name.."记录", 3)
end

--下一条
if AMG.Next() == true then
    toast("下一条", 3)
end

--获取当前记录名
local record_name = AMG.Get_Name()
if record_name then
    toast("当前记录名称:"..record_name, 3)
end

--重命名当前记录名
local old_name = AMG.Get_Name()
local new_name = "A1001"
if AMG.Rename(old_name,new_name) == true then
    toast("重命名当前记录 "..old_name.." 为 "..new_name, 3)
end

--重命名指定记录
local old_name = "2018-11-11-11-11-11-11"   --可以通过多种方式获取指定记录,此记录必须存在
local new_name = "A10010"
if AMG.Rename(old_name,new_name) == true then
    toast("重命名 "..old_name.." 为 "..new_name, 3)
end

--下一条并检查是否最后一条
if AMG.Next() == true then
    if AMG.Get_Name() == "原始机器" then
        toast("最后一条", 3)
    end
end

--获取所有记录名
local all_record_file = AMG.Get_All_Record()
if all_record_file then
    toast("已获取所有记录名称并保存到"..all_record_file, 3)
end

--删除指定记录
local record_name = "2018-11-11-11-11-11-11"   --可以通过多种方式获取指定记录,此记录必须存在
if AMG.Delete(record_name) == true then
    toast("已删除"..record_name.."记录", 3)
end

--删除所有记录  不删除当前记录
if AMG.Delete_All() == true then
    toast("删除所有记录,保留当前记录", 3)
end

--原始机器后删除所有记录
if AMG.Original() == true then
    if AMG.Delete_All() == true then
        toast("删除所有记录", 3)
    end
end

--获取当前记录参数保存到触动脚本文件夹  返回的是文件路径
local param_file = AMG.Get_Param()
if param_file then
    toast("获取成功,参数文件路径:"..param_file, 3)
    mSleep(3000)
    local amg_param = plist.read(param_file)
    local devicetoken = amg_param["DeviceToken"]  --读取DeviceToken参数
    if devicetoken then toast("获取当前记录devicetoken = "..devicetoken, 3) end  --打印devicetoken
end

--设置当前记录参数 传入文件路径
local param_file = AMG.Get_Param()    --先获取当前记录参数
if param_file then
    --toast("获取成功,参数文件路径:"..param_file, 3)
    local amg_param = plist.read(param_file)
    local param_name = "DeviceToken"
    local param_value = "12345678900000000"
    amg_param[param_name] = param_value
    plist.write(param_file,amg_param)   --写入参数
    if AMG.Set_Param(param_file) == true then
        toast("设置当前记录参数"..param_name.."值为"..param_value,3)
    end
end

--设置当前记录GPS
local lon = "121.4997661114"
local lat = "31.2394855667"
local param_file = AMG.Get_Param()    --先获取当前记录参数
if param_file then
    --toast("获取成功,参数文件路径:"..param_file, 3)
    local amg_param = plist.read(param_file)
    amg_param["Longitude"] = lon
    amg_param["Latitude"] = lat
    plist.write(param_file,amg_param)   --写入参数
    if AMG.Set_Param(param_file) == true then
        toast("设置当前记录GPS位置为".."经度:"..lon.."纬度:"..lat,3)
    end
end

--获取指定记录参数保存到触动脚本文件夹  返回的是文件路径
local record_name = "2018-11-11-11-11-11-11"   --可以通过多种方式获取指定记录,此记录必须存在
local param_file = AMG.Get_Spec_Param(record_name)
if param_file then
    toast("获取成功,参数文件路径:"..param_file, 3)
    local amg_param = plist.read(param_file)
    local devicetoken = amg_param["DeviceToken"]  --读取DeviceToken参数
    if devicetoken then toast("获取"..record_name.."记录 devicetoken = "..devicetoken, 3) end  --打印devicetoken
end

--设置指定记录参数 传入记录名、文件路径
local record_name = "2018-11-11-11-11-11-11"   --可以通过多种方式获取指定记录,此记录必须存在
local param_file = AMG.Get_Spec_Param(record_name)    --先获取指定记录参数
if param_file then
    --toast("获取成功,参数文件路径:"..param_file, 3)
    local amg_param = plist.read(param_file)
    local param_name = "DeviceToken"
    local param_value = "12345678900000000"
    amg_param[param_name] = param_value
    plist.write(param_file,amg_param)   --写入参数
    if AMG.Set_Spec_Param(record_name,param_file) == true then
        toast("设置"..record_name.."记录参数"..param_name.."值为"..param_value,3)
    end
end

--禁用指定记录
if AMG.Disable(record_name) == true then
    toast("已禁用"..record_name.."记录", 3)
end

--启用指定记录
if AMG.Enable(record_name) == true then
    toast("已启用"..record_name.."记录", 3)
end

--禁用所有记录
if AMG.Disable_All() == true then
    toast("已禁用所有记录", 3)
end

--启用所有记录
if AMG.Enable_All() == true then
    toast("已启用所有记录", 3)
end

--设置机型版本
--设置开关
function Set_AMG_Config(key,valus)
    local config_file = "/private/var/mobile/Library/Preferences/AMG/config.plist"
    local amg_config = plist.read(config_file)
    amg_config[key] = valus
    plist.write(config_file,amg_config)
end
--设置当前设备机型
function Set_Device_Model(iphone_model)
    if iphone_model ~= nil then
        Set_AMG_Config("fakeDeviceModel","1")
    else
        Set_AMG_Config("fakeDeviceModel","0")
    end
    local param_file = AMG.Get_Param()    --先获取当前记录参数
    if param_file then
        local amg_param = plist.read(param_file)
        local param_name = "Model"
        local param_value = "nil"
        if iphone_model ~= nil then
            param_value = iphone_model
        end
        amg_param[param_name] = iphone_model
        plist.write(param_file,amg_param)   --写入参数
        if AMG.Set_Param(param_file) == true then
            toast("设置当前记录参数"..param_name.."值为"..param_value,3)
        end
    end
end
--设置当前系统版本
function Set_SyetemVer(ios_ver)
    if ios_ver ~= nil then
        Set_AMG_Config("fakeSystemVer","1")
    else
        Set_AMG_Config("fakeSystemVer","0")
    end
    local param_file = AMG.Get_Param()    --先获取当前记录参数
    if param_file then
        local amg_param = plist.read(param_file)
        local param_name = "SystemVer"
        local param_value = "nil"
        if ios_ver ~= nil then
            param_value = ios_ver
        end
        amg_param[param_name] = ios_ver
        plist.write(param_file,amg_param)   --写入参数
        if AMG.Set_Param(param_file) == true then
            toast("设置当前记录参数"..param_name.."值为"..param_value,3)
        end
    end
end

--机型对照表:iPhone 4, iPhone 4s, iPhone 5c, iPhone 5, iPhone 6, iPhone 6 Plus, iPhone 6s, iPhone 6s Plus, iPhone 7, iPhonse Plus, iPhone 8, iPhone 8 Plus, iPhone X, iPhone Xr, iPhone Xs, iPhone Xs Max
--例:
--设置当前机型为iPhone X
local iphone_model = "iPhone X"
local ios_ver = "12.1.2"

--还原当前机型
local iphone_model = nil
local ios_ver = nil

Set_Device_Model(iphone_model)
Set_SyetemVer(ios_ver)

4. 常见问题

重申:
安装前请先卸载其它一键新机软件或插件,否则可能影响AMG正常使用;
更新CYDIA里面必要的依赖包;
CYDIA红字请自行百度或查询各大论坛以及淘宝渠道解决;
如遇闪退,先检查一下越狱状态,或多装几遍试试;
部分应用闪退可能是反越狱检测或DeviceToken伪装引起的,可尝试关闭部分开关
建议关闭IOS的“设置”-“通用”-“后台应用程序刷新”,不要问为什么
不要用物联网卡(纯流量卡)做项目,使用前先问清楚卡的具体情况
碰到在APP内部提示“AMG已过期”,打开AMG设置里面的自动获取外网IP,推掉AMG后台再打开AMG,就不会提示了
有问题请向代理商反馈

5. 更新日志

11-16,增加脚本调用命令,增加iPad机型伪装,增强伪装和清理效果
11-17,增加部分脚本命令
11-21,更新1.1.3,修复部分BUG,优化定位
11-28,更新1.1.4,增加智能偏移位置,打开后可在每次一键新机及切换记录时随机偏移
12-2,更新1.2,增加NXX记录导入功能
12-5,更新1.21,增强伪装和清理效果
12-16,更新1.22,更换授权验证
12-22,更新1.23,增加手动重命名菜单,增强伪装效果,修复部分BUG
12-31,更新1.24,增强伪装效果
1-16,更新1.2.6,增强伪装效果,新增伪装系统版本号开关,新增还原默认设置按钮
2-3,更新1.2.7,增强伪装效果,新增备份/还原Keychain开关
3-19,更新1.2.8,增强伪装效果,新增《禁用/启用》备份记录功能
3-21,更新1.2.9,你懂的
4-5,更新1.2.10,修复部分BUG,增加全部禁用/全部启用脚本命令,兼容IOS11
4-21,更新1.2.11,修复部分IOS11BUG,新增伪装机型和IOS版本
5-7,更新1.3.1,更换源地址,修复10.0-10.2部分APP丢失登录状态BUG,修复部分IOS11BUG,增加IOS12系统支持,新增PDD专属版(源地址不同,请咨询代理商安装及购买)
5-15,更新1.3.2,修复部分BUG
6-15,更新1.3.3,修复部分bug
7-1,更新1.3.4,修复IOS11排序问题
7-12,更新1.3.6,添加运营商代码
10-5,更新1.3.9,增强伪装和清理效果
10-24,更新1.4,修复部分系统排序问题
11-5,更新1.4.1,增加备份导入导出功能
12-10,更新1.4.3,增强伪装和清理效果
5-18,更新2.1.1,修复已知BUG,增强伪装和清理效果
7-01,更新2.3.3,修复已知BUG,增强伪装和清理效果
8-01,更新2.3.4,修复已知BUG,增强伪装和清理效果

6. 购买授权

每台设备有24小时试用期;
请联系代理商购买授权;
注意选择可靠有保证的代理商。

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注