# DABS

Hey Android Enthusiasts, Security Researchers, EL33T H@CK3Rs, and people who followed this link!

Ever need to download a binary file from your Android device/emulator, but don’t know the package name or the path?

Well, you could use the following, which I have been doing for years…

adb shell pm list packages | grep <search term for app>
adb shell pm path <package from above>


Easy, right? But these days with App Bundles, binaries don’t come nicely packaged up like they use to in a single .apk file.

Instead strings, images, assets, and code files can all come scattered into separate .apk files that all need to be installed together for the app to function, which requires people like me to download each individually.

Still not bad, but in general, it’s a waste of time.

And no one has time to waste.

Enter DABS.

With DABS, you can simply enter the following in, and it will download all paths associated with your search term.

dabs -s "google"


This will output a list of packages associated with that search term:

[0] com.google.android.apps.nbu.paisa.user
-=-=-=-=-=-=-=-=-=-=-=-=-
[c] or leave blank to exit.


This will create a directory based on the package, and download all necessary files into that directory for you.

## Dependencies

Since DABS is a fish function, it requires the following:

## Configuration

Configuring is easy.

With Fish Shell already installed, go into your fish functions directory, usually located at the below:

cd ~/.config/fish/functions/


Inside of this folder, you can clone the repo:

git clone git@github.com:dustinsummers/dabs.git


After that, open up a shell and quickly run a source on the new .fish we just downloaded:

source ~/.config/fish/functions/dabs/download_app_based_on_search_term.fish


<Note: You shouldn’t need to source everytime you open up a new shell/terminal, but if you find yourself in that situation, add this line to the alias below or just add this line at the top of your config.fish file and you should be good :)>

From here, it is just a matter of pointing your config.fish file to this new function with an alias.

Inside of ~/.config/fish/config.fish, add the following line wherever you keep your alias:

alias dabs="download_app_based_on_search_term"


## Use

At the time of this writing, only two options exist:

dabs -d <device to point to if you have multiple> -s <search term>


Example:

dabs -d emulator-5554 -s "google"
`

From here, the terminal will prompt for input in regards to which packages to download/directories to store, etc.