diff --git a/test/py/tests/test_avb.py b/test/py/tests/test_avb.py
new file mode 100644
index 0000000..770bdde
--- /dev/null
+++ b/test/py/tests/test_avb.py
@@ -0,0 +1,111 @@
+# Copyright (c) 2018, Linaro Limited
+#
+# SPDX-License-Identifier:  GPL-2.0+
+#
+# Android Verified Boot 2.0 Test
+
+"""
+This tests Android Verified Boot 2.0 support in U-boot:
+
+For additional details about how to build proper vbmeta partition
+check doc/README.avb2
+
+For configuration verification:
+- Corrupt boot partition and check for failure
+- Corrupt vbmeta partition and check for failure
+"""
+
+import pytest
+import u_boot_utils as util
+
+# defauld mmc id
+mmc_dev = 1
+temp_addr = 0x90000000
+temp_addr2 = 0x90002000
+
+def test_avb_verify(u_boot_console):
+    """Run AVB 2.0 boot verification chain with avb subset of commands
+    """
+
+    success_str = "Verification passed successfully"
+
+    response = u_boot_console.run_command('avb init %s' %str(mmc_dev))
+    assert response == ''
+    response = u_boot_console.run_command('avb verify')
+    assert response.find(success_str)
+
+
+def test_avb_mmc_uuid(u_boot_console):
+    """Check if 'avb get_uuid' works, compare results with
+    'part list mmc 1' output
+    """
+
+    response = u_boot_console.run_command('avb init %s' % str(mmc_dev))
+    assert response == ''
+
+    response = u_boot_console.run_command('mmc rescan; mmc dev %s' %
+                                          str(mmc_dev))
+    assert response.find('is current device')
+
+    part_lines = u_boot_console.run_command('mmc part').splitlines()
+    part_list = {}
+    cur_partname = ""
+
+    for line in part_lines:
+        if "\"" in line:
+            start_pt = line.find("\"")
+            end_pt = line.find("\"", start_pt + 1)
+            cur_partname = line[start_pt + 1: end_pt]
+
+        if "guid:" in line:
+            guid_to_check = line.split("guid:\t")
+            part_list[cur_partname] = guid_to_check[1]
+
+    # lets check all guids with avb get_guid
+    for part, guid in part_list.iteritems():
+        avb_guid_resp = u_boot_console.run_command('avb get_uuid %s' % part)
+        assert guid == avb_guid_resp.split("UUID: ")[1]
+
+
+def test_avb_read_rb(u_boot_console):
+    """Test reading rollback indexes
+    """
+
+    response = u_boot_console.run_command('avb init %s' % str(mmc_dev))
+    assert response == ''
+
+    response = u_boot_console.run_command('avb read_rb 1')
+
+
+def test_avb_is_unlocked(u_boot_console):
+    """Test if device is in the unlocked state
+    """
+
+    response = u_boot_console.run_command('avb init %s' % str(mmc_dev))
+    assert response == ''
+
+    response = u_boot_console.run_command('avb is_unlocked')
+
+
+def test_avb_mmc_read(u_boot_console):
+    """Test mmc read operation
+    """
+
+    response = u_boot_console.run_command('mmc rescan; mmc dev %s 0' %
+                                          str(mmc_dev))
+    assert response.find('is current device')
+
+    response = u_boot_console.run_command('mmc read 0x%x 0x100 0x1' % temp_addr)
+    assert response.find('read: OK')
+
+    response = u_boot_console.run_command('avb init %s' % str(mmc_dev))
+    assert response == ''
+
+    response = u_boot_console.run_command('avb read_part xloader 0 100 0x%x' %
+                                           temp_addr2)
+    assert response.find('Read 512 bytes')
+
+    # Now lets compare two buffers
+    response = u_boot_console.run_command('cmp 0x%x 0x%x 40' %
+                                          (temp_addr, temp_addr2))
+    assert response.find('64 word')
