Code:
#!/system/bin/sh
# wait
sleep 5
#echo "--- enable Theme";
if [ -e /data/framework-res.apk ];
then
remount rw /system;
mv -f /data/framework-res.apk /system/framework/;
chown root:root /system/framework/framework-res.apk;
chmod 644 /system/framework/framework-res.apk;
remount ro /system;
fi;
# Wait for settings.db to be created
while [ ! -e $DATABASE ]
do
sleep 1
done
sleep 5
#echo "--- Settings from file";
# .tar.gz because of saving privileges ;-)
if [ -e /data/config.tar.gz ];
then
cd /data/;
tar xzf config.tar.gz;
rm -f /data/config.tar.gz;
fi;
/system/xbin/fix_permissions;
sqlite3 /data/data/com.android.providers.settings/databases/settings.db "BEGIN TRANSACTION;
INSERT INTO system (name, value) VALUES ('expanded_widget_buttons', 'toggleWifi|toggleBluetooth|toggleGPS|toggleBrightness|toggleMobileData');
INSERT INTO system (name, value) VALUES ('expanded_network_mode', '0');
INSERT INTO system (name, value) VALUES ('expanded_brightness_mode', '0');
INSERT INTO system (name, value) VALUES ('expanded_screentimeout_mode', '0');
INSERT INTO system (name, value) VALUES ('expanded_ring_mode', '0');
INSERT INTO system (name, value) VALUES ('lockscreen_style_pref', '1');
INSERT INTO system (name, value) VALUES ('statusbar_music_controls', '1');
INSERT INTO system (name, value) VALUES ('statusbar_always_music_controls', '0');
INSERT INTO system (name, value) VALUES ('lockscreen_music_controls', '1');
INSERT INTO system (name, value) VALUES ('lockscreen_always_music_controls', '0');
INSERT INTO system (name, value) VALUES ('dpad_music_controls', '0');
INSERT INTO system (name, value) VALUES ('battery_percentage_status_icon', '0');
INSERT INTO system (name, value) VALUES ('show_status_clock', '1');
INSERT INTO system (name, value) VALUES ('show_plmn_sb', '1');
INSERT INTO system (name, value) VALUES ('hdpi_battery_alignment', '0');
INSERT INTO system (name, value) VALUES ('show_spn_ls', '0');
INSERT INTO system (name, value) VALUES ('show_spn_sb', '0');
INSERT INTO secure (name, value) VALUES ('install_non_market_apps', '1');
COMMIT;";
sqlite3 /data/data/com.android.providers.settings/databases/settings.db "BEGIN TRANSACTION;
update secure set value='1' where name='install_non_market_apps';
update system set value='0' where name='fancy_ime_animations';
update system set value='-1' where name='battery_status_color_title';
update system set value='-1250068' where name='clock_color';
update system set value='-16777216' where name='dbm_color';
update system set value='-855310' where name='date_color';
update system set value='-16777216' where name='plmn_label_color';
update system set value='-8' where name='spn_label_color';
update system set value='-3421237' where name='new_notifications_ticker_color';
update system set value='-1' where name='notifications_count_color';
update system set value='-1' where name='no_notifications_color';
update system set value='-16777216' where name='clear_button_label_color';
update system set value='-1' where name='ongoing_notifications_color';
update system set value='-1' where name='latest_notifications_color';
update system set value='-1' where name='notifications_title_color';
update system set value='-1' where name='notifications_text_color';
update system set value='-1' where name='notifications_time_color';
update system set value='0' where name='show_status_dbm';
update system set value='1' where name='show_plmn_ls';
update system set value='-1' where name='notif_bar_color';
update system set value='0' where name='notif_bar_custom';
update system set value='-1' where name='notif_expanded_bar_color';
update system set value='0' where name='notif_expanded_bar_custom';
update system set value='0.5' where name='window_animation_scale';
update system set value='0.5' where name='transition_animation_scale';
update system set value='1' where name='accelerometer_rotation';
update system set value='1' where name='install_non_market_apps';
update system set value='toggleWifi|toggleBluetooth|toggleGPS|toggleBrightness|toggleMobileData' where name='expanded_widget_buttons';
update system set value='1' where name='lockscreen_style_pref';
update system set value='1' where name='statusbar_music_controls';
update system set value='0' where name='statusbar_always_music_controls';
update system set value='1' where name='lockscreen_music_controls';
update system set value='0' where name='lockscreen_always_music_controls';
update system set value='0' where name='dpad_music_controls';
update system set value='0' where name='battery_percentage_status_icon';
update system set value='1' where name='show_status_clock';
update system set value='1' where name='show_plmn_sb';
update system set value='0' where name='hdpi_battery_alignment';
update system set value='0' where name='show_spn_ls';
update system set value='0' where name='show_spn_sb';
update system set value='0' where name='auto_time';
update system set value='0' where name='lock_home_in_memory';
update system set value='1' where name='lock_mms_in_memory';
update system set value='1' where name='lock_contacts_in_memory';
update system set value='1' where name='lock_phone_in_memory';
update system set value='1' where name='lock_superuser_in_memory';
COMMIT;";
#echo "--- remove firstboot-file";
if [ -e /data/firstboot.sh ];
then
busybox rm -f /data/firstboot.sh;
fi;
echo "+++ Neustart"
sleep 5
reboot
Bookmarks