Class FozaExternalMethodObserverManager

java.lang.Object
lu.die.fozacompatibility.FozaExternalMethodObserverManager

public class FozaExternalMethodObserverManager extends Object
Version:
1.0
Author:
king@62v.net
  • Constructor Details

    • FozaExternalMethodObserverManager

      public FozaExternalMethodObserverManager()
  • Method Details

    • redirectPath

      @Deprecated public static void redirectPath(String origin, String newPath)
      Deprecated.
      For cpu architecture compatible purpose, please do not use this method.
      Parameters:
      origin - Origin path like /data/user/0/[package]
      newPath - New path, origin path will be redirect by the seccomp.
    • whiteListPath

      @Deprecated public static void whiteListPath(String origin)
      Deprecated.
      Add a specific path which won't be redirected,
      Parameters:
      origin - path to be white listed, like /dev/null
    • registerProcessTypeCallback

      public static void registerProcessTypeCallback(IProcessCallback callback)
      Register a process type callback, you can detect if you are running in the host process or the container process by this callback.
      Parameters:
      callback - process call back
    • detectProcessTypeOnce

      public static void detectProcessTypeOnce(android.content.Context context)
      Calling this method will call the registerProcessTypeCallback(IProcessCallback) again
      Parameters:
      context - application base context
    • addOnObserver

      public static void addOnObserver(String serviceName, String methodName, FozaMethodObserverEE observer)
      Hacky way to inject to the system services
      Parameters:
      serviceName - like Context.ACTIVITY_SERVICE
      methodName - system service interface method name
      observer - your injector
    • registerFozaActivityCallback

      public static void registerFozaActivityCallback(@NonNull FozaActivityObserver observer)
      Container app status callback, will be invoked when an internal app launch.
      Parameters:
      observer - internal app observer, will get callback after the app launch.
      See Also:
      • Instrumentation.newApplication(ClassLoader, String, Context)