Skip to content
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

Found Fatal Exception Crashes from Testing #635

Open
Mai-hh opened this issue Jun 3, 2024 · 1 comment
Open

Found Fatal Exception Crashes from Testing #635

Mai-hh opened this issue Jun 3, 2024 · 1 comment

Comments

@Mai-hh
Copy link

Mai-hh commented Jun 3, 2024

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 bug 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 Receiver, 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.

com.simplemobiletools.musicplayer.helpers.MyWidgetProvider

Execution trace:

01-22 09:00:12.177 18231 18231 E AndroidRuntime: FATAL EXCEPTION: main
01-22 09:00:12.177 18231 18231 E AndroidRuntime: Process: com.simplemobiletools.musicplayer, PID: 18231
01-22 09:00:12.177 18231 18231 E AndroidRuntime: java.lang.RuntimeException: Unable to start receiver com.simplemobiletools.musicplayer.helpers.MyWidgetProvider: android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity  context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
01-22 09:00:12.177 18231 18231 E AndroidRuntime: 	at android.app.ActivityThread.handleReceiver(ActivityThread.java:4357)
01-22 09:00:12.177 18231 18231 E AndroidRuntime: 	at android.app.ActivityThread.access$1600(ActivityThread.java:256)
01-22 09:00:12.177 18231 18231 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2101)
01-22 09:00:12.177 18231 18231 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:106)
01-22 09:00:12.177 18231 18231 E AndroidRuntime: 	at android.os.Looper.loopOnce(Looper.java:201)
01-22 09:00:12.177 18231 18231 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:288)
01-22 09:00:12.177 18231 18231 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7842)
01-22 09:00:12.177 18231 18231 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
01-22 09:00:12.177 18231 18231 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
01-22 09:00:12.177 18231 18231 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
01-22 09:00:12.177 18231 18231 E AndroidRuntime: Caused by: android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity  context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
01-22 09:00:12.177 18231 18231 E AndroidRuntime: 	at android.app.ContextImpl.startActivity(ContextImpl.java:1080)
01-22 09:00:12.177 18231 18231 E AndroidRuntime: 	at android.app.ContextImpl.startActivity(ContextImpl.java:1056)
01-22 09:00:12.177 18231 18231 E AndroidRuntime: 	at android.content.ContextWrapper.startActivity(ContextWrapper.java:411)
01-22 09:00:12.177 18231 18231 E AndroidRuntime: 	at android.content.ContextWrapper.startActivity(ContextWrapper.java:411)
01-22 09:00:12.177 18231 18231 E AndroidRuntime: 	at com.simplemobiletools.musicplayer.helpers.MyWidgetProvider.c(SourceFile:22)
01-22 09:00:12.177 18231 18231 E AndroidRuntime: 	at com.simplemobiletools.musicplayer.helpers.MyWidgetProvider.onReceive(SourceFile:78)
01-22 09:00:12.177 18231 18231 E AndroidRuntime: 	at android.app.ActivityThread.handleReceiver(ActivityThread.java:4348)
01-22 09:00:12.177 18231 18231 E AndroidRuntime: 	... 9 more

adb command that triggers it:

#!/bin/bash

adb shell su 0 am broadcast -n "com.simplemobiletools.musicplayer/com.simplemobiletools.musicplayer.helpers.MyWidgetProvider" 
echo adb shell su 0 am broadcast -n "com.simplemobiletools.musicplayer/com.simplemobiletools.musicplayer.helpers.MyWidgetProvider" 
sleep 3.0
adb shell am force-stop com.simplemobiletools.musicplayer
sleep 2.0
#!/bin/bash

adb shell su 0 am broadcast -n "com.simplemobiletools.musicplayer/com.simplemobiletools.musicplayer.helpers.MyWidgetProvider" 
echo adb shell su 0 am broadcast -n "com.simplemobiletools.musicplayer/com.simplemobiletools.musicplayer.helpers.MyWidgetProvider" 
sleep 3.0
adb shell am force-stop com.simplemobiletools.musicplayer
sleep 2.0
adb shell su 0 am broadcast -n "com.simplemobiletools.musicplayer/com.simplemobiletools.musicplayer.helpers.MyWidgetProvider"  -a "android.content.Intent"
sleep 3.0
adb shell am force-stop com.simplemobiletools.musicplayer
sleep 2.0
#!/bin/bash

adb shell su 0 am broadcast -n "com.simplemobiletools.musicplayer/com.simplemobiletools.musicplayer.helpers.MyWidgetProvider" 
echo adb shell su 0 am broadcast -n "com.simplemobiletools.musicplayer/com.simplemobiletools.musicplayer.helpers.MyWidgetProvider" 
sleep 3.0
adb shell am force-stop com.simplemobiletools.musicplayer
sleep 2.0
adb shell su 0 am broadcast -n "com.simplemobiletools.musicplayer/com.simplemobiletools.musicplayer.helpers.MyWidgetProvider"  -a "TRACK_CHANGED"
sleep 3.0
adb shell am force-stop com.simplemobiletools.musicplayer
sleep 2.0
#!/bin/bash

adb shell su 0 am broadcast -n "com.simplemobiletools.musicplayer/com.simplemobiletools.musicplayer.helpers.MyWidgetProvider" 
echo adb shell su 0 am broadcast -n "com.simplemobiletools.musicplayer/com.simplemobiletools.musicplayer.helpers.MyWidgetProvider" 
sleep 3.0
adb shell am force-stop com.simplemobiletools.musicplayer
sleep 2.0
adb shell su 0 am broadcast -n "com.simplemobiletools.musicplayer/com.simplemobiletools.musicplayer.helpers.MyWidgetProvider"  -a "TRACK_CHANGED"
sleep 3.0
adb shell am force-stop com.simplemobiletools.musicplayer
sleep 2.0
#!/bin/bash

adb shell su 0 am broadcast -n "com.simplemobiletools.musicplayer/com.simplemobiletools.musicplayer.helpers.MyWidgetProvider" --ez IS_PLAYING false 
echo adb shell su 0 am broadcast -n "com.simplemobiletools.musicplayer/com.simplemobiletools.musicplayer.helpers.MyWidgetProvider" --ez IS_PLAYING false 
sleep 3.0
adb shell am force-stop com.simplemobiletools.musicplayer
sleep 2.0
adb shell su 0 am broadcast -n "com.simplemobiletools.musicplayer/com.simplemobiletools.musicplayer.helpers.MyWidgetProvider" --ez IS_PLAYING false  -a "TRACK_STATE_CHANGED"
sleep 3.0
adb shell am force-stop com.simplemobiletools.musicplayer
sleep 2.0
#!/bin/bash

adb shell su 0 am broadcast -n "com.simplemobiletools.musicplayer/com.simplemobiletools.musicplayer.helpers.MyWidgetProvider" --ez IS_PLAYING true 
echo adb shell su 0 am broadcast -n "com.simplemobiletools.musicplayer/com.simplemobiletools.musicplayer.helpers.MyWidgetProvider" --ez IS_PLAYING true 
sleep 3.0
adb shell am force-stop com.simplemobiletools.musicplayer
sleep 2.0
adb shell su 0 am broadcast -n "com.simplemobiletools.musicplayer/com.simplemobiletools.musicplayer.helpers.MyWidgetProvider" --ez IS_PLAYING true  -a "TRACK_STATE_CHANGED"
sleep 3.0
adb shell am force-stop com.simplemobiletools.musicplayer
sleep 2.0
#!/bin/bash

adb shell su 0 am broadcast -n "com.simplemobiletools.musicplayer/com.simplemobiletools.musicplayer.helpers.MyWidgetProvider" --ez IS_PLAYING true 
echo adb shell su 0 am broadcast -n "com.simplemobiletools.musicplayer/com.simplemobiletools.musicplayer.helpers.MyWidgetProvider" --ez IS_PLAYING true 
sleep 3.0
adb shell am force-stop com.simplemobiletools.musicplayer
sleep 2.0
adb shell su 0 am broadcast -n "com.simplemobiletools.musicplayer/com.simplemobiletools.musicplayer.helpers.MyWidgetProvider" --ez IS_PLAYING true  -a "TRACK_STATE_CHANGED"
sleep 3.0
adb shell am force-stop com.simplemobiletools.musicplayer
sleep 2.0
#!/bin/bash

adb shell su 0 am broadcast -n "com.simplemobiletools.musicplayer/com.simplemobiletools.musicplayer.helpers.MyWidgetProvider" 
echo adb shell su 0 am broadcast -n "com.simplemobiletools.musicplayer/com.simplemobiletools.musicplayer.helpers.MyWidgetProvider" 
sleep 3.0
adb shell am force-stop com.simplemobiletools.musicplayer
sleep 2.0
adb shell su 0 am broadcast -n "com.simplemobiletools.musicplayer/com.simplemobiletools.musicplayer.helpers.MyWidgetProvider"  -a "com.simplemobiletools.musicplayer.action.NEXT"
sleep 3.0
adb shell am force-stop com.simplemobiletools.musicplayer
sleep 2.0
#!/bin/bash

adb shell su 0 am broadcast -n "com.simplemobiletools.musicplayer/com.simplemobiletools.musicplayer.helpers.MyWidgetProvider" 
echo adb shell su 0 am broadcast -n "com.simplemobiletools.musicplayer/com.simplemobiletools.musicplayer.helpers.MyWidgetProvider" 
sleep 3.0
adb shell am force-stop com.simplemobiletools.musicplayer
sleep 2.0
adb shell su 0 am broadcast -n "com.simplemobiletools.musicplayer/com.simplemobiletools.musicplayer.helpers.MyWidgetProvider"  -a "com.simplemobiletools.musicplayer.action.PLAYPAUSE"
sleep 3.0
adb shell am force-stop com.simplemobiletools.musicplayer
sleep 2.0
#!/bin/bash

adb shell su 0 am broadcast -n "com.simplemobiletools.musicplayer/com.simplemobiletools.musicplayer.helpers.MyWidgetProvider" 
echo adb shell su 0 am broadcast -n "com.simplemobiletools.musicplayer/com.simplemobiletools.musicplayer.helpers.MyWidgetProvider" 
sleep 3.0
adb shell am force-stop com.simplemobiletools.musicplayer
sleep 2.0
adb shell su 0 am broadcast -n "com.simplemobiletools.musicplayer/com.simplemobiletools.musicplayer.helpers.MyWidgetProvider"  -a "com.simplemobiletools.musicplayer.action.PREVIOUS"
sleep 3.0
adb shell am force-stop com.simplemobiletools.musicplayer
sleep 2.0
#!/bin/bash

adb shell su 0 am broadcast -n "com.simplemobiletools.musicplayer/com.simplemobiletools.musicplayer.helpers.MyWidgetProvider" 
echo adb shell su 0 am broadcast -n "com.simplemobiletools.musicplayer/com.simplemobiletools.musicplayer.helpers.MyWidgetProvider" 
sleep 3.0
adb shell am force-stop com.simplemobiletools.musicplayer
sleep 2.0
adb shell su 0 am broadcast -n "com.simplemobiletools.musicplayer/com.simplemobiletools.musicplayer.helpers.MyWidgetProvider"  -a ""
sleep 3.0
adb shell am force-stop com.simplemobiletools.musicplayer
sleep 2.0
@Maxitendo1
Copy link

@Mai-hh SimpleMobileTools apps were sold to ad and spyware company. Fork is here:

https://github.com/FossifyOrg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants