OK, attached is an example of the crashing if the RuntimePermission lib is not simply selected on the "Library Manager" tab (even though this project doesn't use it).
The attached sample is based on the pre-b4xpages example and before FileProvider class was an internal lib. Since I am using B4A 9.01, the file provider class is not internal, so it is included in this example. I don't know how easy it would be to modify an internal version of the class, but you need to be able to modofy it in order to remove reference to the runtimepermission lib. So, you might need to disable the internal file provider class on your PC if you can't edit it to do that modification.
The attached sample comments out the use of the RuntimePermision lib in the fileprovider class - so technically it should NOT be needed.
I then substituted my Javaobject code into the class to replace the rp.GetSafeDirDefaultExternal("shared") code - so again, technically the runtimepermission library should NOT be needed.
If you try running the attached project without the runtimepermission lib simply selected on the Library Manager tab in the IDE, the app will crash with the following log:
FATAL EXCEPTION: main
Process: b4a.example.fileprovider, PID: 21618
java.lang.RuntimeException: Unable to get provider android.support.v4.content.FileProvider: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.content.FileProvider" on path: DexPathList[[zip file "/data/app/b4a.example.fileprovider-Htg_YuHgyT5GYOMllrB8LQ==/base.apk"],nativeLibraryDirectories=[/data/app/b4a.example.fileprovider-Htg_YuHgyT5GYOMllrB8LQ==/lib/arm64, /system/lib64, /product/lib64]]
at android.app.ActivityThread.installProvider(ActivityThread.java:6988)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:6528)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6445)
at EdHooker_42b8453bf7df105343083f1377c32094be493c49.hook(Unknown Source:120)
at android.app.ActivityThread.access$1300(ActivityThread.java:219)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1859)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.content.FileProvider" on path: DexPathList[[zip file "/data/app/b4a.example.fileprovider-Htg_YuHgyT5GYOMllrB8LQ==/base.apk"],nativeLibraryDirectories=[/data/app/b4a.example.fileprovider-Htg_YuHgyT5GYOMllrB8LQ==/lib/arm64, /system/lib64, /product/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.app.AppComponentFactory.instantiateProvider(AppComponentFactory.java:147)
at android.app.ActivityThread.installProvider(ActivityThread.java:6972)
... 11 more
Force finishing activity b4a.example.fileprovider/.main
add tag=data_app_crash isTagEnabled=true flags=0x2
Showing crash dialog for package b4a.example.fileprovider u0
It looks like the runtimepermission lib contains/resolves some simple reference that is needed for the fileprovider class to work.
I wish there was a way to fix this error so that I truly won't need the runtimepermission lib which doubles the size of my app (my app is only 450k without the runtimepermission lib)