<div dir="ltr">Hello Christopher,<div><br></div><div>is it possible that you can search in your collection the Android.mk file you created so that I can re-use and not spend time in re-inventing the wheel and one another minor question, the android you have tested was using a custom kernel build with &quot;CONFIG_CHECKPOINT_RESTORE&quot; enabled ?. Also a last question If my kernel is enabled with &quot;CONFIG_CHECKPOINT_RESTORE&quot;, than can I use a statically linked binary as right when I am using statically compiled binary it gives the following error:</div><div><br></div><div><div>Error (sockets.c:128): Diag module missing (-2)</div><div>Error (sockets.c:128): Diag module missing (-2)</div><div>Error (sockets.c:128): Diag module missing (-2)</div><div>Error (kerndat.c:154): Can&#39;t stat self map_files 2: No such file or directory</div><div>Error (cr-dump.c:1578): Dumping FAILED.</div></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><font size="2">Best Regard -- <font color="#0b5394">ALLAH Hafiz</font>, <font color="#0b5394">May</font><font color="#0b5394"> Almighty ALLAH bless you</font></font></div>
        
  <p style="font-family:Helvetica,Arial,sans-serif;font-size:10px;line-height:12px">
      
    </p>
    <table border="0" cellpadding="0" cellspacing="0" style="margin:0px;padding:0px;border:0px;outline:0px;font-size:14px;font-family:proxima-nova-1,proxima-nova-2,Tahoma,Helvetica,Verdana,sans-serif;vertical-align:baseline;border-spacing:0px;color:rgb(51,51,51);line-height:18.2000007629395px"><tbody style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline"><tr style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline"><td style="padding:0px;border:0px;outline:0px;font-style:inherit;font-size:0px;font-family:inherit;vertical-align:baseline;width:auto;height:30px"> </td></tr><tr style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline"><td style="padding:0px;border:0px;outline:0px;font-style:inherit;font-family:inherit;vertical-align:baseline;width:auto"><div style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline;line-height:0"><a href="https://about.me/yousafzaiabdullah?promo=email_sig" style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline;color:rgb(43,130,173);text-decoration:none;display:inline-block" target="_blank"><table border="0" cellpadding="0" cellspacing="0" style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline;border-spacing:0px"><tbody style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline"><tr style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline"><td align="left" valign="top" style="padding:0px;border:0px;outline:0px;font-style:inherit;font-family:inherit;vertical-align:top;width:48px;line-height:1"><img alt="--" width="0" height="0" style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline;display:block;width:0px;height:0px;overflow:hidden"><div style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline"><img src="https://s.gravatar.com/avatar/fed5b9284cee3e24148b0240c5def1e1?s=80" alt="" width="48" height="48" style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline;display:block"></div></td><td style="padding:0px;border:0px;outline:0px;font-style:inherit;font-size:0px;font-family:inherit;vertical-align:baseline;width:8px"> </td><td align="left" valign="middle" style="padding:0px;border:0px;outline:0px;font-style:inherit;font-family:inherit;vertical-align:middle;width:auto;height:48px;line-height:1"><div style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:bold;font-style:inherit;font-size:18px;font-family:proxima-nova-1,Proxima-Nova,Helvetica,Arial,sans-serif;vertical-align:baseline;color:rgb(51,51,51)">Abdullah Yousafzai</div><div style="margin:2px 0px 0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-size:12px;font-family:proxima-nova-1,Proxima-Nova,Helvetica,Arial,sans-serif;vertical-align:baseline"><img alt="https://" width="0" height="0" style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline;display:block;width:0px;height:0px;overflow:hidden">about.me/yousafzaiabdullah</div></td></tr></tbody></table></a>                                 </div></td></tr><tr style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline"><td style="padding:0px;border:0px;outline:0px;font-style:inherit;font-size:0px;font-family:inherit;vertical-align:baseline;width:auto;height:20px"><img src="https://about.me/t/sig?u=yousafzaiabdullah" width="1" height="1" style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline;overflow:hidden"></td></tr></tbody></table>
     <p style="font-family:Helvetica,Arial,sans-serif;font-size:10px;line-height:12px">
      </p>

    <p style="font-family:Helvetica,Arial,sans-serif;font-size:9px;line-height:12px"></p></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Wed, Jan 27, 2016 at 11:47 PM, Christopher Covington <span dir="ltr">&lt;<a href="mailto:cov@codeaurora.org" target="_blank">cov@codeaurora.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 01/25/2016 09:39 PM, Abdullah Yousafzai wrote:<br>
&gt; Hello Everybody,<br>
&gt;<br>
&gt; Thank you for your interest now it seems I can sort out this problem<br>
&gt; with the help of you peoples.<br>
&gt;<br>
&gt; Christopher, does your version of CRIU on Android was statically linked<br>
&gt; or dynamically linked.<br>
<br>
</span>We&#39;ve done both. My preference is for dynamic linking. Maybe building<br>
with bionic will just work the first time. But if it doesn&#39;t, I would<br>
guess that comparing against a working glibc based build would be the<br>
easiest way to debug.<br>
<br>
If you&#39;d like to run CRIU that&#39;s dynamically linked against glibc, just<br>
make sure the following paths are valid for the expected GNU ld and libc<br>
components.<br>
<br>
aarch64-linux-gnu-readelf criu | grep -E &#39;(interpreter|NEEDED)&#39;<br>
<br>
If you get a mysterious not found error right at the beginning, it&#39;s<br>
probably because the linker/loader/interpreter path isn&#39;t valid.<br>
<br>
I&#39;ve used the -Wl,-dynamic-linker=... and -Wl,-rpath=... build flags and<br>
the LD_LIBRARY_PATH=... environment variable at various times to help<br>
with paths.<br>
<br>
I don&#39;t know if I&#39;ve reported this previously, but my recollection is<br>
that that &lt;linker&gt; &lt;executable&gt; style execution, such as `ld-linux.so<br>
criu`, doesn&#39;t work. Or maybe it was criu dump/restore of an<br>
`ld-linux.so loop` process, I don&#39;t remember exactly, sorry, just that<br>
it was a really obscure corner case.<br>
<br>
Hope that helps,<br>
Cov<br>
<span class="im HOEnZb"><br>
&gt; Abdullah Yousafzai<br>
&gt; <a href="https://about.me/yousafzaiabdullah" rel="noreferrer" target="_blank">https://about.me/yousafzaiabdullah</a><br>
&gt;<br>
&gt; &lt;<a href="https://about.me/yousafzaiabdullah?promo=email_sig" rel="noreferrer" target="_blank">https://about.me/yousafzaiabdullah?promo=email_sig</a>&gt;<br>
&gt;<br>
&gt;<br>
</span><span class="im HOEnZb">&gt; On Mon, Jan 25, 2016 at 9:45 PM, Christopher Covington<br>
</span><div class="HOEnZb"><div class="h5">&gt; &lt;<a href="mailto:cov@codeaurora.org">cov@codeaurora.org</a> &lt;mailto:<a href="mailto:cov@codeaurora.org">cov@codeaurora.org</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;     Hi Abdullah,<br>
&gt;<br>
&gt;     On 01/25/2016 04:41 AM, Cyrill Gorcunov wrote:<br>
&gt;     &gt; On Mon, Jan 25, 2016 at 12:33:55PM +0300, Pavel Emelyanov wrote:<br>
&gt;     &gt;&gt; On 01/22/2016 05:52 AM, Abdullah Yousafzai wrote:<br>
&gt;     &gt;&gt;&gt; Compiling CRIU for arm64 is straight and work as piece of cake<br>
&gt;     but I need it to compile it for<br>
&gt;     &gt;&gt;&gt; android and specifically on ARM64. So for this reason I have to<br>
&gt;     rewrite the Makefiles to<br>
&gt;     &gt;&gt;&gt; Android.mk in order to be understandable and in compliance with<br>
&gt;     the android build environment.<br>
&gt;     &gt;&gt;&gt; I only need to checkpoint user apps and check the behavior on<br>
&gt;     Android any help on breaking down<br>
&gt;     &gt;&gt;&gt; the existing Makefile and transforming it to Android.mk will be<br>
&gt;     appreciated.<br>
&gt;     &gt;&gt;<br>
&gt;     &gt;&gt; I&#39;ve CC-ed Christopher for help with ARM and Cyrill for help with<br>
&gt;     Makefiles.<br>
&gt;     &gt;<br>
&gt;     &gt; Sorry for not replying early, managed to miss the mail. I&#39;m ready<br>
&gt;     to help but<br>
&gt;     &gt; the problem is that I&#39;ve no clue about Android specifics. I&#39;ve<br>
&gt;     been playing with<br>
&gt;     &gt; andoid apps but they were using ant tool for building applications<br>
&gt;     which is<br>
&gt;     &gt; very different from traditional make.<br>
&gt;<br>
&gt;     My suggestion would be to start with a stub Android.mk that calls the<br>
&gt;     existing makefiles. I believe the Linux kernel Android.mk can be<br>
&gt;     referred to as an example of this. There are burdens and benefits to<br>
&gt;     writing and maintaining a parallel set of build instructions. I think a<br>
&gt;     stub Android.mk could deliver many of the benefits with little of the<br>
&gt;     burden. Once that&#39;s working, committed, and in use, I think it will be<br>
&gt;     clearer what larger-scale changes and additions would be most useful.<br>
&gt;<br>
&gt;     I&#39;ve run CRIU on Android (both AArch32 and AArch64), but it was built<br>
&gt;     against the GNU C library, not the Android C library, Bionic. There have<br>
&gt;     been some other Android efforts in the past. You could search the<br>
&gt;     mailing list archives; I unfortunately don&#39;t remember the details. It&#39;s<br>
&gt;     possible some Bionic porting will be required, in addition to handling<br>
&gt;     Android-specific resources.<br>
&gt;<br>
&gt;     Regards,<br>
&gt;     Christopher Covington<br>
&gt;<br>
&gt;     --<br>
&gt;     Qualcomm Innovation Center, Inc.<br>
&gt;     Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,<br>
&gt;     a Linux Foundation Collaborative Project<br>
&gt;<br>
&gt;<br>
<br>
<br>
--<br>
Qualcomm Innovation Center, Inc.<br>
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,<br>
a Linux Foundation Collaborative Project<br>
</div></div></blockquote></div><br></div>