TelephonyManager.requestNetworkScan - Error 4 modem

284 views
Skip to first unread message

Cawottex

unread,
Feb 11, 2021, 4:18:52 PM2/11/21
to android-platform

I'm developing a privileged system app to scan the network. I have granted the app MODIFY_PHONE_STATE permission.


I try on A10-105F and OnePlus 6.

But when I run the code, the API returns the error "The modem does not support the request scan." (4) from requestNetworkScan callback. 


public void launchScan() int ranLte = AccessNetworkConstants.AccessNetworkType.GERAN; int[] lteBands = {AccessNetworkConstants.GeranBand.BAND_850}; int[] lteChannels = {1}; RadioAccessSpecifier lte = new RadioAccessSpecifier(ranLte, lteBands, lteChannels); RadioAccessSpecifier[] ras = new RadioAccessSpecifier[]{ lte}; int searchPeriodicity = 70; int maxSearchTime = 200; boolean incrementalResults = true; int incrementalResultsPeriodicity = 7; NetworkScanRequest networkScanRequest = new NetworkScanRequest(NetworkScanRequest.SCAN_TYPE_ONE_SHOT, ras, searchPeriodicity, maxSearchTime, incrementalResults,incrementalResultsPeriodicity, null); telephonyManager.requestNetworkScan(networkScanRequest,AsyncTask.SERIAL_EXECUTOR,new MobileNetworkCallBack()); }


Does anyone have any idea how the phone's modem can't scan when it can connect to different networks? I'm trying with different frequency bands/channels

Thanks you 

Notur Business

unread,
Mar 20, 2021, 1:12:26 PM3/20/21
to android-platform
I would not help you.  The android guidelines say that onyl telephone company providers are allowed that privelage level and can run apps that "freak the telephone companies networks".  They are private networks:  you are not a privelaged member.  There are partial directions for telephone companies to use MODIFY_PHONE_STATE, but the directions also say normal "apps" are not allowed to use it, if I am not mistaken please.

If you purchase your own modem, say a voice/fax/data  USB modem supporting a SIM, that would be a different story, that would be between you, who you purchased the device form, and your carrier as to "what you could do on their network and how to gain trust".
Reply all
Reply to author
Forward
0 new messages