sensepost / objection

📱 objection - runtime mobile exploration
GNU General Public License v3.0
7.5k stars 855 forks source link

Error while rebuilding apk #190

Closed shadowzoom closed 5 years ago

shadowzoom commented 5 years ago

Any tips how to fix this?

C:\Users\Admin\Desktop\Tools\1\1>objection patchapk -s app_name.apk
No architecture specified. Determining it using `adb`...
Detected target device architecture as: arm64-v8a
Using latest Github gadget version: 12.3.6
Patcher will be using Gadget version: 12.3.6
Unpacking app_name.apk
An error may have occured while extracting the APK.
S: WARNING: Could not write to (C:\Users\Admin\AppData\Local\apktool\framework), using C:\Users\Admin\AppData\Local\Temp\ instead...
S: Please be aware this is a volatile directory and frameworks could go missing, please utilize --frame-path if the default storage directory is unavailable

App already has android.permission.INTERNET
Unable to determine the launchable activity using aapt, trying to manually parse the AndroidManifest for activity aliases...
Smali not found in smali directory. This might be a multidex APK. Searching...
Found smali at: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\smali_classes2\com/snap/stuffing/lib/DynamicLaunchActivity.smali
Reading smali from: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\smali_classes2\com/snap/stuffing/lib/DynamicLaunchActivity.smali
Injecting loadLibrary call at line: 10
Writing patched smali back to: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\smali_classes2\com/snap/stuffing/lib/DynamicLaunchActivity.smali
Creating library path: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\lib\arm64-v8a
Copying Frida gadget to libs path...
Rebuilding the APK with the frida-gadget loaded...
Rebuilding the APK may have failed. Read the following output to determine if apktool actually had an error:

S: WARNING: Could not write to (C:\Users\Admin\AppData\Local\apktool\framework), using C:\Users\Admin\AppData\Local\Temp\ instead...
S: Please be aware this is a volatile directory and frameworks could go missing, please utilize --frame-path if the default storage directory is unavailable
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:48: error: Public symbol array/batterymeter_bolt_points declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:49: error: Public symbol array/captioning_color_selector_titles declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:50: error: Public symbol array/captioning_color_selector_values declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:51: error: Public symbol array/captioning_edge_type_selector_titles declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:52: error: Public symbol array/captioning_edge_type_selector_values declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:53: error: Public symbol array/captioning_font_size_selector_titles declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:54: error: Public symbol array/captioning_font_size_selector_values declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:55: error: Public symbol array/captioning_opacity_selector_titles declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:56: error: Public symbol array/captioning_opacity_selector_values declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:57: error: Public symbol array/captioning_preset_selector_titles declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:58: error: Public symbol array/captioning_preset_selector_values declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:59: error: Public symbol array/captioning_typeface_selector_titles declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:60: error: Public symbol array/captioning_typeface_selector_values declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:61: error: Public symbol array/color_picker_default_colors declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:62: error: Public symbol array/color_picker_neon_colors declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:63: error: Public symbol array/color_picker_pastel_colors declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:64: error: Public symbol array/confirm_phone_options declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:65: error: Public symbol array/confirm_phone_options_text_only declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:66: error: Public symbol array/data_saver_enable_dialog_additional_buttons declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:67: error: Public symbol array/data_saver_enable_dialog_testing_buttons declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:68: error: Public symbol array/dialog_menu_items_delete_story_as_creator declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:69: error: Public symbol array/dialog_menu_items_delete_story_as_participant declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:70: error: Public symbol array/dialog_menu_items_delete_story_chat declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:71: error: Public symbol array/dialog_menu_items_for_blocked_friend declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:72: error: Public symbol array/dialog_menu_items_for_blocked_friend_new_mini_profile declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:73: error: Public symbol array/dialog_menu_items_for_ghost_mode_durations declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:74: error: Public symbol array/dialog_menu_items_for_ghost_mode_durations_short declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:75: error: Public symbol array/dialog_menu_items_for_in_app_report_followup_actions declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:76: error: Public symbol array/dialog_menu_items_for_nearby_snapchatter declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:77: error: Public symbol array/dialog_menu_items_for_popular_friend_in_app_report_followup_actions declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:78: error: Public symbol array/dialog_menu_items_for_unblocked_new_request declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:79: error: Public symbol array/dialog_menu_items_mob_send_to declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:80: error: Public symbol array/discover_regions declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:81: error: Public symbol array/erase_dialog_additional_buttons declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:82: error: Public symbol array/gallery_error_state_long_press_dialog_buttons declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:83: error: Public symbol array/gallery_private_passcode_option_buttons declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:84: error: Public symbol array/gallery_private_passphrase_option_buttons declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:85: error: Public symbol array/hamburger_24_hour_mode_additional_buttons declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:86: error: Public symbol array/mob_map_attribution_options declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:87: error: Public symbol array/notification_cash declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:88: error: Public symbol array/notification_privacy_options declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:89: error: Public symbol array/nyc_settings_ghost_mode_durations_ms declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:90: error: Public symbol array/nyc_settings_ghost_mode_durations_ms_short declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:91: error: Public symbol array/profile_share_dialog_options declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:92: error: Public symbol array/reset_password_options declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:93: error: Public symbol array/s2r_beta_features_list declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:94: error: Public symbol array/s2r_settings_support_camera_feature_options declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:95: error: Public symbol array/s2r_settings_support_discover_screen_feature_options declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:96: error: Public symbol array/s2r_settings_support_friends_screen_features_options declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:97: error: Public symbol array/s2r_settings_support_memories_screen_feature_options declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:98: error: Public symbol array/s2r_settings_support_profile_screen_feature_options declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:99: error: Public symbol array/s2r_settings_support_search_feature_options declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:100: error: Public symbol array/s2r_settings_support_settings_feature_options declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:101: error: Public symbol array/s2r_settings_support_snap_map_feature_options declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:102: error: Public symbol array/sc_story_post_delay_options declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:103: error: Public symbol array/sc_story_report_story_options declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:104: error: Public symbol array/sc_story_report_story_reasons declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:105: error: Public symbol array/shake_to_report_beta_features_list declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:106: error: Public symbol array/snap_id_dialog_options declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:107: error: Public symbol array/stories_friend_settings_options declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:108: error: Public symbol array/supported_typefaces declared here is not defined.
W: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res\values\public.xml:109: error: Public symbol array/talk_end_feedback_prompt declared here is not defined.
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\Admin\AppData\Local\Temp\brut_util_Jar_3637621357028457907.tmp, p, --forced-package-id, 127, --min-sdk-version, 19, --target-sdk-version, 26, --version-code, 1901, --version-name, 10.50.0.0, --no-version-vectors, -F, C:\Users\Admin\AppData\Local\Temp\APKTOOL8769399881285649185.tmp, -0, png, -0, res/drawable-hdpi-v4/aa_holo_textfield_black.9.png, -0, res/drawable-hdpi-v4/aa_holo_textfield_black_disabled.9.png, -0, res/drawable-hdpi-v4/aa_holo_textfield_green.9.png, -0, res/drawable-hdpi-v4/aa_holo_textfield_green_disabled.9.png, -0, res/drawable-hdpi-v4/aa_holo_textfield_purple.9.png, -0, res/drawable-hdpi-v4/aa_holo_textfield_purple_disabled.9.png, -0, res/drawable-hdpi-v4/aa_holo_textfield_white.9.png, -0, res/drawable-hdpi-v4/aa_holo_textfield_white_disabled.9.png, -0, res/drawable-hdpi-v4/abc_ab_share_pack_mtrl_alpha.9.png, -0, res/drawable-hdpi-v4/abc_btn_switch_to_on_mtrl_00001.9.png, -0, res/drawable-hdpi-v4/abc_btn_switch_to_on_mtrl_00012.9.png, -0, res/drawable-hdpi-v4/abc_cab_background_top_mtrl_alpha.9.png, -0, res/drawable-hdpi-v4/abc_list_divider_mtrl_alpha.9.png, -0, res/drawable-hdpi-v4/abc_list_focused_holo.9.png, -0, res/drawable-hdpi-v4/abc_list_longpressed_holo.9.png, -0, res/drawable-hdpi-v4/abc_list_pressed_holo_dark.9.png, -0, res/drawable-hdpi-v4/abc_list_pressed_holo_light.9.png, -0, res/drawable-hdpi-v4/abc_list_selector_disabled_holo_dark.9.png, -0, res/drawable-hdpi-v4/abc_list_selector_disabled_holo_light.9.png, -0, res/drawable-hdpi-v4/abc_menu_hardkey_panel_mtrl_mult.9.png, -0, res/drawable-hdpi-v4/abc_popup_background_mtrl_mult.9.png, -0, res/drawable-hdpi-v4/abc_scrubber_primary_mtrl_alpha.9.png, -0, res/drawable-hdpi-v4/abc_scrubber_track_mtrl_alpha.9.png, -0, res/drawable-hdpi-v4/abc_spinner_mtrl_am_alpha.9.png, -0, res/drawable-hdpi-v4/abc_switch_track_mtrl_alpha.9.png, -0, res/drawable-hdpi-v4/abc_tab_indicator_mtrl_alpha.9.png, -0, res/drawable-hdpi-v4/abc_textfield_activated_mtrl_alpha.9.png, -0, res/drawable-hdpi-v4/abc_textfield_default_mtrl_alpha.9.png, -0, res/drawable-hdpi-v4/abc_textfield_search_activated_mtrl_alpha.9.png, -0, res/drawable-hdpi-v4/abc_textfield_search_default_mtrl_alpha.9.png, -0, res/drawable-hdpi-v4/common_google_signin_btn_icon_dark_normal_background.9.png, -0, res/drawable-hdpi-v4/common_google_signin_btn_icon_light_normal_background.9.png, -0, res/drawable-hdpi-v4/common_google_signin_btn_text_dark_normal_background.9.png, -0, res/drawable-hdpi-v4/common_google_signin_btn_text_light_normal_background.9.png, -0, res/drawable-hdpi-v4/error_tooltip.9.png, -0, res/drawable-hdpi-v4/holo_textfield_black.9.png, -0, res/drawable-hdpi-v4/holo_textfield_black_disabled.9.png, -0, res/drawable-hdpi-v4/holo_textfield_blue.9.png, -0, res/drawable-hdpi-v4/holo_textfield_blue_disabled.9.png, -0, res/drawable-hdpi-v4/location_settings_tooltip.9.png, -0, res/drawable-hdpi-v4/location_settings_tooltip_flipped.9.png, -0, res/drawable-hdpi-v4/map_bitmoji_bubble_top.9.png, -0, res/drawable-hdpi-v4/map_label.9.png, -0, res/drawable-hdpi-v4/memories_with_lenses_thumbnail_shadow.9.png, -0, res/drawable-hdpi-v4/notification_bg_low_normal.9.png, -0, res/drawable-hdpi-v4/notification_bg_low_pressed.9.png, -0, res/drawable-hdpi-v4/notification_bg_normal.9.png, -0, res/drawable-hdpi-v4/notification_bg_normal_pressed.9.png, -0, res/drawable-hdpi-v4/text_view_background.9.png, -0, res/drawable-hdpi-v4/unlockable_sponsored_slug_background.9.png, -0, res/drawable-hdpi-v4/venuelist_bg.9.png, -0, res/drawable-hdpi-v4/venuelist_bg_reversed.9.png, -0, jpg, -0, res/drawable-ldrtl-hdpi-v17/abc_spinner_mtrl_am_alpha.9.png, -0, res/drawable-ldrtl-mdpi-v17/abc_spinner_mtrl_am_alpha.9.png, -0, res/drawable-ldrtl-xhdpi-v17/abc_spinner_mtrl_am_alpha.9.png, -0, res/drawable-ldrtl-xxhdpi-v17/abc_spinner_mtrl_am_alpha.9.png, -0, res/drawable-ldrtl-xxxhdpi-v17/abc_spinner_mtrl_am_alpha.9.png, -0, res/drawable-mdpi-v4/aa_holo_textfield_black.9.png, -0, res/drawable-mdpi-v4/aa_holo_textfield_black_disabled.9.png, -0, res/drawable-mdpi-v4/aa_holo_textfield_green.9.png, -0, res/drawable-mdpi-v4/aa_holo_textfield_green_disabled.9.png, -0, res/drawable-mdpi-v4/aa_holo_textfield_purple.9.png, -0, res/drawable-mdpi-v4/aa_holo_textfield_purple_disabled.9.png, -0, res/drawable-mdpi-v4/aa_holo_textfield_white.9.png, -0, res/drawable-mdpi-v4/aa_holo_textfield_white_disabled.9.png, -0, res/drawable-mdpi-v4/abc_ab_share_pack_mtrl_alpha.9.png, -0, res/drawable-mdpi-v4/abc_btn_switch_to_on_mtrl_00001.9.png, -0, res/drawable-mdpi-v4/abc_btn_switch_to_on_mtrl_00012.9.png, -0, res/drawable-mdpi-v4/abc_cab_background_top_mtrl_alpha.9.png, -0, res/drawable-mdpi-v4/abc_list_divider_mtrl_alpha.9.png, -0, res/drawable-mdpi-v4/abc_list_focused_holo.9.png, -0, res/drawable-mdpi-v4/abc_list_longpressed_holo.9.png, -0, res/drawable-mdpi-v4/abc_list_pressed_holo_dark.9.png, -0, res/drawable-mdpi-v4/abc_list_pressed_holo_light.9.png, -0, res/drawable-mdpi-v4/abc_list_selector_disabled_holo_dark.9.png, -0, res/drawable-mdpi-v4/abc_list_selector_disabled_holo_light.9.png, -0, res/drawable-mdpi-v4/abc_menu_hardkey_panel_mtrl_mult.9.png, -0, res/drawable-mdpi-v4/abc_popup_background_mtrl_mult.9.png, -0, res/drawable-mdpi-v4/abc_scrubber_primary_mtrl_alpha.9.png, -0, res/drawable-mdpi-v4/abc_scrubber_track_mtrl_alpha.9.png, -0, res/drawable-mdpi-v4/abc_spinner_mtrl_am_alpha.9.png, -0, res/drawable-mdpi-v4/abc_switch_track_mtrl_alpha.9.png, -0, res/drawable-mdpi-v4/abc_tab_indicator_mtrl_alpha.9.png, -0, res/drawable-mdpi-v4/abc_textfield_activated_mtrl_alpha.9.png, -0, res/drawable-mdpi-v4/abc_textfield_default_mtrl_alpha.9.png, -0, res/drawable-mdpi-v4/abc_textfield_search_activated_mtrl_alpha.9.png, -0, res/drawable-mdpi-v4/abc_textfield_search_default_mtrl_alpha.9.png, -0, res/drawable-mdpi-v4/common_google_signin_btn_icon_dark_normal_background.9.png, -0, res/drawable-mdpi-v4/common_google_signin_btn_icon_light_normal_background.9.png, -0, res/drawable-mdpi-v4/common_google_signin_btn_text_dark_normal_background.9.png, -0, res/drawable-mdpi-v4/common_google_signin_btn_text_light_normal_background.9.png, -0, res/drawable-mdpi-v4/error_tooltip.9.png, -0, res/drawable-mdpi-v4/holo_textfield_black.9.png, -0, res/drawable-mdpi-v4/holo_textfield_black_disabled.9.png, -0, res/drawable-mdpi-v4/holo_textfield_blue.9.png, -0, res/drawable-mdpi-v4/holo_textfield_blue_disabled.9.png, -0, res/drawable-mdpi-v4/location_settings_tooltip.9.png, -0, res/drawable-mdpi-v4/location_settings_tooltip_flipped.9.png, -0, res/drawable-mdpi-v4/map_bitmoji_bubble_top.9.png, -0, res/drawable-mdpi-v4/map_label.9.png, -0, res/drawable-mdpi-v4/memories_with_lenses_thumbnail_shadow.9.png, -0, res/drawable-mdpi-v4/notification_bg_low_normal.9.png, -0, res/drawable-mdpi-v4/notification_bg_low_pressed.9.png, -0, res/drawable-mdpi-v4/notification_bg_normal.9.png, -0, res/drawable-mdpi-v4/notification_bg_normal_pressed.9.png, -0, res/drawable-mdpi-v4/text_view_background.9.png, -0, res/drawable-mdpi-v4/unlockable_sponsored_slug_background.9.png, -0, res/drawable-mdpi-v4/venue_tooltip.9.png, -0, res/drawable-mdpi-v4/venuelist_bg.9.png, -0, res/drawable-mdpi-v4/venuelist_bg_reversed.9.png, -0, res/drawable-xhdpi-v4/aa_holo_textfield_black.9.png, -0, res/drawable-xhdpi-v4/aa_holo_textfield_black_disabled.9.png, -0, res/drawable-xhdpi-v4/aa_holo_textfield_green.9.png, -0, res/drawable-xhdpi-v4/aa_holo_textfield_green_disabled.9.png, -0, res/drawable-xhdpi-v4/aa_holo_textfield_purple.9.png, -0, res/drawable-xhdpi-v4/aa_holo_textfield_purple_disabled.9.png, -0, res/drawable-xhdpi-v4/aa_holo_textfield_white.9.png, -0, res/drawable-xhdpi-v4/aa_holo_textfield_white_disabled.9.png, -0, res/drawable-xhdpi-v4/abc_ab_share_pack_mtrl_alpha.9.png, -0, res/drawable-xhdpi-v4/abc_btn_switch_to_on_mtrl_00001.9.png, -0, res/drawable-xhdpi-v4/abc_btn_switch_to_on_mtrl_00012.9.png, -0, res/drawable-xhdpi-v4/abc_cab_background_top_mtrl_alpha.9.png, -0, res/drawable-xhdpi-v4/abc_list_divider_mtrl_alpha.9.png, -0, res/drawable-xhdpi-v4/abc_list_focused_holo.9.png, -0, res/drawable-xhdpi-v4/abc_list_longpressed_holo.9.png, -0, res/drawable-xhdpi-v4/abc_list_pressed_holo_dark.9.png, -0, res/drawable-xhdpi-v4/abc_list_pressed_holo_light.9.png, -0, res/drawable-xhdpi-v4/abc_list_selector_disabled_holo_dark.9.png, -0, res/drawable-xhdpi-v4/abc_list_selector_disabled_holo_light.9.png, -0, res/drawable-xhdpi-v4/abc_menu_hardkey_panel_mtrl_mult.9.png, -0, res/drawable-xhdpi-v4/abc_popup_background_mtrl_mult.9.png, -0, res/drawable-xhdpi-v4/abc_scrubber_primary_mtrl_alpha.9.png, -0, res/drawable-xhdpi-v4/abc_scrubber_track_mtrl_alpha.9.png, -0, res/drawable-xhdpi-v4/abc_spinner_mtrl_am_alpha.9.png, -0, res/drawable-xhdpi-v4/abc_switch_track_mtrl_alpha.9.png, -0, res/drawable-xhdpi-v4/abc_tab_indicator_mtrl_alpha.9.png, -0, res/drawable-xhdpi-v4/abc_textfield_activated_mtrl_alpha.9.png, -0, res/drawable-xhdpi-v4/abc_textfield_default_mtrl_alpha.9.png, -0, res/drawable-xhdpi-v4/abc_textfield_search_activated_mtrl_alpha.9.png, -0, res/drawable-xhdpi-v4/abc_textfield_search_default_mtrl_alpha.9.png, -0, res/drawable-xhdpi-v4/amu_bubble_mask.9.png, -0, res/drawable-xhdpi-v4/amu_bubble_shadow.9.png, -0, res/drawable-xhdpi-v4/common_google_signin_btn_icon_dark_normal_background.9.png, -0, res/drawable-xhdpi-v4/common_google_signin_btn_icon_light_normal_background.9.png, -0, res/drawable-xhdpi-v4/common_google_signin_btn_text_dark_normal_background.9.png, -0, res/drawable-xhdpi-v4/common_google_signin_btn_text_light_normal_background.9.png, -0, res/drawable-xhdpi-v4/error_tooltip.9.png, -0, res/drawable-xhdpi-v4/holo_textfield_black.9.png, -0, res/drawable-xhdpi-v4/holo_textfield_black_disabled.9.png, -0, res/drawable-xhdpi-v4/holo_textfield_blue.9.png, -0, res/drawable-xhdpi-v4/holo_textfield_blue_disabled.9.png, -0, res/drawable-xhdpi-v4/lens_tooltip.9.png, -0, res/drawable-xhdpi-v4/location_settings_tooltip.9.png, -0, res/drawable-xhdpi-v4/location_settings_tooltip_flipped.9.png, -0, res/drawable-xhdpi-v4/map_bitmoji_bubble_top.9.png, -0, res/drawable-xhdpi-v4/map_label.9.png, -0, res/drawable-xhdpi-v4/memories_with_lenses_thumbnail_shadow.9.png, -0, res/drawable-xhdpi-v4/notification_bg_low_normal.9.png, -0, res/drawable-xhdpi-v4/notification_bg_low_pressed.9.png, -0, res/drawable-xhdpi-v4/notification_bg_normal.9.png, -0, res/drawable-xhdpi-v4/notification_bg_normal_pressed.9.png, -0, res/drawable-xhdpi-v4/text_view_background.9.png, -0, res/drawable-xhdpi-v4/unlockable_sponsored_slug_background.9.png, -0, res/drawable-xhdpi-v4/venue_tooltip.9.png, -0, res/drawable-xhdpi-v4/venuelist_bg.9.png, -0, res/drawable-xhdpi-v4/venuelist_bg_reversed.9.png, -0, res/drawable-xxhdpi-v4/abc_ab_share_pack_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_btn_switch_to_on_mtrl_00001.9.png, -0, res/drawable-xxhdpi-v4/abc_btn_switch_to_on_mtrl_00012.9.png, -0, res/drawable-xxhdpi-v4/abc_cab_background_top_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_list_divider_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_list_focused_holo.9.png, -0, res/drawable-xxhdpi-v4/abc_list_longpressed_holo.9.png, -0, res/drawable-xxhdpi-v4/abc_list_pressed_holo_dark.9.png, -0, res/drawable-xxhdpi-v4/abc_list_pressed_holo_light.9.png, -0, res/drawable-xxhdpi-v4/abc_list_selector_disabled_holo_dark.9.png, -0, res/drawable-xxhdpi-v4/abc_list_selector_disabled_holo_light.9.png, -0, res/drawable-xxhdpi-v4/abc_menu_hardkey_panel_mtrl_mult.9.png, -0, res/drawable-xxhdpi-v4/abc_popup_background_mtrl_mult.9.png, -0, res/drawable-xxhdpi-v4/abc_scrubber_primary_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_scrubber_track_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_spinner_mtrl_am_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_switch_track_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_tab_indicator_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_textfield_activated_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_textfield_default_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_textfield_search_activated_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_textfield_search_default_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/amu_bubble_mask.9.png, -0, res/drawable-xxhdpi-v4/amu_bubble_shadow.9.png, -0, res/drawable-xxhdpi-v4/common_google_signin_btn_icon_dark_normal_background.9.png, -0, res/drawable-xxhdpi-v4/common_google_signin_btn_icon_light_normal_background.9.png, -0, res/drawable-xxhdpi-v4/common_google_signin_btn_text_dark_normal_background.9.png, -0, res/drawable-xxhdpi-v4/common_google_signin_btn_text_light_normal_background.9.png, -0, res/drawable-xxhdpi-v4/error_tooltip.9.png, -0, res/drawable-xxhdpi-v4/lens_tooltip.9.png, -0, res/drawable-xxhdpi-v4/location_settings_tooltip.9.png, -0, res/drawable-xxhdpi-v4/location_settings_tooltip_flipped.9.png, -0, res/drawable-xxhdpi-v4/map_bitmoji_bubble_top.9.png, -0, res/drawable-xxhdpi-v4/map_label.9.png, -0, res/drawable-xxhdpi-v4/memories_with_lenses_thumbnail_shadow.9.png, -0, res/drawable-xxhdpi-v4/text_view_background.9.png, -0, res/drawable-xxhdpi-v4/unlockable_sponsored_slug_background.9.png, -0, res/drawable-xxhdpi-v4/venue_tooltip.9.png, -0, res/drawable-xxhdpi-v4/venuelist_bg.9.png, -0, res/drawable-xxhdpi-v4/venuelist_bg_reversed.9.png, -0, res/drawable-xxxhdpi-v4/abc_btn_switch_to_on_mtrl_00001.9.png, -0, res/drawable-xxxhdpi-v4/abc_btn_switch_to_on_mtrl_00012.9.png, -0, res/drawable-xxxhdpi-v4/abc_spinner_mtrl_am_alpha.9.png, -0, res/drawable-xxxhdpi-v4/abc_switch_track_mtrl_alpha.9.png, -0, res/drawable-xxxhdpi-v4/abc_tab_indicator_mtrl_alpha.9.png, -0, res/drawable-xxxhdpi-v4/error_tooltip.9.png, -0, res/drawable-xxxhdpi-v4/explore_tooltip_01.9.png, -0, res/drawable-xxxhdpi-v4/location_settings_tooltip.9.png, -0, res/drawable-xxxhdpi-v4/location_settings_tooltip_flipped.9.png, -0, res/drawable-xxxhdpi-v4/map_bitmoji_bubble_top.9.png, -0, res/drawable-xxxhdpi-v4/map_card_bottom.9.png, -0, res/drawable-xxxhdpi-v4/map_card_side.9.png, -0, res/drawable-xxxhdpi-v4/map_card_top.9.png, -0, res/drawable-xxxhdpi-v4/map_carousel_card.9.png, -0, res/drawable-xxxhdpi-v4/map_label.9.png, -0, res/drawable-xxxhdpi-v4/mapbox_infowindow_icon_bg.9.png, -0, res/drawable-xxxhdpi-v4/memories_with_lenses_thumbnail_shadow.9.png, -0, res/drawable-xxxhdpi-v4/text_view_background.9.png, -0, res/drawable-xxxhdpi-v4/venue_tooltip.9.png, -0, res/drawable-xxxhdpi-v4/venuelist_bg.9.png, -0, res/drawable-xxxhdpi-v4/venuelist_bg_reversed.9.png, -0, res/drawable/label_shadow.9.png, -0, mp4, -0, mp3, -0, arsc, -I, C:\Users\Admin\AppData\Local\Temp\1.apk, -S, C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\res, -M, C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp\AndroidManifest.xml]

Built new APK with injected loadLibrary and frida-gadget
Signing new APK.
Signing the new APK may have failed.
jarsigner: unable to open jar file: C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp.objection.apk

Signed the new APK
Performing zipalign
Zipaligning the APK may have failed. Read the following output to determine if zipalign actually had an error:

Unable to open 'C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp.objection.apk' as zip archive

Zipalign completed
Copying final apk from C:\Users\Admin\AppData\Local\Temp\tmprhp4fw26.apktemp.aligned.objection.apk to snapchat.objection.apk in current directory...
Traceback (most recent call last):
  File "C:\Python37\Scripts\objection-script.py", line 11, in <module>
    load_entry_point('objection==1.5.0', 'console_scripts', 'objection')()
  File "C:\Python37\lib\site-packages\click-7.0-py3.7.egg\click\core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "C:\Python37\lib\site-packages\click-7.0-py3.7.egg\click\core.py", line 717, in main
    rv = self.invoke(ctx)
  File "C:\Python37\lib\site-packages\click-7.0-py3.7.egg\click\core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Python37\lib\site-packages\click-7.0-py3.7.egg\click\core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Python37\lib\site-packages\click-7.0-py3.7.egg\click\core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "C:\Python37\lib\site-packages\objection-1.5.0-py3.7.egg\objection\console\cli.py", line 322, in patchapk
    patch_android_apk(**locals())
  File "C:\Python37\lib\site-packages\objection-1.5.0-py3.7.egg\objection\commands\mobile_packages.py", line 182, in patch_android_apk
    shutil.copyfile(patcher.get_patched_apk_path(), os.path.join(os.path.abspath('.'), destination))
  File "C:\Python37\lib\shutil.py", line 120, in copyfile
    with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Admin\\AppData\\Local\\Temp\\tmprhp4fw26.apktemp.aligned.objection.apk'
Cleaning up temp files...
Failed to cleanup with error: [WinError 2] Не удается найти указанный файл: 'C:\\Users\\Admin\\AppData\\Local\\Temp\\tmprhp4fw26.apktemp.objection.apk'
shadowzoom commented 5 years ago

apktool, everything in the PATH (im on windows 10)

shadowzoom commented 5 years ago

Tried with --skip-resources

objection patchapk --source appname.apk --skip-resources

No architecture specified. Determining it using `adb`...
Detected target device architecture as: arm64-v8a
Using latest Github gadget version: 12.4.0
Patcher will be using Gadget version: 12.4.0
Unpacking snapchat.apk
App already has android.permission.INTERNET
Unable to determine the launchable activity using aapt, trying to manually parse the AndroidManifest for activity aliases...
Traceback (most recent call last):
  File "C:\Python37\Scripts\objection-script.py", line 11, in <module>
    load_entry_point('objection==1.5.0', 'console_scripts', 'objection')()
  File "C:\Python37\lib\site-packages\click-7.0-py3.7.egg\click\core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "C:\Python37\lib\site-packages\click-7.0-py3.7.egg\click\core.py", line 717, in main
    rv = self.invoke(ctx)
  File "C:\Python37\lib\site-packages\click-7.0-py3.7.egg\click\core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Python37\lib\site-packages\click-7.0-py3.7.egg\click\core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Python37\lib\site-packages\click-7.0-py3.7.egg\click\core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "C:\Python37\lib\site-packages\objection-1.5.0-py3.7.egg\objection\console\cli.py", line 322, in patchapk
    patch_android_apk(**locals())
  File "C:\Python37\lib\site-packages\objection-1.5.0-py3.7.egg\objection\commands\mobile_packages.py", line 161, in patch_android_apk
    patcher.inject_load_library()
  File "C:\Python37\lib\site-packages\objection-1.5.0-py3.7.egg\objection\utils\patchers\android.py", line 528, in inject_load_library
    activity = self._get_launchable_activity().replace('.', '/')
  File "C:\Python37\lib\site-packages\objection-1.5.0-py3.7.egg\objection\utils\patchers\android.py", line 294, in _get_launchable_activity
    manifest = self._get_android_manifest()
  File "C:\Python37\lib\site-packages\objection-1.5.0-py3.7.egg\objection\utils\patchers\android.py", line 239, in _get_android_manifest
    return ElementTree.parse(os.path.join(self.apk_temp_directory, 'AndroidManifest.xml'))
  File "C:\Python37\lib\xml\etree\ElementTree.py", line 1197, in parse
    tree.parse(source, parser)
  File "C:\Python37\lib\xml\etree\ElementTree.py", line 598, in parse
    self._root = parser._parse_whole(source)
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, column 0
Cleaning up temp files...
Failed to cleanup with error: [WinError 2] Не удается найти указанный файл: 'C:\\Users\\Admin\\AppData\\Local\\Temp\\tmpo2vbc0rp.apktemp.objection.apk'
leonjza commented 5 years ago

There are two things going on here. The first, apktool cant rebuild the app. I suggest you try and decode and build the app manually with apktool first. This way, if there is anything you need to edit to get it to build again, you know what it may be and can use the --pause flag to give you a chance to do so before objection rebuilds the patched APK. On that same topic, make sure you have the latest apktool too.

The second, with the --skip-resources flag, we should actually update the patcher to not try and parse the AndroidManifest.xml file as it won't be decoded with this flag. That being said, the patcher failed there because aapt could not determine which launchable activity to patch he loadLibrary() call to. Unfortunately, this is also something you are going to have to approach manually to investigate. In a future version, I will add the ability to specify a class to patch which will allow you to at least launch the gadget sometime in the applications lifecycle.