TeamAmaze / TeamAmaze/AmazeFileManager

Add support for WSA (Windows Subsystem for Android)

Open
#2,969 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-USB Environment-Windows Issue-Discussion Issue-Feature
Dominant language
Kotlin
Stars
6.4k
Forks
1.7k
Avg merge
3d 9h
Merged PRs (30d)
1

Description

Issue explanation (write below this line)

I installed Amaze on WSA (Windows Subsystem for Android) and the app crashed on launch, showing me the error report below.

Exception

  • App Name: Amaze File Manager
  • Package: com.amaze.filemanager
  • Version: 3.6.5
  • User Action: UI Error
  • Request: Application crash
  • OS: Linux Android 11 - 30
  • Device: redfin
  • Model: Pixel 5
  • Product: redfin
Crash log

java.lang.RuntimeException: Unable to resume activity {com.amaze.filemanager/com.amaze.filemanager.ui.activities.MainActivity}: java.lang.NullPointerException: null cannot be cast to non-null type android.hardware.usb.UsbManager
	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4438)
	at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4470)
	at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52)
	at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loop(Looper.java:223)
	at android.app.ActivityThread.main(ActivityThread.java:7664)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.lang.NullPointerException: null cannot be cast to non-null type android.hardware.usb.UsbManager
	at com.amaze.filemanager.utils.OTGUtil.getMassStorageDevicesConnected(OTGUtil.kt:198)
	at com.amaze.filemanager.ui.activities.MainActivity.updateUsbInformation(MainActivity.java:1290)
	at com.amaze.filemanager.ui.activities.MainActivity.onResume(MainActivity.java:1282)
	at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1456)
	at android.app.Activity.performResume(Activity.java:8129)
	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4428)
	... 11 more


Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with OTGUtil.kt at line 198 and MainActivity.java around lines 1282-1290, following the crash path through getMassStorageDevicesConnected and updateUsbInformation. Reproduce the launch or resume behavior on WSA if possible, then verify that Amaze no longer crashes there while handling the unavailable USB service appropriately.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.