How Android Masks cell broadcast messages that receive from certain channels

Source: Internet
Author: User

Customers found that the 4370~4382 cell broadcast channel was opened, want to block these channels of cell broadcast messages, you can refer to the following settings:

1. Add a macro in Smscbconstants.java (ALPS/FRAMEWORKS/OPT/TELEPHONY/SRC/JAVA/COM/ANDROID/INTERNAL/TELEPHONY/GSM):
public static final int message_id_cbdd_identifier_min = 0x1112; Add by MTK for 4370
public static final int message_id_cbdd_identifier_max = 0x111e; Add by MTK for 4382

2. In Smscbheader.java (alps/frameworks/opt/telephony/src/java/com/android/internal/telephony/gsm), add a judgment:
Public Smscbheader (byte[] PDU, Boolean isetwsprimary) throws illegalargumentexception{
......
Mmessageidentifier = ((pdu[2] & 0xff) <<8) | (Pdu[3] & 0xff);
Add by MTK for 4370 ~ 4382
if (mmessageidentifier >= smscbconstants.message_id_cbdd_identifier_min && mmessageidentifier <= Smscbconstants.message_id_cbdd_identifier_max)
{
return;
}
Add by MTK for 4370 ~ 4382

}

3. Make the following modifications to the Handlegsmbroadcastsms () method in Gsmcellbroadcasthandler.java:
Private Smscbmessage handlegsmbroadcastsms (AsyncResult ar) {
......
Smscbheader Header = new Smscbheader (RECEIVEDPDU, false);
Add by MTK for 4370 ~ 4382
if (Header.getservicecategory () >= smscbconstants.message_id_cbdd_identifier_min && Header.getservicecategory () <= Smscbconstants.message_id_cbdd_identifier_max)
{
return;
}
Add by MTK for 4370 ~ 4382

......
}

Note: The above practices simply do not receive broadcast messages for these channels, but the 4370~4382 channel is still open. If you need to close these channels, you can refer to step 5th.

4, if is the customer preset channel, please check nvram_ef_cb_default_ch_lid and nvram_ef_cb_ch_info_lid and remove. If the channel is a non-customer preset, it is pre-provisioned in the SIM card. You can request to open the macro __cb_channel_only_stored_in_nvram__, so that when the phone starts, do not read the SIM card saved channels. In this way, these channels will not be opened.


There is currently no at command to support the individual shutdown of certain broadcast channels.

How Android Masks cell broadcast messages that receive from certain channels

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.