0

I've done some research into creating a simple app that could act as a Bluetooth input device, and discarded the project after finding that it would not currently be possible to use the human interface device profile without rooting the device.

However, is it possible that there is a workaround for this in direct assembly code? This may be a stupid question, and I understand that there may not be any relevant documentation even if it is possible.

But as I understand it, one should be able to access and modify RAM data directly with assembly. If you knew what to change, could you edit the signal to use a different profile?

Alex Coats
  • 115
  • 2
  • 16
  • 1
    The process in which your code runs doesn't get any extra permissions just because you wrote your code in assembly. So I'm afraid it wouldn't do you any good. – Michael Oct 30 '14 at 16:19
  • @Michael: Is the permission checking in Android based on kernel level or on Dalvik virtual machine level? If it is done on Dalvik level it is of course possible to call Linux system calls (Bluetooth is available over the socket() system) without requiring the access rights. – Martin Rosenau Oct 30 '14 at 18:29
  • @MartinRosenau - it is done at multiple levels. Typically, the kernel will deny access to the raw device, permitting only system components running under a VM in a privileged process to access it. And those system components will in turn restrict what they are willing (or even have code to be able) to do on behalf of ordinary application processes. The irony is that using the NDK (C or assembly) often actually *restricts* what you can do, as most proxying to system services is done by Java stubs that encode the details of the IPC communication. – Chris Stratton Oct 30 '14 at 18:33
  • @ChrisStratton - I know that it is possible to set permissions on devices (/dev/xxx). But on system calls? Under Linux Bluetooth is typically (I do not know the implementation used on Android devices) implemented as network socket. As far as I know there is no mechanism to grant or deny applications access to network sockets! – Martin Rosenau Oct 30 '14 at 21:25
  • @MartinRosenau - Nope. Android actually does restrict which apps can use network sockets (that's how it does internet permission). But the socket is not directly to the hardware, but rather to an intermediate system service which limits the allowable operations. The actual hardware device file is locked down and only available to system components. – Chris Stratton Oct 30 '14 at 23:32

0 Answers0