Android->DeviceTest:add first time boot go to DeviceTest
This commit is contained in:
@ -169,3 +169,11 @@ service switch_ubuntu /system/bin/busybox sh /system/bin/switch_ubuntu.sh
|
||||
|
||||
on property:app.switch_ubuntu.start=1
|
||||
start switch_ubuntu
|
||||
|
||||
service clear_test /system/bin/systemconfig clear_test
|
||||
class main
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
on property:app.firefly.config=1
|
||||
start clear_test
|
||||
|
||||
@ -388,6 +388,7 @@ public class RecoverySystem {
|
||||
*/
|
||||
public static void rebootWipeUserData(Context context, boolean shutdown, String reason)
|
||||
throws IOException {
|
||||
SystemProperties.set("app.firefly.config","1");
|
||||
UserManager um = (UserManager) context.getSystemService(Context.USER_SERVICE);
|
||||
if (um.hasUserRestriction(UserManager.DISALLOW_FACTORY_RESET)) {
|
||||
throw new SecurityException("Wiping data is not allowed for this user.");
|
||||
|
||||
@ -151,6 +151,11 @@ static int check_perms(const char *name, char *sctx)
|
||||
return 1;
|
||||
}
|
||||
|
||||
if(strcmp("app.firefly.config",name)==0)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
if(!strncmp(name, "ro.", 3))
|
||||
name +=3;
|
||||
|
||||
|
||||
22
vendor/rockchip/common/apps/DeviceTest/lib/systemconfig
vendored
Normal file
22
vendor/rockchip/common/apps/DeviceTest/lib/systemconfig
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
#!/system/bin/sh
|
||||
#copy /system/bin/
|
||||
|
||||
CLEAR_TEST="clear_test"
|
||||
|
||||
|
||||
function clear_test()
|
||||
{
|
||||
mount -o remount,rw /system
|
||||
rm -rf /system/media/devicetest
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
"$CLEAR_TEST")
|
||||
echo "system will get root..."
|
||||
clear_test
|
||||
;;
|
||||
*)
|
||||
echo "unexpected argument."
|
||||
;;
|
||||
esac
|
||||
|
||||
3
vendor/rockchip/common/apps/apps.mk
vendored
3
vendor/rockchip/common/apps/apps.mk
vendored
@ -71,6 +71,9 @@ PRODUCT_PACKAGES += \
|
||||
# $(LOCAL_PATH)/ituxd/lib/x86/libthermalJNI.so:system/lib/libthermalJNI.so
|
||||
endif
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
$(LOCAL_PATH)/DeviceTest/lib/systemconfig:system/bin/systemconfig
|
||||
|
||||
|
||||
###########for box app ################
|
||||
ifeq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)), box)
|
||||
|
||||
Reference in New Issue
Block a user