/system/bin/sh: screenrecord: inaccessible or not found 報錯解決方案
在我們平時測試工作中,可能需要對 Android 手機進行錄屏,第一時間我們肯定想到強大的 adb 命令。但是當我們用 adb 錄製的時候,往往會報錯 screenrecord: inaccessible or not found
~ $ adb shell screenrecord /sdcard/test.mp4
/system/bin/sh: screenrecord: inaccessible or not found
這是因為現在很多手機為了安全把 screenrecord 功能給回收了,導致我們無法再用該命令列進行錄屏操作。
透過adb shell ls /system/bin/
命令可以看到ls: /system/bin//screenrecord: Permission denied
,說明確實沒有錄屏許可權了。
~ $ adb shell ls /system/bin/
ls: /system/bin//adbd: Permission denied
ls: /system/bin//apexd: Permission denied
ls: /system/bin//art_apex_boot_integrity: Permission denied
ls: /system/bin//ashmemd: Permission denied
ls: /system/bin//asserttip: Permission denied
ls: /system/bin//atlasservice: Permission denied
ls: /system/bin//audioserver: Permission denied
ls: /system/bin//auditctl: Permission denied
ls: /system/bin//autochmod.sh: Permission denied
ls: /system/bin//blank_screen: Permission denied
ls: /system/bin//blkid: Permission denied
ls: /system/bin//bootanimation: Permission denied
ls: /system/bin//bootstat: Permission denied
ls: /system/bin//bpfloader: Permission denied
ls: /system/bin//br_app_data_service: Permission denied
ls: /system/bin//bspCriticalLog: Permission denied
ls: /system/bin//bspFwUpdate: Permission denied
ls: /system/bin//bt_logger: Permission denied
ls: /system/bin//cachebench_eng: Permission denied
ls: /system/bin//cameraserver: Permission denied
ls: /system/bin//charger: Permission denied
ls: /system/bin//chcon: Permission denied
ls: /system/bin//clatd: Permission denied
ls: /system/bin//common_dcs: Permission denied
ls: /system/bin//cpustress_eng: Permission denied
ls: /system/bin//criticallog: Permission denied
ls: /system/bin//datafree: Permission denied
ls: /system/bin//dex2oat: Permission denied
ls: /system/bin//dexoptanalyzer: Permission denied
ls: /system/bin//dnsmasq: Permission denied
ls: /system/bin//drmserver: Permission denied
ls: /system/bin//dumpstate: Permission denied
ls: /system/bin//dun-server: Permission denied
ls: /system/bin//e2fsck: Permission denied
ls: /system/bin//e2fsdroid: Permission denied
ls: /system/bin//engineer_system_shell.sh: Permission denied
ls: /system/bin//flags_health_check: Permission denied
ls: /system/bin//fsck.f2fs: Permission denied
ls: /system/bin//fsck_msdos: Permission denied
ls: /system/bin//fsverity_init: Permission denied
ls: /system/bin//gatekeeperd: Permission denied
ls: /system/bin//gpuservice: Permission denied
ls: /system/bin//gsid: Permission denied
ls: /system/bin//hans: Permission denied
ls: /system/bin//heapprofd: Permission denied
ls: /system/bin//hwservicemanager: Permission denied
ls: /system/bin//hypnusd: Permission denied
ls: /system/bin//idmap: Permission denied
ls: /system/bin//idmap2: Permission denied
ls: /system/bin//idmap2d: Permission denied
ls: /system/bin//incident_helper: Permission denied
ls: /system/bin//incidentd: Permission denied
ls: /system/bin//init: Permission denied
ls: /system/bin//installd: Permission denied
ls: /system/bin//iorapd: Permission denied
ls: /system/bin//iw: Permission denied
ls: /system/bin//junklogcollector: Permission denied
ls: /system/bin//keystore: Permission denied
ls: /system/bin//lmkd: Permission denied
ls: /system/bin//logd: Permission denied
ls: /system/bin//lpdumpd: Permission denied
ls: /system/bin//make_f2fs: Permission denied
ls: /system/bin//mdnsd: Permission denied
ls: /system/bin//mediadrmserver: Permission denied
ls: /system/bin//mediaextractor: Permission denied
ls: /system/bin//mediametrics: Permission denied
ls: /system/bin//mediaserver: Permission denied
ls: /system/bin//memtester_eng: Permission denied
ls: /system/bin//migrate_legacy_obb_data.sh: Permission denied
ls: /system/bin//mke2fs: Permission denied
ls: /system/bin//mmi: Permission denied
ls: /system/bin//mmi_diag: Permission denied
ls: /system/bin//mtpd: Permission denied
ls: /system/bin//netd: Permission denied
ls: /system/bin//netutils-wrapper-1.0: Permission denied
ls: /system/bin//notify_traceur.sh: Permission denied
ls: /system/bin//oae_server: Permission denied
ls: /system/bin//oiface: Permission denied
ls: /system/bin//oppo_kevent: Permission denied
ls: /system/bin//oppo_theia: Permission denied
ls: /system/bin//perfservice: Permission denied
ls: /system/bin//phoenix_log_native_helper.sh: Permission denied
ls: /system/bin//pppd: Permission denied
ls: /system/bin//profman: Permission denied
ls: /system/bin//qspmsvc: Permission denied
ls: /system/bin//quickboot: Permission denied
ls: /system/bin//qvrservice: Permission denied
ls: /system/bin//racoon: Permission denied
ls: /system/bin//recovery-persist: Permission denied
ls: /system/bin//resize.f2fs: Permission denied
ls: /system/bin//resize_ext4: Permission denied
ls: /system/bin//rss_hwm_reset: Permission denied
ls: /system/bin//rutilsdaemon: Permission denied
ls: /system/bin//screenrecord: Permission denied
ls: /system/bin//sdcard: Permission denied
ls: /system/bin//servicemanager: Permission denied
ls: /system/bin//sgdisk: Permission denied
ls: /system/bin//sigma_miracasthalservice: Permission denied
ls: /system/bin//sload_f2fs: Permission denied
ls: /system/bin//statsd: Permission denied
ls: /system/bin//storaged: Permission denied
ls: /system/bin//stressapptest_eng: Permission denied
ls: /system/bin//surfaceflinger: Permission denied
ls: /system/bin//tcpdump: Permission denied
ls: /system/bin//tombstoned: Permission denied
ls: /system/bin//traced: Permission denied
ls: /system/bin//traced_probes: Permission denied
ls: /system/bin//tune2fs: Permission denied
ls: /system/bin//uncrypt: Permission denied
ls: /system/bin//usbd: Permission denied
ls: /system/bin//vdc: Permission denied
ls: /system/bin//viewcompiler: Permission denied
ls: /system/bin//vold: Permission denied
ls: /system/bin//vold_prepare_subdirs: Permission denied
ls: /system/bin//vpsservice: Permission denied
ls: /system/bin//wait_for_keymaster: Permission denied
ls: /system/bin//watchdogd: Permission denied
ls: /system/bin//wfdservice: Permission denied
ls: /system/bin//wificond: Permission denied
ls: /system/bin//wifirftest: Permission denied
QMESA_64
SecrecyAutoUnlocker
abb
acpi
am
app_process
app_process32
app_process64
applypatch
appops
appwidget
atrace
awk
base64
basename
bc
bcc
blockdev
bmgr
bootstrap
bspatch
bu
bugreport
bugreportz
bunzip2
bzcat
bzip2
cal
cat
checkfutexwait
chgrp
chmod
chown
chroot
chrt
cksum
clear
cmd
cmp
comm
content
cp
cpio
crash_dump32
crash_dump64
curl
cut
dalvikvm
dalvikvm32
dalvikvm64
date
dd
debuggerd
defrag.f2fs
device_config
devmem
dexdiag
dexdump
dexlist
df
diff
dirname
dmctl
dmesg
dos2unix
dpm
dsm_ctrl
du
dumpsys
echo
egrep
env
expand
expr
extractCurrentUefiLog
fallocate
false
fgrep
file
find
flock
fmt
free
fsck_exfat
fsync
get-cplc
getconf
getenforce
getevent
getprop
grep
groups
gsi_tool
gunzip
gzip
head
hid
hostname
hw
hwclock
i2cdetect
i2cdump
i2cget
i2cset
iconv
id
ifconfig
ime
incident
init.oppo.bluetooth.sh
inotifyd
input
insmod
install
ionice
iorenice
ip
ip-wrapper-1.0
ip6tables
ip6tables-restore
ip6tables-save
ip6tables-wrapper-1.0
iptables
iptables-restore
iptables-save
iptables-wrapper-1.0
iwlist
iwpriv
keystore_cli_v2
kill
killall
ld.mc
librank
linker
linker64
linker_asan
linker_asan64
ln
load_policy
locksettings
log
logcat
logname
logwrapper
losetup
lpdump
ls
lshal
lsmod
lsof
lspci
lsusb
md5sum
media
microcom
mini-keyctl
minidumpreader
mkdir
mkexfat
mkfifo
mkfs.ext2
mkfs.ext3
mkfs.ext4
mknod
mkntfs
mkswap
mktemp
modinfo
modprobe
monkey
more
mount
mountpoint
move_time_data.sh
move_widevine_data.sh
move_wifi_data.sh
mv
nc
ndc
ndc-wrapper-1.0
netcat
netstat
newfs_msdos
nice
nl
nohup
nproc
nsenter
ntfs-3g
ntfsfix
oatdump
od
oppopnscrcmd
paste
patch
perfetto
pgrep
phoenix_log_manager
pidof
ping
ping6
pkill
pm
pmap
printenv
printf
procrank
ps
pwd
qvrdatalogger
qvrservicetest
qvrservicetest64
readlink
realpath
reboot
remount
renice
requestsync
resize2fs
restorecon
rm
rmdir
rmmod
rtspclient
rtspserver
run-as
runcon
schedtest
screencap
secdiscard
secilc
sed
self-init-system
sendevent
sensorservice
seq
service
setenforce
setprop
setsid
settings
sh
sha1sum
sha224sum
sha256sum
sha384sum
sha512sum
showmap
shutdown_log_back
shutdown_log_native_helper.sh
simpleperf
simpleperf_app_runner
sleep
sm
sort
split
ss
start
stat
stop
strings
stty
svc
swapoff
swapon
sync
sysctl
tac
tail
tar
taskset
tc
tc-wrapper-1.0
tee
telecom
time
timeout
tinycap
tinymix
tinypcminfo
tinyplay
tinyplay_ftm
toolbox
top
touch
toybox
tr
trigger_perfetto
true
truncate
tty
tzdatacheck
ueventd
uiautomator
ulimit
umount
uname
uniq
unix2dos
unlink
unshare
unzip
uptime
usleep
uudecode
uuencode
uuidgen
vmstat
vr
watch
wc
which
whoami
wm
xargs
xxd
yes
zcat
那麼,如果想要錄屏怎麼辦?這裡推薦一個工具,那就是 scrcpy
安裝 (僅 macOS):
brew install scrcpy
如果你沒有 adb,則需要先安裝:
brew cask install android-platform-tools
執行 scrcpy
安裝完畢後,電腦連線手機,執行 scrcpy 可在電腦上面看到手機實時投屏:
scrcpy
錄屏
如果想要錄屏,執行以下兩個命令之一:
scrcpy --record test.mp4
scrcpy -r test.mp4
你也可以在不開啟實時映象顯示的情況錄屏:
scrcpy --no-display --record file.mp4
scrcpy -Nr file.mkv
更多
詳情請檢視scrcpy(中文版請看這裡->scrcpy)
相關文章
- /bin/sh: 1: pahole: not found
- frepplectl解決報錯:bash: /usr/bin/frepplectl: Permission denied
- libc.so.6: version 'GLIBC_2.14' not found報錯提示的解決方案
- 執行shell指令碼報錯:-bash: ./test1.sh: /bin/bash^M: ...指令碼
- su -s /bin/sh -c “nova-manage api_db sync“ nova報錯API
- minio報錯SignatureDoesNotMatch解決方案
- electron npm install 報錯解決方案NPM
- Android Studio 報錯解決方案 一Android
- npm報錯"A complete log of this run can be found in:"的解決辦法NPM
- react-native install 報錯 No git binary found in $PATH解決方法ReactGit
- Laravel安裝horizon報錯解決方案Laravel
- Django(21)migrate報錯的解決方案Django
- npm install 安裝報錯解決方案NPM
- win安裝wordcloud報錯解決方案Cloud
- 【轉】對#!bin/sh的認識
- 錯誤:-bash: ./how_paras.sh: /bin/bash^M: bad interpreter: No such file or directory
- shell指令碼頭,#!/bin/sh與#!/bin/bash的區別.指令碼
- vue tsx 原生屬性報錯解決方案Vue
- matplotlib中文報錯問題及解決方案
- 【安裝Android Studio報錯之解決方案】Android
- homestead vagrant up 報錯 Your VM has become "inaccessible."
- 解決shell指令碼錯誤$’r’ command not found指令碼
- 解決 The ‘supervisor==3.2.0‘ distribution was not found and is required by the application錯誤UIAPP
- composer安裝完成輸入命令報錯:Fatal error: Class ‘Phar‘ not found in C:\\ProgramData\\ComposerSetup\\bin\\compoError
- glibc解決“libc.so.6: version GLIBC_2.14 not found”報錯問題
- sh指令碼執行報錯指令碼
- Sh 打包報錯:errSecInternalComponent 和 CopySwiftLibsSwift
- Oracle 條件索引 case when 報錯解決方案Oracle索引
- 關於Support for password authentication 報錯的解決方案
- Python報錯:PermissionError: [Errno 13] Permission denied解決方案PythonError
- sockjs-node/info?t=1462183700002 報錯解決方案JS
- CentOS 7 命令 lsb_release: command not found 解決方案CentOS
- 用命令列啟動 docker 報錯:Redirecting to /bin/systemctl start docker.service 解決方法命令列Docker
- gorm忽略報錯: record not foundGoORM
- chrome谷歌瀏覽器視訊播放報錯:No compatible source was found for this media解決方法Chrome谷歌瀏覽器
- 安裝WSL報錯0x80370102解決方案
- JMETER java.net.SocketException: Connection reset 報錯解決方案JMeterJavaException
- This dependency was not found: * !!vue-style-loader!css-loader? 解決方案VueCSS