Android transfers files between mobile phones and computers through adb pull and adb push

1. You can refer to this article

https://www.cnblogs.com/hhddcpp/p/4247923.html

2. According to the above article, I made the following modifications

//设置/system为可读写:
adb remount
//复制手机中的文件到电脑中。需要在电脑中新建一个文件夹,我新建的文件夹为ce文件夹
adb pull /system/etc/hosts E:\ce
//然后你会发现ce文件夹中多了一个hosts文件,是的,复制成功了
//这个时候,修改hosts文件中的内容。修改完以后,执行下一条指令,也就是上传电脑中的文件到手机
//现在是上传电脑中的文件到手机中
adb push  E:\ce\hosts   /system/etc/hosts
//这时候你去手机中看hosts文件会发现修改成功了

3. Look at the pictures
insert image description here
insert image description here

Guess you like

Origin blog.csdn.net/qq_36570506/article/details/131791083