It took me some time to figure out that server_thread was a copy of `abc.c:adb_main()`,
there is multiple things we can do to ease maintaining our patches on top of the upstream repo:
* try to add most of our code on top of the existing one. (compared to adding stuff in the existing code) For example here, I'm wondering if we can move server_thread() to a brand new file.
* when taking pieces of code from an existing method, it is really handy to refer to upstream existing code! Like here calling, why do we call adb_set_transport and adb_set_tcp_specifics ? I have no clear idea, but we can simply refer to the fact that server_create is based on adb_main and it is part of it.

Otherwise, I looked at the various compare views and changesets you gave, but we do not see the addition of this server_thread method. I don't know how hard it would be, but it would be really great if you can have a first revision in your branch where you commit the upstream adb version, and then as many patches of yours on top of it.

@mykmelez it is quite challenging to review this patch, do you think @bkase can squash this branch in order to make it clearer? It may help doing what I just suggested and have a clear view of what had been added/modified to upstream adb. Also, if our plan is to rewrite C++ code into JS, is there really a point in reviewing C++. I'd prefer to see Brandon submitting JS implemention rather than improving C++ code...