Tuesday, March 26, 2013

Re: [android-developers] Re: SdkController app

Thanks for the explanation and workaround!

2013/3/26 colin <colinm28@googlemail.com>:
> Yes. I built my own copy of the SdkController app and managed to track down
> the bug.
>
> The problem was (and presumably still is) that a string in the protocol
> being sent from the emulator to the app was being corrupted with four
> leading zero bytes. I didn't investigate the emulator code, but my
> assumption is that a struct-padding issue somewhere means that an extra word
> is being inserted into the stream of data when the emulator is compiled for
> MS Windows, but not for the Mac. (So the proper solution would be to track
> down where this is happening and process the relevant fields individually,
> rather than take the containing struct as a whole.)
>
> But for my purposes, I came up with a hack in the app file Connection.java.
> The string being corrupted is the channel name, causing the method
> getChannel() to return null -
>
>
>
> public Channel getChannel(String name){
>
> for (Channel channel : mChannels) {
>
> if (channel.getChannelName().equals(name)) {
>
> return channel;
>
> }
>
> }
>
> return null;
>
> }
>
>
>
> So I added a couple of lines within the above for loop to do wildcard
> matches on the only two channels that currently exist (sensor and
> multitouch) -
>
>
>
> if (channel.getChannelName().matches(".*sen.*")&& name.matches(".*sen.*") )
> {
>
> return channel;
>
> }
>
> if (channel.getChannelName().matches(".*multi.*")&&
> name.matches(".*multi.*") ) {
>
> return channel;
>
> }
>
>
>
> Ugly, but it got things working.
>
> To be honest, I didn't then do much with it, so I don't know if there are
> other issues. The fact that something so fundamental went unnoticed
> suggests there may well be.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> On Saturday, 23 March 2013 12:22:36 UTC, Sebioff wrote:
>>
>> Did you get it working in the meantime? This would be such an awesome
>> tool, but I can't get it working either and not many people seem to know
>> that this even exists, so it's hard to find help...
>>
>> Am Mittwoch, 14. November 2012 00:24:38 UTC+1 schrieb colin:
>>>
>>> Hi,
>>>
>>> Has anybody been able to get the SdkController app to work with the
>>> emulator? I found an old thread about this and tried to revive it, but I
>>> don't think I will be getting a reply there -
>>> https://groups.google.com/d/topic/adt-dev/TyZiFZ_Ns5Y/discussion.
>>>
>>> Given the video of it working on a Mac from Google IO, I'm wondering if
>>> there is a problem with the Windows version of the emulator.
>>>
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "Android Developers" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/android-developers/s6pQibI0Jb8/unsubscribe?hl=en.
> To unsubscribe from this group and all its topics, send an email to
> android-developers+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

--
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment