Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

control android device/emulator by python [closed]

I am not familiar with android development. But just want to use python script to do something on my android device/emulator. For example:

  1. change system settings.
  2. set a proxy.
  3. open app A, click some place, do something else...
  4. then open app B, tap up down, do something else...
  5. and so on.

I have tried

  1. monkeyrunner, which actually is not by python(it's by Jython), and usually I don't know why the example code can't work(lack of debugging methods in this way.I can use ipython or pycharm if one support python),
  2. appium, which introduce a very good framework, completely support python.But the tutorial always says about testing only one app, seems it can not change system settings or something like press HOME or BACK button.

I have never do such things before, are there any tools or tutorials could cover my case?

like image 948
Mithril Avatar asked Apr 01 '16 06:04

Mithril


People also ask

How you can control your android device with Python?

You can install the pure-python-adb library using pip install pure-python-adb . Optional: To make things easier for us while developing our scripts, we can install an open-source program called scrcpy which allows us to display and control our android device with our computer using a mouse and keyboard.

How do I turn off android emulator?

Run and stop an emulator, and clear data To stop a running emulator, click Menu and select Stop. To clear the data for an emulator, select Wipe Data. Or click Menu and select Wipe Data.


1 Answers

You can try AndroidViewClient/culebra which provides also a UI (see Culebra GUI) which allows you to do what you describe as your needs.

enter image description here enter image description here

like image 76
Diego Torres Milano Avatar answered Sep 24 '22 02:09

Diego Torres Milano