• 5,605,921
  • 47,454

Posts Tagged: Script


Some of you may think that writing code is the hardest part of development. It’s not, as the real fun starts when you have to debug an application or function. That’s why Android Debug Bridge is so important, and you can find images like this in many threads. And obviously, digging through thousands of logcat lines is every developer’s “favorite” activity.

Logcat likes to bombard users with more or less relevant information regarding various issues. To free yourself from mpdecision, thermal-engine and sensors.msm8960.so warnings, you should try out a script written by XDA Recognized Developer and Contributor broodplank1337. Lib Cleaner removes the specific lines of code from proprietary files with the Swiss File Knife tool, which replaces HEX strings and makes the code more readable. Those three files are not the only one that can be modified. It’s possible to add your own scripts and clean even more unnecessary code. The script is designed for Ubuntu-based destroys, and needs some editing to be used with Arch, Fedora, or other Linux branches.

If you are a developer or advanced user trying to find out what’s wrong with an application or newly added code, make your way to the original thread and give Lib Cleaner a try. Just keep in mind that Google added these lines forma purpose and removing them may result in unexpected behavior.


Ever heard about Docker? If you have, you surely know what a great piece of development work it is. If you haven’t, I’m going to explain what exactly Docker is and why it should be considered in the Android development world. Quoting the Docker website:

Docker is an open-source engine that automates the deployment of any application as a lightweight, portable, self-sufficient container that will run virtually anywhere.

Docker containers can encapsulate any payload, and will run consistently on and between virtually any server. The same container that a developer builds and tests on a laptop will run at scale, in production*, on VMs, bare-metal servers, OpenStack clusters, public instances, or combinations of the above.

In plain English: Docker provides a standardized method of putting your applications into a server or other type of hosting or storage.

So why is this relevant? Well, Docker can be used to build a CyanogenMod really easily, without reliance on dependencies, requirements, and even files itself. This is all thanks to XDA Forum Member michael_ch, who created a Docker script that puts together all dependencies, install them in the container on your PC, and allows you to start an Android build process with just few commands.

All you need to do is initialize the repo, sync it, and type standard commands to start a build. To properly use this script, you need to have Docker installed on your system. Officially only Linux is supported, but there are some instructions to launch it on Mac or even Windows. If you never tried Docker before, building a CyanogenMod using the tool might be a nice learning experience.

You can find more about the script by visiting the original thread, and you can learn more about Docker at their official website.


Android is an operating system that uses a lot of programming languages. The most common languages are Java (or Android Java if you prefer), C, XML, Bash, as well as a few more. Android applications can be decompiled by APKTool and a few similar tools, and their output is Smali. I know that many of you will disagree with me, but Smali is quite complicated language—much more than Java.

There are two tools that can convert Smali back to Java: Dex2Jar and JAD. They are pretty hard to use, though, and need some experience to use them properly. Luckily, XDA Recognized Developer broodplank1337 created a simple bash script, that does all the work for us. This script can get all necessary dependencies, as well as get the Java code straight from APK. It works on Linux only, but I’m quite sure that can be used on non UNIX-like systems like Windows with Cygwin. The developer recommends that you put the file in ~/bin and make it executable. Further instructions are available in the thread.

Sometimes scripts can make life a lot easier. If you are interested in the project, make your way to the original thread to get more information and learn how to convert assembler code into Java.

Note: Tools like this should be used for educational purposes. “Borrowing” code from applications (paid or free) is unethical and should not take place. They are closed source for a reason. Keep that in mind.


CyanogenMod is one of the most popular multi-device ROMs. It is also the base for many custom ROMs available here on XDA. It supports a long list of devices, which makes it one of the most recognizable custom ROMs available.

Of course, CyanogenMod is an AOSP-derived  ROM, which means that much of the project comes from source code on Google’s Android repos. It is also open source, with sources freely available to anyone looking to build upon the team’s work. Unfortunately, not every element of CM is open, as some application and libraries are delivered as proprietary binaries. Those files are mostly taken from Google services and used in CMAccount for example.

Not every user particularly cares for Google’s proprietary bits and its tendency to put them everywhere. As such, XDA Senior Member MaR-V-iN has created a script to clear out Google proprietary binaries from all CM10+ ROMs. Freecyngn disassembles the CyanogenMod settings app and replaces Google Analytics library with the free NoAnalytics. The whole process doesn’t break the Settings app, and turns your device into one that is Google-free.

Installation is very simple. All you need to do is to copy the file onto the SD card or internal storage of your device. Then, simply flash it via a custom recovery.

Having a Google-free Android is an interesting idea. If you like it, make your way to the original  thread and get the newest version of the script. Also, don’t forget to take a look at our earlier series on Saying Sayonara to Google Apps.

odex script

The age old debate over the benefits of an odexed or deodexed ROM is one that will continue to divide Android users. And at the end of the day, it comes down to a case of horses for courses. Some may prefer the ease of customization that is offered by deodexing, while others will no doubt prefer the overall feeling of speed and responsiveness that comes with an odexed ROM. Thankfully, there are plenty of options out there for anyone looking to dabble in this process.

One such option for those looking to odex a firmware comes courtesy of XDA Senior Member MatrixDJ96 in the form of his Universal Odex Script. The main benefit of this particular option is that it allows the user to odex their current ROM directly from the device by running the script from a terminal emulator. Once you have installed the script by flashing via either ClockworkMod recovery or TWRP (other recoveries are currently unsupported), simply execute the appropriate command from the terminal to view the available options for your device. Whether you’re looking to “odex all the things” or just a specific part of your current ROM, the Universal Odex Script should allow you to do this quickly and easily. Just make sure to free up the internal storage space you will need on hand to complete the process.

Thorough instructions on how to use the script can be found in the original thread.



Back in 2010, XDA Recognized Developer Daneshm90 created a script for the HTC G1 to simplify the modification process for APK files. The script proved popular, as it greatly streamlined the cumbersome manual modification process. Sadly, over time the script fell into disrepair and even the download link for it ended up broken.

Eventually, XDA Senior Member raziel23x took it upon himself to breathe new life into the aging script and not only overhaul, but improve upon the original design. He’s incorporated such features as:

- Batch optimize apk (Zipalign,optipng,or both)
- Batch Ogg optimization
- Batch install apk from script (option 19)
- Batch Theme Image Transfer TOOL
- Batch Theme optipng TOOL
- Batch Theme Zipalign APK TOOL
- Compression level selector (monitor status above menu)
- Error detection. Checks if error occurred anytime u perform a task, and reports it
- Extract, Zip apk’s.
- Incorporates brut.all’s apktool
- Improved syntax of questions/answers
- Logging on/off has been removed. Instead a log.txt is created which logs the activities of the script organized using time/date headers
- Optimize pngs (ignores .9.pngs)
- Pull apk from phone into modding environment.
- Push to specific location on phone
- Quick sign an apk (Batch mode supported)

The list actually continues on quite a bit, and there are still many more improvements to be made. So head on over to the release thread and give this a spin.


Ever wondered what Papa Smurf is up to when he’s not foiling Gargamel’s latest evil plot or lusting after Smurfette? I know I have. Apparently he hangs around the EVO 4G forums helping people get the most out of their devices.

There are plenty of ways to maximize the performance of your device, but unfortunately it can be somewhat time consuming and awkward to make the necessary changes to implement things like build.prop and init.d tweaks, especially if you wish to implement several at once. However XDA Forum Moderator & Recognized Contributor PapaSmurf151 has created a script that will install a variety of  tweaks created by numerous developers, users and some of his own, to help you optimize performance from your device as easily as possible.

The script works by asking you a few questions relating to your needs and how you use your device before deciding on which tweaks are appropriate to install. It will seek out any duplicate entries in your build.prop, and remove them to prevent conflicts and also create backups in case you wish to roll back the changes made. Tweaks include battery, memory, WiFi/3G, speed, SD card and governor tweaks. The release thread also contains a huge amount of information relevant to the options available from running this script so you can be sure that you know exactly how this is benefiting your device.

The script can be run via ScriptManager or Terminal, and should work on the vast majority of devices including the HTC EVO 4G. Obviously you’ll want to back up first before making any changes though, just in case.

If you’d like to take this for a spin then head on over to the original thread.

Sony Tablet S

Rooting a device can be some sticky business. In some cases, it’s as easy as using one of the well known one click solutions, such as SuperOneClickRoot. Others, however, require some cunning such as manually patching files and using ADB.

Once root is established though, it’s work from the community that makes that root seem less imposing and easier to obtain for the less technically challenged. It is in that spirit that XDA Member Condi has taken a prior root method for the Sony Tablet S and turned it into a simple to use Windows script. The modifications made over the prior version of the root method include:

to eliminate problems like ‘com.pwn.me’ error etc.
timing is correct,
it goes fully automatic,
disabling mpt device automatically, and reenabling,
modded to work on 64 and 32bit systems,
(tested on winxp 32bit, win7 64bit).

The script is compatible with 32-bit and 64-bit Windows and has been tested on Windows XP and Windows 7. Simply make sure the proper MTP driver is installed, download the script, run it and you’ll be seeing that Superuser prompt in no time flat. It doesn’t get too much more simple than that.

So for anyone who was waiting for an easier way to root their Sony Tablet S, you can find the download link and additional information in the original thread.

htc rezound

Theming can involve a number of long and tedious activities. Applying the same theme to dozens, even hundreds of icons. even more tedious is taking those icons and putting them back into the apk files they came from.

For users of the HTC Rezound, there’s one less step from concept to completion. XDA Senior Member MrSmith317 has created a .bat script that automatically switches out the icons in the com.htc.resources.apk, framework-res.apk and SystemUI.apk for your themed ones. As with any new software, there are a few peculiarities that people who want to try it and some potential improvements that could be added in future releases. As MrSmith317 explains:

Only gotcha is that it is case sensitive providing the APK name. I’d love to hear feedback if you give it a try. I’ll revise this again in a bit after I get some feedback. If there’s interest I’ll build one that allows XML swaps as well.

The instructions are very easy to follow so there’s virtually no learning curve for those who are still new to the theming world. Just drop the icons into the appropriate folder and run the script.

For those themers out there who want to check it out, you can find the script download, the instructions and discussion about it in the tool’s thread.


Scripts are always fun to add to a phone. The versatility of a script can be staggering and can do anything from increasing performance to increasing battery life and sometimes even both. There isn’t much about a phone that can’t be changed with a script.

XDA Developers Senior Member stevehkim has release about half a dozen scripts for the AT&T Samsung Galaxy S II that range from performance tweaks to battery life and a couple of other fun tweaks.

The installation instructions are pretty simple, as stevehkim explains:

The scripts are pretty self explantory and you can adjust these values using root explorer and using the menu in root explorer to “open in text editor”. Or you can you wordpad or notepad++ on your pc and adjust them. Save the scripts to your phone. Using root explorer copy the init.d scripts to /etc/init.d. Paste in this directory and set permissions as rwx,rwx,rwx and reboot.

So if you’re toting an AT&T Samsung Galaxy S II and want to get your script on, you can check out the modest collection in its thread here along with information, further instructions and discussions about them. Also, make sure you exercise the proper caution and back up your device first.


Getting Netflix for your Android device is only half the battle for those who enjoy using their devices to watch TV shows and movies. The experience isn’t quite complete unless you have the dynamic duo of Netflix and Hulu at your disposal.

For those carrying the Asus Transformer Prime, obtaining the second half of that duo is now possible. XDA Senior Member compuw22c has developed a mod that he has used on prior devices and has ported to the popular Asus tablet, giving everyone unrestricted access to the media streaming app.

The process relies on putting a lib file and then running a script that modifies Flash Player and can be a little complicated to those who aren’t so knowledgeable in these things. Therefore, a backup is recommended.

Besides unrestricted Hulu access, compuw22c adds:

This should also work for any other sites that restrict mobile devices. This hack simply changes 3 characters in the flash library file from AND to WIN, and copies my modded file over the stock/updated adobe file upon each boot.

So there’s a possibility that more sites, which is always good news. You can follow the link to the original thread for more information, installation instructions, download links and awesomeness. The more Hulu the merrier!

Icons contained in the Framework-Res.apk File

For those who are budding developers, tools that help make the process a little easier to understand and a little faster to learn are always welcome. And, of course, all the respect to the pioneers of Android development who had to learn without nifty tools like these.

XDA Member wesf90 is among the most recent to contribute to the rich, and immense, list of tools to help developers out with his, as he puts it, “snazzy” tool called Framework Flasher.

Here’s a description of the tool and it’s use from wesf90:

It extracts your framework-res.apk file and allows you to edit the files. After editing, the script will compile, sign the apk, create your update.zip with the correct structure for flashing, and then sign the .zip. Everything you need to modify and flash your framework-res.apk file.

While it hasn’t been tested with those pesky .9 png files yet, wesf90 has stated that he’ll add the functionality if it’s requested enough.

Currently, it’s posted in the Motorola Droid X2, but it seems as though this is compatible with more phones than that and could make its way over to the Android Development and Hacking section eventually. Additionally, the thread is being used for bug reports as well as requests. So if you’re an aspiring themer, developer or if you just want to head over and check it out, follow the link above for additional information and download links.



Did you get a new Android device for Christmas?  Roughly 3.7 million activations occurred on December 24-25 so it’s safe to assume a few of you did.  You’ve have used a tool such as SuperOneClick or HTC Super Tool to root and/or unlock your bootloader and allow custom ROMs – in the age of “easy rooting” it goes without saying flashing should be easy as well.

XDA user slayerXcore released a script (Windows only) that automates most of the commands used in fastboot and recovery.  He focused on designing a fast, small, and (most likely) universal script to handle these for you.  It is very easy to use and has worked on all 8 devices I’ve tested.  His “installation instructions” are found below, the bold words are MY emphasis, not his.

Extract it somewhere like your desktop, though anywhere will work.
when i say extract it i mean use extract all so you get my file structure do not move these files or it will break*

Run / double click FastbootFlasher.bat

You will be be greeted by my ReadMe!.txt file please read it as it gives you a disclaimer saying im not liable for anything you do to your device

Close the ReadME!.txt

I hope this tool helps those who aren’t familiar with fastboot or helps those who want a faster way of doing things.

One final note do not give it a file for another device or a non .img file it will flash it anyway no matter what file you drag and drop once you press enter it flashes what ever was dragged onto the script. Also do not drag a radio img when it asks for recovery or in revers, bad things will happen Wile they are fixable by using option 3 at the end and repeating the process I dont want anyone to mess up their deice making such a simple mistake.

You can find his thread here



XDA TV: Most Recent Video

Buy/Sell on Swappa