Skip to content

Instantly share code, notes, and snippets.

@p1r473
p1r473 / bma2otp.rb
Last active August 29, 2015 14:23 — forked from stbuehler/bma2otp.rb
#!/usr/bin/ruby
# REQUIRES:
# * rooted android, as otherwise you can't read the applications private data
# * to display the qr code "qrencode" (http://fukuchi.org/works/qrencode/)
# and "display" from ImageMagick
# This script "decrypts" the token from the internal state of the
# Battle.net Mobile Authenticator on android application, converting
# it into an "otpauth" url (https://code.google.com/p/google-authenticator/wiki/KeyUriFormat)
@p1r473
p1r473 / adb_commands.MD
Created December 4, 2023 17:05 — forked from androidneha/adb_commands.MD
Some adb commands to change setting for battery optimisation, start service, stop service, grant permission, revoke permission and etc.

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