file = {} function file.exists(FilePath) local file = io.open(FilePath, "r") if file then file:close() return true end return false end function file.write(FilePath, Content) local file = io.open(FilePath, "w") if file then file:write(Content) file:close() return true end return false end function file.read(FilePath) local file = io.open(FilePath, "r") if file then local Content = file:read("*all") file:close() return Content end return nil end function WriteLog(Content) if Content == nil or Content == '' then gg.alert('WriteLog > Content == nil', 'return false') return false end if WriteLog_Path == nil or WriteLog_Path == '' then gg.alert('WriteLog > WriteLog_Path == nil', 'return false') return false end local path = WriteLog_Path..'..启动日志.cfg' if file.exists(path) then local content = file.read(path) local Content = content..'\n'..os.date("%H:%M:%S")..' > '..Content file.write(path, Content) else file.write(path, '\n\n'..Content) end end WriteLog_Path = '/storage/emulated/0/FuHong/Temp/' local KJ = {} local ti = gg.getTargetInfo() if not ti then ti = {} end gg.x64 = ti.x64 == true gg.x32 = ti.x64 ~= true local x64 = ti.x64 == true local x32 = ti.x64 ~= true KJ['进程名称'] = tostring(ti['label']) KJ['Version'] = tostring(ti['versionName']) KJ['进程包名'] = tostring(ti['packageName']) KJ['模块路径'] = tostring(ti['nativeLibraryDir']) KJ['PID'] = tostring(ti['pid']) KJ['UID'] = tostring(ti['uid']) KJ['x64'] = ti['x64'] == true KJ['x32'] = ti['x32'] == true WriteLog('\n====================\n'..os.date("%Y-%m-%d %H:%M:%S")..'启动日志:\n\n'..tostring(KJ)) gg.sleep(120) WriteLog('云模块加载成功')