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.
- 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);
- 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.