I'm currently working on a new version of the F-Droid Privileged Extension which will work on unrooted phones using Androids Device Owner mode. Requires adb though.

There'll probably also be a seperate version which uses a root install mode instead of requiring install as a system app.

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! 🎉

Show thread

@Bubu Is there a way to connect the app itself as an adb client and execute the command automaticly?

@clerie @Bubu Considering you can do adb over IP, theoretically, the device could connect to itself o.o

@utf8equalsX @clerie (IP connection)That *miiiight* work? Would be an interesting thing to try for sure.

@utf8equalsX @clerie it works, using this: github.com/MasterDevX/Termux-A
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.)

@Bubu @clerie Surely the traffic that adb does is a lot less complicated than what you would need the termux stack for. The featureset you would need is rather limited, i.e. adb connect and adb shell, it could be reimplemented natively or one could compile the adb binary into the app.

I found this application which does it exactly this way: f-droid.org/packages/com.tanan

It uses this library which implements adb in native java. 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


I believe if the UI is improved (I don't know how you imagine this to look like when it's done), this can be made very user-friendly because it doesn't require one to install adb on a computer.


Now, I didn't quite test what happens when setup is successful because I didn't want to remove my accounts, but it should work exactly as manually, ideally.


Das funktioniert ja so super, danke @clerie <3

Sign in to participate in the conversation

Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.