sendto shortcutsv3

SendTo ZTools3 – Shortcuts for handling APK files

Ian Hatton -
4 MIN READ
436
1

Overview

This blog describes a third collection of utility shortcut files located in PC SendTo folder in order to allow quick ‘right click’ access to commonly used utilities/techniques.

 These shortcuts are focused on handling APK files i.e.  installation, removal , backup,  retrieving package information and checking for the latest version of a Play app without requiring a Google account.

 Note that they are provided ‘as is’ i.e. no support & use at your own risk. Shortcuts should be compatible with PC’s running Win 8.x onwards and they require both ADB and Java to be included in the PC system path .

The previous collections of SendTo shortcuts are located at these links:

Ztools1 (Miscellaneous Utils): https://developer.zebra.com/blog/how-use-sendto-ztools1-shortcuts-zebra-devices

Ztools2 (Locking down a Zebra device) : https://developer.zebra.com/blog/sendto-ztools2-easily-create-zebra-lockdown-configurations

Push files to /enterprise sub-folders on non-SD660 devices: https://developer.zebra.com/blog/pushing-files-enterprise-folder-zebra-android-11-devices

               Installation

  1. Download zip file from:  https://drive.google.com/file/d/1OtCwRzuMYMgpms-KZakBy3sjg4IqcA5w/view?…
  2. Extract all files to the SendTo folder on your PC (access by Win+R, type shell:sendto and press enter) preserving the sub-folders
  3. Ensure ADB is added to the system path (may require PC reboot after modifying the PATH in order to make it effective)
  4. Ensure Java is on system path
  5. If using Windows 11 , the SendTo option is not present on the initial right click menu ( it requires expansion to show the option) . This can be fixed by configuring Windows to show the full right click menu each time using a registry key modification detailed here: https://www.intowindows.com/how-to-enable-the-old-context-menu-in-windows-11/

 

 

Instructions for use

 

__apk_info : Get APK information

This shortcut will retrieve basic manifest info from the highlighted single APK file

  1. Highlight the APK files to be queried – note that filenames and paths should not contain spaces in order to install via this method.
  2. Right click and select - Sendto ‘_apk_info’
  3. A text file named package.txt will be created in the same folder as the selected APK and contains a dump of the manifest info including the package name , the target API level and the permissions requested by the app.

 

 

__apk_install : Install all selected APK’s on the target device

This shortcut will install the currently highlighted apps on the connected  device via ADB and also pre-grant any required basic runtime permissions

  1. Highlight the APK files to be installed – note that filenames and paths should not contain spaces in order to install via this method.
  2. Right click and select - Sendto ‘_apk_install’
  3. APK files will be installed in turn

 

__apk_backup : Backup all installed non-system apps from the target device to a PC

        This shortcut will allow any existing non-system apps on a device to be backed up onto the host PC via ADB i.e. any installed apps will be transferred as APK files to the host machine

  1. Create a new folder for the APK backup
  2. Right click and create a new textfile . Right click this file (it is not used) and select - Sendto ‘_apk_backup’ . This will query the connected device for non-system apps and generate a list of package names within a corresponding ADB command contained in a batch file (packages.bat)
  3. The packages.bat file is used to query the location of each package which is then included in a text file named backup.txt
  4. Since the format of the ABD commands in backup.txt is not correct , it is then post-processed in order to reformat the commands it contains.  The correct ADB commands are contained in Backup.txt.bat
  5. Run Backup.txt.bat manually in order to actually copy the APK files to the current folder , using a naming convention of packagename.apk e.g. com.symbol.devicecentral.apk

 

 

__apk_remove_one : Remove (uninstall) selected APK from the target device  

               This shortcut will allow any selected single app to be removed (deleted) via ADB

  1. Right click on the APK file required to remove and select - Sendto ‘_apk_remove_one . This will query the connected device for the package name of the APK and then use that package name to uninstall the app via ADB

__apk_remove_all : Remove (uninstall) all installed APK’s on the target device  

               This shortcut will allow any existing apps to be removed (deleted) via ADB i.e. any installed (non-system) apps will be removed which will return the device to the out-of-box condition in terms of installed apps

  1. Right click on any file (file is not used) and select - Sendto ‘_apk_remove_all . This will query the connected device for non-system apps and generate a list of package names (del_packages.txt)
  2. The package name list is used to generate a delete command for each APK which is executed via ADB. When this happens you will see multiple command windows open and close, one for each app delete process

 

Ian Hatton

Zebra EMEA  Aug 2023

 

 

 

profile

Ian Hatton

Please Register or Login to post a reply

1 Replies

O Oscar Galloway

This is a comprehensive and well-structured guide on how to backup and remove APK files using ADB commands. The step-by-step instructions are clear and easy to follow, making it accessible for users at all levels of expertise. Additionally, the inclusion of shortcuts for removing individual or all installed APKs adds convenience and efficiency to the process. Overall, this post provides valuable information for anyone looking to manage their APK files on their devices effectively. Great job!