用adb安装程序,和在电脑和设备之间传文件
Android系统应用程序路径:/system/app/ (把新编译出来的apk存入到android系统目录下,存入成功会自动安装该apk并覆盖之前版本)
Android数据库路径:/data/data/com.android.providers.media/databases/ 比如external.db就放在这里
手机->PC->手机,具体步骤如下
1、获得root权限:adb root
2、设置/system为可读写:adb remount
3、将文件复制到PC:adb pull /system/etc/hosts 文件名
4、修改PC机上文件
5、将PC机上文件复制到手机:adb push 文件名 /system/lib
但在第五步时,有的人会报 out of memory的错误
这是因为直接用命令行启动,而没加一个参数造成的,所以用下面这个命令来启动就行了
$emulator -avd youravdname -partition-size 128 (没遇见此问题,先记录着。)
The "adb" tool also offers you commands to copy files into and from the connected Android emulator or devices.
*1) The "adb push <local> <remote>" copies a file or folder from the local system to the remote emulator or device.
Example 1 - Copying "Silk-Road.jpg" to the /sdcard/Picture folder in the emulator:
C:\local\android-sdk-windows\platform-tools>adb push \abc\Pictures\Silk-Road.jpg /sdcard/Picture
*2) The "adb pull <remote> <local>" copies a file or folder from the remote emulator or device to the local system.
Example 2 - Copying "init.rc" from the / folder in the emulator to local:
C:\local\android-sdk-windows\platform-tools>adb pull /init.rc \abc
Example 3 - Copying all files from the /data/data folder in the emulator to local:
C:\local\android-sdk-windows\platform-tools>adb pull /data/app \abc\app