title: adb shell "operation not permitted" for every command
body: <p>I recently did a factory reset of my android phone. Prior to the reset, I was able to install applications through <code>adb install</code>. The phone was not rooted.</p>
  
  <p>After the factory reset, I mostly get "Operation not permitted" for nearly every command in adb shell (including ones that don't exist):</p>
  
  <pre><code>$ install
  install: permission denied
  $ push
  push: permission denied
  $ remount
  remount: permission denied
  $ su
  su: permission denied
  $ kmmsaldfmaldskfmlasdf
  kmmsaldfmaldskfmlasdf: permission denied
  $
  </code></pre>
  
  <p>Most of the PATH is unreadable to me (except for /system/bin and /system/xbin):</p>
  
  <pre><code>$ echo $PATH
  /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
  $ ls /sbin
  opendir failed, Permission denied
  $ ls /vendor/bin
  /vendor/bin: No such file or directory
  $ ls /system/sbin/
  /system/sbin/: No such file or directory
  </code></pre>
  
  <p>If I run <code>adb root</code>:</p>
  
  <pre><code>$ adb root
  adbd cannot run as root in production builds
  </code></pre>
  
  <p>From my search (which has already robbed me of way more time than necessary), some pointers are to default.prop:</p>
  
  <pre><code>$ cat default.prop
  #
  # ADDITIONAL_DEFAULT_PROPERTIES
  #
  ro.secure=1
  ro.allow.mock.location=0
  ro.debuggable=0
  persist.service.adb.enable=1
  $
  </code></pre>
  
  <p>But I have no write access to default.prop:</p>
  
  <pre><code>$ ls -l default.prop 
  -rw-r--r-- root     root          118 1969-12-31 19:00 default.prop
  $
  </code></pre>
  
  <p>I also seem unable to remount. I have been able to use adb successfully on the non-rooted device, why so much grief now? Has anyone come across this problem? My own phone is virtually unusable to me, and of course I am unable to do any development.</p>
  
  <p>Trying to remount as rw:</p>
  
  <pre><code>$ mount
  rootfs / rootfs ro,relatime 0 0
  tmpfs /dev tmpfs rw,relatime,mode=755 0 0
  devpts /dev/pts devpts rw,relatime,mode=600 0 0
  proc /proc proc rw,relatime 0 0
  sysfs /sys sysfs rw,relatime 0 0
  tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
  tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
  /dev/stl9 /system rfs ro,relatime,vfat,log_off,check=no,gid/uid/rwx,iocharset=cp437 0 0
  /dev/stl10 /cache rfs rw,nosuid,nodev,relatime,vfat,llw,gid/uid/rwx,iocharset=cp437 0 0
  /dev/stl6 /mnt/.lfs j4fs rw,relatime 0 0
  /dev/stl11 /data rfs rw,nosuid,nodev,relatime,vfat,llw,check=no,gid/uid/rwx,iocharset=cp437 0 0
  $ mount -o remount,rw -t yaffs2 /dev/block/mtdblock0 /
  mount: Operation not permitted
  </code></pre>
  
  <p>My phone is a Samsung Galaxy Y, which could matter</p>