AmazeFileManager
AmazeFileManager copied to clipboard
ShellCommandInvalidException on move
Issue explanation (write below this line)
Exception
- User Action: UI Error
- Request: Application crash
- Version: 3.5.3
- OS: Linux Android 8.0.0 - 26
- Device: HWANE
- Model: ANE-LX3
- Product: ANE-LX3
Crash log
java.lang.RuntimeException: An error occurred while executing
doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:365)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
at java.util.concurrent.FutureTask.run(FutureTask.java:271)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:784)
Caused by: com.amaze.filemanager.exceptions.ShellCommandInvalidException:
mv "/storage/emulated/0/Pictures/EsBP2UvXAAUzpdy.png"
"/storage/9C33-6BBD/NMEL/EsBP2UvXAAUzpdy.png" , error code - 1
at
com.amaze.filemanager.filesystem.root.base.IRootCommand.runShellCommandToList(IRootCommand.kt:54)
at
com.amaze.filemanager.filesystem.root.RenameFileCommand.renameFile(RenameFileCommand.kt:41)
at
com.amaze.filemanager.asynchronous.asynctasks.MoveFiles.doInBackground(MoveFiles.java:114)
at
com.amaze.filemanager.asynchronous.asynctasks.MoveFiles.doInBackground(MoveFiles.java:59)
at android.os.AsyncTask$2.call(AsyncTask.java:345)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
... 3 more
Update:
Now crash is on runShellCommandToList(IRootCommand.kt:54)
I could reproduce this only when the Android Shell process is denied superuser permission.
@TranceLove What about denied sd card write permission? I think someone reported the couldn't copy files to sd card and got this crash. Is it possible that if sd card permission is not there we actually fallback to root method?
@VishalNehra From what I read, when File.renameTo() failed root mode is used right away if root is enabled. Otherwise MoveFiles would fail, and resort to CopyService + delete source at MoveFiles.onPostExecute()
https://github.com/TeamAmaze/AmazeFileManager/blob/bed5d1313ec57aac9acb66575b1cb6405867a018/app/src/main/java/com/amaze/filemanager/asynchronous/asynctasks/MoveFiles.java#L106-L122
Happened when copying specific (not all) files to SD from internal downloads.
Worked again and again on affected files - others had no issues ever.
Amaze had root