[英]Tcpdump trace on android - could not load library “libssl.so” needed by “/system/bin/tcpdump”
I need to do tcpdump trace on my android devices. 我需要在我的Android设备上执行tcpdump跟踪。
My setup: 我的设置:
Push tcpdump file to sdcard 将tcpdump文件推送到SD卡
adb push filepath/tcpdump /sdcard/tcpdump
Copy file to /system/bin 将文件复制到/ system / bin
Give root privileges to tcpdump file 为tcpdump文件授予root权限
adb shell
cd /system/bin
su
chmod 777 tcpdump
Install BUSYBOX from Google Play 从Google Play安装BUSYBOX
Run tcpdump trace 运行tcpdump trace
tcpdump -vv -s 0 -w /sdcard/filename.pcap
I have already managed to do that on Samsung Galaxy S4 - it works fine. 我已经设法在三星Galaxy S4上做到了 - 它工作正常。 However, it doesn't work on my Samsung Galaxy Tab. 但是,它不适用于我的三星Galaxy Tab。 After tcpdump command I got error: 在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
Both devices are rooted and they have the same tcpdump configuration. 两个设备都是root用户,并且它们具有相同的tcpdump配置。 I have libssl.so in /system/lib/ 我在/ system / lib /中有libssl.so
Samsung Galaxy S4 三星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 三星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 http://www.kandroid.org/online-pdk/guide/tcpdump.html
it may useful. 它可能有用。
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
SOLUTION 解
I solved my problem by copying 'libssl.so' and 'libcrypto.so' from Samsung Galaxy S4 to Samsung Galaxy Tab. 我通过从三星Galaxy S4复制'libssl.so'和'libcrypto.so'到三星Galaxy Tab解决了我的问题。 It seems to work fine. 它似乎工作正常。 I have no idea about the possible negative impact of that change. 我不知道这种变化可能带来的负面影响。
三星Galaxy Discover SGH-S730M *#9900#TCP Dump需要OTP身份验证,因此我认为TCP转储在任何没有密码的Android设备上都无法运行。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.