diff --git a/orscmd/orscmd.cpp b/orscmd/orscmd.cpp
index 53c5bc0..c008450 100644
--- a/orscmd/orscmd.cpp
+++ b/orscmd/orscmd.cpp
@@ -13,12 +13,20 @@
 		along with TWRP.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#define __STDC_FORMAT_MACROS 1
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
 #include <string.h>
 #include <fcntl.h>
+#include <errno.h>
+#include <inttypes.h>
+
+// for setcap and getcap
+#include <sys/capability.h>
+#include <sys/xattr.h>
+#include <linux/xattr.h>
 
 #include "orscmd.h"
 #include "../variables.h"
@@ -44,6 +52,45 @@
 	printf("\nSee more documentation at http://teamw.in/openrecoveryscript\n");
 }
 
+int do_setcap(const char* filename, const char* capabilities)
+{
+	uint64_t caps;
+	if (sscanf(capabilities, "%" SCNi64, &caps) != 1)
+	{
+		printf("setcap: invalid capabilities \"%s\"\n", filename);
+		return 1;
+	}
+	struct vfs_cap_data cap_data;
+	memset(&cap_data, 0, sizeof(cap_data));
+	cap_data.magic_etc = VFS_CAP_REVISION | VFS_CAP_FLAGS_EFFECTIVE;
+	cap_data.data[0].permitted = (uint32_t) (caps & 0xffffffff);
+	cap_data.data[0].inheritable = 0;
+	cap_data.data[1].permitted = (uint32_t) (caps >> 32);
+	cap_data.data[1].inheritable = 0;
+	if (setxattr(filename, XATTR_NAME_CAPS, &cap_data, sizeof(cap_data), 0) < 0) {
+		printf("setcap of %s to %" PRIx64 " failed: %s\n",
+				filename, caps, strerror(errno));
+		return 1;
+	}
+	return 0;
+}
+
+int do_getcap(const char* filename)
+{
+	struct vfs_cap_data cap_data;
+	memset(&cap_data, 0, sizeof(cap_data));
+	int rc = getxattr(filename, XATTR_NAME_CAPS, &cap_data, sizeof(vfs_cap_data));
+	if (rc > 0)
+	{
+		uint64_t caps = (uint64_t) cap_data.data[1].permitted << 32 | cap_data.data[0].permitted;
+		printf("0x%" PRIx64 "\n", caps);
+	}
+	else
+		printf("getcap of %s failed: %s\n", filename, strerror(errno));
+
+	return rc > 0;
+}
+
 int main(int argc, char **argv) {
 	int read_fd, write_fd, index;
 	char command[1024], result[512];
@@ -57,6 +104,25 @@
 		return 0;
 	}
 
+	if (strcmp(argv[1], "setcap") == 0) {
+		if (argc != 4)
+		{
+			printf("Usage: setcap filename capabilities\n\n"
+				"capabilities must be specified as a number. Prefix with 0x for hexadecimal.\n");
+			return 1;
+		}
+		return do_setcap(argv[2], argv[3]);
+	}
+
+	if (strcmp(argv[1], "getcap") == 0) {
+		if (argc != 3)
+		{
+			printf("Usage: getcap filename\n");
+			return 1;
+		}
+		return do_getcap(argv[2]);
+	}
+
 	sprintf(command, "%s", argv[1]);
 	for (index = 2; index < argc; index++) {
 		sprintf(command, "%s %s", command, argv[index]);
