adbfs-rootless icon indicating copy to clipboard operation
adbfs-rootless copied to clipboard

chmod and chown support

Open dipcore opened this issue 9 years ago • 5 comments

dipcore avatar Oct 06 '16 02:10 dipcore

Might be a good idea to use shell_escape_path like the other functions

spion avatar Oct 06 '16 08:10 spion

yes, right, added

dipcore avatar Oct 06 '16 18:10 dipcore

Hm, found one more interesting thing, it seems like it looses permissions, if I try to edit a file. before editing 755, after 644

Don't you mind, if I add a debug mode and logging to syslog instead of cout ?

dipcore avatar Oct 06 '16 18:10 dipcore

What I see in logs if I try to save it:

--*-- exec_command: adb shell "ls -l -a -d '/system/etc/init.d/10adbd'"
--*-- exec_command: adb shell "ls -l -a -d '/etc'"
--*-- exec_command: adb shell "ls -l -a -d '/system'"
--*-- exec_command: adb shell "ls -l -a -d '/system/etc'"
--*-- exec_command: adb shell "ls -l -a -d '/system/etc/init.d'"
--*-- exec_command: adb shell "ls -l -a -d '/system/etc/init.d/.#10adbd'"
--*-- exec_command: adb shell "ls -l -a -d '/system/etc/init.d/10adbd'"
--*-- exec_command: adb shell "chown 0.0 /system/etc/init.d/10adbd"
--*-- exec_command: adb shell "ls -l -a -d '/system/etc/init.d/10adbd'"
--*-- exec_command: adb shell "chmod 755 /system/etc/init.d/10adbd"
--*-- exec_command: adb shell "ls -l -a -d '/system/etc/init.d/10adbd'"
--*-- exec_command: adb shell "ls -l -a -d '/system/etc/init.d/10adbd'"
--*-- exec_command: adb shell "ls -l -a -d '/system/etc/init.d/10adbd'"
1 KB/s (74 bytes in 0.041s)
--*-- exec_command: adb push '/tmp/adbfs-eSuqrf/-system-etc-init.d-10adbd' '/system/etc/init.d/10adbd'
--*-- exec_command: adb shell "sync"

So the problem seems in the last adb push What do you think ?

dipcore avatar Oct 06 '16 19:10 dipcore

Looks like adb push resets the permissions. Might need to come up with a scheme to preserve them in the dictionary then chmod after the push.

spion avatar Oct 07 '16 12:10 spion