2

I want to create batch script to enable hidden languages in a Huawei phone. But every time I stuck can you guys spot where is my problem

@echo off
color e
cd "%~dp0"
mode con:cols=90 lines=40
adb wait-for-device
adb shell "su -c ' mount -o rw,remount /data'"
adb push sqlite3 /data/local/tmp/sqlite3
adb shell "su -c ' chmod 0755 /data/local/tmp/sqlite3'"
adb shell /data/local/tmp/sqlite3 -batch /data/data/com.android.providers.settings/databases/settings.db "update systemex SET value='ca_ES,en_US,es_US,es_ES,pt_PT,fr_FR,de_DE,it_IT,ar_EG,ar_MA' where name='white_languages'";

it give me:

Error: unable to open database /data/data/com.android.providers.settings/databases/settings.db : unable to open database file.

Where is the problem and if there is a good way to do it please help me.

  • A guess - perhaps the DB file is locked by Settings? – Andy Yan Sep 10 '16 at 4:52
  • Why not simply use the settings command or content command to edit settings.db? You wouldn't have to directly access that database file, neither you would need sqlite3. – Firelord Sep 10 '16 at 13:42
  • @Firelord can you give an exemple of the commands ? – DREAMER Sep 10 '16 at 15:24
  • first time to hear about the settings or the content command but a come accross one before run it but fail : adb shell settings put systemex white_languages ca_ES,en_US,es_US,es_ES,pt_PT,fr_FR,de_DE,it_IT,ar_EG,ar_MA it give me : /system/bin/sh: settings: not found – DREAMER Sep 10 '16 at 15:37
  • i realy need a deferent aproach : the settings isnt in the android 4.1.1 phone am working on it but exist in an LG 4.4.2 i have so if we can have a solution that can change the settings in settings.db that can work across deferent versions of android at least from 4 to up. – DREAMER Sep 10 '16 at 16:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.