MichaelRocks / paranoid

String obfuscator for Android applications.
Apache License 2.0
673 stars 79 forks source link

obfuscate does not apply. #71

Open keiabc opened 1 year ago

keiabc commented 1 year ago

Build was successful.

Orginal Code

import io.michaelrocks.paranoid.Obfuscate;

@Obfuscate
public class MainActivity extends ReactActivity {
  TimerTask timerTask;
  Timer timer;
  static int ERR_SUCCESS = 0;
  String lazy_PendingIntent = "";

  /**
   * Returns the name of the main component registered from JavaScript. This is
   * used to schedule
   * rendering of the component.
   */
  @Override
  protected String getMainComponentName() {
    return "myApp";
  }

Reversing APK

package p016io.myApp;

import android.content.Intent;
import android.os.Bundle;
import androidx.core.splashscreen.SplashScreen;
import com.facebook.react.ReactActivity;
import com.facebook.react.ReactActivityDelegate;
import com.facebook.react.ReactRootView;
import com.facebook.react.bridge.Arguments;
import com.facebook.react.bridge.ReactContext;
import com.facebook.react.bridge.WritableMap;
import com.facebook.react.modules.core.DeviceEventManagerModule;
import java.util.Timer;
import java.util.TimerTask;

/* renamed from: io.myabcwallet.mpc.MainActivity */
/* loaded from: classes7.dex */
public class MainActivity extends ReactActivity {
    String lazy_PendingIntent = "";
    Timer timer;
    TimerTask timerTask;
    static int ERR_SUCCESS = 0;

    @Override // com.facebook.react.ReactActivity
    protected String getMainComponentName() {
        return "myApp";
    }

As you can see, the package was not included in the apk. It seems that the annotation is not applied due to some problem. Is there anything I need to add to build.gradle?