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.
This tool is extremely fast and can be used to do massive comparison of a large number of apps quickly. 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.
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.
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
);
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.
This tool is for research purposes only.
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.
You can get in touch with us on our LinkedIn profiles:
To stay updated about my latest projects:
To stay updated about my latest projects:
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.
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! 🚀
Copyright (c) 2018-present, harismuneer, hussamh10
Hey there, I'm Haris Muneer 👨🏻💻
-
🕸️ Founder of Cyfy Labs: At Cyfy Labs, we provide advanced social media scraping tools to help businesses, researchers, and marketers extract actionable data from platforms like Facebook, Instagram, and X (formerly Twitter). Our tools support lead generation, sentiment analysis, market research, and various other use cases. To learn more, visit: www.cyfylabs.com
-
🌟 Open Source Advocate: I’m passionate about making tech accessible. I’ve open-sourced several projects that you can explore on my GitHub profile and on the Open Source Software PK page.
-
📫 How to Reach Me: You can learn more about my skills/work at LinkedIn. You can also reach out via email for collaboration or inquiries. For Cyfy Labs related queries, please reach out through the company website.