app: aboot: Add support to set oem unlock as true

Add support to set oem unlock as true.

Change-Id: I27e58834e8b88e7a25a0041f8c2048d0b6f2afaf
diff --git a/app/aboot/aboot.c b/app/aboot/aboot.c
index 531ff4e..9ac8d36 100644
--- a/app/aboot/aboot.c
+++ b/app/aboot/aboot.c
@@ -1874,6 +1874,19 @@
 	write_device_info(&device);
 }
 
+void set_oem_unlock()
+{
+	if(!device.is_unlocked) {
+		if(!is_allow_unlock) {
+			fastboot_fail("oem unlock is not allowed");
+			return;
+		}
+
+		device.is_unlocked = 1;
+		write_device_info(&device);
+	}
+}
+
 #if DEVICE_TREE
 int copy_dtb(uint8_t *boot_image_start, unsigned int scratch_offset)
 {
diff --git a/include/platform.h b/include/platform.h
index 9c8e698..3a00cdb 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -72,4 +72,5 @@
 int platform_is_msm8996();
 uint64_t platform_get_ddr_start();
 bool platform_use_qmp_misc_settings();
+void set_oem_unlock();
 #endif