Determine which app owns an icon on my home screen
I cannot be sure that it would definitely work in your case but a way to find out the details about a shortcut is to see the relevant entries in database of your launcher app.
E.g. If the shortcut appears on my home-screen when Android's native launcher (com.android.launcher
) is active, then I would proceed to see content in /data/data/com.android.launcher/databases/launcher.db
. The problem is that a normal user cannot access /data/data
directly without root access.
Since the question demands usage with adb
only, I would suggest taking a backup of the launcher app and extract the .ab
backup using Android Backup Extractor. Now you can access the launcher.db
from it. I use DB browser for SQLite to open the .db
file.
Users with root access can use adb pull <SOURCE> <TARGET>
to fetch the relevant file. You may try SQLite Editor as well.
The location of shortcut entries may differ amongst launchers.
- In my native Android launcher and Nova Launcher, the entries are in table
favorites
respectively.
- Smart Launcher has them in the table
flowerBubble
.
Once you're inside the relevant table, find your shortcut under the column title
and see all the corresponding column-values there.
In my findings, custom shortcuts had iconType
value greater than 0
, and for some custom shortcuts iconPackage
and iconResource
had the values as the app's name and resource whose icon is displayed.
Note that my findings are only based on aforesaid three launchers and your launcher may not reflect similar pattern.
[Is] it possible to determine which app created a launcher icon or shortcut [on my home screen]?
I have doubts reserved whether this is really possible. As it is clear by now, the home-screen shortcuts are (unlike traditional GNU/Linux) not symlinks since their structure varies from launcher to launcher, and usually cannot be called or executed unless the launcher itself is active (possibly because the parent launcher can only know whether the entry should be treated as shortcut or not).
Based on my findings, my answer would be no, you cannot determine which app created the shortcut on home-screen.