Closer to a Proper Froyo Limit Removal Fix
October 19, 2010 30 Comments
Closer to a Proper Froyo Limit Removal Fix
So, I recently managed to get the limit removed (manually) in the Android 2.2 emulator found in the Android SDK. This proves that it is possible, and I hope to have an automated fix out soon. For those of you who can’t wait (rooted device required) — try this:
- Download the Android SDK
- Put your device into development mode (Go to Settings > Applications > Development, and make sure USB Debugging is enabled)
- Plug your device into your computer’s USB port
- Make sure you are connected to your device by running adb devices
- Use cd to change directory to the tools directory of the SDK
- Run adb shell
- Type su and hit enter
- Type remount rw and hit enter. Depending on your phone, this may not work, and you might get a command not found error. If so, try “mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system“. If you are testing this on the Android Emulator, the command you want is “mount -o remount,rw -t yaffs2 /dev/block/mtdblock0 /system“. If none of these commands work, look for your device’s command to remount the filesystem in read-write mode by searching on Google, and type that instead. This step in not optional. It will not work if you skip this step.
- Now type exit and hit enter, repeat if you aren’t out of adb shell yet
- Type adb pull /data/data/com.android.providers.settings/databases/settings.db and hit enter
- If you get an error saying “failed to copy ‘/data/data/com.android.providers.settings/databases/settings.db’ to ‘./settings.db’: Permission denied”, make sure that you remounted your filesystem in read-write mode. This could be the problem. If it still does not work after you make sure that you remounted your filesystem properly, try these steps which worked for me:
- Go back into adb shell
- Type su and hit enter to get root access
- Type, letter for letter, “cat /data/data/com.android.providers.settings/databases/settings.db > /data/local/settings.db” and hit enter
- Now type exit twice to get out of adb shell
- In your regular terminal (not adb shell) type “adb pull /data/local/settings.db” and hit enter.
- If you get an error saying “failed to copy ‘/data/data/com.android.providers.settings/databases/settings.db’ to ‘./settings.db’: Permission denied”, make sure that you remounted your filesystem in read-write mode. This could be the problem. If it still does not work after you make sure that you remounted your filesystem properly, try these steps which worked for me:
- Type sqlite3 settings.db and hit enter
- Type (letter for letter) these lines, hitting enter after each one:
INSERT INTO gservices (name, value) VALUES ('sms_outgoing_check_max_count', 999999999);
INSERT INTO secure (name, value) VALUES ('sms_outgoing_check_max_count', 999999999);
INSERT INTO gservices (name, value) VALUES ('sms_outgoing_check_interval_ms', 0);
INSERT INTO secure (name, value) VALUES ('sms_outgoing_check_interval_ms', 0);
.quit
- If you are on Android 2.2 or newer, it is perfectly normal to get “no such table” error messages when entering the gservices lines. Just ignore those. It will still work.
- You should be out of the sqlite editor, and back to your shell.
- Type adb push settings.db /data/local/ and hit enter
- Now, go back into adb shell (just type adb shell and hit enter)
- Verify that you have a # in your shell(not a $), which means that you have root access.
- If you do not have a # in your shell, try typing su…
- Type cd /data/local to get to the directory where we just stored the modified settings database
- type ls to list the files in the directory, and verify that settings.db is in the list of files
- Now, letter for letter, type cat settings.db > /data/data/com.android.providers.settings/databases/settings.db and hit enter
- Nothing should appear on the screen. This is perfectly fine.
- Now, let’s verify that the file was written properly before rebooting the phone…
- Type cmp -l /data/local/settings.db /data/data/com.android.providers.settings/databases/settings.db
- Nothing should come up from that either. If something does, the database was not copied properly. Go back to the last cat command step. Otherwise, your database has been modified successfully. Congratulations!
- Now, exit the shell again, by typing exit and hitting enter until you are no longer in adb shell, just like last time.
- The settings file should be updated on your device. This will not be applied until you reboot your device.
- To reboot your phone, type adb reboot and hit enter.
I haven’t tried that method, since automatic removal works perfectly on my Samsung Epic 4G running Android 2.1, but let me know if that works for you by leaving a comment on this post, or by sending me an email. This method has been updated, and it works perfectly on my Samsung Epic 4G running a leaked ROM of Android 2.2.
UPDATE: I recently found out that WordPress changes certain characters slightly, which causes the SQLite commands above to not work properly. The SQLite commands are now in <pre> tags to prevent this from happening. This may be the reason that manual removal failed before for some users. Also, rather than pushing the file directly to the settings database, the guide is updated to push it to /data/local/ and overwrite it as root using cat.
UPDATE 2 (10/21/2010): I successfully got this working on someone’s phone, and they no longer have a sending limit (verified)! Special thanks to Jacob Miller for helping me out and for his patience while we tried commands on his Droid (Original), until we eventually got it working!
This guide has been updated to reflect the changes in the process that were necessary in order to get it to work.
UPDATE 3 (11/12/2010): On my Epic 4G running the leaked Android 2.2 Froyo ROM, I was unable to pull the settings.db file directly. I updated the instructions to include a workaround that worked for me.
NOTE: I have tested this method on the Android 2.2 emulator three different times, and it worked each one. I want to automate the process on actual, rooted devices, but at the moment, it only works on 2.1 unfortunately.


Pingback: Successful Android 2.2 SMS Limit Removal! « Dylan Taylor's Personal Blog
Ok, I can confirm the instructions listed on the blog did work on my evo running the latest EViO Rom! Whoo Hoo!
Congratulations! Thanks for letting me know!
I can confirm that this method also works on the following:
Verizon Droid X
android version 2.2.1
System version : verizon.2.3.240.MB810.verizon..en.us
Yes that is the latest verizon update. It is a new phone i just got, do the ota update to latest version, rooted the phone, and used this method to change the text limit. Thank You Dylan, It was a must that i get the limit removed. I have 168 employees and send out group open shift messages to 168 people. sometime 3 times an hour on busy days. Working Great .
Sorry i had a typo.
Verizon Droid X
android version 2.2.1
System version : verizon.2.3.340.MB810.verizon..en.us
dancin dirk, can you help me do the same?
What can’t you get Metak? I recently added instructions on how to put the phone into development mode, based on a question I got as an email. If you have any trouble, please let me know. Thanks!
Here’s the shortened version. it’s exactly as above without the explanations
Run adb shell
Type su and hit enter
Type remount rw and hit enter.
Now type exit and hit enter, repeat if you aren’t out of adb shell yet
Type adb pull /data/data/com.android.providers.settings/databases/settings.db and hit enter
Type sqlite3 settings.db and hit enter
Type:
INSERT INTO secure (name, value) VALUES (‘sms_outgoing_check_max_count’, 999999999);
INSERT INTO secure (name, value) VALUES (‘sms_outgoing_check_interval_ms’, 0);
.quit
Type adb push settings.db /data/local/ and hit enter
adb shell
Type cd /data/local to get to the directory where we just stored the modified settings database
type ls to list the files in the directory, and verify that settings.db is in the list of files
Now, letter for letter, type cat settings.db > /data/data/com.android.providers.settings/databases/settings.db and hit enter
Type cmp -l /data/local/settings.db /data/data/com.android.providers.settings/databases/settings.db
Nothing should come up from that either. If something does, the database was not copied properly. Go back to the last cat command step.
type exit
type adb reboot and hit enter.
I am really quite new to this and can not quite grasp this process – is there an eta for the auto app or a more basic step by step tutorial? (have brought the elite bomber pro)
I cant even get passed superuser command – am i missing something here? rooted with superoneclick 1.5.5
C:\android-sdk-windows\tools>adb devices
List of devices attached
308730FC57E5 device
C:\android-sdk-windows\tools>adb shell
$ su
su
Permission denied
$ exit
exit
C:\android-sdk-windows\tools>
Working on fixing automatic limit removal for Froyo devices right now, since I have the leaked epic 4g ROM, will hopefully have fix out soon!
Pingback: Just Installed Leaked Epic 4G Froyo ROM « Dylan Taylor's Personal Blog
Got it going – did not realise the phone was coming up with SU permission request.
remount rw did not work but
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system did
Thanks for letting me know!
Pingback: EliteBomb Plus 2.6 Released « Dylan Taylor's Personal Blog (moved to dylanmtaylor.com)
Does your device have to be rooted for this?
i was not to get it work on Samsung Galaxy S 2.2
i think there is something wrong in remount command. In my Galaxy S unit, in /data/data/com.android.providers.settings, there is no “databases” directory, and so no settings.db file
Can someone pls tell me whats wrong?
Sorry, forgot to post error message:
C:\Program Files (x86)\Android\android-sdk-windows\platform-tools>adb pull /data
/data/com.android.providers.settings/databases/settings.db
remote object ‘/data/data/com.android.providers.settings/databases/settings.db’
does not exist
Why do we need pull the settings.db to the computer when we can do it via adb shell in 4 steps:
1) adb shell
2) sqlite3 /data/data/com.android.providers.settings/databases/settings.db
3) INSERT INTO secure (name, value) VALUES (‘sms_outgoing_check_max_count’, 999999999);
4) INSERT INTO secure (name, value) VALUES (‘sms_outgoing_check_interval_ms’, 0);
ops, forgot to thanks for the guide.
Also, this worked on Motorola Atrix v2.2.2
c:\Temp>adb shell
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
# exit
c:\Temp>adb pull /data/data/com.android.providers.settings/databases/settings.db
1399 KB/s (43008 bytes in 0.030s)
c:\Temp>sqlite3 settings.db
SQLite version 3.6.22
Enter “.help” for instructions
Enter SQL statements terminated with a “;”
sqlite> INSERT INTO secure (name, value) VALUES (‘sms_outgoing_check_max_count’, 999999999);
Error: database disk image is malformed
sqlite> INSERT INTO secure (name, value) VALUES (‘sms_outgoing_check_interval_ms’, 0);
Error: database disk image is malformed
sqlite> .quit
c:\Temp>dir settings.db
06/20/2011 06:25 PM 43,008 settings.db
However, I was able to download http://www.sqliteexpert.com/download.html and do the two insert lines and continue on. Not sure why “database disk image is malformed” though. HTC EVO 4G (previously used this exact page and worked fine. Then I re-flashed the new 2.3 ROM this weekend). Same PC and everything though, so it is weird. And yes, there is no ‘gservices’ table, so those lines are not needed.
Worked perfectly on HTC Tattoo (Rom=Gingerbread 2.3.4)
I sent 2000+ bulk sms to almost 55 of my contacts and worked fine.
Thanks a lot for this useful tutorial.
Best regards
Pingback: mass/grupp-sms tips? | Swedroid
Do you have to do this via the adb on the computer?
If you have a rooted Desire can’t you just start the terminal-app and do:
su
sqlite3
and then just enter the sql-queries by hand manually and then just reboot the device after that?
Does not work on Android 2.3.5 MIUI.
Pingback: [ROM] Synergy - [RLS1 + GodMode 08/05/2011] - Now with Warm Sprinkles - Page 9 - Android Forums
This worked fine for android 2.2 devices.
But in devices running 2.3+ the sms_outgoing_check_interval_ms and sms_outgoing_check_max_count are not there in the secure table. Does inserting those values remove the sms limit?
My friend and I will test this on at least three devices and let you know what comes out.
SAY THANK YOU for returning this to my eyes, my children will
benefit a lot.