[Q][JB on msm8960]qcom propritary adreno driver fails while android(JB) is booting - Android Software/Hacking General [Developers Only]

Dear All,
I am porting JB for QCom's msm8960 architecture (specifically for APQ8060A boards). I have downloaded several MSM8960
specific Code aurora releases and compiled them for msm8960. I have also downloaded Adreno user space drivers binaries.
After successful compilation when I run the Android image on the board, But a graphics related issue occurs.
'/system/bin/bootanimation' is not able to display anything on the screen and receives error while executing
eglSwapBuffers. Following are the Android 'main' logs for the error.
...
E/libEGL ( 515): eglApi.cpp : [eglSwapBuffers] dp->disp.dpy:1, s->surface:1
W/Adreno200-EGLSUB( 515): <GetBackBuffer:2172>: handle base address is NULL
W/Adreno200-ES20( 515): <gl2_surface_swap:43>: GL_OUT_OF_MEMORY
W/Adreno200-EGL( 515): <qeglDrvAPI_eglSwapBuffers:3477>: EGL_BAD_ALLOC
E/libEGL ( 515): [eglSwapBuffers] result = 0
...
W/Adreno200-EGLSUB( 515): <GetBackBuffer:2172>: handle base address is NULL
W/Adreno200-EGL( 515): <qeglDrvAPI_eglSwapBuffers:3477>: EGL_BAD_ALLOC
E/BootAnimation( 515): [BootAnimation.cpp][android] retval of eglSwapBuffers = 0
W/Adreno200-GSL( 515): <gsl_ldd_control:225>: ioctl code 0x40040921 (IOCTL_KGSL_SHAREDMEM_FREE) failed: errno 22 Invalid argument
...
Please let me know if any one of you has faced such problem.
I was doubting that Adreno user space drivers which I downloaded explicilty from QCom's website are not compatible with
the Android release, Therefore I tried with several Android releases but nothing works and shows the same error always.
Regards,
Nitin

Related

[Q] Problems booting kernel

Hi, hopefully this is the correct place to post this.
I´m developing a device on a beagleboard and have some problems starting the kernel.
I´m using yaffs2 as root filesystem and the version of the kernel is 2.6.29.
We have the latest yaffs2 code compiled into the kernel, not from googles kernel but from yaffs git sources.
We come so far as it has finished uncompressing the kernel and tried booting it but after that it freezes without no output what so ever.
The uBoot enviroment is as following:
OMAP3_Kajsa # printenv
bootdelay=10
baudrate=115200
loadaddr=0x82000000
usbtty=cdc_acm
console=ttyS0,115200n8
loadbootscript=fatload mmc 0 ${loadaddr} boot.scr
bootscript=echo Running bootscript from mmc ...; source ${loadaddr}
loaduimage=fatload mmc 0 ${loadaddr} uImage
netmask=255.255.255.0
gatewayip=192.168.0.99
dieid#=1d5a0004000000000403643203019007
ethact=smc911x-0
ethaddr=00:11:22:33:44:55
ipaddr=10.0.0.2
serverip=10.0.0.1
echo=Booting from nand ...
nandargs=console=ttyS0,115200n8 root=/dev/mtdblock4 opamfb.mode=lcd vram=32M omapfb.vram=0:8M rdinit=/init rootwait rootfstype=yaffs2
nandboot=echo Booting from NAND...; nand read ${loadaddr} 280000 400000; bootm ${loadaddr}
bootfile=uMulti-2
bootargs=console=ttyS0,115200n8 root=/dev/mtdblock4 rw opamfb.mode=lcd vram=32M omapfb.vram=0:8M init=/init rootwait rootfstype=yaffs2
stdin=serial
stdout=serial
stderr=serial
Environment size: 1175/131068 bytes
And the output when we start to boot the kernel is:
OMAP3_Kajsa # set ethaddr 00:11:22:33:44:55 ; set ipaddr 10.0.0.2 ; set serverip 10.0.0.1 ; tftp 0x82000000 uImage-yaffs
smc911x: detected LAN9220 controller
smc911x: phy initialized
smc911x: MAC 00:11:22:33:44:55
Using smc911x-0 device
TFTP from server 10.0.0.1; our IP address is 10.0.0.2
Filename 'uImage-yaffs'.
Load address: 0x82000000
Loading: T #################################################################
#################################################################
###############################
done
Bytes transferred = 2360952 (240678 hex)
OMAP3_Kajsa # bootm
## Booting kernel from Legacy Image at 82000000 ...
Image Name: Linux-2.6.29-rc3-omap1-gb7a2014-
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2360888 Bytes = 2.3 MB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
Uncompressing Linux...................................................................................................................................................... done, booting the kernel.
We have also tried to write the kernel to NAND and booted from there with the same result.
Any input will be appriciated.
Best regards.
Eric

aosp kitkat4.4 nexus 7(deb) not boot

hi all:
i download aosp kitkat4.4 source codes from google website. i compiled the code. i got the ROM.but when i flash the ROM to my device nexus 7(deb). it cannot boot.
from the log. i found that following error log. the sentence "couldn't find an OpenGL ES implementation" maybe cause the fatal question.
any advices is welcomed !
thank
brian
02-10 08:37:07.375: E/QCOMKeyMaster(17633): failed to load qseecom library
02-10 08:37:07.375: E/keystore(17633): could not open keymaster device in keystore (Operation not permitted)
02-10 08:37:07.375: E/keystore(17633): keystore keymaster could not be initialized; exiting
02-10 08:37:07.405: A/libEGL(17630): couldn't find an OpenGL ES implementation
02-10 08:37:07.405: A/libc(17630): Fatal signal 6 (SIGABRT) at 0x000044de (code=-6), thread 17630 (surfaceflinger)
02-10 08:37:07.575: E/msm8960_platform(17632): platform_init: DLOPEN failed for libacdbloader.so
02-10 08:37:07.575: E/msm8960_platform(17632): platform_init: DLOPEN failed for libcsd-client.so
02-10 08:37:07.575: E/MonoPipe(17632): Failed to fetch local time frequency when constructing a MonoPipe (res = -32). getNextWriteTimestamp calls will be non-functional

Board pid, pcbid, soc version doesn't match device tree!

Pulled system logs (new random crashes) and noticed the following in last_kmsg. On CM11 m12, 4.17.605.5 firmware, and just got replacement M8 hardware.
1) Any concern regarding the "Board pid, pcbid, soc version doesn't match device tree!" message?
2) Whats chipset_bootmode(): reset_reason=0x77665501 mean?
Code:
[2487418] chipset_bootmode(): reset_reason=0x77665501
[2489587] DEBUG_DISABLE_WDT: 0x90!
[2490803] Boot Mode: 1
[2492799] Platform: hTCBmsm8974
[2495055] User Trial Debug Flag: 0
[3330697] [INFO] dts table: version = 1
[3333824] [INFO] dts table: num_entries = 46
[3338771] [DEBUG] Board pid:266, pcbid:0x80, soc version:0x10001
[3722365] [WARN] Board pid, pcbid, soc version doesn't match device tree!
[3727225] [WARN] Board pid:266, pcbid:0x80, soc version:0x10001
[3732000] [WARN] DTB pid:266, pcbid:0x4, soc version:0x10000
[3741028] [INFO] Loading matched device tree into memory... (addr:0x1e00000, dt_offset=0xFC800, dt_size=0x40800)

[MSM-KERNEL-PIE][4.9.96] Timeout Error while using Command Queue

I am new to command queue mechanism in Linux. I am using the following:
Kernel Tree: git clone https://android.googlesource.com/kernel/msm Kernel Ver: 4.9.96
While doing read/write I observe a timeout error:
Code:
mmc0: request with tag: 30 flags: 0x2469000 timed out
mmc0: mmc_blk_cmdq_complete_rq: txfr error(-110)/resp_err(0)
mmc0: mmc_blk_cmdq_complete_rq err req = 0xffffffc0f82acda0, err = -110, err tag = 16
mmc0: mmc_blk_cmdq_err err req = ffffffc0f82acda0, err tag = 16
I checked the CQ registers dump: Following are some of the important ones:
Code:
CQTDBR: 0x7fffffff
CQDPT: 0x7fffffff
CQCRI: 0x0000000d
What may have caused this error and how to solve it ?
Thanks in advance.
Hello, on my phone I am experiencing a similar error, check in dmesg if it also has an FMP or FiPS error.
I get the impression that it is an error related to the cryptographic and security part of these smartphones.
Samsung A205 FMP error
My samsung A205 fails to initialize FMP, the smatphone with the bootloader unlocked. I tried various kernels like Rippler, Eureka and physwizz versions in TWRP. And several Roms I can always see the same error in dmesg: [ 2560.206443] [2...
forum.xda-developers.com

[CLOSED] [ROM - DEV] WearOS 2 for Gear S3

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!
[COLOR=rgb(243, 121, 52)][B]Latest Release:[/B][/COLOR] 22/06/2022 22:58
[B]BATTERY PERCENTAGE FIX FOR 22/06/2022 RELEASE (CURRENT BUILD):[/B]
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.
[B][COLOR=rgb(184, 49, 47)]GEAR S3 FRONTIER/CLASSIC ONLY!![/COLOR][/B] Installed and tested on a few SM-R760 Frontier and get succeed. SM-R770 Classic is also confirmed.
[B]BUT [COLOR=rgb(184, 49, 47)]Korean and LTE versions are NOT TESTED. THEY USE DIFFERENT KERNEL CONFIGURATION. IT WILL PROBABLY CAUSE HARD BRICK!! USE YOUR OWN RISK![/COLOR]
[COLOR=rgb(243, 121, 52)]BEFORE INSTALLATION[/COLOR][/B]
[LIST]
[*][COLOR=rgb(184, 49, 47)][B][COLOR=rgb(184, 49, 47)]DISABLE REACTIVATION LOCK[/COLOR][/B][/COLOR]
[*][COLOR=rgb(184, 49, 47)][B]Charge your watch to 100%[/B][/COLOR]
[*]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
[/LIST]
[B][COLOR=rgb(243, 121, 52)]INSTALLATION [/COLOR][/B][URL='https://mega.nz/file/gFRVxb6K#A0c0dnw2TspeLzo-m9jWnuieG1vTPfh2Mq5vbQzz0a0'][B](View Detailed Document Here)[/B][/URL]
[LIST]
[*]Flashing process is the same as flashing combination or Tizen firmware
[*][COLOR=rgb(184, 49, 47)][B]Wireless flashing takes 15~45 minutes.[/B][/COLOR]
[/LIST]
[LIST=1]
[*]Extract downloaded zip file to get tar file
[*]Enter wireless download mode
[*]Switch to AP mode
[*]Connect to watch from your wireless adapter
[*]Select tar file for AP section
[*]Flash
[/LIST]
[COLOR=rgb(184, 49, 47)][B]DO NOT interrupt flashing process!
DO NOT shutdown your computer or allow your computer to sleep!
DO NOT enter recovery before WearOS boots completely![/B][/COLOR]
[B][COLOR=rgb(65, 168, 95)]WHAT IS WORKING[/COLOR][/B]
[LIST]
[*]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
[/LIST]
[B][COLOR=rgb(184, 49, 47)]KNOWN BUGS[/COLOR][/B]
[LIST]
[*]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) [B]but functionality is not effected.[/B]
[*]If device goes to TWRP, just click Reboot -> System.
[*]Selinux is in Permissive mode
[*]ADB Root is active
[*]KNOX will be tripped!!
[/LIST]
[B][COLOR=rgb(243, 121, 52)]RESETTING WATCH OR CONNECTING NEW DEVICE[/COLOR]
[COLOR=rgb(184, 49, 47)]NEVER use WearOS settings menu to reset watch!!! It is not tested and may be brick your device.[/COLOR][/B]
Option 1: Flash WearOS again
Option 2: Boot to TWRP and Wipe Data [COLOR=rgb(184, 49, 47)][B](IMPORTANT! Be sure “Use rm -rf instead of formatting” is selected on TWRP settings. (TWRP Settings -> General Settings)[/B][/COLOR]
[COLOR=rgb(243, 121, 52)][B]GOING BACK TO TIZEN[/B][/COLOR]
[LIST=1]
[*]Find and download your Tizen firmware from internet. (Remember, you took note your firmware version before installation)
[*]If you can not find your firmware you can try [URL='https://mega.nz/file/JYoQ2AgY#rqw2jZm_eJHjmGkKz4lzVProxyE1DpZA20jYYce-2ow']THIS TIZEN FIRMWARE[/URL]. [COLOR=rgb(184, 49, 47)][B](It may has different CSC. Be careful!)[/B][/COLOR]
[*]Flash
[/LIST]
[B][COLOR=rgb(243, 121, 52)]TELEGRAM GROUP
SOURCES[/COLOR][/B]
[URL='https://github.com/parasetam0l']Github (parasetam0l)[/URL] for kernel, device tree and other SMDK - Samsung related files.
[B][COLOR=rgb(243, 121, 52)]THANKS TO[/COLOR][/B]
[URL='https://github.com/TO21Consortium/SGSWPlatform']TO21Consortium[/URL] for beautiful SMDK source
[URL='https://github.com/YariKartoshe4ka/redline_kernel_samsung_j4lte']YariKartoshe4k[/URL] for Exynos 7570 kernel source
[URL='https://github.com/Biktorgj/android_device_samsung_pontesolo/tree/master/libsensors']Biktorgj[/URL] for Gear S and SSP sensor sources
[URL='https://wear.revtechs.me/en/download']OneOS [/URL]for TicWatch WearOS2 system dump
Many other developers I came across with Google search.
[USER=12140719]@trapecija[/USER] For SM-R770 Classic feedback
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
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
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
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
Nice work, just keep going! Many of us are looking forward to this, perseverance!
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!
Great work!
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)
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
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.
Not sure if you allready find something usefull inside AKI Source...
Gear S3 Root and Kernel Source! (Android Wear Port Thread)
Hey guys! Some of you might know me from the LG G5 scene, but I have since moved on from there and am hoping to make some progress with the Gear S3 :) After doing some digging and paying zero attention in class today, I came across the kernel...
forum.xda-developers.com
SEC_Android_Independent_EVT0.0_E7270_BSP_KERNEL.tar.zip
SEC_Android_Independent_EVT0.0_E7270_BSP_u-boot.tar.zip
GitHub - naverlabs/aki: AKI open source repository
AKI open source repository. Contribute to naverlabs/aki development by creating an account on GitHub.
github.com
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
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 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.
adfree said:
Not sure if you allready find something usefull inside AKI Source...
Gear S3 Root and Kernel Source! (Android Wear Port Thread)
Hey guys! Some of you might know me from the LG G5 scene, but I have since moved on from there and am hoping to make some progress with the Gear S3 :) After doing some digging and paying zero attention in class today, I came across the kernel...
forum.xda-developers.com
SEC_Android_Independent_EVT0.0_E7270_BSP_KERNEL.tar.zip
SEC_Android_Independent_EVT0.0_E7270_BSP_u-boot.tar.zip
GitHub - naverlabs/aki: AKI open source repository
AKI open source repository. Contribute to naverlabs/aki development by creating an account on GitHub.
github.com
Only as info...
Best Regards
Click to expand...
Click to collapse
@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.
lavasbey said:
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
Click to expand...
Click to collapse
@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.
Granat1 said:
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.
Click to expand...
Click to collapse
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.
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
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.
parasetam0l said:
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.
Click to expand...
Click to collapse
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!
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 ??
pedromms86 said:
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 ??
Click to expand...
Click to collapse
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.
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!

Categories

Resources