Disclaimer - I know how calling non-API methods can affect my application. It's not going to be published on Google Play, I'm creating it just for personal use.
Task - get available network operators on rooted phone (Android 2.3.3). Model is known.
What have I tried
A lot of reflection:
- Tried to get
PhoneFactory
, get defaultPhone
(getDefaultPhone
) orGSMPhone
. I've received an actual reference toPhoneProxy
and was able to callgetAvailableNetworks
which returned anCommandException
- RADIO_NOT_AVAILABLE - Tried to instantinate
RIL
directly. Tried to callgetAvailableNetworks
here with the same result (RADIO_NOT_AVAILABLE). Tried to callregisterForAvaiable
which never sends message back to Handler. - Tried to connect
LocalSocket
to "rild". GettingIOException: Permission denied
I've tried everything above with my app stored at /system/app/
- results are same.
Question
- Is it even possible to access
RIL
methods without signing my app with system key or using custom Android build? - Maybe I can overcome this issues by building app directly for Linux?
- Any advice on this problem is highly appreciated.