Closer to a Proper Froyo Limit Removal Fix

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.
  • 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.

adb push settings.db /data/data/com.android.providers.settings/databases/settings.db
About these ads

31 Responses to Closer to a Proper Froyo Limit Removal Fix

  1. Pingback: Successful Android 2.2 SMS Limit Removal! « Dylan Taylor's Personal Blog

  2. DancinDirk says:

    Ok, I can confirm the instructions listed on the blog did work on my evo running the latest EViO Rom! Whoo Hoo!

    • Dylan Taylor says:

      Congratulations! Thanks for letting me know! :)

      • Michael Waters says:

        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 .

      • Michael Waters says:

        Sorry i had a typo.

        Verizon Droid X
        android version 2.2.1
        System version : verizon.2.3.340.MB810.verizon..en.us

    • Metak says:

      dancin dirk, can you help me do the same?

      • Dylan Taylor says:

        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!

      • DancinDirk says:

        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.

  3. Vita says:

    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)

    • Vita says:

      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>

      • Dylan Taylor says:

        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!

  4. Pingback: Just Installed Leaked Epic 4G Froyo ROM « Dylan Taylor's Personal Blog

  5. Vita says:

    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

    • Dylan Taylor says:

      Thanks for letting me know! :)

  6. Pingback: EliteBomb Plus 2.6 Released « Dylan Taylor's Personal Blog (moved to dylanmtaylor.com)

  7. Krispy says:

    Does your device have to be rooted for this?

  8. Ivan says:

    i was not to get it work on Samsung Galaxy S 2.2

  9. Ivan says:

    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?

  10. Ivan says:

    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

  11. V@no says:

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

    • V@no says:

      ops, forgot to thanks for the guide.

      Also, this worked on Motorola Atrix v2.2.2

  12. 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.

  13. Farrukh says:

    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

  14. Pingback: mass/grupp-sms tips? | Swedroid

  15. nico says:

    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? :)

  16. tubaguy50035 says:

    Does not work on Android 2.3.5 MIUI.

  17. Pingback: [ROM] Synergy - [RLS1 + GodMode 08/05/2011] - Now with Warm Sprinkles - Page 9 - Android Forums

  18. Pramod says:

    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?

  19. Izbori 2012 says:

    My friend and I will test this on at least three devices and let you know what comes out.

  20. Pra que fazer um post tão detalhado?
    Porque nem sempre o que é logico pra vc, seja tão intuitivo para as demais pessoas

    1) primeiro de tudo, vc precisa ter o “Android SDK” em seu computador (SE JA TIVER PULE PARA A PARTE 2 )
    COMO FAZER ISSO?
    Caso não tenha, baixe ele em: http://developer.android.com/sdk/index.html
    lembre de baixar a versao “.zip”, ou seja compactada
    descompacte ele na pasta “c:/”
    Com isso vc passou a ter a pasta “c:/android-sdk-windows/”

    2) vc precisa ter o adb instalado no seu computador.( SE JA TIVER PULE PARA A PARTE 3 )
    COMO FAZER ISSO?

    A)
    Defina o caminho no android.
    Aqui nós temos duas maneiras de fazer

    - Primeira opção: Pelo prompt de comando “CMD”.

    Clique no “menu iniciar” e depois em “executar”
    digite “cmd” e clique em “ok”
    digite “cd..” e aperte “enter” umas 3 vezes seguidas
    para que seja mostrado algo como “C:\>”

    digite o seguinte: “set PATH=%PATH%;c:\android-sdk-windows\tools” sem aspas e aperte enter.

    - Segunda Opção:

    No XP
    Botão direito do mouse em Meu Computador e clique em Propriedades
    Clique em avançado
    Clique em Variáveis de Ambiente
    Verifique a variável path e clique no botão Editar
    Marquea variável no final de tudo “;c:\android-sdk-windows\tools” sem aspas

    No Vista e Windows 7

    Vá em Start
    Clique com o botão direito do mouse em COmputador
    Clique em Propriedades
    Clique em Configurações Avançadas do Sistema
    Clique em avançado
    clique em Variáveis de Ambiente
    Marque a variável path e clique no botão Editar
    Adicione a variável no final de tudo “;c:\android-sdk-windows\tools”sem aspas

    ==================================================

    B)
    Execute o arquivo SDK Setup.exe que está dentro da pasta c:/android-sdk-windows

    Agora vamos as configurações e marque a caixa “Force https://… para buscar sources.list usando http:// …”
    e pressione o botão “Save & Apply”

    Depois, vamos onde diz “Available packages” precione o botão “Refresh”

    Marque todos os pacotes e pressione “install selected”

    vai ter uma longa espera para baixar o 900 MB.

    3) coloque o celular em modo depuração.
    COMO FAZER ISSO?
    No seu celular com android, va no icone “configuração”
    entre em “aplicações”
    depois entre em “desenvolvimento”
    e ative a opçao “depuração de usb”
    feito isso, plugue o celular no cabo usb ligado ao computador
    pronto

    4) abra o prompt de comando
    COMO FAZER ISSO?
    Clique no “menu iniciar” e depois em “executar”
    digite “cmd” e clique em “ok”
    digite “cd..” e aperte “enter” umas 3 vezes seguidas
    para que seja mostrado algo como “C:\>”

    5) no prompt de comando abra o adb

    COMO FAZER ISSO?

    A)

    **************************************************
    IMPORTANTE
    **************************************************

    COMO SABER SE ESTA TUDO OK ATE AKI?
    no prompt de comando, digite “adb devices”
    é pra dar um retorno, algo como:

    List of devices attached
    1000b850d0e9 device

    *Lembrando que é algo parecido com isso, não exatamente igual*

    ==================================================

    B)

    no prompt de comando, digite “adb shell”

    **************************************************
    IMPORTANTE
    **************************************************

    vc pode ter dois tipos de retorno:
    $ ou #

    OQUE SIGNIFICA CADA?
    $ vc tem acesso normal ao celular
    # vc tem acesso de Super Usuario

    ( é necessario acesso de Super Usuario para modificar as configurações de limite de sms )

    caso tenha aparecido $ digite “su” e aperte “enter”

    é para ter mudado de $ para #

    caso não tenha mudado, realmente não sei o que fazer pra te ajudar.
    já fiz tantos testes no meu pc que posso ter instalado algo
    que me possibilita entrar como Super Usuario no celular

    6) de permissão para escrita
    COMO FAZER ISSO?

    A)
    tente digitar “remount rw” e aperte “enter”
    se por ventura aparecer algum erro, algo como “not found”

    ==================================================

    B)
    tente digitar:
    “mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system“ e aperte “enter”

    se vc estiver tentando fazer estar modificações no emulador, digite
    “mount -o remount,rw -t yaffs2 /dev/block/mtdblock0 /system“

    Nota: não sei pq muda apenas o mtdblock3 para mtdblock0 no caso do emulador
    apenas sei que funciona…

    7) feito isso saia do adb shell
    COMO FAZER ISSO?
    digite “exit” e aperte “enter”

    8) pegue a tabela de configurações, a tal “settings.db”
    COMO FAZER ISSO?
    no prompt de comand, digite:
    adb pull /data/data/com.android.providers.settings/databases/settings.db

    **************************************************
    IMPORTANTE
    **************************************************
    CASO APARECER UM ERRO DO TIPO “does not exist”
    NÃO SE DESESPERE, TACARA O CELULAR NO CHÃO NÃO AJUDA EM NADA
    O ARQUIVO APENAS ESTA EM OUTRO LUGAR

    Nota: eu ja tinha quebrado 2 celulares ao chegar sempre nesse ponto

    adb pull /dbdata/databases/com.android.providers.settings/settings.db

    **************************************************
    IMPORTANTE 2
    **************************************************
    pode dar erro de acesso negado, eu realmente nao sei como reverter isso.
    no meu caso deu esse erro apenas em 1 aparelho e eu apenas segui em frente…

    9) coloque o arquivo settings.db em um local onde vc possa editar
    COMO FAZER ISSO?
    abra o adb shell novamente e digite su para ter acesso Super Usuario

    A)
    caso no passo 8 tenha dado certo no primeiro passo
    ou caso tenha dado acesso negado no primeiro passo
    digite:
    “cat /data/data/com.android.providers.settings/databases/settings.db > /data/local/settings.db”
    e aperte “enter”

    digite exit para sair do adb shell

    ==================================================

    B)
    caso no passo 8 tenha dado certo no segundo passo
    ou caso tenha dado acesso negado no segundo passo
    digite:
    “cat /dbdata/databases/com.android.providers.settings/settings.db > /data/local/settings.db”
    e aperte “enter”

    digite exit para sair do adb shell

    10) editando o arquivo settings.db

    no prompt de comand, digite:
    “adb pull /data/local/settings.db”

    apos digite:
    “sqlite3 settings.db”

    **************************************************
    IMPORTANTE
    **************************************************
    vc precisa saber qual tabela de configuração existe no seu celular
    para isso digite:

    “select * from secure;” e depois aperte enter

    Caso aparecer o erro: “no such table”, significa que a tabela de configuração tem outro nome.
    tente digitar:

    “select * from gservices;” e depois aperte enter

    Nota: caso não der erro em algum dos comandos, sera listado todo o conteudo da tabela de configuração.

    sabendo o nome da tabela de configuração, digite:

    Caso o nome da tabela de configuração for secure
    “INSERT INTO secure (name, value) VALUES (‘sms_outgoing_check_max_count’, 9999);” e tecle “enter”
    “INSERT INTO secure (name, value) VALUES (‘sms_outgoing_check_interval_ms’, 0);” e tecle “enter”

    Caso o nome da tabela de configuração for gservices
    “INSERT INTO gservices (name, value) VALUES (‘sms_outgoing_check_max_count’, 999999999);” e tecle “enter”
    “INSERT INTO gservices (name, value) VALUES (‘sms_outgoing_check_interval_ms’, 0);” e tecle “enter”

    **************************************************
    IMPORTANTE
    **************************************************

    sabendo o nome da tabela de configuração, digite:

    Caso o nome da tabela de configuração for secure
    digite “select * from secure” e aperte enter para saber se foi inserido as linhas com os valores acima

    Caso o nome da tabela de configuração for gservices
    digite “select * from gservicese aperte enter para saber se foi inserido as linhas com os valores acima

    10) saia do sqlite3, digite “.exit” e aperte “enter”

    11) digite “adb push settings.db /data/local/” e aperte “enter”

    12) entre novamente no adb shell como Super Usuario ( ou seja digite su para aparecer o # )

    13) copie o arquivo modificado do settings.db para o local de origen dele
    COMO FAZER ISSO?
    no adb shell, digite “cd /data/local” e aperte “enter”
    digite “ls” e aperte “enter”, veja se o arquivo “settings.db” esta sendo listado

    A)
    caso no passo 8 tenha dado certo no primeiro passo
    ou caso tenha dado acesso negado no primeiro passo
    digite:
    “cat settings.db > /data/data/com.android.providers.settings/databases/settings.db” e aperte “enter”

    ==================================================

    B)
    caso no passo 8 tenha dado certo no segundo passo
    ou caso tenha dado acesso negado no segundo passo
    digite:
    “cat settings.db > /dbdata/databases/com.android.providers.settings/settings.db” e aperte “enter”

    14) conferindo se o arquivo foi copiado corretamente

    A)
    caso no passo 8 tenha dado certo no primeiro passo
    ou caso tenha dado acesso negado no primeiro passo
    digite:
    “cmp -l /data/local/settings.db /data/data/com.android.providers.settings/databases/settings.db” e aperte “enter”
    se não aparecer nenhum tipo de erro, é pq foi copiado com sucesso
    ou seja, o arquivo editado é igual ao arquivo na pasta de configuracao

    ==================================================

    B)
    caso no passo 8 tenha dado certo no segundo passo
    ou caso tenha dado acesso negado no segundo passo
    digite:
    “cmp -l /data/local/settings.db /dbdata/databases/com.android.providers.settings/settings.db” e aperte “enter”
    se não aparecer nenhum tipo de erro, é pq foi copiado com sucesso
    ou seja, o arquivo editado é igual ao arquivo na pasta de configuracao

    15) resentando o celular
    digite “exit” ate voltar ao prompt de comando
    digite “adb reboot” e aperte “enter”
    aguarde que o celular vai ser rebotado

    16) caso vc tenha chego ate aki, parabens vc conseguiu !!!

  21. SAY THANK YOU for returning this to my eyes, my children will
    benefit a lot.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: