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

[Scheduler] [4.5.x Beta] Reboot Failing #662

Closed
Yowlen opened this Issue Dec 24, 2016 · 14 comments

Comments

2 participants
@Yowlen

Yowlen commented Dec 24, 2016

The new automatic reboot option in the scheduler isn't working. It results in a "1 Failed" notification. I'm running Android 5.1.1 on an LG Leon LTE (H345), fully rooted, w/ busybox installed, and I know the reboot terminal command works just fine. I should be able to fetch a logcat or whatever if needed.

@d4rken

This comment has been minimized.

Owner

d4rken commented Dec 24, 2016

@Yowlen

This comment has been minimized.

Yowlen commented Dec 24, 2016

Full reboot. Given your explanation, I suppose it's worth noting I'm using an unofficial XenonHD ROM for my device, which is somewhat incomplete (Camera2 API not working, for example), so it's entirely possible certain internal routines such as the reboot handler you use aren't working, either. Logcat isn't spitting out anything from SD Maid as far as I can see. I enabled the Experimental Features option for the instant Scheduler thing, but I'm not sure how to enable debug mode in SD Maid or find the debug logs.

@d4rken

This comment has been minimized.

Owner

d4rken commented Dec 24, 2016

@Yowlen

This comment has been minimized.

Yowlen commented Dec 24, 2016

Heh. Must've missed that when I checked the wiki. Anyway, I did that & it doesn't seem to be outputting anything. The first time I did it, the "/storage/emulated/0/Android/eu.thedarken.sdm/cache/logfiles" folder didn't exist. I added it to the exclusions list (SD Maid seems to be clearing that folder via the "Empty Directories" section of System Cleaner, btw), did another debug run, & monitored the folder during the run. The log file was never created.

@d4rken

This comment has been minimized.

Owner

d4rken commented Dec 24, 2016

You open SD Maid, go into debug, press the trigger button, then kill SD Maid (force stop).
Then on next start a log should be written.

Or you set debug mode to "2" and do a normal logcat recording.

@Yowlen

This comment has been minimized.

Yowlen commented Dec 24, 2016

Sorry for all the trouble. I've never done a logcat before. Here ya go.
2016-12-24-18-20-19.txt

@d4rken

This comment has been minimized.

Owner

d4rken commented Dec 24, 2016

You did well, good log.
So the system throws the error, not SD Maid.
It could be related to your ROM, but we can rule out a config issue from SD Maid by manually executing it. Try running am start -a android.intent.action.REBOOT in the terminal emulator app as root.

I/SDM:MiscWorker(13280): Initiating hard reboot (android.intent.action.REBOOT
V/SDM:InteractiveShell(13280): Input : SDMBOX=/data/data/eu.thedarken.sdm/files/toybox_sdm
D/SDM:InteractiveShell(13280): Opened(root:true)
D/SDM:InteractiveShell(13280): runCommand(Command(commands=[su --context u:r:system_app:s0 -c 'LD_LIBRARY_PATH=/vendor/lib:/system/lib:$LD_LIBRARY_PATH am start -a android.intent.action.REBOOT' < /dev/null]))
V/SDM:InteractiveShell(13280): Input : su --context u:r:system_app:s0 -c 'LD_LIBRARY_PATH=/vendor/lib:/system/lib:$LD_LIBRARY_PATH am start -a android.intent.action.REBOOT' < /dev/null
V/SDM:InteractiveShell(13280): Input : echo 592c3368-8268-457b-a8ac-56f9a7d5cf81 $?
V/SDM:InteractiveShell(13280): Input : echo 592c3368-8268-457b-a8ac-56f9a7d5cf81 >&2
W/PackageManager( 1073): Failure retrieving resources for eu.thedarken.sdm: Resource ID #0x0
V/SDM:InteractiveShell(13280): Output: Starting: Intent { act=android.intent.action.REBOOT }
V/SDM:InteractiveShell(13280): Error : java.lang.NullPointerException: storage == null
V/SDM:InteractiveShell(13280): Error : 	at android.os.Parcel.readException(Parcel.java:1552)
V/SDM:InteractiveShell(13280): Error : 	at android.os.Parcel.readException(Parcel.java:1499)
V/SDM:InteractiveShell(13280): Error : 	at android.app.ActivityManagerProxy.startActivityAsUser(ActivityManagerNative.java:2495)
V/SDM:InteractiveShell(13280): Error : 	at com.android.commands.am.Am.runStart(Am.java:766)
V/SDM:InteractiveShell(13280): Error : 	at com.android.commands.am.Am.onRun(Am.java:305)
V/SDM:InteractiveShell(13280): Error : 	at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
V/SDM:InteractiveShell(13280): Error : 	at com.android.commands.am.Am.main(Am.java:97)
V/SDM:InteractiveShell(13280): Error : 	at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
V/SDM:InteractiveShell(13280): Error : 	at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:249)
V/SDM:InteractiveShell(13280): Output: 592c3368-8268-457b-a8ac-56f9a7d5cf81 1
V/SDM:InteractiveShell(13280): Error : 592c3368-8268-457b-a8ac-56f9a7d5cf81
D/SDM:InteractiveShell(13280): runCommand(...): Command.Result(exitcode=1)
@Yowlen

This comment has been minimized.

Yowlen commented Dec 24, 2016

@d4rken

This comment has been minimized.

Owner

d4rken commented Dec 24, 2016

and typing "reboot" into the terminal as root works?

@d4rken

This comment has been minimized.

Owner

d4rken commented Dec 24, 2016

Does the HOT reboot option work?

@Yowlen

This comment has been minimized.

Yowlen commented Dec 24, 2016

@d4rken

This comment has been minimized.

Owner

d4rken commented Dec 25, 2016

So you would agree that it's not a bug in SD Maid?
Then lets add the reboot binary as "fallback" option to try if this error happens, and make this an enhancement 😀 ?

@Yowlen

This comment has been minimized.

Yowlen commented Dec 25, 2016

@d4rken d4rken modified the milestones: v4.5.6, Next Tasks Dec 25, 2016

@d4rken d4rken closed this Dec 25, 2016

@d4rken

This comment has been minimized.

Owner

d4rken commented Dec 25, 2016

If you'd like to test this, send me a mail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment