title: Tcpdump trace on android - could not load library "libssl.so" needed by "/system/bin/tcpdump"
body: <p>I need to do tcpdump trace on my android devices. </p>
  
  <hr>
  
  <p><strong>My setup:</strong></p>
  
  <p>Push tcpdump file to sdcard</p>
  
  <pre><code>adb push filepath/tcpdump /sdcard/tcpdump
  </code></pre>
  
  <p>Copy file to /system/bin</p>
  
  <p>Give root privileges to tcpdump file</p>
  
  <pre><code>adb shell
  cd /system/bin
  su
  chmod 777 tcpdump
  </code></pre>
  
  <p>Install <a href="https://play.google.com/store/apps/details?id=stericson.busybox&amp;hl=pl" rel="nofollow">BUSYBOX from Google Play</a></p>
  
  <p>Run tcpdump trace</p>
  
  <pre><code>tcpdump -vv -s 0 -w /sdcard/filename.pcap
  </code></pre>
  
  <hr>
  
  <p>I have already managed to do that on Samsung Galaxy S4 - it works fine. However, it doesn't work on my Samsung Galaxy Tab. After tcpdump command I got error:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>Both devices are rooted and they have the same tcpdump configuration. I have <strong>libssl.so</strong>
  in /system/lib/</p>
  
  <p><strong>Samsung Galaxy S4</strong></p>
  
  <pre><code>C:\Windows\System32&gt;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
  </code></pre>
  
  <p><strong>Samsung Galaxy Tab</strong></p>
  
  <pre><code>C:\Windows\System32&gt;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 #
  </code></pre>