<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: i.MX6DL/Solo booting Android 4.2.2 over NFS: error: cannot create dir, Permission denied in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6DL-Solo-booting-Android-4-2-2-over-NFS-error-cannot-create/m-p/311171#M40644</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I find putting "setprop ro.nfs.mode yes" in init.rc at beginning of boot section ("on boot") works best.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Apr 2014 23:51:59 GMT</pubDate>
    <dc:creator>brenton</dc:creator>
    <dc:date>2014-04-15T23:51:59Z</dc:date>
    <item>
      <title>i.MX6DL/Solo booting Android 4.2.2 over NFS: error: cannot create dir, Permission denied</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6DL-Solo-booting-Android-4-2-2-over-NFS-error-cannot-create/m-p/311167#M40640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to get a MX6-Solo to boot Android from TFTP and run over NFS.&amp;nbsp; But it always fails with Android encountering filesystem Permission denied during init (installd processing).&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Specifically, the board successfully loads the kernel image (using tftp), and Android mounts the nfs root filesystem and begins its initialization (init.rc operations).&amp;nbsp; However, logcat shows that the installd process can't create the necessary subdriectories, e.g. &lt;/P&gt;&lt;P&gt;&amp;nbsp; E/installd( 2421): cannot create dir '/data/data/com.android.providers.contacts': Permission denied&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At this point /data/data is owned by system (1000) with permissions 771.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This seems suspicious to me because init.rc launches the installd service as system/system.&amp;nbsp; So why doesn't it have permissions to create subdirectories?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Additionally, if I change init.rc so that /data/data is created with permissions 777 instead of 771 (just so it can get past this problem), installd will then create directories for all the system apps in /data/data, and these will be owned by 1012/1012 (AID_INSTALL/AID_INSTALL - see android_filesystem_config.h) with 751 permissions.&amp;nbsp; But unfortunately then fails to chown these directories, reporting in logcat:&lt;/P&gt;&lt;P&gt;E/installd( 2420): cannot chown dir '/data/data/com.android.providers.contacts': Operation not permitted&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm presuming this is where installd wants to chown each directory to its corresponding application uid (e.g. u0_a0/u0_a0 as I observe in the Emulator). But, at least under Linux, a regular user (such as installd) can't chown a file or directory to another user.&amp;nbsp; So Android must have hacked this part of linux, which is fine except in this case it doesn't work because the nfs server is linux not Android.&amp;nbsp; Is that why Operation not permitted is thrown?&amp;nbsp; Nevertheless this is a secondary problem.&amp;nbsp; The original problem is why installd can't create directories within /data/data which is owned by system (1000) with 771 permissions?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone been able to boot and run Android over nfs?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Things I've tried with no success:&lt;/P&gt;&lt;P&gt;1. Followed the instructions in the Android_User_Guide.pdf for configuring init.rc and init.freescale.rc to boot over nfs.&lt;/P&gt;&lt;P&gt;2. Moved all users and groups on the nfs server that might collide with Android's uid/gids out of the way up into the 90000 range.&amp;nbsp; I've verified this works as Android uses 1000/1000 for its System uid which doesn't exist on the NFS server, and observe Android is successful in chown'ing directories there from root to 1000.&amp;nbsp; So Android is able to modify the filesystem.&lt;/P&gt;&lt;P&gt;3. Switched the Android build target from user to eng thinking it might be a security setting for production to not allow it to run over nfs.&amp;nbsp; But even under eng target there is the same problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gory details -&lt;/P&gt;&lt;P&gt;/etc/exportfs:&lt;/P&gt;&lt;P&gt;/home/b8t/rootfs *(rw,sync,nohide,insecure,no_subtree_check,no_root_squash)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bootargs given to kernel:&lt;/P&gt;&lt;P&gt;Kernel command line: console=ttymxc0,115200 video=mxcfb0:dev=ldb,800x480M@60,bpp=32 fbmem=10M var_ts_type=ctw6120 init=/init nosmp gpumem=64M vmalloc=400M androidboot.console=ttymxc0 androidboot.hardware=freescale root=/dev/nfs ip=192.168.2.58 nfsroot=192.168.2.21:/home/b8t/rootfs,v3,tcp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using Android 4.2.2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2014 23:46:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6DL-Solo-booting-Android-4-2-2-over-NFS-error-cannot-create/m-p/311167#M40640</guid>
      <dc:creator>brenton</dc:creator>
      <dc:date>2014-04-04T23:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6DL/Solo booting Android 4.2.2 over NFS: error: cannot create dir, Permission denied</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6DL-Solo-booting-Android-4-2-2-over-NFS-error-cannot-create/m-p/311168#M40641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm facing exactly same situation on different (not Freescale's) hardware.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess problem is caused by installd's code that tries to drop privileges but keep filesystem access permissions via capabilities. &lt;/P&gt;&lt;P&gt;See code in drop_privileges() routine in installd source. Perhaps NFS server knows nothing about capabilities of client-side process and thus denies requests.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't yet know how to workaround this. Probably commenting out permission dropping in installd source will work, but don't know what consequences this will cause.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Apr 2014 06:00:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6DL-Solo-booting-Android-4-2-2-over-NFS-error-cannot-create/m-p/311168#M40641</guid>
      <dc:creator>nikitayushchenk</dc:creator>
      <dc:date>2014-04-10T06:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6DL/Solo booting Android 4.2.2 over NFS: error: cannot create dir, Permission denied</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6DL-Solo-booting-Android-4-2-2-over-NFS-error-cannot-create/m-p/311169#M40642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Seems like the placement of "setprop ro.nfs.mode yes" in init.freescale.rc is significant. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If positioned at the end of the "on boot" section, then the above problem (insufficient permissions) is observed.&amp;nbsp; However, if the property is set earlier in the section then Android won't encounter this problem - although other errors still exist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll post another update if/when I can get this to work better after some more experimentation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2014 18:41:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6DL-Solo-booting-Android-4-2-2-over-NFS-error-cannot-create/m-p/311169#M40642</guid>
      <dc:creator>brenton</dc:creator>
      <dc:date>2014-04-14T18:41:29Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6DL/Solo booting Android 4.2.2 over NFS: error: cannot create dir, Permission denied</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6DL-Solo-booting-Android-4-2-2-over-NFS-error-cannot-create/m-p/311170#M40643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to boot over NFS using and the boot was successful. I have not checked if I get a error in logcat.&lt;/P&gt;&lt;P&gt;I wonder if you can try with JB43 ? &lt;A href="http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX6Q&amp;amp;fpsp=1&amp;amp;tab=Design_Tools_Tab" title="http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX6Q&amp;amp;fpsp=1&amp;amp;tab=Design_Tools_Tab#"&gt;http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX6Q&amp;amp;fpsp=1&amp;amp;tab=Design_Tools_Tab#&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Alejandro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Apr 2014 21:22:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6DL-Solo-booting-Android-4-2-2-over-NFS-error-cannot-create/m-p/311170#M40643</guid>
      <dc:creator>alejandrolozan1</dc:creator>
      <dc:date>2014-04-15T21:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6DL/Solo booting Android 4.2.2 over NFS: error: cannot create dir, Permission denied</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6DL-Solo-booting-Android-4-2-2-over-NFS-error-cannot-create/m-p/311171#M40644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I find putting "setprop ro.nfs.mode yes" in init.rc at beginning of boot section ("on boot") works best.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Apr 2014 23:51:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6DL-Solo-booting-Android-4-2-2-over-NFS-error-cannot-create/m-p/311171#M40644</guid>
      <dc:creator>brenton</dc:creator>
      <dc:date>2014-04-15T23:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6DL/Solo booting Android 4.2.2 over NFS: error: cannot create dir, Permission denied</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6DL-Solo-booting-Android-4-2-2-over-NFS-error-cannot-create/m-p/311172#M40645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using JB 4.2.2 (basis of product) and hence not able to switch at this time to JB 4.3.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Apr 2014 23:53:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6DL-Solo-booting-Android-4-2-2-over-NFS-error-cannot-create/m-p/311172#M40645</guid>
      <dc:creator>brenton</dc:creator>
      <dc:date>2014-04-15T23:53:50Z</dc:date>
    </item>
  </channel>
</rss>

