diff --git a/ap/app/flags_tool/src/main.c b/ap/app/flags_tool/src/main.c
index 7e64a78..e035ab9 100755
--- a/ap/app/flags_tool/src/main.c
+++ b/ap/app/flags_tool/src/main.c
@@ -56,17 +56,21 @@
 static int excute_command_init(char *option_para);
 static int excute_command_get(char *option_para);
 static int excute_command_set(char *option_para);
+static int excute_command_switch(char *option_para);
 static int excute_command_get_ubifs_status(char *option_para);
 static int excute_command_set_ubifs_status(char *option_para);
 
 static int excute_command_kernel_get(char *option_para);
 static int excute_command_kernel_set(char *option_para);
 
+static int excute_command_get_nocrc(char *option_para);
+static int excute_command_set_nocrc(char *option_para);
+
 
 /*******************************************************************************
  *                       Global variable declarations                          *
  ******************************************************************************/
-static char * g_short_string = "higsubtq";
+static char * g_short_string = "higswubtqac:";
 
 static struct option g_long_options[] =
 {
@@ -74,10 +78,13 @@
     {"init",				no_argument,	NULL,	'i'},
     {"get",					no_argument,	NULL,	'g'},
     {"set",					no_argument,	NULL,	's'},
+    {"switch",				no_argument,	NULL,	'w'},
     {"get-ubifs-status",	no_argument,	NULL,	'u'},
     {"set-ubifs-status",	no_argument,	NULL,	'b'},
     {"kernel-get",			no_argument,	NULL,	't'},
     {"kernel-set",			no_argument,	NULL,	'q'},
+    {"get-nocrc",			no_argument,	NULL,	'a'},
+    {"set-nocrc",			required_argument,	NULL,	'c'},
     {0, 0, 0, 0}
 };
 
@@ -87,10 +94,13 @@
     {'i',		excute_command_init},
     {'g',		excute_command_get},
     {'s',		excute_command_set},
+    {'w',		excute_command_switch},
     {'u',		excute_command_get_ubifs_status},
     {'b',		excute_command_set_ubifs_status},
     {'t',		excute_command_kernel_get},
-    {'q',		excute_command_kernel_set}
+    {'q',		excute_command_kernel_set},
+    {'a',		excute_command_get_nocrc},
+    {'c',		excute_command_set_nocrc}
 };
 
 
@@ -99,15 +109,18 @@
  ******************************************************************************/
 static void usage(void)
 {
-    printf("flags_tool [-higsub] \n "
+    printf("flags_tool [-higswub] \n "
 		" -h,	--help                  show usage \n"
 		"  -i,	--init                  init flags \n"
 		"  -g,	--get                   get flags data \n"
 		"  -s,	--set                   set flags data \n"
+		"  -w,	--switch                system A/B switch \n"
 		"  -u,	--get-ubifs-status      get ubifs status \n"
 		"  -b,	--set-ubifs-status      set ubifs status \n"
 		"  -t,	--kernel-get            kernel-get flags data \n"
-		"  -q,	--kernel-set            kernel-set flags data \n");
+		"  -q,	--kernel-set            kernel-set flags data \n"
+		"  -a,	--get-nocrc             get-nocrc flags data \n"
+		"  -c,	--set-nocrc             set-nocrc flags data \n");
 
 	return;
 }
@@ -140,6 +153,7 @@
 
 static int excute_command_get(char *option_para)
 {
+	int i = 0;
 	T_FLAGS_INFO flags_info = {0};
 
 	if (flags_get(&flags_info) != 0)
@@ -167,6 +181,15 @@
 		printf("ubifs_status.fs_mtd_name        = %s \n",	flags_info.ubifs_status.fs_mtd_name);
 		printf("ubifs_status.fs_ubi_vol_name    = %s \n",	flags_info.ubifs_status.fs_ubi_vol_name);
 		
+		printf("nvro_flag                       = %u \n",	flags_info.nvro_flag);
+
+		printf("ota_system                      = %d \n",   flags_info.ota_system);
+
+		for (i = 0; i < OTA_PARTITION_NUM_MAX; i++)
+		{
+			printf("index=%d, mtdnum=%d, len=%u          \n", i, flags_info.ota_partiton_info[i].mtdnum, flags_info.ota_partiton_info[i].len);
+		}
+		
 		printf("magic_end                       = 0x%x \n",	flags_info.magic_end);
 		
 	    return 0;
@@ -217,6 +240,37 @@
 	}
 }
 
+static int excute_command_switch(char *option_para)
+{
+	T_FLAGS_INFO flags_info = {0};
+	int ret = -1;
+
+	ret = flags_get(&flags_info);
+	if (ret < 0)
+	{
+		printf("flags switch flags_get fail\n");
+		return ret;
+	}
+	if (flags_info.boot_fota_flag.boot_to == DUAL_SYSTEM)
+	{
+		flags_info.boot_fota_flag.boot_to = DUAL_SYSTEM2;  //A->B
+		printf("flags switch system A to system B\n");
+	}
+	else
+	{
+		flags_info.boot_fota_flag.boot_to = DUAL_SYSTEM;   //B->A
+		printf("flags switch system B to system A\n");
+	}
+	ret = flags_set(&flags_info);
+	if (ret < 0)
+	{
+		printf("flags switch flags_set fail\n");
+		return ret;
+	}
+	printf("flags AB system switch sucess\n");
+
+	return 0;
+}
 
 static int excute_command_get_ubifs_status(char *option_para)
 {
@@ -267,6 +321,7 @@
 
 static int excute_command_kernel_get(char *option_para)
 {
+	int i = 0;
 	int fd = -1;
 	T_FLAGS_INFO flags_info = {0};
 
@@ -302,6 +357,15 @@
 	printf("ubifs_status.fs_mtd_name        = %s \n",	flags_info.ubifs_status.fs_mtd_name);
 	printf("ubifs_status.fs_ubi_vol_name    = %s \n",	flags_info.ubifs_status.fs_ubi_vol_name);
 	
+	printf("nvro_flag                       = %u \n",	flags_info.nvro_flag);
+
+	printf("ota_system                      = %d \n",   flags_info.ota_system);
+
+	for (i = 0; i < OTA_PARTITION_NUM_MAX; i++)
+	{
+		printf("index=%d, mtdnum=%d, len=%u          \n", i, flags_info.ota_partiton_info[i].mtdnum, flags_info.ota_partiton_info[i].len);
+	}
+
 	printf("magic_end                       = 0x%x \n",	flags_info.magic_end);
 	
 	close(fd);
@@ -361,6 +425,141 @@
 }
 
 
+static int excute_command_get_nocrc(char *option_para)
+{
+	int i = 0;
+	T_FLAGS_INFO flags_info = {0};
+
+	if (flags_get_nocrc(&flags_info) != 0)
+	{
+		printf("Err: flags get fail \n");
+		return -1;
+	}
+	else
+	{
+		printf("magic_start                     = 0x%x \n",	flags_info.magic_start);
+		
+		printf("boot_fota_flag.boot_to          = 0x%x \n",	flags_info.boot_fota_flag.boot_to);
+		printf("boot_fota_flag.fota_status      = %u \n",	flags_info.boot_fota_flag.fota_status);
+		printf("boot_fota_flag.system.status    = 0x%x \n",	flags_info.boot_fota_flag.system.status);
+		printf("boot_fota_flag.system.try_cnt	= %d \n",	flags_info.boot_fota_flag.system.try_cnt);
+		printf("boot_fota_flag.system2.status	= 0x%x \n",	flags_info.boot_fota_flag.system2.status);
+		printf("boot_fota_flag.system2.try_cnt	= %d \n",	flags_info.boot_fota_flag.system2.try_cnt);
+		
+		printf("boot_env.dualsys_type           = 0x%x \n",	flags_info.boot_env.dualsys_type);
+		printf("boot_env.system_boot_env        = %s \n",	flags_info.boot_env.system_boot_env);
+		printf("boot_env.system2_boot_env       = %s \n",	flags_info.boot_env.system2_boot_env);
+		
+		printf("ubifs_status.fs_status          = %d \n",	flags_info.ubifs_status.fs_status);
+		printf("ubifs_status.fs_mtd_name        = %s \n",	flags_info.ubifs_status.fs_mtd_name);
+		printf("ubifs_status.fs_ubi_vol_name    = %s \n",	flags_info.ubifs_status.fs_ubi_vol_name);
+		
+		printf("nvro_flag                       = %u \n",	flags_info.nvro_flag);
+		printf("crc32                           = %u \n",	flags_info.crc32);
+		
+		printf("ota_system                      = %d \n",   flags_info.ota_system);
+
+		for (i = 0; i < OTA_PARTITION_NUM_MAX; i++)
+		{
+			printf("index=%d, mtdnum=%d, len=%u          \n", i, flags_info.ota_partiton_info[i].mtdnum, flags_info.ota_partiton_info[i].len);
+		}
+	
+		printf("magic_end                       = 0x%x \n",	flags_info.magic_end);
+		
+	    return 0;
+	}
+}
+
+
+static int excute_command_set_nocrc(char *option_para)
+{
+	T_FLAGS_INFO flags_info = {0};
+	
+	const char delim[2] = ",";
+	char *token_1 = NULL;
+	char *token_2 = NULL;
+	char *token_3 = NULL;
+	char *token_4 = NULL;
+	char *token_5 = NULL;
+	char *token_6 = NULL;
+	
+    if (NULL == option_para)
+    {
+        usage();
+        printf("Command input invalid value! null option parameters! \n");
+        return -1;
+    }
+	
+	if (flags_get_nocrc(&flags_info) != 0)
+	{
+		printf("Err: flags get fail \n");
+		return -1;
+	}
+
+	token_1 = strtok(option_para, delim);
+	if (NULL == token_1)
+	{
+		printf("token_1 delim fail: NULL \n");
+		return -1;
+	}
+	
+	token_2 = strtok(NULL, delim);
+	if (NULL == token_2)
+	{
+		printf("token_2 delim fail: NULL \n");
+		return -1;
+	}
+	
+	token_3 = strtok(NULL, delim);
+	if (NULL == token_3)
+	{
+		printf("token_3 delim fail: NULL \n");
+		return -1;
+	}
+	
+	token_4 = strtok(NULL, delim);
+	if (NULL == token_4)
+	{
+		printf("token_4 delim fail: NULL \n");
+		return -1;
+	}
+	
+	token_5 = strtok(NULL, delim);
+	if (NULL == token_5)
+	{
+		printf("token_5 delim fail: NULL \n");
+		return -1;
+	}
+
+	token_6 = strtok(NULL, delim);
+	if (NULL != token_6)
+	{
+		printf("too many command input, fail \n");
+		return -1;
+	}
+
+    flags_info.boot_fota_flag.system2.try_cnt = atoi(token_1);
+
+	strncpy(flags_info.boot_env.system_boot_env, token_2, sizeof(flags_info.boot_env.system_boot_env));
+
+	flags_info.ubifs_status.fs_status = atoi(token_3);
+	strncpy(flags_info.ubifs_status.fs_mtd_name, token_4, sizeof(flags_info.ubifs_status.fs_mtd_name));
+	
+    flags_info.magic_end = atoi(token_5);
+
+	if (flags_set_nocrc(&flags_info) != 0)
+	{
+		printf("Err: set flags fail \n");
+		return -1;
+	}
+	else
+	{
+		printf("Log: set flags success \n");
+		return 0;
+	}
+}
+
+
 /*******************************************************************************
  *                       Global function declarations                          *
  ******************************************************************************/
