Skip to content

Conversation

@dipcore
Copy link

@dipcore dipcore commented Oct 6, 2016

No description provided.

@spion
Copy link
Owner

spion commented Oct 6, 2016

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

@dipcore
Copy link
Author

dipcore commented Oct 6, 2016

yes, right, added

@dipcore
Copy link
Author

dipcore commented Oct 6, 2016

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
Copy link
Author

dipcore commented Oct 6, 2016

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 ?

@spion
Copy link
Owner

spion commented Oct 7, 2016

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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants