Skip to content
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

Improve the project with different ideas #1

Open
mahyarkermani opened this issue Apr 27, 2023 · 0 comments
Open

Improve the project with different ideas #1

mahyarkermani opened this issue Apr 27, 2023 · 0 comments

Comments

@mahyarkermani
Copy link

Hi mate, I found some problems in your code. First, you replace the customized AndroidManifest.xml file with the AndroidManifest.xml payload file. Your customized file is incomplete and short (compared to the original file), and on the other hand, there is no need to do this.

  • You only need to add the word android:icon="@drawable/icon" in the <application android:label="@string/app_name"> line (which you can use regex to find its location and replace the text). By using this feature, the original AndroidManifest.xml file will not be replaced and the main characteristics of the payload will not be removed.

The second problem is that you used the mv command to change the name of the payload file, but this command only changes the nickname of the file in Linux, and you have to change the App Name so that when you install the apk file on target device, the apk name changes correctly (in your method, the previous payload name is still preserved during installation).

  • The solution to this task is to change the name of the payload in the Payload_Folder/res/values/strings.xml path to the desired name, For example:
# main file: **Payload_Folder/res/values/strings.xml**
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="app_name">**MainActivity**</string>
</resources>

# Custom file
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="app_name">**Telegram**</string>
</resources>

The next idea is that you can receive the icon directly from the user, so that the user can set the desired icon. The icon size must be 512 x 512 (no more, no less). Try not to place any file directly in the payload (because you remove the features of the payload file), you can identify the desired lines in the payload files and inject the necessary texts in the main files with regex and some Linux commands.
Anyway, I used your script and learned a lot of ideas and things. I didn't change your code and that's why I didn't send you a Pull requests. These were my ideas to improve your project, and you can implement these ideas in your code in your free time, improve your project and republish them in this repository. I look forward to your updates with the challenges I gave you. Good luck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant