Android ADB Tools-File manipulation (three)
tags (space delimited): Android ADB
5. Working with files
Command |
function |
ADB Shell LS mnt |
View all device storage device names |
ADB remount |
To re-mount the system partition as a read-write partition |
ADB push <local> <remote> |
Copy files from local to device |
ADB pull <remote> <local> |
Copy files from device to local |
ADB Shell ls |
List the files and folders under the directory |
ADB Shell CD <folder> |
Go to Folder |
ADB Shell RM [-R] <path/filename> |
Delete file (clip) |
ADB shell Cat <file> |
View File Contents |
ADB shell mkdir path/foldername |
New Folder |
View storage Device Name
Storage device names may be different due to different handset manufacturers
C:\Users\Administrator>adb shell ls mntasecmedia_rwobbsdcardsecureshell
Mount system as a read-write partition
>C:\Users\Administrator>adb remount>remount successed
Push files to your phone sdcard
such as pushing the desktop test.apk to the phone sdcard root directory
C:\Users\Administrator>adb push C:\Users\Administrator\Desktop\Test.apk /mnt/sdcard/318 KB/s (37500 bytes in 0.115s)
Copy your mobile device to your computer in Chinese
Copy the test.apk from your phone sdcard to the/aa folder on your desktop
C:\Users\Administrator>adb pull /mnt/sdcard/Test.apk C:\Users\Administrator\Desktop\aa4069 KB/s (37500 bytes in 0.009s)
List all files and directories in your mobile device
C:\USERS\ADMINISTRATOR>ADB Shell Lsacctbincacheconfigddatadefault. PropDevetcfile_contextsfirmwarefstab. qcomInitinit. Class_main. SHInit. Environ. RCInit. MDM. SHInit. MIUI. RCInit. qcom. Class_core. SHInit. qcom. Early_boot. SHInit. qcom. Factory. SHInit. qcom. RCInit. qcom. SHInit. qcom. SSR. SHInit. qcom. Syspart_fixup. SHInit. qcom. USB. RCInit. qcom. USB. SHInit. Qti. Carrier. RCInit. RCInit. Target. RCInit. Trace. RCInit. USB. RCMntpersistprocproperty_contextsresrootsbinsdcardseapp_contextssepolicystoragesyssystemtombstonesueventd. qcom. RCUeventd. RCVendor
Rename file name
C:\Users\Administrator>adb shellshell@dior:/$ cd /mnt/sdcardcd /mnt/sdcardshell@dior:/mnt/sdcard$ TestMyTestTestMyTest.apk
ADB shell enters the device
Cd/mnt/sdcard into the phone sdcard
Rename test.apk mytest.apk: rename test.apk to mytest.apk
deleting files
Delete mytest.apk
shell@dior:/mnt/sdcard$ MyTestMyTest.apk
Delete a file directory
Delete a folder
shell@dior:/mnt/sdcard$ rm -r arm -r a
Create folders and set file permissions
shell@dior:/mnt/sdcard$ mkdir testmkdir testshell@dior:/mnt/sdcard$ cd testcd testshell@dior:/mnt/sdcard$ 777Test.apk
Create test directory: mkdir Test
Set test.apk permissions: chmod 777 test.apk
Not to be continued ...
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
# Android ADB Tool-file operation (iii)