Skip to content

⚙️ An efficient tool to do in-depth comparison of two android apps.

License

Notifications You must be signed in to change notification settings

harismuneer/AndroCompare

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 

Repository files navigation

⚙️ AndroCompare

AndroCompare is a tool which takes two Android Apps (.APK files), compares them on a variety of factors and saves the resulting differences and similarities in a database.

views


Description

This tool is fast and can be used to do comparison of a large number of apps. Two sample apps named app1.apk and app2.apk are provided. These apps have been compared and their results are saved in the database so that you can see how the results are organized.

Moreover if two apps have same package name but differ hugely in the number of permissions requested and the activities etc then there's a strong chance that one of them is repackaged. So, this tool can highlight the extra permissions/activities added to the repackaged version and consequently help in malware detection too.

In order to create a dataset of apps, we wrote another tool: Android Apsp Scraper/Downloader

For details regarding citing/referencing this tool for your research, check the 'Citation' section below.

Features

It compares apps for differences in:

  • permissions requested
  • activities
  • services
  • broadcast receivers
  • content providers
  • apk size
  • version name and code
  • signing certificate

and saves the results in an organized way in a SQLite database.

Schema of Database

CREATE TABLE `APPS` (
	`app1_name`	TEXT,
	`app2_name`	TEXT,
	`app1_package`	TEXT,
	`app2_package`	TEXT,
	`app1_size`	TEXT,
	`app2_size`	TEXT,
	`app1_version_name`	TEXT,
	`app2_version_name`	TEXT,
	`app1_version_code`	TEXT,
	`app2_version_code`	TEXT,
	`perm_analysis`	TEXT,
	`perm_same`	TEXT,
	`perm_added`	TEXT,
	`perm_removed`	TEXT,
	`perm_add_count`	TEXT,
	`app1_cert`	TEXT,
	`app2_cert`	TEXT,
	`cert_diff`	TEXT,
	`app1_main_activity`	TEXT,
	`app2_main_activity`	TEXT,
	`main_activity_diff`	TEXT,
	`same_activities`	TEXT,
	`activities_added`	TEXT,
	`activities_removed`	TEXT,
	`same_services`	TEXT,
	`services_added`	TEXT,
	`services_removed`	TEXT,
	`same_receivers`	TEXT,
	`receivers_added`	TEXT,
	`receivers_removed`	TEXT,
	`same_providers`	TEXT,
	`providers_added`	TEXT,
	`providers_removed`	TEXT
);

How to Run

In the code file 'andro_compare.py', change the path variables to the apps to be compared:

# change the paths to the relevant apps to be compared
apk1_path = "./app1.apk"
apk2_path = "./app2.apk"

Its written in Python 2.6 and currently supports Linux only. Moreover it uses the "hurry.filesize" module. So, install it using the following command

pip install hurry.filesize

You can use DB Browser for SQLite to view the database.

Note

This tool is for research purposes only.


Citation

DOI

If you use this tool for your research, then kindly cite it. Click the above badge for more information regarding the complete citation for this tool and diffferent citation formats like IEEE, APA etc.




Authors

You can get in touch with us on our LinkedIn profiles:

Haris Muneer

LinkedIn Link

To stay updated about my latest projects: GitHub Follow

Hussam Habib

LinkedIn Link

To stay updated about my latest projects: GitHub Follow


If you liked the repo then kindly support it by giving it a star ⭐ and share in your circles so more people can benefit from the effort.

Contributions Welcome

GitHub Issues

If you find any bugs, have suggestions, or face issues:

  • Open an Issue in the Issues Tab to discuss them.
  • Submit a Pull Request to propose fixes or improvements.
  • Review Pull Requests from other contributors to help maintain the project's quality and progress.

This project thrives on community collaboration! Members are encouraged to take the initiative, support one another, and actively engage in all aspects of the project. Whether it’s debugging, fixing issues, or brainstorming new ideas, your contributions are what keep this project moving forward.

With modern AI tools like ChatGPT, solving challenges and contributing effectively is easier than ever. Let’s work together to make this project the best it can be! 🚀

License

MIT

Copyright (c) 2018-present, harismuneer, hussamh10


Waving hand Hey there, I'm Haris Muneer 👨🏻‍💻

Total Github Stars Total Github Followers


  • 🕸️ Founder of Cyfy Labs: At Cyfy Labs, we provide advanced social media scraping tools that enable businesses, researchers, and marketers to extract actionable insights from platforms like Facebook, Instagram, and X (formerly Twitter). Our tools are designed for use cases such as lead generation, market research, social listening, and more. Learn more at www.cyfylabs.com

  • 🌟 Open Source Advocate: Passionate about making technology accessible, I’ve developed and open-sourced several software projects for web, mobile, desktop, and AI on my GitHub profile. These projects have been used by thousands of learners worldwide to enhance their skills and knowledge.

  • 📫 How to Reach Me: To learn more about my skills and work, visit my LinkedIn profile. For collaboration or inquiries, feel free to reach out via email. For Cyfy Labs related queries, please contact us through our company website.


🤝 Follow my journey