phhusson / treble_experimentations

Notes about tinkering with Android Project Treble
3.4k stars 660 forks source link

Lenovo Tab P12 Pro Wi-Fi (TB-Q706F) no Wi-Fi and no Audio #2075

Closed lss4 closed 2 years ago

lss4 commented 2 years ago

UPDATE: The issue has been resolved with the stuffs from this full ROM package. Now everything appears to be working, including Wi-Fi and Audio.

The following steps need to be done in fastbootd mode (you can manually enter it from Recovery, or use fastboot reboot fastboot command from bootloader.

  1. Get the current active slot by fastboot getvar current-slot
  2. Patch boot.img using Magisk and flash it to the current active slot. NOTE: If you don't use Magisk, you can just flash the unmodified boot.img to the currently active slot, but you may also need to patch vbmeta.img and maybe vbmeta_system.img (by changing the byte at offset 123 from 00h to 03h) and flash them (I recall you can do the patching from Magisk as well).
  3. Flash the super_5.img which is the /vendor.
  4. Flash the super_6.img which is the /odm (maybe optional).
  5. Finally flash the GSI of your choice as /system. Back up existing data and do a factory reset from recovery if come from stock ROM or a different (incompatible) GSI.

From my experience there's enough space in super so no need to erase or manually resize any logical partition beforehand.

Sadly that ROM package is the only known full ROM package for this newly released tablet at the time of writing, which makes recovering from issues a bit difficult.

BELOW IS THE ORIGINAL POST

Just tried flashing GSI on this tablet (TB-Q706F, Wi-Fi only version) after unlocking the bootloader. There are two key functionalities that don't work:

Most of the other functionalities work out-of-box (off-topic). Here are what I tested:

As for the issues, here are some logcats.

Wi-Fi related (turned out the HAL is not functional):

10-05 13:58:23.047  1189  1189 E android.hardware.wifi@1.0-service: Failed to access driver state control param No such file or directory, 2: No such file or directory
10-05 13:58:23.048  1189  1189 E android.hardware.wifi@1.0-service: Failed to load WiFi driver
10-05 13:58:23.048  1189  1189 E android.hardware.wifi@1.0-service: Failed to initialize firmware mode controller
10-05 13:58:23.048  1189  1189 E android.hardware.wifi@1.0-service: Wifi HAL start failed
10-05 13:58:23.049  1936  2544 E HalDevMgr: Cannot start IWifi: 9 ()
10-05 13:58:23.049  1936  2544 E WifiVendorHal: Failed to start vendor HAL
10-05 13:58:23.049  1936  2544 E WifiNative: Failed to start vendor HAL
10-05 13:58:23.049  1936  2544 E WifiNative: Failed to start Hal
10-05 13:58:23.049  1936  2544 E WifiClientModeManager: Failed to create ClientInterface. Sit in Idle
10-05 13:58:23.049  1936  2544 D WifiScanRequestProxy: Sending scan available broadcast: false
10-05 13:58:23.049  1936  2547 I WifiScanningService: Received a request to disable scanning, UID = 1000
10-05 13:58:23.049  1936  2547 I WifiScanningService: wifi driver unloaded
10-05 13:58:23.050  1936  2544 I WifiScanRequestProxy: Scanning is disabled
10-05 13:58:23.050  1936  2544 D WifiClientModeManager: received an invalid message: { when=-1s6ms what=2 arg1=2 target=com.android.wifi.x.com.android.internal.util.StateMachine$SmHandler }
10-05 13:58:23.051  1936  2544 E WifiNative: Could not get Iface object for interface null
10-05 13:58:23.051  1936  2544 D WifiController: STA disabled, return to DisabledState.
10-05 13:58:23.051  1936  2544 D WifiController: EnabledState.exit()
10-05 13:58:23.051  1936  2544 D WifiController: DisabledState.enter()
...
10-05 13:58:23.094  1936  2544 E WifiNative: Could not get Iface object for interface null
10-05 13:58:23.096  1936  2544 D HalDevMgr: canSupportIfaceCombo: ifaceCombo={0=1, 1=1}
10-05 13:58:23.096  1936  2544 D HalDevMgr: getAllChipInfo
10-05 13:58:23.097  1936  2544 D HalDevMgr: getChipIds=[]
10-05 13:58:23.097  1936  2544 E HalDevMgr: Should have at least 1 chip!

Some audio related errors:

10-05 13:58:15.113  1936  3720 I ActivityTaskManager: START u0 {act=android.intent.action.MAIN cmp=com.android.settings/.SubSettings (has extras)} from uid 1000
10-05 13:58:15.114  1936  2555 E AudioSystem: no strategy found for attributes { Content type: AUDIO_CONTENT_TYPE_SONIFICATION Usage: AUDIO_USAGE_ASSISTANCE_SONIFICATION Source: AUDIO_SOURCE_DEFAULT Flags: 0x800 Tags:  }
10-05 13:58:15.116  2278  3197 E AudioFlinger: createTrack() getOutputForAttr() return error -19 or invalid output handle
10-05 13:58:15.116  1936  2555 E IAudioFlinger: createTrack returned error -19
10-05 13:58:15.116  1936  2555 E AudioTrack: createTrack_l(0): AudioFlinger could not create track, status: -19 output 0
10-05 13:58:15.117  1936  2555 E SoundPool::Stream: play_l: error creating AudioTrack
10-05 13:58:15.117  1936  2555 D AudioTrack: gather(): no metrics gathered, track status=-19
10-05 13:58:15.124  1936  3720 W ActivityTaskManager: Tried to set launchTime (0) < mLastActivityLaunchTime (69238)
10-05 13:58:15.138  1936  3210 E AudioSystem-JNI: AudioSystem::listAudioPorts error -19
10-05 13:58:15.139  1936  3210 W AudioManager: updateAudioPortCache: listAudioPorts failed
10-05 13:58:15.139  3191  3191 D SettingsActivity: Starting onCreate
10-05 13:58:15.140  2785  2910 E AudioSystem-JNI: AudioSystem::listAudioPorts error -19
10-05 13:58:15.140  2785  2910 W AudioManager: updateAudioPortCache: listAudioPorts failed
10-05 13:58:15.140  2785  2910 E AudioSystem-JNI: AudioSystem::listAudioPorts error -19
10-05 13:58:15.140  2785  2910 W AudioManager: updateAudioPortCache: listAudioPorts failed

With these AudioSystem related appears all the time:

10-05 13:58:10.693  1936  3210 E AudioSystem-JNI: AudioSystem::listAudioPorts error -19
10-05 13:58:10.694  1936  3210 W AudioManager: updateAudioPortCache: listAudioPorts failed
10-05 13:58:10.697  2785  2910 E AudioSystem-JNI: AudioSystem::listAudioPorts error -19
10-05 13:58:10.697  2785  2910 W AudioManager: updateAudioPortCache: listAudioPorts failed
10-05 13:58:10.698  2785  2910 E AudioSystem-JNI: AudioSystem::listAudioPorts error -19
10-05 13:58:10.698  2785  2910 W AudioManager: updateAudioPortCache: listAudioPorts failed

The following logcats also appear and it seems to point to adsprpcd:

10-05 13:58:10.722  1598  1598 I adsprpcd: vendor/qcom/proprietary/adsprpc/src/rpcmem_android.c:159: rpcmem_init_internal: opened ION device fd 4, configured heap IDs: system (0x2000000), contig (0x400000), secure (0x200), secure flags (0x80080000)
10-05 13:58:10.722  1598  1598 I adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:2976: fastrpc_apps_user_init done with default domain:0 and &fastrpc_trace:0x6f01c0ef88
10-05 13:58:10.722  1598  1598 I adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:1312: remote_handle_open: Successfully opened handle 0x0 for '":;./\attachguestos on domain 0
10-05 13:58:10.722  1598  1598 E adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:2766: Error 0x200: apps_dev_init failed for domain 0, errno Transport endpoint is not connected
10-05 13:58:10.722  1598  1598 E adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:2864: Error 0x200: open_dev (-1) failed for domain 0 (errno Transport endpoint is not connected)
10-05 13:58:10.722  1598  1598 E adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:1315: Error 0x200: remote_handle_open failed for adsp_default_listener (errno Success)
10-05 13:58:10.723  1598  1598 I adsprpcd: vendor/qcom/proprietary/adsprpc/src/rpcmem_android.c:192: rpcmem_deinit_internal: closed ION fd 4
10-05 13:58:10.723  1598  1598 I adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:2911: fastrpc_apps_user_deinit done
10-05 13:58:10.725  1598  1598 E adsprpcd: vendor/qcom/proprietary/adsprpc/src/adsprpcd.c:47:adsp daemon will restart after 25ms...
10-05 13:58:10.726  1599  1599 I adsprpcd: vendor/qcom/proprietary/adsprpc/src/rpcmem_android.c:159: rpcmem_init_internal: opened ION device fd 4, configured heap IDs: system (0x2000000), contig (0x400000), secure (0x200), secure flags (0x80080000)
10-05 13:58:10.726  1599  1599 I adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:2976: fastrpc_apps_user_init done with default domain:0 and &fastrpc_trace:0x79fff93f88
10-05 13:58:10.726  1599  1599 I adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:1312: remote_handle_open: Successfully opened handle 0x0 for '":;./\createstaticpd:audiopd on domain 0
10-05 13:58:10.726  1599  1599 E ion     : ioctl c0044901 failed with code -1: Inappropriate ioctl for device
10-05 13:58:10.726  1599  1599 E adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:2766: Error 0x72: apps_dev_init failed for domain 0, errno Transport endpoint is not connected
10-05 13:58:10.726  1599  1599 E adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:2864: Error 0x72: open_dev (-1) failed for domain 0 (errno Transport endpoint is not connected)
10-05 13:58:10.727  1599  1599 E adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:1315: Error 0x72: remote_handle_open failed for adsp_default_listener (errno Success)
10-05 13:58:10.727  1599  1599 I adsprpcd: vendor/qcom/proprietary/adsprpc/src/rpcmem_android.c:192: rpcmem_deinit_internal: closed ION fd 4
10-05 13:58:10.727  1599  1599 I adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:2911: fastrpc_apps_user_deinit done
10-05 13:58:10.729  1599  1599 E adsprpcd: vendor/qcom/proprietary/adsprpc/src/adsprpcd.c:45:fastRPC device driver is disabled, retrying...
10-05 13:58:10.729  1599  1599 E adsprpcd: vendor/qcom/proprietary/adsprpc/src/adsprpcd.c:47:adsp daemon will restart after 25ms...
10-05 13:58:10.761  1598  1598 I adsprpcd: vendor/qcom/proprietary/adsprpc/src/rpcmem_android.c:159: rpcmem_init_internal: opened ION device fd 4, configured heap IDs: system (0x2000000), contig (0x400000), secure (0x200), secure flags (0x80080000)
10-05 13:58:10.762  1598  1598 I adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:2976: fastrpc_apps_user_init done with default domain:0 and &fastrpc_trace:0x6f01b59f88
10-05 13:58:10.762  1598  1598 I adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:1312: remote_handle_open: Successfully opened handle 0x0 for '":;./\attachguestos on domain 0
10-05 13:58:10.762  1598  1598 E adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:2766: Error 0x200: apps_dev_init failed for domain 0, errno Transport endpoint is not connected
10-05 13:58:10.762  1598  1598 E adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:2864: Error 0x200: open_dev (-1) failed for domain 0 (errno Transport endpoint is not connected)
10-05 13:58:10.762  1598  1598 E adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:1315: Error 0x200: remote_handle_open failed for adsp_default_listener (errno Success)
10-05 13:58:10.762  1598  1598 I adsprpcd: vendor/qcom/proprietary/adsprpc/src/rpcmem_android.c:192: rpcmem_deinit_internal: closed ION fd 4
10-05 13:58:10.762  1598  1598 I adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:2911: fastrpc_apps_user_deinit done
10-05 13:58:10.765  1598  1598 E adsprpcd: vendor/qcom/proprietary/adsprpc/src/adsprpcd.c:47:adsp daemon will restart after 25ms...
10-05 13:58:10.765  1599  1599 I adsprpcd: vendor/qcom/proprietary/adsprpc/src/rpcmem_android.c:159: rpcmem_init_internal: opened ION device fd 4, configured heap IDs: system (0x2000000), contig (0x400000), secure (0x200), secure flags (0x80080000)
10-05 13:58:10.765  1599  1599 I adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:2976: fastrpc_apps_user_init done with default domain:0 and &fastrpc_trace:0x7a000adf88
10-05 13:58:10.766  1599  1599 I adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:1312: remote_handle_open: Successfully opened handle 0x0 for '":;./\createstaticpd:audiopd on domain 0
10-05 13:58:10.766  1599  1599 E ion     : ioctl c0044901 failed with code -1: Inappropriate ioctl for device
10-05 13:58:10.766  1599  1599 E adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:2766: Error 0x72: apps_dev_init failed for domain 0, errno Transport endpoint is not connected
10-05 13:58:10.766  1599  1599 E adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:2864: Error 0x72: open_dev (-1) failed for domain 0 (errno Transport endpoint is not connected)
10-05 13:58:10.766  1599  1599 E adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:1315: Error 0x72: remote_handle_open failed for adsp_default_listener (errno Success)
10-05 13:58:10.766  1599  1599 I adsprpcd: vendor/qcom/proprietary/adsprpc/src/rpcmem_android.c:192: rpcmem_deinit_internal: closed ION fd 4
10-05 13:58:10.766  1599  1599 I adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:2911: fastrpc_apps_user_deinit done
10-05 13:58:10.768  1599  1599 E adsprpcd: vendor/qcom/proprietary/adsprpc/src/adsprpcd.c:45:fastRPC device driver is disabled, retrying...
10-05 13:58:10.768  1599  1599 E adsprpcd: vendor/qcom/proprietary/adsprpc/src/adsprpcd.c:47:adsp daemon will restart after 25ms...

The logcat I captured is flooded by the AudioSystem and adsprpcd snippets above and I couldn't find anything else that's relevant.

The issues don't seem to be caused by GSI, as I tested several GSIs and they all have the issues: phh-AOSP v313, phh-AOSP v400.c, DotOS 5.2.

The device was updated via OTA once to ZUI 13.0.437 before unlocking and trying the GSI. I don't know if the slot I'm currently on matters for GSI (as I'm currently on slot B due to that OTA update). I can access my /vendor partition so if there are anything you need to look at I can try retrieving it.

lss4 commented 2 years ago

Some additional information:

phhusson commented 2 years ago

Is this a Google certified device? Can you try v409.c vndklite? It's a modem-less device right?

You're on stock OEM unmodified vendor and kernel and no magisk?

For audio, send dumpsys media.audio_policy And vendor/etc/audio folder On November 13, 2021 5:16:13 PM GMT+01:00, "L.S.S." < @.***> wrote:

Just tried flashing GSI on this tablet (TB-Q706F, Wi-Fi only version) after unlocking the bootloader. There are two key functionalities that don't work:

  • Wi-Fi (Cannot be turned on at all.)
  • Audio (No sound at all. Even alternate audio policy doesn't work.)

Most of the other functionalities work out-of-box (off-topic). Here are what I tested:

  • Camera (both sides)
  • Fingerprint Sensor
  • 120Hz refresh rate
  • Bluetooth (Lenovo Precision Pen works)
  • Physical Keyboard

As for the issues, here are some logcats.

Audio related (appears all the time):

10-05 13:58:10.693 1936 3210 E AudioSystem-JNI: AudioSystem::listAudioPorts error -19 10-05 13:58:10.694 1936 3210 W AudioManager: updateAudioPortCache: listAudioPorts failed 10-05 13:58:10.697 2785 2910 E AudioSystem-JNI: AudioSystem::listAudioPorts error -19 10-05 13:58:10.697 2785 2910 W AudioManager: updateAudioPortCache: listAudioPorts failed 10-05 13:58:10.698 2785 2910 E AudioSystem-JNI: AudioSystem::listAudioPorts error -19 10-05 13:58:10.698 2785 2910 W AudioManager: updateAudioPortCache: listAudioPorts failed

Wi-Fi related (appears when I first tried to turn it on):

10-05 13:58:10.722 1598 1598 I adsprpcd: vendor/qcom/proprietary/adsprpc/src/rpcmem_android.c:159: rpcmem_init_internal: opened ION device fd 4, configured heap IDs: system (0x2000000), contig (0x400000), secure (0x200), secure flags (0x80080000) 10-05 13:58:10.722 1598 1598 I adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:2976: fastrpc_apps_user_init done with default domain:0 and &fastrpc_trace:0x6f01c0ef88 10-05 13:58:10.722 1598 1598 I adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:1312: remote_handle_open: Successfully opened handle 0x0 for '":;./\attachguestos on domain 0 10-05 13:58:10.722 1598 1598 E adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:2766: Error 0x200: apps_dev_init failed for domain 0, errno Transport endpoint is not connected 10-05 13:58:10.722 1598 1598 E adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:2864: Error 0x200: open_dev (-1) failed for domain 0 (errno Transport endpoint is not connected) 10-05 13:58:10.722 1598 1598 E adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:1315: Error 0x200: remote_handle_open failed for adsp_default_listener (errno Success) 10-05 13:58:10.723 1598 1598 I adsprpcd: vendor/qcom/proprietary/adsprpc/src/rpcmem_android.c:192: rpcmem_deinit_internal: closed ION fd 4 10-05 13:58:10.723 1598 1598 I adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:2911: fastrpc_apps_user_deinit done 10-05 13:58:10.725 1598 1598 E adsprpcd: vendor/qcom/proprietary/adsprpc/src/adsprpcd.c:47:adsp daemon will restart after 25ms... 10-05 13:58:10.726 1599 1599 I adsprpcd: vendor/qcom/proprietary/adsprpc/src/rpcmem_android.c:159: rpcmem_init_internal: opened ION device fd 4, configured heap IDs: system (0x2000000), contig (0x400000), secure (0x200), secure flags (0x80080000) 10-05 13:58:10.726 1599 1599 I adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:2976: fastrpc_apps_user_init done with default domain:0 and &fastrpc_trace:0x79fff93f88 10-05 13:58:10.726 1599 1599 I adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:1312: remote_handle_open: Successfully opened handle 0x0 for '":;./\createstaticpd:audiopd on domain 0 10-05 13:58:10.726 1599 1599 E ion : ioctl c0044901 failed with code -1: Inappropriate ioctl for device 10-05 13:58:10.726 1599 1599 E adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:2766: Error 0x72: apps_dev_init failed for domain 0, errno Transport endpoint is not connected 10-05 13:58:10.726 1599 1599 E adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:2864: Error 0x72: open_dev (-1) failed for domain 0 (errno Transport endpoint is not connected) 10-05 13:58:10.727 1599 1599 E adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:1315: Error 0x72: remote_handle_open failed for adsp_default_listener (errno Success) 10-05 13:58:10.727 1599 1599 I adsprpcd: vendor/qcom/proprietary/adsprpc/src/rpcmem_android.c:192: rpcmem_deinit_internal: closed ION fd 4 10-05 13:58:10.727 1599 1599 I adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:2911: fastrpc_apps_user_deinit done 10-05 13:58:10.729 1599 1599 E adsprpcd: vendor/qcom/proprietary/adsprpc/src/adsprpcd.c:45:fastRPC device driver is disabled, retrying... 10-05 13:58:10.729 1599 1599 E adsprpcd: vendor/qcom/proprietary/adsprpc/src/adsprpcd.c:47:adsp daemon will restart after 25ms... 10-05 13:58:10.761 1598 1598 I adsprpcd: vendor/qcom/proprietary/adsprpc/src/rpcmem_android.c:159: rpcmem_init_internal: opened ION device fd 4, configured heap IDs: system (0x2000000), contig (0x400000), secure (0x200), secure flags (0x80080000) 10-05 13:58:10.762 1598 1598 I adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:2976: fastrpc_apps_user_init done with default domain:0 and &fastrpc_trace:0x6f01b59f88 10-05 13:58:10.762 1598 1598 I adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:1312: remote_handle_open: Successfully opened handle 0x0 for '":;./\attachguestos on domain 0 10-05 13:58:10.762 1598 1598 E adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:2766: Error 0x200: apps_dev_init failed for domain 0, errno Transport endpoint is not connected 10-05 13:58:10.762 1598 1598 E adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:2864: Error 0x200: open_dev (-1) failed for domain 0 (errno Transport endpoint is not connected) 10-05 13:58:10.762 1598 1598 E adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:1315: Error 0x200: remote_handle_open failed for adsp_default_listener (errno Success) 10-05 13:58:10.762 1598 1598 I adsprpcd: vendor/qcom/proprietary/adsprpc/src/rpcmem_android.c:192: rpcmem_deinit_internal: closed ION fd 4 10-05 13:58:10.762 1598 1598 I adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:2911: fastrpc_apps_user_deinit done 10-05 13:58:10.765 1598 1598 E adsprpcd: vendor/qcom/proprietary/adsprpc/src/adsprpcd.c:47:adsp daemon will restart after 25ms... 10-05 13:58:10.765 1599 1599 I adsprpcd: vendor/qcom/proprietary/adsprpc/src/rpcmem_android.c:159: rpcmem_init_internal: opened ION device fd 4, configured heap IDs: system (0x2000000), contig (0x400000), secure (0x200), secure flags (0x80080000) 10-05 13:58:10.765 1599 1599 I adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:2976: fastrpc_apps_user_init done with default domain:0 and &fastrpc_trace:0x7a000adf88 10-05 13:58:10.766 1599 1599 I adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:1312: remote_handle_open: Successfully opened handle 0x0 for '":;./\createstaticpd:audiopd on domain 0 10-05 13:58:10.766 1599 1599 E ion : ioctl c0044901 failed with code -1: Inappropriate ioctl for device 10-05 13:58:10.766 1599 1599 E adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:2766: Error 0x72: apps_dev_init failed for domain 0, errno Transport endpoint is not connected 10-05 13:58:10.766 1599 1599 E adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:2864: Error 0x72: open_dev (-1) failed for domain 0 (errno Transport endpoint is not connected) 10-05 13:58:10.766 1599 1599 E adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:1315: Error 0x72: remote_handle_open failed for adsp_default_listener (errno Success) 10-05 13:58:10.766 1599 1599 I adsprpcd: vendor/qcom/proprietary/adsprpc/src/rpcmem_android.c:192: rpcmem_deinit_internal: closed ION fd 4 10-05 13:58:10.766 1599 1599 I adsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:2911: fastrpc_apps_user_deinit done 10-05 13:58:10.768 1599 1599 E adsprpcd: vendor/qcom/proprietary/adsprpc/src/adsprpcd.c:45:fastRPC device driver is disabled, retrying... 10-05 13:58:10.768 1599 1599 E adsprpcd: vendor/qcom/proprietary/adsprpc/src/adsprpcd.c:47:adsp daemon will restart after 25ms...

The logcat I captured is flooded by the snippets above and I couldn't find anything else that's relevant.

The issues don't seem to be caused by GSI, as I tested several GSIs and they all have the issues: phh-AOSP v313, phh-AOSP v400.c, DotOS 5.2.

The device was updated via OTA once to ZUI 13.0.437 before unlocking and trying the GSI. I don't know if the slot I'm currently on matters for GSI (as I'm currently on slot B due to that OTA update). I can access my /vendor partition so if there are anything you need to look at I can try retrieving it.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/phhusson/treble_experimentations/issues/2075, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAA4OVKB2YOOFVQ7WWRFDDUL2FM3ANCNFSM5H6ZGGDA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

lss4 commented 2 years ago

Is this a Google certified device?

I'm not sure, but technically yes as the stock ROM (ZUI) came with GMS.

Can you try v409.c vndklite? It's a modem-less device right?

Does vndklite or not matter for devices without modem (Wi-Fi only)?

Actually all Android 11 GSIs I have tested are non-vndklite ones. v400.c (vndlkite) boots fine on this device. I'm currently on v313 (non-vndklite).

You're on stock OEM unmodified vendor and kernel and no magisk?

The vendor is not modified, but I used a Magisk patched boot.img. The boot.img is from a different version (as I don't have the full OTA package of the updated ZUI version), but it worked fine on stock.

I suppose I need to additionally patch vbmeta if I use GSI without Magisk, but again, as I don't have the full OTA package for the stock FW version the device was on... not sure about any potential side effects. vbmeta patching is not needed when using Magisk (at least that's the case with my other devices).

Back then with Galaxy Tab S7+ I always use the patched vbmeta for the stock FW version I'm on as instructed (so it'll work with or without Magisk), since I can always obtain the full stock FW package. So for this device, I wouldn't dare trying non-Magisk scenario unless I can get an up-to-date factory (full) image.

There were some hints on how to construct such a query to Lenovo's firmware update servers (to get full OTA package), but it looks a bit outdated and I wasn't able to get it working.

For audio, send dumpsys media.audio_policy And vendor/etc/audio folder

phhgsi_arm64_ab:/ $ dumpsys media.audio_policy
AudioPolicyManager: 0x0
Command Thread: 0xb4000078bc1937f0
Supported System Usages:
AudioCommandThread 0xb4000078bc1937f0 Dump
- Commands:
Command Time        Wait pParam
Last Command
none
Allow playback capture log:
No package manager
Package manager errors: 0

As for /vendor/etc/audio, it seems to be only visible when "Use alternate audio policy" is active. Otherwise that folder is empty.

I'm uploading all the files I could find in /vendor/etc that seems to be relevant to audio including this one (that would be both sets of policies as well as some other stuffs). I sincerely hope that I don't have to "Use alternate audio policy" for every single Qualcomm devices from now on... audio-related-stuffs.tar.gz

lss4 commented 2 years ago

Correcting some mistakes I just realized:

  1. adsprpcd related issues are more about Audio than WiFi. There are some WiFi related snippets but very few, as from the logcat the WiFi part (of the HAL) failed very early. I still need to investigate as it might has something to do with the kernel image I'm currently using (a boot.img from the only ROM dump I could find which is a different stock FW build, patched with Magisk myself), but without a proper full OTA package of my current stock FW I don't think I can do anything. After all, the device came out only very recently.
  2. Turned out the v400.c version I tried was a vndklite version. But still, I'm using non-vndklite ones for Android 11 GSIs (including v313).
lss4 commented 2 years ago

Another update. I made a riskier move this time. Before doing so, thanks to phh-AOSP's built-in su I'm able to dump some partitions (namely system_ext, product, vendor, odm, as well as the boot.img on inactive slot A) in case something went wrong.

From the full ROM package I found, I'm able to get the images for some other partitions, although they're named as something like super_1.img, super_2.img so I have to manually mount them to figure out which partition each image is. This time I flashed vendor and odm from that package, and with DotOS 5.2 everything works now (including Wi-Fi and Audio)! Guess the issue turned out to be mainly an inconsistency with the kernel and the vendor somehow. There's a little catch, though, that the default font size is much smaller than before (but not to the point of being unreadable).

PS: I hand-patched vbmeta and vbmeta_system from that package and flashed them as well, just in case, but it seems to have broken the encryption so I ended up reformatting /data.

Closing the issue and I'm updating the OP to reflect this new discovery. Will experiment a bit further.