beemdevelopment / Aegis

A free, secure and open source app for Android to manage your 2-step verification tokens.

Home Page:https://getaegis.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Found Fatal Exception Crashes from Testing

Mai-hh opened this issue · comments

Version

v2.1.2

Source

F-Droid

Vault encryption

Yes (with biometric unlock)

Device

GenyMotion Emulator

Android version

Android 10

ROM

No response

Steps to reproduce

adb command that triggers it:

adb shell su 0 am start -n "com.beemdevelopment.aegis/com.beemdevelopment.aegis.ui.ImportEntriesActivity" 
echo adb shell su 0 am start -n "com.beemdevelopment.aegis/com.beemdevelopment.aegis.ui.ImportEntriesActivity" 
sleep 3.0
adb shell am force-stop com.beemdevelopment.aegis
sleep 2.0

What do you expect to happen?

ImportEntriesActivity runs as normal

What happens instead?

Crash

Hi! I'm a student researcher currently working on a project in the area of Android app analysis. As a part of the work centered around Intents, I found a bugs that resulted in crashes after analyzing logs/execution traces. Below are the relevant activities, traces, and adb commands that triggered the crashes. These bugs may be hidden in unexposed Activities, but they are worth investigating into to prevent potential issues down the line and addressing to improve the overall robustness and quality. If anyone can be confirm these to be valid bugs first, I would appreciate it, and I can help provide more information as needed.

Log

--------- beginning of crash
05-29 02:04:44.834 17467 17467 E AndroidRuntime: FATAL EXCEPTION: main
05-29 02:04:44.834 17467 17467 E AndroidRuntime: Process: com.beemdevelopment.aegis, PID: 17467
05-29 02:04:44.834 17467 17467 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.beemdevelopment.aegis/com.beemdevelopment.aegis.ui.ImportEntriesActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class com.beemdevelopment.aegis.importers.DatabaseImporter$Definition.getType()' on a null object reference
05-29 02:04:44.834 17467 17467 E AndroidRuntime: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2665)
05-29 02:04:44.834 17467 17467 E AndroidRuntime: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)
05-29 02:04:44.834 17467 17467 E AndroidRuntime: 	at android.app.ActivityThread.-wrap12(ActivityThread.java)
05-29 02:04:44.834 17467 17467 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477)
05-29 02:04:44.834 17467 17467 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:102)
05-29 02:04:44.834 17467 17467 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:154)
05-29 02:04:44.834 17467 17467 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:6119)
05-29 02:04:44.834 17467 17467 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
05-29 02:04:44.834 17467 17467 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
05-29 02:04:44.834 17467 17467 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
05-29 02:04:44.834 17467 17467 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class com.beemdevelopment.aegis.importers.DatabaseImporter$Definition.getType()' on a null object reference
05-29 02:04:44.834 17467 17467 E AndroidRuntime: 	at com.beemdevelopment.aegis.ui.ImportEntriesActivity.onCreate(ImportEntriesActivity.java:129)
05-29 02:04:44.834 17467 17467 E AndroidRuntime: 	at android.app.Activity.performCreate(Activity.java:6679)
05-29 02:04:44.834 17467 17467 E AndroidRuntime: 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
05-29 02:04:44.834 17467 17467 E AndroidRuntime: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2618)
05-29 02:04:44.834 17467 17467 E AndroidRuntime: 	... 9 more

Forcibly launching a private activity like this is not supported. A crash is to be expected, because the expected parameters are missing from the intent.