This is a short guide for those of you that want to learn the basics of how to send commands to your android smartphone using your terminal.
First of all you need to setup your development enviorement. You will need to install adb, but its just easier to install Android Studio.
Download and install Android Studio from: https://developer.android.com/studio/
Next you will need to activate debugger mode in your connected android smartphone. This can change in every phone so try to find your way by googling: enable debugger mode [insert here your smartphone name]
After that, open your terminal and type this command in the terminal: adb devices. This should show you the list of android devices connected to your computer.
Then you will need to open the app that you need to simulate clicks on OR if you know the package name of your app you can type this command:
adb -s YOURDEVICEIDENTIFIER shell monkey -p YOURPACKAGENAME -c android.intent.category.LAUNCHER 1
You can get the device identifier using this command in your terminal:
The name of the package is basicly the name of the app. For example if you are trying to automate Tinder you should use the package name “com.tinder”
After launching our target app, we are prepared to send the command that will simulate the touch. For that purpose you can use this command:
adb -s YOUDEVICEIDENTIFIER shell input touch XCOORDS YCOORDS
One more time you will need to obtain device identifier and the coordinates X Y to locate the touch on the screen. In my debugger options in my smartphone i can select the an option that shows me the coordinates in the smartphone after every single touch. I dont know if thats possible in all smartphones so you will have to figure out this.
If this guide gets attention I will try to do another one more in depth talking about automation on android phones using adb commands and python 3.
A Like to this post would be so much appreciated