當前位置:首頁 » 安卓系統 » android命令

android命令

發布時間: 2022-01-08 21:28:29

㈠ 怎麼查看android命令的使用

在上圖中,除了最後一個紅色的方框,其它方框都是adb shell下的命令。

【1】在Android程序中,一般創建的資料庫存放在 /data/data/[應用程序包名]/databases 的目錄下。

【2】cd 命令:文件夾跳轉命令。ls 命令:查看某個文件夾下面有哪些文件。

【3】使用 "sqlite3 [資料庫名稱] " 命令來對某資料庫進行一系列的操作。

【4】在經過第【3】步驟後,可以使用 .tables 命令查看某資料庫中包含哪些表。若要查詢某表中包含的數據,在 sqlite> 命令後輸入查詢的SQL語句即可查詢,但要注意的是要以分號[;]來結束該語句的輸入。

【5】若在命令行中輸入 adb shell 後,提示:adb不是內部或外部命令,也不是可運行的程序,或批處理文件,遇到這種情況是由於環境變數沒有設置好的問題導致的。解決方法:在安裝的Android sdk 包目錄下的找到adb工具所在目錄,一般是在...android-sdk-windows ools目錄或者在...android-sdk-windowsplatform-tools目錄下。把該目錄添加到path環境變數中就OK了。

轉載

㈡ android命令行在哪

二進制命令文件或執行腳本存放路徑
/system/bin
/system/xbin
可通過busybox安裝工具進行擴展(需取得root許可權)
執行命令行常用的方式
1.Better Terminal軟體
打開軟體界面,輸入命令行如,
cal 2012 顯示2012年日歷 cd /mnt/sdcard 切換路徑至內存卡 mkdir file 建立一個名為
file 的文件夾 touch aaa.txt 新建一個名為aaa的文本文檔......
2.ADB工具
打開ADB工具所在的上層目錄,單擊該文件夾在菜單中選擇「在此處打開命令行」
然後執行adb devices(確保手機調試模式已打開)列出設備(模擬器)序列號
再輸入adb shell進入shell命令執行界面,命令以$(如root後是#)開頭
輸入命令行如,
cal 2012 顯示2012年日歷 cd /mnt/sdcard 切換路徑至內存卡 mkdir file 建立一個名為
file 的文件夾 touch aaa.txt 新建一個名為aaa的文本文檔......
輸入clear清屏,輸入exit退出root登錄,再輸入exit退出shell界面

㈢ android 怎麼打開命令行

打開cmd,用cd/d將路徑轉移到你的SDK下platform-tools目錄下再執行即可

㈣ 安卓命令有哪些

安卓Android命令:
主要介紹幾個特有的。
getprop 返回Android的所有系統屬性。
getevent 列印所有的鍵盤和觸摸事件
logcat 輸出日誌
printenv 系統環境變數
am 運行start/broadcast/instrument(instrument可以運行自動化測試代碼,其它的還沒有試過),從 android的命令行開始。

首先是獲取root許可權
手機必須先root ,沒有root的話可以下載刷機精靈root (某些刷機精靈沒辦法root的手機,問網路吧)
adb shell//進入手機的超級終端
su//以管理員身份運行

查看sdcard文件
cd XXX //進入文件夾
cd.. //返回上一層
ls //列表顯示當前文件夾內容

卸載軟體
一般軟體卸載
adb uninstall 包名
系統軟體卸載
adb shell
su
cd system/app
rm package
exit
exit
adb uninstall 包名

安裝軟體
一般安裝方式
安裝軟體 adb install apk文件名稱.apk
重新安裝軟體 adb install -r apk文件名稱.apk
非正常安裝方式
$ adb push D:\myfile.apk /sdcard/ // 上傳要安裝的文件,為安裝做准備。
$ adb shell
$ su // 切換到 root 用戶。如果沒有獲得 Root 許可權,這一步不會成功。
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system // 讓分區可寫
# cat /sdcard/ContactsHub.apk > /system/app/ContactsHub.apk
如果還不行,重啟手機

其他命令
adb help //可以查看所有命令
adb remount //重新掛載文件系統
adb reboot //重啟手機
adb reboot recovery //重啟手機到recovery界面
#rm -r xxx //刪除名字為xxx的文件夾及其裡面的所有文件
#rm xxx //刪除文件xxx
#rmdir xxx //刪除xxx的文件夾
adb logcat //查看手機上的運行日誌,可以用來查錯
adb devices //查看手機是否連接,以及連接了幾台手機
adb pull s d //把文件從手機復制到電腦上(s為源文件,d為目標文件)
adb push s d //把文件從電腦復制到手機上(s為源文件,d為目標文件)

㈤ 怎麼找到android系統input命令的實現代碼

1 首先找到input 命令的位置:

system//bin/input

2 查看input的內容如下:

cat .system//bin/input
# Script to start "input" on the device, which has a very rudimentary
# shell.
#
base=/system
export CLASSPATH=$base/framework/input.jar
exec app_process $base/bin com.Android.commands.input.Input $*

發現這句是重點: exec app_process $base/bin com.android.commands.input.Input

3 在framework 查找文件:
find ./ -iname input

4 最後發現下面文件是input命令的源碼實現:
/frameworks/base/cmds/input/src/com/android/commands/input/Input.java

㈥ android的mount命令怎麼用

如果你是在電腦上面使用adb命令的話 在插入usb之前還是得調成開發模式。然後在dos窗口(如果你連電腦怎麼進入dos窗口都不知道那麼你別問我)輸入adb devices 當然了,在電腦上連接手機需要先下載並安裝adb命令,這個你可以用手機PC助手安裝。 為了方便的adb命令的使用的話你還得下載adb驅動。關於adb驅動以後再跟大家講。
查看一下是否獲得設備信息並且是否連接上
當確認連接上了之後
使用
adb shell cat /proc/mtd 可以查看分區
或者你可以先輸入 adb shell 進入手機的shell交互的終端界面
然後輸入 cat/proc/mtd命令查看你的手機分區的掛載情況

然後這個時候就開始掛載分區了,比如我要重新掛載system分區為可讀寫

就輸入命令: mount -o remount,rw /dev/block/mtdblock3 /system

這個命令的意思是 remount是重新掛載的意思。r表示read。w表示write就是讀寫的意思。 然後後面跟著的是分區的路徑 路徑為/dev/block/mtdblock3 再就是要掛載在根目錄下面 並且命名為system

好了。現在打開你的re文件管理器。盡情的操縱你的system分區(文件夾)吧

㈦ android 基本文件操作命令

ADB (Android Debug Bridge)
說明:下面一些命令需要有root許可權才能執行成功
快速啟動dos窗口執行adb:
1. adb.exe所在路徑添加到系統環境變數中
2. 配置快捷鍵啟動dos
進入C:\WINDOWS\system32目錄下,找到cmd.exe.
右擊菜單 "發送到" -> 桌面快捷方式。
在桌面上右擊"快捷方式 到 cmd.exe" -> "屬性" -> "快捷方式"頁
-> 游標高亮"快捷鍵" -> 按下自定義快捷鍵 (如:Ctrl + Alt + Z)

任何情況下,按下Ctrl + Alt + Z啟動dos窗口就可以執行adb命令了

-----------查看設備連接狀態 系列-----------
adb get-serialno 獲取設備的ID和序列號serialNumber
adb devices 查詢當前計算機上連接那些設備(包括模擬器和手機),輸出格式: [serialNumber] [state]
adb get-state 查看模擬器/設施的當前狀態.

說明:
序列號[serialNumber]——由adb創建的一個字元串,這個字元串通過自己的控制埠<type>-<consolePort>
唯一地識別一個模擬器/設備實例。一個序列號的例子: emulator-5554

-----------發送命令到設備 系列-----------
adb [-d|-e|-s <serialNumber>] <command>
-d 發送命令給usb連接的設備
-e 發送命令到模擬器設備
-s <serialNumber> 發送命令到指定設備

如啟動手機設備shell: adb -d shell

adb forward <local> <remote>發布埠,可以設置任意的埠號,
做為主機向模擬器或設備的請求埠。如:adb forward tcp:5555 tcp:8000

adb reboot 重啟手機
adb remount 將system分區重新掛載為可讀寫分區
adb kill-server 終止adb服務進程
adb start-server 重啟adb服務進程
adb root 已root許可權重啟adb服務
adb wait-for-device 在模擬器/設備連接之前把命令轉載在adb的命令器中
adb jdwp 查看指定的設施的可用的JDWP信息.
可以用 forward jdwp:<pid> 埠映射信息來連接指定的JDWP進程.例如:
adb forward tcp:8000 jdwp:472
jdb -attach localhost:8000

adb shell am 命令可以啟動應用程序

adb shell input text <string> 向設備輸入文本(游標所在的文本框)
adb shell input keyevent <event_code> 向設備發送按鍵事件
如:
在編輯簡訊時,往文本框輸入文本:adb shell input text "hello"
向手機發送鍵值回Home:adb shell input keyevent 3
event_code 參考view/KeyEvent.java中的 KEYCODE_*
public static final int KEYCODE_SOFT_LEFT = 1;
public static final int KEYCODE_SOFT_RIGHT = 2;
public static final int KEYCODE_HOME = 3;
public static final int KEYCODE_BACK = 4;
public static final int KEYCODE_CALL = 5;
public static final int KEYCODE_ENDCALL = 6;

-----------安裝卸載 系列-----------
adb install [-l] [-r] <file> - push this package file to the device and install it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data)
adb uninstall [-k] <package> - remove this app package from the device
('-k' means keep the data and cache directories)
如:
adb install d:\hello.apk
adb unstall com.huawei.hello
說明:如果帶-r選項重新安裝apk時,安裝在 /data/local/tmp/目錄下,手機重啟後還是使用原來的apk.

-----------文件操作 系列-----------
adb push <local> <remote> - file/dir to device
adb pull <remote> <local> - file/dir from device

-----------基本linux shell命令 系列-----------
adb shell [command]
ls 列出目錄下的文件和文件夾
cd 切換目錄
rm 刪除目錄和文件
cat 查看文件內容
ps 可以看那個進程再跑
ps -x [PID] 查看單個進程的狀態
top 可以看那個進程的佔用率最高
su 切換到root用戶
kill [pid] 殺死一個進程
chmod 777 <file> 修改該文件為可執行許可權

詳細使用情況可以登錄一台Linux伺服器在shell下查看幫助手冊, man <command>

-----------查看系統狀態和信息 系列-----------
adb shell procrank 查詢各進程內存使用情況
adb shell service list 查看services信息
adb shell cat /proc/meminfo 查看當前的內存情況
adb shell cat /proc/cpuinfo 查看CPU信息(硬體)
adb shell cat /proc/iomem 查看IO內存分區

adb shell getprop 列出系統所有屬性
adb shell getprop | findstr "gsm" 列出包含gsm的屬性
adb shell setprop <key> <value> 修改系統屬性

adb shell sqlite3 可以執行sql語句查看資料庫信息, 具體使用情況待調查

-----------Log 系列-----------
adb logcat [ <filter-spec> ] - View device log

1~~~~~~~~~~~查看可用日誌緩沖區:
adb logcat -b radio — 查看緩沖區的相關的信息.
adb logcat -b events — 查看和事件相關的的緩沖區.
adb logcat -b main — 查看主要的日誌緩沖區

2~~~~~~~~~~~過濾日誌輸出:
過濾器語句按照下面的格式描tag:priority ... , tag 表示是標簽, priority 是表示標簽的報告的最低等級
adb logcat *:W 顯示優先順序為warning或更高的日誌信息
adb logcat ActivityManager:I MyApp:D *:S

日誌的標簽是系統部件原始信息的一個簡要的標志。(比如:「View」就是查看系統的標簽).
優先順序有下列集中,是按照從低到高順利排列的:
V — Verbose (lowest priority)
D — Debug
I — Info
W — Warning
E — Error
F — Fatal
S — Silent (highest priority, on which nothing is ever printed)

如果你電腦上運行logcat ,相比在遠程adbshell端,你還可以為環境變數ANDROID_LOG_TAGS :輸入一個參數來設置默認的過濾
export ANDROID_LOG_TAGS="ActivityManager:I MyApp:D *:S"
需要注意的是ANDROID_LOG_TAGS 過濾器如果通過遠程shell運行logcat 或用adb shell logcat 來運行模擬器/設備不能輸出日誌.

3~~~~~~~~~~~控制日誌輸出格式:
日誌信息包括了許多元數據域包括標簽和優先順序。可以修改日誌的輸出格式,所以可以顯示出特定的元數據域。可以通過 -v 選項得到格式化輸出日誌的相關信息.

brief — Display priority/tag and PID of originating process (the default format).
process — Display PID only.
tag — Display the priority/tag only.
thread — Display process:thread and priority/tag only.
raw — Display the raw log message, with no other metadata fields.
time — Display the date, invocation time, priority/tag, and PID of the originating process.
long — Display all metadata fields and separate messages with a blank lines.
當啟動了logcat ,你可以通過-v 選項來指定輸出格式:

[adb] logcat [-v <format>]
下面是用 thread 來產生的日誌格式:

adb logcat -v thread
需要注意的是你只能-v 選項來規定輸出格式 option.

4~~~~~~~~~~~Logcat命令列表
-b <buffer> 載入一個可使用的日誌緩沖區供查看,比如event 和radio . 默認值是main 。具體查看Viewing Alternative Log Buffers.
-c 清楚屏幕上的日誌.
-d 輸出日誌到屏幕上.
-f <filename> 指定輸出日誌信息的<filename> ,默認是stdout .
-g 輸出指定的日誌緩沖區,輸出後退出.
-n <count> 設置日誌的最大數目<count> .,默認值是4,需要和 -r 選項一起使用。
-r <kbytes> 每<kbytes> 時輸出日誌,默認值為16,需要和-f 選項一起使用.
-s 設置默認的過濾級別為silent.
-v <format> 設置日誌輸入格式,默認的是brief 格式,要知道更多的支持的格式,參看Controlling Log Output Format

adb bugreport - return all information from the device
that should be included in a bug report.

adb shell dmesg 查詢內核緩沖區信息
adb shell mpstate 各類信息,比如進程信息,內存信息,進程是否異常,kernnel的log等
adb shell mpcrash
adb shell mpsys 查詢所有service的狀態

-----------其他 -----------

模擬器使用鏡像sdcard
用SDK里的mksdcard工具來創建FAT32磁碟鏡像並在模擬器啟動時載入它。這樣創建鏡像:? mksdcard <size> <file>,
比如我要創建一個64M的SD卡模擬文件,文件路徑是在D:\workspace\sdcard.img
mksdcard 64000000 D:\workspace\sdcard.img

Emulator –sdcard D:\workspace\sdcard.img
或者在eclipse的run菜單的open run dialog對話框中配置啟動參數。

#top
Usage: top [ -m max_procs ] [ -n iterations ] [ -d delay ] [ -s sort_column ] [ -t ] [ -h ]
-m num Maximum number of processes to display.
-n num Updates to show before exiting.
-d num Seconds to wait between updates.
-s col Column to sort by (cpu,vss,rss,thr).
-t Show threads instead of processes.
-h Display this help screen.

********* simple selection ********* ********* selection by list *********
-A all processes -C by command name
-N negate selection -G by real group ID (supports names)
-a all w/ tty except session leaders -U by real user ID (supports names)
-d all except session leaders -g by session OR by effective group name
-e all processes -p by process ID
T all processes on this terminal -s processes in the sessions given
a all w/ tty, including other users -t by tty
g OBSOLETE -- DO NOT USE -u by effective user ID (supports names)
r only running processes U processes for specified users
x processes w/o controlling ttys t by tty
*********** output format ********** *********** long options ***********
-o,o user-defined -f full --Group --User --pid --cols --ppid
-j,j job control s signal --group --user --sid --rows --info
-O,O preloaded -o v virtual memory --cumulative --format --deselect
-l,l long u user-oriented --sort --tty --forest --version
-F extra full X registers --heading --no-heading --context
********* misc options *********
-V,V show version L list format codes f ASCII art forest
-m,m,-L,-T,H threads S children in sum -y change -l format
-M,Z security data c true command name -c scheling class
-w,w wide output n numeric WCHAN,UID -H process hierarchy

netstat -ano 查看網路連狀態
顯示協議統計信息和當前 TCP/IP 網路連接。

NETSTAT [-a] [-b] [-e] [-n] [-o] [-p proto] [-r] [-s] [-v] [interval]

-a 顯示所有連接和監聽埠。
-b 顯示包含於創建每個連接或監聽埠的
可執行組件。在某些情況下已知可執行組件
擁有多個獨立組件,並且在這些情況下
包含於創建連接或監聽埠的組件序列
被顯示。這種情況下,可執行組件名
在底部的 [] 中,頂部是其調用的組件,
等等,直到 TCP/IP 部分。注意此選項
可能需要很長時間,如果沒有足夠許可權
可能失敗。
-e 顯示乙太網統計信息。此選項可以與 -s
選項組合使用。
-n 以數字形式顯示地址和埠號。
-o 顯示與每個連接相關的所屬進程 ID。
-p proto 顯示 proto 指定的協議的連接;proto 可以是
下列協議之一: TCP、UDP、TCPv6 或 UDPv6。
如果與 -s 選項一起使用以顯示按協議統計信息,proto 可以是下列協議之一:
IP、IPv6、ICMP、ICMPv6、TCP、TCPv6、UDP 或 UDPv6。
-r 顯示路由表。
-s 顯示按協議統計信息。默認地,顯示 IP、
IPv6、ICMP、ICMPv6、TCP、TCPv6、UDP 和 UDPv6 的統計信息;
-p 選項用於指定默認情況的子集。
-v 與 -b 選項一起使用時將顯示包含於
為所有可執行組件創建連接或監聽埠的
組件。
interval 重新顯示選定統計信息,每次顯示之間
暫停時間間隔(以秒計)。按 CTRL+C 停止重新
顯示統計信息。如果省略,netstat 顯示當前
配置信息(只顯示一次)

pm
usage: pm [list|path|install|uninstall]
pm list packages [-f]
pm list permission-groups
pm list permissions [-g] [-f] [-d] [-u] [GROUP]
pm list instrumentation [-f] [TARGET-PACKAGE]
pm list features
pm path PACKAGE
pm install [-l] [-r] [-t] [-i INSTALLER_PACKAGE_NAME] PATH
pm uninstall [-k] PACKAGE
pm enable PACKAGE_OR_COMPONENT
pm disable PACKAGE_OR_COMPONENT

The list packages command prints all packages. Options:
-f: see their associated file.

The list permission-groups command prints all known
permission groups.

The list permissions command prints all known
permissions, optionally only those in GROUP. Options:
-g: organize by group.
-f: print all information.
-s: short summary.
-d: only list dangerous permissions.
-u: list only the permissions users will see.

The list instrumentation command prints all instrumentations,
or only those that target a specified package. Options:
-f: see their associated file.

The list features command prints all features of the system.

The path command prints the path to the .apk of a package.

The install command installs a package to the system. Options:
-l: install the package with FORWARD_LOCK.
-r: reinstall an exisiting app, keeping its data.
-t: allow test .apks to be installed.
-i: specify the installer package name.

The uninstall command removes a package from the system. Options:
-k: keep the data and cache directories around.
after the package removal.

The enable and disable commands change the enabled state of
a given package or component (written as "package/class").

查看stdout 和stderr
在默認狀態下,Android系統有stdout 和 stderr (System.out和System.err )輸出到/dev/null ,
在運行Dalvik VM的進程中,有一個系統可以備份日誌文件。在這種情況下,系統會用stdout 和stderr 和優先順序 I.來記錄日誌信息

通過這種方法指定輸出的路徑,停止運行的模擬器/設備,然後通過用setprop 命令遠程輸入日誌

$ adb shell stop
$ adb shell setprop log.redirect-stdio true
$ adb shell start系統直到你關閉模擬器/設備前設置會一直保留,可以通過添加/data/local.prop 可以使用模擬器/設備上的默認設置

UI/軟體 試驗程序 Monkey
當Monkey程序在模擬器或設備運行的時候,如果用戶出發了比如點擊,觸摸,手勢或一些系統級別的事件的時候,
它就會產生隨機脈沖,所以可以用Monkey用隨機重復的方法去負荷測試你開發的軟體.
最簡單的方法就是用用下面的命令來使用Monkey,這個命令將會啟動你的軟體並且觸發500個事件.

$ adb shell monkey -v -p your.package.name 500
更多的關於命令Monkey的命令的信息,可以查看UI/Application Exerciser Monkey documentation page.

㈧ Android執行shell命令的代碼該怎麼寫

Android中執行adb shell命令的方式如下:

041424344

/** * 執行一個shell命令,並返回字元串值 * * @param cmd * 命令名稱&參數組成的數組(例如:{"/system/bin/cat", "/proc/version"}) * @param workdirectory * 命令執行路徑(例如:"system/bin/") * @return 執行結果組成的字元串 * @throws IOException */ public static synchronized String run(String[] cmd, String workdirectory) throws IOException { StringBuffer result = new StringBuffer(); try { // 創建操作系統進程(也可以由Runtime.exec()啟動) // Runtime runtime = Runtime.getRuntime(); // Process proc = runtime.exec(cmd); // InputStream inputstream = proc.getInputStream(); ProcessBuilder builder = new ProcessBuilder(cmd); InputStream in = null; // 設置一個路徑(絕對路徑了就不一定需要) if (workdirectory != null) { // 設置工作目錄(同上) builder.directory(new File(workdirectory)); // 合並標准錯誤和標准輸出 builder.redirectErrorStream(true); // 啟動一個新進程 Process process = builder.start(); // 讀取進程標准輸出流 in = process.getInputStream(); byte[] re = new byte[1024]; while (in.read(re) != -1) { result = result.append(new String(re)); } } // 關閉輸入流 if (in != null) { in.close(); } } catch (Exception ex) { ex.printStackTrace(); } return result.toString(); }

android系統底層採用的是linux,所以adb這樣的linux指令是可以在java代碼中調用的,可以使用ProcessBuilder 這個方法來執行對應的指令。還可以通過如下方式執行:

12345678910111213141516
Process p = Runtime.getRuntime().exec("ls"); String data = null; BufferedReader ie = new BufferedReader(new InputStreamReader(p.getErrorStream())); BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream())); String error = null; while ((error = ie.readLine()) != null && !error.equals("null")) { data += error + "\n"; } String line = null; while ((line = in.readLine()) != null && !line.equals("null")) { data += line + "\n"; } Log.v("ls", data);

㈨ 在android代碼里怎麼執行adb命令

Android中執行adb shell命令的方式如下: /** * 執行一個shell命令,並返回字元串值 * * @param cmd * 命令名稱&參數組成的數組(例如:{"/system/bin/cat", "/proc/version"}) * @param workdirectory * 命令執行路徑(例如:"system/bin/") * @return 執行結果組成的字元串 * @throws IOException */ public static synchronized String run(String[] cmd, String workdirectory) throws IOException { StringBuffer result = new StringBuffer(); try { // 創建操作系統進程(也可以由Runtime.exec()啟動) // Runtime runtime = Runtime.getRuntime(); // Process proc = runtime.exec(cmd); // InputStream inputstream = proc.getInputStream(); ProcessBuilder builder = new ProcessBuilder(cmd); InputStream in = null; // 設置一個路徑(絕對路徑了就不一定需要) if (workdirectory != null) { // 設置工作目錄(同上) builder.directory(new File(workdirectory)); // 合並標准錯誤和標准輸出 builder.redirectErrorStream(true); // 啟動一個新進程 Process process = builder.start(); // 讀取進程標准輸出流 in = process.getInputStream(); byte[] re = new byte[1024]; while (in.read(re) != -1) { result = result.append(new String(re)); } } // 關閉輸入流 if (in != null) { in.close(); } } catch (Exception ex) { ex.printStackTrace(); } return result.toString(); }

㈩ Android-java怎麼調用命令行的命令

我共享份代碼 2.1 ~ 4.0 測試都能通過

/** 執行 shell 命令之後返回 String 類型的結果 */

public static StringexecShellStr(String cmd)

{

String[] cmdStrings = new String[] {"sh", "-c", cmd};

String retString = "";

try

{

Process process = Runtime.getRuntime().exec(cmdStrings);

BufferedReader stdout =

new BufferedReader(new InputStreamReader(

process.getInputStream()), 7777);

BufferedReader stderr =

new BufferedReader(new InputStreamReader(

process.getErrorStream()), 7777);

String line = null;

while ((null != (line = stdout.readLine()))

|| (null != (line = stderr.readLine())))

{

if (false == isStringEmpty(line))

{

retString += line + "\n";

}

}

}

catch (Exception e)

{

e.printStackTrace();

}

return retString;

}
ps: 如果你在應用裡面執行 shell,是以應用的用戶來執行,如果是特殊的目錄,需要root許可權的,也就是先執行 su ,在執行你的命令
而,如果通過 adb 執行 shell 的話,上來就是一個終端用戶(或者 root) 所以可能上來就有很高的許可權
另外,看一下 /mnt/sdcard 是否有文件在去操作

熱點內容
蘋果連接id伺服器出錯是怎麼回事 發布:2024-09-20 08:01:07 瀏覽:502
編程鍵是什麼 發布:2024-09-20 07:52:47 瀏覽:651
學考密碼重置要求的證件是什麼 發布:2024-09-20 07:19:46 瀏覽:477
電腦主伺服器怎麼開機 發布:2024-09-20 07:19:07 瀏覽:728
2022款瑞虎升級哪些配置 發布:2024-09-20 06:59:07 瀏覽:264
資料庫與asp 發布:2024-09-20 06:55:25 瀏覽:727
python解釋編譯 發布:2024-09-20 06:52:57 瀏覽:648
舞蹈豐收腳本 發布:2024-09-20 06:36:26 瀏覽:595
linux進程埠號 發布:2024-09-20 06:36:11 瀏覽:80
派派怎麼改密碼忘了 發布:2024-09-20 06:25:49 瀏覽:780