<div dir="ltr"><div><div><div>Added ssl support also. Although it works fine for some device, but my one device shows high cpu usage when connected to other. Some threads from netty gone mad, need a little deep inspection. Works fine for two other devices, also with pc which does not support ssl yet.<br></div>Need a little help in testing, the more it is tested the better it will work. Code needs some cleanup too which will be done later.<br></div>Code currently pushed to github.<br>Link : <a href="https://github.com/grgvineet/kdeconnect-android/tree/netty">https://github.com/grgvineet/kdeconnect-android/tree/netty</a><br>The branch for this change is "netty"<br><br></div>Vineet<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 19, 2015 at 4:07 AM, vineet garg <span dir="ltr"><<a href="mailto:grgvineet@gmail.com" target="_blank">grgvineet@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div>Implemented Netty in LanLinkProvider<br></div>onStart, onStop, onNetworkChange needs some more improvement but everything is working fine. Tested both with other Android device and Desktop.<br><br></div>Link : <a href="https://github.com/grgvineet/kdeconnect-android/tree/netty" target="_blank">https://github.com/grgvineet/kdeconnect-android/tree/netty</a><br></div>The branch for this change is "netty"<br><br></div>Cheers<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888">Vineet<br></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 19, 2015 at 12:46 AM, vineet garg <span dir="ltr"><<a href="mailto:grgvineet@gmail.com" target="_blank">grgvineet@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span>On Fri, Jun 19, 2015 at 12:43 AM, Albert Vaca <span dir="ltr"><<a href="mailto:albertvaka@gmail.com" target="_blank">albertvaka@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Oh ok, so it's not in kdeconnect yet. And with just the sample you can already reproduce the error, right? </p></blockquote><div><br></div></span><div>Yes, tested on device with Android 4.2.1, 5.0.2, 5.1<br></div><div>Error in only 5.0.2<br></div><div>Working on kdeconnect right now, if everything goes well it will be ready by tomorrows evening by Indian time.<br></div><div><div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>
<div class="gmail_quote">On Jun 18, 2015 12:08 PM, "vineet garg" <<a href="mailto:grgvineet@gmail.com" target="_blank">grgvineet@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 19, 2015 at 12:02 AM, Albert Vaca <span dir="ltr"><<a href="mailto:albertvaka@gmail.com" target="_blank">albertvaka@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Do you have any of this code in github so I can test it this weekend?<br></div></blockquote><div><br>Link for Netty Test : <a href="https://github.com/grgvineet/NettyTest" target="_blank">https://github.com/grgvineet/NettyTest</a> <br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 18, 2015 at 11:12 AM, vineet garg <span dir="ltr"><<a href="mailto:grgvineet@gmail.com" target="_blank">grgvineet@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span>On Thu, Jun 18, 2015 at 11:33 PM, Albert Vaca <span dir="ltr"><<a href="mailto:albertvaka@gmail.com" target="_blank">albertvaka@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><span><p dir="ltr">> In Netty too ssl client caused problems but this time Netty threw an exception.</p></span><p dir="ltr">What's the exception that you saw with Netty that you don't see with Mina? <br></p></div></blockquote><div> </div></span><div>The stack trace I get on 5.0 devices <a href="https://paste.kde.org/p7pgfrl5i" target="_blank">https://paste.kde.org/p7pgfrl5i</a> <br><br></div><span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><p>Also, does this mean that you have Netty already implemented? Is it working without SSL as well?<br></p></div></blockquote><div><br></div></span><div>I earlier developed a little application for testing of ssl connections on Android on which I can test ssl server and ssl client. I modified that application to work with netty based on netty examples. <br></div><div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><p><br></p><span><p dir="ltr">> So ssl will not work in Android 5.0</p></span><p>That doesn't sound great. Make it work without 5.0 first, but afterwards we will need a workaround for this.<br><br></p><span><p>> What is the severity of crash that you posted earlier?</p></span><p>I see around 5 reported crashes a week. <br></p><div><div><p></p><br><div class="gmail_quote">On Jun 18, 2015 7:41 AM, "vineet garg" <<a href="mailto:grgvineet@gmail.com" target="_blank">grgvineet@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div>Hi,<br><br></div>All issues regarding ssl not working are solved now. In MINA ssl client was causing much problem, without throwing any exception. In Netty too ssl client caused problems but this time Netty threw an exception. On searching around the cause of exception I came to know that there is a bug in Android OpenSSL library which is affects Android Lollipop 5.0 [1]. So I downloaded a Lollipop 5.1 image, and everything worked like a charm. So ssl will not work in Android 5.0<br><br></div>I am not happy with using MINA either for ssl, it does not provide much functionality. I can't even attach a handshake completed listener. Netty on the other hand has a nice implementation and much power and also a huge community is developing it and using it. Also lot of people also argue that Netty is better than MINA even author himself .<br></div>Since it is started by same person, much of the functionality is alike in Netty. I guess it will just take a day or two to port the existing code from MINA to Netty for LanLinkProvider. Also due to the standardization of network protocols, it should work with earlier devices as well.<br></div>What is the severity of crash that you posted earlier? If it is severe, I consider that we should go for Netty.<br><br></div><div>[1] Bug in Lollipop <a href="https://code.google.com/p/android-developer-preview/issues/detail?id=1521" target="_blank">https://code.google.com/p/android-developer-preview/issues/detail?id=1521</a><br></div><div>[2] Netty vs Mina <a href="http://stackoverflow.com/questions/1637752/netty-vs-apache-mina" target="_blank">http://stackoverflow.com/questions/1637752/netty-vs-apache-mina</a><br></div><div><br></div>Cheers <br></div>Vineet<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 18, 2015 at 1:45 AM, Albert Vaca <span dir="ltr"><<a href="mailto:albertvaka@gmail.com" target="_blank">albertvaka@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div>Hi Yuri,<br><br></div>Thanks for your input. Mina might be used as well in the SFTP plugin, but it is also used as a networking library, to send and receive all network messages.<span><font color="#888888"><br><br></font></span></div><span><font color="#888888">Albert</font></span><div><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 17, 2015 at 12:52 PM, Yuri Samoilenko <span dir="ltr"><<a href="mailto:kinnalru@gmail.com" target="_blank">kinnalru@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello.<div><br></div><div>I'am not watching for KDE connect carefully(and I dont know how Mina is used now), but Mina was added by me as simple embedable ssh-server. So if there is another ssh-server implementation of ssh-server for Java it can be used as drop-in replacement. There is a very few lines of code to instantiate ssh-server with Mina so migration must be simple.</div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">2015-06-17 3:10 GMT+03:00 Albert Vaca <span dir="ltr"><<a href="mailto:albertvaka@gmail.com" target="_blank">albertvaka@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div>Hi Vineet,<br><br></div>Some issues are always to be expected when developing something, but we will need to overcome them!<br><br></div><div>I didn't know about Netty at all, but if you think it is going to solve the problem and it's better than Mina, go for it. Actually, I'm not supper happy with Mina because most crashes from KDE Connect come from a weird issue that involves Mina [1].<br><br>If you go for Netty, that is going to require more effort than initially expected, so take it into account so you still meet your project deadlines. The most challenging part will be to make sure that devices running the old version of the app (Mina) and devices running the new one (Netty) are able to talk to each other, so either make sure that you can also have Netty without SSL (best solution), or simply keep Mina and Netty at the same time in different Links (less optimal solution).<br></div><div><br>In any case, I would raise the problem with SSL in Mina and Lollipop online (Mina's mailing 
list?) to see if more people also had trouble and know if there is a solution (because we might end up having more problems with Netty and we have to fall back to Mina again).<br><br></div><div>Let us know about your findings on this topic.<br></div><div><br></div><div>[1] Most common crash in KDE Connect: <a href="https://paste.ee/r/6wt4y" target="_blank">https://paste.ee/r/6wt4y</a><br></div><br></div>Albert<br><div><br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Tue, Jun 16, 2015 at 3:20 PM, vineet garg <span dir="ltr"><<a href="mailto:grgvineet@gmail.com" target="_blank">grgvineet@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><div dir="ltr"><div><div>After a lot of trouble I came to this conclusion that Mina and Android Lollipop are not compatible at all when using SSL filter. I used the filter as described in documentation. As soon as SSL filter is applied over the session, the CPU usage of the application becomes incredibly high causing OS to suspend all threads, so it doesn't work at all. It didn't worked earlier in emulator too because I was using Lollipop in emulator too. My new physical device is on Lollipop too. My old device is on Jellybean and it works fine on it. In emulator too, it works fine on Jellybean image. The main reason may be because of ART, but not sure.<br><br></div>So now I have two options, either implement this from basic like in KDE version, or use Netty instead. Both Netty and Mina was started by same person, Netty was started to overcome some of the problems in Mina. Netty is actively developed and a lot of people are working on it.<span><font color="#888888"><br><br></font></span></div><span><font color="#888888">Vineet<br><div><div><br></div></div></font></span></div>
<br></div></div>_______________________________________________<br>
KDEConnect mailing list<br>
<a href="mailto:KDEConnect@kde.org" target="_blank">KDEConnect@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kdeconnect" rel="noreferrer" target="_blank">https://mail.kde.org/mailman/listinfo/kdeconnect</a><br>
<br></blockquote></div><br></div></div>
<br>_______________________________________________<br>
KDEConnect mailing list<br>
<a href="mailto:KDEConnect@kde.org" target="_blank">KDEConnect@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kdeconnect" rel="noreferrer" target="_blank">https://mail.kde.org/mailman/listinfo/kdeconnect</a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
KDEConnect mailing list<br>
<a href="mailto:KDEConnect@kde.org" target="_blank">KDEConnect@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kdeconnect" rel="noreferrer" target="_blank">https://mail.kde.org/mailman/listinfo/kdeconnect</a><br>
<br></blockquote></div><br></div></div></div></div>
<br>_______________________________________________<br>
KDEConnect mailing list<br>
<a href="mailto:KDEConnect@kde.org" target="_blank">KDEConnect@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kdeconnect" rel="noreferrer" target="_blank">https://mail.kde.org/mailman/listinfo/kdeconnect</a><br>
<br></blockquote></div><br></div>
</blockquote></div>
</div></div></div>
</blockquote></div></div></div><br></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div></div>
</blockquote></div>
</div></div></blockquote></div></div></div><br></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>