aboutsummaryrefslogtreecommitdiff
path: root/libshims/libsonycamera.cpp
blob: 8d759fe7b6eea2cab2cb8bf875613d8d94b3caa7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <cutils/log.h>
#include <sys/types.h>
#include <dlfcn.h>
#include <string.h>

// Unlock all Sony parameters
extern "C" {
  int property_get(const char * key, char * value, const char * default_value) {
    if (strcmp("ro.build.type", key) == 0) {
      strcpy(value, "eng");
      return 3;
    }

    return ((int( * )(const char * , char *, const char * ))(dlsym((void * ) - 1, "property_get")))(key, value, default_value);
  }
}