Manually Run “Fix Permissions” From Recovery

I own a Samsung Galaxy Nexus running Android 4.0.4 (Ice Cream Sandwich).  My phone is rooted and running a custom recovery (Clockworkmod Touch  I’m not sure if it’s been the case since I purchased the phone (and originally had the most recent non-touch version of Clockworkmod) or if it’s after upgrading to the touch version of CWM or if it’s as a result of me installing a custom ROM and just generally f—ing with my phone, but “Fix Permissions” doesn’t work from recovery any more.  This wouldn’t be a big deal if I could run this from Rom Manager, however, my phone seems to stall every time I run this while Android is booted.  It appears that it hangs while processing running applications, as every time it stalled I exited out of Fix Permissions (in Rom Manager), force closed the app it stalled on, then re-ran Fix Perms, and I’d make a little bit more progress, only to stall again on another app.  Finally I FC’d enough apps that Fix Perms completed, but I had mixed feelings about the quality of the job I’d just performed.

When you run Fix Perms, the first line (helpfully) prints the script that is being run, which is “/data/data/com.koushikdutta.rommanager/files/fix_permissions”.  Using this info, I attempted to boot into recovery and run the script manually from the ADB shell of my PC.  Again, Fix Perms seemed to stall, only this time I knew it couldn’t be a running app that caused the issue (remember, I’m booted into recovery!).  I issued an

“adb pull /data/data/com.koushikdutta.rommanager/files/fix_permissions”

to get a copy of the Fix Perms script on my computer and checked it out.  It turns out that at the top of the script there is a big warning that states “Warning: if you want to run this script in cm-recovery change the above to #! /sbin/sh”.  Fair enough.  I changed the first line of the script to “#! /sbin/sh” and then pushed the script back to my phone using the following command:

“adb push fix_permissions /data/media”

I pushed the file to the “/data/media” directory instead of the original directory the file came from as that would have overwritten the original and not allowed it to run while Android is booted (not that it’s working anyway…).  NOTE: The “/data/media” directory on the Galaxy Nexus is the virtual SD card (the GN doesn’t have removable media, so it tricks Android into thinking this directory is an SD card).  If you’re using a different phone you’ll likely have to load the script into a different directory.  It shouldn’t make a difference where you place the file, I just wouldn’t put it in the “/data/data” directory.

Once you’ve loaded the script onto your phone, set the proper executable permissions by issuing the command below. Remember to change the file path to wherever you placed the file.

“chmod +x /data/media/fix_permissions”

After that’s done, run the script by issuing:


The script should run and fix your file system permissions without stalling.

Android 2.2 (Froyo)–“Unable to open connection to server”

It’s been a long and frustrating day trying to figure out why I’ve been receiving the error message in this post’s title when trying to connect my Droid 1 to my Exchange server.  I’m running Exchange 2010 SP1 and Android 2.2.  I’m running CyanogenMod 6.1 RC3 on my phone, but as far as I can tell, I’ve been affected by this problem ever since Froyo came out.

I was almost certain I had a certificate issue at first (based on all of the information I was able to find), but it appears it was actually just a problem with the ActiveSync policy on my Exchange server.  To resolve the issue, I removed my device from my Exchange mailbox account, then deleted the default (only) ActiveSync policy on the server, then set my phone up with my Exchange account, and it worked fine.

See this thread for more details.  Post 56 is what solved it for me.

Google Maps update problems on Droid Froyo

I’ve been running and RC build of Android 2.2 aka Froyo on my Motorola Droid for a few weeks.  It’s great, overall, but there are still a few quirks.  One of the most noticeable issues is that Google Maps doesn’t like to update.

To manually fix Maps, modify /data/system/packages.xml, removing the section that starts with:

<shared-user name=””

After you’ve taken that out, reboot your phone and then install Maps from the Market. If you get a Login Failed message, join Latitude. It will prompt you to authorize the app. Do that, and then you can un-join Latitude by selecting Privacy options and opting out.

To modify Packages.xml, do this:

adb root
adb remount
adb pull /data/system/packages.xml (which will copy packages.xml to your working directory on your computer)
(edit packages.xml, which is now in your working directory, with a text editor, removing the section described above)
adb push packages.xml /data/system/packages.xml (which will push packages.xml to /data/system/ on your phone)
adb reboot

Then install Maps from the Market.

I recommend Notepad++ for editing the file. Regular Notepad loses the formatting of XML files and makes it more difficult to remove the entire section that you need.

The Motorola Droid is the bomb

I recently purchased a Motorola Droid smartphone.  I was looking forward to the Android operating system that it comes with and am very impressed with the amount of progress that has been made in the modding community.  There are tons of alternative firmwares available across the web that include tons of different enhanced features, including overclocking!  I’m currently running my Droid at 1Ghz (stock is 550Mhz)!

My only complaints about the device is the battery cover is not completely flush on the back (one side is raised just slightly).  I purchased a rubber gel case that should mask this issue, but Motorola is also giving away free replacement battery covers to anyone who requests one.  Mine is in the mail.  My other issue is with the hardware keyboard, which seems a bit shallow (I’m coming from a Blackberry Tour 9630).  The touchscreen takes a bit getting used to for typing (once again, since I’m coming from a Blackberry), but after a few days I’m fairly used to it.

On my phone I’m running Pete’s Bugless Beast v1.1 firmware (which was released today, and can be found at  I had issues installing this via the method (renaming the ROM to “” and putting it at the root of my SD card).  I ended up purchasing ROM Manager (which includes a recovery manager allowing you to backup and restore your entire device, plus it allows you to easily download and install new ROMs).  SPRecovery is a free recovery manager, but with the extra features that ROM Manager had (mainly the ability to install Pete’s BB v1.1 in a method differently to the routine), I felt it was worth the $4 price.

To fully unlock the potential of your Android device, you need to “root” your phone (which is the same concept, essentially, to jailbreaking an iPhone).  To root my Droid, which came with the 2.1 firmware, and as of now, is not able to be rooted, I downgraded to 2.0.1 using the RSD Lite – spf downgrade method (search Google for it).  Then, I installed DroidMod Updater, which rooted my Droid and installed the DroidMod ROM.  I then installed ROM Manager, backed up the phone, then installed BB v1.1 and the baseband upgrade (which is for the cellular radio of the phone).

I’ve installed a bunch of different ROMs on my phone the past few days, but that is mainly due to learning about the different aspects of the device and the Android platform.  So far I’m happy with Pete’s Bugless Beast v1.1.

If you’re thinking about getting a Droid, I’d highly recommend it!