[Samsung Gear 2] biktor_gj:
The good, the bad and the ugly

Are you sure it's not crashing? Did you check the logcat? Since you removed the MediaProvider half the framework won't work... The only thing I can tell you (for sure) about the TS is this:

I/SystemServiceManager( 407): Starting phase 100
I/DisplayManagerService( 407): Display device added: DisplayDeviceInfo{"Built-in Screen": 320 x 320, 59.0 fps, density 240, 135.466 x 135.466 dpi, touch INTERNAL, rotation 0, type BUILT_IN, state UNKNOWN, FLAG_DEFAULT_DISPLAY, FLAG_ROTATES_WITH_CONTENT, FLAG_SECURE, FLAG_SUPPORTS_PROTECTED_BUFFERS}
I/SystemServer( 407): Package Manager

And that it works perfectly calibrated on recovery, so, being capacitive, it shouldn't need that (I think)... But maybe it's the density what's messed up or something else.

Anyway, first we need to clear out all the crashing stuff before we move forward. Now we know it can boot, which was the first important step. Now we have to make it work correctly, with the least possible amount of dependencies over binary libraries not designed for the watch., so...

The good: I've built a tinyalsa-based audio library which loads correctly and doesn't crash. I don't expect it to actually work, but it's enough for now (the YMU831 is exposed as an ALSA device so I can pick up Qualcomm's full alsa library and modify it so it works with ours if it it's needed):

I/AudioPolicyManagerBase( 106): loadAudioPolicyConfig() loaded /system/etc/audio_policy.conf
E/audio_route( 106): Control 'Clear Dsp Parameter' already exists in path 'handsfree-bt-music-speaker'
E/audio_route( 106): Control 'MICBIAS SWITCH' doesn't exist - skipping
E/audio_route( 106): Control 'Clear Dsp Parameter' already exists in path 'param_loopback_mic'
E/audio_route( 106): Control 'MICBIAS SWITCH' doesn't exist - skipping
E/audio_route( 106): Control 'Clear Dsp Parameter' already exists in path 'loopback-packet-main-mic'
E/audio_route( 106): Control 'Clear Dsp Parameter' already exists in path 'loopback-packet-second-mic'
E/audio_route( 106): Control 'Clear Dsp Parameter' already exists in path 'bt-hfp-2mic-svoice-rec'
I/AudioFlinger( 106): loadHwModule() Loaded primary audio interface from B2 audio HW HAL (audio) handle 1
I/AudioFlinger( 106): HAL output buffer size 512 frames, normal mix buffer size 1024 frames

The bad: Mediaserver keeps crashing, so the issue is not resolved, so the problem might come from somewhere else.

The ugly:

On each crashlog, you can see libmedia.so in the middle of the problem:

I/DEBUG ( 103): backtrace:
I/DEBUG ( 103): #00 pc 00015d3c /system/lib/libaudioflinger.so
I/DEBUG ( 103): #01 pc 00015e01 /system/lib/libaudioflinger.so
I/DEBUG ( 103): #02 pc 00017107 /system/lib/libaudioflinger.so
I/DEBUG ( 103): #03 pc 0006524f /system/lib/libmedia.so (android::AudioSystem::setParameters(int, android::String8 const&)+394)
I/DEBUG ( 103): #04 pc 0002796d /system/lib/libaudioflinger.so
I/DEBUG ( 103): #05 pc 0000e999 /system/lib/libutils.so (android::Thread::_threadLoop(void*)+112)
I/DEBUG ( 103): #06 pc 0000e521 /system/lib/libutils.so
I/DEBUG ( 103): #07 pc 00013ab5 /system/lib/libc.so
I/DEBUG ( 103): #08 pc 00012687 /system/lib/libc.so (__bionic_clone_entry+6)
I/DEBUG ( 103): #09 pc 00013c61 /system/lib/libc.so (pthread_create+340)

Now, that library is coming from the kminilte system image. Why? because HWComposer had a dependency on a function that is met on that version of the library. If you replace that with the original Wear image, it doesn't display video and surfaceflinger crashes because the hardware composer cannot be initialized. But I think that by overwriting the original, something may be crashing on the audio server, creating all these problems.

This is a partial list of all the libraries I needed to copy/replace so video would work:

libMali.so
libion.so
libion_exynos.so
libcsc.so
libexynosutils.so
libexynosfimc.so
libexynosv4l2.so
libExynosIPService.so
libMcClient.so
hw/hwcomposer.b2.so
libhwcutils.so
libmpp.so
libfimg.so
libdisplay.so
libhwcutilsmodule.so
libhdmi.so
libdisplaymodule.so
libhdmimodule.so
libExynosHWCService.so
libvirtualdisplay.so
libvirtualdisplaymodule.so
libmedia.so <-- Contains reference to symbol _ZN7android10WFDService11instantiateEv required
for hwcomposer.exynos3
libnbaio.so <-- required by libmedia.so

Yes, there are also libraries for the camera module. It didn't boot without those either. So, my next step will be rebuilding the hardware composer driver. And since I have to do that, I will recreate the device & vendor folders I started making for Cyanogenmod, using opensource components for everything except the Mali library. It will take me more time, but hopefully, it will allow me to fix the 'power.b2.so' library, and at least, part of the sensor library too, and make it more feasible to have a fully functional Android* in the watch. If all that works out in the best possible case scenario, we would have video, audio, sensors and power management working. What do you guys think?

* Any Android variant.