<?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: unmount file system at shutdown in Android. in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/unmount-file-system-at-shutdown-in-Android/m-p/228336#M16634</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John, please click Correct Answer/Helpful Answer if your questions had been resolved.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Yixing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 May 2013 03:45:32 GMT</pubDate>
    <dc:creator>YixingKong</dc:creator>
    <dc:date>2013-05-21T03:45:32Z</dc:date>
    <item>
      <title>unmount file system at shutdown in Android.</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/unmount-file-system-at-shutdown-in-Android/m-p/228334#M16632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In some specific application on IMX6Q SABRE SD, I need to unmount /data and /system partition of android at&amp;nbsp; shutdown time. I have called function &lt;STRONG&gt;umount("/data") and umount2("/data",MNT_FORCE) at &lt;/STRONG&gt;very low level of&amp;nbsp; function&lt;STRONG&gt; android_reboot ( ) function&lt;/STRONG&gt; which is called from &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;ShutdownThread.java file. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;function umount fails at this point.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt;"&gt;can anyone suggest the place where i can call &lt;/SPAN&gt;&lt;STRONG style="font-size: 10pt; line-height: 1.5em;"&gt;umount&lt;/STRONG&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt;"&gt; function to unmount the file system &lt;/SPAN&gt;successfully&lt;SPAN style="line-height: 1.5em; font-size: 10pt;"&gt; ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Also, is remount function first umount the media and then mount?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Mar 2013 04:23:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/unmount-file-system-at-shutdown-in-Android/m-p/228334#M16632</guid>
      <dc:creator>johnturnur</dc:creator>
      <dc:date>2013-03-16T04:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: unmount file system at shutdown in Android.</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/unmount-file-system-at-shutdown-in-Android/m-p/228335#M16633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If there is process accessing the partition, it won't be allowed to umount/remount.&lt;/P&gt;&lt;P&gt;Take data partition for example, I can see zygote, setting, lock screen, ... are accessing it. There are no ways to let those processes release accessing now.&lt;/P&gt;&lt;P&gt;The simple way is just to kill zygote then other processes spawned by zygote will also got killed then release. (Since your use case is at shutdown)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, you can try the command in your console:&lt;/P&gt;&lt;P&gt;root@android:/ # stop&lt;/P&gt;&lt;P&gt;root@android:/ # umount /data&lt;/P&gt;&lt;P&gt;root@android:/ # mount&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;/dev/block/mmcblk0p5 /system ext4 ro,relatime,user_xattr,barrier=1,data=ordered 0 0&lt;/P&gt;&lt;P&gt;/dev/block/mmcblk0p6 /cache ext4 rw,nosuid,nodev,relatime,user_xattr,barrier=1,nomblk_io_submit,data=ordered 0 0&lt;/P&gt;&lt;P&gt;/dev/block/mmcblk0p7 /device ext4 ro,nosuid,nodev,relatime,user_xattr,barrier=1,data=ordered 0 0&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;As above showed, umount or remount worked.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 May 2013 07:34:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/unmount-file-system-at-shutdown-in-Android/m-p/228335#M16633</guid>
      <dc:creator>JayTu</dc:creator>
      <dc:date>2013-05-17T07:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: unmount file system at shutdown in Android.</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/unmount-file-system-at-shutdown-in-Android/m-p/228336#M16634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John, please click Correct Answer/Helpful Answer if your questions had been resolved.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Yixing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2013 03:45:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/unmount-file-system-at-shutdown-in-Android/m-p/228336#M16634</guid>
      <dc:creator>YixingKong</dc:creator>
      <dc:date>2013-05-21T03:45:32Z</dc:date>
    </item>
  </channel>
</rss>

