[CLOSED] [ROM - DEV] WearOS 2 for Gear S3 - Samsung 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!

Related

Android with Wifi Thread - Cooler wifi

Update:
handsets are becoming very hot when wifi is used, you can make them use less power by using the rootfs.img provided, changes where made to tiwlan.ini during testing which keeps the wifi on active even when not in use, this version has reverted the changes and now power saving can be used once more.
http://drop.io/coolerwifikaiser
Aims:
Wakelocks?
Looks like this thread has served its purpose
Wow, are you actually doing all of these commands through the phone? >_<
I really want to see wifi rollin on android too, can't wait to load the ol' Tilt up with it.
the '-f' option
Hi,
a short question, you wrote...
Code:
'wpa_supplicant -f -Dtiwlan0 -itiwlan0 -c/data/misc/wifi/wpa_supplicant.conf &'
...and I've allready seen this in different ohter posts, but I don't know what the '-f' option effects.
I allready browsed the manpages an this option ins't listed. I just tried the command without this statement and it also worked (but did not create the output '-Dtiwlan0' to '/data/local/tmp'). But wlan also doesn't work...
For Polaris users who might need this info:
First things first, make sure wlan works in Windows Mobile. This seems to be the procedure for getting the wlan into do something in Android. It seems to be very similar to the wifi tethering guides on the G1.
Custom Kernel
We need a kernel, the kernel config produced by make vogue_defconfig ARCH=arm leaves the wireless extensions disabled, so this might the cause of the missing mac address in ifconfig. Current attempts to produce a kernel with these extensions have caused the settings dialogues and ifconfig to hang, Ctrl+C does not force an exit. I'll continue to investigate this.
Tiwlan kernel module
I've found another version of the tiwlan driver, other than the one that is currently in git master which loads the firmware and gives the ok - OK
Download Update: This driver skipped checks, ignore it
so lets see if we can merge this with the newer driver to get a working one.
Initial Variables
Code:
setprop wifi.interface tiwlan0
WLan Commands
Modprobe Method:
Code:
mkdir -p /lib/modules/`uname -r`
cp /sdcard/wlan.ko /lib/modules/`uname -r`/
Insmod Method:
Code:
insmod /sdcard/wlan.ko
Tiwlan0 Mac address: No
Required Output: TIWLAN: Driver loaded
WLAN_Loader
Code:
wlan_loader -f /sdcard/Fw1251r1c.bin -e /proc/calibration -i /sdcard/tiwlan.ini
Tiwlan0 Mac address: No
Required Output: Set property wlan.driver.status = ok - Ok
ifconfig -a might need to show a mac address at this point, i'm still not sure when ifconfig -a gets the mac address info
Code:
wpa_supplicant -ddK -Dtiwlan0 -itiwlan0 -c/sdcard/wpa_supplicant.conf &
ifconfig -a must show a mac address or the next step will error out, you can assign one using the following command, just change it to mac address you see in windows. However simply assigning one with this command might not be enough, it could be the sign of a bigger problem.
Code:
ifconfig tiwlan0 hw ether 00:00:00:00:00:00
Code:
ifconfig tiwlan0 192.168.1.100 netmask 255.255.255.0
ifconfig tiwlan0 up
Log Collecting:
Dmesg - Its a ring buffer so as new info is added old info will be removed, you need to run the command right after insmod or modprobe to see if it worked ok.
Code:
[B]dmesg|grep -i wlan[/B]
TIWLAN: Found SDIO controller (vendor 0x104c, device 0x9066)
TIWLAN: Driver initialized (rc 0)
TIWLAN: 1251 PG [B]1.1[/B]
TIWLAN: Driver loaded
If i'm right The kaiser has 1.1. the G1 has 1.2, its a reference to the chip used.
Logcat
You can run logcat at the start to keep a log of everything the machine has done since android has started. If you run it like this it will keep logging to the file as you run other commands so when you boot back to WM and sync you can open the file in an editor like Notepad++ and see what happened. This is the first thing i run when i get to the root shell
Code:
logcat -f /sdcard/debuglog.txt &
After running the wlan_loader you can run this to check it worked ok:
Code:
[B]grep -i 'wlan' /sdcard/debuglog.txt[/B]
D/wlan_loader( 395): adapter tiwlan0, eeprom /proc/calibration, init /sdcard/tiwlan.ini, firmware /sdcard/Fw1251r1c.bin
D/wlan_loader( 395): Configuring adapter
D/wlan_loader( 395): Adapter configuration rc = 0
D/wlan_loader( 395): Starting configMge
D/wlan_loader( 395): ConfigMge start rc = 0
D/wlan_loader( 395): Driver configured
D/wlan_loader( 395): Firmware loaded and running OK
D/wlan_loader( 395): Set property wlan.driver.status = ok - Ok
i did once end up with the ok - Ok but it was hit and miss, and i've ended up with all sorts from ok - Fail to fail - Ok to fail - Fail but ifconfig has never shown a mac address on its own
Email to...
The terminal emulator in android should have an option in the menu to email everything you've seen to an email address, use that to keep logs of the entire session. Better terminal has this feature, but it stopped working, try
Files
Fw1251r1c.bin
The firmware filenames of the G1 and the Kaiser have the same name. So we should get a list of good kaiser firmware to rule firmware issues out as soon as possible. If you can connect in windows mobile to a wpa secured AP then the Fw1251r1c.bin in the windows folder on the rom should be the one you are using in Android.
File, Size in bytes, MD5SUM, Source
Fw1251r1c.bin, 185388, ebf5c2036d37bc56b4d41ddcbda4311e, 6.1 WWE ROM shifu, Download
tiwlan.ini
Lets get a good tiwlan.ini file, so we know if its causing issues.
Values:
Comming Soon...
wpa_supplicant.conf
Code:
ctrl_interface=tiwlan0
ap_scan=1
eapol_version=1
fast_reauth=1
eapol_version=1
update_config=1
network={
ssid="WIFISSID"
...
priority=1
}
-------------------------------------------------------------------------------------
Quick Scripts:
Its hard to type long commands on the keyboard so here are some scripts to help:
Code:
[B]/sdcard/cmd1[/B]
#!/bin/sh
echo 'Setting Variables...'
setprop wifi.interface tiwlan0
echo 'Variables Set!'
echo 'Logging to /sdcard/debuglog.txt...'
pkill logcat
logcat -f /sdcard/debuglog.txt &
echo 'Logger Started!'
echo 'Copying WLan Module...'
mkdir -p /lib/modules/`uname -r`
cp /system/lib/modules/wlan.ko /lib/modules/`uname -r`/
echo 'Module Coppied!'
echo 'Loading Module...'
modprobe wlan
lsmod
echo 'Module Loaded!'
#
Code:
[B]/sdcard/cmd2[/B]
#!/bin/sh
echo 'Running Loader...'
wlan_loader -f /sdcard/Fw1251r1c.bin -e /sdcard/calibration -i /sdcard/tiwlan.ini
echo 'Loder Completed'
echo 'Ifconfig Output'
ifconfig -a
dmesg|grep -i wlan
cat /sdcard/debuglog.txt... |grep -i wlan
#
Output:
$ su
~ # cd /sdcard/
/sdcard # ./cmd1
Setting Variables...
Variables Set!
Logging to /sdcard/debuglog.txt...
Logger Started!
Copying WLan Module...
Module Coppied!
Loading Module...
wlan 584168 0 - Live 0xbf000000
Module Loaded!
/sdcard # ./cmd2
Running Loader...
Loder Completed
Ifconfig Output
tiwlan0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
[ 96.701234] TIWLAN: Driver loading
[ 97.593872] TIWLAN: Found SDIO controller (vendor 0x104c, device 0x9066)
[ 97.599251] TIWLAN: Driver initialized (rc 0)
[ 97.599511] TIWLAN: 1251 PG 1.1
[ 97.599547] TIWLAN: Driver loaded
D/wlan_loader( 518): adapter tiwlan0, eeprom /sdcard/calibration, init /system/etc/wifi/tiwlan.ini, firmware /sdcard/Fw1251r1c.bin
D/wlan_loader( 518): Configuring adapter
D/wlan_loader( 518): Adapter configuration rc = 0
D/wlan_loader( 518): Starting configMge
D/wlan_loader( 518): ConfigMge start rc = 0
D/wlan_loader( 518): Driver configured
D/wlan_loader( 518): Firmware loaded and running OK
D/wlan_loader( 518): Set property wlan.driver.status = ok - Ok
thanks,
how did you manage that configMge doesn't fail on start? I still get 'rc = -1'. Did you build a new 'wlan.ko' with the Kernelsource from git (Vogue/Kaiser)? And what firmware are you using (the original or the extracted?)
maybe you can post your files for testing...
toasty_ said:
thanks,
how did you manage that configMge doesn't fail on start? I still get 'rc = -1'. Did you build a new 'wlan.ko' with the Kernelsource from git (Vogue/Kaiser)? And what firmware are you using (the original or the extracted?)
maybe you can post your files for testing...
Click to expand...
Click to collapse
Its either the variable being set or modprobe being used that does the trick, so try those, i'm in the middle of compiling a newer kernel to see if it works better
Thx for the short Tutorial and the scripts. Unfortunately I still get the message:
Code:
'ConfigMge start rc = -1'
I think the reason is the (my) wlan.ko module - it shows following message/warning while loading (insmod and modprobe)
Code:
wlan: version magic '2.6.25-00818-gf668526 preempt mod_unload ARMv6 ' should be '2.6.25-00832-g42c5da5 preempt mod_unload ARMv6'
but its loaded...
especialy lsmod gives me another value for the second number (think the allocated memory):
Code:
wlan 583852 0 - Live 0xbf000000
I use the firmware from '3.34.shifuv11F WWE':
Size: 185388 byte
MD5: ebf5c2036d37bc56b4d41ddcbda4311e
dmesg:
Code:
[ 114.718730] TIWLAN: Driver loading
[ 115.079288] TIWLAN: Found SDIO controller (vendor 0x104c, device 0x9066)
[ 115.084840] TIWLAN: Driver initialized (rc 0)
[ 115.084952] TIWLAN: Driver loaded
[ 122.852419] TIWLAN: TIWLAN: Failed to start config manager
logcat:
Code:
D/wlan_loader( 444): adapter tiwlan0, eeprom /proc/calibration, init /sdcard/wlan/tiwlan.ini, firmware /sdcard/wlan/Fw1251r1c.bin
D/wlan_loader( 444): Configuring adapter
D/wlan_loader( 444): Adapter configuration rc = 0
D/wlan_loader( 444): Starting configMge
D/wlan_loader( 444): ConfigMge start rc = -1
D/wlan_loader( 444): Driver configuration failed (-1)
E/wlan_loader( 444): init_driver() failed
D/wlan_loader( 444): Set property wlan.driver.status = failed - Ok
can you tell me what wlan.ko you are using - maybe a link...
Upon further investigation it turns out that a specific version of the firmware and a compatible wlan.ko are needed to get it to work, i'm rolling up a fresh system.img to test now, i'll post it if it works
http://forum.xda-developers.com/showthread.php?p=4231219
toasty_ said:
Thx for the short Tutorial and the scripts. Unfortunately I still get the message:
Code:
'ConfigMge start rc = -1'
I think the reason is the (my) wlan.ko module - it shows following message/warning while loading (insmod and modprobe)
Code:
wlan: version magic '2.6.25-00818-gf668526 preempt mod_unload ARMv6 ' should be '2.6.25-00832-g42c5da5 preempt mod_unload ARMv6'
but its loaded...
especialy lsmod gives me another value for the second number (think the allocated memory):
Code:
wlan 583852 0 - Live 0xbf000000
I use the firmware from '3.34.shifuv11F WWE':
Size: 185388 byte
MD5: ebf5c2036d37bc56b4d41ddcbda4311e
dmesg:
Code:
[ 114.718730] TIWLAN: Driver loading
[ 115.079288] TIWLAN: Found SDIO controller (vendor 0x104c, device 0x9066)
[ 115.084840] TIWLAN: Driver initialized (rc 0)
[ 115.084952] TIWLAN: Driver loaded
[ 122.852419] TIWLAN: TIWLAN: Failed to start config manager
logcat:
Code:
D/wlan_loader( 444): adapter tiwlan0, eeprom /proc/calibration, init /sdcard/wlan/tiwlan.ini, firmware /sdcard/wlan/Fw1251r1c.bin
D/wlan_loader( 444): Configuring adapter
D/wlan_loader( 444): Adapter configuration rc = 0
D/wlan_loader( 444): Starting configMge
D/wlan_loader( 444): ConfigMge start rc = -1
D/wlan_loader( 444): Driver configuration failed (-1)
E/wlan_loader( 444): init_driver() failed
D/wlan_loader( 444): Set property wlan.driver.status = failed - Ok
can you tell me what wlan.ko you are using - maybe a link...
Click to expand...
Click to collapse
So you'll have to compile a custom kernel, then a custom wlan.ko before you try this. I have also uploaded the wifi firmware, a link is in the first post
Custom Kernel:
I use the Kernelsources from git ("git.linuxtogo.org", vogue branch). I also tried to build the 'wlan.ko' from Android-source (I set 'KERNEL_DIR' to the Folder of my Kernel source). If I run make I get some errors because of missing include-files.
//Edit: just made symlink to arm-msm
If I'm home on weekend I try to build a new wlan.ko for my kernel. Is there anything, that needs to be patched for kernel 2.6.25?
btw. I found this page http://www.johandekoning.nl/index.php, there are some information about wlan and firmware loading issues (for the G1, but nearly the same problemes)
I didn't do anything special to get a wlan.ko, just compiled it as normal:
Code:
KERNEL_DIR=/Android/kernel make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
Current status from error log:
Code:
D/wlan_loader( 406): adapter tiwlan0, eeprom /proc/calibration, init /system/etc/wifi/tiwlan.ini, firmware /system/etc/wifi/Fw1251r1c.bin
D/wlan_loader( 406): Configuring adapter
D/wlan_loader( 406): Adapter configuration rc = 0
D/wlan_loader( 406): Starting configMge
D/wlan_loader( 406): ConfigMge start rc = 0
D/wlan_loader( 406): Driver configured
D/wlan_loader( 406): Firmware loaded and running OK
D/wlan_loader( 406): Set property wlan.driver.status = ok - Ok
D/dalvikvm( 161): GC freed 11747 objects / 572968 bytes in 363ms
V/WifiMonitor( 161): Event [CTRL-EVENT-STATE-CHANGE id=-1 state=2]
V/WifiMonitor( 161): Event [CTRL-EVENT-STATE-CHANGE id=-1 state=1]
D/SettingsWifiEnabler( 390): Received wifi state changed from Enabling to Enabled
V/WifiMonitor( 161): Event [CTRL-EVENT-STATE-CHANGE id=-1 state=2]
V/WifiMonitor( 161): Event [CTRL-EVENT-STATE-CHANGE id=-1 state=1]
[B]D/WifiHW ( 161): 'DRIVER RSSI' command timed out.[/B]
[B]D/WifiHW ( 161): 'DRIVER LINKSPEED' command timed out.[/B]
[B]D/WifiHW ( 161): 'DRIVER MACADDR' command timed out.[/B]
V/WifiStateTracker( 161): Connection to supplicant established, state=INACTIVE
[B]D/WifiHW ( 161): 'DRIVER RXFILTER-ADD 0' command timed out.[/B]
[B]D/WifiHW ( 161): 'DRIVER BTCOEXSCAN-STOP' command timed out.[/B]
V/WifiStateTracker( 161): Changing supplicant state: INACTIVE ==> SCANNING
I/WindowManager( 161): Setting rotation to 1, animFlags=1
I/WindowManager( 161): Config changed: { scale=1.0 imsi=0/0 locale=en touch=3 key=2/1/1 nav=1 orien=2 }
[B]D/WifiHW ( 161): 'DRIVER SCAN-PASSIVE' command timed out.[/B]
V/WifiStateTracker( 161): Changing supplicant state: SCANNING ==> INACTIVE
V/WifiStateTracker( 161): Changing supplicant state: INACTIVE ==> SCANNING
V/WifiStateTracker( 161): Changing supplicant state: SCANNING ==> INACTIVE
W/WindowManager( 161): Window freeze timeout expired.
W/WindowManager( 161): Force clearing orientation change: Window{43120508 StatusBar paused=false}
[B]D/WifiHW ( 161): 'SCAN_RESULTS' command timed out.[/B]
D/StatusBar( 161): updateResources
I/WindowManager( 161): Config changed: { scale=1.0 imsi=0/0 locale=en touch=3 key=2/1/2 nav=1 orien=2 }
D/dalvikvm( 161): GC freed 5792 objects / 384744 bytes in 220ms
D/StatusBar( 161): updateResources
[B]D/WifiHW ( 161): 'LIST_NETWORKS' command timed out.[/B]
W/SurfaceFlinger( 161): timeout expired mFreezeDisplay=1, mFreezeCount=1
W/WindowManager( 161): App freeze timeout expired.
W/WindowManager( 161): Force clearing freeze: AppWindowToken{43358af8 token=HistoryRecord{43358808 {com.android.settings/com.android.settings.wifi.WifiSettings}}}
D/WifiHW ( 161): 'STATUS' command timed out.
D/dalvikvm( 161): GC freed 946 objects / 43184 bytes in 188ms
D/dalvikvm( 317): GC freed 356 objects / 32824 bytes in 105ms
D/WifiHW ( 161): 'DRIVER RSSI' command timed out.
W/WindowManager( 161): Key dispatching timed out sending to com.android.settings/com.android.settings.wifi.WifiSettings
W/WindowManager( 161): Dispatch state: null
W/WindowManager( 161): Current state: {{null to Window{4335b828 com.android.settings/com.android.settings.wifi.WifiSettings paused=false} @ 1247587631205 lw=Window{4335b828 com.android.settings/com.android.settings.wifi.WifiSettings paused=false} [email protected] fin=false gfw=true ed=true tts=0 wf=false fp=false mcf=Window{4335b828 com.android.settings/com.android.settings.wifi.WifiSettings paused=false}}}
I/ActivityManager( 161): ANR (application not responding) in process: com.android.settings
I/ActivityManager( 161): Annotation: keyDispatchingTimedOut
I/ActivityManager( 161): CPU usage:
I/ActivityManager( 161): Load: 5.21 / 3.21 / 1.36
I/ActivityManager( 161): CPU usage from 9963ms to 28ms ago:
I/ActivityManager( 161): system_server: 8% = 7% user + 0% kernel
I/ActivityManager( 161): com.android.alarmclock: 1% = 1% user + 0% kernel
I/ActivityManager( 161): com.android.phone: 0% = 0% user + 0% kernel
I/ActivityManager( 161): loop0: 0% = 0% user + 0% kernel
I/ActivityManager( 161): rild: 0% = 0% user + 0% kernel
I/ActivityManager( 161): android.process.acore: 0% = 0% user + 0% kernel
I/ActivityManager( 161): com.android.inputmethod.latin: 0% = 0% user + 0% kernel
I/ActivityManager( 161): android.process.media: 0% = 0% user + 0% kernel
I/ActivityManager( 161): TOTAL: 8% = 7% user + 1% kernel + 0% irq
toasty_ said:
Custom Kernel:
I use the Kernelsources from git ("git.linuxtogo.org", vogue branch). I also tried to build the 'wlan.ko' from Android-source (I set 'KERNEL_DIR' to the Folder of my Kernel source). If I run make I get some errors because of missing include-files.
If I'm home on weekend I try to build a new wlan.ko for my kernel. Is there anything, that needs to be patched for kernel 2.6.25?
btw. I found this page http://www.johandekoning.nl/index.php, there are some information about wlan and firmware loading issues (for the G1, but nearly the same problemes)
Click to expand...
Click to collapse
Sorry, my mistake, i did in fact have a different driver version. I have uploaded it, check the first post. This driver does not seem to work and will need to be modified.
thanks for the files, where did you get them? Compiling worked without any failure (just had to create a symlink to 'arch-msm'
it seem as if the firmware is loaded (on my phone it only works with the fw of the G1). I think it is realiy loaded because you get 'failed - OK' if you try to load it a 2nd time.
by the way have you extraced wlan-eeprom ('/proc/calibration') http://projects.linuxtogo.org/tracker/index.php?func=detail&aid=32&group_id=37&atid=273
toasty_ said:
thanks for the files, where did you get them? Compiling worked without any failure (just had to create a symlink to 'arch-msm'
it seem as if the firmware is loaded (on my phone it only works with the fw of the G1). I think it is realiy loaded because you get 'failed - OK' if you try to load it a 2nd time.
by the way have you extraced wlan-eeprom ('/proc/calibration') http://projects.linuxtogo.org/tracker/index.php?func=detail&aid=32&group_id=37&atid=273
Click to expand...
Click to collapse
Yes, i have extracted my eeprom file and i have found my mac address in there 3 times, which seems strange. I found the area which has the same start as the carlibration of a G1 (found here) and extracted a chunk to get the same size file. I tried it but it doesn't seem to make a difference. Maybe the data is read after the point at which we are having errors?
So I've played a bit around with the files. At the moment the driver is loaded and the firmware is accepted. But the wlan adapter still doesn't get a Mac.
Btw. if you take a look at the eeprom-file you find the MAC from Offset 0x5C to 0x61 in reverse order. Would be interesting the G1 eeprom-file looks like. Maybe somebody can 'cat /proc/calibration > /sdcard/calibration.bin'.
//***OK nearly the same as you said - should write faster***//
OK, yes found the offset in my file, but the its a bit different
Code:
G1:
02 11 56 06 1C 06 01 16 60 03 07 01 09 56 12 00 00 00 01 0D 56 40
Kaiser:
02 11 56 06 1C 06 [COLOR="Red"]00[/COLOR] 16 60 03 [COLOR="Red"]02[/COLOR] 01 09 56 12 00 00 00 01 0D 56 40
Ah, i made a mistake, still need to find where the contents of calibration are in the rom dump
Ok in romdump there are some more Offsets (0x243E5C8, 0x2500040, 0x2500840, 0x2520040 from full rom-dump) that have nearly the same byte order
But only in 0x2500840 and 0x2500040 my MAC is included --> I've checked with 'diff' both extracted Offsets (752 Byte) and they are same
toasty_ said:
So I've played a bit around with the files. At the moment the driver is loaded and the firmware is accepted. But the wlan adapter still doesn't get a Mac.
Btw. if you take a look at the eeprom-file you find the MAC from Offset 0x5C to 0x61 in reverse order. Would be interesting the G1 eeprom-file looks like. Maybe somebody can 'cat /proc/calibration > /sdcard/calibration.bin'.
//***OK nearly the same as you said - should write faster***//
OK, yes found the offset in my file, but the its a bit different
Code:
G1:
02 11 56 06 1C 06 01 16 60 03 07 01 09 56 12 00 00 00 01 0D 56 40
Kaiser:
02 11 56 06 1C 06 [COLOR="Red"]00[/COLOR] 16 60 03 [COLOR="Red"]02[/COLOR] 01 09 56 12 00 00 00 01 0D 56 40
Click to expand...
Click to collapse
Ok i found the correct location, I searched for 021156061c in the eeprom dump and found it. I haven't had a chance to test this yet. Also another interesting thing to note is that both the kaiser' and G1's mac address started with 00:18 :41
Newbie16 said:
Ok i found the correct location, I searched for 021156061c in the eeprom dump and found it. I haven't had a chance to test this yet. Also another interesting thing to note is that both the kaiser' and G1's mac address started with 00:18 :41
Click to expand...
Click to collapse
yap, my does it too...

[DEV] Discussion about USB-TTL UART JIG

Hey all,
I've created this thread to gather all the info and doubts about UART JIG (also so <I> don't pollute OpenFIMG's thread ).
Readings of interest:
Fun with resistors
Setup in a Nexus S (with pictures)
UART / Serial / JTAG
Odd serial port on Spica (samdroid)
Galaxy S UART JIG & Debugging connector
Developing methods to recover bricks without JTAG
Kernel serial console on i9100
UART Output / Bootloader Hacking / Kernel debugging
Configuration:
Vcc (Pin 1) -> Disconnected.
D- (Pin 2) -> RXD.
D+ (Pin 3) -> TXD.
ID (Pin 4) -> Connected to GND with 523k ohm attached.
GND (Pin 5) -> GND
Baud rate: 115200, 8N1. No control flow.
Boot from the SBL:
Code:
SBL>loadkernel
SBL>loadmodem
SBL>boot
How to get output from kernel.
tom3q said:
<Quote Snipped>.
Click to expand...
Click to collapse
Awesome. Thanks donator!
You've got the uart jig there? Can you test it? (I'm not getting any output.. not [X]BL, nor kernel)
moikop said:
Awesome. Thanks donator!
You've got the uart jig there? Can you test it? (I'm not getting any output.. not [X]BL, nor kernel)
Click to expand...
Click to collapse
This is what I get from the serial port of G3:
Code:
Secondary Boot Loader(SBL)
Built for apollo rev02 by root on Oct 27 2010 17:10:33
Copyright (C) SAMSUNG Corporation 2006-2010
[PAM: ] ++FSR_PAM_Init
[PAM: ] OneNAND physical base address : 0xb0000000
[PAM: ] OneNAND virtual base address : 0xb0000000
[PAM: ] OneNAND nMID=0xec : nDID=0x50
[PAM: ] --FSR_PAM_Init
fsr_bml_load_partition: pi->nNumOfPartEntry = 10
partitions loading success
==== PARTITION INFORMATION ====
ID : IBL & PBL (0x0)
ATTR : RO SLC PREWRITING (0x9002)
FIRST_UNIT : 0
NO_UNITS : 1
===============================
ID : SBL (0x1)
ATTR : RO ENTRYPOINT SLC BOOTLOADING PREWRITING (0xd402)
FIRST_UNIT : 1
NO_UNITS : 5
===============================
ID : PARAM (0x2)
ATTR : RW SLC (0x1001)
FIRST_UNIT : 6
NO_UNITS : 2
===============================
ID : EFS (0x18)
ATTR : RW STL SLC (0x1101)
FIRST_UNIT : 8
NO_UNITS : 32
===============================
ID : KERNEL (0x4)
ATTR : RO SLC PREWRITING (0x9002)
FIRST_UNIT : 40
NO_UNITS : 30
===============================
ID : FACTORYFS (0x15)
ATTR : RW STL SLC (0x1101)
FIRST_UNIT : 70
NO_UNITS : 880
===============================
ID : DATAFS (0x16)
ATTR : RW STL SLC (0x1101)
FIRST_UNIT : 950
NO_UNITS : 810
===============================
ID : CACHE (0x17)
ATTR : RW STL SLC (0x1101)
FIRST_UNIT : 1760
NO_UNITS : 152 (*mismatch* 152 should be 150)
===============================
ID : TEMP (0x3)
ATTR : RW SLC (0x1001)
FIRST_UNIT : 1912
NO_UNITS : 28 (*mismatch* 28 should be 30)
===============================
ID : MODEM (0x5)
ATTR : RO SLC PREWRITING (0x9002)
FIRST_UNIT : 1940
NO_UNITS : 64
===============================
Read image(PARAM) from flash .......
..Done
read 2 units.
Normal Case : MAIN(O) & BACKUP(O)
main: Debug Level Low
RST_STAT = 0x00000004 WAKEUP_STAT = 0x00000000
s5p_fb_info_init start
s5p_fb_info_init end
s5p_fimd_info_init start
s5p_fimd_info_init end
LoadPNG: width:240, height:400, bpp:32, color_type:6, channels:4, rowbytes:960
lcd_gpio_init start
lcd_gpio_init end
lcd_backlight_ctrl start
lcd type: 1
ldi mtpdata: 52 9 11
lcd type is smd
set brightness:0x43
lcd_backlight_ctrl end
SBL:Phone Boot Mode=0
AST_POWERON
usb_download_mode:0
Autoboot (0 seconds) in progress, press any key to stop
AST_ERROR
Autoboot aborted
Type "help" to get a list of commands
SBL>
SBL>
SBL>
SBL> help
Following commands are supported:
* setenv
* savedefault
* saveenv
* printenv
* help
* sec_log
* kernel
* boot
* reset
* nandwrite
* nandread
* nkernel
* readcheck
* savepart
* delpart
* addpart
* showpart
* loadmodem
* loadkernel
* eraseall
* erasepart
* close
* open
* format
* getreg
* setreg
* getadc
* sleep
To get commands help, Type "help <command>"
SBL>
When I let the kernel boot instead of entering the console I get no output from the kernel, possibly because UART switch is being reconfigured to modem somewhere in the kernel, kernel doesn't have serial console enabled or the serial port passed to the kernel in kernel arguments by the bootloader isn't the serial port accessible from microUSB connector.
For reference:
Code:
Secondary Boot Loader(SBL)
Built for apollo rev02 by root on Oct 27 2010 17:10:33
Copyright (C) SAMSUNG Corporation 2006-2010
[PAM: ] ++FSR_PAM_Init
[PAM: ] OneNAND physical base address : 0xb0000000
[PAM: ] OneNAND virtual base address : 0xb0000000
[PAM: ] OneNAND nMID=0xec : nDID=0x50
[PAM: ] --FSR_PAM_Init
fsr_bml_load_partition: pi->nNumOfPartEntry = 10
partitions loading success
==== PARTITION INFORMATION ====
ID : IBL & PBL (0x0)
ATTR : RO SLC PREWRITING (0x9002)
FIRST_UNIT : 0
NO_UNITS : 1
===============================
ID : SBL (0x1)
ATTR : RO ENTRYPOINT SLC BOOTLOADING PREWRITING (0xd402)
FIRST_UNIT : 1
NO_UNITS : 5
===============================
ID : PARAM (0x2)
ATTR : RW SLC (0x1001)
FIRST_UNIT : 6
NO_UNITS : 2
===============================
ID : EFS (0x18)
ATTR : RW STL SLC (0x1101)
FIRST_UNIT : 8
NO_UNITS : 32
===============================
ID : KERNEL (0x4)
ATTR : RO SLC PREWRITING (0x9002)
FIRST_UNIT : 40
NO_UNITS : 30
===============================
ID : FACTORYFS (0x15)
ATTR : RW STL SLC (0x1101)
FIRST_UNIT : 70
NO_UNITS : 880
===============================
ID : DATAFS (0x16)
ATTR : RW STL SLC (0x1101)
FIRST_UNIT : 950
NO_UNITS : 810
===============================
ID : CACHE (0x17)
ATTR : RW STL SLC (0x1101)
FIRST_UNIT : 1760
NO_UNITS : 152 (*mismatch* 152 should be 150)
===============================
ID : TEMP (0x3)
ATTR : RW SLC (0x1001)
FIRST_UNIT : 1912
NO_UNITS : 28 (*mismatch* 28 should be 30)
===============================
ID : MODEM (0x5)
ATTR : RO SLC PREWRITING (0x9002)
FIRST_UNIT : 1940
NO_UNITS : 64
===============================
Read image(PARAM) from flash .......
..Done
read 2 units.
Normal Case : MAIN(O) & BACKUP(O)
main: Debug Level Low
RST_STAT = 0x00000004 WAKEUP_STAT = 0x00000000
s5p_fb_info_init start
s5p_fb_info_init end
s5p_fimd_info_init start
s5p_fimd_info_init end
LoadPNG: width:240, height:400, bpp:32, color_type:6, channels:4, rowbytes:960
lcd_gpio_init start
lcd_gpio_init end
lcd_backlight_ctrl start
lcd type: 1
ldi mtpdata: 52 9 11
lcd type is smd
set brightness:0x43
lcd_backlight_ctrl end
SBL:Phone Boot Mode=0
AST_POWERON
usb_download_mode:0
Autoboot (0 seconds) in progress, press any key to stop
FOTA Check Bit
Read BML page=1e4ff, NumPgs=1
FOTA Check Bit (0x0)
Load Partion idx = (4)
..............................done
Kernel read success from kernel partition
setKernelParam: setting param.serialnr=3930c0cf08x 0x159100ec
setKernelParam: setting param.board_rev=0x2
setKernelParam: setting param.cmdline=console=ttySAC1,115200 loglevel=4 version=Sbl(1.0.0) 2010-10-27 17:10:33
Starting kernel at 0x22000000...
moikop said:
Awesome. I think ttySAC1 is defined as s3c2410_serial1 in the kernel. And maybe you'll have to change SWITCH_SEL from the sbl console (from 65 to 6543).
I still don't understand why all I get this � weird character :/
Vcc connected to 3.3v, 150k ohm (though tried with 619k too) resistor and baud rate 115200 8N1, right?
Click to expand...
Click to collapse
Maybe something wrong with your level converter?
Also, if I decoded color codes of resistors correctly, I have 522k ohms connected between GND and ID pins (two 1M connected in parallel and additional 22k after them).
Edit: Would make sense, as according to http://forum.xda-developers.com/showthread.php?t=820275 it would be
Code:
RID_FM_BOOT_OFF_UART, /* 1 1 1 0 0 523K Factory Mode Boot OFF-UART */
tom3q said:
Maybe something wrong with your level converter?
Also, if I decoded color codes of resistors correctly, I have 522k ohms connected between GND and ID pins (two 1M connected in parallel and additional 22k after them).
Edit: Would make sense, as according to http://forum.xda-developers.com/showthread.php?t=820275 it would be
Code:
RID_FM_BOOT_OFF_UART, /* 1 1 1 0 0 523K Factory Mode Boot OFF-UART */
Click to expand...
Click to collapse
Tried with both, 522k & 523k (just in case) and still the same.. So it's gotta be my level converter... that's weird :S
moikop said:
Tried with both, 522k & 523k (just in case) and still the same.. So it's gotta be my level converter... that's weird :S
Click to expand...
Click to collapse
Just for reference, my level converter: http://translate.google.com/transla...unikacja-przez-usb---modul-em212.html&act=url
EDIT: Maybe we should create new topic for discussion on such things?
tom3q said:
Just for reference, my level converter: http://translate.google.com/transla...unikacja-przez-usb---modul-em212.html&act=url
EDIT: Maybe we should create new topic for discussion on such things?
Click to expand...
Click to collapse
You're right. So here it is.
I don't see why my level converter wouldn't work, since it supports the right voltage, baud rate, etc.
mmm, some weird idea: what's you're bootloader version? (I mean from which release). I'm thinking maybe the bootloader version is my problem? (since I have Samsungs latest installed)
moikop said:
You're right. So here it is.
I don't see why my level converter wouldn't work, since it supports the right voltage, baud rate, etc.
mmm, some weird idea: what's you're bootloader version? (I mean from which release). I'm thinking maybe the bootloader version is my problem? (since I have Samsungs latest installed)
Click to expand...
Click to collapse
I don't know the exact version as it was already on the phone as I got it. The only thing saying a bit about the version is its output:
Code:
Built for apollo rev02 by root on Oct 27 2010 17:10:33
Have you tried different baud rates? Common ones other than 115200 are 9600 and 38400.
Also this thread would become a bit more informative if all the posts on this topic would get moved here from OpenFIMG thread.
EDIT: Also make sure that ground signal is properly connected, otherwise the converter might not recognize voltage levels correctly. What's exactly your connection layout? I have only 4 lines wired to the microUSB connector, RX, TX, GND and ID with VCC left unconnected.
tom3q said:
I don't know the exact version as it was already on the phone as I got it. The only thing saying a bit about the version is its output:
Code:
Built for apollo rev02 by root on Oct 27 2010 17:10:33
Click to expand...
Click to collapse
mmm.. I have JPU, so my bootloader is at least from 2011..
tom3q said:
Have you tried different baud rates? Common ones other than 115200 are 9600 and 38400.
Click to expand...
Click to collapse
Tried with those 3. With 9600 and 38400 I don't get anything, when with 115200 I get the "?" character.
tom3q said:
Also this thread would become a bit more informative if all the posts on this topic would get moved here from OpenFIMG thread.
Click to expand...
Click to collapse
I'll contact a mod and see what can be done.
tom3q said:
EDIT: Also make sure that ground signal is properly connected, otherwise the converter might not recognize voltage levels correctly. What's exactly your connection layout? I have only 4 lines wired to the microUSB connector, RX, TX, GND and ID with VCC left unconnected.
Click to expand...
Click to collapse
Double checked my GND connection and is ok. My layout is the following:
VCC -> 3.3v
Tx & Rx with their corresponding pins.
ID connected to GND with 523k ohm in between
and GND connected to GND.
Could you try without VCC connected?
I really don't think that Samsung would disable bootloader console used in service centers for phone diagnostics...
tom3q said:
Could you try without VCC connected?
Click to expand...
Click to collapse
Exact same result.
With GND disconected also same result.
If Tx is disconnected there's no output (obviously). So a badly soldered/connected Pin2 can be discarded.
Checked Rx too, So a badly soldered/connected Pin3 can be discarded as well..
tom3q said:
I really don't think that Samsung would disable bootloader console used in service centers for phone diagnostics...
Click to expand...
Click to collapse
You must be right..
Edit: I changed pin2 & pin3 (now Pin2 is to Rx and Pin3 to Tx). Also connected GND (but left vcc disconnected as you) and got it working
Thanks for the help!
moikop said:
Edit: I changed pin2 & pin3 (now Pin2 is to Rx and Pin3 to Tx). Also connected GND (but left vcc disconnected as you) and got it working
Thanks for the help!
Click to expand...
Click to collapse
So what good is this that you are doing? Benefits etc.
And are we meant to be doing something similar to make phone work better?
Sent from the Persian Sphinx's private Galaxy
PersianSphinx said:
So what good is this that you are doing? Benefits etc.
And are we meant to be doing something similar to make phone work better?
Sent from the Persian Sphinx's private Galaxy
Click to expand...
Click to collapse
With this, we can get into the SBL console, get information about kernel panics (not yet) and this will help us debug kernel ports, drivers ports, etc.
And no. This would be useless for a normal user. Unless that (s)he wants to make a Download JIG (to get into download mode without having to use the three-button combo). In that case, a different resistor value (301k) is needed (and no level converter, of cource )
@PersianSphinx
This wud resurrect a hard bricked phone...this JTAG thing
Sent from my GT-I9100 using Tapatalk
Orr.Penn.18 said:
@PersianSphinx
This wud resurrect a hard bricked phone...this JTAG thing
Sent from my GT-I9100 using Tapatalk
Click to expand...
Click to collapse
This is not JTAG.
moikop said:
Edit: I changed pin2 & pin3 (now Pin2 is to Rx and Pin3 to Tx). Also connected GND (but left vcc disconnected as you) and got it working
Thanks for the help!
Click to expand...
Click to collapse
This is common fault people are doing - phone Rxd must be connected to converter Txd and vice versa.
Kernel output:
To get kernel output, all you need to do is:
Code:
setenv SWITCH_SEL 6543
And then boot normally from SBL.
To make this setting permanent:
Code:
setenv SWITCH_SEL 6543
saveenv
Result:
Code:
SBL> boot
setKernelParam: setting param.serialnr=3830f5ff08x 0xd44100ec
setKernelParam: setting param.board_rev=0x2
setKernelParam: setting param.cmdline=console=ttySAC1,115200 version=Sbl(1.0.0)2
Starting kernel at 0x22000000...
Uncompressing Linux.............................................................
<6>Initializing cgroup subsys cpu
<5>Linux version 2.6.32.9 ([email protected]) (gcc version 4.5.2 (Sourcery G++ Lite2
CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv6TEJ), cr=00c5387f
CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
Machine: GT-I5800
Memory policy: ECC disabled, Data cache writeback
<7>On node 0 totalpages: 65536
<7>free_area_init_node: node 0, pgdat c0aa7640, node_mem_map c0c3e000
<7> Normal zone: 512 pages used for memmap
<7> Normal zone: 0 pages reserved
<7> Normal zone: 65024 pages, LIFO batch:15
<7>On node 1 totalpages: 0
<7>free_area_init_node: node 1, pgdat c0aa7cf8, node_mem_map c0e47800
<4> Normal zone: 1 pages exceeds realsize 0
<7>On node 2 totalpages: 0
<7>free_area_init_node: node 2, pgdat c0aa83b0, node_mem_map c0e4f880
<4> Normal zone: 1 pages exceeds realsize 0
<7>On node 3 totalpages: 0
<7>free_area_init_node: node 3, pgdat c0aa8a68, node_mem_map c0e57900
<4> Normal zone: 1 pages exceeds realsize 0
CPU S5P6442 (id 0xababab00)
<7>s5p6442_init_clocks: initialising clocks
<6>S3C24XX Clocks, (c) 2004 Simtec Electronics
<7>s5p6442_setup_clocks: registering clocks
<6>mout_apll: source is fout_apll (1), rate is 667000000
<6>mout_epll: source is fout_epll (1), rate is 48000000
<6>mout_mpll: source is mpll (1), rate is 166000000
<6>mout_d0: source is mout_mpll (0), rate is 166000000
<6>mout_d1: source is mout_mpll (0), rate is 166000000
<6>mout_d0sync: source is mout_d0 (0), rate is 166000000
<6>mout_d1sync: source is mout_d1 (0), rate is 166000000
<6>mmc_bus: source is mout_mpll (6), rate is 83000000
<6>mmc_bus: source is mout_mpll (6), rate is 83000000
<6>mmc_bus: source is mout_mpll (6), rate is 83000000
<6>sclk_uart: source is mout_mpll (6), rate is 166000000
<6>sclk_uart: source is mout_mpll (6), rate is 166000000
<6>sclk_uart: source is mout_mpll (6), rate is 83000000
<6>spi-bus: source is mout_epll (7), rate is 48000000
<6>sclk_lcd: source is mout_mpll (6), rate is 166000000
<6>sclk_cam0: source is mout_mpll (6), rate is 166000000
<6>sclk_cam1: source is mout_mpll (6), rate is 166000000
<6>lclk_fimc: source is mout_mpll (6), rate is 166000000
<6>lclk_fimc: source is mout_mpll (6), rate is 166000000
<6>lclk_fimc: source is mout_mpll (6), rate is 166000000
<6>clk_g2d: source is mout_mpll (1), rate is 166000000
<6>i2sclk: source is i2smain_clk (0), rate is 48000000
<6>audss_hclk: source is i2smain_clk (0), rate is 48000000
<6>i2smain_clk: source is fout_epll (1), rate is 48000000
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 65024
<5>Kernel command line: console=ttySAC1,115200 version=Sbl(1.0.0) 2011-05-27 142
<6>PID hash table entries: 1024 (order: 0, 4096 bytes)
<6>Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
<6>Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
<6>Memory: 256MB = 256MB total
<5>Memory: 247040KB available (7488K code, 1639K data, 2972K init, 0K highmem)
<6>SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=4
<6>NR_IRQS:287
<7>s5p64xx_init_irq: initialising interrupts
<6>VIC @f4000000: id 0x00041192, vendor 0x41
<6>VIC @f4010000: id 0x00041192, vendor 0x41
<6>VIC @f4020000: id 0x00041192, vendor 0x41
<3>vic_pm_register: too few VICs, increase CONFIG_ARM_VIC_NR
Console: colour dummy device 80x30
s3c24xx_serial_initconsole
s3c24xx_serial_init_ports: initialising ports...
s3c24xx_serial_init_port: port=c0ad8a60, platdev=c0aabb10
s3c24xx_serial_init_port: c0ad8a60 (hw 0)...
...
moikop said:
To get kernel output, all you need to do is:
Code:
setenv SWITCH_SEL 6543
And then boot normally from SBL.
To make this setting permanent:
Code:
setenv SWITCH_SEL 6543
saveenv
Result:
Code:
SBL> boot
setKernelParam: setting param.serialnr=3830f5ff08x 0xd44100ec
setKernelParam: setting param.board_rev=0x2
setKernelParam: setting param.cmdline=console=ttySAC1,115200 version=Sbl(1.0.0)2
Starting kernel at 0x22000000...
Uncompressing Linux.............................................................
<6>Initializing cgroup subsys cpu
<5>Linux version 2.6.32.9 ([email protected]) (gcc version 4.5.2 (Sourcery G++ Lite2
CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv6TEJ), cr=00c5387f
CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
Machine: GT-I5800
Memory policy: ECC disabled, Data cache writeback
<7>On node 0 totalpages: 65536
<7>free_area_init_node: node 0, pgdat c0aa7640, node_mem_map c0c3e000
<7> Normal zone: 512 pages used for memmap
<7> Normal zone: 0 pages reserved
<7> Normal zone: 65024 pages, LIFO batch:15
<7>On node 1 totalpages: 0
<7>free_area_init_node: node 1, pgdat c0aa7cf8, node_mem_map c0e47800
<4> Normal zone: 1 pages exceeds realsize 0
<7>On node 2 totalpages: 0
<7>free_area_init_node: node 2, pgdat c0aa83b0, node_mem_map c0e4f880
<4> Normal zone: 1 pages exceeds realsize 0
<7>On node 3 totalpages: 0
<7>free_area_init_node: node 3, pgdat c0aa8a68, node_mem_map c0e57900
<4> Normal zone: 1 pages exceeds realsize 0
CPU S5P6442 (id 0xababab00)
<7>s5p6442_init_clocks: initialising clocks
<6>S3C24XX Clocks, (c) 2004 Simtec Electronics
<7>s5p6442_setup_clocks: registering clocks
<6>mout_apll: source is fout_apll (1), rate is 667000000
<6>mout_epll: source is fout_epll (1), rate is 48000000
<6>mout_mpll: source is mpll (1), rate is 166000000
<6>mout_d0: source is mout_mpll (0), rate is 166000000
<6>mout_d1: source is mout_mpll (0), rate is 166000000
<6>mout_d0sync: source is mout_d0 (0), rate is 166000000
<6>mout_d1sync: source is mout_d1 (0), rate is 166000000
<6>mmc_bus: source is mout_mpll (6), rate is 83000000
<6>mmc_bus: source is mout_mpll (6), rate is 83000000
<6>mmc_bus: source is mout_mpll (6), rate is 83000000
<6>sclk_uart: source is mout_mpll (6), rate is 166000000
<6>sclk_uart: source is mout_mpll (6), rate is 166000000
<6>sclk_uart: source is mout_mpll (6), rate is 83000000
<6>spi-bus: source is mout_epll (7), rate is 48000000
<6>sclk_lcd: source is mout_mpll (6), rate is 166000000
<6>sclk_cam0: source is mout_mpll (6), rate is 166000000
<6>sclk_cam1: source is mout_mpll (6), rate is 166000000
<6>lclk_fimc: source is mout_mpll (6), rate is 166000000
<6>lclk_fimc: source is mout_mpll (6), rate is 166000000
<6>lclk_fimc: source is mout_mpll (6), rate is 166000000
<6>clk_g2d: source is mout_mpll (1), rate is 166000000
<6>i2sclk: source is i2smain_clk (0), rate is 48000000
<6>audss_hclk: source is i2smain_clk (0), rate is 48000000
<6>i2smain_clk: source is fout_epll (1), rate is 48000000
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 65024
<5>Kernel command line: console=ttySAC1,115200 version=Sbl(1.0.0) 2011-05-27 142
<6>PID hash table entries: 1024 (order: 0, 4096 bytes)
<6>Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
<6>Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
<6>Memory: 256MB = 256MB total
<5>Memory: 247040KB available (7488K code, 1639K data, 2972K init, 0K highmem)
<6>SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=4
<6>NR_IRQS:287
<7>s5p64xx_init_irq: initialising interrupts
<6>VIC @f4000000: id 0x00041192, vendor 0x41
<6>VIC @f4010000: id 0x00041192, vendor 0x41
<6>VIC @f4020000: id 0x00041192, vendor 0x41
<3>vic_pm_register: too few VICs, increase CONFIG_ARM_VIC_NR
Console: colour dummy device 80x30
s3c24xx_serial_initconsole
s3c24xx_serial_init_ports: initialising ports...
s3c24xx_serial_init_port: port=c0ad8a60, platdev=c0aabb10
s3c24xx_serial_init_port: c0ad8a60 (hw 0)...
...
Click to expand...
Click to collapse
Yep, on Spica setenv SWITCH_SEL 3 is enough. According to SBL sources, bit 0 selects USB switch mode and bit 1 selects UART swtich mode.
Orr.Penn.18 said:
@PersianSphinx
This wud resurrect a hard bricked phone...this JTAG thing
Sent from my GT-I9100 using Tapatalk
Click to expand...
Click to collapse
this is not jtag.... this is UART...this gives us info on what went wrong when the phone dosnt boot up properly when devs are testing new things.
I just received my level converter and it's working fine, I can get SBL logs.
But how to access the SBL prompt ?
I tried with some key combinaison but nothing work :/

Test custom (zip) ROM on Android Emulator

Hi all,
As the title says, the question is how to test a custom rom (the zip file that you should flash on your device) on an Android emulator. I opened this thread because also if this is a common problem with several threads about it (also here on xda), there isn't a real answer, i.e. a working method. I think I'm close to the solution, but it still doesn't work. So, I decided to share here my knowledge with the hope that someone can help me. This method is only for Linux.
Initial setup
Download and open Android Studio. Go to Tools -> Android -> AVD Manager. Create a new device with the same specs of your device. This means that you should choose the same screen size/resolution and the right cpu architecture. Android Studio suggests to install x86 images, because the emulation is faster. Nowadays, the most common architecture on smartphones is armeabi-v7a, so choose this one. I'll use as example a device with Android 4.2 (armeabi-v7a).
Replace system.img
If you go into ~/Android/Sdk/system-images folder, you'll find the folders related to the images that you've installed previously (in the initial setup). In my case I have ~/Android/Sdk/system-images/android-17/google_apis/armeabi-v7a/ which contains system.img. The system.img is the system partition. It's an ext4 filesystem image that you can mount in a folder (i.e. it's a way to "extract" its content):
Code:
$ mkdir system
# mount -o loop system.img system
Now you can edit its content, e.g. replacing some files. When you've done, you can unmount the image with the following command:
Code:
# umount /absolute/path/to/the/system.img
Our goal is to replace the system.img file with the system.img of our custom rom. Unzip the custom rom. If you go into its folder, you'll see the system folder that we need to transform into system.img.
First of all, we should rename the original system.img file (the stock android image):
Code:
$ cd ~/Android/Sdk/system-images/android-17/google_apis/armeabi-v7a
$ mv system.img original_system.img
Now we'll create a new ext4 filesystem (with the same number of blocks) where we'll put the content of the system folder of our custom rom.
Code:
$ dd if=/dev/null of=system.img bs=1M seek=550
$ mkfs.ext4 -F system.img
$ mkdir custom_system
# mount -o loop system.img custom_system
# cp -r /path/to/our/custom/rom/system/* custom_system/
# chmod 755 -R custom_system/
# umount /absolute/path/to/system.img
Note that we are using seek=550, because if the original system.img has 140800 blocks with a total size of 576.7 MB, we need to allocate the same amount of space. In fact, also our (custom) system.img will have a size of 576.7 MB with the same number of blocks. The last command (umount) isn't mandatory, you can proceed keeping mounted the image.
Start the emulator
At this point we should execute the emulator hoping that our system.img is ok.
Run the emulator following this command (I've a 64 bit system):
Code:
$ LD_LIBRARY_PATH=~/Android/Sdk/tools/emulator/lib64 ~/Android/Sdk/tools/emulator/emulator64-arm -show-kernel -avd Name_of_your_avd
I defined LD_LIBRARY_PATH because otherwise it can't find the libraries for the gpu emulation, an alternative solution is to use -gpu off to disable gpu emulation. The -show-kernel parameter is useful to see if there is some problem while the device is booting, instead of -debug-all that is useful to see all the stuff related to the emulator itself and not to the operating system (Android).
-----------------
Small Off-Topic:
Note that on my Linux system to start the emulator for an x86 image I should use:
Code:
LD_PRELOAD="/usr/lib/libstdc++.so.6" ./emulator -avd Avd_Name
--------------
In my case, it seems there is some problem during the boot (black screen all the time). The kernel messages are:
Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0
Initializing cgroup subsys cpu
Linux version 3.4.67-01422-gd3ffcc7-dirty ([email protected]) (gcc version 4.8 (GCC) ) #1 PREEMPT Tue Sep 16 19:34:06 CEST 2014
CPU: ARMv7 Processor [410fc080] revision 0 (ARMv7), cr=10c53c7d
CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
Machine: Goldfish
Truncating RAM at 00000000-3fffffff to -2f7fffff (vmalloc region overlap).
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 193040
Kernel command line: qemu=1 androidboot.hardware=goldfish console=ttyS0 android.qemud=1 android.checkjni=1 qemu.gles=0
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 760MB = 760MB total
Memory: 748640k/748640k available, 29600k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
vmalloc : 0xf0000000 - 0xff000000 ( 240 MB)
lowmem : 0xc0000000 - 0xef800000 ( 760 MB)
.text : 0xc0008000 - 0xc0450618 (4386 kB)
.init : 0xc0451000 - 0xc0476000 ( 148 kB)
.data : 0xc0476000 - 0xc04af9c8 ( 231 kB)
.bss : 0xc04afa08 - 0xc05f9cb0 (1321 kB)
NR_IRQS:256
sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 4294967286ms
Console: colour dummy device 80x30
Calibrating delay loop... 410.41 BogoMIPS (lpj=2052096)
pid_max: default: 32768 minimum: 301
Security Framework initialized
SELinux: Initializing.
Mount-cache hash table entries: 512
Initializing cgroup subsys debug
Initializing cgroup subsys cpuacct
Initializing cgroup subsys freezer
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0x3628b0 - 0x362908
NET: Registered protocol family 16
bio: create slab <bio-0> at 0
Switching to clocksource goldfish_timer
NET: Registered protocol family 2
IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
TCP bind hash table entries: 65536 (order: 6, 262144 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
TCP: reno registered
UDP hash table entries: 512 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 512 (order: 1, 8192 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Trying to unpack rootfs image as initramfs...
Freeing initrd memory: 176K
goldfish_new_pdev goldfish_interrupt_controller at ff000000 irq -1
goldfish_new_pdev goldfish_device_bus at ff001000 irq 1
goldfish_new_pdev goldfish_timer at ff003000 irq 3
goldfish_new_pdev goldfish_rtc at ff010000 irq 10
goldfish_new_pdev goldfish_tty at ff002000 irq 4
goldfish_new_pdev goldfish_tty at ff011000 irq 11
goldfish_new_pdev smc91x at ff012000 irq 12
goldfish_new_pdev goldfish_fb at ff013000 irq 13
goldfish_new_pdev goldfish_audio at ff004000 irq 14
goldfish_new_pdev goldfish_mmc at ff005000 irq 15
goldfish_new_pdev goldfish-battery at ff014000 irq 16
goldfish_new_pdev goldfish_events at ff015000 irq 17
goldfish_new_pdev goldfish_nand at ff016000 irq -1
goldfish_new_pdev qemu_pipe at ff017000 irq 18
goldfish_pdev_worker registered goldfish_interrupt_controller
goldfish_pdev_worker registered goldfish_device_bus
goldfish_pdev_worker registered goldfish_timer
goldfish_pdev_worker registered goldfish_rtc
goldfish_pdev_worker registered goldfish_tty
goldfish_pdev_worker registered goldfish_tty
goldfish_pdev_worker registered smc91x
goldfish_pdev_worker registered goldfish_fb
goldfish_pdev_worker registered goldfish_audio
goldfish_pdev_worker registered goldfish_mmc
goldfish_pdev_worker registered goldfish-battery
goldfish_pdev_worker registered goldfish_events
goldfish_pdev_worker registered goldfish_nand
goldfish_pdev_worker registered qemu_pipe
audit: initializing netlink socket (disabled)
type=2000 audit(0.240:1): initialized
Installing knfsd (copyright (C) 1996 [email protected]).
fuse init (API version 7.18)
msgmni has been set to 1462
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
console [ttyS0] enabled
brd: module loaded
loop: module loaded
nbd: registered device at major 43
goldfish_audio_probe
goldfish nand dev0: size 22600000, page 512, extra 0, erase 0
goldfish nand dev1: size 80000000, page 512, extra 0, erase 0
goldfish nand dev2: size 4200000, page 512, extra 0, erase 0
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <[email protected]>
smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre <[email protected]>
eth0: SMC91C11xFD (rev 1) at fe012000 IRQ 12 [nowait]
eth0: Ethernet addr: 52:54:00:12:34:56
mousedev: PS/2 mouse device common for all mice
*** events probe ***
events_probe() addr=0xfe015000 irq=17
events_probe() keymap=qwerty2
input: qwerty2 as /devices/virtual/input/input0
goldfish_rtc goldfish_rtc: rtc core: registered goldfish_rtc as rtc0
device-mapper: uevent: version 1.0.3
device-mapper: ioctl: 4.22.0-ioctl (2011-10-19) initialised: [email protected]
ashmem: initialized
logger: created 256K log 'log_main'
logger: created 256K log 'log_events'
logger: created 256K log 'log_radio'
logger: created 256K log 'log_system'
Netfilter messages via NETLINK v0.30.
nf_conntrack version 0.5.0 (11700 buckets, 46800 max)
ctnetlink v0.93: registering with nfnetlink.
NF_TPROXY: Transparent proxy support initialized, version 4.1.0
NF_TPROXY: Copyright (c) 2006-2007 BalaBit IT Ltd.
xt_time: kernel timezone is -0000
ip_tables: (C) 2000-2006 Netfilter Core Team
arp_tables: (C) 2002 David S. Miller
TCP: cubic registered
NET: Registered protocol family 10
ip6_tables: (C) 2000-2006 Netfilter Core Team
IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
NET: Registered protocol family 15
8021q: 802.1Q VLAN Support v1.8
VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 0
mmc0: new SD card at address e118
goldfish_rtc goldfish_rtc: setting system clock to 2017-04-11 07:32:53 UTC (1491895973)
Freeing init memory: 148K
mmcblk0: mmc0:e118 SU02G 100 MiB
mmcblk0:
init (1): /proc/1/oom_adj is deprecated, please use /proc/1/oom_score_adj instead.
init: cannot open '/initlogo.rle'
yaffs: dev is 32505856 name is "mtdblock0" rw
yaffs: passed flags ""
yaffs: dev is 32505857 name is "mtdblock1" rw
yaffs: passed flags ""
yaffs: dev is 32505858 name is "mtdblock2" rw
yaffs: passed flags ""
fs_mgr: Warning: unknown flag voldmanaged=sdcard:auto
fs_mgr: Warning: unknown flag noemulatedsd
EXT4-fs (mtdblock0): mounted filesystem with ordered data mode. Opts: barrier=1
EXT4-fs (mtdblock1): recovery complete
EXT4-fs (mtdblock1): mounted filesystem with ordered data mode. Opts: nomblk_io_submit,errors=remount-ro
fs_mgr: Running /system/bin/e2fsck on /dev/block/mtdblock1
fs_mgr: Cannot run fs_mgr binary /system/bin/e2fsck
EXT4-fs (mtdblock1): mounted filesystem with ordered data mode. Opts: barrier=1,nomblk_io_submit
EXT4-fs (mtdblock2): recovery complete
EXT4-fs (mtdblock2): mounted filesystem with ordered data mode. Opts: nomblk_io_submit,errors=remount-ro
fs_mgr: Running /system/bin/e2fsck on /dev/block/mtdblock2
fs_mgr: Cannot run fs_mgr binary /system/bin/e2fsck
EXT4-fs (mtdblock2): mounted filesystem with ordered data mode. Opts: (null)
fs_mgr: Cannot mount filesystem on /devices/platform/goldfish_mmc.0* at auto
init: fs_mgr_mount_all returned an error
fs_mgr: Cannot mount filesystem on /dev/block/mtdblock2 at /cache
init: fs_mgr_mount_all returned an error
fs_mgr: Cannot mount filesystem on /dev/block/mtdblock1 at /data
init: fs_mgr_mount_all returned an error
init: cannot find '/system/bin/qemu-props', disabling 'qemu-props'
init: cannot find '/system/etc/install-recovery.sh', disabling 'flash_recovery'
init: cannot find '/system/bin/qemud', disabling 'qemud'
init: cannot execve('/system/etc/init.goldfish.sh'): No such file or directory
init: cannot find '/system/bin/sh', disabling 'console'
init: untracked pid 63 exited
warning: `rild' uses 32-bit capabilities (legacy support in use)
init: untracked pid 56 exited
init: untracked pid 99 exited
init: untracked pid 149 exited
...continue with endless processes termination...
Click to expand...
Click to collapse
I created the system.img from a custom rom for huawei u9508 based on Android 4.2.2. I hope this post could be useful.
Nrin said:
Hi all,
As the title says, the question is how to test a custom rom (the zip file that you should flash on your device) on an Android emulator. I opened this thread because also if this is a common problem with several threads about it (also here on xda), there isn't a real answer, i.e. a working method. I think I'm close to the solution, but it still doesn't work. So, I decided to share here my knowledge with the hope that someone can help me. This method is only for Linux.
Initial setup
Download and open Android Studio. Go to Tools -> Android -> AVD Manager. Create a new device with the same specs of your device. This means that you should choose the same screen size/resolution and the right cpu architecture. Android Studio suggests to install x86 images, because the emulation is faster. Nowadays, the most common architecture on smartphones is armeabi-v7a, so choose this one. I'll use as example a device with Android 4.2 (armeabi-v7a).
Replace system.img
If you go into ~/Android/Sdk/system-images folder, you'll find the folders related to the images that you've installed previously (in the initial setup). In my case I have ~/Android/Sdk/system-images/android-17/google_apis/armeabi-v7a/ which contains system.img. The system.img is the system partition. It's an ext4 filesystem image that you can mount in a folder (i.e. it's a way to "extract" its content):
Now you can edit its content, e.g. replacing some files. When you've done, you can unmount the image with the following command:
Our goal is to replace the system.img file with the system.img of our custom rom. Unzip the custom rom. If you go into its folder, you'll see the system folder that we need to transform into system.img.
First of all, we should rename the original system.img file (the stock android image):
Now we'll create a new ext4 filesystem (with the same number of blocks) where we'll put the content of the system folder of our custom rom.
Note that we are using seek=550, because if the original system.img has 140800 blocks with a total size of 576.7 MB, we need to allocate the same amount of space. In fact, also our (custom) system.img will have a size of 576.7 MB with the same number of blocks. The last command (umount) isn't mandatory, you can proceed keeping mounted the image.
Start the emulator
At this point we should execute the emulator hoping that our system.img is ok.
Run the emulator following this command (I've a 64 bit system):
I defined LD_LIBRARY_PATH because otherwise it can't find the libraries for the gpu emulation, an alternative solution is to use -gpu off to disable gpu emulation. The -show-kernel parameter is useful to see if there is some problem while the device is booting, instead of -debug-all that is useful to see all the stuff related to the emulator itself and not to the operating system (Android).
-----------------
Small Off-Topic:
Note that on my Linux system to start the emulator for an x86 image I should use:
--------------
In my case, it seems there is some problem during the boot (black screen all the time). The kernel messages are:
I created the system.img from a custom rom for huawei u9508 based on Android 4.2.2. I hope this post could be useful.
Click to expand...
Click to collapse
kernel is not work for your system.img

Lineage 14.1 Stable - Micromax Canvas 5 E481

Join this groups for roms and support...
Telegram:
https://t.me/teammaxmtk
Facebook:
https://m.facebook.com/groups/673560846179945?ref=bookmarks
Congrats to every canvas 5 user.
Don't forget to join the official whatsapp group of canvas 5.
https://chat.whatsapp.com/2YtWDoFzukZKthAUenMv74
Plz share the SS of the rom.
Big hit and Thanks to Arshjot singh and Harishwarrior bro... U two are the best dev... Give new soul to MMX CANVAS 5
..
sun75 said:
Hi,
after some debugging, I solved the compass problem (at least on the Wiko Fever 4G). If the Canvas has the same sensor, you have to put a /etc/init.d/30compass script as follow:
---CUT HERE
#!/system/bin/sh
# Adding Ecompass Daemon - By Sun75 @ XDA ####
su 0 setenforce 0
/system/bin/logwrapper /system/bin/akmd09911 &
##############################################
---CUT HERE
Make sure you have /xbin/su in your Rom, but in your's... there is!
Repack the Rom zip, and reflash it (you will lack Selinux permissions by adding with a Root explorer) with TWRP.
At next boot, your Msensord will fail starting the gsensor child daemon, but you will have the gsensor/compass daemon started as a separated daemon fixing the problem!
09-16 21:53:28.249 330 330 D MsensorDaemon: Msensor deamon statr!!!!!!!!!!!!
09-16 21:53:28.249 330 330 D MsensorDaemon: msensor demon start process detect demon name = akmd09911
09-16 21:53:28.249 330 330 D MsensorDaemon:
09-16 21:53:28.249 330 330 D MsensorDaemon: msensor demon start process detect demon prop = init.svc.akmd09911
09-16 21:53:28.249 330 330 D MsensorDaemon:
09-16 21:53:28.249 330 330 D MsensorDaemon: start_msensor_demon
09-16 21:53:28.500 330 330 D MsensorDaemon: do not USE_LIBC_SYSTEM_PROPERTIES
09-16 21:53:28.500 330 330 E MsensorDaemon: [99] ''
09-16 21:53:28.600 330 330 D MsensorDaemon: do not USE_LIBC_SYSTEM_PROPERTIES
09-16 21:53:28.601 330 330 E MsensorDaemon: [98] ''
09-16 21:53:28.701 330 330 D MsensorDaemon: do not USE_LIBC_SYSTEM_PROPERTIES
09-16 21:53:28.701 330 330 E MsensorDaemon: [97] ''
.....
09-16 21:53:38.324 330 330 E MsensorDaemon: [01] ''
09-16 21:53:38.424 330 330 D MsensorDaemon: do not USE_LIBC_SYSTEM_PROPERTIES
09-16 21:53:38.424 330 330 E MsensorDaemon: [00] ''
09-16 21:53:38.524 330 330 E MsensorDaemon: start daemon timeout!!
09-16 21:53:38.524 330 330 D MsensorDaemon: msensor demon start akmd09911 fail
09-16 21:53:38.524 330 330 D MsensorDaemon: Msensor deamon2 statr!!!!!!!!!!!!
09-16 21:53:38.525 330 330 D MsensorDaemon: open demon attr err = No such file or directory
-> and after:
09-16 21:53:29.396 448 448 I AKMD2 : AKMD 6D with Pseudo Gyro v20130531(Library for AK9911: v6.1.1.531) started.
09-16 21:53:29.396 448 448 I AKMD2 : Debug: ON
09-16 21:53:29.399 448 448 E AKMD2 : LoadPDC:106 fopen Error (No such file or directory).
Ignore the errors...
If your sensor is not the akm09911, you can find it yourself:
V:\Android\logs>adb shell cat /sys/bus/platform/drivers/msensor/chipinfo
akm09911 Chip
Ok, now open cpu-z or Mtk Engineering (Msensor data) and you will find your compass ready to use (and to calibrate!).
I have ported your all your RR Roms to Wiko Fever 4G fixing many problems, but not all:
- RR-N-v5.8.3-20170527-e481-Official -> VERY stable, compass and gps working, kernel 3.10.65 Stock, FM Radio and front flash NOT working
- RR-N-v5.8.4-20170903-E481-Release.zip -> instable, compass, FM Radio and gps working, kernel 3.10.65 Stock, front flash NOT working
- Resseruction Remix N 5.8.3 By Asfand.zip -> the MOST stable, compass and fm radio working, kernel 3.18.x (MM_V34 Stock), front flash AND gps NOT working. It's a pity that the kernel can not link /dev/stpgps and read /dev/ttyC2 (while it can on 3.10.x kernels!)... I reassembled the boot.img and edited the init.scripts many and many times trying everything... but, it's a no go, at least with the MM Kernel...
Ok, I think I have to open a new thread for the Wiko Fever releases, if you agree!
Click to expand...
Click to collapse
thank you so much , and please help us to fix front flash
Thanks in advance
Bro do you know how to make a volte patch?
--------- beginning of crash
09-17 11:46:21.913 302 302 F libc : CANNOT LINK EXECUTABLE "/system/bin/mtk_agpsd": cannot locate symbol "UCNV_TO_U_CALLBACK_STOP_53" referenced by "/system/bin/mtk_agpsd"...
09-17 11:46:21.913 302 302 F libc : Fatal signal 6 (SIGABRT), code -6 in tid 302 (mtk_agpsd)
09-17 11:46:21.975 336 336 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
09-17 11:46:21.975 336 336 F DEBUG : LineageOS Version: '14.1-20170527-OFFICIAL-E481'
09-17 11:46:21.975 336 336 F DEBUG : Build fingerprint: 'Micromax/lineage_E481/E481:7.1.2/N2G47O/29cf694e04:userdebug/test-keys'
09-17 11:46:21.975 336 336 F DEBUG : Revision: '0'
09-17 11:46:21.975 336 336 F DEBUG : ABI: 'arm'
09-17 11:46:21.975 336 336 F DEBUG : pid: 302, tid: 302, name: mtk_agpsd >>> /system/bin/mtk_agpsd <<<
09-17 11:46:21.975 336 336 F DEBUG : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
09-17 11:46:21.975 336 336 F DEBUG : r0 00000000 r1 0000012e r2 00000006 r3 00000008
09-17 11:46:21.975 336 336 F DEBUG : r4 f72e158c r5 00000006 r6 f72e1534 r7 0000010c
09-17 11:46:21.975 336 336 F DEBUG : r8 ff8502c8 r9 00000003 sl ff850300 fp f726f010
09-17 11:46:21.975 336 336 F DEBUG : ip 00000000 sp ff850260 lr f72c16a7 pc f72c209c cpsr 200f0010
09-17 11:46:22.197 336 336 F DEBUG :
09-17 11:46:22.197 336 336 F DEBUG : backtrace:
09-17 11:46:22.198 336 336 F DEBUG : #00 pc 0004609c /system/bin/linker (__dl_tgkill+12)
09-17 11:46:22.198 336 336 F DEBUG : #01 pc 000456a3 /system/bin/linker (__dl_pthread_kill+34)
09-17 11:46:22.198 336 336 F DEBUG : #02 pc 0003ded9 /system/bin/linker (__dl_raise+10)
09-17 11:46:22.198 336 336 F DEBUG : #03 pc 0003cb11 /system/bin/linker (__dl___libc_android_abort+34)
09-17 11:46:22.198 336 336 F DEBUG : #04 pc 0003bb14 /system/bin/linker (__dl_abort+4)
09-17 11:46:22.198 336 336 F DEBUG : #05 pc 0003da47 /system/bin/linker (__dl___libc_fatal+22)
09-17 11:46:22.198 336 336 F DEBUG : #06 pc 00009c43 /system/bin/linker (__dl__ZL29__linker_init_post_relocationR19KernelArgumentBlockj+3146)
09-17 11:46:22.198 336 336 F DEBUG : #07 pc 00008f63 /system/bin/linker (__dl___linker_init+358)
09-17 11:46:22.198 336 336 F DEBUG : #08 pc 000027c0 /system/bin/linker (_start+4)
Bro i got this
please help me
@sun75
Bravo! Have you opened the new thread for the Wiko Fever yet?
In other news, I have started work on a custom kernel based on the Wiko Fever MM source. I don't have much time to work on it though, so if anyone would like to help you can submit pull requests to the source here.
..
sun75 said:
I fixed LTE in build.prop, but I don't know how to to do a VoLTE patch: I'm not a developer, but a system engineer!
---------- Post added at 11:10 ---------- Previous post was at 10:56 ----------
I have already seen it:
just unpack the boot.img and edit the init.mt6735.rc. Diff format:
--- Line 21:
on init
+ export LD_SHIM_LIBS "/system/lib/libui.so|libshim_ui.so:/system/lib64/libui.so|libshim_ui.so:/system/lib/libgui.so|libshim_gui.so:/system/lib64/libgui.so|libshim_gui.so"
export USBOTG_STORAGE /storage/usbotg
mount tmpfs tmpfs /mnt/media_rw/ mode=0755,uid=1000,gid=1000
mkdir /mnt/media_rw/usbotg 0700 media_rw media_rw
mkdir /storage/usbotg 0700 root root
mount tmpfs tmpfs /storage/usbotg mode=0755,uid=1000,gid=1000
chmod 0666 /dev/kmsg
export USBOTG_STORAGE /storage/usbotg
-----
The export LD_ is ONE LINE!!
And:
---- Line 1286:
# GPS
service agpsd /system/bin/mtk_agpsd
class main
socket agpsd stream 660 gps system
socket agpsd2 stream 660 gps inet
socket agpsd3 stream 660 gps inet
user gps
group gps radio inet sdcard_r sdcard_rw misc
+ setenv LD_SHIM_LIBS "/system/bin/mtk_agpsd|libshim_agps.so"
service wifi2agps /system/bin/wifi2agps
--------
Repack the boot.img and reflash it with sp flash tool!
You have to make sure to have /system/[lib|lib64]/libshim_[agps|gui|ui].so
If you open with an hex editor libshim_agps.so you will find the symbol it'll search for!
---------- Post added at 11:37 ---------- Previous post was at 11:10 ----------
I'll open a Wiko Fever thread today, starting with this release: RR-N-v5.8.3-20170527-e481-Official -> RR-N-v5.8.3-20170527-l5460-Official.
Now I'm working on Stock Kernels only (they work on Stock images, they have to work on custom images... and, by the way, the 3.10.x custom based RR is working with the V39 Stock Kernel...): I miss the point on working with custom Kernels, the hardware is the same, what changes is only the OS layer. Please let me know your point of view, maybe in the Wiko thread, once opened. Thank you!
Click to expand...
Click to collapse
The main reasons for working on a custom kernel are:
To have a more up-to-date kernel (so with extra security and bug fixes)
To remove some unnecessary pre-installed bits making it smaller and therefore faster
Adding more tweaking options, such as custom governors, I/O schedulers, TCP congestion algorithms etc.
Add extra features, such as DT2W and Volte (looking at other android kernel sources helps with this)
Other tweaks and fixed if they come up and are needed
Besides, I'm a developer, and not a systems engineer
..
Thread Updated added TWRP 3.0.0 ported by Rick02
CrDROID and hexagon rom is on development
Hit the thank button
Gratitude
Really thankful to you man! Hats off:victory:
---------- Post added at 04:50 PM ---------- Previous post was at 04:47 PM ----------
Hope my heat issue resolves
Hello,
the Rom works fine and smoothly on my Wiko Fever 4g. The compass, front flash, UKW-Radio and Sim-Contacts are not working but I have restore the Contacts from Google.
When the display is on, it pulls up to 1.7 amps from the battery. I hope that there will be updates with bug fixes and security patches soon.
Otherwise good work.
NobodyDbg said:
Hello,
the Rom works fine and smoothly on my Wiko Fever 4g. The compass, front flash, UKW-Radio and Sim-Contacts are not working but I have restore the Contacts from Google.
When the display is on, it pulls up to 1.7 amps from the battery. I hope that there will be updates with bug fixes and security patches soon.
Otherwise good work.
Click to expand...
Click to collapse
i dont have wiko fever i only support mmx
sun75 will help you
Thanking
I would like to thanks XDA team . I have been waiting for months just for a single update for. MMX canvas 5 . Now this morning I found noighat for my phone . Thank you very much XDA team. Keep it on .
Rahul1436 said:
I would like to thanks XDA team . I have been waiting for months just for a single update for. MMX canvas 5 . Now this morning I found noighat for my phone . Thank you very much XDA team. Keep it on .
Click to expand...
Click to collapse
Thanks goes to Arshjot Singh
Hit the thanks button
Bug in Video playback
Harishwarrior said:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Lineage 14.1​
Arshjot singh made an another rom for Micromax Canvas 5.He puts his time ,Skills ,Effort and Brain on the line to make this awesome Rom.
Without wasting any further time. Lets get started.:fingers-crossed:
Requirements:
You must be in stock lollipop rom , whether it's Rooted or Non rooted
How to install :
1. Download and copy the Rom to your SD card.
2. Backup your Rom using TWRP recovery.
3. Format data and Wipe Factory reset your Phone.
4. Flash the Rom.
5. Change the language.
6. Go to developer option, and set the Animation to 0.5
7. Google apps are not included due to some reason. Go the Google apps link,and select ARM 64 as platform , 7.1 as android,pico as variant.download and flash the zip.
8. Dont install Google system webview otherwise your app will crash
Links:
Lineage 14.1 : https://drive.google.com/uc?id=0B9ToB3iQjd_-eWhuTU1tcnFod00&export=download
TWRP 2.8.7.0: https://forum.xda-developers.com/an...overy-twrp-2-8-7-0-micromax-canvas-5-t3641576
TWRP 3.0.0: https://forum.xda-developers.com/android/development/twrp-3-0-0-micromax-canvas-5-e481-t3677085
Google Apps : http://opengapps.org/
Bugs:
1. Front flash (Not necessary)the default camera app has Selfie flash option try that.
2.Compass (Useless) google maps works without Compass.
Heat Fix:
ONLY TRY THIS , IF YOU FACING HEATING ISSUE .Download and Open kernel Aduitor (Grant root permission)and Go to cpu , select apply on boot , Change the maximum frequency to 1040 Mhz .This will reduces the heat.
CREDITS::angel:
Thanks to
Arshjot singh for Lineage
Infinite4evr for TWRP 2.8.7.0
Rick02::fingers-crossed: for TWRP 3.0.0
Harishwarrior(Me) Moderator.
If you have any ideas or bug fix , Post it down.
This post will be updated Daily or Weekly.Stay tuned
Hit the thanks button......
Click to expand...
Click to collapse
Hello,
I assume that you have already observed bug in video playback issue with this rom.
Solution provided here is for high quality videos but the same can not work for low quality videos.
Is there any known fix for low quality video & formats like .3gpp ??
QUIZILLA said:
Hello,
I assume that you have already observed bug in video playback issue with this rom.
Solution provided here is for high quality videos but the same can not work for low quality videos.
Is there any known fix for low quality video & formats like .3gpp ??
Click to expand...
Click to collapse
Try SW Decoder or use stock video player(Gallery)

[PX5][Android 8.0+][MD725] Fix for MD725 Type 2 Bluetooth on Oreo

Hi everyone.
As people are aware, upgrading to Android 8.0 Oreo broke the functionality of Bluetooth for users with the MD725 Type 2 Bluetooth module. I have now found the driver file that will likely repair all lost Bluetooth functionality - the sdsdk file. This should also fix any external USB WiFi/Bluetooth devices that use the MD725 Type 2 module.
I have tested this on my MTCD HA unit running Hal9k's Oreo ROM and can confirm that the following features now work:
- A2DP
- Calling
- Call History
- Contact sync
Note: This fix requires root access.
Installation Instructions:
1. Download the attached sdsdk.zip file.
2. From the sdsdk.zip file, extract the "sdsdk" file.
4. Copy the sdsdk file to a USB drive or SD Card to be plugged into your headunit
5. Install a Root file explorer.
6. Copy the sdsdk file from your external storage device to the location:
Code:
/system/bin
7. Reboot your headunit.
The working sdsdk file is from the MTCD_HA_20170726 ROM provided by @f1x in their "Solution for the bluetooth echo v2":
https://forum.xda-developers.com/an...neral/px5-solution-bluetooth-echo-v2-t3661284
I hope that this fix works for you!
@Malaysk perhaps you can try to incorporate this fix in your rom if tested to work OK?
Sent from my G8141 using Tapatalk
The command "ps | grep sdsdk" just returns the line(s) containing sdsdk (grep command) from the running processes list (ps command). So I think that that step is not necessary.
Also where did you find a working sdsdk for android 8, substituting the one from android 6 was tried before and did not work.
Regardless I will try to flash my android 6 HU to HALK's Oreo to comfirm this working on a MTCD KGL (v2.83)
switchboy said:
The command "ps | grep sdsdk" just returns the line(s) containing sdsdk (grep command) from the running processes list (ps command). So I think that that step is not necessary.
Also where did you find a working sdsdk for android 8, substituting the one from android 6 was tried before and did not work.
Regardless I will try to flash my android 6 HU to HALK's Oreo to comfirm this working on a MTCD KGL (v2.83)
Click to expand...
Click to collapse
Okay, I've removed that part of the step. I had a feeling it wasn't necessary but left it in.
The working sdsdk is from the MTCD_HA_20170726 ROM, which was collected by @f1x for the "Bluetooth echo solution".
Thanks! Please reply with your results!
I am afraid it did not work for me. Added the files to 'system/bin/'
Gave the the file 777 permission just to be sure (read write execute)
Did a reboot, no luck
As you can see sdsdk is not running when I search for it with 'ps | grep sdsdk'
I added photographs of the situation.
This is a fresh upgrade to HALK's Oreo rom from Android 6.0 do i need to select the MD725 as my BT adapter somewhere? Because that might be causing my issues? I will check the factory setting later (although they should not have been touched and BT was working on android 6)
It will have to be another time though. It's getting cold now that it is dark and I don't want to burn petrol while waiting on the HU. Already used a bit too much battery power while waiting on the update process.
Edit:
OP, did you also install the libraries (.lib files) provided by f1x? That might be the reason why it did not work and sdsdk doesn't run on my system right now.
hello . i have mtcd px5 , MX , Bluetooth MD725 type 2 , i am now at malaysk rom 6 v7 , want to ask if this fix will work with me ? till now i didn't try android 8 because of Bluetooth problem ?
Have been playing around with this idea some more. First off I checked if for some reason the Bluetooth adapter in the factory settings was changed. So I double checked and it was still set to MD725. So that was not the reason why sdsdk is not running. Secondly I thought maybe sdsdk is missing other files it depends on to run so I went ahead and made sure I copied the .lib files and the .ini file from f1x to the right folders and made sure all of them were executable. After that I did a reboot of my device and nothing. The Bluetooth name and pin are not populated in the settings menu and the process sdsdk is still not in the running processes list. This could either mean:
- The process sdsdk isn't started by the system on boot and we need a way to start it manually
- The process sdsdk is started but crashes soon after being started because it is still missing dependencies
- The implementation of sdsdk is not compatible with android 8 anymore (which would mean the end of the line for this approach)
After these tests I was a bit disappointed and had ran out of time for today. I need some way to check if sdsdk is doing anything and if so what it is actually doing. So on a PC my next logical step will be to try and run the program manually from the command line and see if it spits out an error. If it does I might be able to solve the problem.
Because of digging work by f1x we know that the init.hct.rc script does contain the commands to start sdsdk: (so this makes the first scenario unlikely)
Code:
on property:bt.md725.type=1
start gocsdk
service gocsdk /system/bin/gocsdk
class main
user root
group root
disabled
seclabel u:r:shell:s0
on property:bt.md725.type=2
start sdsdk
service sdsdk /system/bin/sdsdk
class main
user root
group root
disabled
seclabel u:r:shell:s0
I think the second scenario is the most likely scenario and sdsdk is missing the right (versions) of other files the program depends on. So we need to figure out what those files are. Furtermore I think the simple terminal command '/system/bin/sdsdk' probably wont start the service in a way that is useful for the OS, however I am hoping it wil output a usefull error code. So that will be the fist thing I will try next time I got some spare time to play with the HU.
Unfortunately I am a bit of a Windows guy and hobby developer (with limited C++, PHP and Java knowledge) so my Linux knowledge is limited. I would love to be able to decompile sdsdk to see what it actually does that might make fixing this software mess a bit easier. At this point I am not expecting a manufacturer to do it for us. As for now I just making guesses why it doesn't work and I don't like that.
switchboy said:
- The process sdsdk is started but crashes soon after being started because it is still missing dependencies
Click to expand...
Click to collapse
You can test this by, first, running '/system/bin/sdsdk' in a terminal. Even if this step works, I would see the missing libraries by running 'ldd /system/bin/sdsdk'. The assumption in the 'ldd' step is that the binary gets libraries dynamically attached to it when it runs, as opposed to coming packaged with the binary.
Feel free to paste the output and I can help interpret it. I would do this myself, but at the rate at which I'm going, I won't get to it until next year
P.S. you may need to find a binary for ldd on Android. Termux has an ability to get such, just type in the command, and if it knows it can download a binary for a missing program, then it will tell you how to do it
I dont have acces to my headunit at the moment. The wife has taken the car for a drive. So I did the next best thing and used readelf on a ubuntu vm to try and find dependencies of the sdsdk binairy. Here is the raw output:
Code:
@Butterfly:~/Desktop$ readelf -And sdsdk
Dynamic section at offset 0xbe65c contains 33 entries:
Tag Type Name/Value
0x00000003 (PLTGOT) 0xbfd84
0x00000002 (PLTRELSZ) 1248 (bytes)
0x00000017 (JMPREL) 0x9bc0
0x00000014 (PLTREL) REL
0x00000011 (REL) 0x2cb0
0x00000012 (RELSZ) 28432 (bytes)
0x00000013 (RELENT) 8 (bytes)
0x6ffffffa (RELCOUNT) 3551
0x00000015 (DEBUG) 0x0
0x00000006 (SYMTAB) 0x148
0x0000000b (SYMENT) 16 (bytes)
0x00000005 (STRTAB) 0x1258
0x0000000a (STRSZ) 4590 (bytes)
0x00000004 (HASH) 0x2448
0x00000001 (NEEDED) Shared library: [libtinyalsa.so]
0x00000001 (NEEDED) Shared library: [libmedia.so]
0x00000001 (NEEDED) Shared library: [libutils.so]
0x00000001 (NEEDED) Shared library: [libbinder.so]
0x00000001 (NEEDED) Shared library: [liblog.so]
0x00000001 (NEEDED) Shared library: [libstdc++.so]
0x00000001 (NEEDED) Shared library: [libm.so]
0x00000001 (NEEDED) Shared library: [libc.so]
0x00000001 (NEEDED) Shared library: [libdl.so]
0x0000001a (FINI_ARRAY) 0xbc3b8
0x0000001c (FINI_ARRAYSZ) 8 (bytes)
0x00000019 (INIT_ARRAY) 0xbc3c0
0x0000001b (INIT_ARRAYSZ) 36 (bytes)
0x00000020 (PREINIT_ARRAY) 0xbc3e4
0x00000021 (PREINIT_ARRAYSZ) 0x8
0x00000016 (TEXTREL) 0x0
0x0000001e (FLAGS) TEXTREL BIND_NOW
0x6ffffffb (FLAGS_1) Flags: NOW
0x00000000 (NULL) 0x0
Displaying notes found in: .note.gnu.gold-version
Owner Data size Description
GNU 0x00000009 NT_GNU_GOLD_VERSION (gold version)
Version: gold 1.11
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "ARM v7"
Tag_CPU_arch: v7
Tag_CPU_arch_profile: Application
Tag_ARM_ISA_use: Yes
Tag_THUMB_ISA_use: Thumb-2
Tag_FP_arch: VFPv3
Tag_Advanced_SIMD_arch: NEONv1
Tag_ABI_PCS_GOT_use: GOT-indirect
Tag_ABI_PCS_wchar_t: 4
Tag_ABI_FP_denormal: Needed
Tag_ABI_FP_exceptions: Needed
Tag_ABI_FP_number_model: IEEE 754
Tag_ABI_align_needed: 8-byte
Tag_ABI_enum_size: int
Tag_ABI_HardFP_use: Deprecated
Tag_ABI_optimization_goals: Aggressive Speed
Tag_CPU_unaligned_access: v6
Tag_ABI_FP_16bit_format: IEEE 754
Tag_DIV_use: Not allowed
Tag_Virtualization_use: TrustZone
It would seem that the only libs this file depends on are the following:
Code:
0x00000001 (NEEDED) Shared library: [libtinyalsa.so]
0x00000001 (NEEDED) Shared library: [libmedia.so]
0x00000001 (NEEDED) Shared library: [libutils.so]
0x00000001 (NEEDED) Shared library: [libbinder.so]
0x00000001 (NEEDED) Shared library: [liblog.so]
0x00000001 (NEEDED) Shared library: [libstdc++.so]
0x00000001 (NEEDED) Shared library: [libm.so]
0x00000001 (NEEDED) Shared library: [libc.so]
0x00000001 (NEEDED) Shared library: [libdl.so]
So now we need the right version of these in /system/lib/ and it might work.
EDIT:
I also ran this command on gocsdk:
Code:
0x00000001 (NEEDED) Shared library: [libbinder.so]
0x00000001 (NEEDED) Shared library: [libmedia.so]
0x00000001 (NEEDED) Shared library: [libutils.so]
0x00000001 (NEEDED) Shared library: [liblog.so]
0x00000001 (NEEDED) Shared library: [libstdc++.so]
0x00000001 (NEEDED) Shared library: [libm.so]
0x00000001 (NEEDED) Shared library: [libc.so]
0x00000001 (NEEDED) Shared library: [libdl.so]
So it seems that libtinyalsa.so might be our missing file!
sdsdk needs it and gocsdk doesn't.
Edit 2:
Okay I've extracted the missing files from a recent android 6 ROM which had working BT on my unit. I've created an archive with all the files that I think are missing in android 8 in their respective folders. Copy and paste to the right folders on your unit and set permissions to 777 for each file (you'll need a root browser for this). I've hadn't had time to test it for myself but this will hopefully fix this mess.
Edit 3:
Well it seems that the missing files I gathered up aren't complete yet. I can comfirm that 'sdsdk' is indeed crashing because it is missing dependencies. Executing the file from terminal is generating this error message.
"CANNOT LINK EXECUTABLE 'sdsdk' has text relocations"
Sadly I am currently at a loss getting the name and paths out of 'sdsdk' with readelf.
Edit 4:
After more reading it would seem that google disabled text relocations for applications running in userland. So this error seems logical since I was running the terminal in userland .
Hello Switchboy, i did put the files in the locations as showed in youre zip file.
It does not work on my HU.
The sdsdk executable is currently not working because of text relocations which aren't allowed in Android in userland anymore. So we either need to find a way to run sdsdk outside userland or find an sdsdk executable without text relocations. A version from android 7 might work.
See attached logcat
switchboy said:
The sdsdk executable is currently not working because of text relocations which aren't allowed in Android in userland anymore. So we either need to find a way to run sdsdk outside userland or find an sdsdk executable without text relocations. A version from android 7 might work.
See attached logcat
Click to expand...
Click to collapse
Great detailed summary and investigation into the issue.
Thanks for taking the time and sharing with the forums.
Until these blobs are updated or other software solution is found, we may have found a supplier for genuine GOC-MD-725.
Update
Not deterred, I managed to find a version of sdsdk without text relocations. I actually just took it out of the Android 7 rom for PX3, figuring that support for text relocations in userland was dropped by then. It turns out, I was right. ‘readelf –d sdsdk’ did not show the dreaded ‘0x00000016 (TEXTREL) 0x0’ anymore.
Hooray!
Therefore, after checking the shared library list and not seeing any new libraries I went ahead and overwrote my old version of sdsdk with this one. I rebooted the device and… nothing.
After reviewing, the logcat to find out what went wrong the following error messages repeats a couple of times:
Code:
libc ( 1008): CANNOT LINK EXECUTABLE "/system/bin/sdsdk": cannot locate symbol "_ZN7android10AudioTrackC1E19audio_stream_type_tj14audio_format_tjj20audio_output_flags_tPFviPvS4_ES4_i15audio_session_tNS0_13transfer_typeEPK20audio_offload_info_tiiPK18audio_attributes_tbf" referenced by "/system/bin/sdsdk"...
11-19 14:46:00.787 F/libc ( 1008): Fatal signal 6 (SIGABRT), code -6 in tid 1008 (sdsdk)
11-19 14:46:00.829 F/DEBUG ( 1013): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
11-19 14:46:00.829 F/DEBUG ( 1013): Build fingerprint: 'Android/px5/px5:8.0.0/OPR5.170623.007/hct08091121:userdebug/test-keys'
11-19 14:46:00.829 F/DEBUG ( 1013): Revision: '0'
11-19 14:46:00.829 F/DEBUG ( 1013): ABI: 'arm'
11-19 14:46:00.829 F/DEBUG ( 1013): pid: 1008, tid: 1008, name: sdsdk >>> /system/bin/sdsdk <<<
11-19 14:46:00.829 F/DEBUG ( 1013): signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
11-19 14:46:00.830 F/DEBUG ( 1013): Abort message: 'CANNOT LINK EXECUTABLE "/system/bin/sdsdk": cannot locate symbol "_ZN7android10AudioTrackC1E19audio_stream_type_tj14audio_format_tjj20audio_output_flags_tPFviPvS4_ES4_i15audio_session_tNS0_13transfer_typeEPK20audio_offload_info_tiiPK18audio_attributes_tbf" referenced by "/system/bin/sdsdk"...'
11-19 14:46:00.830 F/DEBUG ( 1013): r0 00000000 r1 000003f0 r2 00000006 r3 00000008
11-19 14:46:00.830 F/DEBUG ( 1013): r4 000003f0 r5 000003f0 r6 ffe4d100 r7 0000010c
11-19 14:46:00.830 F/DEBUG ( 1013): r8 f70b0010 r9 ffe4d3a8 sl f70fcd90 fp ffe4e3b4
11-19 14:46:00.830 F/DEBUG ( 1013): ip 00000000 sp ffe4d0f0 lr f7164bc7 pc f716ede8 cpsr 200f0010
11-19 14:46:00.839 F/DEBUG ( 1013):
11-19 14:46:00.839 F/DEBUG ( 1013): backtrace:
11-19 14:46:00.839 F/DEBUG ( 1013): #00 pc 00066de8 /system/bin/linker (__dl_tgkill+12)
11-19 14:46:00.839 F/DEBUG ( 1013): #01 pc 0005cbc3 /system/bin/linker (__dl_abort+54)
11-19 14:46:00.839 F/DEBUG ( 1013): #02 pc 00018641 /system/bin/linker (__dl___libc_fatal+24)
11-19 14:46:00.839 F/DEBUG ( 1013): #03 pc 0000fcb5 /system/bin/linker (__dl___linker_init+1956)
11-19 14:46:00.839 F/DEBUG ( 1013): #04 pc 00014d50 /system/bin/linker (_start+4)
11-19 14:46:00.858 W/NativeCrashListener( 499): Couldn't find ProcessRecord for pid 1008
Therefore, I assume that one of the libs sdsdk is depended on were updated and now is not quite compatible anymore. I am a bit hesitant to start altering system audio libraries willy-nilly because then I might start to break the audio subsystem of the rom. So unless I can find a version of sdsdk that is compatible with the audio subsystem of android 8 we are stuck at the moment.
Since the MD725 type 2 is a chip used in a lot of BT dongles as well there must be a device out there currently running android Oreo. I cant think of any reason why an sdsdk ripped from such firmware would not work on our Oreo installment. We just have to find it.
I love your persistence!
Did you also copy over the associated libraries? Typically, one can copy over the entire web of libraries required by a specific binary, and use those only for such binary, while leaving the rest of the system libraries alone. However, such solution may make things work, but may break integrations that Android may have had.
If only we had the source code ........
Seems like https://source.android.com/reference/hal/structaudio__policy may references audio_offload_info_t.... I'll take a look. I might as well just scrape all the symbols to get a layout of what's calling what
If only we had the sourcecode of sdsdk I could debug it against current libraries rewrite it a bit and then compile a working version.
@switchboy I am really impressed with the level of debugging and research you went into! Thank you!!
It makes it more confusing that my BlueTooth works for around 30 minutes or so (or until I end a call) before my phone disconnects (but the HU still thinks it is connected).
marchnz said:
Great detailed summary and investigation into the issue.
Until these blobs are updated or other software solution is found, we may have found a supplier for genuine GOC-MD-725.
Click to expand...
Click to collapse
I am very interested in this supplier!
jimimatthews said:
@switchboy I am really impressed with the level of debugging and research you went into! Thank you!!
It makes it more confusing that my BlueTooth works for around 30 minutes or so (or until I end a call) before my phone disconnects (but the HU still thinks it is connected).
Click to expand...
Click to collapse
Could you by any chance upload the sdsdk which is in your bin folder on the hu? To double check if it is the same one from the OP.
jimimatthews said:
I am very interested in this supplier!
Click to expand...
Click to collapse
Check the md725 module 1 and 2 swap thread
I'm getting a similar issue with my Bluetooth.
A2DP, Call History and Contact Sync all work
but Calling does not work properly. People can hear me, but I cannot hear them through my speakers.
I'm using an AVIN PX5
MCU version: MTCE_GS_V2.94_3 Sep 13 2018 11:26:51
I'm wondering if any MCU updates are available to resolve this issue?

Categories

Resources