Setting an app as device owner is usually intended to be done through a factory reset. The adb method is intended mostly as a testing tool. Android requiring no accounts being present is a weird half-way security feature it seems?
It's definitely not for your average user. But It works really well once set up. That it doesn't require root enables this on basically infinitely more devices than before. This is pretty huge! 🎉
@Bubu Is there a way to connect the app itself as an adb client and execute the command automaticly?
@utf8equalsX @clerie it works, using this: https://github.com/MasterDevX/Termux-ADB
But this is way more fiddly and complicated than using a PC. Automating that is quite complex, you'd need to ship the whole termux environment and the user would still need to understand how to enable adb via network.(and that that is really insecure.)
It uses this library which implements adb in native java. https://github.com/tananaev/adblib
It prompts you to type `adb tcpip 5555` but this is equivalent to enabling adb over IP in the settings.
@Bubu If you could point me to the repository you're developing at I could see whether I could automate this in your application in a user-friendly way
Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.