[Galaxy S Advance I9070 Android Development] lee.wp14:
Get the most out of your janice

I'm a fairly new happy user of janice (S Advance) running ChronoMonochrome's LOS15.1. I've been using this thing for weeks to few months I guess, as my daily driver.

However after messing up with the dangerous sbl bootloader partition, my janice bricked. What a joke. (I was trying to change the Download Mode screen lmao)

I will be continuing exams in a few days time, so I thought to share my device's configuration, personalization and tweaks, before I forget. Perhaps it could be useful to other users.

These are just my sharing, thus is not perfect and also, use at your own risk; Everything is tested working at my phone (actually these tweaks are made for my personal use thus I have been using it for some time aldy)

Correct me if there's anything wrong! :)

1. Custom Boot and Charging Splash Screen

By the word splash screen means the first picture you see when you turn on your phone.

I decided to change the boot splash because when I'm exploring the PARAMFS partition, I saw the korea variant's boot splash - a DOCOMO logo. It looks pretty minimal and simple, have a look below :

On how to change the boot splash, you can search up the forum, there's a dedicated instructions for janice.

However, after changing the boot splash, I felt like something is left out - the charging splash! :3 Since most custom rom's charging animation is based on AOSP's, and also partly inspired by the Nexus 7's charging splash, I decided to change the charging splash too! There's no documentation on this plus I have no hex editing knowledge thus it is a 100% dangerous adventure. However I'm fortunate to have things work in just one attempt only :33333

Thus, I'm sharing my edited PARAMFS over here, hope you guys like it!

https://goo.gl/hfR11w
(under directory janice/misc/paramfs)

***USE AT YOUR OWN RISK*** You should have some knowledge on dd flashing before proceeding. Make sure you are dd-ing to the right partition!

2. ZRAM

This LOS15.1 comes with ZRAM preconfigured. ZRAM is a kind of swap, except that it works by compressing the memory and store in your physical ram, instead of a physical swap partition in your emmc. I suggest you to read some brief intro about ZRAM before proceeding.

By default the one that comes with ChronoKernel 5.10 has a swappiness value of 60 (which is the common default value) and a size of 250MB. At least for me, it seems not quite enough to cater my needs, thus I modified the values : (zram script is in /system/etc/init.d folder)

SIZE : 512 (i think you can play around 256-512MB)
SWAPPINESS : 90

The above values did give me some noticeable improvement. I don't know if it works well for you, I suggest you to experiment with different values over the two parameters.

3. build.prop Tweaks

Overall the build.prop is good enough, there are plenty of tweaks inside. I further tweaked it as per my personal preference :

ro.config.low_ram=false (alarm and DND works for me at least, no clock issue, on ChronoKernel 5.10. with this you get multitasking feature and auto DND while in call)
debug.composition.type=gpu
video.accelerate.hw=1

4. Filesystem

I always format /system and /data into f2fs on every custom rom installation, if the ROM supports. For the ChronoKernel 5.10, you didn't have the option to format as F2FS. Thus :

1. you can at least get F2Fs on /data by using TWRP 2.8 to format /data beforehand, then install ChronoKernel 5.10 and proceed with ROM installation

2. you are ok enough to do 'manual' stuffs, you can follow this guide here

Next, let's talk about trimming.

I'm in a rush now (need to study for exam :3) thus, look up the internet for what is trimming :3

If your setup is F2FS, trimming is already enabled through the mount options in fstab (you can check on it, the option is something with the word 'discard')

If your setup is ext4, I'm not sure if fstrim is enabled, you however can manually trim yourself on a hourly or daily basis :

[I]Create file as /system/etc/init.d/99fstrim[/I]

#!/system/bin/sh
nohup watch -n 3600 fstrim /data &
# nohup watch -n 3600 fstrim /data > /data/local/tmp/fstrim.log &
# 3600 is 1 hour in seconds
# the second line is with logging enabled, choose one of those two line to use based on your personal preference

5. NOGAPPS

There's a gapps alternative named MicroG, it is actually quite nice replacement over microg, if you didn't rely on Google Login that much (microg won't work with some apps that depends on Google Login).

You can lookup google for ale5000's Unofficial MicroG installer with Google Sync Add-On (Contacts and Calendar Sync) installer.

Wait, dun proceed yet! Here I have something to share as a precaution!!!

1. This LOS15.1's signature spoofing doesn't seems to work well...? My thought is that it is related to odexed framework that comes in this LOS15.1. So DON'T USE MICROG WITH this ROM's built in signature spoofing feature! Don't flip the switch on in developer options ---- pretend like it never exists! Else you will end up in a bootloop, if microg is granted spoofing permission.

2. You can use xposed method as a workaround : there's a module on xposed for you to spoof GmsCore signature for microg.

3. NanoDroid has a on-device patcher to enable signature spoofing, but I never tried it, you can give it a try. Be noted that it will took quite sometime to patch, be patience and give it around 5-10 minutes time. It took around 10mins for me to patch on a Samsung Trend Plus aka S Duos 2.

6. For Xposed Users

Here's a really useful one. If you happen to use Xposed on this ROM, you are highly recommended to continue reading this section.

Due to changes in Oreo's ART runtime, xposed works in a different way that apps performance MIGHT be affected if Xposed Framework is active.

I don't know if this is fully affected by xposed, but at least with xposed running, you will experience slow app startup upon first start after app installation. Or even, all the time your app is actually performing slower.

Thus, xposed module app has a built-in feature called 'Optimize Apps'. It actually triggers dexopt to optimize apps. The same process is triggered by Android system itself during phone idle while it is charging. But, I don't think you're going to wait until it dexopt on phone idle right? :)

So, here are my recommendations :

1. Upon successful new app installation, perform App Optimization thru Xposed app twice.

2. Launch the installed app, after it launched, wait it settle down a while and close it.

3. Rerun optimization twice again. And you are good to go!

By performing the above steps you should notice the difference between before optimize and after optimize.

EDIT : 7. ChronoKernelSettings (almost forget abt it xD)

When I first use janice I was like wow seriously this phone's kernel has an app?!

Ok here are some really useful stuffs (useful than those written above xP)

Those stuffs that I didn't mention, just leave it like how it initially is.

A. CPU

Freq limit on screen idle : disabled
CPU Low freq : 400 or 200
CPU High freq : 1245 (only use this value with Lionheart governor!!! Others please stick with 1200 max)
CPU Governor : Lionheart (enable it thru Modules)
I/O Sched Int : Noop
I/O sched ext : Noop
Set on boot : think yourself hahaha

B. Power

Charging Current Control : Enabled
Current Value : 900mA

*********TWEAK********
***USE AT OWN RISK***
Use a root file explorer, go to /data/data/com.mars_army.chronokernelsetings
inside has a file named shared_prefs.xml (Can't remember the exact name)
Open it, find the charging current parameters.
You can edit it with a 100mA increment, you can go as far as 1500mA.
After this, do not touch the charging current control settings in ChronoKernelSettings app anymore. It will apply the value as normally after boot.

C. I/O

Nothing here actually, just change the I/O read ahead buffer for sdcard according to your sdcard capacity (google regarding this)
I leave all other options disabled over here.

D. Screen

APE-OPP : 50
DDR-OPP : 100
*not sure abt these values, you need to experiment this yourself

E. GPU

MALI AUTOBOOST : Disabled
Mali Freq : 600MHz
Mali L2 Readahead : maximum available (i forget the values dy :3)
Mali Preallocated memory : max available

EDIT : 8. Calling Tweaks (also forget xDD)

There's a massive delay starting the screen when receiving incoming call while phone is idle. You can slightly improve this by switching off Vibrate on call. Furthermore, with my above CPU tweaks, you should get a fairly quick respond of starting the screen upon receiving call, around 1-2 or 3 seconds after start ringing. By the word idle here means deepsleep (dozing).

So I think that's all, I'm wondering if someone is going to have a look at this lengthy stuff haha.

With above configs, my janice performs pretty well, can even multitask, watch 480p videos smooth, Instagram with smooth video playback, Messenger runs well with chathead, and ofc, browsing on the memory eater Google Chrome!

That's all for my adventure on Samsung S Advance :))