[Galaxy S Advance I9070 Original Android Developmen] cocafe:
2. Faq & how-to

( FAQ )

( HOW-TO )

HOW-TO play with this kernel.

Terminal is needed.

If you get 'Permission denied', you need su permission.

If the devices lost responses, hold power button 8s to reboot.

Simply,You can cd to the folder first,then do echos.

Then `???` stands for the number to input.

It's a good idea that use SManager to add widgets on the launcher to switch tweaks!

I have uploaded my scripts in POST#5

( Boot time )

CoCore-E boots faster than stock normally.

To check boottime

* TWRP kernel boottime is longer(around 8000ms). Because of that big ramdisk!

( Bootanimation )

Put bootanimation.zip in /system/media/.

Recommend you changing the permission to 0666.

If there is no bootanimation.zip, kernel will show Samsung's.

( CPU governors )

* OnDemand has been patched cpu idle detection

* PegasusQ is taken from SiyahKernel (new version)

* PegasusQ recommended

* Most of custom governors are based on ondemand/interactive

* OndemandQ/InteractiveQ will hotplug cpu when screen turns off only.

* If you mind the battery life time, choose HotPlug. It hotplugs cpu frequently.

* Interactive updated to linux-android-3.4 [Thanks! Aditya!]

* Zzmoove is the new version(0.3)

* LulzactiveQ, it will hotplug CPU1

( CPUFREQ - DVFS )

Samsung DVFS is disabled by default now, since it conflicts with new cpufreq table.

Now we have took back the cpufreq control.

Use CPU control APP like SetCPU, no-frills CPU to set min/max cpufreq.

I created some fake interfaces in /sys/power/, so Power Saving mode still works.

To change the Power Saving max cpufreq: (default: 800MHz)

( LiveOPP - CPU OC/UC/OV/UV )

LiveOPP can control the properties of each cpufreq step.

LiveOPP values in /sys/kernel/liveopp

View all files in that folder first.

CPU freq table:

Overclocking depends on the device CPU quality you have.

You need to enable setting voltage in the slot first, if it is disabled:

To decrease the voltage (UV) of a step: Example: [MENTION=5657303]200[/MENTION]MHz

To increase the voltage (OV) of a step: Example: [MENTION=5657303]200[/MENTION]MHz

To change the voltage of a step:

* It means it accepts a HEX value only.

* ARM voltage is in 12.5mV steps

* Recommended that not tweaking Overclocking steps voltage

( GPU OC )

GPU clock controller valued in /sys/kernel/mali

Available interfaces:

Check mali_dvfs_config first.

( IO schedulers )

* Default IO scheduler: CFQ

* SIO/ROW/SIO-Plus recommended!

( frandom module )

(5.3+) To enable FRANDOM kernel module:

( Deepest sleep state )

Stock: 3 Default: 3

Deepest supported is 5.

To change:

* PegasusQ(hotplug governors) works badly with 5

* OnDemand works well with 5

* Please note that it wont increase the using time but standby time.

* ( 6.0+)You can add an init.d script to tweak it 4 if you want

To check the cpuidle state:

( exFat sdcard )

In TWRP version kernel, it supports exfat sdcard.

Copy /sbin/libexfat.so to /system/lib

Insert exfat sdcard, use binary /sbin/exfat-fuse to mount

Then tap mount sdcard in system settings to let system know sdcard is mounted

* Create an init.d script to mount exFat sdcard during startup

( zRAM SWAP )

[zRAM]

zRAM is optimized for Android. It is not lazy anymore. Recommended zRAM instead of SWAP.

Using zRAM will take a little CPU, because it needs to compress/decompress memory.

Recommended compressing about 18% of RAM, about 100 mb.

Setup disksize first: (example: 200mb)

* Larger size more RAM will be compressed.

* Too large size might make phone lag

To enable:

mkswap /dev/block/zram0
swapon /dev/block/zram0

To check how many does it use:

* We can get other info in its sysfs

[SWAP]

1. Format/resize external SDCard via computer first.

2. Create a new swap partition (mmcblk1p2)

Enable:

2. Using a FILE as swap RAM: (Create a continuity file first)

Then we will have an 80mb swap RAM.

( Init.d script )

Please install busybox in system first

I recommend install busybox via apps

Create a new folder named 'init.d' in /system/etc

Set the permission of init.d foler to 0777(rwxrwxrwx) (at least has read and exec permission)

Set the owner to 0.0 (root root)

Put some scripts (any name you like) in init.d folder with permission 0777 (rwxrwxrwx) (at least has read and exec permission)

Scripts with right permission will be executed when system boots.

( Charger Control )

Please note that this control can damage your battery/phone.

If your battery/phone damaged, read the top of #1 post. :p

Lower current makes the charging longer, but protects battery.

On our board, the highest safe current is 900mA

( 6.8- ) See here,6.8+ has used new entries

( 8.6+)

To enable Current Control:

Setup current first: (for example, 900mA)

Turn on Current Control:

Turn off Current Control:

* The Custom Current must match the value in the Current Table

* InputCurrent and OutputCurrent are read from charger registers,

* If we find that this sysfs interface prints "VBUS DROPPED!" warning,

The charging current has been changed by driver because of a BAD charger!

* It need to plug/replug charger to take effect!

To enable Charger HW Control:

If we want to transfer data or stop charging, we can disable the charger:

To enable:

( Cycle Charging Control )

Similar to BLX by Ezekeel. It can be used to limit the battery charging level.

( USB Power Sharing )

( 6.2+) This can enable the internal vbus power supply for usb devices.

But the phone still cannot recognize our usb devices now.

We can use it for fun, like charging for other devices, USB fan...

* Say 0 to VOTG to disable

* Plug OTG cable first, then enable it

( USB Switcher )

Sometimes, we will lost the ADB connection after a reboot.

This is the software workaround to fix this issue, namely, SW reset the USB swticher.