Using rtmpdump to get video from rtp play archive

rtmpdump -v -r "rtmp://" -y "mp4:nas2.share/h264/512x384/palegria/praca_3_20121227.mp4" -o file.mp4

How to list Android services running by package name

adb shell dumpsys activity services net.package

Counting mumber of methods on jars found in a directory

Very very very helpful when the apk reach the max of 64K method limit. "java.lang.IllegalArgumentException: Dex method index overflow [65643]"

for jar in `find . -type f -name "*.jar"`; do
echo $jar
dx --dex --output=temp.dex $jar 2> /dev/null
jarmethods=$(cat temp.dex | head -c 92 | tail -c 4 | hexdump -e '1/4 "%d\n"')
echo $jarmethods
echo $totalmethods

Here is a list of libraries that worth mentioning:

Facebook Album Photo Viewer in autoplay mode!

This might be helpful for someone that want facebook to show album photos in continuous mode!

var secondsDelay =2000;
var elem = document.getElementsByClassName("snowliftPager next hilightPager")[0];
setInterval(function() {;

Downloading first google image result

How to download an image from google:

def getimageurlfromgoogle(query)
response = Net::HTTP.get_response('',

The first result is not always the best result!!

SSH Tunneling for the win

This is extremely useful when there is a machine inside a network which can't have open ports. By using ssh remote port forwarding, it's possible to access that machine using another machine that can have open ports for everyone.


Tcpdump & Wireshark with Android

Some necessary commands and files to use tcpdump and wireshark with any Android device with root. The necessary files can be download from here:

mount -o remount,rw /system
cp /sdcard/data/tcpdump system/bin
chmod 777 tcpdump
mount -o remount,ro /system

Downloading apks from google play store

This is really helpful!! Sometimes I need to test an app that is not available in my country or it is not available to install on my device because of tue requirements but I want to install it anyway, then this is just what I need:

Install 3rd party apps as system apps

Here is the very useful command to install a common app as system app. It's not necessary to say that's mandatory that the device needs to be rooted!

#remount system partition with read and write capabilities
#move the app from the sdcard to the /system/app directory
#remount again as read only
#reboot the device

How to pass extra values to activity from shell

This command is very useful when you need to start an activity from shell environment that needs to receive args (extras in the intent).

adb shell am start -e extraName extraValue -n packageName/.activityName {activity flags}

adb shell am start -e Language PT -n pt.fraunhofer.util.changelanguage/.ActivityChangeLanguage --activity-clear-top


Subscribe to RSS