Android R上curl和wget等无法使用的解决办法
1.问题
sh脚本文件中使用到了curl和get,在编译的时候出现了异常
11:00:44 Disalloed PATH tool "curl" used: xxx ... ...
11:00:44 See https://android.googlesource./platform/build/+/master/Changes.md#PATH_Tools for more information.
...
11:00:44 Disalloed PATH tool "get" used: xxx ... ...
11:00:44 See https://android.googlesource./platform/build/+/master/Changes.md#PATH_Tools for more information.
...
"curl" is not alloed to be used. See https://android.googlesource./platform/build/+/master/Changes.md#PATH_Tools for more information.
"get" is not alloed to be used. See https://android.googlesource./platform/build/+/master/Changes.md#PATH_Tools for more information.
2.原因
Android Q 版本的限制
3.解决
在build/soong/ui/build/paths/config.go中把需要用到的curl、get等命令加入白名单
var Configuration = map[string]PathConfig{
"bash": Alloed,
"dd": Alloed,
....
"unzip": Alloed,
"zip": Alloed,
"curl": Alloed, // add
"get": Alloed, // add
....
}
加上这个白名单后,还是会报异常
get: missing URL
Usage: get [OPTION]... [URL]...
还需要在BoardConfig.mk中加上
BUILD_BROKEN_USES_NETWORK := true
TEMPORARY_DISABLE_PATH_RESTRICTIONS := true
PS.get是一款免费的工具,用于从网上自动下载文件,它在带宽非常窄,网络不稳定的情况下,具有很强的适应性。
curl命令是一个功能强大的网络工具,它能够通过http、ftp等方式下载文件,也能够上传文件,支持HTTPS等众多协议,
还支持POST、cookies、认证、从指定偏移处下载部分文件、用户代理字符串、限速、文件大小、进度条等特征。
空调维修
- 温岭冰箱全国统一服务热线-全国统一人工【7X2
- 荆州速热热水器维修(荆州热水器维修)
- 昆山热水器故障码5ER-昆山热水器故障码26
- 温岭洗衣机24小时服务电话—(7X24小时)登记报
- 统帅热水器售后维修服务电话—— (7X24小时)登
- 阳江中央空调统一电话热线-阳江空调官方售后电
- 乌鲁木齐阳春燃气灶厂家服务热线
- 珠海许昌集成灶售后服务电话-全国统一人工【
- 乌鲁木齐中央空调维修服务专线-乌鲁木齐中央空
- 新沂热水器故障电话码维修-新沂热水器常见故障
- 诸城壁挂炉24小时服务热线电话
- 靖江空调24小时服务电话-——售后维修中心电话
- 空调室外滴水管维修(空调室外排水管维修)
- 九江壁挂炉400全国服务电话-(7X24小时)登记报修
- 热水器故障码f.22怎么解决-热水器f0故障解决方法
- 营口热水器售后维修服务电话—— 全国统一人工