-
-
Notifications
You must be signed in to change notification settings - Fork 712
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
Error occurs when writing output apk - Splitting not support for pre Lollipop Android (Api 22). #2130
Comments
Have you read the comment in source code where that exception is thrown? soot/src/main/java/soot/toDex/MultiDexBuilder.java Lines 78 to 100 in 4d6fcfa
|
Thank you for your response! |
I assume You could try to override it using |
I tried to set API 22 as The source code for the options settings is presented below Options.v().set_no_bodies_for_excluded(true);
Options.v().set_allow_phantom_refs(true);
Options.v().set_whole_program(true);
Options.v().set_process_multiple_dex(true);
Options.v().set_keep_line_number(false);
Options.v().set_keep_offset(false);
Options.v().set_ignore_resolution_errors(true);
Options.v().set_output_format(Options.output_format_dex);
Options.v().set_src_prec(Options.src_prec_apk_class_jimple);
Options.v().set_process_dir(List.of(apkPath));
Options.v().set_throw_analysis(Options.throw_analysis_dalvik);
Options.v().set_exclude(Arrays.asList(Constant.EXCLUDE_LIST));
Options.v().set_no_bodies_for_excluded(true);
Options.v().set_force_overwrite(true);
Options.v().set_output_dir(Config.INSTRUMENTED_APKS_PATH);
Options.v().set_android_api_version(22);
Scene.v().loadNecessaryClasses();
PackManager.v().runPacks(); |
Describe the bug
This error occurs when calling
PackManager.v().writeOutput();
after analyzing the apk file thatminSdkVersion
< 22.Input file
com.nokoprint.apk
,its metadata are as follows:packageName: com.nokoprint
label: NokoPrint
icon: res/mipmap-mdpi-v4/ic_launcher.png
versionName: 5.2.0
versionCode: 230
minSdkVersion: 19
targetSdkVersion: 32
maxSdkVersion: null
To reproduce
It seems that all of the input apks that
minSdkVersion
< 22 will raise this error when callingPackManager.v().writeOutput();
I also tried
Options.v().set_android_api_version(compileSdkVersion);
andOptions.v().set_android_api_version(minSdkVersion);
. The error keeps occuring.Expected behavior
Error will occur when calling
PackManager.v().writeOutput();
Stacktrace
Additional context
I tried to use apktool to reset the
minSdkVersion
of the app, and the error disappeared. But this process is too troublesome.So I wonder if soot could help modify the
minSdkVersion
when callingPackManager.v().writeOutput();
.The text was updated successfully, but these errors were encountered: