Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,781,011 Members 47,568 Now Online
XDA Developers Android and Mobile Development Forum

APK Batch Rename Tool (for Windows and Linux)

Tip us?
 
phsorx
Old
(Last edited by phsorx; 21st March 2011 at 06:10 PM.) Reason: linux port added
#1  
phsorx's Avatar
Junior Member - OP
Thanks Meter 48
Posts: 16
Join Date: Nov 2010

 
DONATE TO ME
Lightbulb APK Batch Rename Tool (for Windows and Linux)

Hi guys!

This is a quick tool I jotted together for myself in the past couple days and found it very useful. So I decided to clean it up and share it. Hope you will like it! Do comment and ask!



APK Batch Rename Tool
* for Windows and Linux for now.

APK Batch Rename Tool recursively crawls input folder and all of its subfolders looking for Android Package files (.apk's). It reads Label and Version info from apk's found and creates a copy for each apk under the output folder but using the Label and Version info acquired.

For example a com.example.hw.apk will make Hello World! 1.21.apk provided that the label inside the package was set to Hello World! and version is 1.21.

The old and the new apk files are 100% the same in terms of content and are unchanged. Only the new copies are given new filenames. Input files are left completely intact.

Why?
Have you ever wondered what are your 1500+ apk files with wierd names nested to different wierd folders on your harddrive? Have you ever wanted to find an app but you were unable to because it had some undescriptive javaish name that made no sense reflected no version and your apps were swept across a hundred junk folders anyway? Then APK Batch Rename is the tool for you! And me!
APK Batch Rename will set a human readable name for all your Android apps, and drop such a copy into a folder. You will finally be able to browse them, sort them alphabetically and be able to pick from versions available.

How?
1. Copy all your apk files (or folders with apk files in them) into the input folder. You may copy folders of any depth. APK Batch Rename Tool will recurse all subfolders of the input folder anyway.
2. Hit or click ApkBatchRename.bat . (For Linux users it's: apkbatchrename, or on a terminal enter: ./apkbatchrename ) Wait until it finishes the job.
3. Find your freshly named files in the output folder.

Simple as that!

Have fun! & Comment!

phsorx
Attached Files
File Type: zip ApkRename1.10.zip - [Click for QR Code] (1.53 MB, 8617 views)
File Type: zip ApkRename1.10-Linux.zip - [Click for QR Code] (243.0 KB, 840 views)
Phsorx
My Phone: HTC Desire - Android 2.2
My Works: [ApkRename - APK Batch Rename Tool]

Donate: $2.00 to support my work
The Following 42 Users Say Thank You to phsorx For This Useful Post: [ Click to Expand ]
 
vua777
Old
#2  
vua777's Avatar
Senior Member
Thanks Meter 91
Posts: 559
Join Date: Jun 2005
great work, just like reading mp3 tag then rename to "song - artist.mp3"
thanks!
* Phone: O2 Mini (Magician) ► O2 trion (Hermes) ► HTC Touch HD (Blackstone) & HD2 (Leo) ► White HTC One X (Endeavor) ► Red HTC One (M7)

* Tablet: Galaxy Tab Plus (P6200)
 
freco
Old
#3  
freco's Avatar
Senior Member
Thanks Meter 57
Posts: 699
Join Date: May 2007
Location: Athens
Cool. I use to do it manually. Time saver app.
Thanks.
Galaxy Note 2 rules... Rom: Testing almost all available options
XDA & KTM Adventure 990 Fanatic

Don't be rude. If someone help you press thanks.
 
raven_raven
Old
#4  
raven_raven's Avatar
Senior Member
Thanks Meter 39
Posts: 564
Join Date: Apr 2010
Location: Poznań
This is awesome! Thank you very much, situation you described in first post is just like mine, I find your tool very useful!
 
htzs
Old
#5  
htzs's Avatar
Senior Member
Thanks Meter 52
Posts: 188
Join Date: Sep 2010
Location: Budapest
Folks,

Let me join you crediting phsorx's job, that app is just great!
Thanks and congrats!
 
britoso
Old
(Last edited by britoso; 8th December 2010 at 04:57 PM.)
#6  
britoso's Avatar
Senior Member
Thanks Meter 282
Posts: 2,725
Join Date: Jan 2010
Location: Orlando

 
DONATE TO ME
Very cool, Works well. Always wanted to do this but was too lazy to try aapt.

I just checked:
Quote:
Originally Posted by aapt
badging Print the label and icon for the app declared in APK.
Code:
> aapt d badging Talk.apk
package: name='com.google.android.talk' versionCode='130' versionName='1.3'
sdkVersion:'8'
targetSdkVersion:'8'
uses-permission: **truncated***
application: label='Talk' icon='res/drawable-hdpi/ic_launcher_google_talk.png'
uses-feature:'android.hardware.touchscreen'
main
other-activities
search
other-receivers
supports-screens: 'small' 'normal' 'large'
locales: '--_--' 'es' 'es_US'
densities: '160' '240'
I'll definitely use your script but with a small change to show the package name as well as its valuable for when you need to uninstall the package.
i.e label_packagename(version).apk -> Talk_com.google.android.talk(1.3).apk

Attached a slightly modified batch file and screenshot

For single file one-off renames (right-click->open with->rename single) you can use the script here.
Attached Thumbnails
Click image for larger version

Name:	Capture.JPG
Views:	673
Size:	15.7 KB
ID:	442435  
Attached Files
File Type: zip ApkRename.bat_mod-packagename.zip - [Click for QR Code] (774 Bytes, 543 views)
Software Developer (Java/J2EE)
Phone: Nexus 5 32GB -> PA 4.4.2 + XPosed
Phone: Galaxy Nexus-> OmniMetal CM11
Phone: Nexus One (killed while replacing the digitizer)-> CM10.1 AOKP Unofficial Nightlies
Tablet
: Nook Color -> CM10.1 Nightlies
Tablet
: HP Touchpad -> CM10.1 -SCHIZOID
Stick: CX-919 RK3188/2GB (4.2.2 Finless 1.6b. FHD no-OC. Antutu 16753 Quadrant 4723)

Links:
»My Apps (ancient now) [CPUStatusLED] [MoreRecent]
»My Threads
»My Posts
»Transparent widgets
The Following User Says Thank You to britoso For This Useful Post: [ Click to Expand ]
 
phsorx
Old
#7  
phsorx's Avatar
Junior Member - OP
Thanks Meter 48
Posts: 16
Join Date: Nov 2010

 
DONATE TO ME
De jo! Honfitars. Hajra Magyarok!
 
phsorx
Old
#8  
phsorx's Avatar
Junior Member - OP
Thanks Meter 48
Posts: 16
Join Date: Nov 2010

 
DONATE TO ME
Thumbs up Customizable naming planned in future version

Quote:
Originally Posted by britoso View Post
Very cool, Works well. Always wanted to do this but was too lazy to try appt.

i.e label_packagename(version).apk -> Talk_com.google.android.talk(1.3).apk
Hi Britoso,

Yeah! That's a neat way to do it too!

Eventually I want to make naming and spacing fully customizable! Including what attributes to pick (name, label, versionName) to constitute the filename, and what separators (_,-,(,),space) should go where.

In the howto.txt I have a little road-map for the project. Will add customizable naming too.

Will keep you guys posted.

EOF
phsorx

Ps: Anyone who has another naming suggestion drop a post! I'd be interested.
The Following User Says Thank You to phsorx For This Useful Post: [ Click to Expand ]
 
minjiet
Old
#9  
Senior Member
Thanks Meter 13
Posts: 412
Join Date: Jan 2010
great job...bravo..

thanks
 
jjwa
Old
(Last edited by jjwa; 16th November 2010 at 05:33 PM.)
#10  
Senior Member
Thanks Meter 10
Posts: 220
Join Date: Jun 2010
Location: Enschede
Very nice tool, thanks for sharing this .
Using it with britoso's edited script.

Edit: I would appreciate it if a log of the conversion would be saved in a \logs\ subfolder, so I can check which files were not converted properly and see if I have to do those manually.

Tags
apk, batch, multi, package, rename
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes