How to change android kernel config?

I use vim3, Has anyone changed the vim3 android pie kernel config.
such as,i want enable /dev/mem

I change the .config file in out/target/product/kvim3/obj/KERNEL_OBJ
but it will lost configs i changed when compile
Can anyone give some help? best regards, thanks

same problem when config ubuntu。。。

You need to change the config on path common

diff --git a/arch/arm/configs/kvim_a32_defconfig b/arch/arm/configs/kvim_a32_defconfig
index 3b6bf28..f97f884 100644
--- a/arch/arm/configs/kvim_a32_defconfig
+++ b/arch/arm/configs/kvim_a32_defconfig
@@ -468,7 +468,7 @@ CONFIG_INPUT_UINPUT=y
-# CONFIG_DEVMEM is not set
 # CONFIG_DEVKMEM is not set
 # CONFIG_DEVPORT is not set

What is your problem?