readx(fd, cap_buffer, len);
sdb_close(fd);
+ /* This routine is temporarily coded in a state that the app
+ * protocol version design is not complete.
+ * To suppurt 2.3.1 WC payment, this logic MUST be still remained.
+ * This routine is also coded in sdblib. */
ret = match_capability_key_value(cap_buffer, "sdbd_rootperm", "disabled");
+ if (ret == 1) {
+ return ret;
+ }
+ }
+
+ /* This routine is temporarily coded in a state that the app
+ * protocol version design is not complete.
+ * To suppurt 2.4 Emulator, this logic MUST be still remained.
+ * This routine is also coded in sdblib. */
+ /* try to check profile_command version */
+ D("sdbd_rootperm is NOT available. try to check profile_command version\n");
+ char buf[512] = {};
+
+ const char* SHELL_GET_PROFILE_VER_CMD ="shell:/usr/bin/profile_command getversion";
+ fd = sdb_connect(SHELL_GET_PROFILE_VER_CMD);
+
+ if(fd < 0) {
+ // default : not support -G option.
+ return -1;
}
+ if (read_line(fd, buf, sizeof(buf)) > 0) {
+ int major = 0;
+ int minor = 0;
+ if (sscanf(buf, "%d.%d", &major, &minor) == 2) {
+ // major version number at least 4
+ if (major >= 4) {
+ ret = 1;
+ }
+ }
+ }
+ sdb_close(fd);
+
return ret;
}