[Miscellaneous Android Development] Sambaaa:
Configuration Guide

Configuration Guide

In order to get the best experience from this rom, read guide below:

AVOID CRAP

IMPORTANT!!

Absolutely

DO NOT install crappy apps on this rom

: NO RAM Booster apps, NO task killers, NO Clean Master, no apps that just consume ram, increase wakelocks and produce lags.

Any kind of task killer will heavily increase lags on this rom whose background apps are already handled by its optimizations scripts. This kinda app will only create conflicts.

Remember to not install AdAway (or similar) neither because this rom has an AdBlock already included. If possible avoid Antivirus too, IMO they're not really necessary on Android.

Resolution Changer

What is it?

This is a series of scripts written by me which will let you change iocean x7 resolution from 1080x1920 to any other value lower than stock. At the same time it gives you the possibility to change dpi according to your preferences.

Why should you use this?

Reducing resolution will boost your performances from different point of views: first of all smoother scrolling, faster interface, lower ram usage and probably even a better battery life (I still need to check this one).

Anyways these scripts are not meant to permanently reduce your resolution, but only in case of need: you can switch to lower resolution when you need to increase performances (for example for gaming) and switch back to stock 1080p resolution as performances boost is no longer needed.

Everything is made completely automatic through these scripts, you just need to launch them and follow instructions.

I know that this could be done through an app, but first of all that app is for pay in my country (that's why I created this), secondly an app consumes ram, this script does not! :laugh:

Is there any drawback?

Yes, lowering resolution will

temporarily

make your menu, home and back button unavailable. They will stop working until you switch back to 1080p resolution: it's not possible to make them work at lower resolutions, that's why this script automatically enables software keys.

Moreover some apps may not be shown correctly depending on resolution used; here a few examples:

-Xperia Launcher doesn't show icons of correct size at 720p resoution (720x1280)

-Apex Launcher doesn't show icons of correct size at 600p resoution (600x1066)

-Swiftkey keyboard doesn't show properly at lower resolution (use GammaRom stock keyboard)

- [...]

You simply need to change launcher/keyboard if the one you're using is not completely compatible with requested resolution.

How can you change resolution?

I made it simple for you, just read hidden instructions below!

First of all launch Android Terminal Emulator app and enter one of these commands (first time you launch this script, it'll ask for root privilages):

resolution width height dpi

Sets resolution to (width)x(height) and dpi to (dpi). For example you can type in terminal emulator the following:

resolution 720 1280 320

entering this will set resolution to 720x1280 and dpi to 320dpi that are typical values for 720p screens (Samsung Galaxy S3, ...)

resolution 1080 1920 480

entering this will set resolution to 1080x1920 and dpi to 480dpi that are typical values for 1080p screens (Iocean x7 stock values, ...)

With this command (resolution width height dpi) You can set resolution to any value you want. Of course be reasonable: you have a 16:9 screen so (height)/(width) should always be around 16:9. You can start from 1080p stock values (1080 1920 480) and divide these three number by the same quantity. For example, dividing by 1.2, another good working command would be:

resolution 900 1600 400

which will set resolution to 900x1600 and dpi to 400dpi. Everything clear? Hope it is! You can experiment as many resolution as you wish and find out which one is the best for your usage.

In addition to "resolution width height dpi" command, I prepared other 5 easy to use scripts that you can launch simply typing:

1080p

it's the same as "resolution 1080 1920 480" (reverts back to stock Iocean values)

900p

it's the same as "resolution 900 1600 400"

720p

it's the same as "resolution 720 1280 320"

600p

it's the same as "resolution 600 1066 260"

500p

it's the same as "resolution 500 890 220"

These 5 scripts (1080p, 900p, 720p, 600p, 500p) can be used with "f" option (where "f" stands for "fast"). Let's make an example:

1080p f

typing "1080p f" in terminal emulator resolution will be quickly set to 1080x1920 and dpi to 480dpi without any waste of time. Resolution script has a lot of checks that ensures that you know what you're doing and that explains in details what the script is doing. Typing in android terminal "resolution 1080 1920 480" or "1080p" or "1080p f" will revert back to stock resolution in all three cases, but the last one (1080p f) will do it more quickly.

The same for "900p f", "720p f", "600p f", "500p f": they switch to 900p, 720p, 600p and 500p resolution more quickly than without typing "f".

Here's a screen just to give you an idea on how it looks like:

How can you revert back to stock Iocean resolution?

Simply launch Android Terminal emulator and type:

1080p

or

1080p f

In case of issues of any kind that make this procedure unavailable, flash following zip in recovery (only in case of emergency, otherwise use procedure described above):

Emergency_restore_to_stock_resolution.zip

AdBlock

GammaRom has an embedded AdBlocking service which will prevent most part of adverts/malicious websites from showing. Sometimes its action may be unwanted (it may block safe websites that you intentionally want to visit). That's why I created this simple script that gives you the possibility to switch between 3 different adblocking according to your needs.

Launch Android Terminal Emulator and type:

adblock

Folllow instructions and choose your preferred AdBlocking:

No adblocking (Iocean x7 stock rom default)

AdAway adblocking (Light and fast adblocking - Gamma v1.2 default)

Mother of All AD-BLOCKING by BSDgeek_Jake (slightly higher ram usage, but very aggressive and complete adblocking: blocks almost any Ads - Gamma v1.0 default)

Sometimes AdAway and Mother of All Adblocking may block even safe websites from showing; if this happen to you, launch terminal emulator and disable all adblocking (option 1) and enable them again when you want them back (option 2 or 3).

Battery Life

Here you can find 3 advices that will greatly improve your phone Battery Life:

Die Hard Battery Calibrator (by zeppelinrox)

I included in this rom Die Hard Battery Calibrator script developed by zeppelinrox. Follow instructions below to take the max out of your battery:

Charge your phone till 100%

Keep phone plugged in, launch terminal emulator and type:

su
BatteryCalibrator

Follow instructions (wait until phone voltages overcomes 4200mV, then type "A" which will reboot your phone after 20minutes (leave it plugged in still) )

Once rebooted, you can type BatteryCalibrator in terminal emulator again and check voltage and battery percentage (just to check, this step is not really fundamental)

Unplug your phone (shown voltage will go down a bit) and use it the whole day until it turns off (battery percentage shown may not be real since you just deleted batterystats)

Recharge till 100%

Use your phone! ;)

Google Location service

Disabling this will improve your battery life a lot; especially if you don't need it (if you need it, try to keep it disabled when not necessary).

Launch Settings > Location Access > Disable "Wi-Fi & mobile network location"

Monitor Wakelocks

I included Wakelock Detector app developed by ahikmat in this rom. This app lets you check which app or service is draining your battery generating wakelocks (high number of wakelocks = high battery drain).

Launch Wakelock Detector app > go into settings > enable advanced mode > Check whether any suspicious/unwanted app is generating wakelocks.

You can find a detailed guide on how to use this app in original thread linked above.

GravityBox

GravityBox is an Xposed module which uses Xposed framework to apply real time modifications to your system. This gives you the possibility to customize your android device according to your needs.

Once you've installed this rom, launch GravityBox app (or go to Settings>GravityBox if you prefer) and mod your Iocean as you wish: most part of modifications will be applied immediately, part of them may require reboot to become effective.

Viper4Android

This mod gives you the possibility to enhance audio quality and volume in a quite surprisingly way if configured properly.

Once installed this rom, launch Viper4Android, give it root access and click on "Yes" at V4A Driver Update request. Choose desired installation type (keep in mind that this will affect battery life) and reboot. Once rebooted you're now ready to customize your phone's audio response according to your tastes: launch Viper4Android and enable Viper4Android features as you wish in the three fields Headset/Phone Speaker/Bluetooth Device.

In order to further edit the audio, it's possible to download (free or paid) some Impulse Response Samples (IRS); see the thread below for a detailed guide and further details about it:

[V4A][IRS] Impulse Response Sample Index Thread

If you're lazy and don't wanna read that guide, just download the following IRS starter pack, unzip it and put all *.irs files in the path /sdcard/ViPER4Android/kernel (this path will be automatically created by V4A app once you install drivers). All these *.irs files will become selectable in Convolver field inside V4A app.

IRS Starter Pack.zip

Xposed Framework

Xposed Framework app has a "Download" section where you can upgrade existing xposed modules (eg: GravityBox) everytime their developer releases a new version or even download new modules from the list to add new features. Be careful though: some of them are incompatible with each other and other are only device specific (Samsung, HTC, ...) and won't work on your phone. Moreover too many xposed modules may slow down system according to my personal experience.

GravityBox already covers most part of other modules features, but another good module is "App Settings" which, for example, will give you the possibility to set different DPI for each app.

GPS

GPS connection had a perceivable improvement with latest kernel and modules and I added some optimizations that will help too. To make it work properly you'll need to modify the first lines of gps.conf in /system/etc path with specific servers for your country.

Inside gps.conf you'll find these servers that work good for Italy:

# Italy ===============================
NTP_SERVER=it.pool.ntp.org

# Europe ==============================
NTP_SERVER=europe.pool.ntp.org

If you live in Europe, just edit the first with the one for your country, otherwise you'll need to edit both. Leave all the rest of gps.conf file exactly as it is, just edit these lines. You can find a list of servers for any country here.

For example if you live in Slovakia (Europe) first lines of build.prop would become something like this:

# Slovakia ============================
NTP_SERVER=sk.pool.ntp.org

# Europe ==============================
NTP_SERVER=europe.pool.ntp.org

In order to speed up gps fix, open Settings>Location Access and enable EPO (download epo data too), A-GPS, GPS and launch Location Engineering menu. Once in Location Engineering Mode, go to GPS tab and enable GPS to scan satellites (need to be outside to find any). After a few minutes it should start fixing satellites (first ever fix will take longer) and you should be finally able to use Iocean x7 GPS.

Another advice I can give you is to use Copilot as navigation app!

If it still doesn't work the only way is to modify your antenna (as I did).

Hardware Keys Backlight

This will work only on Iocean x7 Youth clocked @1.2GHz (no effects on any other Iocean x7).

You can turn on/off hardware keys backlight typing:

lights on

turns lights on

lights off

turns lights off

Ringtone

You probably still don't understand why I'm pointing this out...well...you'll get it once you receive your first incoming call...I love this ringtone, but probably many of you won't! :D If you're among them, go into Settings>Audio profiles>General and change ringtone. I recommend you to keep it :p

That's it guys, flash responsibly! :good: