SendTo ZTools3 – Shortcuts for handling APK files
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
- Download zip file from: https://drive.google.com/file/d/1OtCwRzuMYMgpms-KZakBy3sjg4IqcA5w/view?…
- Extract all files to the SendTo folder on your PC (access by Win+R, type shell:sendto and press enter) preserving the sub-folders
- Ensure ADB is added to the system path (may require PC reboot after modifying the PATH in order to make it effective)
- Ensure Java is on system path
- 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
- Highlight the APK files to be queried – note that filenames and paths should not contain spaces in order to install via this method.
- Right click and select - Sendto ‘_apk_info’
- 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
- Highlight the APK files to be installed – note that filenames and paths should not contain spaces in order to install via this method.
- Right click and select - Sendto ‘_apk_install’
- 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
- Create a new folder for the APK backup
- 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)
- The packages.bat file is used to query the location of each package which is then included in a text file named backup.txt
- 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
- 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
- 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
- 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)
- 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
Zebra EMEA Aug 2023