By mistake I deleted the .EXT folder (which contains a file "su") from the system/bin folder of my Android device. Is it possible to use ADB to replace this folder? I have a copy of the Bin folder and would like to Push this to my Android device with ADB push or ADB sideloader.
let's say you want to push entire C:\framework dir into /system/framework
put yourself in parent dir C:
adb push framework /system/
framework dir will be created automatically, so don't enter i.e. "adb push framework /system/framework/" or it will create a framework subdir
adb is in path
of course you need read write permission, so in case of read only /system precede
There is only one file in that directory so you can rather do this:
adb shell su -c mount -o rw,remount /system # remounts the system partition in read-write mode adb shell su -c mkdir /system/bin/.ext # creates the directory .ext under /system/bin/ adb push LOCAL_PATH/.su /system/bin/.ext/ # replace LOCAL_PATH with the path where your .su file resides in PC
If you still insist on pushing the folder, then create a new directory in PC and move
.ext directory inside it. (We're doing this because adb pushes only the content of a directory). Afterwards, do:
adb shell su -c mount -o rw,remount /system adb push LOCAL_PATH/NEW_DIR /system/bin/ # LOCAL_PATH/NEW_DIR is the path to the new directory you just made in PC
For both the cases: it appears that directory has full read-write permission from everyone, given the attributes
rwxrwxrwx. However, make sure to change the attributes for
adb shell su -c chmod 755 /system/bin/.ext/.su
See Can't remount /system in rw if my remounting instruction doesn't work.