Skip to content

getgo-nobugs/SUDFinder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SUDFinder

This repository contains all the artifacts (including the dataset and the tool SUDFinder) in our study.

Project Directory Structure

home
    |
    | --- dataset:                      The bug list of 218 SUD bug reports
    | --- tool:                         The source code of SUDFinder
         |
         | --- main_scale.py            The main module of SUDFinder for cheking scale mode
         | --- main_screen.py           The main module of SUDFinder for cheking screen mode
         | --- main_nightmode.py        The main module of SUDFinder for cheking night mode
         | --- main_language.py         The main module of SUDFinder for cheking language mode
         | --- executor.py              The execution module of SUDFinder

Requirements

Android SDK: API level 34

python 3.8

We use some libraries (e.g., uiautomator2, androguard, cv2) provided by python, you can add them as prompted, for example:

pips install uiautomator2

Setting up

You can create an emulator before running SUDFinder. See this link for how to create avd using avdmanager. The following sample command will help you create an emulator, which will help you to start using SUDFinder quickly:

sdkmanager "system-images;android-34;google_apis;x86"
avdmanager create avd --force --name Android1 --package 'system-images;android-34;google_apis;x86' --abi google_apis/x86 --sdcard 512M --device "pixel_xl"

Next, you can start two identical emulators and assign their port numbers with the following commands:

emulator -avd Android1 -read-only -port 5554
emulator -avd Android1 -read-only -port 5556

Run

Given the source code of an Android project under test, SUDFinder will first generate test

python3 ./apk_gen.py -project_path ./AmazeFileManager -append_device emulator-5554 -append_device emulator-5556

-project_path: the source code of the app project under test

-append_device: the serial number of devices used in the test, which can be obtained by executing "adb devices" in the terminal.

Then, we use main_scale.py, main_screen.py, main_nightmode.py, and main_language.py to detect SUI bugs. For example,

python3 ./main_scale.py -apk_path ./AmazeFileManager_ttt.apk

where -apk_path denotes the apk generated by apk_gen.py from the source code of the Android app.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages