Is it possible to get the pid of the current open application or its name from command-line on a jailbreaked iOS device?
I want this so it is faster to hook cycript to the current application, than having to find it using ps.
My current solution requires that you know the name of the application:
cycript2 ()
{
cycript -p $(ps aux | grep -i $1 | head -1 | awk '{ print $2 }')
}