Yes. In Fennec (and Fennec F-Droid), you can retrieve the profile path from privileged JavaScript (e.g., an extension/add-on) using the ProfD directory service key:
javascriptconst profilePath = Services.dirsvc.get("ProfD", Ci.nsIFile).path;
For Fennec F-Droid, this will return a path like:
text/data/data/org.mozilla.fennec_fdroid/files/mozilla/XXXXXXXX.default
(where XXXXXXXX is a random profile identifier).
Notes:
ProfD key works across Firefox platforms, including Fennec.Services module (import via ChromeUtils.import("resource://gre/modules/Services.jsm") in modern Firefox).Vibe can make mistakes. Check answers. Learn more