diff --git a/README.md b/README.md index 09ea818..c789afb 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ * [`Hook Java reflection`](#hook-refelaction) * [`Trace class`](#trace-class) * [`Hooking Unity3d`](https://github.com/iddoeldor/mplus) - +* [`Get Android ID`](#get-android-id)
@@ -963,6 +963,27 @@ TODO
[⬆ Back to top](#table-of-contents) +#### Get Android ID +The [ANDROID_ID](https://developer.android.com/reference/android/provider/Settings.Secure.html#ANDROID_ID) is unique in each application in Android. + + +```javascript +function getContext() { + return Java.use('android.app.ActivityThread').currentApplication().getApplicationContext().getContentResolver(); +} + +function logAndroidId() { + console.log('[-]', Java.use('android.provider.Settings$Secure').getString(getContext(), 'android_id')); +} +``` + +
+Output example +https://stackoverflow.com/a/54818023/2655092 +
+ +
[⬆ Back to top](#table-of-contents) + #### iOS alert box ```js