How do I get 4K image from Camera with Android

Hi, I am new to OpenCV and Android.

Recently I am studying Image Process with OpenCV with Android Phone.
I got some good resources about OpenCV through using google.

So, I can get an image(1920x1080) from the Camera with OpenCV.
and I convert the image from RGB to HSV.

but, I can not get 4K image from the Camera.
My Android Phone is “Samsung A90” and the Camera Support high resolution.
“4000x3000”, “3264x2448”, “3280x2464” and “3840x2160”.

if I change the source of OpenCV, I can get 4K image.

private void onEnterStartedState() {
    Log.d(TAG, "call onEnterStartedState");
    /* Connect camera */
    if (!connectCamera(getWidth(), getHeight())) {  //change to 3840, 2160

============

but I do not want to change the source.

Maybe, the Display Resolution of the Phone give some effect on the resolution.

If anyone has any solution, please let me know.

Best Regards
YS