Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android 10 无法使用相应命令查询 IP 和 MAC 地址 #92

Open
note4 opened this issue Oct 19, 2022 · 5 comments
Open

Android 10 无法使用相应命令查询 IP 和 MAC 地址 #92

note4 opened this issue Oct 19, 2022 · 5 comments

Comments

@note4
Copy link

note4 commented Oct 19, 2022

Android 10 无法使用相应命令查询 IP 和 MAC 地址

@mzlogin
Copy link
Owner

mzlogin commented Oct 19, 2022

有输出什么错误提示吗?

@note4
Copy link
Author

note4 commented Oct 25, 2022

有输出什么错误提示吗?

没有报错

@note4
Copy link
Author

note4 commented Oct 26, 2022

platform-tools % ./adb shell ifconfig | grep Mask
ifconfig: ioctl 8927: Permission denied



platform-tools % ./adb shell ifconfig wlan0
ifconfig: ioctl 8927: Permission denied


platform-tools % ./adb shell netcfg
/system/bin/sh: netcfg: inaccessible or not found


platform-tools % ./adb shell cat /sys/class/net/wlan0/address
cat: /sys/class/net/wlan0/address: Permission denied

其他命令基本正常,如查询CPU

platform-tools % ./adb shell cat /proc/cpuinfo
Processor	: AArch64 Processor rev 13 (aarch64)
processor	: 0
BogoMIPS	: 38.40
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp
CPU implementer	: 0x51
...省略1亿行

@mzlogin
Copy link
Owner

mzlogin commented Oct 26, 2022

platform-tools % ./adb shell ifconfig | grep Mask
ifconfig: ioctl 8927: Permission denied



platform-tools % ./adb shell ifconfig wlan0
ifconfig: ioctl 8927: Permission denied


platform-tools % ./adb shell netcfg
/system/bin/sh: netcfg: inaccessible or not found


platform-tools % ./adb shell cat /sys/class/net/wlan0/address
cat: /sys/class/net/wlan0/address: Permission denied

其他命令基本正常,如查询CPU

platform-tools % ./adb shell cat /proc/cpuinfo
Processor	: AArch64 Processor rev 13 (aarch64)
processor	: 0
BogoMIPS	: 38.40
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp
CPU implementer	: 0x51
...省略1亿行

看起来是权限收紧了

@FulLiunian
Copy link

android 11 表示没问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants