there is a command line to get package name:-
adb shell pm list packages
But how to get the list of all applications on the device
Previously the command for listing installed packages used to be pm list packages. But as of Android nougat, the command has been removed. The new command to do the same is cmd package list packages.
pm list packages
cmd package list packages
2.1m questions
2.1m answers
60 comments
57.0k users