Reputation: 21
I am creating a new type of security application that sits at OSI Layer 2/3 and encrypts packets of data flowing between devices. With this proven technology, I can create apps such as Secure Skype, Private Messenger and so forth and I can do things such as blend Triple DES and AES 256 bit encryption (this will eventually be an open source encryption platform) on the same communication channel. We run underneath higher level, more limited, options such as SSL and VPN and we have been working on desktops for years.
The problem is that I cannot figure out how to port my Linux version over to Android due to the need to have admin rights for my app. I do NOT want to try to force people to root their phone and I am looking for some legal option.
In Windows and Apple, you can get your code verified - in Windows it is called Windows Logo verification. In those case, your code is run through a whole series of tests, the source code is signed and that cert is then authorized for admin rights.
Given how Android works, it would seem that a similar option should exist but I cannot find anything.
Can somebody please point me in the right direction?
Thank you very much for your time.
Upvotes: 2
Views: 7514
Reputation: 39451
This is a security measure in Android. If you have low level access to all the packets like that, you can do incredibly evil stuff. Therefore, the OS deliberately makes that access impossible to user apps.
As far as I can tell, the closest equivalent to the Windows Logo Program is convincing an OEM to sign your app with their key or include it in the system partition.
Upvotes: 0
Reputation: 171
I'm pretty sure the only way to get "admin" rights on Android is through having rooted the phone, unfortunately.
If you decide to go ahead with this despite that (I know that isn't what you wanted), I'd recommend libsuperuser. Just using Runtime.getRuntime().exec("su ...")
may not work consistently across all versions of Android and this library provides a way that will work across them (source). You should first check if root exists before running anything, otherwise you may end up just crashing at runtime because the su
binary doesn't exist.
Upvotes: 2