title: Android killing Process using only PS and GREP in shell script
body: <p>I really need help here...
  I am writing a shell script, which starts a process then kills it every 10 seconds then restarts it again.</p>
  
  <p>I understand that using 'ps' command will show all the processes that are running and you can kill it by running 'kill [pid]'.
  However, grepping the PID of the process that I am launching is not easy.</p>
  
  <p>I've looked everywhere and for some reason, I cannot use functions like pgrep, awk, xargs, pidof... They are just not found...</p>
  
  <p>I can only think of a way where I have to output the ps file then parse it and grab the PID alone.. but that seems too much... </p>
  
  <p>Can anyone help me? I think I am only limited to using ps and grep only...</p>
  
  <p>I am launching the phone application by running
      am start -a android.intent.action.CALL -d tel:XXX-XXX-XXXX 
  Then by running 'ps m.android.phone' I can use kill [PID] to stop call the call</p>
  
  <p>I've also tried running commands like 
      pm clear com.android.phone, 
      adb shell am force-stop com.android.phone
  but none of them would stop the call...</p>
  
  <p>Please help
  Thanks a lot!</p>