Do you have to run it in a certain device/through app? What I would do (and this will take a day or two (even more if you are not familiar with it but there are lots of good medium posts etc for doing it)) would be to setup a CI env like Jenkins and either trigger the Jenkins Job whenever I want, or introduce periodic jobs which gets executed in every X hour.
If you are dead set on running it from your phone, good thing here is that you can setup a webhook and trigger it through your app then jenkins will trigger the job you want.
Another plus of this approach is that, theoretically you can scale it to infinity and your bot runs the tests in parallel in X different devices
Once you have setup Jenkins and download Android commandline tools, you will need to create a job, where you build a normal apk and a test apk and install it to the target device.
Here is a small example of build commands you need to provide to run the ui tests (you can either use Emulator Plugin or download your own emulator with avd connect a real device from Firebase Test Labs etc. It also includes the way to disable lock screen/animations which breaks ui tests. Unfortunately whole setup of Jenkins/Android commandline tools far exceeds the scope of this question
Here are some helpful content about this
Setup Jenkins on Ubuntu
Setup Android on Jenkins
./gradlew clean myapp:assembleDebug --no-daemon -Dkotlin.compiler.execution.strategy="in-process"
./gradlew myapp:assembleDebugAndroidTest --no-daemon -Dkotlin.compiler.execution.strategy="in-process"
/var/lib/jenkins/android-sdk/platform-tools/adb -s emulator-5558 install -r myapp/build/outputs/apk/debug/myapp-debug.apk
/var/lib/jenkins/android-sdk/platform-tools/adb -s emulator-5558 install -r -t myapp/build/outputs/apk/androidTest/debug/myapp-debug-androidTest.apk
/var/lib/jenkins/android-sdk/platform-tools/adb -s emulator-5558 shell input keyevent KEYCODE_MENU
/var/lib/jenkins/android-sdk/platform-tools/adb -s emulator-5558 shell settings put global window_animation_scale 0 &
/var/lib/jenkins/android-sdk/platform-tools/adb -s emulator-5558 shell settings put global transition_animation_scale 0 &
/var/lib/jenkins/android-sdk/platform-tools/adb -s emulator-5558 shell settings put global animator_duration_scale 0 &
/var/lib/jenkins/android-sdk/platform-tools/adb -s emulator-5558 shell am instrument -w -e clearPackageData true --no-window-animation -e package com.mypackage.testcases.tests -e debug false com.mypackage.test/androidx.test.runner.AndroidJUnitRunner