Skip to content

Open Android packages as zip archives #4711

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

Closed
1 task done
fekir opened this issue May 24, 2025 · 4 comments · Fixed by #4714
Closed
1 task done

Open Android packages as zip archives #4711

fekir opened this issue May 24, 2025 · 4 comments · Fixed by #4714
Labels
area: vfs Virtual File System support prio: medium Has the potential to affect progress
Milestone

Comments

@fekir
Copy link

fekir commented May 24, 2025

Is there an existing request for this?

  • I have searched the existing issues

Is your feature request related to a problem?

I often want to inspect the content of Android packages (apk, aar, and aab).
Those are, after all, zip archives that can be opened by any program that can handle .zip files

Describe the solution you'd like

I would like to be able to explore .apk, .aar, and .aab files

Describe alternatives you've considered

Rename those file to .zip, create a user-defined mc.ext.ini, or modify the global mc.ext.ini

Additional context

The proposed change would be to modify

[zip-by-shell]                                                                                                                                                                                                     
Shell=.zip                                                                                                                                                                                                        
ShellIgnoreCase=true                                                                                                                                                                                               
Open=%cd %p/uzip://                                                                                                                                                                                                
View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view zip                                                                                                                                                            

to

[zip-by-shell]                                                                                                                                                                                                     
Regex=\\.(zip|apk|aar|aab)$                                                                                                                                                                                        
ShellIgnoreCase=true                                                                                                                                                                                               
Open=%cd %p/uzip://                                                                                                                                                                                                
View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view zip                                                                                                                                                            

or create separate entries, similarly to jar files

[jar]                                                                                                                                                                                                              
Type=\\(Java (Jar file|archive) data \\((zip|JAR)\\)\\)                                                                                                                                                            
TypeIgnoreCase=true                                                                                                                                                                                                
Open=%cd %p/uzip://                                                                                                                                                                                                
View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view zip                                                                                                                                                            

the output of file on a couple of test apk is Android package (APK), with gradle app-metadata.properties / Android package (APK), with AndroidManifest.xml, with APK Signing Block, but I think on some system (or with different archives) it was Zip archive data.
The output of file on an aab is Zip archive data.

@fekir fekir added prio: medium Has the potential to affect progress needs triage Needs triage by maintainers labels May 24, 2025
@github-actions github-actions bot added this to the Future Releases milestone May 24, 2025
zyv added a commit that referenced this issue May 26, 2025
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
@zyv
Copy link
Member

zyv commented May 26, 2025

Could you please test #4714 ?

@zyv zyv added area: vfs Virtual File System support and removed needs triage Needs triage by maintainers labels May 26, 2025
@zyv zyv modified the milestones: Future Releases, 4.8.34 May 26, 2025
@fekir
Copy link
Author

fekir commented May 26, 2025

Could you please test #4714 ?

Copied the settings, seems to work correctly for apk files

@zyv
Copy link
Member

zyv commented May 26, 2025

Could you please test #4714 ?

Copied the settings, seems to work correctly for apk files

Thanks! and for other files?

@fekir
Copy link
Author

fekir commented May 27, 2025

Yes, I could test an aar and aab package successfully

zyv added a commit that referenced this issue May 28, 2025
…mc_ext

Ticket #4711: support browsing Android packages (APK) in mc.ext
@zyv zyv closed this as completed in #4714 May 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: vfs Virtual File System support prio: medium Has the potential to affect progress
Development

Successfully merging a pull request may close this issue.

2 participants