How do I get list of all application packages together with their activity label from adb shell?
Based on my answer on the question Andrew linked to, this is what should be in your list_apps script:

for app in $(ls /data/app/*.apk); do
    appname=$(aapt d badging $app | grep 'application: label' | sed -n \"s/.*label\='\([^']*\)'.*/\1/p\")
    pkgname=$(basename $app)
    echo ${pkgname} "${appname}"
done


Run this on your Android device.


Requirements: Either a CM based ROM with Kitkat or higher (which seems to ship with the aapt binary) – or a rooted device where you can install aapt onto yourself (find it here; tested with Android 4.1).
Known issues: app name most likely gets truncated when it contains a single quote (see sed expression). Not having such one installed here I could not test that.
Only lists user apps. Easy to fix by repeating the block for /system/app ;)