You must distinguish two things:
1. Linux kernel
2. User-space, which might be Linux (Ubuntu or Debian ...) or Android
1. To test that you have FlexCAN support in your kernel, type in the command line:
In Linux: ifconfig -a
In Android: busybox ifconfig -a
In the list of network devices look for 'can0'.
If it is not there ...
Follow this guide: All Boards FlexCAN, which is for Linux user-space, but the kernel part is just the same.
Note: regarding your post above, do the 'menuconfig' on your PC - google building Linux kernel.
Note 2: there are 'special kernel boot arguments' might be required to enable FlexCAN - flexcan.
2. Now the user-space utilities ...
Linux user-space: follow this guide: All Boards FlexCAN
Android user-space: there are two options:
1) build the Linux utilities for Android (i.e. compile statically) and call them from your Java code as you would invoke any system command (I think it will require root access) - for reference: java - How to run terminal command in Android application? - Stack Overflow
2) Follow this developer: zhangjie201412/Flexcan · GitHub
that teaches us how to bridge between Java and native library in regard of FlexCAN. When you can successfully execute 'cansend' using his project, you will be able to extend this work referring to the Linux utilities.
But you should really start with the 'ifconfig -a', otherwise it will all be for nothing ...