[HOW TO][GUIDE][MOD] Change Package Names of APKs

Xtreme.Ornob

Senior Member
Mar 13, 2013
156
443
63
Chittagong
I’ve Seen A Lot of People around Here and Other Forums who wants to know how to change the Package Name of Android Apps
Code:
(Ex. [COLOR="Red"]com.xvipre.settings[/COLOR] to [COLOR="Blue"]com.modded.app[/COLOR])
But some of them can’t really do it because of proper Programming Skills and Development Knowledge!

So today I will show you how to do it! Without Programming Skills or Extra Development!

Caution: Only use this if the App is Open-Source and ask for Developer Rights before doing this!
I and XDA do not support Piracy! So don’t try to ruin Humanity by doing Piracy of Apps!

So This shall be Only Used for Learning and Development Purposes!

Requirements:
· A Brain
· Apktool
· An APK to Work With!
· PC/Android Device
· DroidEdit/Notepad++
· A Little Knowledge in DroidEdit or Notepad++



Now Let’s Start—

At First Decompile your APK using a Suitable and comfortable apktool. Use Apk-Multitool/Virtuous or other Tools.
As you can see there are 2 files and 2 Folders inside Decompiled XVipreSetting.apk Folder.
└── XVipreSettings.apk
├── AndroidManifest.xml
├── apktool.yml
├── res
└── smali
Lets assume that our APK Information is like this—
APK Name: XVipreSettings.apk
APK Package Name: com.xvipre.settings
We’ll Change it to the following—
APK Name: ModdedApp.apk
APK Package Name: com.modded.app
Before you begin, Let me tell you that all the modification done in this Project are Imaginary!
You have to assume that the package is com.xvipre.settings but actually it’s different for each app in the world! So you must know about what you are going to do, and what all these means!
It’s just an example! You have to use your app’s package and your desired app package name! Or Else it won’t Work at all!
Now Open apktool.yml and Search for these lines--
Code:
apkFileName: [COLOR="red"]XVipreSettings.apk[/COLOR]
And
Code:
packageInfo:
  cur_package: [COLOR="Red"]com.xvipre.settings[/COLOR]
  orig_package: [COLOR="red"]com.xvipre.settings[/COLOR]



Now Edit the Package Name and APK Name as You Desire—
For Example:
Code:
apkFileName: [COLOR="blue"]ModdedApp.apk[/COLOR]
And
Code:
packageInfo:
  cur_package: [COLOR="blue"]com.modded.app[/COLOR]
  orig_package: [COLOR="blue"]com.modded.app[/COLOR]



Save the File and Close apktool.yml
Now Open AndroidManifest.xml and Look for these lines—
Code:
<manifest android:hasCode="false" android:versionCode="14" android:versionName="2.1" android:installLocation="internalOnly" package="[COLOR="red"]com.xvipre.settings[/COLOR]"



Now Edit the Package name here—
For Example:
Code:
<manifest android:hasCode="false" android:versionCode="14" android:versionName="2.1" android:installLocation="internalOnly" package="[COLOR="Blue"]com.modded.app[/COLOR]"




Save and Exit.

Now Navigate to /smali/com/xvipre and Do the Following
· Rename settings to app





· Go Back to /smali/com Folder and Rename xvipre to modded






Now It’s Time to Go Hardcore!!
Open Notepad++ And Press Ctrl+F to Open “Find”
Click on Find in Files
Now in Directory, Click on “Browse” or “…”



Now Navigate to your Working Folder and Select /smali/



Now Click on Find What: and Type Your Package Name! But Like This—
Code:
[COLOR="Red"]Lcom/xvipre/settings[/COLOR]
Click on Replace With: and Type Your Desired Package name—
For Example:
Code:
[COLOR="blue"]Lcom/modded/app[/COLOR]
Click on Replace in Files



Now It Shall take up to 1-2 Minutes to Find and Replace all the package names in smalis!

When Done, Just Re-Check All the Files, Folder Names, Recheck AndroidManifest.xml to Find Another Line with Package name And Make Corrections Yourself!
Done for Now! Just Re-Compile and *SIGN* your Newly Created APK!!
Install the APK as User App! See if it Worked! :D
If you Like my Guide… Just Leave a little Thanks! :) :)

Comment if this guide has mistakes or I said anything Wrong, About Errors or Suggestions!

Written by Xtreme Ornob
Official Developer of XVipre


Thanks to
Google Inc.
XDA-Developers.
Mushfiqus Salehin (For giving me the Title of “Debeloper Sab” in Bangladeshi Groups)
Everyone Hail to Sadia Afrin Rumu for Teaching me the Usage of Android And Facebook Groups.

She’s an idol to me as she made me realize that I am a “Dim” and also a “Choto Pola”
 
Last edited:

Xtreme.Ornob

Senior Member
Mar 13, 2013
156
443
63
Chittagong
@Shahzeb5444

Then You'll have to make a Folder named "something" and put your activities (.smali) in there :)

For Example Create a folder like this /com/modded/app/*something*

Then Go Back to /app and Cut everything from there and paste into /something

Then Follow the guide from the top :) :)
 
  • Like
Reactions: Shahzeb5444

barth2

Senior Member
Jan 30, 2014
580
226
0
Excellent tutorial. Thanks.

I like to add a couple of things

1) in some cases, you also need to change the package name in all *.xml under res/ not just in AndroidManifest.xml, because there may be layouts that refer to the package. In above example, you want to replace

com.xvipre.settings
with
com.modded.app

in all *.xml files under res/

2) You probably want to give the app a different name, too. In AndroidManifest.xml find

Code:
<application blahblahblah. android:label="xxxx" blahblahblah.>
xxxx may be something like My Awesome App or @string/app_name. Just replace that with what name you want. This is the user friendly name that will appear in the home screen, app drawer, etc.

Someone coming across this may wonder what are concrete, LEGITIMATELY reasons to want to do this. I can tell you why /I/ did it.

a/ I have an app that does not support multiple accounts. I asked the dev to add it, and of course he was like okay I'll think about it, which meant like never :) So I decompiled the app, made a new package name, and now I have a cloned app that has its own separate set of account and settings.

b/ I have another app that I made some mods to, for my own education and use. But I want to keep the original app for reference. Also, in case something funky happens in the modded app, I want to make sure I can reproduce the bug in the original app before I report it to the dev.
 

Matrixie

Senior Member
Jun 10, 2014
76
17
0
I've tried to do this for Snapchat - I have two different accounts, and I want to be able to have two versions of Snapchat installed so that I can use both accounts simultaneously. Currently my only work around is to use a 3rd party app, as there is no other way round it. However third party apps for Snapchat mostly suck balls, and are not up to date. When I tried following this guide, everyt time I ran the new APK it just quit. Any suggestions on how to achieve getting two Snapchat accounts running simultaneously?
 
  • Like
Reactions: computerpark

[email protected]

Senior Member
Aug 17, 2013
595
2,190
0
Mumbai
Well it's Good to see.....you made good guide...bt i want to inform you....if u trash this thread then it will be great...i know u will ask why.....the question is here in this world lot of developer made app with hardcore time and using brain...bt there is also lots of noobs which will change apk name to something else and may be they get credit ,profit instead of original developer
hope u understand what i mean
 

Shaftamle

Recognized Themer
Nov 6, 2012
2,390
5,313
0
Ellicott City
Well it's Good to see.....you made good guide...bt i want to inform you....if u trash this thread then it will be great...i know u will ask why.....the question is here in this world lot of developer made app with hardcore time and using brain...bt there is also lots of noobs which will change apk name to something else and may be they get credit ,profit instead of original developer
hope u understand what i mean
So you missed this paragraph??
Caution: Only use this if the App is Open-Source and ask for Developer Rights before doing this!
I and XDA do not support Piracy! So don’t try to ruin Humanity by doing Piracy of Apps!

There is nothing wrong with this thread. Threads don't pirate apps. People pirate apps. Its called personal responsibility.

Nice wright up @Xtreme.Ornob

Sent from a Shaftamle Galaxy S4
"Thanks Button" is always appreciated!
149ThemedGoogleKeyboards!!!!!!
If you root your phone, you need to know this!!
MyColorScreen
 
  • Like
Reactions: [email protected]

[email protected]

Senior Member
Aug 17, 2013
595
2,190
0
Mumbai
So you missed this paragraph??
Caution: Only use this if the App is Open-Source and ask for Developer Rights before doing this!
I and XDA do not support Piracy! So don’t try to ruin Humanity by doing Piracy of Apps!

There is nothing wrong with this thread. Threads don't pirate apps. People pirate apps. Its called personal responsibility.

Nice wright up @Xtreme.Ornob

Sent from a Shaftamle Galaxy S4
"Thanks Button" is always appreciated!
149ThemedGoogleKeyboards!!!!!!
If you root your phone, you need to know this!!
MyColorScreen
ya forgot:)
 

i_4_u89

Senior Member
Oct 17, 2011
108
25
0
mumbai
I’ve Seen A Lot of People around Here and Other Forums who wants to know how to change the Package Name of Android Apps
Code:
(Ex. [COLOR="Red"]com.xvipre.settings[/COLOR] to [COLOR="Blue"]com.modded.app[/COLOR])
But some of them can’t really do it because of proper Programming Skills and Development Knowledge!

So today I will show you how to do it! Without Programming Skills or Extra Development!

Caution: Only use this if the App is Open-Source and ask for Developer Rights before doing this!
I and XDA do not support Piracy! So don’t try to ruin Humanity by doing Piracy of Apps!

So This shall be Only Used for Learning and Development Purposes!

Requirements:
· A Brain
· Apktool
· An APK to Work With!
· PC/Android Device
· DroidEdit/Notepad++
· A Little Knowledge in DroidEdit or Notepad++



Now Let’s Start—

At First Decompile your APK using a Suitable and comfortable apktool. Use Apk-Multitool/Virtuous or other Tools.
As you can see there are 2 files and 2 Folders inside Decompiled XVipreSetting.apk Folder.


Lets assume that our APK Information is like this—
APK Name: XVipreSettings.apk
APK Package Name: com.xvipre.settings
We’ll Change it to the following—
APK Name: ModdedApp.apk
APK Package Name: com.modded.app
Before you begin, Let me tell you that all the modification done in this Project are Imaginary!
You have to assume that the package is com.xvipre.settings but actually it’s different for each app in the world! So you must know about what you are going to do, and what all these means!
It’s just an example! You have to use your app’s package and your desired app package name! Or Else it won’t Work at all!
Now Open apktool.yml and Search for these lines--
Code:
apkFileName: [COLOR="red"]XVipreSettings.apk[/COLOR]
And
Code:
packageInfo:
  cur_package: [COLOR="Red"]com.xvipre.settings[/COLOR]
  orig_package: [COLOR="red"]com.xvipre.settings[/COLOR]



Now Edit the Package Name and APK Name as You Desire—
For Example:
Code:
apkFileName: [COLOR="blue"]ModdedApp.apk[/COLOR]
And
Code:
packageInfo:
  cur_package: [COLOR="blue"]com.modded.app[/COLOR]
  orig_package: [COLOR="blue"]com.modded.app[/COLOR]



Save the File and Close apktool.yml
Now Open AndroidManifest.xml and Look for these lines—
Code:
<manifest android:hasCode="false" android:versionCode="14" android:versionName="2.1" android:installLocation="internalOnly" package="[COLOR="red"]com.xvipre.settings[/COLOR]"



Now Edit the Package name here—
For Example:
Code:
<manifest android:hasCode="false" android:versionCode="14" android:versionName="2.1" android:installLocation="internalOnly" package="[COLOR="Blue"]com.modded.app[/COLOR]"




Save and Exit.

Now Navigate to /smali/com/xvipre and Do the Following
· Rename settings to app





· Go Back to /smali/com Folder and Rename xvipre to modded






Now It’s Time to Go Hardcore!!
Open Notepad++ And Press Ctrl+F to Open “Find”
Click on Find in Files
Now in Directory, Click on “Browse” or “…”



Now Navigate to your Working Folder and Select /smali/



Now Click on Find What: and Type Your Package Name! But Like This—
Code:
[COLOR="Red"]Lcom/xvipre/settings[/COLOR]
Click on Replace With: and Type Your Desired Package name—
For Example:
Code:
[COLOR="blue"]Lcom/modded/app[/COLOR]
Click on Replace in Files



Now It Shall take up to 1-2 Minutes to Find and Replace all the package names in smalis!

When Done, Just Re-Check All the Files, Folder Names, Recheck AndroidManifest.xml to Find Another Line with Package name And Make Corrections Yourself!
Done for Now! Just Re-Compile and *SIGN* your Newly Created APK!!
Install the APK as User App! See if it Worked! :D
If you Like my Guide… Just Leave a little Thanks! :) :)

Comment if this guide has mistakes or I said anything Wrong, About Errors or Suggestions!

Written by Xtreme Ornob
Official Developer of XVipre


Thanks to
Google Inc.
XDA-Developers.
Mushfiqus Salehin (For giving me the Title of “Debeloper Sab” in Bangladeshi Groups)
Everyone Hail to Sadia Afrin Rumu for Teaching me the Usage of Android And Facebook Groups.

She’s an idol to me as she made me realize that I am a “Dim” and also a “Choto Pola”
Thanks for This Tutorial

Can i do this or work in Whatsapp

can u tell me Whatsapp Tutorial
 

Shaftamle

Recognized Themer
Nov 6, 2012
2,390
5,313
0
Ellicott City
Thanks for This Tutorial

Can i do this or work in Whatsapp

can u tell me Whatsapp Tutorial
It should work for any app. Change the WhatsApp package name to whatever u like per the OP. Also, in the future don't quote the main post of any thread . it just clutters everything up. Just use the @ sign with whoever's name after it. Example: @i_4_u89

Sent from a Shaftamle Galaxy S4
"Thanks Button" is always appreciated!
149ThemedGoogleKeyboards!!!!!!
Eclipse ROM fatness!
MyColorScreen
 
  • Like
Reactions: i_4_u89

i_4_u89

Senior Member
Oct 17, 2011
108
25
0
mumbai
@Shaftamle :thank you for reply caN you help me for my 1st whatsapp mods
im working with WA-2-12.58 i want to add all hide feature on stock WA
an with my new pkg name plz tell me the tutorial

Thank you
 

hitulg

Senior Member
Aug 12, 2012
151
7
0
Mumbai
I've tried to do this for Snapchat - I have two different accounts, and I want to be able to have two versions of Snapchat installed so that I can use both accounts simultaneously. Currently my only work around is to use a 3rd party app, as there is no other way round it. However third party apps for Snapchat mostly suck balls, and are not up to date. When I tried following this guide, everyt time I ran the new APK it just quit. Any suggestions on how to achieve getting two Snapchat accounts running simultaneously?
Did it work for you? Please do reply me.. I'm trying this for Snapchat as well..
 

Matrixie

Senior Member
Jun 10, 2014
76
17
0
That means you have 2 Snapchat accounts running simultaneously on your phone? If yes, please PM me the apk... Please!
Sorry, I wasn't clear - yes, I have two Snapchat accounts running simultaneously, but only through Lolipop's inbuilt multiple user accounts feature. I use the Guest account for one Snapchat account, and my own account for my other one.
 
Last edited:

catelusii

Senior Member
Sep 1, 2010
388
216
0
Hi
I only have forced-package-id: '127'
in my apktool.yml, i have not got

packageInfo:
cur_package:
orig_package:

but instead have got

packageInfo:
forced-package-id: '127'

Haw can I do?
PLEASE!