是否有 ADB 命令来启用/禁用移动数据?(根设备) [英] Is there an ADB command to enable/disable mobile data?(Rooted Device)

查看:40
本文介绍了是否有 ADB 命令来启用/禁用移动数据?(根设备)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个 adb shell 命令来启用/禁用移动数据.该应用程序仅在有 root 权限的设备上进行测试,因此我拥有 adb root 权限.我环顾四周,发现可以通过以下方式启用/禁用 wifi:

I'm looking for an adb shell command to enable/disable mobile data. The app is only being tested on rooted devices so I have adb root privileges. I looked around and found that wifi can be enabled/disabled with:

$ adb shell svc wifi enable
$ adb shell svc wifi disable

这些对我有用,但我找不到移动数据的任何内容.

These work for me but I wasn't able to find anything for mobile data.

对可以执行的 adb shell svc 命令列表的任何引用也将不胜感激.我知道有一个来自 this question 的关键输入命令列表,显然我知道开发者页面,但没有提到 svc.

Any reference to a list of adb shell svc commands that can be performed would be appreciated as well. I know there's a list of key input commands from this question and obviously I'm aware of the developer page but there's no mention of svc.

最后,什么是 svc?

Lastly, what is svc?

推荐答案

我找到了问题的答案:

启用移动数据:

$ adb shell svc data enable

要禁用移动数据:

$ adb shell svc data disable

这篇关于是否有 ADB 命令来启用/禁用移动数据?(根设备)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆