Debug uart doesn't work correctly with own IMG

I connected to Khadas Vim via USB to TTL Serial Cable. When I use this IMG I can read and write cmd via console. When I make own bould I can only read but I can’t send any cmd to board. How I can make IMG with rd and wr console?

Did you modify the source code? whta’s the changes?
The uart can work usually. Did you try to disconnect and reconnect the uart ?

I added Gapps only.I tryed to disconnect, reboot but it still doesn’t work.

Did you lunch the kvim-user and not kvim-user-debug when you build your source code? You need to lunch the kvim-user-debug or modify the default.prop

1 Like

Below you can see step by step how I made build.

  1. $ cd ~/khadas/mmallow
  2. $ source build/envsetup.sh
  3. $ lunch kvim-user-32
  4. $ make -j4 otapackage
    After that I run the board and uart doesn’t work correctly(I see messages but I can’t send cmd).
    After that I make next steps:
  5. $ cd ~/khadas/mmallow
  6. $ source build/envsetup.sh
  7. $ lunch kvim-userdebug-32
  8. $ make installclean
  9. $ make -j4 otapackage
    After that I run the board with new IMG but uart still only show messages.

I made repo status and I see one change in file core/clang/HOST_x86_common.mk

-  --sysroot=$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/sysroot
+  --sysroot=$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/sysroot \
+  -B$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/bin

You can get the value of ‘ro.debuggable’ when your device is running.

$ adb shell
$ getprop ro.debuggable

I make it, and I see:

shell@vim:/ $ getprop ro.debuggable
0

If you did that,the value ‘ro.debuggable’ is 1
You can verify the value ‘ro.debuggable’ in the file ‘out/target/product/kvim/root/default.prop’

I have seen this file. I see next:

#
# ADDITIONAL_DEFAULT_PROPERTIES
#
ro.opengles.version=131072
ro.secure=1
security.perf_harden=1
ro.allow.mock.location=0
ro.debuggable=1
ro.zygote=zygote32
dalvik.vm.image-dex2oat-Xms=64m
dalvik.vm.image-dex2oat-Xmx=64m
dalvik.vm.dex2oat-Xms=64m
dalvik.vm.dex2oat-Xmx=512m
ro.dalvik.vm.native.bridge=0
debug.atrace.tags.enableflags=0
persist.sys.usb.config=mtp,adb
#
# BOOTIMAGE_BUILD_PROPERTIES
#
ro.bootimage.build.date=Ср май 24 22:14:32 MSK 2017
ro.bootimage.build.date.utc=1495653272
ro.bootimage.build.fingerprint=Khadas/kvim/kvim:6.0.1/MHC19J/20170524:userdebug/test-keys

Why in this file I see ro.debuggable=1 but after I run IMG i see 0?

I’m sorry. It is a my mistake, i make build on virtualbox and move it to windows via shared folder. Before I copy the image i should mount folder but i forgot it. I use old image and didn’t see changes. After I run new image uart works good. Thank you!