dvaoru / ApkRenamer

This is a program to change an app name, a package name and an icon in Android apk package.
Apache License 2.0
178 stars 22 forks source link

When I'm doing deep renaming, there's an app that doesn't work. Could you possibly help? #9

Closed SangdonLee972 closed 1 year ago

SangdonLee972 commented 1 year ago

I've been trying to repackage and install about 3 copies of the app called frep2, which I had inquired about before, on my phone. (I'm involved in the development of this app.) Therefore, it's crucial for me to succeed in this test and your renaming package has been of great help to me! However, when I attempt deep naming, the name and package name do change, but errors occur in sections like the provider (like Google ads), and the application does not operate (it does work when I just rename without attempting deep naming). Yet, perhaps because the package name hasn't changed deeply, it does not install over the existing app when I just rename it. I will provide my manifest after the change here, and I sincerely request that if there is anything wrong, please leave a comment.

<?xml version="1.0" encoding="UTF-8"?>

<uses-permission android:name="com.x0.strai.permission.RECEIVE_KEY"/>
<uses-permission android:name="android.permission.PACKAGE_USAGE_STATS"/>
<uses-permission android:name="android.permission.REORDER_TASKS"/>
<uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:maxSdkVersion="28" android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<queries>
    <intent>
        <action android:name="android.intent.action.MAIN"/>
        <category android:name="android.intent.category.LAUNCHER"/>
    </intent>
    <intent>
        <action android:name="android.intent.action.VIEW"/>
        <category android:name="android.intent.category.BROWSABLE"/>
        <data android:scheme="https"/>
    </intent>
    <intent>
        <action android:name="android.support.customtabs.action.CustomTabsService"/>
    </intent>
</queries>
<queries>
    <intent>
        <action android:name="android.intent.action.MAIN"/>
        <category android:name="android.intent.category.HOME"/>
    </intent>
</queries>
<queries>
    <package android:name="com.x0.strai.secondkey"/>
</queries>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<permission android:name="com.frep3.csi.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION" android:protectionLevel="signature"/>
<uses-permission android:name="com.frep3.csi.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION"/>
<application android:allowBackup="false" android:appComponentFactory="androidx.core.app.CoreComponentFactory" android:dataExtractionRules="@xml/data_extraction_rules" android:extractNativeLibs="true" android:icon="@mipmap/ic_launcher" android:installLocation="internalOnly" android:label="@string/app_name" android:persistableMode="persistNever" android:roundIcon="@mipmap/ic_launcher_round" android:sharedUserId="com.x0.strai" android:theme="@style/AppCompatTheme">
    <meta-data android:name="android.max_aspect" android:value="4.0"/>
    <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-1496742143628830~8575609656"/>
    <meta-data android:name="com.google.android.gms.ads.DELAY_APP_MEASUREMENT_INIT" android:value="true"/>
    <meta-data android:name="firebase_analytics_collection_enabled" android:value="false"/>
    <service android:exported="true" android:foregroundServiceType="mediaProjection" android:name="com.frep3.csi.FingerService">
        <intent-filter>
            <action android:name="com.x0.strai.frepsecond.action.NOTIFICATION"/>
        </intent-filter>
    </service>
    <service android:enabled="true" android:exported="false" android:label="@string/accessibility_name" android:name="com.frep3.csi.FingerAccService" android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE">
        <intent-filter>
            <action android:name="android.accessibilityservice.AccessibilityService"/>
        </intent-filter>
        <meta-data android:name="android.accessibilityservice" android:resource="@xml/accservice"/>
    </service>
    <service android:exported="true" android:name="com.frep3.csi.InitService"/>
    <activity android:configChanges="keyboardHidden|orientation|screenSize" android:exported="true" android:label="@string/app_name" android:launchMode="singleTop" android:name="com.frep3.csi.MainActivity" android:theme="@style/AppCompatTheme">
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
    </activity>
    <activity android:configChanges="keyboardHidden|orientation|screenSize" android:exported="true" android:icon="@mipmap/ic_shortcut_notag" android:label="@string/app_shortcutselector" android:name="com.frep3.csi.ShortcutActivity" android:roundIcon="@mipmap/ic_shortcut_notag">
        <intent-filter>
            <action android:name="android.intent.action.CREATE_SHORTCUT"/>
            <category android:name="android.intent.category.DEFAULT"/>
            <action android:name="com.twofortyfouram.locale.intent.action.EDIT_SETTING"/>
        </intent-filter>
    </activity>
    <activity android:configChanges="keyboardHidden|orientation|screenSize" android:exported="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_onfinishselector" android:name="com.frep3.csi.TaskerEditActivity" android:roundIcon="@mipmap/ic_launcher_round">
        <intent-filter>
            <action android:name="net.dinglisch.android.tasker.ACTION_EDIT_EVENT"/>
        </intent-filter>
    </activity>
    <activity android:clearTaskOnLaunch="true" android:configChanges="keyboardHidden|orientation|screenSize" android:excludeFromRecents="true" android:exported="true" android:label="@string/app_editsummary" android:name="com.frep3.csi.EditSummaryActivity" android:noHistory="true" android:theme="@style/AppCompatTheme.Dialog">
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
        </intent-filter>
    </activity>
    <activity android:clearTaskOnLaunch="true" android:configChanges="keyboardHidden|orientation|screenSize" android:excludeFromRecents="true" android:exported="true" android:label="@string/app_replacesummary" android:name="com.frep3.csi.EditReplaceActivity" android:noHistory="true" android:theme="@style/AppCompatTheme.Dialog">
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
        </intent-filter>
    </activity>
    <activity android:clearTaskOnLaunch="true" android:excludeFromRecents="true" android:exported="true" android:label="@string/app_request" android:launchMode="singleInstance" android:name="com.frep3.csi.RequestActivity" android:theme="@style/Theme.Transparent">
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
        </intent-filter>
    </activity>
    <activity android:clearTaskOnLaunch="true" android:excludeFromRecents="true" android:exported="true" android:label="@string/app_name" android:launchMode="singleTop" android:name="com.frep3.csi.ClipboardActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar">
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
        </intent-filter>
    </activity>
    <activity android:clearTaskOnLaunch="true" android:excludeFromRecents="true" android:exported="true" android:label="@string/app_trigger" android:launchMode="singleTop" android:name="com.frep3.csi.TriggerActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar">
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
        </intent-filter>
    </activity>
    <receiver android:exported="true" android:name="com.frep3.csi.FireReceiver">
        <intent-filter>
            <action android:name="com.twofortyfouram.locale.intent.action.FIRE_SETTING"/>
            <action android:name="com.twofortyfouram.locale.intent.action.QUERY_CONDITION"/>
            <action android:name="android.intent.action.BOOT_COMPLETED"/>
        </intent-filter>
    </receiver>
    <activity android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode" android:exported="false" android:name="com.google.android.gms.ads.AdActivity" android:theme="@android:style/Theme.Translucent"/>
    <provider android:authorities="com.frep3.csi.mobileadsinitprovider" android:exported="false" android:initOrder="100" android:name="com.google.android.gms.ads.MobileAdsInitProvider"/>
    <service android:enabled="true" android:exported="false" android:name="com.google.android.gms.ads.AdService"/>
    <activity android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode" android:exported="false" android:name="com.google.android.gms.ads.OutOfContextTestingActivity"/>
    <activity android:exported="false" android:name="com.google.android.gms.common.api.GoogleApiActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar"/>
    <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>
    <uses-library android:name="androidx.window.extensions" android:required="false"/>
    <uses-library android:name="androidx.window.sidecar" android:required="false"/>
    <provider android:authorities="com.frep3.csi.androidx-startup" android:exported="false" android:name="androidx.startup.InitializationProvider">
        <meta-data android:name="androidx.emoji2.text.EmojiCompatInitializer" android:value="androidx.startup"/>
        <meta-data android:name="androidx.work.WorkManagerInitializer" android:value="androidx.startup"/>
        <meta-data android:name="androidx.lifecycle.ProcessLifecycleInitializer" android:value="androidx.startup"/>
    </provider>
    <service android:directBootAware="false" android:enabled="@bool/enable_system_alarm_service_default" android:exported="false" android:name="androidx.work.impl.background.systemalarm.SystemAlarmService"/>
    <service android:directBootAware="false" android:enabled="@bool/enable_system_job_service_default" android:exported="true" android:name="androidx.work.impl.background.systemjob.SystemJobService" android:permission="android.permission.BIND_JOB_SERVICE"/>
    <service android:directBootAware="false" android:enabled="@bool/enable_system_foreground_service_default" android:exported="false" android:name="androidx.work.impl.foreground.SystemForegroundService"/>
    <receiver android:directBootAware="false" android:enabled="true" android:exported="false" android:name="androidx.work.impl.utils.ForceStopRunnable$BroadcastReceiver"/>
    <receiver android:directBootAware="false" android:enabled="false" android:exported="false" android:name="androidx.work.impl.background.systemalarm.ConstraintProxy$BatteryChargingProxy">
        <intent-filter>
            <action android:name="android.intent.action.ACTION_POWER_CONNECTED"/>
            <action android:name="android.intent.action.ACTION_POWER_DISCONNECTED"/>
        </intent-filter>
    </receiver>
    <receiver android:directBootAware="false" android:enabled="false" android:exported="false" android:name="androidx.work.impl.background.systemalarm.ConstraintProxy$BatteryNotLowProxy">
        <intent-filter>
            <action android:name="android.intent.action.BATTERY_OKAY"/>
            <action android:name="android.intent.action.BATTERY_LOW"/>
        </intent-filter>
    </receiver>
    <receiver android:directBootAware="false" android:enabled="false" android:exported="false" android:name="androidx.work.impl.background.systemalarm.ConstraintProxy$StorageNotLowProxy">
        <intent-filter>
            <action android:name="android.intent.action.DEVICE_STORAGE_LOW"/>
            <action android:name="android.intent.action.DEVICE_STORAGE_OK"/>
        </intent-filter>
    </receiver>
    <receiver android:directBootAware="false" android:enabled="false" android:exported="false" android:name="androidx.work.impl.background.systemalarm.ConstraintProxy$NetworkStateProxy">
        <intent-filter>
            <action android:name="android.net.conn.CONNECTIVITY_CHANGE"/>
        </intent-filter>
    </receiver>
    <receiver android:directBootAware="false" android:enabled="false" android:exported="false" android:name="androidx.work.impl.background.systemalarm.RescheduleReceiver">
        <intent-filter>
            <action android:name="android.intent.action.BOOT_COMPLETED"/>
            <action android:name="android.intent.action.TIME_SET"/>
            <action android:name="android.intent.action.TIMEZONE_CHANGED"/>
        </intent-filter>
    </receiver>
    <receiver android:directBootAware="false" android:enabled="@bool/enable_system_alarm_service_default" android:exported="false" android:name="androidx.work.impl.background.systemalarm.ConstraintProxyUpdateReceiver">
        <intent-filter>
            <action android:name="androidx.work.impl.background.systemalarm.UpdateProxies"/>
        </intent-filter>
    </receiver>
    <receiver android:directBootAware="false" android:enabled="true" android:exported="true" android:name="androidx.work.impl.diagnostics.DiagnosticsReceiver" android:permission="android.permission.DUMP">
        <intent-filter>
            <action android:name="androidx.work.diagnostics.REQUEST_DIAGNOSTICS"/>
        </intent-filter>
    </receiver>
    <service android:directBootAware="true" android:exported="false" android:name="androidx.room.MultiInstanceInvalidationService"/>
</application>

dvaoru commented 1 year ago

Hello. I solve one issue with deep renaming in the last release. And it correctly works with renaming the provider (the ads in your case). But in your app I meet new problem. There are a shared libraryes libfrep2.so and libstrjni.so in the package. And they have strings with package name, for example 'Java_com_x0_strai_secondfreq_StrNative_cs'. I tried to change it too, but after launcing the app still throw exeption: "java.lang.UnsatisfiedLinkError: No implementation found for boolean com.x0.strai.secondfreq.StrNative.cs(byte[]) (tried Java_com_x0_strai_secondfreq_StrNative_cs and Java_com_x0_strai_secondfreq_StrNative_cs___3B)" Now I have no idea how I can right rename this in the libraryes.

SangdonLee972 commented 1 year ago

Thank you for your feedback

So, the another issue is not solving and its just only apk problem right? i want know that you might solve this frep2 apk issue with your lib.

I encountered this problem and I really want to know this solution. I hope that you find solution of this issue.

Hope you will taht good result. Thank you for the asked.