get android id
This commit is contained in:
parent
53ba7ccf93
commit
85d02960d3
23
README.md
23
README.md
@ -33,7 +33,7 @@
|
|||||||
* [`Hook Java reflection`](#hook-refelaction)
|
* [`Hook Java reflection`](#hook-refelaction)
|
||||||
* [`Trace class`](#trace-class)
|
* [`Trace class`](#trace-class)
|
||||||
* [`Hooking Unity3d`](https://github.com/iddoeldor/mplus)
|
* [`Hooking Unity3d`](https://github.com/iddoeldor/mplus)
|
||||||
|
* [`Get Android ID`](#get-android-id)
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
@ -963,6 +963,27 @@ TODO
|
|||||||
|
|
||||||
<br>[⬆ Back to top](#table-of-contents)
|
<br>[⬆ 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'));
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Output example</summary>
|
||||||
|
https://stackoverflow.com/a/54818023/2655092
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<br>[⬆ Back to top](#table-of-contents)
|
||||||
|
|
||||||
#### iOS alert box
|
#### iOS alert box
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
Loading…
Reference in New Issue
Block a user