[Xperia Z2 Android Development] twistedddx:
I have a few issues with this ROM vs basic rooted 23.5.A.1.291.

These features work on the basic rooted rom.

1)My car headunit connects to be a physical keyboard for the phone via bluetooth. This appears inside this rom under bluetooth settings for the connection as an input device.

In status bar of Android it offers to enabled physical keyboards but when I tap the notifications it takes me to settings and then force closes.

This also happens with the bluetooth connected and the notification offered if I go the long way Settings - > Language and input

logcat gives:

10-01 22:46:45.932 E/AndroidRuntime(11293): FATAL EXCEPTION: AsyncTask #1

10-01 22:46:45.932 E/AndroidRuntime(11293): Process: com.android.settings, PID: 11293

10-01 22:46:45.932 E/AndroidRuntime(11293): java.lang.RuntimeException: An error occurred while executing doInBackground()

10-01 22:46:45.932 E/AndroidRuntime(11293):	at android.os.AsyncTask$3.done(AsyncTask.java:309)

10-01 22:46:45.932 E/AndroidRuntime(11293):	at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)

10-01 22:46:45.932 E/AndroidRuntime(11293):	at java.util.concurrent.FutureTask.setException(FutureTask.java:223)

10-01 22:46:45.932 E/AndroidRuntime(11293):	at java.util.concurrent.FutureTask.run(FutureTask.java:242)

10-01 22:46:45.932 E/AndroidRuntime(11293):	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)

10-01 22:46:45.932 E/AndroidRuntime(11293):	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)

10-01 22:46:45.932 E/AndroidRuntime(11293):	at java.lang.Thread.run(Thread.java:818)

10-01 22:46:45.932 E/AndroidRuntime(11293): Caused by: java.lang.NoSuchMethodError: No virtual method getEnabledKeyboardLayoutsForInputDevice(Landroid/hardware/input/InputDeviceIdentifier;)[Ljava/lang/String; in class Landroid/hardware/input/InputManager; or its super classes (declaration of 'android.hardware.input.InputManager' appears in /system/framework/framework.jar)

10-01 22:46:45.932 E/AndroidRuntime(11293):	at com.android.settings.inputmethod.KeyboardLayoutDialogFragment$KeyboardLayoutLoader.loadInBackground(KeyboardLayoutDialogFragment.java)

10-01 22:46:45.932 E/AndroidRuntime(11293):	at com.android.settings.inputmethod.KeyboardLayoutDialogFragment$KeyboardLayoutLoader.loadInBackground(KeyboardLayoutDialogFragment.java)

10-01 22:46:45.932 E/AndroidRuntime(11293):	at android.content.AsyncTaskLoader.onLoadInBackground(AsyncTaskLoader.java:312)

10-01 22:46:45.932 E/AndroidRuntime(11293):	at android.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:69)

10-01 22:46:45.932 E/AndroidRuntime(11293):	at android.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:57)

10-01 22:46:45.932 E/AndroidRuntime(11293):	at android.os.AsyncTask$2.call(AsyncTask.java:295)

10-01 22:46:45.932 E/AndroidRuntime(11293):	at java.util.concurrent.FutureTask.run(FutureTask.java:237)

10-01 22:46:45.932 E/AndroidRuntime(11293):	... 3 more

10-01 22:46:45.934 D/ActivityManager(3512): New dropbox entry: com.android.settings, system_app_crash, cd7c5fce-d610-491e-9d95-289e0e11a729

10-01 22:46:45.934 W/ActivityManager(3512): Force finishing activity com.android.settings/.Settings$InputMethodAndLanguageSettingsActivity

2)Android Auto fails

It connects, but after the initial wizard when the video should display to the headunit the headunit shows a blank screen and the android device either shows a blank screen or appears to close Android Auto app(system icon at top disappears)

My noteworthy extracts of logcat:

10-01 22:36:31.103 W/ACodec (3048): do not know color format 0x7fa30c04 = 2141391876

10-01 22:36:31.103 W/ACodec (3048): do not know color format 0x7f000789 = 2130708361

10-01 22:36:31.104 E/OMX-VENC-720p(595): WARNING: Unsupported Color format [2130708361]

10-01 22:36:31.104 E/OMX-VENC-720p(595): C2D init is successful

10-01 22:36:31.105 E/OMX-VENC-720p(595): WARNING: Unsupported Color format [2130708361]

10-01 22:36:31.109 W/bt_hci_packet_fragmenter(6612): reassemble_and_dispatch complete l2cap packet received:l2cap full length 6 and hci length 14.

10-01 22:36:31.112 I/ACodec (3048): setupVideoEncoder succeeded

10-01 22:36:31.112 I/ExtendedACodec(3048): [OMX.qcom.video.encoder.avc] configure, AMessage : AMessage(what = 'conf', target = 1) = {

10-01 22:36:31.112 I/ExtendedACodec(3048): string mime = "video/avc"

10-01 22:36:31.112 I/ExtendedACodec(3048): int32_t frame-rate = 30

10-01 22:36:31.112 I/ExtendedACodec(3048): int32_t color-format = 2130708361

10-01 22:36:31.112 I/ExtendedACodec(3048): int32_t profile = 1

10-01 22:36:31.112 I/ExtendedACodec(3048): int32_t height = 480

10-01 22:36:31.112 I/ExtendedACodec(3048): int32_t width = 800

10-01 22:36:31.112 I/ExtendedACodec(3048): int32_t bitrate = 4000000

10-01 22:36:31.112 I/ExtendedACodec(3048): int32_t i-frame-interval = 8640000

10-01 22:36:31.112 I/ExtendedACodec(3048): int32_t level = 8192

10-01 22:36:31.112 I/ExtendedACodec(3048): int32_t video-output-protection = 0

10-01 22:36:31.112 I/ExtendedACodec(3048): int32_t encoder = 1

10-01 22:36:31.112 I/ExtendedACodec(3048): int32_t MediaCodec = 1

10-01 22:36:31.112 I/ExtendedACodec(3048): }

10-01 22:36:31.114 W/ACodec (3048): do not know color format 0x7f000789 = 2130708361

10-01 22:36:31.146 D/CAR.MEDIA(3048): encoder init done

10-01 22:36:31.146 D/CAR.VIDEO(3048): doHandleVideoFocusLoss

10-01 22:36:31.146 D/CAR.MEDIA(3048): stopEncoding

10-01 22:36:31.645 D/CAR.MEDIA(3048): quitting encoding

10-01 22:36:31.652 E/OMX-VENC-720p(595): VIDIOC_REQBUFS CAPTURE_MPLANE Failed

10-01 22:36:31.652 E/OMX-VENC-720p(595): VIDIOC_REQBUFS CAPTURE_MPLANE Failed

10-01 22:36:31.652 D/CAR.MEDIA(3048): MediaCodec format change

10-01 22:36:31.653 D/CAR.MEDIA(3048): codec config

10-01 22:36:31.653 D/CAR.VIDEO(3048): SPS parsed: SPS{profile=66, flags=128, level=31, pic_width=50, pic_height=30, vui_present=1, bitstream_restricted=1, max_num_reorder_frames=0, max_num_dec_frame_buffering=1, raw_bytes=000000016742801fda0320f6806d0a13500000000168ce06e2}

10-01 22:36:31.654 D/CAR.MEDIA(3048): encodingThread ends

10-01 22:36:31.660 W/GraphicBufferSource(595): Dropped back down to Loaded without Executing

10-01 22:36:32.836 W/VideoCapabilities(3820): Unrecognized profile 2130706433 for video/avc

10-01 22:36:32.843 W/AudioCapabilities(3820): Unsupported mime audio/alac

10-01 22:36:32.844 W/AudioCapabilities(3820): Unsupported mime audio/dsd

10-01 22:36:32.852 W/VideoCapabilities(3820): Unsupported mime video/divx

10-01 22:36:32.854 W/VideoCapabilities(3820): Unsupported mime video/divx311

10-01 22:36:32.856 W/VideoCapabilities(3820): Unsupported mime video/divx4

10-01 22:36:32.863 W/VideoCapabilities(3820): Unsupported mime video/mp4v-esdp

Full logcat:

http://wasteofcash.com/androidauto.txt

3)HDCP is disabled for unlocked phones which breaks Miracast.

I need change a few settings to make the unlocked/rooted phone support miracast

I had to modify /system/etc/wfdconfig.xml changing

<ContentProtection>

<Valid>1</Valid>

to:

<ContentProtection>

<Valid>0</Valid>

This allowed the cast to connect but then if I launched any app the cast would stop complaining about HDCP again.

To fix this I had to add the following to my /system/build.prop

persist.debug.wfd.appmonitoring=1