[ROM - DEV] WearOS 2 for Gear S3

Search This thread

parasetam0l

Senior Member
Apr 5, 2011
72
355
Ankara
DISCLAIMER

Code:
Your warranty is now void (if you still have one).
Read the steps carefully!
I am not responsible for data loss, bricked devices or devices which will need USB soldering!
If you do not know what you're doing, stop here!

DOWNLOAD WearOS 2
DOWNLOAD WearOS 2 (ALTERNATIVE)

Latest Release: 22/06/2022 22:58

BATTERY PERCENTAGE FIX FOR 22/06/2022 RELEASE (CURRENT BUILD):

With latest release (22/06/2022), some people's battery percentage is stucked at the same level and is not updating until reboot. Here is the fix for that. No need to wipe data or do something special. This file contains kernel update only. Just flash directly with netOdin/Odin.

DOWNLOAD KERNEL UPDATE FOR 22/06/2022 BUILD

GEAR S3 FRONTIER/CLASSIC ONLY!! Installed and tested on a few SM-R760 Frontier and get succeed. SM-R770 Classic is also confirmed.

BUT Korean and LTE versions are NOT TESTED. THEY USE DIFFERENT KERNEL CONFIGURATION. IT WILL PROBABLY CAUSE HARD BRICK!! USE YOUR OWN RISK!

BEFORE INSTALLATION

  • DISABLE REACTIVATION LOCK
  • Charge your watch to 100%
  • Keep your device charging while installing firmware
  • Have a stable computer with Wifi
  • Take note your current Tizen firmware version for going back to Tizen
  • Backup all your data
  • Keep your watch close to your wireless adapter

INSTALLATION (View Detailed Document Here)
  • Flashing process is the same as flashing combination or Tizen firmware
  • Wireless flashing takes 15~45 minutes.
  1. Extract downloaded zip file to get tar file
  2. Enter wireless download mode
  3. Switch to AP mode
  4. Connect to watch from your wireless adapter
  5. Select tar file for AP section
  6. Flash

DO NOT interrupt flashing process!
DO NOT shutdown your computer or allow your computer to sleep!
DO NOT enter recovery before WearOS boots completely!



WHAT IS WORKING
  • WearOS functions (Notifications, Play Store, Google Account, Assistant etc)
  • Always on display
  • Wifi
  • Bluetooth
  • Vibrator
  • Bezel (works like crown)
  • Tap to wake
  • Palm to suspend
  • Mic
  • HRM (Hear Rate Monitor - Sensor)
  • Sensors (Accelometer, Gyroscope, Light)
  • Audio
  • TWRP

KNOWN BUGS
  • Poor Battery Life compared to Tizen (Old device, new operation system)
  • Audio (Low sound level, bad quality)
  • HFP calls on watch (Bad noises, distorted sound)
  • Some menus on Settings belongs to Ticwatch (just ignore them)
  • Offline charging boots device
  • GPS is not working
  • NFC is not working
  • Step Counter is not working
  • Some green text above SAMSUNG logo while booting
  • Same green text on Wireless Download Mode. It prevents debug messages (Switching to AP mode etc) but functionality is not effected.
  • If device goes to TWRP, just click Reboot -> System.
  • Selinux is in Permissive mode
  • ADB Root is active
  • KNOX will be tripped!!

RESETTING WATCH OR CONNECTING NEW DEVICE
NEVER use WearOS settings menu to reset watch!!! It is not tested and may be brick your device.


Option 1: Flash WearOS again
Option 2: Boot to TWRP and Wipe Data (IMPORTANT! Be sure “Use rm -rf instead of formatting” is selected on TWRP settings. (TWRP Settings -> General Settings)

GOING BACK TO TIZEN
  1. Find and download your Tizen firmware from internet. (Remember, you took note your firmware version before installation)
  2. If you can not find your firmware you can try THIS TIZEN FIRMWARE. (It may has different CSC. Be careful!)
  3. Flash
TELEGRAM GROUP
PLEASE JOIN FROM HERE

SOURCES
Github (parasetam0l) for kernel, device tree and other SMDK - Samsung related files.

THANKS TO
TO21Consortium for beautiful SMDK source
YariKartoshe4k for Exynos 7570 kernel source
Biktorgj for Gear S and SSP sensor sources
OneOS for TicWatch WearOS2 system dump
Many other developers I came across with Google search.

@trapecija For SM-R770 Classic feedback
 

Attachments

  • 1-solis-wearos-home1.jpeg
    1-solis-wearos-home1.jpeg
    135.9 KB · Views: 762
  • 4-solis-wearos-notifications.jpeg
    4-solis-wearos-notifications.jpeg
    75.3 KB · Views: 719
  • 2-solis-wearos-home2.jpeg
    2-solis-wearos-home2.jpeg
    150.6 KB · Views: 670
  • 3-solis-wearos-apps.jpeg
    3-solis-wearos-apps.jpeg
    82.9 KB · Views: 1,234
  • 5-solis-wearos-cp.jpeg
    5-solis-wearos-cp.jpeg
    105.4 KB · Views: 1,220
  • 6-solis-wearos-weather.jpeg
    6-solis-wearos-weather.jpeg
    79 KB · Views: 602
  • 7-solis-wearos-google-assistant.jpeg
    7-solis-wearos-google-assistant.jpeg
    79.5 KB · Views: 589
  • 8-solis-wearos-bluetooth.jpeg
    8-solis-wearos-bluetooth.jpeg
    81.7 KB · Views: 576
  • 9-solis-wearos-wifi.jpeg
    9-solis-wearos-wifi.jpeg
    111.2 KB · Views: 578
  • 10-solis-wearos-os-version.jpeg
    10-solis-wearos-os-version.jpeg
    86.3 KB · Views: 581
  • 11-solis-wearos-system-version.jpeg
    11-solis-wearos-system-version.jpeg
    86.8 KB · Views: 580
  • 12-solis-wearos-connection-status.jpeg
    12-solis-wearos-connection-status.jpeg
    86.9 KB · Views: 774
Last edited:

parasetam0l

Senior Member
Apr 5, 2011
72
355
Ankara
DEVELOPER NOTES :

  • Soldering USB and Odin USB mode: Done
  • Install Combination firmware (COMBINATION-FT30_R760XXU2CQL1): Done
  • Root Access (Combination firmware is pre rooted): Done
  • Build Tizen Kernel: Done
  • Upstream Tizen Kernel to latest (from 3.18.14 to 3.18.140): Done
  • Enable Android configs and disable some Samsung stuff on kernel: Done
  • Kernel cmdline patch for booting from mmc: Done
  • TWRP device tree: Done
  • Build TWRP: Done
  • MM (memory management) and FB (framebuffer) patch for IOMMU error: Done
  • PMIC patch for enabling USB: Done
  • Created fstab file: Done
  • Update Android Binder kernel driver: Done
  • Android Boots with ADB support: Done
  • USB Charging: Done
  • Mali T720 GPU Driver Update: Done
  • Decon Framebuffer: Done
  • S6E36W2X01 LCD Panel: Done
  • Compile AOSP9: Done
  • WearOS2 Port: Done
  • Broadcom 43102 Wifi and Bluetooth SDIO: Done
  • Palm to suspend: Done
  • Audio: Partially Fixed (Low sound level and quality)
  • HFP (Handsfree Protocol): Partially Fixed (Mic works, speaker distorted sound)
  • Brightness: Done
  • Vibration: Done
  • LSM6DSL Accelometer and Gyroscope Sensor: Done
  • TSL2584 Light Sensor: Done
  • PPS960 Heart Rate Sensor: Done
  • SSP Sensor Hub: Partially
  • Tap to Wake: Done
  • Always on display: Done
  • Bezel: Done
THINGS TO DO:
  • GPS
  • NFC
  • Offline charging
  • Step Counter
  • Power Optimizations (power.exynos5)
  • Audio and HFP (mixer_paths.xml)
  • SSP Sensor Hub
  • ...
  • ...
  • ...
  • WearOS 3
 
Last edited:

parasetam0l

Senior Member
Apr 5, 2011
72
355
Ankara
Code:
ls -l /dev/disk/by-partlabel

lrwxrwxrwx 1 root root 15 Jan 20 23:11 boot -> ../../mmcblk0p8
lrwxrwxrwx 1 root root 15 Jan 20 23:11 cm -> ../../mmcblk0p7
lrwxrwxrwx 1 root root 15 Jan 20 23:11 cpnvcore -> ../../mmcblk0p3
lrwxrwxrwx 1 root root 15 Jan 20 23:11 csa -> ../../mmcblk0p2
lrwxrwxrwx 1 root root 16 Jan 20 23:11 csc -> ../../mmcblk0p11
lrwxrwxrwx 1 root root 16 Jan 20 23:11 module -> ../../mmcblk0p10
lrwxrwxrwx 1 root root 15 Jan 20 23:12 param -> ../../mmcblk0p6
lrwxrwxrwx 1 root root 15 Jan 20 23:11 ramdisk1 -> ../../mmcblk0p5
lrwxrwxrwx 1 root root 15 Jan 20 23:11 ramdisk2 -> ../../mmcblk0p4
lrwxrwxrwx 1 root root 15 Jan 20 23:11 recovery -> ../../mmcblk0p9
lrwxrwxrwx 1 root root 16 Jan 20 23:11 rootfs -> ../../mmcblk0p14
lrwxrwxrwx 1 root root 16 Jan 20 23:11 steady -> ../../mmcblk0p15
lrwxrwxrwx 1 root root 16 Jan 20 23:11 system-data -> ../../mmcblk0p12
lrwxrwxrwx 1 root root 15 Jan 20 23:11 tup -> ../../mmcblk0p1
lrwxrwxrwx 1 root root 16 Jan 20 23:11 user -> ../../mmcblk0p13

Code:
(parted) print                                                           
print
Model: MMC FJX7AA (sd/mmc)
Disk /dev/block/mmcblk0: 3909MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name         Flags
 1      4194kB  37.7MB  33.6MB               tup
 2      37.7MB  46.1MB  8389kB  ext4         csa
 3      46.1MB  48.2MB  2097kB               cpnvcore
 4      48.2MB  69.2MB  21.0MB  ext2         ramdisk2
 5      69.2MB  77.6MB  8389kB  ext2         ramdisk1
 6      77.6MB  86.0MB  8389kB               param
 7      86.0MB  89.1MB  3146kB               cm
 8      89.1MB  106MB   16.8MB               boot
 9      106MB   123MB   16.8MB               recovery
10      123MB   139MB   16.8MB  ext4         module
11      139MB   339MB   199MB   ext4         csc
12      339MB   504MB   166MB   ext4         system-data
13      504MB   2538MB  2033MB  ext4         user
14      2538MB  3907MB  1369MB  ext4         rootfs
15      3907MB  3907MB  262kB                steady

I will use
system-data -> /recovery
csc -> /cache
user -> / (system as root)
rootfs -> /data
 
Last edited:

parasetam0l

Senior Member
Apr 5, 2011
72
355
Ankara
UPDATE:
I am using
Code:
SM-R870_samsung-freshbl-freshbl-11-RWD1.210503.001-R870XXU1BUH9-user-release-keys.tar.gz

which is referenced from this post. It is Android 11 based WearOS 3. You can also find this file if you search on the internet. This is not a full firmware. Many files are missing. I think they dumped this from a factory device while it is running or they removed some files intentionally.

but I completed missing files for minimal booting. I also fixed Android's binder driver. Now device is booting to Android with working ADB. I can get logs from logcat. Very good!

Next thing is graphics driver. GW4 firmware does not include a surfaceflinger binary. So I built my own surfaceflinger with some modifications. Solis has Mali T720 MP1. I got this from ADB.

Code:
01-23 02:54:06.980  4377  4377 E mali    : file /dev/mali0 is not of a compatible version (user 10.6, kernel 10.2)
01-23 02:54:06.986  4377  4377 E mali    : ERROR: The DDK is not compatible with any of the Mali GPUs on the system.
01-23 02:54:06.986  4377  4377 E mali    : The DDK was built for 0x720 r1p1 status range [0..15], but none of the GPUs matched:
01-23 02:54:06.989  4377  4377 E mali    : file /dev/mali0 is not of a compatible version (user 10.6, kernel 10.2)
01-23 02:54:06.989  4377  4377 W libEGL  : eglInitialize(0xf3b010a0) failed (EGL_NOT_INITIALIZED)
01-23 02:54:06.990  4377  4377 E libEGL  : call to OpenGL ES API with no current context (logged once per thread)
01-23 02:54:06.990  4377  4377 F RenderEngine: eglQueryStringImplementationANDROID(EGL_VERSION) failed
01-23 02:54:06.991  4377  4377 F libc    : Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 4377 (surfaceflinger), pid 4377 (surfaceflinger)

Things to check:
Code:
libGLES_mali.so (This is main driver library with many other files)
Mali T72x Kernel driver
 

parasetam0l

Senior Member
Apr 5, 2011
72
355
Ankara
UPDATE:
I fixed USB charging and added ambient capabilities to kernel (which is needed for surfaceflinger and in general android).

So this error is gone:
Code:
capabilities requested but the kernel does not support ambient capabilities

I also updated tizen_arm MALI kernel drivers from r12p0 to arm r29p0. With proper libGLES_mali.so, DDK error is gone.

I tried to use Exynos 7570 hardware composer from several roms. Now I am facing a problem with lcd panel. LCD panel gives this error.

Code:
01-01 00:00:10.094 222 222 E HWComposer: getAttribute: getDisplayAttribute failed for display 0: BadParameter (4)
01-01 00:00:10.094 222 222 E HWComposer: getDisplayConnectionType: getDisplayConnectionType failed for display 0: Unsupported (8)

Because of this problems, I stopped porting WearOS and started building LineageOS from stratch. Before building process, I have to prepare a device tree. This repos are helpful for preparing device tree.

Code:
https://github.com/LineageOS/android_hardware_samsung
https://github.com/LineageOS/android_hardware_samsung_slsi_exynos5
https://github.com/LineageOS/android_hardware_samsung_slsi_exynos
https://github.com/LineageOS/android_hardware_samsung_slsi_exynos7580
https://github.com/LineageOS/android_hardware_samsung_slsi_libbt
https://github.com/LineageOS/android_kernel_samsung_universal7580
https://github.com/LineageOS/android_hardware_samsung_slsi_openmax
https://github.com/TO21Consortium/SGSWPlatform
 
Last edited:

zswielder

Senior Member
Feb 25, 2011
608
65
I've been following "the other thread" for years. I really like yours and the way you show progress and steps very clearly. I hope you'll succeed!
 
  • Like
Reactions: parasetam0l

parasetam0l

Senior Member
Apr 5, 2011
72
355
Ankara
Thank you all for your good wishes. It's been a busy week for me.

UPDATE:
I built hwcomposer and gralloc from stratch. Now android recognizes our display.

Code:
11-14 01:04:46.884  1956  1956 D hwcomposer: using
11-14 01:04:46.884  1956  1956 D hwcomposer: xres         = 360 px
11-14 01:04:46.884  1956  1956 D hwcomposer: yres         = 360 px
11-14 01:04:46.884  1956  1956 D hwcomposer: width        = 33 mm (277.090000 dpi)
11-14 01:04:46.884  1956  1956 D hwcomposer: height       = 33 mm (277.090000 dpi)
11-14 01:04:46.884  1956  1956 D hwcomposer: refresh rate = 56 Hz
11-14 01:04:46.884  1956  1956 V DisplayResourceManagerModule: externalMPP type(4), index(0)
11-14 01:04:46.884  1956  1956 I hwcutils: Open /dev/s5p-smem
11-14 01:04:46.885  1956  1956 V DisplayResourceManagerModule: externalMPP type(5), index(0)
11-14 01:04:46.886  1956  1956 I hwcomposer: PSR info devname = /sys/devices/14830000.decon_fb/psr_info
11-14 01:04:46.886  1956  1956 I hwcomposer: PSR mode   = 2 (0: video mode, 1: DP PSR mode, 2: MIPI-DSI command mode)
11-14 01:04:46.886  1956  1956 I hwcomposer: Panel type = 0 (0: Legacy, 1: DSC)
11-14 01:04:46.886  1976  1976 I SurfaceFlinger: Using HWComposer service: 'default'
11-14 01:04:46.888  1956  1956 I HWC2On1Adapter: Found support for HWC virtual displays
11-14 01:04:46.889  1976  1976 I SurfaceFlinger: SurfaceFlinger is starting
11-14 01:04:46.889  1956  1956 E HWC2On1Adapter: Setting active config to 0 for HWC1 config 0

Code:
11-14 01:04:54.226  1976  1976 I RenderEngine: OpenGL ES informations:
11-14 01:04:54.226  1976  1976 I RenderEngine: vendor    : ARM
11-14 01:04:54.226  1976  1976 I RenderEngine: renderer  : Mali-T720
11-14 01:04:54.226  1976  1976 I RenderEngine: version   : OpenGL ES 3.1 v1.r29p0-01rel0.###other-sha0123456789ABCDEF0###
11-14 01:04:54.226  1976  1976 I RenderEngine: extensions: GL_EXT_debug_marker GL_ARM_rgba8 GL_ARM_mali_shader_binary GL_OES_depth24 GL_OES_depth_texture GL_OES_depth_texture_cube_map GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8 GL_EXT_read_format_bgra GL_OES_compressed_paletted_texture GL_OES_compressed_ETC1_RGB8_texture GL_OES_standard_derivatives GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_EGL_image_external_essl3 GL_OES_EGL_sync GL_OES_texture_npot GL_OES_vertex_half_float GL_OES_required_internalformat GL_OES_vertex_array_object GL_OES_mapbuffer GL_EXT_texture_format_BGRA8888 GL_EXT_texture_rg GL_EXT_texture_type_2_10_10_10_REV GL_OES_fbo_render_mipmap GL_OES_element_index_uint GL_EXT_shadow_samplers GL_OES_texture_compression_astc GL_KHR_texture_compression_astc_ldr GL_KHR_texture_compression_astc_hdr GL_KHR_texture_compression_astc_sliced_3d GL_KHR_debug GL_EXT_occlusion_query_boolean GL_EXT_disjoint_timer_query GL_EXT_blend_minmax GL_EXT_discard_framebuffer GL_OES_get_program_binary GL_OES_texture_3D GL_EXT_texture_storage GL_EXT_multisamp
11-14 01:04:54.226  1976  1976 I RenderEngine: GL_MAX_TEXTURE_SIZE = 8192
11-14 01:04:54.226  1976  1976 I RenderEngine: GL_MAX_VIEWPORT_DIMS = 8192

BUT:
Code:
11-14 01:04:57.239  1976  1976 E HWComposer: loadLayerMetadataSupport: getLayerGenericMetadataKeys failed: UNSUPPORTED (8)
11-14 01:04:57.242  1976  1976 I HWComposer: Switching to legacy multi-display mode
11-14 01:04:57.242  1976  1976 E HWComposer: isConnected failed for display 0: Invalid display
11-14 01:04:57.243  1956  2065 E display : [PrimaryDisplay] unknown display attribute 7
11-14 01:04:57.243  1956  2065 E display : [PrimaryDisplay] unknown display attribute 8
11-14 01:04:57.243  1956  2065 E display : [PrimaryDisplay] unknown display attribute 9
11-14 01:04:57.243  1956  2065 E display : [PrimaryDisplay] unknown display attribute 10
11-14 01:04:57.243  1956  2065 E display : [PrimaryDisplay] unknown display attribute 11
11-14 01:04:57.243  1956  2065 E display : [PrimaryDisplay] unknown display attribute 12
11-14 01:04:57.248  1976  2142 W SurfaceFlinger: Ignoring VSYNC request while display is disconnected
11-14 01:04:57.249  1976  2142 W SurfaceFlinger: Ignoring VSYNC request while display is disconnected
11-14 01:04:57.249  1976  2143 W SurfaceFlinger: Ignoring VSYNC request while display is disconnected
11-14 01:04:57.249  1976  2143 W SurfaceFlinger: Ignoring VSYNC request while display is disconnected
11-14 01:04:57.250  1976  2142 W SurfaceFlinger: Ignoring VSYNC request while display is disconnected
11-14 01:04:57.250  1976  2142 W SurfaceFlinger: Ignoring VSYNC request while display is disconnected
11-14 01:04:57.250  1976  1976 E HWComposer: getDisplayConnectionType: getDisplayConnectionType failed for display 0: Unsupported (8)
11-14 01:04:57.254  1976  1976 I FramebufferSurface: framebuffer size has been limited to [360x360] from [360x360]
11-14 01:04:58.099  1976  1976 D SurfaceFlinger: Setting power mode 2 on display 0
11-14 01:04:58.099  1956  2065 I hwcomposer: exynos_setPowerMode:: disp(0), mode(2)
11-14 01:04:58.100  1976  1976 D SurfaceFlinger: Finished setting power mode 2 on display 0

This means we still have incompatibility between hwcomposer and android system. I am missing something. I will double check framebuffer and display permissions. And I also noticed that surfaceflinger from Exynos7570 device uses this libraries.

Code:
solis:/system_root/system/bin # readelf -d surfaceflingerj4lte | grep NEEDED
 0x00000001 (NEEDED)                     Shared library: [[email protected]]
 0x00000001 (NEEDED)                     Shared library: [android.hardware.configstore-utils.so]
 0x00000001 (NEEDED)                     Shared library: [[email protected]]
 0x00000001 (NEEDED)                     Shared library: [vendor.samsung_slsi.hardware.configstore-utils.so]
 0x00000001 (NEEDED)                     Shared library: [[email protected]]
 0x00000001 (NEEDED)                     Shared library: [[email protected]]
 0x00000001 (NEEDED)                     Shared library: [[email protected]]
 0x00000001 (NEEDED)                     Shared library: [[email protected]]
 0x00000001 (NEEDED)                     Shared library: [libbinder.so]
 0x00000001 (NEEDED)                     Shared library: [libcutils.so]
 0x00000001 (NEEDED)                     Shared library: [libdisplayservicehidl.so]
 0x00000001 (NEEDED)                     Shared library: [libhidlbase.so]
 0x00000001 (NEEDED)                     Shared library: [libhidltransport.so]
 0x00000001 (NEEDED)                     Shared library: [libinput.so]
 0x00000001 (NEEDED)                     Shared library: [liblayers_proto.so]
 0x00000001 (NEEDED)                     Shared library: [liblog.so]
 0x00000001 (NEEDED)                     Shared library: [libprocessgroup.so]
 0x00000001 (NEEDED)                     Shared library: [libsync.so]
 0x00000001 (NEEDED)                     Shared library: [libtimestats_proto.so]
 0x00000001 (NEEDED)                     Shared library: [libutils.so]
 0x00000001 (NEEDED)                     Shared library: [libsurfaceflinger.so]
 0x00000001 (NEEDED)                     Shared library: [libSurfaceFlingerProp.so]
 0x00000001 (NEEDED)                     Shared library: [libc++.so]
 0x00000001 (NEEDED)                     Shared library: [libc.so]
 0x00000001 (NEEDED)                     Shared library: [libm.so]
 0x00000001 (NEEDED)                     Shared library: [libdl.so]


But newly compiled one uses
Code:
solis:/system_root/system/bin # readelf -d surfaceflinger | grep NEEDED                                                                
 0x00000001 (NEEDED)             Shared library: [[email protected]]
 0x00000001 (NEEDED)             Shared library: [android.hardware.configstore-utils.so]
 0x00000001 (NEEDED)             Shared library: [[email protected]]
 0x00000001 (NEEDED)             Shared library: [[email protected]]
 0x00000001 (NEEDED)             Shared library: [[email protected]]
 0x00000001 (NEEDED)             Shared library: [libbinder.so]
 0x00000001 (NEEDED)             Shared library: [libcutils.so]
 0x00000001 (NEEDED)             Shared library: [libdisplayservicehidl.so]
 0x00000001 (NEEDED)             Shared library: [libhidlbase.so]
 0x00000001 (NEEDED)             Shared library: [libinput.so]
 0x00000001 (NEEDED)             Shared library: [liblayers_proto.so]
 0x00000001 (NEEDED)             Shared library: [liblog.so]
 0x00000001 (NEEDED)             Shared library: [libprocessgroup.so]
 0x00000001 (NEEDED)             Shared library: [libsync.so]
 0x00000001 (NEEDED)             Shared library: [libutils.so]
 0x00000001 (NEEDED)             Shared library: [libsurfaceflinger.so]
 0x00000001 (NEEDED)             Shared library: [libSurfaceFlingerProp.so]
 0x00000001 (NEEDED)             Shared library: [libc++.so]
 0x00000001 (NEEDED)             Shared library: [libc.so]
 0x00000001 (NEEDED)             Shared library: [libm.so]
 0x00000001 (NEEDED)             Shared library: [libdl.so]

Either there is a misconfiguration on my device tree or some things have changed with Android 11. I see that system boots to setup screen from adb logs but no display. Let's find what causes this. (kernel, hwcomposer,gralloc, exynos libraries or something else)
 
Last edited:

parasetam0l

Senior Member
Apr 5, 2011
72
355
Ankara
GOOOD NEWS AND BAD NEWS:
I successfully built a Lineage 18.1 rom. But due to massive HAL changes, framebuffer and hardware composer incompability, display was never worked. So I decided start from earlier Android version that we hope HWC is working. With the big help of this repository, I prepared an AOSP M build environment with custom surfaceflinger, samsung hardware, and solis device tree (with small changes on smdk7270 device tree). I also worked on kernel. Downgraded binder and mali drivers for Android M. Patched decon framebuffer, lcd and backlight. Built AOSP on Ubuntu 14. Time for good news.

GOOD NEWS: Hello Android on Gear S3 :)

Android6onSolis.jpeg


BAD NEWS: Nothing is working except display (touchscreen is also working) and USB. We have a lot of work to do. Now it is time to build and upgrade Android version by version.

I noticed that BEZEL is also working! I think it is working like a middle scroll button of a computer mouse. I did not tested too much. When you rotate bezel, A black mouse pointer comes to screen and page scrolls.
 

adfree

Senior Member
Jun 14, 2008
9,588
5,679
Samsung Galaxy Watch 4
Not sure if you allready find something usefull inside AKI Source...


SEC_Android_Independent_EVT0.0_E7270_BSP_KERNEL.tar.zip
SEC_Android_Independent_EVT0.0_E7270_BSP_u-boot.tar.zip

Only as info...

Best Regards
 
Hey, good work! I want to thank you @parasetam0l and @adfree for your hard work, just for a smartwatch that has begun to be forgotten.

I have a bit of experience in coding myself and I'll be ready for helping you in whatever testing you need. (After the soldering part is done and all the installation can be done without any -possible- physical damage)

I can't wait to use Wear OS in my watch, I've been reading and waiting for this to happen for sooo long :D
 

Cryen

Member
Is there any significant difference in source code of the SM-R760 and SM-R770?
Only the first one was uploaded by Samsung and I have the second one.
If I'm not mistaken they are the frontier and classic models so they might be identical in firmware.
 

parasetam0l

Senior Member
Apr 5, 2011
72
355
Ankara
Hello all,
I am trying to keep this topic as up to date as possible. Due to my job, I haven't been able to have enough time for this project for the last few weeks. But I am doing little things day by day.

Not sure if you allready find something usefull inside AKI Source...


SEC_Android_Independent_EVT0.0_E7270_BSP_KERNEL.tar.zip
SEC_Android_Independent_EVT0.0_E7270_BSP_u-boot.tar.zip

Only as info...

Best Regards

@adfree
I looked at this repository. Only kernel and UBOOT source. It is also based AOSP 7. Nothing for Exynos 7270 specific device files. For now, no work needed for kernel side and we have combination SBOOT which allows booting Android. Thank you for your help.

Hey, good work! I want to thank you @parasetam0l and @adfree for your hard work, just for a smartwatch that has begun to be forgotten.

I have a bit of experience in coding myself and I'll be ready for helping you in whatever testing you need. (After the soldering part is done and all the installation can be done without any -possible- physical damage)

I can't wait to use Wear OS in my watch, I've been reading and waiting for this to happen for sooo long :D

@lavasbey
At this time no testing needed because of nothing to test :) I am heavily editing gpu and lcd drivers. When they are done, it will be impossible to physically damage to watch. With USB we can always flash our device even it is dead. For wireless download mode I can not promise anything :) If some testing needed, I will contact you. Thank you for your good wishes and wanting to help.

I will try to explain what I am doing and I want to reach.
As we know, WearOS is based on AOSP source, but its framework part is closed source. We can say that WearOS is 80% same as full Android. For porting WearOS, we need a donor device system dump. I have

Asus Zenwatch 2 dump: WearOS2 Android 6 (too old),
Mi Watch dump: WearOS2 H MR2 Android 9 (Chinese)
TicWatch Pro dump: WearOS2 H Android 9
Galaxy Watch 4 dump: WearOS3 Android 11.

To run WearOS on a new device:
Copy all system and ramdisk files from donor device to new device.
Replace device specific files (init, fstab, rc files, hardware libraries, vendor libraries, binaries etc which we got from our AOSP build)
Get screen, USB, ADB working and solve errors from logs.
Solve driver issues.

Porting WearOS gets easier after working AOSP on device. We can build necessary libraries from source and replace donor device's libraries with our compiled ones.

My first goal is make AOSP 9 working for porting WearOS2. Because latest WearOS2 based on Android H MR2. My next goal is make AOSP 11 working for WearOS3. We can not use smdk7270 or exynos7580 source directly on Android 9 or 11. Too much compile errors. So I will try to build AOSP version by version and solve problems step by step. We see that AOSP 6 is working. I also built AOSP 7 and it is also working.

After Android 8, things changed. Google divided hardware management to HALs, libraries and services. First stage mount, system as root, vndk system showed themselves. I am solving problems on device tree and samsung libraries for building newer AOSP. Whenever we run AOSP 8, it will be easier to reach AOSP 11 and WearOS3.

I just need some more time. Stay tuned for good news.
 
Last edited:

parasetam0l

Senior Member
Apr 5, 2011
72
355
Ankara
Is there any significant difference in source code of the SM-R760 and SM-R770?
Only the first one was uploaded by Samsung and I have the second one.
If I'm not mistaken they are the frontier and classic models so they might be identical in firmware.

Hello @Granat1,
As I discovered SM-R760 uses tizen_solis_defconfig, SM-R770 uses tizen_pop_defconfig. So their kernel configurations are different. I am working on SM-R760 for now so I am not 100% sure. But I know it's just like you said. They should have same hardware and firmware.

EDIT: I read from another thread, tizen_pop_defconfig may be using for SM-R600 (Samsung Gear Sport) and tizen_solis_defconfig is for SM-R760 and SM-R770 (Gear S3 frontier-classic). As I said I am not sure. I am using tizen_solis_defconfig for Gear S3 SM-R760.
 
Last edited:

parasetam0l

Senior Member
Apr 5, 2011
72
355
Ankara
Finally,
Display drivers made me tired. I successfully ported Exynos7570 framebuffer and Mali gpu drivers. I replaced dummy LCD driver with LCD driver from Tizen kernel and solved compilation errors. I also patched decon for right RGB colors. Now display is working as expected. It still needs some operation for always on display but that's enough work for the screen for now.

I compiled AOSP9. As I said, with a working Android 9 porting WearOS 2 will get easier. Here is the proof :)

WOS2onSolis.jpeg

I can not pass setup screen, because bluetooth is not working. Tizen's bluetooth initialization procedure is different than Android. Gear S3 uses Broadcom BCM43012. Now I am searching Android devices which use this chip then I will fix the bluetooth.
 

Falcon68_

New member
Mar 15, 2022
4
4
Finally,
Display drivers made me tired. I successfully ported Exynos7570 framebuffer and Mali gpu drivers. I replaced dummy LCD driver with LCD driver from Tizen kernel and solved compilation errors. I also patched decon for right RGB colors. Now display is working as expected. It still needs some operation for always on display but that's enough work for the screen for now.

I compiled AOSP9. As I said, with a working Android 9 porting WearOS 2 will get easier. Here is the proof :)

View attachment 5570925

I can not pass setup screen, because bluetooth is not working. Tizen's bluetooth initialization procedure is different than Android. Gear S3 uses Broadcom BCM43012. Now I am searching Android devices which use this chip then I will fix the bluetooth.
dude you're doing a great job. Can't wait to flash WearOs on my device if it will be a thing in the future!
 

parasetam0l

Senior Member
Apr 5, 2011
72
355
Ankara
Dude, thanks a lot for your work! Amazing
I have a active 2 don't know about coding but I think it could work in R820 too ??

Hello, thank you!
This work is Gear S3 (SM-R760, SM-R770) only. It will not work on other devices.

I took a quick look at the features of GWA2 (SM-R820). It has Exynos 9110 with Mali T720MP1 (which is the same as Gear S3). GWA2 also has USB connection (with soldering), SBOOT from combination firmware (necessary for booting something other than tizen) and kernel source (for android specific code). So yes, it is possible to port WearOS. Porting system part will be easy. Difficult part is porting drivers for example sensors.
 

GyuminLeo

Member
Feb 1, 2020
35
4
LG G4
LG V20
Thanks for the great work!!
I am looking forward to this project and wishing you luck!
I am wondering if I can install this port for my device in the future? I have Gear S3 Frontier (SM-R765K) Korean version. Also do I need to solder the usb to the device? Or can I flash it via wireless connection?
Thanks for the good work and good luck!
 
  • Like
Reactions: lavasbey

Top Liked Posts

  • There are no posts matching your filters.
  • 16
    NEW RELEASE:

    Hello everybody,
    Here is the new release. This version needs a clean install so it will AUTOMATICALLY WIPE YOUR DATA. Just flash with netOdin / Odin as usual. I also updated the first post.

    DOWNLOAD NEW RELEASE
    DOWNLOAD NEW RELEASE (ALTERNATIVE)

    Changelog (22/06/2022):
    • Charging indicator issue is fixed. (No need to restart watch anymore for disappearing indicator)
    • Audio level is increased to default.
    • Some audio fix (mixer_paths.xml).
    • Raise arm to wake device is working now. (Tilt sensor, decreases battery life).
    • Always on display with palm to suspend is fixed.
    • Serial number issue is solved. (1234567 to device's own serial number. Affects bluetooth name too)
    • Partial fix for offline charging. (Still boots to system)
    • Some fixes for sensor service. It seems it doesn't crash anymore. Also logcat is showing context sensor debug data now. It is easy to track values and extract step counter data.
    • WearOS application on phone now has Gear S3 image (before, it was Ticwatch Pro 3)
    14
    SMALL UPDATE:

    • Charging indicator issue is fixed.
    • Audio level is increased to default.
    • Raise arm to wake device is working now. (Tilt sensor).
    • Always on display with palm to suspend is fixed.
    • WearOS application on phone now has Gear S3 image (before it was Ticwatch Pro 3)
    • Serial number issue is solved. (1234567 to device's own serial number. Affects bluetooth name too)
    • Partial fix for offline charging

    I am currently dealing with offline charging. I fixed it on kernel side and android side. But offline charging crashes kernel because of framebuffer. DMA is not working while screen is off. I am trying to solve framebuffer issue.After that offline charging will be fixed. Then I will release a new build.

    A couple of questions:

    1. Can you tell us which bugs you managed to fix up to now?
    2. The upgrade procedure would be the same as the first installation or it's simpler?

    Hi, thank you!. For your second question, next build will need to wipe data because of serial number and some system app changes. But newer builds won't need to wipe data. Installation will be the same. Because Odin does not support incremental installation. We always need to install full package. TWRP side is the same.


    Are these the latest steps / instructions to install? I'm not as tech savvy, so waiting for a more stable version so I don't brick my watch.

    Anyone on here using an iOS app to use with their Google WearOS? Don't have an android unfortunately :(

    Yes, they are the latest. If you follow steps carefully, it is hard to brick your device. Stability of WearOS doesn't effect bricking chance. Also iOS has WearOS app. So It will work.

    I appreciate your work.how soon wear os3 will be applicable?

    There is no WearOS3 source except Samsung's one. I noticed that Google also released a pure WearOS3 emulator image for ARM based Macs. I am currently looking what can I do. But it seems dead end because of RAM usage. x86 emulator image uses about 1.5GB of RAM. I will take a look for ARM one.
    11
    BATTERY PERCENTAGE FIX FOR 22/06/2022 UPDATE:

    With latest update (22/06/2022), some people's battery percentage is stucked at the same level and is not updating until reboot. Here is the fix for that. No need to wipe data or do something special. This file contains kernel update only. Just flash directly with netOdin/Odin.

    DOWNLOAD KERNEL UPDATE FOR 22/06/2022 BUILD
    4
    With Tizen it is already impossible to get to the end of the day for me with Always-On enabled. So I switched it off. All fine, as I can still watch the clock without using the other hand, bu tilting my wrist.

    However, on WearOS this is still one of the known issues. When I see the todo-list, I think fixing/enabling the tilt-to-awake feature deserves a higher priority than fixing GPS for example (which never worked good enough on Tizen anyway and is pretty useless with bad battery life).
    3
    I'll make a video if I find a free time to do this
  • 48
    DISCLAIMER

    Code:
    Your warranty is now void (if you still have one).
    Read the steps carefully!
    I am not responsible for data loss, bricked devices or devices which will need USB soldering!
    If you do not know what you're doing, stop here!

    DOWNLOAD WearOS 2
    DOWNLOAD WearOS 2 (ALTERNATIVE)

    Latest Release: 22/06/2022 22:58

    BATTERY PERCENTAGE FIX FOR 22/06/2022 RELEASE (CURRENT BUILD):

    With latest release (22/06/2022), some people's battery percentage is stucked at the same level and is not updating until reboot. Here is the fix for that. No need to wipe data or do something special. This file contains kernel update only. Just flash directly with netOdin/Odin.

    DOWNLOAD KERNEL UPDATE FOR 22/06/2022 BUILD

    GEAR S3 FRONTIER/CLASSIC ONLY!! Installed and tested on a few SM-R760 Frontier and get succeed. SM-R770 Classic is also confirmed.

    BUT Korean and LTE versions are NOT TESTED. THEY USE DIFFERENT KERNEL CONFIGURATION. IT WILL PROBABLY CAUSE HARD BRICK!! USE YOUR OWN RISK!

    BEFORE INSTALLATION

    • DISABLE REACTIVATION LOCK
    • Charge your watch to 100%
    • Keep your device charging while installing firmware
    • Have a stable computer with Wifi
    • Take note your current Tizen firmware version for going back to Tizen
    • Backup all your data
    • Keep your watch close to your wireless adapter

    INSTALLATION (View Detailed Document Here)
    • Flashing process is the same as flashing combination or Tizen firmware
    • Wireless flashing takes 15~45 minutes.
    1. Extract downloaded zip file to get tar file
    2. Enter wireless download mode
    3. Switch to AP mode
    4. Connect to watch from your wireless adapter
    5. Select tar file for AP section
    6. Flash

    DO NOT interrupt flashing process!
    DO NOT shutdown your computer or allow your computer to sleep!
    DO NOT enter recovery before WearOS boots completely!



    WHAT IS WORKING
    • WearOS functions (Notifications, Play Store, Google Account, Assistant etc)
    • Always on display
    • Wifi
    • Bluetooth
    • Vibrator
    • Bezel (works like crown)
    • Tap to wake
    • Palm to suspend
    • Mic
    • HRM (Hear Rate Monitor - Sensor)
    • Sensors (Accelometer, Gyroscope, Light)
    • Audio
    • TWRP

    KNOWN BUGS
    • Poor Battery Life compared to Tizen (Old device, new operation system)
    • Audio (Low sound level, bad quality)
    • HFP calls on watch (Bad noises, distorted sound)
    • Some menus on Settings belongs to Ticwatch (just ignore them)
    • Offline charging boots device
    • GPS is not working
    • NFC is not working
    • Step Counter is not working
    • Some green text above SAMSUNG logo while booting
    • Same green text on Wireless Download Mode. It prevents debug messages (Switching to AP mode etc) but functionality is not effected.
    • If device goes to TWRP, just click Reboot -> System.
    • Selinux is in Permissive mode
    • ADB Root is active
    • KNOX will be tripped!!

    RESETTING WATCH OR CONNECTING NEW DEVICE
    NEVER use WearOS settings menu to reset watch!!! It is not tested and may be brick your device.


    Option 1: Flash WearOS again
    Option 2: Boot to TWRP and Wipe Data (IMPORTANT! Be sure “Use rm -rf instead of formatting” is selected on TWRP settings. (TWRP Settings -> General Settings)

    GOING BACK TO TIZEN
    1. Find and download your Tizen firmware from internet. (Remember, you took note your firmware version before installation)
    2. If you can not find your firmware you can try THIS TIZEN FIRMWARE. (It may has different CSC. Be careful!)
    3. Flash
    TELEGRAM GROUP
    PLEASE JOIN FROM HERE

    SOURCES
    Github (parasetam0l) for kernel, device tree and other SMDK - Samsung related files.

    THANKS TO
    TO21Consortium for beautiful SMDK source
    YariKartoshe4k for Exynos 7570 kernel source
    Biktorgj for Gear S and SSP sensor sources
    OneOS for TicWatch WearOS2 system dump
    Many other developers I came across with Google search.

    @trapecija For SM-R770 Classic feedback
    24
    DEVELOPER NOTES :

    • Soldering USB and Odin USB mode: Done
    • Install Combination firmware (COMBINATION-FT30_R760XXU2CQL1): Done
    • Root Access (Combination firmware is pre rooted): Done
    • Build Tizen Kernel: Done
    • Upstream Tizen Kernel to latest (from 3.18.14 to 3.18.140): Done
    • Enable Android configs and disable some Samsung stuff on kernel: Done
    • Kernel cmdline patch for booting from mmc: Done
    • TWRP device tree: Done
    • Build TWRP: Done
    • MM (memory management) and FB (framebuffer) patch for IOMMU error: Done
    • PMIC patch for enabling USB: Done
    • Created fstab file: Done
    • Update Android Binder kernel driver: Done
    • Android Boots with ADB support: Done
    • USB Charging: Done
    • Mali T720 GPU Driver Update: Done
    • Decon Framebuffer: Done
    • S6E36W2X01 LCD Panel: Done
    • Compile AOSP9: Done
    • WearOS2 Port: Done
    • Broadcom 43102 Wifi and Bluetooth SDIO: Done
    • Palm to suspend: Done
    • Audio: Partially Fixed (Low sound level and quality)
    • HFP (Handsfree Protocol): Partially Fixed (Mic works, speaker distorted sound)
    • Brightness: Done
    • Vibration: Done
    • LSM6DSL Accelometer and Gyroscope Sensor: Done
    • TSL2584 Light Sensor: Done
    • PPS960 Heart Rate Sensor: Done
    • SSP Sensor Hub: Partially
    • Tap to Wake: Done
    • Always on display: Done
    • Bezel: Done
    THINGS TO DO:
    • GPS
    • NFC
    • Offline charging
    • Step Counter
    • Power Optimizations (power.exynos5)
    • Audio and HFP (mixer_paths.xml)
    • SSP Sensor Hub
    • ...
    • ...
    • ...
    • WearOS 3
    21
    As we know Android and Tizen are linux based operation systems. Android has its own libraries (bionic) at system side and it is heavily customized version of linux. Tizen has more pure linux libraries and linux approach for drivers, system configuration etc.

    For who is dealing porting android on linux devices:
    If your device does not have UART for bluetooth and initializes HCI on kernel side like solis, your keyword is

    UPDATE:
    I fixed bluetooth and wifi. I was able to complete setup after after fixes.

    What is working?
    • Display
    • Bluetooth (Everything except audio functions)
    • Wifi
    • Battery
    • Palm screen to suspend device
    • Google Services
    • WearOS functions (Notifications, Google Assistant etc)

    What needs to be fixed?
    • Audio (Largo is not using by any other android device)
    • Vibration
    • GPS
    • NFC
    • Sensors
    • Double tap to wake
    • Always on screen
    • Offline charging
    • Bezel (tizen_detent)

    After fixing audio and vibration I will test wireless download mode. If everything goes well, we will be ready for alpha release :) Here are some photos.
    21
    Hello all and thank you for your kind interest.

    UPDATE:
    I fixed audio. Now microphone and speaker is working. I also fixed HFP (Hands Free Protocol, which is used by phone calls). Now we can make calls from watch. Audio routing works but speaker is not working as expected. I think it is due to volume levels and gain levels. Tizen sets gain differently. I can not solve this yet.

    I also fixed screen brightness. I did some kernel tweaks, switched Tizen's Javaw governor to interactive governor. I added some Android requirements (/proc/cpu_time/ etc) to the kernel.

    Now I am working on vibrator. It has different approach from usual vibrators. ZH915 is not a timed_output device. It is an event driven input device (FF_RUMBLE).

    As I said, after vibration fix, I will test wireless download mode.
    18
    UPDATE:
    Vibration is ok.

    My first approach is converting FF_RUMBLE device to timed_output. I found this driver for ZH915 which is based on timed_output. But it is not working due to dts (gpio pins) incompatibility. After some digging, I found fftest is used for testing force feedback devices on linux. After finding source code of fftest, I cross compiled it and run on device, made some changes (intensity, effect types) and found correct configuration. And there it is, device vibrated.

    After finding correct configuration, it is time for vibrator hal. With big help of Qualcomm's Vibrator Hal, I developed our own vibrator service. (Actually copied a lot of code from qualcomm repository, changed configuration and fixed build errors). And vibration is working now.

    I also tested wireless download mode. It is not working due to my fake cmdline configuration. Device is booting system when you select wireless download. Don't worry, kernel part is easy to fix. After fixes I will try again wireless download. Maybe offline charging will work too.