Skip to content
Browse files

setbtmac: dumb hack to fix permission

When the service runs, the mode set with O_CREAT gets ignored
and is set to rw by owner and nothing else. If the binary is ran
on its own, it works fine. chmod it again because somehow this fixes it.
  • Loading branch information
Dazzozo committed Jan 27, 2013
1 parent 55b3da5 commit 9c65e7784913382ffa802077c1e4af2b98e93569
Showing with 2 additions and 0 deletions.
  1. +2 −0 setbtmac/setbtmac.c
@@ -18,6 +18,7 @@
#include <string.h>
#include <cutils/log.h>
#include <cutils/properties.h>
#include <sys/stat.h>

static const char PROP_SERIALNO[] = "ro.serialno";
static const char PROP_BDADDR[] = "";
@@ -55,6 +56,7 @@ void SetMAC(void)
write(file, bdaddr, strlen(bdaddr));
chmod(FILE_BDADDR, 00600|00060|00006);


0 comments on commit 9c65e77

Please sign in to comment.
You can’t perform that action at this time.