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

App manager doesn't run if you relaunch it. #1355

Open
3 tasks done
vordx opened this issue Apr 20, 2024 · 6 comments
Open
3 tasks done

App manager doesn't run if you relaunch it. #1355

vordx opened this issue Apr 20, 2024 · 6 comments
Labels
Bug Something isn't working Status: Info Requested Further information is requested Status: Pending The issue is not yet accepted

Comments

@vordx
Copy link

vordx commented Apr 20, 2024

Please check before submitting an issue

  • I know what my device, OS and App Manager versions are
  • I know how to take logs
  • I know how to reproduce the issue which may not be specific to my device

Describe the bug

App manager gets stuck when relaunching it from the background

To Reproduce

Screen_Recording_20240420_134426_AM.Debug.mp4

Expected behavior

Launch fine?

Screenshots

Shared a video above

Logs

No response

Device info

  • Device: Galaxy s23U
  • OS Version: Android 14, oneui 6.1
  • App Manager Version: 4.0.0-beta01 (436)
  • Mode: ADB

Additional context

No response

@vordx vordx added the Bug Something isn't working label Apr 20, 2024
@ascendbeing
Copy link

having this issue too. samsung a13 5g. February Samsung ota security update is possibly related because after installing it i could no longer view appdata in mixplorer. only after mixplorer added shizuku to beta features could i manage other apps appdatas, after updating to that February security update.
the symptom for me is as you say. i cannot rerun am in adb mode until i reboot. if i launch it, it won't say wireless debugging connected. it'll just sit there until either it times out (takes ages, like 5-10 min of waiting? doing nothing else, cause if you switch away it doesn't time out from background) or if it does time out it'll prompt which mode you want.
neither wirelessly debugging mode nor adb over tcp fix this. they both have this happen, and the only resolution is reboot the device.
i have even tried doing stuff like disabling phantom process monitoring and making sure shizuku isn't running. nothing fixes it. i think clearing app data of AM MIGHT. but that's a pretty extreme measure to have to take just to get am to launch in a manner that allows to change app ops and perms.

@ascendbeing
Copy link

Screenshot_20240528_032418_Firefox Nightly
i guess that sometimes it will pop up and tell you it failed to grab adb mode. this is android 13 the device is sm-a136.

@ascendbeing
Copy link

ascendbeing commented May 28, 2024

i didnt have am stable installed so i installed the latest and i was able to launch am 3.1.6 adb mode after pairing. still took ages to let me switch modes or choose pair etc. but it works. OP. maybe try that. i mostly use the snapshot version. the snapshot is the one that's having the issue, i dont remember it happening on 2 or 3.x but I'll share if it does.
EDIT: after I wrote that i went back into am stable and selecting anything in the app list it says App not installed.

if i had to guess this is an indicator i need to reflash stock rom because having it at 0-1% free space corrupted files or whatever it does when you fill it up and stuff never seems to work fully normally thereafter.

@MuntashirAkon
Copy link
Owner

@vordx: Can you take some logs when you try to launch it from background using the debug build? According to your video, it launched fine, but it didn't list any apps.

@ascendbeing: Please create a new issue with everything you have on the issue. Make sure to explain it in a step by step manner so that I can follow you. Please refrain from indicating what may went wrong other than the ones you're sure about (e.g., February updates, etc.). This creates a bias which makes it difficult to find out the actual issue.

@ascendbeing
Copy link

ascendbeing commented Jun 8, 2024

@MuntashirAkon although I am not the person who you asked for logs, here, I have some for you. This is what I see in logcat after I've previously ran AM and it worked, and this log is triggered either when trying to relaunch it (when it tries to go adb but fails) or when I got it on non root mode since that didn't work and am trying to change it to "auto" while wireless debugging is currently enabled in either case;

06-08 06:51:36.037 31647 31647 W System.err: android.view.WindowManager.LayoutParams Unable to load class java.lang.ClassNotFoundException: android.view.WindowManager.LayoutParams                                                         
06-08 06:52:04.448 31588 31639 W System.err: java.net.SocketTimeoutException: Read timed out                          
06-08 06:52:04.450 31588 31639 W System.err:    at java.net.SocketInputStream.socketRead0(Native Method)              
06-08 06:52:04.450 31588 31639 W System.err:    at java.net.SocketInputStream.socketRead(SocketInputStream.java:118)  
06-08 06:52:04.450 31588 31639 W System.err:    at java.net.SocketInputStream.read(SocketInputStream.java:173)        
06-08 06:52:04.450 31588 31639 W System.err:    at java.net.SocketInputStream.read(SocketInputStream.java:143)        
06-08 06:52:04.450 31588 31639 W System.err:    at java.io.DataInputStream.readFully(DataInputStream.java:203)        
06-08 06:52:04.450 31588 31639 W System.err:    at java.io.DataInputStream.readInt(DataInputStream.java:394)          
06-08 06:52:04.450 31588 31639 W System.err:    at io.github.muntashirakon.AppManager.server.common.DataTransmission.readMessage(DataTransmission.java:131)                      
06-08 06:52:04.450 31588 31639 W System.err:    at io.github.muntashirakon.AppManager.server.common.DataTransmission.sendAndReceiveMessage(DataTransmission.java:149)            
06-08 06:52:04.450 31588 31639 W System.err:    at io.github.muntashirakon.AppManager.servermanager.LocalServerManager.execPre(LocalServerManager.java:148)                      
06-08 06:52:04.450 31588 31639 W System.err:    at io.github.muntashirakon.AppManager.servermanager.LocalServerManager.execNew(LocalServerManager.java:160)                      
06-08 06:52:04.450 31588 31639 W System.err:    at io.github.muntashirakon.AppManager.servermanager.LocalServer.exec(LocalServer.java:140)                                       
06-08 06:52:04.450 31588 31639 W System.err:    at io.github.muntashirakon.AppManager.servermanager.LocalServer.runCommand(LocalServer.java:128)                                 
06-08 06:52:04.450 31588 31639 W System.err:    at io.github.muntashirakon.AppManager.ipc.RootService.lambda$asRunnable$0(RootService.java:203)                                  
06-08 06:52:04.450 31588 31639 W System.err:    at io.github.muntashirakon.AppManager.ipc.RootService$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0)                        
06-08 06:52:04.450 31588 31639 W System.err:    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)                                               
06-08 06:52:04.450 31588 31639 W System.err:    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)                                               
06-08 06:52:04.450 31588 31639 W System.err:    at java.lang.Thread.run(Thread.java:1012)                             
06-08 06:53:23.578 31588 31961 W System.err: java.io.FileNotFoundException: Cannot find file:///data/system/users/0/settings_ssaid.xml                                           
06-08 06:53:23.578 31588 31961 W System.err:    at io.github.muntashirakon.io.PathImpl.findFile(PathImpl.java:469)    
06-08 06:53:23.578 31588 31961 W System.err:    at io.github.muntashirakon.AppManager.ssaid.SsaidSettings.<init>(SsaidSettings.java:51)                                          
06-08 06:53:23.578 31588 31961 W System.err:    at io.github.muntashirakon.AppManager.db.utils.AppDb.updateVariableData(AppDb.java:374)                                          
06-08 06:53:23.578 31588 31961 W System.err:    at io.github.muntashirakon.AppManager.db.utils.AppDb.updateApplications(AppDb.java:295)                                          
06-08 06:53:23.578 31588 31961 W System.err:    at io.github.muntashirakon.AppManager.db.utils.AppDb.loadInstalledOrBackedUpApplications(AppDb.java:151)                         
06-08 06:53:23.578 31588 31961 W System.err:    at io.github.muntashirakon.AppManager.utils.PackageUtils.lambda$getInstalledOrBackedUpApplicationsFromDb$0(PackageUtils.java:253)
06-08 06:53:23.578 31588 31961 W System.err:    at io.github.muntashirakon.AppManager.utils.PackageUtils$$ExternalSyntheticLambda2.run(D8$$SyntheticClass:0)                     
06-08 06:53:23.578 31588 31961 W System.err:    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:487)                                                       
06-08 06:53:23.578 31588 31961 W System.err:    at java.util.concurrent.FutureTask.run(FutureTask.java:264)           
06-08 06:53:23.578 31588 31961 W System.err:    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)                                               
06-08 06:53:23.578 31588 31961 W System.err:    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)                                               
06-08 06:53:23.578 31588 31961 W System.err:    at java.lang.Thread.run(Thread.java:1012)                             
06-08 06:53:37.437 31588 31965 W System.err: java.io.FileNotFoundException: Cannot find file:///data/system/users/0/settings_ssaid.xml                                           
06-08 06:53:37.437 31588 31965 W System.err:    at io.github.muntashirakon.io.PathImpl.findFile(PathImpl.java:469)    
06-08 06:53:37.437 31588 31965 W System.err:    at io.github.muntashirakon.AppManager.ssaid.SsaidSettings.<init>(SsaidSettings.java:51)                                          
06-08 06:53:37.437 31588 31965 W System.err:    at io.github.muntashirakon.AppManager.db.utils.AppDb.updateVariableData(AppDb.java:374)                                          
06-08 06:53:37.437 31588 31965 W System.err:    at io.github.muntashirakon.AppManager.db.utils.AppDb.updateApplications(AppDb.java:295)                                          
06-08 06:53:37.438 31588 31965 W System.err:    at io.github.muntashirakon.AppManager.db.utils.AppDb.loadInstalledOrBackedUpApplications(AppDb.java:151)                         
06-08 06:53:37.438 31588 31965 W System.err:    at io.github.muntashirakon.AppManager.utils.PackageUtils.lambda$getInstalledOrBackedUpApplicationsFromDb$0(PackageUtils.java:253)
06-08 06:53:37.438 31588 31965 W System.err:    at io.github.muntashirakon.AppManager.utils.PackageUtils$$ExternalSyntheticLambda2.run(D8$$SyntheticClass:0)                     
06-08 06:53:37.438 31588 31965 W System.err:    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:487)                                                       
06-08 06:53:37.438 31588 31965 W System.err:    at java.util.concurrent.FutureTask.run(FutureTask.java:264)           
06-08 06:53:37.438 31588 31965 W System.err:    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)                                               
06-08 06:53:37.438 31588 31965 W System.err:    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)                                               
06-08 06:53:37.438 31588 31965 W System.err:    at java.lang.Thread.run(Thread.java:1012)

EDIT btw this is latest pre release (4.3.1?). but when this problem is active, no matter which AM app I attempt to launch (I have debug build installed and 4.3.x latest preview release, happens with latest stable too), none of them are able to claim adb. and this is galaxy a136u February 2024 security update.

Linux localhost 4.14.186-27210951 #1 SMP PREEMPT Fri Feb 16 15:09:50 KST 2024 armv8l Android```
EDIT 2: I will politely decline creating a separate issue. everything I am raising is under the umbrella of this issue. when I brought up about the reputation of this project, to have adb randomly stop working on at least some Samsung devices until you reboot, the reputational loss is people don't understand what's happening, leading to a drop off in people to provide issue reports, contribute code, etc.
also, thanks for following up with me, and please feel free to let me know if I may have missed anything in logcat or if you would like me to try anything specifically.

@MuntashirAkon
Copy link
Owner

06-08 06:52:04.448 31588 31639 W System.err: java.net.SocketTimeoutException: Read timed out
06-08 06:52:04.450 31588 31639 W System.err: at java.net.SocketInputStream.socketRead0(Native Method)
06-08 06:52:04.450 31588 31639 W System.err: at java.net.SocketInputStream.socketRead(SocketInputStream.java:118)
06-08 06:52:04.450 31588 31639 W System.err: at java.net.SocketInputStream.read(SocketInputStream.java:173)
06-08 06:52:04.450 31588 31639 W System.err: at java.net.SocketInputStream.read(SocketInputStream.java:143)
06-08 06:52:04.450 31588 31639 W System.err: at java.io.DataInputStream.readFully(DataInputStream.java:203)
06-08 06:52:04.450 31588 31639 W System.err: at java.io.DataInputStream.readInt(DataInputStream.java:394)
06-08 06:52:04.450 31588 31639 W System.err: at io.github.muntashirakon.AppManager.server.common.DataTransmission.readMessage(DataTransmission.java:131)
06-08 06:52:04.450 31588 31639 W System.err: at io.github.muntashirakon.AppManager.server.common.DataTransmission.sendAndReceiveMessage(DataTransmission.java:149)
06-08 06:52:04.450 31588 31639 W System.err: at io.github.muntashirakon.AppManager.servermanager.LocalServerManager.execPre(LocalServerManager.java:148)
06-08 06:52:04.450 31588 31639 W System.err: at io.github.muntashirakon.AppManager.servermanager.LocalServerManager.execNew(LocalServerManager.java:160)
06-08 06:52:04.450 31588 31639 W System.err: at io.github.muntashirakon.AppManager.servermanager.LocalServer.exec(LocalServer.java:140)
06-08 06:52:04.450 31588 31639 W System.err: at io.github.muntashirakon.AppManager.servermanager.LocalServer.runCommand(LocalServer.java:128)
06-08 06:52:04.450 31588 31639 W System.err: at io.github.muntashirakon.AppManager.ipc.RootService.lambda$asRunnable$0(RootService.java:203)
06-08 06:52:04.450 31588 31639 W System.err: at io.github.muntashirakon.AppManager.ipc.RootService$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0)
06-08 06:52:04.450 31588 31639 W System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
06-08 06:52:04.450 31588 31639 W System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
06-08 06:52:04.450 31588 31639 W System.err: at java.lang.Thread.run(Thread.java:1012)

This part looks interesting.

You need to be more thorough about your report. Instead of saying everything in one complex line, try to write it in an ordered list. This way I can understand the situation better and figure out what may go wrong. ADB is all about interacting with the adbd demon, and depending on operating system, a lot of things can go wrong. I would also suggest installing a debug build and send all the logs when it fails. You can also send me the logs privately at am4android-at-riseup-dot-net.

@MuntashirAkon MuntashirAkon added Status: Pending The issue is not yet accepted Status: Info Requested Further information is requested labels Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Status: Info Requested Further information is requested Status: Pending The issue is not yet accepted
Projects
None yet
Development

No branches or pull requests

3 participants