diff --git a/libpackagelistparser/include/packagelistparser/packagelistparser.h b/libpackagelistparser/include/packagelistparser/packagelistparser.h index 8bcc1e225..d602c26dc 100644 --- a/libpackagelistparser/include/packagelistparser/packagelistparser.h +++ b/libpackagelistparser/include/packagelistparser/packagelistparser.h @@ -53,7 +53,6 @@ struct pkg_info { char *seinfo; gid_list gids; void *private_data; - bool profileable_from_shell; }; /** diff --git a/libpackagelistparser/packagelistparser.c b/libpackagelistparser/packagelistparser.c index 4ce2363df..3e1a3d193 100644 --- a/libpackagelistparser/packagelistparser.c +++ b/libpackagelistparser/packagelistparser.c @@ -223,23 +223,6 @@ extern bool packagelist_parse(pfn_on_package callback, void *userdata) } } - cur = strsep(&next, " \t\r\n"); - if (cur) { - tmp = strtoul(cur, &endptr, 10); - if (*endptr != '\0') { - errmsg = "Could not convert field \"profileable_from_shell\" to integer value"; - goto err; - } - - /* should be a valid boolean of 1 or 0 */ - if (!(tmp == 0 || tmp == 1)) { - errmsg = "Field \"profileable_from_shell\" is not 0 or 1 boolean value"; - goto err; - } - - pkg_info->profileable_from_shell = (bool)tmp; - } - rc = callback(pkg_info, userdata); if (rc == false) { /* diff --git a/run-as/run-as.cpp b/run-as/run-as.cpp index dea191d83..f49bdf720 100644 --- a/run-as/run-as.cpp +++ b/run-as/run-as.cpp @@ -45,7 +45,7 @@ // // - that the ro.boot.disable_runas property is not set // - that it is invoked from the 'shell' or 'root' user (abort otherwise) -// - that '' is the name of an installed and debuggable/profileableFromShell package +// - that '' is the name of an installed and debuggable package // - that the package's data directory is well-formed // // If so, it will drop to the application's user id / group id, cd to the @@ -57,7 +57,6 @@ // during development. // // - Run the 'gdbserver' binary executable to allow native debugging -// - Run simpleperf to allow native profiling // static bool packagelist_parse_callback(pkg_info* this_package, void* userdata) { @@ -197,9 +196,9 @@ int main(int argc, char* argv[]) { error(1, 0, "package not an application: %s", pkgname); } - // Reject packages that are neither debuggable nor profileable from shell. - if (!info.debuggable && !info.profileable_from_shell) { - error(1, 0, "package is neither debuggable nor profileable from shell: %s", pkgname); + // Reject any non-debuggable package. + if (!info.debuggable) { + error(1, 0, "package not debuggable: %s", pkgname); } // Check that the data directory path is valid.