在对接很多工作室业务中有些客户需要在他们自带的有些app中加注册码或者验证码的需求。其实操作起来也很简单。很多反编译软件有自带的注入功能。例如注入弹窗。这个是需要对应的注册码来启动应用。而且是随机id。重新安装app后需要重新注册才可以继续使用,原则上可以杜绝工作室外发定制app的滥用。
加注册码效果如图
上个博文解析了下app去广告 去弹窗,
反编译apk 修改apk 去广告 去弹窗等操作中的一些常识
结合上个博文我们基本可以了解到弹窗在什么位置。根据客户的需求。编译生成一个文件用于注册码的验证方式。然后在app中反编译加入弹窗即可.
在app中我们要基本了解app相关文件的作用,这个是前提条件之一
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/app_and_notification_dashboard_title" android:key="apps_and_notification_screen" settings:initialExpandedChildrenCount="4"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:settings="http://schemas.android.com/apk/res-auto">
<com.android.settingslib.miuisettings.preference.Preference android:title="@string/applications_settings" android:key="all_app_info" android:order="-999" android:fragment="com.android.settings.applications.manageapplications.ManageApplications" settings:controller="com.android.settings.applications.AllAppsInfoPreferenceController" settings:keywords="@string/keywords_applications_settings" />
<com.android.settingslib.widget.LayoutPreference android:layout="@layout/app_entities_header" android:title="@string/recent_app_category_title" android:selectable="false" android:key="recent_open_apps" android:order="-998" settings:allowDividerBelow="true" settings:controller="com.android.settings.applications.RecentAppsPreferenceController" />
<PreferenceCategory android:layout="@layout/preference_category_no_label" android:key="recent_apps_divider" android:order="-997" />
<PreferenceCategory android:key="dashboard_tile_placeholder" android:order="10" />
<com.android.settingslib.miuisettings.preference.Preference android:title="@string/app_permissions" android:key="manage_perms" android:order="12" settings:controller="com.android.settings.applications.AppPermissionsPreferenceController" settings:keywords="@string/keywords_app_permissions">
<intent android:action="android.intent.action.MANAGE_PERMISSIONS" />
</com.android.settingslib.miuisettings.preference.Preference>
<com.android.settingslib.RestrictedPreference android:title="@string/cell_broadcast_settings" android:key="app_and_notif_cell_broadcast_settings" android:order="15" settings:useAdminDisabledSummary="true">
<intent android:targetPackage="com.android.cellbroadcastreceiver" android:action="android.intent.action.MAIN" android:targetClass="com.android.cellbroadcastreceiver.CellBroadcastSettings" />
</com.android.settingslib.RestrictedPreference>
<com.android.settingslib.miuisettings.preference.Preference android:title="@string/special_access" android:key="special_access" android:order="20" android:fragment="com.android.settings.applications.specialaccess.SpecialAccessSettings" settings:controller="com.android.settings.applications.SpecialAppAccessPreferenceController" />
</PreferenceScreen>
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/battery_action_bluetooth"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:settings="http://schemas.android.com/apk/res-auto">
<PreferenceCategory android:title="@string/bluetooth_connect_settings" android:order="1">
<com.android.settingslib.miuisettings.preference.SwitchPreference android:title="@string/bluetooth_mi_fast_connect" android:key="bluetooth_mi_fast_connect" android:summary="@string/bluetooth_mi_fast_connect_summary" />
<com.android.settingslib.miuisettings.preference.Preference android:persistent="false" android:title="@string/app_bluetooth_device_blacklist" android:summary="@string/bluetooth_device_blacklist_summary" android:fragment="com.android.settings.bluetooth.BluetoothBlacklistFragment" settings:showRightArrow="true" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/bluetooth_display_settings" android:key="bluetooth_show" android:order="2">
<com.android.settingslib.miuisettings.preference.SwitchPreference android:title="@string/bluetooth_show_devices_without_names" android:key="bluetooth_show_devices_without_names" android:summary="@string/bluetooth_show_devices_without_names_summary" />
<com.android.settingslib.miuisettings.preference.SwitchPreference android:title="@string/bt_show_notification_title" android:key="bluetooth_show_notification" android:summary="@string/bt_show_notification_summary" />
</PreferenceCategory>
<PreferenceCategory android:key="load_preferenceCategory_flag" android:order="3">
<com.android.settingslib.miuisettings.preference.Preference android:persistent="false" android:title="@string/app_enable_bluetooth_record" android:fragment="com.android.settings.bluetooth.BluetoothEnableRecord" settings:showRightArrow="true" />
</PreferenceCategory>
</PreferenceScreen>
在app源码中。
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:persistent="true" android:title="@string/accessibility_settings" android:key="accessibility_settings_screen"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:settings="http://schemas.android.com/apk/res-auto">
<PreferenceCategory android:key="user_installed_services_category" />
<PreferenceCategory android:title="@string/screen_reader_category_title" android:key="screen_reader_category">
<com.android.settings.MiuiValuePreference android:persistent="false" android:title="@string/accessibility_screen_reader_haptic_title" android:key="accessibility_screen_reader_haptic" android:order="-1" android:fragment="com.android.settings.accessibility.HapticSettingsFragment" settings:controller="com.android.settings.accessibility.ScreenReaderController" />
<com.android.settings.MiuiValuePreference android:title="@string/tts_settings_title" android:key="tts_settings_preference" android:order="100" android:fragment="com.android.settings.tts.TextToSpeechSettings" settings:searchable="false" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/display_category_title" android:key="display_category">
<com.android.settings.display.ScreenZoomPreference android:title="@string/screen_zoom_title" android:key="accessibility_settings_screen_zoom">
<intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.android.settings.display.ScreenZoomActivity" />
</com.android.settings.display.ScreenZoomPreference>
<com.android.settingslib.miuisettings.preference.SwitchPreference android:title="@string/dark_ui_mode" android:key="dark_ui_mode_accessibility" settings:searchable="false" />
<com.android.settings.MiuiValuePreference android:title="@string/accessibility_screen_magnification_title" android:key="magnification_preference_screen" android:fragment="com.android.settings.accessibility.MagnificationPreferenceFragment" />
<com.android.settingslib.miuisettings.preference.SwitchPreference android:title="@string/accessibility_disable_animations" android:key="toggle_disable_animations" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/experimental_category_title" android:key="experimental_category">
<com.android.settingslib.miuisettings.preference.miuix.DropDownPreference android:persistent="false" android:title="@string/screen_reader_mode_input_type_title" android:key="screen_reader_mode_input_type" android:summary="@string/screen_reader_mode_input_type_summary" settings:entries="@array/screen_reader_mode_input_type_selector_titles" settings:entryValues="@array/screen_reader_mode_input_type_selector_values" />
<com.android.settingslib.miuisettings.preference.SwitchPreference android:title="@string/accessibility_toggle_high_text_contrast_preference_title" android:key="toggle_high_text_contrast_preference" />
<com.android.settingslib.miuisettings.preference.SwitchPreference android:title="@string/toggle_auto_speaker_preference_title" android:key="toggle_auto_speaker_preference" android:summary="@string/toggle_auto_speaker_preference_summary" />
<com.android.settings.MiuiValuePreference android:title="@string/accessibility_display_daltonizer_preference_title" android:key="daltonizer_preference" android:fragment="com.android.settings.accessibility.ToggleDaltonizerPreferenceFragment" settings:searchable="false" />
<com.android.settingslib.miuisettings.preference.SwitchPreference android:persistent="false" android:title="@string/accessibility_display_inversion_preference_title" android:key="toggle_inversion_preference" android:summary="@string/accessibility_display_inversion_preference_subtitle" settings:controller="com.android.settings.accessibility.ColorInversionPreferenceController" />
</PreferenceCategory>
</PreferenceScreen>
show开头的源代码中就标示是弹窗对话框.去弹窗 加弹窗.修改app中的 AndroidManifest.xml文件.兴趣的友友可以使用反编译软件中的注入弹窗内容 然后对照原文件来参考弹窗的生成。
还有很多云注入弹窗方式。
去掉app云注入弹窗
第一种方法:dex搜索代码:invoke-virtual {v0}, Landroid/app/AlertDialog;->show()V 然后删除即可!
第二种方法:搜索代码:invoke-direct {p0}, Lcom/cloudinject/feature/App;->̗̖̙̗̖̖()V 然后删除即可!
第三种方法:搜索字符串:"无联网",找到当前方法,开头添加: return-void
第四种完美去除法:找到入口,替换入口即可,删除云注入dex和assets目录下的云注入文件,找入口可参考搜索:.super Landroid/app/Application;一般第四行就是了.可以参考以上