0
#!/bin/bash
echo
adb shell wpa_cli list_n all
sleep 2
echo 
adb shell am broadcast -a amazon.speech.ROUTE_DIRECTIVE --es directive '{"directive": {"header": {"namespace": "Alexa.Networking.WiFi","name": "GetProfiles","messageId": "123e4567-e89b-12d3-a456-426652350006","correlationToken": "1234"},"payload": {}}}'
sleep 80
echo 
adb shell logcat -v time -b all | grep -i "getprofile"
sleep 10

..the command which starts from "am broadcast" should be given inside adb shell. Then only it's giving the exact output. Rather if i use the command out side the adb shell like "adb shell am broadcast" then it's not working. Could you please help me

3
  • Consider feeding the code to run on stdin; that way you can use a heredoc. Commented Oct 5, 2022 at 14:43
  • Please help me to get execute the command inside and shell. Output should be like "Get profiles succeeded" Commented Oct 5, 2022 at 14:44
  • Consider this answer for a similar problem. Commented Oct 5, 2022 at 16:47

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.