Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display application name in addition to package name #59

Open
hitnrun30 opened this issue Oct 25, 2021 · 12 comments
Open

Display application name in addition to package name #59

hitnrun30 opened this issue Oct 25, 2021 · 12 comments
Labels
enhancement New feature or request
Milestone

Comments

@hitnrun30
Copy link

Just a suggestion, to help, add another column that is the associated app name, if known.

@0x192 0x192 changed the title App Name Display application name in addition to package name Jan 8, 2022
@0x192 0x192 added this to the 0.5 milestone Jan 8, 2022
@0x192
Copy link
Owner

0x192 commented Feb 3, 2022

You can't easily get the application name from ADB. You need the aapt binary on your device and I don't know if I really want to do this.

This involves downloading the right aapt binary depending on your Android version and architecture. (I found this mirror on Github) but I'll host everything on this repo if I continue with this idea.

After getting the right aapt binary

adb push aapt /data/local/tmp
adb shell chmod 0755 /data/local/tmp/aapt

To get the app name :

adb shell /data/local/tmp/aapt-pie d badging </path/to/apk.apk> | grep 'application: label='

There is kind of an alternative to all of this but it's not a real solution. The apk filename is often the app name so we can just parse it from the path of the package and display it as the application name.

$ adb shell /data/local/tmp/aapt d badging /system/priv-app/StatementService/StatementService.apk | rg 'label='
application: label='Intent Filter Verification Service' icon=''

$ adb shell /data/local/tmp/aapt d badging /system/app/Calendar/Calendar.apk | rg 'label='
application: label='Calendar' icon='res/mipmap-anydpi-v26/ic_launcher.xml'

$ adb shell /data/local/tmp/aapt d badging /system/priv-app/qcrilmsgtunnel/qcrilmsgtunnel.apk | rg 'label='
application: label='' icon=''

$ adb shell /data/local/tmp/aapt d badging /system/priv-app/SettingsProvider/SettingsProvider.apk | rg 'label='
application: label='Settings Storage' icon='res/mipmap-mdpi-v4/ic_launcher_settings.png'

$ adb shell /data/local/tmp/aapt d badging /system/app/SecureElement/SecureElement.apk | rg 'label='
application: label='' icon=''

As you can see. The apk name is not always the app name. The thing is there isn't even always an label...

We need to keep in mind that most of the time, the application label isn't really more useful than the package name. However, it is much more complicated to display it.

@KarlRamstedt
Copy link
Contributor

The apk filename is often the app name so we can just parse it from the path of the package and display it as the application name.

That's not my experience at all. The app name and apk filename are usually not the same in my experience (mainly on Oneplus devices).

@0x192
Copy link
Owner

0x192 commented Feb 11, 2022

That's not my experience at all. The app name and apk filename are usually not the same in my experience (mainly on Oneplus devices).

Yes. sometimes would have been more appropriate.

What do you think of this feature (with aapt) otherwise?

@KarlRamstedt
Copy link
Contributor

I dunno, the moment you gotta push packages to install on the device things get a bit messy for my taste.
I suppose it wouldn't hurt to have it as an option, if it's not too complicated to implement, but I personally wouldn't use it; I can just use a package viewer on the phone to look up the package name if the description doesn't properly convey what the package is.

@0x192 0x192 modified the milestones: 0.5, 1.0 Mar 17, 2022
@0x192 0x192 added enhancement New feature or request and removed type::enhancement labels Sep 1, 2022
@Rudxain
Copy link
Contributor

Rudxain commented Feb 3, 2023

Another option is to unzip the AndroidManifest.xml from the APK, then parse it. But in most cases, it's raw-binary-XML, so it needs a special parser. IDK if aapt already does this

@tbertels
Copy link

Why not use a dictionary?
If I check the description of com.google.android.gm it says "Gmail".
This could be directly shown in the list.
The next step is to make that name searchable.

@Rudxain
Copy link
Contributor

Rudxain commented Feb 10, 2023

Why not use a dictionary?

Because that requires extra maintenance, since the name could change at any time.

If I check the description of com.google.android.gm it says "Gmail". This could be directly shown in the list. The next step is to make that name searchable.

I agree with this. We could use the dictionary as a temporary solution, but that would still require work that would be "wasted" in the long run

@tbertels
Copy link

I wonder if system applications change name that often.
Note that if that happens, the old name could then be kept in a searchable old_name property or just mentioned in the description.

@Rudxain
Copy link
Contributor

Rudxain commented Feb 10, 2023

Note that if that happens, the old name could then be kept in a searchable old_name property or just mentioned in the description.

Wait, that gives me an idea. What if we automate this process? Of course, not all apps can have their names automatically updated. We could fetch and parse the name by using the app-market URLs (not the URL per-se, I mean the page being pointed by the link)

@tbertels
Copy link

There's about 400 apps with a Google Play link, and less than 10 for the Galaxy Store out of 2327 apps.
That's a start.

An other way, mentioned by KarlRamstedt is to use a package viewer.
Package Name Viewer 2.0 (https://play.google.com/store/apps/details?id=com.csdroid.pkg) for example shows system apps and their names when available and allows the user to export them in a .csv file.

@Rudxain
Copy link
Contributor

Rudxain commented Feb 10, 2023

Package Viewer 2.0 [...] allows the user to export them in a .csv file

Nice! this will make everything much easier. But the only way I know to automate the CSV Export is to simulate a UI touch (which can be done via ADB). Perhaps, an easier option is to make a dedicated app that listens to a broadcast or an intent coming from ADB, then responds with the CSV

@Rudxain
Copy link
Contributor

Rudxain commented Feb 13, 2023

I got an idea. We could write a script that sends HTTP HEAD requests to G Play Store, S Galaxy Store, and etc., to check if each pack exists there, and if it does, add the link to the description.

Or even better, we could add this functionality directly to UAD. Everytime the user clicks a pack to see its description, UAD would check if there's a market link available. To make it more efficient, it could cache results.

To make it smarter, it should parse the pack ID to ignore markets and prioritize order: for example, if the ID contains "samsung", UAD will only check GPS & SGS, no need to check other stores. If the ID doesn't contain any known OEM name, and the list isn't Oem, it won't make any request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants