[Android Software/Hacking General [Developers Only]] baobrien:
A friend of mine and I are in the process of writing an app that will need to send more than 100 SMS messages per hour, in most cases. The purpose of the application would be to allow the user to spam a friend (or enemy) for a prank or similar action. It would be nice to include an option for rooted users to remove the 100 SMS per hour limit present in android. I have written a method that should be able to do this, but Can't get it to work. After running the method, it doesn't seem to change the values in the database.

LimitRemover.java:

-------------------------------------------------------------------------------------------*/
/*Copyright 2010 Brady O'Brien. All rights reserved.	*/
/*	*/
/* Redistribution and use in source and binary forms, with or without modification, are	*/
/*permitted provided that the following conditions are met:	*/
/*	*/
/* 1. Redistributions of source code must retain the above copyright notice, this list of	*/
/* conditions and the following disclaimer.	*/
/*	*/
/* 2. Redistributions in binary form must reproduce the above copyright notice, this list	*/
/* of conditions and the following disclaimer in the documentation and/or other materials	*/
/* provided with the distribution.	*/
/*	*/
/*THIS SOFTWARE IS PROVIDED BY BRADY O'BRIEN ``AS IS'' AND ANY EXPRESS OR IMPLIED	*/
/*WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND	*/
/*FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BRADY O'BRIEN OR	*/
/*CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR	*/
/*CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR	*/
/*SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON	*/
/*ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING	*/
/*NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF	*/
/*ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.	*/
/*	*/
/*The views and conclusions contained in the software and documentation are those of the	*/
/*authors and should not be interpreted as representing official policies, either expressed	*/
/*or implied, of Brady O'Brien.	*/
/*----------------------------------------------------------------------------------------------*/

package com.spamtron.evtron.mayhallobrien;
import java.io.DataOutputStream;
import java.io.IOException;
import android.util.Log;

public class LimitRemover {
public static void removeLimit()
{
try
{
Process p = Runtime.getRuntime().exec("su");
DataOutputStream os = new DataOutputStream(p.getOutputStream());
String SQL = "INSERT INTO gservices (name, value) VALUES ('sms_outgoing_check_max_count', 999999999);\n"
+"INSERT INTO secure (name, value) VALUES ('sms_outgoing_check_max_count', 999999999);\n"
+"INSERT INTO gservices (name, value) VALUES ('sms_outgoing_check_interval_ms', 0);\n"
+"INSERT INTO secure (name, value) VALUES ('sms_outgoing_check_interval_ms', 0);\n"
+".quit";
os.writeBytes("sqlite3 /data/data/com.android.providers.settings/databases/settings.db \n");
os.writeBytes(SQL);
os.writeBytes("exit\n");
os.flush();
}

catch (IOException e)
{
Log.e("Error in removeLimit",e.getMessage());
}
}
}