Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4324928
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T09:11:55+00:00 2026-05-21T09:11:55+00:00

I found that there seem to be 2 general solutions: don’t obfuscate what is

  • 0

I found that there seem to be 2 general solutions:

  1. don’t obfuscate what is referred to through the reflection API [Retroguard, Jobfuscate]
  2. replace Strings in reflection API invocations with the obfuscated name.

Those solutions work only for calls within the same project – client code (in another project) may not use the reflection API to access non-public API methods.

In the case of 2 it also only works when the Reflection API is used with Strings known at compile-time (private methods testing?). In those cases dp4j also offers a solution injecting the reflection code after obfuscation.

Reading Proguard FAQ I wondered if 2 otherwise always worked when it says:

ProGuard automatically handles
constructs like
Class.forName(“SomeClass”) and
SomeClass.class. The referenced
classes are preserved in the shrinking
phase, and the string arguments are
properly replaced in the obfuscation
phase.

With variable string arguments, it’s generally not possible to determine
their possible values.

Q: what does the statement in bold mean? Any examples?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T09:11:56+00:00Added an answer on May 21, 2026 at 9:11 am

    With variable string arguments, it’s generally not possible to determine their possible values.

    public Class loadIt(String clsName) throws ClassNotFoundException {
        return Class.forName(clsName);
    }
    

    basically if you pass a non-constant string to Class.forName, there’s generally no way for proguard or any obfuscation tool to figure out what class you are talking about, and thus can’t automatically adjust the code for you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have searched through internet & found that there are no any direct method
I have found that there is generally a singe type or namespace that takes
I looked around and found that there is an onerror function for flexigrid but
I've done some research and found that there apparently is an easy and understandable
i have problem with libhid . i found that there 2 way 4 accessing
By looking at our DB's error log, we found that there was a constant
I've just found out that there is a possibility to host a Windows Forms
I have recently found out that there exists a method called nth_element in the
Recently I found out that there are several things that one can do to
I have just installed Eclipse 3.4 and found out that there is not a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.