A piece of code in adb seems to manipulate the file permission intentionally by copying owner's permission to group'' and '
other''. This causes kernel module load problems if we make some changes to kernel modules, and do adb sync'' or
adb push'' to the devices since mode 644 would become mode 666.
/* copy user permission bits to "group" and "other" permissions */
mode |= ((mode >> 3)
mode |= ((mode >> 3)
Anyone knows why it is necessary to do this? Any side-affects if I ``correct'' (to keep original file permission) this?
zombie@zombie-linux:~/Temp$ ls -la err
-rwxr--r-- 1 zombie zombie 10036 2011-11-04 13:36 err
zombie@zombie-linux:~/Temp$ adb push ./err /system/bin
162 KB/s (10036 bytes in 0.060s)
zombie@zombie-linux:~/Temp$ adb shell ls /system/bin/err -la
-rwxrwxrwx root root 10036 2011-11-04 18:36 err
zombie@zombie-linux:~/Temp$ chmod 644 err
zombie@zombie-linux:~/Temp$ adb push ./err /system/bin
213 KB/s (10036 bytes in 0.045s)
zombie@zombie-linux:~/Temp$ adb shell ls /system/bin/err -la
-rw-rw-rw- root root 10036 2011-11-04 18:36 err