Created
May 9, 2012 07:22
-
-
Save git-core/2642648 to your computer and use it in GitHub Desktop.
su patch: log sdk version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- 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")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Su