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 toPhoneProxyand was able to callgetAvailableNetworkswhich returned anCommandException- RADIO_NOT_AVAILABLE - Tried to instantinate
RILdirectly. Tried to callgetAvailableNetworkshere with the same result (RADIO_NOT_AVAILABLE). Tried to callregisterForAvaiablewhich never sends message back to Handler. - Tried to connect
LocalSocketto "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
RILmethods 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.