

#adb shell pm list packages -user 0 | sed -e 's|^package:||' | sort >./packages_list. adbLink is a rather technical utility tool that allows users to side-load an existing Android application onto an Amazon Fire Stick. _TOOLS=/opt/android-sdk-update-manager/build-tools/29.0.3 So here another variant of the same script: #!/bin/bash

And the least and last, I made every variable to start with underscore, it's just something that makes it easier to read script.jcomeau_ictx script variant do not take in to account that some packages may have multiple apk associated with them which breaks the script.All that the script really need is a package name and adb shell pm list packages -f is really excessive so I changed it to expect a file with packages list only and provided example on how one can get one from adb.while read line do done are breaking as a result of commands within while loop interacting with stdin/stdout and as a result while loop runs only once and then stops, as it is discussed in While loop stops reading after the first line in Bash - the comment from cmo I used solution provided and switched while loop to use unused file descriptor number 9.First, open the app on your Chromecast, then select Browse files, go to the Download directory, select the APK you transferred in. However I had to make several alteration to script it self: In the screenshots below, I show you how to do it with APK Mirror. So I extremely grateful to jcomeau_ictx for providing the info on how to extract application-label info from apk and the idea to pull apk from phone directly!
