-
Notifications
You must be signed in to change notification settings - Fork 668
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
redex removes required classes. #30
Comments
Try using the -m and -P arguments to apply your proguard settings. See also in your terminal |
I guess Fabric is using reflection there... How can we specify rules to exclude some files from guarding? |
I am not using any proguard settings. |
We are talking about redex here, not about ProGuard. Official facebook post says that we can specify rules in *.json file to ReDex. But i can't find any docs about that. That's the question |
basically i'm observing same crash, as @VenomVendor |
using proguard config (-P) and seeds.txt (-m) did not work out of the box :
And then, redex failed to compile our app, proguard fails during build if I restart it with the commented lines... |
Thanks for the detailed repro steps, I'll take a look in the morning. |
I apologize. I'm in the process of deleting my github account. I have sent an issue ticket to the github help desk. I appreciate everyone who worked on this. Have a great day tomorrow. ;~) |
I also have the same sort of problem. (log here)
EDIT2: |
So, I used dex manager to put the missing |
Ok, I still don't really understand what's going on, but I have a more realistic work around than messing with packages manually, and some observations. First, seems most of the errors reported here are accessing ExecutorUtils$1, though its ExecutorUtils that's missing. Also, the line numbers in the stack trace doesn't correspond to anything meaningful. one of mine was an import statement, and another was a null check for a parameter passed to a method. That one, (line 68) is the same line number regardless of what was the calling class. It IS always I played with the I tried various config jsons to see if I can get "keep_packages" flag set for I tried setting a
but it still deleted So, looking at
to
to Now, I may have misinterpreted a bunch of stuff and ended up doing all this for nothing, but I don't see how All this and its still not a fix on the original problem, that |
Thanks for digging into this, @ArcadiTepes. You're totally right, the keep_* options aren't being respected by StaticRelo. Unfortunately the config is a bit of a disaster right now -- we have multiple parallel sets of options controlling what isn't removed. This isn't really an acceptable situation so I'm working on cleaning it up as priority #1. Anyways, the keep_packages option is used by the do_not_strip family of functions in the code, so that's another alternative to the seed option. Seeds and proguard-config are a partially implemented feature right now (as you've found out, we ingest them but don't actually use them yet). I need to update the help to indicate that these options are developer only. |
I happen the same problem, but I don't solve it. |
@huyongli keepme.txt contents:
Take a look at my post above or #107. Make those same changes to your redex code, then rebuilt. Now run your redex command with the Try the new apk. Hopefully that'll do it for you. |
The --keep option is one workaround (and StaticRelo should support it), but there's another fundamental issue with StaticRelo in that it doesn't fix up visibility when it moves methods. I've patched this bug and @VenomVendor's test APK works with my patch. I'll land the fix as soon as it gets reviewed. |
Summary:ReDex does not respect `--keep`/`--seed` options. It processes the input but does not check them in `StaticReloPass`. This adds the check so problem classes such as in #30 can be worked around. Closes #107 Reviewed By: dariorussi Differential Revision: D3198539 Pulled By: bertmaher fb-gh-sync-id: 3abee295742d42e2ca207f2f762cc081970e0415 fbshipit-source-id: 3abee295742d42e2ca207f2f762cc081970e0415
App crashes on launch.
Decompiling redexed apk does not have
io.fabric.sdk.android.services.common.ExecutorUtils.class
where as in default one hasExecutorUtils.class
Minimal project to try.
Redex.zip
decompiled-jars.zip
run
./gradlew clean build
Find 2 apks in root dir.
works
fails
The text was updated successfully, but these errors were encountered: