Hi,
first of all thanks for accepting me to the group. And now the question/story.
I'm currently trying to port the TaintDroid framework, that it works with VirtualBox. The reason for that is, that I need Bluetooth access for my project, which is not provided within the Android emulator. I managed to update TaintDroid from 4.3 to 4.4.4 through 4.3.1, however the Bluetooth doesn't seem to cooperate.
The Bluetooth USB-Adapter seems to work as expected. If I download one of the official ISOs from the website, they boot without an issue, and They can start my BLE-Testapp without an issue. (Testproject here:
https://github.com/googlesamples/android-BluetoothLeGatt) However if I build the ISO myself (even without the TaintDroid changes) the bluetoothd daemon crashes partially on start. After adding a lot of Log-Outputs to the Bluez library I managed to trace the origin of the error.
As the Bluez initializes the Gatt sub-system for BLE it tries to use the Cryptop API of the kernel, however it can't bind to the socket as it throws a "No such file or directory"-Error. To test this efficiently and relatively independent from the big Android system I wrote a small test-program. (Test program here:
https://gist.github.com/stiefel40k/bb86cfc62a4de40172d96b91a1436091) The issue comes as soon as bind is called.
To be clear this test works on my laptop as well as inside an official image. Only the images I build fail.
My first idea was, that the kernel was probably configured wrong, or it doesn't support the desired algorithms. The second idea was quickly dropped, as every supported algorithm is listed in /proc/crypto. To verify this one can unload for example the Intel AES module, and quickly a big portion of the algorithms disappear and upon loading the module reappear. So it leaves us with the kernel config. Unfortunately the android-x86 kernels are not configured to export their config into proc so I had to improvise. At the start I used the default kernel config, which indeed doesn't support user-space access to the kernel Crypto API, so I quickly changed that and recompiled the kernel (to be honest without clean). And started the new ISO, but binding error stayed.
My next idea was, that the kernel still might be configured wrong, so I extracted the kernel image from the original ISO which I downloaded, rebuilt the ISO with this kernel image and spun it up again, and the error is still there. What I didn't do until now, is that putting my kernel into the original image, and see what happens, because if it works fine, would mean that the kernel itself is correct, but something else is wrong.
At this point I'm a bit lost and I was wondering if somebody could either provide the original kernel configs for Android 4.4 and 5.1, or guide me to a new direction which might solve this issue.
Thanks for the help in advance!
Cheers,
stiefel