Remove SMS limit?

Search This thread

Decimation001

Member
Jun 22, 2016
30
5
Ok. I think I did it. I extracted the "telephony-common.jar" file from system/framework. I used 7zip to open it and took the classes.dex file out. I placed the classes.dex file into my smali/baksmali folder, decomplied, changed the above line of code in the manner indicated, recompiled.... I opened telephony-common.jar back up (confirmed that classes.dex was not present), copied the newly updated classes.dex file into telephony-common.jar. I placed it into a folder on the device. Using the app Root Explorer I had two tabs open and deleted the original telephony-common.jar file and immediately copy/pasted the new one in it's place. Just to be sure it worked I extracted the classes.dex file again and decompiled it to confirm.

I'll test it out tomorrow with a mass text to all of my sub-contractors. If it works - I'll edit/post the detailed instructions on the first post in this thread.
Any update? It should work if you used the correct hexidecimals.
 

Decimation001

Member
Jun 22, 2016
30
5
Ok. I think I did it. I extracted the "telephony-common.jar" file from system/framework. I used 7zip to open it and took the classes.dex file out. I placed the classes.dex file into my smali/baksmali folder, decomplied, changed the above line of code in the manner indicated, recompiled.... I opened telephony-common.jar back up (confirmed that classes.dex was not present), copied the newly updated classes.dex file into telephony-common.jar. I placed it into a folder on the device. Using the app Root Explorer I had two tabs open and deleted the original telephony-common.jar file and immediately copy/pasted the new one in it's place. Just to be sure it worked I extracted the classes.dex file again and decompiled it to confirm.

I'll test it out tomorrow with a mass text to all of my sub-contractors. If it works - I'll edit/post the detailed instructions on the first post in this thread.
I can also test it out if you want me to. I have all weekend. Just send me the jar.
 

Decimation001

Member
Jun 22, 2016
30
5
Ok. I think I did it. I extracted the "telephony-common.jar" file from system/framework. I used 7zip to open it and took the classes.dex file out. I placed the classes.dex file into my smali/baksmali folder, decomplied, changed the above line of code in the manner indicated, recompiled.... I opened telephony-common.jar back up (confirmed that classes.dex was not present), copied the newly updated classes.dex file into telephony-common.jar. I placed it into a folder on the device. Using the app Root Explorer I had two tabs open and deleted the original telephony-common.jar file and immediately copy/pasted the new one in it's place. Just to be sure it worked I extracted the classes.dex file again and decompiled it to confirm.

I'll test it out tomorrow with a mass text to all of my sub-contractors. If it works - I'll edit/post the detailed instructions on the first post in this thread.

I just fixed it! I patched the jar myself. I set the max to 300 and the check (ms) to 0 so now I can send unlimited texts.
 

shaneaus

Senior Member
Nov 27, 2007
547
17
Austin, Texas
@Decimation001 @hanschke @jhs39
Yep! It seemed to work for me. I, currently have 128 contractors. I sent out a text about work this week. Only issue is I only changed the max texts - not, the frequency in which it checks. I received about 6-8 pop-up messages about allowing a high number of texts. So, I just changed the hexadecimal (in milliseconds) to only check once/hr. This should fix it entirely for me! I'll update the first post on this thread with detailed instructions next week.
 
  • Like
Reactions: Decimation001

ragincajun97

Member
Mar 23, 2011
13
0
I have a Huawei Honor 5x running a custom 7.1.1 ROM. I have been desperately trying to remove this limit so I can message my daughter's soccer team efficiently. I have been trying the suggestions in this thread to no avail. I keep receiving an error that classes.dex is not a dex or odex file. I have used both Dex Manager and a smali/baksmali toolkit. I have successfully de-compiled other dex files so my tools are running correctly. Any suggestions?
 

Decimation001

Member
Jun 22, 2016
30
5
I have a Huawei Honor 5x running a custom 7.1.1 ROM. I have been desperately trying to remove this limit so I can message my daughter's soccer team efficiently. I have been trying the suggestions in this thread to no avail. I keep receiving an error that classes.dex is not a dex or odex file. I have used both Dex Manager and a smali/baksmali toolkit. I have successfully de-compiled other dex files so my tools are running correctly. Any suggestions?
Here is a copy of my modified one.

https://www.dropbox.com/s/f6sqaduplc1k29k/telephony-common.jar?dl=0

Drop it in /system/framework. Replace it but make sure to create a copy of the default one.

This patch has absolutely no sending limits so you should be totally unrestricted.
 

ragincajun97

Member
Mar 23, 2011
13
0
Here is a copy of my modified one.

https://www.dropbox.com/s/f6sqaduplc1k29k/telephony-common.jar?dl=0

Drop it in /system/framework. Replace it but make sure to create a copy of the default one.

This patch has absolutely no sending limits so you should be totally unrestricted.

Thanks for posting the jar file but unfortunately, my device didn't like it. After a lengthy reboot it did not recognize my SIM nor did the GPS function. I replaced the jar file with the original but it still acted flaky. I had to restore a recent backup.
 

Decimation001

Member
Jun 22, 2016
30
5
Thanks for posting the jar file but unfortunately, my device didn't like it. After a lengthy reboot it did not recognize my SIM nor did the GPS function. I replaced the jar file with the original but it still acted flaky. I had to restore a recent backup.

Sorry about that. It must be because you're on a different device. If you send me your copy of the default one I can modify it if you'd like.
 
  • Like
Reactions: ragincajun97

iliehar

Member
Nov 26, 2010
12
1
Help Decimation

Please Decimation001 help us to edit step by step .
Dex file is difficult to change, and give us inside what line you changed.
Step by step is very good.
Thank you:confused:
 

Decimation001

Member
Jun 22, 2016
30
5
Please Decimation001 help us to edit step by step .
Dex file is difficult to change, and give us inside what line you changed.
Step by step is very good.
Thank you:confused:

1. You are going to need the tool "apktool"

2. Extract your "telephony-common.jar" file from the folder "system/framework/" in the root partition and move it to your computer

3. Shift-click in the folder you put your telephony file. Click "Open command window here".

4. Type: "
Code:
apktool d telephony-common.jar
" and run it.

5. Once it's decompiled, navigate to "telephony-common.jar.out\smali\com\android\internal\telephony"

6. Find the file "SmsUsageMonitor$SettingsObserver.smali" and open it in any editor.

7. Find the line containing:
Code:
.line 248
    const-string/jumbo v2, "sms_outgoing_check_max_count"

    const/16 v3, 0x1e

and/or:

Code:
.line 250
    const-string/jumbo v2, "sms_outgoing_check_interval_ms"

    const v3, 0xea60

8. Now change the values "0x1e" and/or "0xea60" to your desired values in hexadecimal format. The value "0x1e" corresponds to "30" in decimal format and the value "0xea60" to "60000".
If you wanted the value "0" for both, change them to "0x0". Changing them both to "0x0" would allow you to send unlimited texts within an unlimited amount of time.

9. Now, to recompile the jar, run this command: "
Code:
apktool b telephony-common.jar.out
"

10. Navigate to "telephony-common.jar.out\build\apk" and get the "classes.dex" file.

11. Open the original "telephony-common.jar" in any archive tool (7zip, WinRAR) and replace the "classes.dex" file with the one you recompiled.

12. You now have your patched "telephony-common.jar"

13. Simply replace the default one in "system/framework/" with the one you patched. Also be sure that the permissions match the original one.
 

iliehar

Member
Nov 26, 2010
12
1
Thanks

Hello
Thank you veri Much but I dont Find in telephony-common.jar.out ,, smali'' , I use android 7.
One friend tell me the file is inside ,,boot-telephony-common.oat''
System/framework/arm/Boot_telephony_common.oat
I need to decompile and compile that file.
Thanks for help
 
Last edited:

Mikegrmn

Senior Member
Aug 24, 2013
620
199
I was somewhat curious about why one would need to send so many text messages in such a short time that would trigger the Text limit. I can see the point in sending 140 texts at once on new years, but then again, and sorry if this is no help for circumventing this limit but rather a "thank you" for the developers who have implemented this limit and made it even harder to get around it.
There are still phone plans around the world where every text costs a certain amount of money. On my plan it´s somewhat of a flat fee that cannot be exceeded, but if someone would trigger my phone to send 400 texts at once, my text and voice plan would be depleted. In the past, there were cases around here, where malicious code triggered hundreds of texts in a short amount of time resulting in horrendous charges for the owner of a phone (remember the old nokias where you have to hit one key multiple times to get to the letter you needed???? although you could basically prove that this couldn´t have happened from your grannys phone, carriers never gave up on collecting the money) going into thousands of bucks.
Like stated at the beginning, I can see a limited application to legally send a lot of texts at once (like the amber alerts in the US), but mostly, I can see this deployed for illegal reasons. You may have a legit application to send so many texts, but seeing all the harm that can be done with it also, I´m quite glad to read that it´s not easy to circumvent.
Rather than sending so many texts, I´d rather use any of the apps that would send messages to a group of people like whatsapp or similar. Even google hangouts could do it.
I know there are still people not having smartphones where an app wouldn´t work, but if all the people you want to reach would own such phones, you wouldn´t deal with reverse engineering apps as you most likely wouldn´t own a smartphone either.

So, this is just my take on it and my 2 cents. If anyone comments on this as not helping this "project" getting further (which I actually said within my post that it won´t help the project) or if it gets insulting replies, I won´t comment back. If this triggers a nice discussion about why private entities would really need to send mass texts, I´m more than glad to come back to discuss and have others convince me why this is useful.
 

iliehar

Member
Nov 26, 2010
12
1
I was somewhat curious about why one would need to send so many text messages in such a short time that would trigger the Text limit. I can see the point in sending 140 texts at once on new years, but then again, and sorry if this is no help for circumventing this limit but rather a "thank you" for the developers who have implemented this limit and made it even harder to get around it.
There are still phone plans around the world where every text costs a certain amount of money. On my plan it´s somewhat of a flat fee that cannot be exceeded, but if someone would trigger my phone to send 400 texts at once, my text and voice plan would be depleted. In the past, there were cases around here, where malicious code triggered hundreds of texts in a short amount of time resulting in horrendous charges for the owner of a phone (remember the old nokias where you have to hit one key multiple times to get to the letter you needed???? although you could basically prove that this couldn´t have happened from your grannys phone, carriers never gave up on collecting the money) going into thousands of bucks.
Like stated at the beginning, I can see a limited application to legally send a lot of texts at once (like the amber alerts in the US), but mostly, I can see this deployed for illegal reasons. You may have a legit application to send so many texts, but seeing all the harm that can be done with it also, I´m quite glad to read that it´s not easy to circumvent.
Rather than sending so many texts, I´d rather use any of the apps that would send messages to a group of people like whatsapp or similar. Even google hangouts could do it.
I know there are still people not having smartphones where an app wouldn´t work, but if all the people you want to reach would own such phones, you wouldn´t deal with reverse engineering apps as you most likely wouldn´t own a smartphone either.

So, this is just my take on it and my 2 cents. If anyone comments on this as not helping this "project" getting further (which I actually said within my post that it won´t help the project) or if it gets insulting replies, I won´t comment back. If this triggers a nice discussion about why private entities would really need to send mass texts, I´m more than glad to come back to discuss and have others convince me why this is useful.

If I create a long mesage and send to many person (group), alarm. The cost is me problem, if the android sistem stop is not corect, an avertisation is ok but if I accept is me problem.
 

Mikegrmn

Senior Member
Aug 24, 2013
620
199
If I create a long mesage and send to many person (group), alarm. The cost is me problem, if the android sistem stop is not corect, an avertisation is ok but if I accept is me problem.

I think this is a case I covered in my post. Why does it have to be a text? Can't you use some group chat app instead? And if there is one or two persons not having a smartphone, send a text to those seperately? Just asking. I know this would be a small inconvenience, but if it's really needed, it wouldn't matter that much. Not sure if I would go through such great lengths to achieve this, unless I would need it on a daily basis. But once every year for new years?!?
 

5.1

Senior Member
Mar 18, 2012
1,318
548
haguenau
I think this is a case I covered in my post. Why does it have to be a text? Can't you use some group chat app instead? And if there is one or two persons not having a smartphone, send a text to those seperately? Just asking. I know this would be a small inconvenience, but if it's really needed, it wouldn't matter that much. Not sure if I would go through such great lengths to achieve this, unless I would need it on a daily basis. But once every year for new years?!?

Hi... It sounds @shaneaus needs this option for work purpose. Maybe sending a simple SMS is more convenient than asking ~100 people to install a third party app?!

Also, this modification doesn't seem to take much time to achieve once you know what you're looking for.

Personally, I don't need to send so much text messages, but it's great to see android yet offers a way to workaround (almost) any issue one can encounter. :)
 
  • Like
Reactions: iliehar

iliehar

Member
Nov 26, 2010
12
1
1. You are going to need the tool "apktool"

2. Extract your "telephony-common.jar" file from the folder "system/framework/" in the root partition and move it to your computer

3. Shift-click in the folder you put your telephony file. Click "Open command window here".

4. Type: "
Code:
apktool d telephony-common.jar
" and run it.

5. Once it's decompiled, navigate to "telephony-common.jar.out\smali\com\android\internal\telephony"

6. Find the file "SmsUsageMonitor$SettingsObserver.smali" and open it in any editor.

7. Find the line containing:
Code:
.line 248
    const-string/jumbo v2, "sms_outgoing_check_max_count"

    const/16 v3, 0x1e

and/or:

Code:
.line 250
    const-string/jumbo v2, "sms_outgoing_check_interval_ms"

    const v3, 0xea60

8. Now change the values "0x1e" and/or "0xea60" to your desired values in hexadecimal format. The value "0x1e" corresponds to "30" in decimal format and the value "0xea60" to "60000".
If you wanted the value "0" for both, change them to "0x0". Changing them both to "0x0" would allow you to send unlimited texts within an unlimited amount of time.

9. Now, to recompile the jar, run this command: "
Code:
apktool b telephony-common.jar.out
"

10. Navigate to "telephony-common.jar.out\build\apk" and get the "classes.dex" file.

11. Open the original "telephony-common.jar" in any archive tool (7zip, WinRAR) and replace the "classes.dex" file with the one you recompiled.

12. You now have your patched "telephony-common.jar"

13. Simply replace the default one in "system/framework/" with the one you patched. Also be sure that the permissions match the original one.

Hello

If you help me I buy you a coffee.
System/framework/arm/Boot_telephony_common.oat
I belive the fille SmsUsageMonitor$SettingsObserver.smali is inside.
Thank you
 

Attachments

  • boot-telephony-common.rar
    1.6 MB · Views: 34

max_artman

New member
Mar 20, 2017
3
0
Thanks to all of you guys!

Had the same problem since flashing LineageOS but with Decimation001's guide now everything is fine again.
The only thing you should perhaps mention is that the filesystem has to be mounted writeable (before 13.):

Code:
mount -o rw,remount /system

After that you can mount it again as read-only:

Code:
mount -o ro,remount /system

Thanks and greetings from Austria, MW
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    Please Decimation001 help us to edit step by step .
    Dex file is difficult to change, and give us inside what line you changed.
    Step by step is very good.
    Thank you:confused:

    1. You are going to need the tool "apktool"

    2. Extract your "telephony-common.jar" file from the folder "system/framework/" in the root partition and move it to your computer

    3. Shift-click in the folder you put your telephony file. Click "Open command window here".

    4. Type: "
    Code:
    apktool d telephony-common.jar
    " and run it.

    5. Once it's decompiled, navigate to "telephony-common.jar.out\smali\com\android\internal\telephony"

    6. Find the file "SmsUsageMonitor$SettingsObserver.smali" and open it in any editor.

    7. Find the line containing:
    Code:
    .line 248
        const-string/jumbo v2, "sms_outgoing_check_max_count"
    
        const/16 v3, 0x1e

    and/or:

    Code:
    .line 250
        const-string/jumbo v2, "sms_outgoing_check_interval_ms"
    
        const v3, 0xea60

    8. Now change the values "0x1e" and/or "0xea60" to your desired values in hexadecimal format. The value "0x1e" corresponds to "30" in decimal format and the value "0xea60" to "60000".
    If you wanted the value "0" for both, change them to "0x0". Changing them both to "0x0" would allow you to send unlimited texts within an unlimited amount of time.

    9. Now, to recompile the jar, run this command: "
    Code:
    apktool b telephony-common.jar.out
    "

    10. Navigate to "telephony-common.jar.out\build\apk" and get the "classes.dex" file.

    11. Open the original "telephony-common.jar" in any archive tool (7zip, WinRAR) and replace the "classes.dex" file with the one you recompiled.

    12. You now have your patched "telephony-common.jar"

    13. Simply replace the default one in "system/framework/" with the one you patched. Also be sure that the permissions match the original one.
    2
    If the limit is built into Android why is nobody else having the same problem as you? Do you do something with your SMS that the average user doesnt't? Are you using your SMS to send advertising to large numbers of people, for instance?

    I don't understand why you are even asking this... I appreciate you willingness to help out. But... If you can't help out - just don't respond. You have exhibited that you don't have any knowledge of the settings we are speaking of - AND, I explained the setting is now in the framework. So, unless you know of a way to modify the framework without building a custom ROM - then, please stop implying that we don't have an issue - just because you don't understand what the issue is...

    Your first response "The limit is probably set by your carrier" was uneducated speculation.
    Your second response included several questions the OP had answered in his original post - he stated he had researched the issue, was using a custom rom/kernel... Then, you followed that up by more speculation: "Maybe a third party program is causing the issue. ."
    Your third response isn't helpful as you merely question the OP's knowledge that he even knows he has an issue: "I've never heard of a text message limit on the Nexus 6P." Basically, you just admit your ignorance of there being an issue: " I've heard of limits on the latter two but not on total number of messages that can be sent." Which would imply to most that you won't have any knowledge of how to fix said issue.
    Your forth response is to suggest there is malware? Again implying that the OP has no idea about what they are speaking.

    Finally, when I post and explain that the setting was once there and easily modified with a build.prop change and that the code was moved...
    You again imply that we have some sort of 'phantom issue:' "why is nobody else having the same problem as you?"

    If you don't know the answer why waste our time? Do a search and you could easily find another post or two here on XDA in which I explained my situation/problem...

    Once again, if you can help - we will surely appreciate any assistance! But, if you don't KNOW how to help; please, don't continue to ask questions which suggest we don't know what we are talking about.
    @Decimation001 - I did some research and inside the framework there are two sections related to "telephony" (which is where it appears the settings were moved). Seems they are ODEX files. Might be able to de-compile, make a correction, re-compile, replace in current ROM. I'll start looking into it over the next week or so.
    2
    I guess you can keep talking to yourself then.
    1
    The SMS limit is built into Android. Previous to N it was a setting that could be altered in the build.prop and an option to change it was baked into RR. With N the settings were moved into the framework (from what I could find it appears it the telephony section?) and the option to change the setting was not baked into the new ROMs.

    I have made several posts requesting info on how to change this - but, no one has responded (either they don't know, don't care, or haven't seen my posts). I need this option for work so badly in selling to learn how to build my own ROM. But, not worth getting started if I don't know how to fix the one important thing I need changed.
    If the limit is built into Android why is nobody else having the same problem as you? Do you do something with your SMS that the average user doesnt't? Are you using your SMS to send advertising to large numbers of people, for instance?
    1
    Another metod worck on non rooted phone, I use on Android 8 and 7.
    0.instal in your phone
    https://play.google.com/sto...
    and open
    1-put drivers for ypur phone to see with compyuter your phone
    2-Downlad and rename the folder with adb and put this in pertition C
    https://drive.google.com/fi...
    3-open comand promt like administrator and tape:
    cd C:\adb
    and see C:\adb>
    tape C:\adb>adb devices
    and see
    List of devices attached
    ZY223R3KT5 device
    if you see unauthorized You need to accept in your phone, one popup apear and give compiuter acces.
    tape adb shell pm grant by4a.setedit22 android.permission.WRITE_SECURE_SETTINGS
    and see
    C:\adb>
    Restart the phone
    4.Open in our phone
    Settings Database Editor.apk and add in bouth this
    category (system,secure,global) new settings
    on top is +Add new settings push them
    and tape sms_outgoing_check_max_count and value 99999
    and restart
    And now you can send a lot off message.