在終端下修改Android手機(Broncho A1)的系統設定

來源:互聯網
上載者:User

轉載時請註明出處和作者連絡方式
文章出處:http://www.limodev.cn/blog
作者連絡方式:李先靜 <xianjimli@gmail.com>

一位朋友玩Broncho A1的鎖屏圖案,結果手機被鎖住了,輸入google ID也不行(在我這裡可以)。恢複系統吧,他又不想重裝所有軟體,於是我研究了一下在命令列修改系統設定的方法。他不是搞技術的,所以我讓他把 settings.db改個名或者刪除掉,不過那樣做有點暴力。這裡介紹一種稍微麻煩但更友好一點的方法。

1.先要編譯一個sqlite3命令列工具(external/sqlite/dist)。
(需要在Android.mk裡把LOCAL_MODULE_TAGS := debug一行注釋掉)

2.把編譯好的sqlite3上傳到A1上。

# adb push out/target/product/littleton/system/xbin/sqlite3 /data

3.用串口或adb串連到A1的終端上。
adb shell<br /># cd /data<br /># chmod 775 sqlite3

4.用sqlite3操作資料系統設定資料庫。
# ./sqlite3 /data/data/com.android.providers.settings/databases/settings.db

查看資料庫中的表:
sqlite> .tables<br />android_metadata bookmarks secure<br />bluetooth_devices gservices system

查看錶system中的內容:

sqlite> select * from system;<br />1|volume_music|11<br />3|volume_system|5<br />5|volume_alarm|6<br />7|mode_ringer|2<br />8|vibrate_on|4<br />9|mode_ringer_streams_affected|38<br />10|mute_streams_affected|46<br />11|dim_screen|1<br />12|stay_on_while_plugged_in|0<br />13|screen_off_timeout|60000<br />14|airplane_mode_on|0<br />15|airplane_mode_radios|cell,bluetooth,wifi<br />16|auto_time|1<br />17|screen_brightness|102<br />18|window_animation_scale|1.0<br />19|transition_animation_scale|0.0<br />20|accelerometer_rotation|1<br />21|dtmf_tone|0<br />22|date_format|MM-dd-yyyy<br />23|notify_led_color|255<br />24|notify_incoming_call|1<br />25|notify_missed_call|1<br />26|notify_SMS_MMS|1<br />27|notify_email|1<br />28|notify_voice_mail|1<br />29|notify_remind|1<br />63|volume_voice|4<br />64|volume_voice_last_audible|4<br />73|lock_pattern_tactile_feedback_enabled|0<br />111|lock_pattern_visible_pattern|1<br />122|font_scale|1.0<br />127|next_alarm_formatted|<br />129|lock_pattern_autolock|1<br />130|lockscreen.patterneverchosen|1<br />131|volume_notification|5<br />132|volume_notification_last_audible|5<br />133|volume_ring|5<br />134|volume_ring_last_audible|5<br />135|lockscreen.lockedoutpermanently|1

查看錶system的schema:

sqlite> .schema system<br />CREATE TABLE system (_id INTEGER PRIMARY KEY AUTOINCREMENT,name TEXT UNIQUE ON CONFLICT REPLACE,value TEXT);<br />CREATE INDEX systemIndex1 ON system (name);

修改表中相關內容:

sqlite> update system set value='0' where name='lockscreen.lockedoutpermanently';<br />sqlite> update system set value='0' where name='lock_pattern_autolock';<br />sqlite> update system set value='0' where name='lock_pattern_visible_pattern';

退出資料庫:

sqlite> .quit

5.重啟Broncho A1:

/data # reboot

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.