Class 0 SMS (flash SMS) on Android 2.1+

Search This thread

itwt

Member
Oct 20, 2010
30
4
Hi!

Have anyone noticed that Android removed the hidden API sendRawPdu() from the Interface ISms?

androidjavadoc.com/1.0_r1_src/com/android/internal/telephony/gsm/ISms.html

(I'm not allowed to link yet because I'm a new user :D).

The API was still present at 1.6.

Is there a way to implement this into a custom ROM so that we could keep continuing to send these class 0 SMS'? Or is there a new method that I've missed?


Cheers
 

itwt

Member
Oct 20, 2010
30
4
Flash SMS works fine for me.

Not very polished application, but does correctly send flash SMS.

I was under the impression that "FlashSMS" did *not* work with newer Android releases. At least that what I've read about it. The main reason why I'm pursuing this is because MyPhoneExplorer lost it's capability to send class 0 SMS through the phone (after v1.6) due to Android removing the API completely. And it shouldn't be too hard to implement this API in a custom ROM? Anyone?
 

ivarson_swe

Senior Member
Oct 17, 2009
165
17
I was under the impression that "FlashSMS" did *not* work with newer Android releases. At least that what I've read about it. The main reason why I'm pursuing this is because MyPhoneExplorer lost it's capability to send class 0 SMS through the phone (after v1.6) due to Android removing the API completely. And it shouldn't be too hard to implement this API in a custom ROM? Anyone?

Just bought it, didn't work for my, Defrost 5.7.. tried both with regular number and with +46 (my country prefix..) refund!
 

snark_be

Senior Member
Sep 17, 2008
677
75
Nexus 7 (2013)
I was under the impression that "FlashSMS" did *not* work with newer Android releases.
As sais above, it works for me, on a HTC Desire running a rooted Froyo.

Just bought it, didn't work for my, Defrost 5.7.. tried both with regular number and with +46 (my country prefix..) refund!
Did the application crash? Or is the Flash SMS not sent? Maybe it's your operator that blocks Flash SMSes?
 

itwt

Member
Oct 20, 2010
30
4
Hmm, strange.. I wonder what API he used. I might try that app.

I'm still up for implementing the API mentioned, though.
 

ivarson_swe

Senior Member
Oct 17, 2009
165
17
As sais above, it works for me, on a HTC Desire running a rooted Froyo.


Did the application crash? Or is the Flash SMS not sent? Maybe it's your operator that blocks Flash SMSes?

Nothing happened when I hit send. No crash or message. Should have checked logcat, too late now though.. you could be right about lockdown by operator too.. haven't tried sending from that sim card befo..
 

itwt

Member
Oct 20, 2010
30
4
Just bought it, didn't work for my, Defrost 5.7.. tried both with regular number and with +46 (my country prefix..) refund!

Did you get an error or what happened? I just got "SMS send end" popup when I tried to press the send button.

EDIT:
Nevermind, it worked.
 
Last edited:

itwt

Member
Oct 20, 2010
30
4
I just spoke with the author, he's calling the SendRawPdu() method to push the class 0 sms through. So the API must be present in the system after all. Hmm.
 

MotoManiac

New member
Mar 22, 2010
3
0
Flash sms

Flash sms - nothing happend when i hit SEND
Advansed sms sender - "send failed"

HTC Tattoo with 2.3.3 CM7
 

tego

Senior Member
Apr 14, 2008
87
1
Still no luck with class0 on Android? Something like HushSMS would be great!
 

valmil

Member
Nov 16, 2011
13
0
I think the code is missing is the following, that exists in the previous version 2:

grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/1.6_r2/com/android/internal/telephony/IccSmsInterfaceManager.java#IccSmsInterfaceManager.sendRawPdu(byte%5B%5D%2Cbyte%5B%5D%2Candroid.app.PendingIntent%2Candroid.app.PendingIntent[/url])

/**
* Send a Raw PDU SMS
*
* @param smsc the SMSC to send the message through, or NULL for the
* defatult SMSC
* @param pdu the raw PDU to send
* @param sentIntent if not NULL this <code>Intent</code> is
* broadcast when the message is sucessfully sent, or failed.
* The result code will be <code>Activity.RESULT_OK<code> for success,
* or one of these errors:
* <code>RESULT_ERROR_GENERIC_FAILURE</code>
* <code>RESULT_ERROR_RADIO_OFF</code>
* <code>RESULT_ERROR_NULL_PDU</code>.
* @param deliveryIntent if not NULL this <code>Intent</code> is
* broadcast when the message is delivered to the recipient. The
* raw pdu of the status report is in the extended data ("pdu").
*/
public void sendRawPdu(byte[] smsc, byte[] pdu, PendingIntent sentIntent,
PendingIntent deliveryIntent) {
Context context = mPhone.getContext();

context.enforceCallingPermission(
"android.permission.SEND_SMS",
"Sending SMS message");
if (DBG) log("sendRawPdu: smsc=" + smsc +
" pdu="+ pdu + " sentIntent" + sentIntent +
" deliveryIntent" + deliveryIntent);
mDispatcher.sendRawPdu(smsc, pdu, sentIntent, deliveryIntent);
}

create SmsRawData lists from all sms record byte[] Use null to indicate "free" record

Parameters:
messages List of message records from EF_SMS.
Returns:
SmsRawData list of all in-used records
121
122 protected ArrayList<SmsRawData> buildValidRawData(ArrayList<byte[]> messages) {
123 int count = messages.size();
124 ArrayList<SmsRawData> ret;
125
126 ret = new ArrayList<SmsRawData>(count);
127
128 for (int i = 0; i < count; i++) {
129 byte[] ba = messages.get(i);
130 if (ba[0] == STATUS_ON_ICC_FREE) {
131 ret.add(null);
132 } else {
133 ret.add(new SmsRawData(messages.get(i)));
134 }
135 }
136
137 return ret;
138 }


Generates an EF_SMS record from status and raw PDU.

Parameters:
status Message status. See TS 51.011 10.5.3.
pdu Raw message PDU.
Returns:
byte array for the record.
146
147 protected byte[] makeSmsRecordData(int status, byte[] pdu) {
148 byte[] data = new byte[IccConstants.SMS_RECORD_LENGTH];
149
150 // Status bits for this record. See TS 51.011 10.5.3
151 data[0] = (byte)(status & 7);
152
153 System.arraycopy(pdu, 0, data, 1, pdu.length);
154
155 // Pad out with 0xFF's.
156 for (int j = pdu.length+1; j < IccConstants.SMS_RECORD_LENGTH; j++) {
157 data[j] = -1;
158 }
159
160 return data;
161 }
162
163 protected abstract void log(String msg);
164
165}

Compared with the 2.2.1_r1
grepcode.com/file_/repository.grepcode.com/java/ext/com.google.android/android/1.6_r2/com/android/internal/telephony/IccSmsInterfaceManager.java/?v=diff&id2=2.2.1_r1
 
Last edited:

DSH

Member
Jul 25, 2007
28
4
021
hi there, ive tried all the applications!
Flash sms (logo with heart)
Flash sms (Jomego)
HushSMS
advanced sms sender and ...
and all above DOES NOT send class 0 sms for me :(
and there is one apk that i can not try!
https://github.com/virtualabs/ZeroSMS
can any body tell me how can i install that?
ive tried with Quick ADB Pusher v0.5 but i can not do that! :(
 

zakt72

New member
Oct 23, 2008
2
0
hi there, ive tried all the applications!
Flash sms (logo with heart)
Flash sms (Jomego)
HushSMS
advanced sms sender and ...
and all above DOES NOT send class 0 sms for me :(
and there is one apk that i can not try!
can any body tell me how can i install that?
ive tried with Quick ADB Pusher v0.5 but i can not do that! :(

Hi click on the first folder or top folder then select the signed apk and install. Works perfectly with my nexus 4 running minco ROM and Franco kernel r53

---------- Post added at 09:00 PM ---------- Previous post was at 08:54 PM ----------

I used root browser lite to install and download it apk using my phone .if I remember correctly go root browser
Sdcard/ download/ and install from there.