How can I see which folders are used by a particular app I want to move an app's profile from one phone to an other, so all of the app's settings move with it.

For that, I need to know, which folders are used by the app to be moved from the original phone, so I copy those folders to the new phone.

How can I find out which folders I need to copy?
As root shell:

ls -l /proc/$PID/fd

To get application's current PID:

ps -C $appname -o pid=

But there are good chances all your application settings are on /data/data/$appname/{shared_prefs,databases}