Skip to content

Instantly share code, notes, and snippets.

@git-core
Created May 9, 2012 07:22
Show Gist options
  • Save git-core/2642648 to your computer and use it in GitHub Desktop.
Save git-core/2642648 to your computer and use it in GitHub Desktop.
su patch: log sdk version
--- a/activity.cpp
+++ b/activity.cpp
@@ -27,6 +27,7 @@ extern "C" {
#include "su.h"
#include <private/android_filesystem_config.h>
#include <cutils/properties.h>
+#include <cutils/log.h>
}
using namespace android;
@@ -45,7 +46,8 @@ int send_intent(struct su_initiator *from, struct su_request *
char sdk_version_prop[PROPERTY_VALUE_MAX] = "0";
property_get("ro.build.version.sdk", sdk_version_prop, "0");
- int sdk_version = atoi(sdk_version_prop);
+ int sdk_version = atoi(sdk_version_prop);
+ LOGE("sdk_version = %d (%s)", sdk_version, sdk_version_prop);
sp<IServiceManager> sm = defaultServiceManager();
sp<IBinder> am = sm->checkService(String16("activity"));
@esmaeilshehakijaski
Copy link

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment