Blogger Jateng

ADB And Fastboot Command COLLECTION By OmBob



SCRCPY 

This tools really good for mirrorin your phone
  • scrcpy -w -S
    Open mirror without wakeup the screen
  • scrcpy -m 1024
    To limit both width and height to some maximum value

Disable driver signature cmd (windows 7/ 10/ 11) 

  • start > run > type cmd 
  • Right click > Run as administrator
  • bcdedit /set testsigning on
  • restart computer

Mount System/ Vendor/ Etc 

  • mount -o remount,rw /
  • mount -0 remount,rw /odm
  • mount -o remount,rw /product
  • mount -o remount,rw /system_ext
  • mount -o remount,rw /vendor

Install APK Using Terminal

Sometime it doesn't hook Into Lsposed, sop you have manually install using termux of terminal from MT manager. Enable test infrastructure to bypass most issues that would be encountered by app enumeration without changes.
  • copy apk to /data/local/tmp
  • rename to file into x.apk e.g
  • pm install -r -t --force-queryable x.apk
-r : Replace existing application.
-t  Allow test packages.

Downgrade APK Without Uninstall APK

pm install -d -i com.android.vending x.apk

Realme | Pull Image From Stock Recovery

Boot into stock recovery, then plug your device into computer, Type follow commands :

  • adb root
  • adb pull /dev/block/by-name/boot boot.img

For Dynamic Partition

adb pull /dev/block/by-name/boot_a boot1.img

It will save your boot image to current folder. SAME FOLLOWS FOR PULLING OTHER IMG FILES
JUST REPLACE boot.img to vbmeta.img or others

Nikel Remove & Restore Google System Framework

start with type adb shell

  • Search for package
    pm dump com.google.android.gsf | grep path
  • Remove Package
    pm uninstall -k --user 0 com.google.android.gsf
  • Reinstall package
    pm install -r --user 0 /system/priv-app/GoogleServicesFramework/GoogleServicesFramework.apk

Install / get back uninstalled Apps (APKs) with ADB

get the path for that app

  • 1st method
    adb shell pm uninstall -k --user 0 com.android.updater
    adb shell cmd package install-existing com.android.updater
  • 2nd method
    adb shell
    pm dump com.android.updater | grep path
    pm install -r --user 0 /system/app/Updater/Updater.apk

Decrypt Manually

If multidisabler doesn't work try this method. 
  • Copy /vendor/etc/fstab.**** over to another folder. 
  • Edit it to remove the line containing the word "encryption"
  • Boot into twrp
  • Use twrp file manager to replace the fstab file with the edited one.
  • Format data (not just wipe)
  • Reboot to recovery 
  • Reboot to system 
  • Setup the phone completely 
  • Reboot to twrp
  • Backup boot data and super

Fix Magisk lag

Download magisklagfix.sh

use terminal emulator (android) or use terminal in pc (windows/linux)

  • su
  • mkdir -p /data/adb/service.d && cp /sdcard/magisklagfix.sh /data/adb/service.d/ && chmod +x /data/adb/service.d/magisklagfix.sh

tail message in Android

# adb shell cat /proc/kmsg

Enable Floating Window On Android Go

Some phone using android go doesn't have floating window features e.g  Galaxy a03 core, Redmi A1, A2. We can fix this using adb command
Must have root access, you can also use termux

command : 
pm grant permission.(packagename aplikasi).SYSTEM_ALERT_WINDOW

Example Apps : Grab Driver grant com.grabtaxi.driver2
Example :
  • adb shell
  • su
  • pm grant com.grabtaxi.driver2 android.permission.SYSTEM_ALERT_WINDOW

Fix DM Verity Corruption

fastboot oem cdms fix


Uninstall magisk modules without TWRP

You can use this command if you hav enable usb debugging before. Run the command from the bootloop status

adb wait-for-device shell magisk --remove-modules

Oppo Engginer Mode Code

*#899#

Disable Android Automatic Update

  • pixelExperience
    adb shell pm uninstall -k –user 0 org.pixelexperience.ota
  • cdasd

Remove Infinix Bloatware

  • adb shell pm uninstall -k --user 0 com.transsion.phonemaster
  • adb shell pm uninstall -k --user 0 com.transsion.plat.appupdate
  • adb shell pm uninstall -k --user 0 com.transsion.wifiplaytogether
  • adb shell pm uninstall -k --user 0 com.transsion.systemupdate

Realme & Oppo Disable Update & Secure Pay/ Check

  • adb shell pm uninstall -k --user 0 com.oppo.ota
  • adb shell pm uninstall -k --user 0 com.coloros.securepay
  • adb shell pm uninstall -k --user 0 com.oppo.otaui
  • adb shell pm disable-user --user 0 com.realme.securitycheck

If you want to reinstall the OTA service, just do :
adb shell cmd package install-existing com.oppo.ota cmd package install-existing com.oppo.otaui

Realme/ Oppo Remove Bloatware

  • adb shell pm uninstall -k --user 0 com.oppo.ota
  • adb shell pm uninstall -k --user 0 com.jakarta.baca.lite
  • adb shell pm uninstall -k --user 0 com.heytap.quickgame
  • adb shell pm uninstall -k --user 0 com.heytap.browser
  • adb shell pm uninstall -k --user 0 com.heytap.market
  • adb shell pm uninstall -k --user 0 com.heytap.mall

New Oppo

  • adb shell pm uninstall -k --user 0 com.redteamobile.roaming
  • adb shell pm uninstall -k --user 0 com.oplus.ota
  • adb shell pm uninstall -k --user 0 com.heytap.pictorial
  • adb shell pm uninstall -k --user 0 com.heytap.music
  • adb shell pm uninstall -k --user 0 com.coloros.musiclink (failed)
  • adb shell pm uninstall -k --user 0 com.nearme.gamecenter (failed)
  • adb shell pm uninstall -k --user 0 com.oplus.games
  • adb shell pm uninstall -k --user 0

Samsung

  • adb shell pm uninstall -k --user 0 com.samsung.android.securitylogagent
  • adb shell pm uninstall -k --user 0 com.sec.android.soagent

Install apk from local but seen as from playstore

From PC you can use
  • adb install -i com.android.vending -r "Link2SD 4.3.1.apk"
From android you must have have root acces and then copy the APK first into data/local/tmp
  • su
  • pm install -i com.android.vending -r "Link2SD 4.3.1.apk"

Install apk from adb

adb install application.apk

Remove Google Bloatware

  • adb shell pm uninstall -k --user 0 com.google.android.apps.photos
  • adb shell pm uninstall -k –user 0 com.google.android.apps.tachyon
  • adb shell pm uninstall -k –user 0 com.google.android.apps.docs
  • adb shell pm uninstall -k –user 0 com.google.android.apps.subscriptions.red
  • adb shell pm uninstall -k –user 0 com.google.android.music
  • adb shell pm uninstall -k –user 0 com.google.android.videos
  • adb shell pm uninstall -k –user 0 com.google.android.feedback
  • adb shell pm uninstall -k –user 0 com.android.browser
  • adb shell pm uninstall -k --user 0 com.google.android.apps.nbu.files
  • adb shell pm uninstall -k --user 0 com.google.android.apps.chromecast.app
  • adb shell pm uninstall -k --user 0 com.google.android.keep

Remove Xiaomi Bloatware

  • adb shell pm pm uninstall -k –user 0 com.mi.android.globalminusscreen
  • adb shell pm pm uninstall -k --user 0 com.mi.globalbrowser
  • adb shell pm pm uninstall -k –user 0 com.miui.analytics
  • adb shell pm pm uninstall -k –user 0 com.miui.cleanmaster
  • adb shell pm pm uninstall -k –user 0 com.miui.compass
  • adb shell pm pm uninstall -k –user 0 com.miui.notes
  • adb shell pm pm uninstall -k –user 0 com.miui.player
  • adb shell pm pm uninstall -k –user 0 com.miui.weather2
  • adb shell pm pm uninstall -k –user 0

Hide apps

  • adb shell pm hide com.example.packagename
  • adb shell pm unhide com.example.packagename

Remove apps

adb uninstall com.android.calculator2 

List Package

adb shell su 0 pm list packages

adb push & pull

adb pull /sdcard/video.mp4 C:\Users\Jonathan\Desktop

adb push C:\Users\Jonathan\Desktop\video.mp4 /sdcard/

adb to download mode  (Samsung)
adb reboot download

adb to download mode  (xiaomi eg. mi4c)
fastboot oem edl

  • adb reboot edl

Flash Modem

fastboot flash modem NON-HLOS.bin

Getting information about phone
fastboot getvar all

fastboot getvar product
fastboot -i 0x17ef oem device-info (lenovo)

adb command to fastboot
adb reboot bootloader

adb command to recovery
adb reboot recovery

unlock bootloader
fastboot oem unlock-go
fastboot -i 0x17ef oem unlock-go (lenovo)

check Bootloader Status
fastboot oem device-info

FLASH SYSTEM.IMG
fastboot flash system system.img

Flash Recovery
fastboot flash recovery images.img

Boot from images
fastboot boot twrp.img

Shutdown from ADB
adb shell reboot -p