Debug app in terminal after uploading from legato to device

for question 1, you can see here:

It is using modem service.

for question 2, you can take the modemDemo application as example on how to use “app runProc”: