local su = newShell(true) local err = su.su() if err:find('%S') then error(err) end local format = string.format local function tap(x, y) return su.cmd(format('input tap %d %d', x, y)) end local function swipe(startX, startY, endX, endY) return su.cmd(format('input swipe %d %d %d %d', startX, startY, endX, endY)) end gg.setVisible(false) gg.sleep(200) local x = device.x local y = device.y / 2 tap(564,976) --[[swipe(0, y, x, y, 500) -- 由左向右滑动屏幕 gg.sleep(1000) -- 不需要重复申请root权限 swipe(0, y, x, y, 500) -- 由左向右滑动屏幕--]]