Communicate with android RIL - android

I'm looking to get access to get low level network information on an android device that isn't available through the api. Is there a way to talk to the RIL to get more information?

Yes. I'm actually messing around that same thing. My hardware uses GSM radio and everything turns around the android internal API. (do a stackoverflow search with "[android] internal API" and you will get tons of info on how to access it). In my case, I'm interested in the data link over the GSM. So, it's in android source code in frameworks/base/telephony/java/com/android/internal/telephony/DataConnectionTracker.java. If you are interested in other features like SMS, SIM cards, voice call or anything that is not available on the standard "public" API, look in the folders frameworks/base/telephony/java/com/android/internal/telephony and the names are pretty relevant to what it does. As for a clear documentation, I did not find it. I think it's not publish since it is not recommended to use the internal APIs because it could change without notice and there is no guaranty an internal API will not change in the next Android version.

Related

Android 10+ telephone call recording support

My goal is to develop an Android app to record telephone call audio (incoming and outgoing calls). Not VoIP, not SIP, not anything else.
IMPORTANT: I will not create an app that relies on workarounds, rooting devices and/or hack it in any way, shape or form.
Surely enough, I also expect to sell this app on Google Play store. In other words: all by the book.
As far as I learned from the documentation (https://developer.android.com), the way to capture phone call audio is by using MediaRecorder with audioSource set to VOICE_CALL. This audio source requires permission "android.permission.CAPTURE_AUDIO_OUTPUT", which in turn is "reserved for use by system components and is not available to third-party applications.".
On the other hand, I also did my research in forums like this. Unfortunately and recpectfully, all of the "solutions" were, in fact, workarounds. Other than that I have found some people stating that the lack of API support was deliberately by design and that kind of app functionality is forbidden by Google. Though, no official references were provided to support those claims.
At this point, looks like it can't be done.
Before giving up, I would like to ask the following:
If It's really by design and forbidden to record phone calls, could you point out where, exactly, in some official documentation and/or some reliable source (like... android team, for instance) that explicitly validates those claims?
Kind regards,
Juan Soria

What can I do with OMAPI on Android Pixel 3 secure element?

The new Android Pixel 3 contains a secure element called Titan M.
First, I am wondering if it is possible to interact with this secure element by using the Open Mobile API (package android.se.omapi) now available on Android 9.
Secondly, I looked at this OMAPI and found that it allows to send APDU messages to applications using ISO 7816 protocol for smart cards. So I would like to know what kind of applications I can interact with.
If it is possible, my aim would be to insert a JavaCard applet into the Titan M secure element and to use OMAPI to send APDU to this applet. Has anybody tried to do that ? I would be happy to get any feedback on what it is possible to do with this API and Pixel 3.
Thanks.
Franck
First, I am wondering if it is possible to interact with this secure element by using the Open Mobile API (package android.se.omapi) now available on Android 9.
At first glance and doing some limited research (mainly because there is limited information available) it doesn't look like this would be the case. That API is mainly intended for SIM cards, and I sincerely doubt with a high level of confidence that a SIM API or functionality is present in the Titan M System-on-a-Chip (with ARM SC300 core, in all likelihood).
Secondly, I looked at this OMAPI and found that it allows to send APDU messages to applications using ISO 7816 protocol for smart cards. So I would like to know what kind of applications I can interact with.
SIM cards and embedded Secure Elements that support an APDU interface on devices that support OMAPI. However, although I would say that Titan M is an embedded Secure element, I would wage that it doesn't use OMAPI and because of that, it won't be available through the API. Actually, I would be surprised if it uses APDU's at all. ISO/IEC 7816-4 is a pain that you can do without if you're able to specify the transport layer yourself.
If it is possible, my aim would be to insert a JavaCard applet into the Titan M secure element and to use OMAPI to send APDU to this applet. Has anybody tried to do that ? I would be happy to get any feedback on what it is possible to do with this API and Pixel 3.
I would find it entirely unlikely that Google is willing to pay license costs to Oracle to be able to implement Java Card. I certainly don't see Google listed in the JCF, which you would expect if you would implement a native Java Card solution yourself.
Finally, there have been many posts that said that the Titan M "firmware" would be released as Open Source by Google. However, that promise never materialized. Note that it is extremely tricky to release such code for secure processors. If a security issue is found that requires a software fix then that fix might have to be applied all over the place, and details of the fix may help adversaries.
So, all said, you will have to do with the high level interfaces that Android offers - as far as I am able to find out.

Mobile device managment for SAFE devices

I am trying to develop a Mobile Device Management Application. I have so far implemented native or basic restrictions (policies) based on http://developer.android.com/guide/topics/admin/device-admin.html
Now I want more access to the device to put more restrictions, I searched and found a page which is almost exactly same for what I want to implement. Below is the page:
http://www.manageengine.com/products/desktop-central/help/mobile_device_management/mdm_android_restrictions.html
I understand that almost all of these require the device to be SAFE. Once I have the SAFE device then where can I find any documentation or source code or samples where I can see how these restrictions are getting implemented in code. I am unable to find any such thing so far. There must be some API or tutorials etc to guide on implementing these.
Please guide me on how to implement these on SAFE device.
You need to register to Samsung Safe program. As soon as you will be member you will have access to
Documentation
Examples
Special API token which will allow you to call these API's

gps tracking on android

I want to make and android gps tracking application that will track other gps devices.
I will write you some of my things that I want but you can tell me if this is possible.
I want to make application in QT ( does QT have libraries for
connecting other gps devices
I want to use google maps ( if that is possible ) - so I can track
Is there any gps locator sdk? So I can buy device and connect it.
Can gps device send me some more information like fuel usage? For example I can make device that will read fuel usage and send me some sort of information to my server.
I need server for that? So I can only pay for some hosting? and maybe make php scripts that will handle me data?
That's probbably it, please respond so I can really see what is possible from all that.
Thank you.
1) While there a way to run Qt apps on Android (http://developer.qt.nokia.com/wiki/Necessitas), I expect it to be a world of pain, as is usually the case with ported frameworks. Plus, very few people are doing what you want to do, so the developer community is probably non-existent (so it would be hard to get help when you get stuck). I would go with "native" for Android Java code and libraries.
The rest of your questions assume you using Qt. If you go native, of course, you can use the Maps SDK, the Android location stuff, etc.
1) I don't know what QT is. I'm assuming it's an app builder of some sort. Don't like 'em. Can't do any cool stuff with them. (That's a personal opinion. Ignore it if you want.)
2) There's no problem using maps in an Android app. See the add on library.
3) Most phones have GPS built in. Why buy an external one?
4) The GPS built in just provides your current location. Stand alone GPS units that can provide fuel information are querying an external database. I don't think they will share. Interfacing to their device for commercial use is very illegal. You could do it only if you are the only one ever going to use it.
5) The Google add ons library has a USB api. If you can design a device, you can talk to it. See 4 about fuel information.
You are going to have to learn how to program an app using Google Maps with GPS, learn the USB api, and find a device that you can electronically understand and can communicate via USB. Then you need to find a site that will allow you to interface with their fuel price database. (There's no way you can personally gather fuel prices nationally in a timely manner.)
You need to refine your specs after you program a basic Maps app that uses GPS. Then at least look at the USP api. Also, if you are looking into building your own electronics device, Google 'Arduino'. (Research USB interfaces with it. Out of the box, it uses an RS232 serial interface.)

Packet Level networking in Android

I know how to develop in Android and use the Apache HTTP lib, but I want to go lower, get hold of the wireless interface adapter and be able to send & receive packets wirelessly. I know its possible since there are sniffer apps in the android market. I have looked around and googled a lot, but can't seem to get any ideas on how to even start. Surprisingly nobody seems to have asked this question on SO before too.
I suppose there is no android API that does it for you. Please suggest a way of sending/receiving packets in android or post references to any such resources.
Thanks!
Note: I know java.net api can be used in android (though I haven't used it before) but that doesn't give me the kind of access I want.
There is no way to do this with the standard SDK/NDK.
On a rooted device, you could possibly call into tcpdump, or another libpcap-based application. There is not a supported way to give Java applications the required privileges on a production Android device.
For example, this blog post describes how to use tcpdump to do a basic packet capture on Android.
Did you have a look at the NDK? Maybe you can do what you want in C(++).
Android OS 4.0 or later provides a VpnService through which you can monitor the network traffic. Application provided at http://www.taosoftware.co.jp/en/android/packetcapture/ uses VpnService that capture the data.

Categories

Resources