背景:在对接一些厂家的时候,需要修改hosts将域名和Host在电视端进行设置,记录一下
操作如下:
1、获得root权限:adb root
2、设置/system为可读写:adb remount
3、将hosts文件复制到PC:adb pull /system/etc/hosts e:/hosts
4、修改PC机上文件
5、将PC机上文件复制到手机:adb push e:/hosts /system/etc/hosts
用文本文件将hosts文件打开编辑保存,示例如下
127.0.0.1 localhost
124.xxx.xxx.16 cmcc.launcher.tv
124.xxx.xxx.16 auth.cmcc.launcher.tv
124.xxx.xxx.11 cmcc-appointment.api.tv
124.xxx.xxx.22 epg.vod.api.tv
124.xxx.xxx.16 cmcc.launcher.tv