ZooKeeper?  What is ZooKeeper?

ZooKeeper is a ROM utility app for the Android WildLife ROM.   It's purpose is to allow for various configuration and tuning specific to WildLife.  One of its main features is OTA updates.   Where the Badger release of WildLife introduces a ROM "Update" over a "Full" ROM flash, ZooKeeper can find updates and install them without you even having to press a single button!   Badger was also important is that it introduced /etc/releases, so the OS knows what version it is, and allowed for /etc/init.d scripts, which allow us to install Linux services.   ZooKeeper is one of those services.  It combines the power of Android's Linux roots to install a version of the "cron" scheduler.  ZooKeeper merges Android's Intent system, Android's DownloadManager, and Linux cron to schedule its updates.  When combined with a recovery capable of executing OpenRecovery scripts, it can reboot your phone to recovery, flash the update, then reboot back into Android, atomatically.

Important Information

Installing ZooKeeper

You can download ZooKeeper from the Directory in the bottom panel.   Browse with your phone, click the icon, download & install when asked.  You should turn on Settings > Security > Unknown Sources  in order to install from here since there will not be a version of this program on Google Play.  The program does not attempt anything special to update itself or check for updates.  Instead, it will be included in future ROM versions and will be updated with the rest of the software.

You will need to allow it root permission when it asks.  Do not click the "Ask Again" as it will need permanent root access.  SuperSU normally displays annoying toasts every time su is run, so after running ZooKeeper once, open Settings > SuperSU > ZooKeeper and where it says Notification, change it to Disabled and then click the checkbox.   This will stop it from showing you a bunch of cryptic commands.


When the application starts, you will see the drawer open.  It does an initial Check the first time you open it.  The icon in the top left opens the drawer, or you can slide it in from the side.  The default screen will be Current Info.    All this information is auto detected.  The Android version is at the top, with the WildLife animal name under it.  The background shows the picture.  The rest shows information about the ROM, which jgcaap ROM it's based on, what Radio firmware you are using, and what kernel.  The Check button at the top will immediately check for updates.

System Updates

It's important to realize that an update is not in the same format as a full install.   Full installs are disk images that completely wipe your system partition with the new one.   It's always best to back up your data and reinstall it.  Since Gapps installs to the system partition, the only legal way to run Gapps is to backup the Gapps from your phone, flash a new system, then restore.  Of course, we usually let someone else do this for us and just download a Gapps package.  This is a legal grey area.  Distributing Gapps with the ROM is illegal because Gapps are Google property.   Updates on the other hand, simply overwrite the stuff that has actually changed with new versions, and my Updates are smart enough to not install a new version if the old one has been removed, and these are safe to install OTA.

The System Update screen is where you set up your automated OTA features.  The big switch at the top turns OTA on and off.   The next line sets the hour or the hour and minute (if you don't specify minutes, it defaults to 5 minutes after the hour).  The image in the box is the image of the available version.  If the background and the image in the box don't match, you can't upgrade (also the ChangeLog button will be ungreyed to prompt you to check the list of changes before flashing ... you can still look at the last changelog for your current ROM while it's greyed out).  The button underneath, "Fetch ROM" will do a full check and download of all updates when you click it, regardless of the settings (such as not downloading over Mobile).  This button lets you automate the "Check" and just download when you specify.   You'll see a big "Reboot" button that let's you easily reboot to recovery and automatically install the update you downloaded.

Wanna know more about the unusual animals selected for WildLife?  Just tap the smaller picture in the box on this screen!

The switches toward the bottom control how much automated behavior happens when you click "Check".  This is also the automatic "Update" behavior that is scheduled, so you can control how much is done automatically.   The first switch says you want to download updates when they are found.  The OpenRecovery Script creates a script such that the next time your phone is rebooted into the recovery system, the new updates will be automatically flashed.   The last switch will actually reboot to recovery when all the files are downloaded so that your phone is completely updated!   Set these switches how you like them.


Every screen has a standard overflow menu with Settings and Help (which takes you to this page).  The settings have a couple of useful configuration options.  The first determines where it looks for files.  This will let you add new mirrors or add "Beta Channels" for testing, etc.   Or if I die and my server is down, someone can take over and you just change the download URL.

Directory is pretty simple.  Where on your internal storage do you want to put this stuff?  Subdirectories should use UNIX-style directory seperators  /

The switch determines if you can download over your mobile data.  If you have selected a Wifi as being metered, you will need to set this switch to perform automatic downloads over that network.   A manual fetch button overrides this.

The bottom settings are more dangerous and used for special circumstances.

Force Release = This is only valid until you re-open Settings or exit the program.  It tells Zoo Keeper you have a different version of WildLife.  For example, if you have updated to Cuscus, you can set it to Badger and when you click "Fetch ROM" it will ready your system to download and install the Cuscus update.   This partitcular option is safe.  If you set it to Aardvark, it will download Badger and Cuscus both and flash them at once.  I don't recommend doing reflashes like this as it sometimes results in a boot loop from flashing updates backwards.   Settings this field will cause ZooKeeper to add commands that wipe your cache and dalvik-cache during the update as an extra precaution.  Otherwise, these caches are only wiped if the update itself does so.

GPS NTP Server = This field shows the NTP server in your /etc/gps.conf file.  You can change it here.  Just find the local NTP pool server for your area.  Clear the field to set the default back.

Hit your Back button to save

Ad Blocker

Most of your ad blocking is done by MOAB .. a huge file of disallowed hosts using the Linux /etc/hosts file.  This panel lets you manage the ad-blocker.   If you find domains that are blocked that you want to unblock, add them to the whitelist.    If you find domains that should be blocked and aren't, add the full hostname to the blacklist.  This is the part between the http:// and the next /

The main switch can turn the ad blocker on and off instantly.  You can also long-press this switch to turn off the ad-blocker for just 15 seconds.  If you are browsing and find a link that is being killed due to the ad-blocker, fire up ZooKeeper, long-press the switch, and then immediately switch back to your browser and reload the page.  You'll get a toast when the ad blocker comes back on.


Cron is named after the Greek God of time.  Again, the switch at the top turns off the cron server.  If you turn this off, the OTA updates will not be able to check automatically.  In fact, if auto-updates are on, you will have to force cron off by long-pressing a button.  A single click just gives a warning.

The rest of the screen lets you schedule times and dates of various scripts.  These scripts are regular Unix/Linux shell scripts.   The cron server will run ALL the scripts in a certain directory.  For example, there is an /etc/cron.daily and all the scripts in that directory are executed at the time you specify, every day.  ZooKeeper controls one of the scripts executed.  Just tap the Edit button to edit the script.  Advanced users can add more by dropping a script into the directory.  None of these scripts control the OTA functionality.  They are for you to use and play with!

The bottom two buttons can pull up the crond error log and also edit a raw crontab file.  If you have never editted a raw crontab, it can be a bit confusing.  Feel free to click it and you'll see quick instructions commented in the top of the file.  Do not save changes unless you have experience working with crontabs.  The advanced crontab is done in addition to the other cron times.


This shows the current version of ZooKeeper as well as a shorter version of this document that can be read without an Internet connection.   My email is also there for reporting bugs.