[AT&T Samsung Galaxy Note5] droidvoider:
**** Warning **** Disabling the wrong thing this way can cause the phone to crash so hard you need to flash firmware to restore it. Make sure you have backed up and that you have your firmware ready. Also be warned that in my experience devices can suddenly crash & need repair from doing this type of stuff!!

Stern Warning: You need your current matching firmware before doing this!! You can make a copy of your own firmware following directions on this forum. The info about your firmware is in SYSTEM | ABOUT

tESted on firmware N920AUCS4CPK1 Android 6.01 w/Nov. Sec. Patch

Overview of the process

We are going to do a various pronged assault using App Archiving / Restoring with a Google Play app as well as attacking a select set of permissions as well as clearing app data through adb using a batch or shell script from your computer. In some case I am able to also install the apk using adb shell pm install -rts which tags it as a test package. But I'm unclear how I achieved that so this is a work in progress.

(For the install -rts trick this is only after freshly flashing so it's been a little hard to remember to test it. Let me know if you stuble upon the process order again)

===> REMINDER <===

Backup all your contacts, text messages, downloaded files and also individually back any apps there are important to you. Also have a look at your /sdcard/ to see what's there. Do a full backup on the entire phone just in case you forgot anything.

*** Prepare to have to flash/wipe data to get this to work as I've only truly tested this after a recent flash personally!!! ***

This walk through utilizes the following technologies you will need to Google

You need the platform-tools from Android Studio SDK it comes with adb. (You can probably google platform-tools directory and download it)

(path environment needs to be set in the script or just fully qualify the location of adb which is what I do) <change to match your path>

I assume you understand how to download a file, open command prompt, cd to the directory it's download to and edit the path to your platform-tools inside the batch file

I also assume you can figure out the Samsung USB driver for Windows and test that you can adb shell to your device.

I assume you can get into Download mode and flash your firmware with Odin / Windows using a usb cable.

Steps to brick your perfectly good working AT&T Note 5 phone

Denial of permission and general rearrangement of system apps Version .0008 beta

Fresh after a flash please block the signal on your phone if possible. I always block signal!!!

1.) Turn on developer options then confirm that you have OEM unlock on(like it matters), USB Debugging On and default Verify Apps via USB remains off

2) Kill all AT&T running processes DEVELOPER OPTIONS | RUNNING SERVICES (get Smart Limits, Protect app, ATT yahoo mail, anything ATT)

every opportunity)

2A) Package disabler is awesome leave it running if you have it we don't need anything special for adb, besides adb.

3) Plug your phone into your PC via usb and get it connected.. (adb devices "unauthorized means you didn't say ok on phone in time unplug/replug try again")

3a) adb shell should log you into the phone and exit should get you back out (we don't want to be in the shell just testing the connection)

4.)Turn off "can make system changes" for AT&T apps. Application Manger | More | Change System Settings | More | Show System Apps -- Turn off anything AT&T (I also kill anything I can knox, samsung)

5) Backup/Restore the AT&T apps from a "backup tool", I used System App 2 let us know if others work "or excel".

Use an app archive tool such as System Panel 2 | apps | Archive to archive the AT&T apps then install them from that archive. You can do this to any you see!

(don't uninstall the app but feel free to install it repeatedly. e.g. install = uninstall as system app but uninstall = reinstall as system app

5 a) --- if doing step 8 you need a the com.ws.dm.apk copied to your computer so you can fire the install -rts on it

6) Repeat step 4

7) Fire the script from the first post on your phone (obviously you will have it connected to your pc, allowed the connection on your phone screen)

Basic commands I'm using, I prioritize com.ws.dm and then I run the commands on the rest of AT&T: (While it's running install/uninstall with the archive tool)

<This small snippet is a linux bash shell while the attached script is a Windows example

#NOTE TO LINUX USERS: take the rest of the script from the windows batch i think if you use linux you don't need step by step

#!/bin/bash

/opt/Android/Sdk/platform-tools/adb devices

/opt/Android/Sdk/platform-tools/adb wait-for-device

/opt/Android/Sdk/platform-tools/adb shell am kill-all

/opt/Android/Sdk/platform-tools/adb shell pm clear com.ws.dm

/opt/Android/Sdk/platform-tools/adb shell pm reset-permissions com.ws.dm

/opt/Android/Sdk/platform-tools/adb shell am set-inactive com.ws.dm true

/opt/Android/Sdk/platform-tools/adb shell pm revoke com.ws.dm android.permission.CHANGE_CONFIGURATION

/opt/Android/Sdk/platform-tools/adb shell pm revoke com.ws.dm android.permission.WRITE_SECURE_SETTINGS

/opt/Android/Sdk/platform-tools/adb shell pm revoke com.ws.dm android.permission.BATTERY_STATS

/opt/Android/Sdk/platform-tools/adb shell pm revoke com.ws.dm android.permission.INTERACT_ACROSS_USERS

/opt/Android/Sdk/platform-tools/adb shell pm revoke com.ws.dm android.permission.SET_PROCESS_LIMIT

/opt/Android/Sdk/platform-tools/adb shell am kill-all

/opt/Android/Sdk/platform-tools/adb shell am kill com.ws.dm

/opt/Android/Sdk/platform-tools/adb shell pm clear com.ws.dm

Note: I always did this right after a flash so I'm hoping that's not necessary

(I know I misused reset-permissions but it accepts it and I like it that way. Don't end process through your app archive tool it wakes up com.ws.dm)

Steps that may not work quite yet:

Note) I need to add to the how to for this to not say Invalid_URI bla bla but the way I do it is by flashing an invalid modem file, that's not acceptable since I don't think it's necessary yet:

8) issue the command adb shell pm install -rts com.ws.dm.apk.

8 a) refire the above snippet that is just an example for linux it is my knock out punch for after, but this step should fail if you make it work let me know please