Posts

Showing posts from March, 2013

Increase your Internal Phone Storage

Image
One of my biggest problem with my phone got solved today. I had been using an old Android phone with only 181 Mb of Internal phone storage. As a result my phone starts complaining after installing few apps, especially the ones which can not be moved to SD card. I have a 16GB SD card installed but its of no use when it comes to running more number of apps. Lately I had to uninstall a lot of my favorite apps and rely on the browser, e.g. I never could install Android apps for Facebook, Twitter, Google+ etc. I always used the mobile websites.

Finally I started searching the workaround for the same. I found that a part of my SD card can be partitioned and formatted as linux file system , so that Android OS considers it as part of phone storage. This is possible for phones which are rooted and I was already using custom ROM from Cyanogenmod.



Note: following will wipe all your data in SD card including music and photos.

Use Mini Tool Partition Wizard Manager to delete the original SD card par…

Recursively find list of files in a directory in Python 2.2

I have been using python for writing small utility programs. Till now I avoided scripting languages like python because I though shell script is master of everything and works in any linux computer. They also have all programming constructs like loops and conditions etc. However when it came to quickly get some work done, shell script too a lot of time write a error free program. Finally I jumped to python to do some file batch processing.

The most fundamental need to batch file processing is to iterate through all the files in a given directory. I could found several ways to do so using os.walk function but my old linux server had only Python 2.2 and I did not want to FTP files to my local PC to server back and fourth . So here is the code which also works in old version of python.


[code language="python"]
import os

# finds all the files in a directory recursively
def listAll(dirName):
filelist1=[]
files = os.listdir(dirName)
for f in files:
if os.path.isfile(os…