Script to interact with camera and take RAW pictures for astrophotography



  • On a SAMSUNG Galaxy Note 20 Ultra, I would like to take back to back pictures and store them as RAW format automated by a script (that needs to run for hours). I much prefer to store bit counts by the camera sensor if possible (this is for astrophotography).

    I'm a python developer and have never been exposed to android ecosystem (please be easy on me). I would appreciate a step-by-step guide.



    1. Android has a https://developer.android.com/training/monitoring-device-state/doze-standby which means that unless the device is plugged in for power, apps will be suspended after a period of time.

    2. Android device manufacturers may add in their own power saving mechanism, resulting a site like https://dontkillmyapp.com/ to exist. If you are running your activity while charging, you should not have issues, but just in case, be aware of OEM/ODM power management.

    3. If you are looking for an camera app there is https://opencamera.org.uk/index.html whose https://opencamera.org.uk/help.html is extensive regarding available controls/settings and can be configured to take multiple images with a timer. Alternatively look through https://android.izzysoft.de/applists/category/named/foto_camera to see if an another camera app fits your needs.

    4. There are apps like https://tasker.joaoapps.com/ which allow for additional automation.

    5. Note that while a specific device may have a large image sensor, third party apps are limited to what is given by the Android Camera APIs, and that the manufacturer's "stock" camera app may have features not exposed via official APIs.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2