How to load custom jars in system_ext to SYSTEMSERVERCLASSPATH in android


So I have my custom jar which is present in system_ext, but android framework does not call this jar since it is not present in systemserverclasspath and therefore it throws a class not found exception, however it works correctly if placed in system partition, My concern is that vendor jars must not be placed in system partitions and therefore please help me how to load it correctly, i tried using systemserverclasspath_fragments but that did not help

edit: This is about my custom country code Jar that needs to be called by framework, not use the default framework one,

This is the exact error which is present: "Could not instantiate the custom country detector class" https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/services/core/java/com/android/server/CountryDetectorService.java;l=237 After modifying the code to print the exception, it was class not found exception,

So if i want framework to call my jar instead of the default one, while my custom jar being present in system_ext partition, how do i update the systemserverclasspath to call it?

0
Jul 11 at 2:18 PM
User AvatarPrabhanjan
#java#android

No answer found for this question yet.