OSDN Git Service

init: allow to disable SetupWizard
[android-x86/device-generic-common.git] / init.sh
diff --git a/init.sh b/init.sh
index b689341..0a73bd3 100644 (file)
--- a/init.sh
+++ b/init.sh
@@ -198,6 +198,7 @@ function init_hal_gralloc()
                        ;;
        esac
 
+       [ -z "$(getprop ro.hardware.gralloc)" ] && set_property ro.hardware.egl swiftshader
        [ -n "$DEBUG" ] && set_property debug.egl.trace error
 }
 
@@ -540,8 +541,13 @@ for c in `cat /proc/cmdline`; do
                                case $c in
                                        DEBUG=*)
                                                [ -n "$DEBUG" ] && set_property debug.logcat 1
+                                               [ "$DEBUG" = "0" ] || SETUPWIZARD=${SETUPWIZARD:-0}
+                                               ;;
+                                       DPI=*)
+                                               set_property ro.sf.lcd_density "$DPI"
                                                ;;
                                esac
+                               [ "$SETUPWIZARD" = "0" ] && set_property ro.setupwizard.mode DISABLED
                        fi
                        ;;
        esac