gpt4 book ai didi

android - android 上的 Tcpdump 跟踪 - 无法加载 "libssl.so"所需的库 "/system/bin/tcpdump"

转载 作者:塔克拉玛干 更新时间:2023-11-02 22:46:32 26 4
gpt4 key购买 nike

我需要在我的 Android 设备上执行 tcpdump 跟踪。


我的设置:

将tcpdump文件推送到sdcard

adb push filepath/tcpdump /sdcard/tcpdump

复制文件到/system/bin

给tcpdump文件root权限

adb shell
cd /system/bin
su
chmod 777 tcpdump

安装 BUSYBOX from Google Play

运行 tcpdump 跟踪

tcpdump -vv -s 0 -w /sdcard/filename.pcap

我已经在 Samsung Galaxy S4 上做到了 - 它工作正常。但是,它不适用于我的 Samsung Galaxy Tab。在 tcpdump 命令后我得到错误:

tcpdump
soinfo_link_image(linker.cpp:1635): could not load library "libssl.so" needed by
"/system/bin/tcpdump"; caused by load_library(linker.cpp:761): not a valid ELF
executable: libssl.soCANNOT LINK EXECUTABLE

两台设备都已 root,并且它们具有相同的 tcpdump 配置。我有 libssl.so在/system/lib/

三星 Galaxy S4

C:\Windows\System32>adb shell
shell@android:/ $ su
su
root@android:/ # cd system/bin
cd system/bin
root@android:/system/bin # tcpdump
tcpdump
tcpdump: WARNING: arptype 530 not supported by libpcap - falling back to cooked
socket
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on rmnet_usb0, link-type LINUX_SLL (Linux cooked), capture size 96 byt
es

Samsung Galaxy Tab

C:\Windows\System32>adb shell
root@android:/ # su
su
root@android:/ # cd system/bin
cd system/bin
root@android:/system/bin # tcpdump
tcpdump
soinfo_link_image(linker.cpp:1635): could not load library "libssl.so" needed by
"/system/bin/tcpdump"; caused by load_library(linker.cpp:761): not a valid ELF
executable: libssl.soCANNOT LINK EXECUTABLE
255|root@android:/system/bin #

最佳答案

http://www.kandroid.org/online-pdk/guide/tcpdump.html

它可能有用。

adb shell tcpdump -i any -p -s 0 -w /sdcard/capture.pcap

# "-i any": listen on any network interface
# "-p": disable promiscuous mode (doesn't work anyway)
# "-s 0": capture the entire packet
# "-w": write packets to a file (rather than printing to stdout)

... do whatever you want to capture, then ^C to stop it ...

adb pull /sdcard/capture.pcap .

sudo apt-get install wireshark # or ethereal, if you're still on dapper
wireshark capture.pcap # or ethereal

关于android - android 上的 Tcpdump 跟踪 - 无法加载 "libssl.so"所需的库 "/system/bin/tcpdump",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19449636/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com