#get a list of all installed package names
adb shell "pm list packages -f"|cut -d\= -f2
#backup an app
adb backup -noapk com.your.packagename
#the backup.ab file is tar file with special headers
#remove that header and untar the file
( printf "\x1f\x8b\x08\x00\x00\x00\x00\x00" ; tail -c +25 backup.ab ) | tar xfvz -