To extract APK (Android app) from a non rooted Android phone you will need to enable developer options and download platform tools from android.com.
Check if your ADB_VERSION_KEYS variable is configured.
echo $ADB_VERSION_KEYS
If not configured. Add this line to your .zshrc if you are using zsh in macOS.
export ADB_VENDOR_KEYS=~/.android/adbkey.pub
If public key was not found in the directory. Run the command below to generate it.
adb keygen ~/.android/adbkey
To list all the packages in your phone
adb shell pm list packages
Or you can filter it with grep
adb shell pm list packages|grep <filter>
Lets say we are extracting YouTube “com.google.android.youtube”. We will need the path of the APK.
adb shell pm path <package_id>
Lets say we are extracting the base.apk
adb pull <apk_path>