app: aboot: Boot into recovery mode in device tampered state if verified boot is enabled

For tampered state the device should boot up in recovery mode, however, presently it just
asserts depending on the tampered flag.Changing the order for the same.

Change-Id: I9053c9373b038949615514bb1acccddcc240b7b3
diff --git a/app/aboot/aboot.c b/app/aboot/aboot.c
index 1498e98..06ab8f8 100644
--- a/app/aboot/aboot.c
+++ b/app/aboot/aboot.c
@@ -759,18 +759,6 @@
 	set_tamper_flag(device.is_tampered);
 #endif
 
-	if(device.is_tampered)
-	{
-		write_device_info_mmc(&device);
-	#ifdef TZ_TAMPER_FUSE
-		set_tamper_fuse_cmd();
-	#endif
-	#ifdef ASSERT_ON_TAMPER
-		dprintf(CRITICAL, "Device is tampered. Asserting..\n");
-		ASSERT(0);
-	#endif
-	}
-
 #if VERIFIED_BOOT
 	if(boot_verify_get_state() == RED)
 	{
@@ -788,6 +776,19 @@
 		}
 	}
 #endif
+
+	if(device.is_tampered)
+	{
+		write_device_info_mmc(&device);
+	#ifdef TZ_TAMPER_FUSE
+		set_tamper_fuse_cmd();
+	#endif
+	#ifdef ASSERT_ON_TAMPER
+		dprintf(CRITICAL, "Device is tampered. Asserting..\n");
+		ASSERT(0);
+	#endif
+	}
+
 }
 
 static bool check_format_bit()