Last active
November 7, 2025 06:00
-
-
Save androidneha/896ec6b08137ef75a95341550b9c60fc to your computer and use it in GitHub Desktop.
Revisions
-
androidneha revised this gist
Jan 30, 2023 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -5,10 +5,10 @@ `pm list pacakges | grep com.abc` ### Turn on Battery Optimization for a particular app `adb shell dumpsys deviceidle whitelist -<package_name>` ### Turn off Battery Optimization for a particular app `adb shell dumpsys deviceidle whitelist +<package_name>` ### To start a service `adb shell am startservice com.some.package.name/.YourServiceSubClassName` -
androidneha revised this gist
Jul 22, 2019 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -24,3 +24,6 @@ ### Enable accessibility `adb shell settings put secure enabled_accessibility_services packagname/servicename` ### Turn on Device admin `adb shell dpm set-active-admin --user current packagename/.receivers.DeviceAdministrationReceiver` -
androidneha revised this gist
Jul 22, 2019 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -24,4 +24,3 @@ ### Enable accessibility `adb shell settings put secure enabled_accessibility_services packagname/servicename` -
androidneha revised this gist
Jul 22, 2019 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -21,3 +21,7 @@ ### Revoke Permission for ex WRITE_SECURE_STTINGS `adb shell pm revoke com.abc.yourpackagename android.permission.WRITE_SECURE_SETTINGS` ### Enable accessibility `adb shell settings put secure enabled_accessibility_services packagname/servicename` -
androidneha revised this gist
Jul 11, 2019 . No changes.There are no files selected for viewing
-
androidneha revised this gist
Jul 11, 2019 . 1 changed file with 8 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,23 +1,23 @@ ### To list-up installed app `pm list packages` ### Search for a particualr app with pacakagename `pm list pacakges | grep com.abc` ### Turn on Battery Optimization for a particular app `adb shell dumpsys deviceidle whitelist +<package_name>` ### Turn off Battery Optimization for a particular app `adb shell dumpsys deviceidle whitelist -<package_name>` ### To start a service `adb shell am startservice com.some.package.name/.YourServiceSubClassName` ### To start a service `adb shell am stopservice com.some.package.name/.YourServiceSubClassName` ### Grant Permission for ex WRITE_SECURE_STTINGS `adb shell pm grant com.abc.yourpackagename android.permission.WRITE_SECURE_SETTINGS` ### Revoke Permission for ex WRITE_SECURE_STTINGS `adb shell pm revoke com.abc.yourpackagename android.permission.WRITE_SECURE_SETTINGS` -
androidneha revised this gist
Jul 11, 2019 . No changes.There are no files selected for viewing
-
androidneha revised this gist
Jul 11, 2019 . 2 changed files with 23 additions and 23 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,23 +0,0 @@ This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ # To list-up installed app `pm list packages` # Search for a particualr app with pacakagename `pm list pacakges | grep com.abc` # Turn on Battery Optimization for a particular app `adb shell dumpsys deviceidle whitelist +<package_name>` # Turn off Battery Optimization for a particular app `adb shell dumpsys deviceidle whitelist -<package_name>` # To start a service `adb shell am startservice com.some.package.name/.YourServiceSubClassName` # To start a service `adb shell am stopservice com.some.package.name/.YourServiceSubClassName` # Grant Permission for ex WRITE_SECURE_STTINGS `adb shell pm grant com.abc.yourpackagename android.permission.WRITE_SECURE_SETTINGS` # Revoke Permission for ex WRITE_SECURE_STTINGS `adb shell pm revoke com.abc.yourpackagename android.permission.WRITE_SECURE_SETTINGS` -
androidneha revised this gist
Jul 11, 2019 . 1 changed file with 8 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,23 +1,23 @@ # To list-up installed app - `pm list packages` # Search for a particualr app with pacakagename - `pm list pacakges | grep com.abc` # Turn on Battery Optimization for a particular app - `adb shell dumpsys deviceidle whitelist +<package_name>` # Turn off Battery Optimization for a particular app - `adb shell dumpsys deviceidle whitelist -<package_name>` # To start a service - `adb shell am startservice com.some.package.name/.YourServiceSubClassName` # To start a service - `adb shell am stopservice com.some.package.name/.YourServiceSubClassName` # Grant Permission for ex WRITE_SECURE_STTINGS - `adb shell pm grant com.abc.yourpackagename android.permission.WRITE_SECURE_SETTINGS` # Revoke Permission for ex WRITE_SECURE_STTINGS - `adb shell pm revoke com.abc.yourpackagename android.permission.WRITE_SECURE_SETTINGS` -
androidneha created this gist
Jul 11, 2019 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ # To list-up installed app `pm list packages` # Search for a particualr app with pacakagename `pm list pacakges | grep com.abc` # Turn on Battery Optimization for a particular app `adb shell dumpsys deviceidle whitelist +<package_name>` # Turn off Battery Optimization for a particular app `adb shell dumpsys deviceidle whitelist -<package_name>` # To start a service `adb shell am startservice com.some.package.name/.YourServiceSubClassName` # To start a service `adb shell am stopservice com.some.package.name/.YourServiceSubClassName` # Grant Permission for ex WRITE_SECURE_STTINGS `adb shell pm grant com.abc.yourpackagename android.permission.WRITE_SECURE_SETTINGS` # Revoke Permission for ex WRITE_SECURE_STTINGS `adb shell pm revoke com.abc.yourpackagename android.permission.WRITE_SECURE_SETTINGS`