!!ONLINE!![ROM_Android_hero]no, it's not flashable!!!Umbrella Corpv3 choose your ui - Tilt, TyTN II, MDA Vario III Android Development

Hi there,
as anounced her is my first Umbrella Themed Android Rom. It is a mixture of several vogue, dream and saphire roms.
V1+V2:
Here the things i added:
Some apps:
-proPaint Camera (fully working)
-RockOn
-LastFM app
-Custom boot animation and sound (just on first boot so loud)
-Umbrella Themed (more to come, if some graphical advanced people could help me i would be pleased)
-Latest Libs
-Shazaam
-New default ringtone and notification tone
-Kaiser wifi fix
V3:
-new base
-added homeswitcher
-added normal homescreen
-some more fixes and tweaks
Working:
Kaiser (tested by me:
-Data
-WiFi
-Camera (proPaint)
-Audio
-Phone (very responsive)
Vogue: Please tell me and i will add infos!!!
-Data ??
-WiFi ??
-Camera (proPaint) ??
-Audio ??
-Phone (very responsive) ??
I'm no developer i only wanted to give something back to this great community. Thanks goes to: dzo, Zenulator, mssmission, enatefox, pmos, vilord, craig0r, and all the others i forget taht make android on our devices possible
Download Link: Umbrella Corporation v2, with working media ROM
Download Link: Umbrella Corporation v3, Sense od Default Homescreen, fixed one
OPTIONAL:
Here my startup.txt (Change for your carrier to get data!!!)
#alloctest 0x2000
set RAMSIZE 0x07000000
set RAMADDR 0x10000000
#set FBDURINGBOOT 0
set MTYPE 1553
set KERNEL zImage
#set initrd "initrd.gz"
set initrd "\Storage Card\initrd.gz"
#set initrd "\Storage Card\initrd-console.gz"
#set initrd "\Storage Card\android.bin"
#
# The following kernel parameters are useful
# ppp.username - The username used to connect to the network when dialing #777
# ppp.password - The password used to connect to the network when dialing #777
# msm_sdcc.msmsdcc_fmax - The maximum frequency (in Hz) used by the SD controller
# pm.sleep_mode - The mode used when the phone is off
# 0=Power Collapse Suspend, 1=Power Collapse, 2=Apps Sleep,
# 3=Slow Clock and Wait for Interrupt 4=Wait for Interrupt
# Default is 1, use 1 for best power savings
# board-htckaiser.panel_type - Panel type used to power the panel off and on
# 0=Don't power off the panel (Default)
# 1=Sony 2=Topoly 3=Topoly (probably just the same as 2)
#
set cmdline "clock-7x00.ahb_div=3 clock_7x00.slow=1 elevator=noop ppp.nostart=0 board-htckaiser.panel_type=1 ppp.apn=internet.t-mobile ppp.username=tm ppp.password=tm pm.sleep_mode=1 mddi.width=320 mddi.height=480 msm_sdcc.msmsdcc_fmax=32000000 no_console_suspend board-kaiser-keypad.atttilt=0"
boot
Click to expand...
Click to collapse
and my custom.hero.conf: !!just works if your card is partitioned!!
Klick
Have fun!!!!
Changelog:
v1: initial release
v2: fixed no media problem

wow! sounds really great!
any drawbacks?
could you post some screenshots please?
and maybe a small step by step tutorial how to install? (or point me to an existing one - i am a total android noob!)
thank you for sharing!
br,krz

Thanks
Very Very Very nice surprise! Thanksssssssssssssssssss

Just copy all the files to the root of your sd card and download the basefiles from http://code.google.com/p/vogue-hero/downloads/detail?name=basefiles-20091009.zip&can=2&q= (cause i forget to add the conf files from the conf folder) just copy the conf folder from the basefiles zip to the root of your sd card, cause rootfs an zimage from my archive are newer.
Copy the startup.txt fom first post and create a file named startup.txt on your sd card. Then launch Haret.
Enjoy...

Thanx, for all you effort....
custom.hero.conf: !!just works if your card is partitioned!!
What partitions do I have to create for best performance?

oh my god i cant belive this got it running, the startup scared the crap outta me.we are not worthy, my sincere thanks to all the people working on porting android to kaiser, without u none of this would be possible. Thank you JeckyllHavok for maing this awesome design and rom

I got the best performance when i had a secon partition as ext2 and a third partition with linux-swap. Make the first around 100MB and the second one around 80MB

JeckyllHavok, when its all booted up, is it just a blank space with top bar info, or have i done summat wrong

Give it some time first start can take a while. Was the boot animation coming?

i got to the point where if i pressed green answer button, the phone pad would appear, and left and right soft keys control volume, but nothin on home screen

Did the startup setup apears? (I'm testing a new build with working media)

im new to this so bare with me, i get the loading system, with umbrella corp logo, when does this setup come
oh its come up now

Try if a restart helps. For me the black screen apears for 1-2 minutes then it continues Umbrella Boot ani-->Umbrella Logo-->UmbrellaLoading Screen-->BlackScreen-->Setup

just intalled this rom on my kaiser, works good except the LCD colours look a bit strange, its the first rom I get the colours messed up
any solution?

its working, its alive, its alive. Thanx man for all da help

just intalled this rom on my kaiser, works good except the LCD colours look a bit strange, its the first rom I get the colours messed up
any solution?
Click to expand...
Click to collapse
Can you post your default.txt

JeckyllHavok said:
Can you post your default.txt
Click to expand...
Click to collapse
I'v used the one on te first post, just changed the APN
#alloctest 0x2000
set RAMSIZE 0x07000000
set RAMADDR 0x10000000
#set FBDURINGBOOT 0
set MTYPE 1553
set KERNEL zImage
#set initrd "initrd.gz"
set initrd "\Storage Card\initrd.gz"
#set initrd "\Storage Card\initrd-console.gz"
#set initrd "\Storage Card\android.bin"
#
# The following kernel parameters are useful
# ppp.username - The username used to connect to the network when dialing #777
# ppp.password - The password used to connect to the network when dialing #777
# msm_sdcc.msmsdcc_fmax - The maximum frequency (in Hz) used by the SD controller
# pm.sleep_mode - The mode used when the phone is off
# 0=Power Collapse Suspend, 1=Power Collapse, 2=Apps Sleep,
# 3=Slow Clock and Wait for Interrupt 4=Wait for Interrupt
# Default is 1, use 1 for best power savings
# board-htckaiser.panel_type - Panel type used to power the panel off and on
# 0=Don't power off the panel (Default)
# 1=Sony 2=Topoly 3=Topoly (probably just the same as 2)
#
set cmdline "clock-7x00.ahb_div=3 clock_7x00.slow=1 elevator=noop ppp.nostart=0 board-htckaiser.panel_type=1 ppp.apn=internet ppp.username=tm ppp.password= pm.sleep_mode=1 mddi.width=320 mddi.height=480 msm_sdcc.msmsdcc_fmax=32000000 no_console_suspend board-kaiser-keypad.atttilt=0"
boot
Click to expand...
Click to collapse

board-htckaiser.panel_type=1
Try to change this to 2 or 3 and look if it helps

erm you was talkin abt partitioning sd card to give better performance could you give me some more info and instructions on what to do, Thank you

changed it to 2, it works like a charm
Thanks a lot!
The only thing i dot like is the startup sound, animation, but that is the less

Related

Toggle my PND on/off in accordance to given AC power supply

Hello all, first post here.
I've been working with Mortscript for a while now and I'm very happy with it.
Here's my attempt at a 3-script-pack. It should toggle my PND on/off in accordance to given AC power supply. But it doesn't work as expected,
especially the RunAt() seems not to work: only one event (the notify set in script ON_AC_POWER_LOSS) is executed by the scheduler, the notify set
in script ON_AC_POWER_DAEMON obviously is never executed by the scheduler. Anyone an idea?
Code:
# ON_AC_POWER_LOSS.mscr
#
# jwoegerbauer 09/04/2009
# GNU General Public License (GPL), Version 2, June 1991
#
#
# NO ERROR CHECKING IS DONE !!!
#
#ErrorLevel("off")
#
# Before using this script ensure file PowerNotifyFlags.ini
# is present and contains the following lines:
#
# [PowerOnOff]
# ACPower=1/0
#
#
Local()
#
#
# check for sufficient power or don't run anything and don't resubmit
If (BatteryPercentage() <= 35)
SleepMessage(5, "Battery level is low: " & BatteryPercentage(), "Power Warning", 1))
Exit
EndIf
#
# adjust to your needs
Set WAIT_SECS, 0
Set CHECK_BACK_SECS, 30 #must be equal or greater 10
Set PLAY_SOUND, 1
Set WAV_FILE, "\My Flash Disk\programme\TroNikPowerNotifier\chime_down.wav"
Set REG_POWER_HIVE, "HKLM"
Set REG_POWER_PATH, \
"System\CurrentControlSet\Control\Power"
Set INI, \
"\My Flash Disk\programme\TroNikPowerNotifier\PowerNotifyFlags.ini"
Set INI_SECTION, "PowerOnOff"
Set INI_KEY, "ACPower"
Sleep 100
#
# assume the device is running on external power and we unplug
# the usb-powered cable or engined off, and the power is re-supplied
# we should Cancel this script automatically.
# IMO this is a useful case when we use the device in the car in
# ignition mode and then start the engine.
#
# hence we implement now an additional power state listener (a sec timer)
While(%WAIT_SECS% > 0)
#
# yield 1 second
Sleep 1000
#
# query current power state
acPower = ExternalPowered()
If (acPower = TRUE )
# power is re-supplied
# therefore we don't go into Standby
Exit
EndIf
%WAIT_SECS% = %WAIT_SECS% - 1
EndWhile
#
#
If (not ExternalPowered())
#
#
Set ON_AC_POWER_DAEMON, "\My Flash Disk\programme\MortScript\ON_AC_POWER_DAEMON.exe"
#
# note: the turn OFF exe here defined must be the same as defined in file
# POWERNOTIFIER_PROMPT.mscr
#
#
Set TURN_OFF, "\My Flash Disk\SystemProgs\Sleep.exe"
Set TOGGLE_DISPLAY, "\My Flash Disk\SystemProgs\ToggleDisplay.exe"
Sleep 100
If ( %PLAY_SOUND % )
PlaySound( %WAV_FILE% )
EndIf
#
# On suspend mode we set ACPower=0 (OFF)
IniWrite( %INI%, %INI_SECTION%, %INI_KEY%, "0" )
Sleep 100
%INI_KEY% = "ExtPowerOff"
#
# read in registry value
ExtPowerOff = \
RegRead (%REG_POWER_HIVE%, %REG_POWER_PATH%, \
%INI_KEY%)
Sleep 100
#
# remember this value
IniWrite( %INI%, %INI_SECTION%, %INI_KEY%, ExtPowerOff )
Sleep 100
#
# set our corresponding registry value
# i.e. always turn off device in 1 second even if AC powered
# note:
# this will be revised laterly with ON_AC_POWER_RESUME script
RegWriteDword (%REG_POWER_HIVE%, %REG_POWER_PATH%, \
%INI_KEY%, 4)
Sleep 100
#
# kill old notification(s) to prevent overlap
RemoveNotifications( %ON_AC_POWER_DAEMON% )
#
# set new notify (will be processed in CHECK_BACK_SECS from now on)
ReRun = TimeStamp() + %CHECK_BACK_SECS%
RunAt( ReRun, %ON_AC_POWER_DAEMON% )
Sleep 100
#
#
# turn device into standby
Run( %TURN_OFF% )
#
#
EndIf
#
#
Exit
# ON_AC_POWER_DAEMON.mscr
#
# jwoegerbauer 09/04/2009
# GNU General Public License (GPL), Version 2, June 1991
#
#
#
# NO ERROR CHECKING IS DONE !!!
#
#ErrorLevel("off")
Local()
#
#
# adjust to your needs (seconds !!!!)
Set CHECK_BACK_SECS, 15
#
#
Set ON_AC_POWER_DAEMON, "\My Flash Disk\programme\MortScript\ON_AC_POWER_DAEMON.exe"
Set ON_AC_POWER_RESUME, "\My Flash Disk\programme\MortScript\ON_AC_POWER_RESUME.exe"
Set TURN_OFF, "\My Flash Disk\SystemProgs\Sleep.exe"
Sleep 100
#
#
# kill old notification(s) to prevent overlap
RemoveNotifications( %ON_AC_POWER_DAEMON% )
Sleep 100
#
# check AC power line state
If( NOT ExternalPowered() )
#
# set new notify (will be processed in CHECK_BACK_SECS from now on)
ReRun = TimeStamp() + %CHECK_BACK_SECS%
RunAt( ReRun, %ON_AC_POWER_DAEMON% )
Sleep 100
#
# set another new notify
ReRun = TimeStamp() + 5
RunAt( ReRun, %TURN_OFF% )
#
#
Else
#
# call our application (script)
RunWait( %ON_AC_POWER_RESUME% )
#
#
EndIf
#
#
Exit
# ON_AC_POWER_RESUME.mscr
#
# jwoegerbauer 09/04/2009
# GNU General Public License (GPL), Version 2, June 1991
#
#
#
# NO ERROR CHECKING IS DONE !!!
#
ErrorLevel("off")
#
# Before using this script ensure file PowerNotifyFlags.ini
# is present and contains the following lines:
#
# [PowerOnOff]
# ACPower=1/0
#
Local()
#
#
# adjust to your needs
Set PLAY_SOUND, 1
Set WAV_FILE, "\My Flash Disk\programme\TroNikPowerNotifier\chime_up.wav"
Sleep 50
#
# prevent ourselves from doing things more than once
If (ExternalPowered())
#
#
If (%PLAY_SOUND% )
PlaySound( %WAV_FILE% )
EndIf
#
#
Set INI, "\My Flash Disk\programme\TroNikPowerNotifier\PowerNotifyFlags.ini"
Set INI_SECTION, "PowerOnOff"
Set INI_KEY, "ACPower"
Sleep 100
#
# Read PowerFlag value
ACPower = IniRead( %INI%, %INI_SECTION%, %INI_KEY% )
#
#
If(0 = ACPower)
#
# set ACPower=1 (ON)
IniWrite( %INI%, %INI_SECTION%, %INI_KEY%, "1" )
Sleep 100
#
#
EndIf
#
#
EndIf
#
#
Exit
THX in advance
get dotfred's taskmanager here and check if your event gets installed.
your script seems to be very complex anyway. what do want to achieve?
@egoist6
Thanks for the advise: i'll test the TaskMgr you told me - hopely it runs
on Windows CE 5.0 Core too.
The goal of my scripts is to turn my PND into sleep mode when AC power
is gone off, and wake the device up when AC power is re-supplied.
[ Vielleicht treffen wir uns zufällig unbekannterweise auf der Wies'n? ]
jwoegerbauer said:
@egoist6
Thanks for the advise: i'll test the TaskMgr you told me - hopely it runs
on Windows CE 5.0 Core too.
The goal of my scripts is to turn my PND into sleep mode when AC power
is gone off, and wake the device up when AC power is re-supplied.
[ Vielleicht treffen wir uns zufällig unbekannterweise auf der Wies'n? ]
Click to expand...
Click to collapse
what is pnd?
the script should turn the device off when device runs on battery and goes below a specific bettery percentage level?
regarding wakup the device:
doesn't your device automatically wake up when acpowered?
there should be a registry key available.
apart from that your script does not run when switched off at least it runs for about 5 minutes after switching off, then the WM OS stops running apps.
[logisch - bin auf der wiesn - prosit!]
@egoist6 (and all people around the world)
PND is my abbreviation for PersonalNavigationDevice, sometimes also referred to as PNA i.e. PersonalNavigationAssistant.
The 3-scripts-package should turn the device off, regardless to current battery state or current registry settings ( and
without the need of pressing the power-button ), and reverse. All should be accomplished by software in reason for commodity.
All seems to work well, but the first time the device wakes up the display is turned on too, even when no external AC power is
supplied.
The debug-version of the scripts-package summarizes the actions performed as follows:
1253358425 ON_AC_POWER_LOSS entered
1253358427 ON_AC_POWER_DAEMON started
1253358427 ON_AC_POWER_LOSS exited
1253358533 ON_AC_POWER_DAEMON entered
1253358534 External power supply detected
1253358534 ON_AC_POWER_RESUME started
1253358534 ON_AC_POWER_RESUME entered
1253358535 ON_AC_POWER_RESUME exited
1253358536 ON_AC_POWER_DAEMON exited
Hence it's obvious that in script ON_AC_POWER_DAEMON in branch
If (NOT ExternalPowered())
...
Else
the instruction
# turn device again into standby
Run( %TURN_OFF% )
never will be executed - and that's my question: WHY NOT?
---------------------
BTW: dotfred's taskmanager isn't Windows CE 5.0 Core compatible.
try with longer delay between adding those two notification events.
maybe the second events does not get installed.
Dear jwoegerbauer,
Thank you very much for your inspiration. I have been trying to find a not so difficult way to implement a similar solution in my PND. After seeing your work, it seems Mortscript would be a wonderful solution.
I usually run IGO8 on my PND and IGO8 has a built-in Standby function when external power off. Hence, I am more interested in the "external power on resume" part of your script. Just wondering whether I can run "ON_AC_POWER_DAEMON" and "ON_AC_POWER_RESUME" independently from "ON_AC_POWER_LOSS".
In addition, there is some mentioning of
1 POWERNOTIFIER_PROMPT.mscr
2 Sleep.exe
3 ToggleDisplay.exe
in your scripts. I did several Google search, but cannot find any source of those executables. Is it possible to pack a full working version (include all the scripts and executables used) for me to try and appreciate your amazing work please?
Thanks in advance.
http://www.mediafire.com/file/jodzwgn5tnc/ON_AC_POWER_TEST.zip
Many thanks for sharing the package. I have further modified them to make the DAEMON running continuously. The scripts will now perform as follows:
Ask the user whether they want to activate this Auto Power On feature.
If yes
The device goes to Sleep when no external power applies; and
The DAEMON will keep searching until external power detected and
Wake up the device
p.s. to exit from the loop, I use the Power Button to turn off and restart the device.
Code:
# ON_AC_POWER_MENU.mscr
# Implemented on MortScript (www.sto-helit.de)
# 2009-12-07
# Karako
# GNU General Public License (GPL), Version 2, June 1991
ErrorLevel("off")
Local()
Set ON_AC_POWER_DAEMON, "\SDMMC\ON_AC_POWER\ON_AC_POWER_DAEMON.exe"
Set RUN_APP, "\SDMMC\igo8\igo8.exe"
Set LOOP_SECS, 11
options[1] = "Skip Auto On/Off"
options[2] = " "
options[3] = "Engage Auto On/Off"
Sleep 100
SetChoiceEntryFormat(20, 16, "Verdana")
Choice("Auto_On_Off_Option", \
"^NL^AC Power Auto On/Off^NL^Choose whether you want the GPS device to be^NL^automatically fired up when External Power is supplied^NL^^NL^", \
options)
Case( 1 )
# do nothing
#
Case( 2 )
# do nothing
#
Case( 3 )
# kill old notification(s) to prevent overlap
RemoveNotifications( %ON_AC_POWER_DAEMON% )
Sleep 100
# run application
Run( %RUN_APP% )
# Wait for APP finish loading
Sleep 45000
ReRun = TimeStamp() + %LOOP_SECS%
RunAt( ReRun, %ON_AC_POWER_DAEMON% )
Sleep 100
Exit
EndChoice
# kill old notification(s) to disable this function
RemoveNotifications( %ON_AC_POWER_DAEMON% )
Sleep 100
Run( %RUN_APP% )
Exit
# ON_AC_POWER_DAEMON.mscr
# Implemented on MortScript (www.sto-helit.de)
# based on the script from jwoegerbauer 09/04/2009
# GNU General Public License (GPL), Version 2, June 1991
# modified by Karako 2009-12-07
ErrorLevel("off")
Local()
# adjust to your needs (must > 10 seconds !!!!)
Set LOOP_SECS, 11
Set ON_AC_POWER_DAEMON, "\SDMMC\ON_AC_POWER\ON_AC_POWER_DAEMON.exe"
Set ON_AC_POWER_RESUME, "\SDMMC\ON_AC_POWER\ON_AC_POWER_RESUME.exe"
Set TURN_OFF, "\SDMMC\ON_AC_POWER\Sleep.exe"
Sleep 300
# kill old notification(s) to prevent overlap
RemoveNotifications( %ON_AC_POWER_DAEMON% )
Sleep 500
# check AC power line state
If( NOT ExternalPowered() )
# set new notification queue
ReRun = TimeStamp() + %LOOP_SECS%
RunAt( ReRun, %ON_AC_POWER_DAEMON% )
Sleep 100
# turn device again into standby
Run( %TURN_OFF% )
Else
# call resume script
RunWait( %ON_AC_POWER_RESUME% )
Sleep 1500
EndIf
Exit
# ON_AC_POWER_RESUME.mscr
# Implemented on MortScript (www.sto-helit.de)
# based on the script from jwoegerbauer 09/04/2009
# GNU General Public License (GPL), Version 2, June 1991
# modified by Karako 2009-12-07
ErrorLevel("off")
Local()
# adjust to your needs ( must > 10 secs)
Set LOOP_SECS, 11
Set ON_AC_POWER_DAEMON, "\SDMMC\ON_AC_POWER\ON_AC_POWER_DAEMON.exe"
Set PLAY_SOUND, 0
Set WAV_FILE, "\SDMMC\ON_AC_POWER\notify.wav"
Sleep 100
If (ExternalPowered())
If (%PLAY_SOUND% )
PlaySound( %WAV_FILE% )
EndIf
# set new notification queue
ReRun = TimeStamp() + %LOOP_SECS%
RunAt( ReRun, %ON_AC_POWER_DAEMON% )
Sleep 100
#
EndIf
Exit
However, I experienced the same problem that the display will turn on and off itself for about 1 to 2 seconds in every cycle (about 10 seconds in my settings) when external power is not attached.
Is it possible to do a Registry tweak to force the display off when the device just wakes up by the Daemon to check for external power please?
I am thinking Registry keys like
HKLM\SYSTEM\CurrentControlSet\Control\Power\State\BacklightOff
or
HKLM\SYSTEM\CurrentControlSet\Control\Power\State\ScreenOff
Since I seldom work with Registry, really appreciate for anybody's guidance and hints.
@karako,
First of all you got the logic! You experienced the same inadequacies as me.
Secondly here's why I startet the project: For reason of comfort (when in car) I wanted to have my PND automatically put into sleep mode, when external power supply is lost, and in reverse put back again into active mode if external power is re-supplied, all this without the need to press the device's power button and regardless to device's power settings. Hence I didn't implement a menu.
Hope with you things will get working!
Hi jwoegerbauer,
Further research on the subject and review again deeply on your previous advice and work, gives me a strong feeling that the CeRunAtEvent could be a much better and straight forward approach in terms of power management.
Then I found this interesting article with sample codes:
http://www.codeproject.com/KB/mobil...&noise=3&sort=Position&view=Quick&fr=26#xx0xx
Unfortunately, when I execute the sample program (WakeUpStart.exe) in my WinCE 5.0 PND (Compact Framework 2.0 installed) and Windows Mobile 5.0 PDA phone (Compact Framework 3.5 installed), both experienced the same problem - the ACCEPT button doesn't work in the program and hence I cannot execute it.
The program was written in C#, a new language for me. I will try to trace the problem, but without Visual Studio IDE, I am afraid I can hardly debug it myself.
Let's see if anybody would be interested to carry on from here.
Oops. Apparently, some experts had already found that:
- ... not every event can be handled with CeRunAppAtEvent
- ... I assume it is OEM related and the implementation of these events is not mandatory
- ... did try to use ON_AC_POWER and it did not work
above extracted from the thread: http://forum.xda-developers.com/showthread.php?t=558152
This takes us back to the "check the PowerStatus structure for ON AC POWER" approach.
@karako,
there is a (freeware) tool for observing and fixing notification event queue on Windows Smartphone and Windows PocketPC devices: HooverNI.
http://code.google.com/p/hoover-ni/
Hope this hint will be useful for you.
any news on this issue? i am considering changing my GPS. and i think of WIN CE device. only thing that bothers me is automatic turn on and off with car ignition.
Hi, did anyone figure this one out? I have pocket navi with Windows CE 6 and the last script on 1st page works perfectly .. but only in Windows desktop, when I change to GPS overlay it doesnt work anymore, how can I make it work?

Kernel scheduler tweaks (non-BFS)

First, let me say I am deeply sorry to open yet another thread on this subject. But I have made some investigations of my own and would like to make some clarifications which I think should not be buried on page 6 of some long thread....
This thread continues the discussion started by these threads:
http://forum.xda-developers.com/showthread.php?t=689829
http://forum.xda-developers.com/showthread.php?t=785988
From what I gather there about 5 different parameters which are purposed for tweaking:
- NEW_FAIR_SLEEPERS (default ON) - This is about the only parameter which I do feel some difference when disabling it (on Floyo 0.8) and for the worse. Hence currently I intend to leave it on.
- NORMALIZED_SLEEPER (default ON) - I found various recommendations to turn this off. I don't feel much difference but maybe there is a slight improvement. Currently I intend to turn it off.
- sched_latency_ns:
* Targeted preemption latency for CPU-bound tasks:
* (default: 20ms * (1 + ilog(ncpus)), units: nanoseconds)
*
* NOTE: this latency value is not the same as the concept of
* 'timeslice length' - timeslices in CFS are of variable length
* and have no persistent notion like in traditional, time-slice
* based scheduling concepts.
*
* (to see the precise effective timeslice length of your workload,
* run vmstat and monitor the context-switches (cs) field)
- sched_min_granularity_ns -
* Minimal preemption granularity for CPU-bound tasks:
* (default: 4 msec * (1 + ilog(ncpus)), units: nanoseconds)
- sched_wakeup_granularity_ns (not sure if this one was mentioned in previous threads but also related)
* SCHED_OTHER wake-up granularity.
* (default: 5 msec * (1 + ilog(ncpus)), units: nanoseconds)
*
* This option delays the preemption effects of decoupled workloads
* and reduces their over-scheduling. Synchronous workloads will still
* have immediate wakeup/sleep latencies.
Note the descriptions are from the kernel sources and default values are a bit different and also dependent on the init.rc in the ramdisk which is dependent on the ROM.
I tryed to play with the last 3 parameters in a very wide range and did not feel much difference. Based on my experience and searches over these forums and such I currently have these values:
sched_latency_ns 5000000
sched_wakeup_granularity_ns 1000000
sched_min_granularity_ns 1000000
They are somewhat arbitrary and if someone can bring up a scenario where the difference is noticeable I will happy to hear it.
Some technical notes:
- I have seen this "numerical" tweak in multiple places:
kernel.sched_features = 24188
This is not smart using a numerical value, as there are some new backports which I would like to incorporate into my kernel and they actually change the "correct" numerical value here.
The preferred way to tweak these settings was brought by androcheck here. Just a reminder:
Code:
# Step 1: Mount debugfs (which is a virtual filesystem like /proc/ or /sys/)
mount -t debugfs none /sys/kernel/debug
# Step 2 (optional): Display the current scheduler flags
cat /sys/kernel/debug/sched_features
# Step 3: Set the flag NO_NEW_FAIR_SLEEPERS
echo "NO_NEW_FAIR_SLEEPERS" > /sys/kernel/debug/sched_features
# Step 4: Unmount debugfs again
umount /sys/kernel/debug
I would actually skip the unmounting step since it doesn't bother to have it there and then you can play with the different parameters at /sys/kernel/debug directly.
I would like to emphasize my point about the kernel features tweaking, using an example with my current settings (only NORMALIZED_SLEEPER disabled):
Code:
# mount -t debugfs none /sys/kernel/debug
# echo NO_NORMALIZED_SLEEPER > /sys/kernel/debug/sched_features
# cat /sys/kernel/debug/sched_features | sed "s/ /\n/g"
NEW_FAIR_SLEEPERS
NO_NORMALIZED_SLEEPER
WAKEUP_PREEMPT
START_DEBIT
AFFINE_WAKEUPS
CACHE_HOT_BUDDY
SYNC_WAKEUPS
NO_HRTICK
NO_DOUBLE_TICK
ASYM_GRAN
LB_BIAS
LB_WAKEUP_UPDATE
ASYM_EFF_LOAD
NO_WAKEUP_OVERLAP
LAST_BUDDY
# cat /proc/sys/kernel/sched_features
24189
So I would highly recommend tweaking the sched_features only through the /sys/kernel/debug/sched_features where you actually know what you are doing.
Then to make it permanent you can grab the numerical value from /proc/sys/kernel/sched_features and write it, for example, to the sysctl.conf.
- One final technical note: f_padia in his post here detailed nicely how to make the changes permanent using sysctl.conf.
I find sysctl also very useful for temporary tweaking of the values, for example:
Code:
sysctl -w kernel.sched_latency_ns=5000000
sysctl -w kernel.sched_min_granularity_ns=1000000
sysctl -w kernel.sched_wakeup_granularity_ns=1000000
Alternatively you could also write them to the appropriate "file" at /proc/sys/kernel. Both these methods do not require the mount of the debug_fs but neither gives you the literal interface to the kernel features (which the debug_fs does - see above).
Removed the part about the OWNER_SPIN, apparently was using an experimental version of my kernel which has an additional OWNER_SPIN sched_feature which makes the numerical value of 24188 incorrect.
Most likely you have no idea what I am talking this was just one epic fail on my side - you can ignore it. Just read the first post it is now updated.
looks nice.. will give it a go
Thanks for your research and additional information to this topic!
this IS excellent work.. on my 2.1 dext these hacks, included in one .sh in init.d then chmod +x, improved a lot speed and I can even think there's a faster boot
you all rule man!

[REF] Startup script speed tweaks

Hi guys,
UPDATE: Over time, I've modified some of these values in my SpeedMod kernel. The values here may not be the best ones.
NOTE: These tweaks are now included in kernels based on sztupy's Universal Lagfix, for example:
http://forum.xda-developers.com/showthread.php?t=822756
But they must be manually activated from the recovery menu.
I've been using Linux kernel tweaks in a startup script to make the phone smoother.
With these tweaks, the phone is quite smooth and fast even without using the filesystem lagfixes.
These settings are only useful for you if you know how to create and modify a startup script. I use the old playlogos hack myself, but I'm sure there are many new ways to do it now.
Code:
# Tweak cfq io scheduler
for i in $(ls -1 /sys/block/stl*) $(ls -1 /sys/block/mmc*) $(ls -1 /sys/block/bml*) $(ls -1 /sys/block/tfsr*)
do echo "0" > $i/queue/rotational
echo "1" > $i/queue/iosched/low_latency
echo "1" > $i/queue/iosched/back_seek_penalty
echo "1000000000" > $i/queue/iosched/back_seek_max
echo "3" > $i/queue/iosched/slice_idle
done
# Remount all partitions with noatime
for k in $(busybox mount | grep relatime | cut -d " " -f3)
do
sync
busybox mount -o remount,noatime $k
done
# Tweak kernel VM management
echo "0" > /proc/sys/vm/swappiness
#echo "10" > /proc/sys/vm/dirty_ratio
#echo "4096" > /proc/sys/vm/min_free_kbytes
# Tweak kernel scheduler, less aggressive settings
echo "18000000" > /proc/sys/kernel/sched_latency_ns
echo "3000000" > /proc/sys/kernel/sched_wakeup_granularity_ns
echo "1500000" > /proc/sys/kernel/sched_min_granularity_ns
# Misc tweaks for battery life
echo "2000" > /proc/sys/vm/dirty_writeback_centisecs
echo "1000" > /proc/sys/vm/dirty_expire_centisecs
EDIT: Explanations:
# Remount all partitions with noatime
atime is a setting where the filesystem updates the access time of a file. This creates a write-after-every-read which slows things down. By default all partitions are mounted with relatime, which is an optimized version of atime. noatime is the fastest, and afaik we don't need atime.
# Tweak cfq io scheduler
Tweaked settings of the disk io scheduler more for flash memory. Defaults are optimized for spinning harddisks. Lowered the idle wait, re-enable the low latency mode of cfq, removed the penalty for back-seeks and explicitly tell the kernel the storage is not a spinning disk.
# Tweak kernel VM management
Set tendency of kernel to swap to minimum, since we don't use swap anyway.
Lower the amount of unwritten write cache to reduce lags when a huge write is required.
Increase tendency of kernel to keep block-cache to help with slower RFS filesystem.
Increase minimum free memory, in theory this should make the kernel less likely to suddenly run out of memory.
# Tweak kernel scheduler
Make the task scheduler more 'fair' when multiple tasks are running. This has a huge effect on UI and App responsiveness. These values (less aggressive settings) are 20% of the Linux defaults, and about half of the Android defaults.
# Miscellaneous tweaks
Increase the write flush timeouts to save some battery life.
___________________________________
EDIT: How to create/use a startup script:
You need root and busybox for this.
This procedure is adapted from the old OCLF which used this method to create a startup script in /system/userinit.sh
Check if the file /system/userinit.sh exists. If it does, u should just edit that file as the startup script and DO NOT do the procedure below.
Here's how to do it manually. Do this only if some other lagfix/patch has not already done the playlogos hack, otherwise u might overwrite the other script!
Create the startup script on your PC. Use adb to push it to /sdcard/userinit.sh
adb push userinit.sh /sdcard/userinit.sh
On your PC, create a file called playlogos1 with this content:
#!/system/bin/sh
sh /data/userinit.sh
playlogosnow
Use adb to push the playlogos1 file to /sdcard/playlogos1
adb push playlogos1 /sdcard/playlogos1
Now use adb shell, su and do this:
busybox mount -o remount,rw /system;
busybox cp /sdcard/userinit.sh /data/userinit.sh;
busybox mv /system/bin/playlogos1 /system/bin/playlogosnow;
busybox cp /sdcard/playlogos1 /system/bin/playlogos1;
chmod 755 /system/bin/playlogos1;
chmod 755 /data/userinit.sh;
The startup script will be /data/userinit.sh
The reason I put the startup script in /data is so that if you mess up the startup script and get stuck during boot, you can do a "clear data" from recovery, and the startup script will be erased.
Could you explain what this actually does for the non linux savvy, also maybe you could make a script/app for this so everyone else can try it ?
hardcore said:
Hi guys,
I've been using Linux kernel tweaks in a startup script to make the phone smoother.
With these tweaks, the phone is quite smooth and fast even without using the filesystem lagfixes.
These settings are only useful for you if you know how to create and modify a startup script. I use the old playlogos hack myself, but I'm sure there are many new ways to do it now.
Code:
# Remount all partitions with noatime
for k in $(mount | cut -d " " -f3)
do
sync
mount -o remount,noatime $k
done
# Tweak cfq io scheduler
for i in $(ls -1 /sys/block/stl*) $(ls -1 /sys/block/mmc*) $(ls -1 /sys/block/bml*) $(ls -1 /sys/block/tfsr*)
do echo "0" > $i/queue/rotational
echo "1" > $i/queue/iosched/low_latency
echo "1" > $i/queue/iosched/back_seek_penalty
echo "1000000000" > $i/queue/iosched/back_seek_max
echo "3" > $i/queue/iosched/slice_idle
done
# Tweak kernel VM management
echo "0" > /proc/sys/vm/swappiness
echo "10" > /proc/sys/vm/dirty_ratio
echo "1000" > /proc/sys/vm/vfs_cache_pressure
echo "4096" > /proc/sys/vm/min_free_kbytes
# Tweak kernel scheduler
echo "2000000" > /proc/sys/kernel/sched_latency_ns
echo "500000" > /proc/sys/kernel/sched_wakeup_granularity_ns
echo "400000" > /proc/sys/kernel/sched_min_granularity_ns
# Miscellaneous tweaks
setprop dalvik.vm.startheapsize 8m
setprop wifi.supplicant_scan_interval 90
setprop windowsmgr.max_events_per_sec 68
Click to expand...
Click to collapse
VERY interesting
EarlZ said:
you could make a script/app for this so everyone else can try it ?
Click to expand...
Click to collapse
+1, pretty plz, also, is this compatible with voodoo?
INeedYourHelp said:
+1, pretty plz, also, is this compatible with voodoo?
Click to expand...
Click to collapse
Should be compatible, although u need to know how to add it into voodoo's startup script.
Hello
Values description for each one and why is welcome
supercurio said:
Hello
Values description for each one and why is welcome
Click to expand...
Click to collapse
Hey supercurio! Great job on Voodoo, I am particularly keen on the Sharpness, Video and future Sound fixes. I think its very cool that you found out how to modify the sharpness (S-AMOLED's PenTile matrix software algorithms?).
Edited the starting post with explanations. Most of them should be documented somewhere in the Linux sources / documents.
I've been using them for a while, tweaking values here n there. I think I've finally reached a stage where I'm confident enough to recommend them to others to try. There could be more optimum values with further testing, but these work well for me with Froyo.
hardcore said:
Hey supercurio! Great job on Voodoo, I am particularly keen on the Sharpness, Video and future Sound fixes. I think its very cool that you found out how to modify the sharpness (S-AMOLED's PenTile matrix software algorithms?).
Edited the starting post with explanations. Most of them should be documented somewhere in the Linux sources / documents.
I've been using them for a while, tweaking values here n there. I think I've finally reached a stage where I'm confident enough to recommend them to others to try. There could be more optimum values with further testing, but these work good for me so far with Froyo.
Click to expand...
Click to collapse
Yeah thank you so much for taking the time and sharing, i'll integrate them after a bit of testing
About the sharpness filter yes this is the main difference between S-AMOLED and AMOLED panel wise.
It's a hardware sharpness filter which is here to fight the fuzziness introduced by the pentile pattern but.. they overdid it a bit.
The "perfect" values are of course closer than the one with the same radius that the one of the blur introduced itself with the pixel pattern.
I feel it can maybe be improved a hair
I'll soon publish a version that allow write to the mDNIe register so you'll be able to play *live* with it too
Nice, could these be modified post-startup? like I go adb and copy paste some of them for testing?
I've tested setprop windowsmgr.max_events_per_sec 68, no difference. Set it to
setprop windowsmgr.max_events_per_sec 10 and still, no difference.
xan said:
Nice, could these be modified post-startup? like I go adb and copy paste some of them for testing?
I've tested setprop windowsmgr.max_events_per_sec 68, no difference. Set it to
setprop windowsmgr.max_events_per_sec 10 and still, no difference.
Click to expand...
Click to collapse
hey xan, you made me remember to add run-parts support.
i'll do that and you'll be able to set it without special hack very soon with voodoo
xan said:
Nice, could these be modified post-startup? like I go adb and copy paste some of them for testing?
I've tested setprop windowsmgr.max_events_per_sec 68, no difference. Set it to
setprop windowsmgr.max_events_per_sec 10 and still, no difference.
Click to expand...
Click to collapse
I don't think the setprop values can be modified post-startup. You can check if the value was modified by doing a getprop. (The default value for that prop is 55.)
The rest of them can be modified post-startup though.
Excuse my noobiness on Android, I would like an explanation on this command:
hardcore said:
# Tweak kernel VM management
echo "0" > /proc/sys/vm/swappiness
Click to expand...
Click to collapse
On my GNU/Linux system I've set vm.swappiness to 10, because I've got plenty MiB of RAM and I don't want my system to swap a lot. Is this swappiness the same as Linux? Because that would mean having the system to use more RAM, and since we don't have much of that available by default, I'm just surprised you didn't set a higher value. (I'm not saying you don't know what you're doing, I just want to learn how it works!)
By the way, this script is going to be a must-have, I think you've put an excellent effort on i9000 Android development! Thanks for sharing!
xan said:
Nice, could these be modified post-startup? like I go adb and copy paste some of them for testing?
I've tested setprop windowsmgr.max_events_per_sec 68, no difference. Set it to
setprop windowsmgr.max_events_per_sec 10 and still, no difference.
Click to expand...
Click to collapse
The aosp windowmanager (android framework) ignores values <35. (Samsung could have changed something here, but that is very unlikely).
That value does not affect the framerate, but how many touch events are reported to the apps; this saves some cpu if the user keeps touching the screen.
Fr4gg0r said:
The aosp windowmanager (android framework) ignores values <35. (Samsung could have changed something here, but that is very unlikely).
That value does not effect the framerate, but how many touch events are reported to the apps; this saves some cpu if the user keeps touching the screen.
Click to expand...
Click to collapse
Yes, i tried on Eclair to set it to 56fps (real fps is 55.5555555555555) but touch scrolling were not smoother.
I hope it can be improved in some way!
Fr4gg0r said:
The aosp windowmanager (android framework) ignores values <35. (Samsung could have changed something here, but that is very unlikely).
That value does not affect the framerate, but how many touch events are reported to the apps; this saves some cpu if the user keeps touching the screen.
Click to expand...
Click to collapse
Thanks for the info. Looks like default settings are best unless we can actually change the refresh rate.
supercurio said:
Yeah thank you so much for taking the time and sharing, i'll integrate them after a bit of testing
Click to expand...
Click to collapse
We are eagerly waiting for it =) I don't know when you manage to sleep since you have so many things to do in voodoo =)
hardcore said:
Hi guys,
I've been using Linux kernel tweaks in a startup script to make the phone smoother.
With these tweaks, the phone is quite smooth and fast even without using the filesystem lagfixes.
These settings are only useful for you if you know how to create and modify a startup script. I use the old playlogos hack myself, but I'm sure there are many new ways to do it now.
Code:
# Remount all partitions with noatime
for k in $(mount | cut -d " " -f3)
do
sync
mount -o remount,noatime $k
done
# Tweak cfq io scheduler
for i in $(ls -1 /sys/block/stl*) $(ls -1 /sys/block/mmc*) $(ls -1 /sys/block/bml*) $(ls -1 /sys/block/tfsr*)
do echo "0" > $i/queue/rotational
echo "1" > $i/queue/iosched/low_latency
echo "1" > $i/queue/iosched/back_seek_penalty
echo "1000000000" > $i/queue/iosched/back_seek_max
echo "3" > $i/queue/iosched/slice_idle
done
# Tweak kernel VM management
echo "0" > /proc/sys/vm/swappiness
echo "10" > /proc/sys/vm/dirty_ratio
echo "1000" > /proc/sys/vm/vfs_cache_pressure
echo "4096" > /proc/sys/vm/min_free_kbytes
# Tweak kernel scheduler
echo "2000000" > /proc/sys/kernel/sched_latency_ns
echo "500000" > /proc/sys/kernel/sched_wakeup_granularity_ns
echo "400000" > /proc/sys/kernel/sched_min_granularity_ns
# Miscellaneous tweaks
setprop dalvik.vm.startheapsize 8m
setprop wifi.supplicant_scan_interval 90
EDIT: Explanations:
# Remount all partitions with noatime
atime is a setting where the filesystem updates the access time of a file. This creates a write-after-every-read which slows things down. By default all partitions are mounted with relatime, which is an optimized version of atime. noatime is the fastest, and afaik we don't need atime.
# Tweak cfq io scheduler
Tweaked settings of the disk io scheduler more for flash memory. Defaults are optimized for spinning harddisks. Lowered the idle wait, re-enable the low latency mode of cfq, removed the penalty for back-seeks and explicitly tell the kernel the storage is not a spinning disk.
# Tweak kernel VM management
Set tendency of kernel to swap to minimum, since we don't use swap anyway.
Lower the amount of unwritten write cache to reduce lags when a huge write is required.
Increase tendency of kernel to keep block-cache to help with slower RFS filesystem.
Increase minimum free memory, in theory this should make the kernel less likely to suddenly run out of memory.
# Tweak kernel scheduler
Make the task scheduler more 'fair' when multiple tasks are running. This has a huge effect on UI and App responsiveness. These values are 10% of the Linux defaults, and about half of the Android defaults.
# Miscellaneous tweaks
Manually set the starting dalvik heap size.
Increase wifi scanning gap to reduce battery usage.
Click to expand...
Click to collapse
I'm interested in doing this but I'm not sure where should I put the file. I checked playlogos1 from /system/bin but it's a binary file.. Tried to find playlogos hack on the forum but can't really find anything...
i have a jpm with voodoo, and i have copy this code into /voodoo/scripts/init.sh
just simplely add to the end of it, of course, before the last line.
the system reboot is ok, but i havent see the effects yet.
btw, "ls -1 /sys/block/mmc*" in adb give us:
Code:
ls -1 /sys/block/mmc*
-1: No such file or directory
/sys/block/mmcblk0
/sys/block/mmcblk1
so, "-1" key is useless
[kab] said:
btw, "ls -1 /sys/block/mmc*" in adb give us:
Code:
ls -1 /sys/block/mmc*
-1: No such file or directory
/sys/block/mmcblk0
/sys/block/mmcblk1
so, "-1" key is useless
Click to expand...
Click to collapse
it should be -l, not one

[Q] Android on HTC TP2/Rhodium - Qwerty/Azerty keyboard ??

Hi Gentlemen,
I'm new to this forum, and recently installed Android on my TP2 (which I've been using for couple of years with WM6 then Win7).
My XD Android (FRX07) works fine [BTW: congrats & thanks to the great developers !!]
Physical keyboard on OS is "qwerty" though (ie, US/UK based), whereas it's "azerty" on my hardware (ie, French).
Does anybody know how to change this ? Thanks !
I went through the parameters and changing language to French didn't work out (must be the digital keyboard, not the physical one), nor did I find any solution on the Forum.
So, Thanks in advance...
Did you try changing the keyboard setting in the start up text?
Browse your SD Card and find startup.txt file
Open it with your favorite text editor
You will find this line looking like this (depending to your model):
[ set cmdline "lcd.density=240 msmvkeyb_toggle=off gsensor_axis=2,1,3 pm.sleep_mode=1 physkeyboard=rhod100_uk" ]
Just replace by :
[ set cmdline "lcd.density=240 msmvkeyb_toggle=off gsensor_axis=2,1,3 pm.sleep_mode=1 physkeyboard=rhod100_fr" ]
without the hooks of course

Skinny Pro Custom Boot Images

What is Skinny Pro?
This is not for NOOBS - it breaks functionality in Xiaomi apps that try to communicate back to head office. This is an intentional feature and is for people who are not interested in being part of the Xiaomi ecosphere. LEAVE NOW if you have, or intend to log on to Xiaomi and use their services!!!!
Skinny does not magically fix poor choice of ROMs, Apps or lack of knowledge.
It is not a custom Kernel - it is a custom boot.img containing modified initialization scripts for the stock kernel.
There are 2 distinct versions:
Based on 7.1.4.0 - Use for 7.1.xx to 7.3.20 (MIUI7) Support discontinued since V7 (O.P no longer applies to this version)
Based on MIUI8 - use for MIUI7.5.x and MIUI8
Design Brief:
No Placebos
To overcome the limitations of Stock MIUI being:
Poor battery life
Poor performance
Chronic invasion of privacy
Boot.img mods:
Disable starting of non-present devices and services
Disable stock recovery overwriting TWRP
Disable OTA services (no use on a modified ROM)
Disable starting of invasive (spying) services
Disable fingerprint sensor infrastructure (not for our device)
Disable find device infrastructure
Disable second space infrastructure
Build in init.d support
Enable zram swap creation (disable conflicting "mcd" service infrastructure)
Mass Storage Device mode added for external SDCard
Improved TCP Buffer values
Reconfigured internal SDCard suppport to remove uneccessary symlinks
Reduce cpu scheduler, foreground and background tasks deadtime (throttling)
Add some Android 6.0 TCP tweaks
Expose LMK and HPS settings for user configuration
What you will see:
Faster boot
Less background activity at idle
Less RAM usage
Less spying/reporting activity
Better battery life
Better Performance
More reliable and faster data speeds
Install your chosen ROM and get it past the first setup screens before flashing a Skinny Boot image.
If you really must install Xposed, install this after the Skinny boot image.
Do not install "kernel" tweaking apps - they will conflict with the inherent settings in Skinny!
No wipes are necessary after installing the boot.img
What else do I need to do?
First, an explanation as to why we need to set everything the way it is:
The cpu is controlled by 4 separate mechanisms:
1. Thermal throttling - will limit frequencies and shut down cores to stay within safe operating temperatures - will override all other mechanisms. Settings available: High Performance (less strict) or Balanced (default)
2. Performance Server - will temporarily boost freqs and cores depending on detected conditions such as screen touch, screen update or rotate, app open. Limited settings available via /etc/perfservscntbl.txt
3. Hotplugging Service - will add or remove cpu cores as load requires. Some settings are accessible through /proc/hps/
4. Interactive Governor - will throttle freqs up and down based on load and add or remove cores also. Some settings are accessible through /sys/devices/system/cpu/cpufreq/interactive/
You will notice there are competing and often contradicting mechanisms. The factory defaults essentially disable the Interactive governor as being the primary source of initial boosting cpu freqs. The "boost" setting normally found in the governor is non-functional - instead, the Perf Server will boost to 2 cores @ 1183MHz when a potential demand for processing power is detected apart from a simple screen touch. The interactive governor will take over scaling the freq and number of cores after the perf server boost period expires or load demands more cpu power than the boost caters for.
Since the Performance Server tends to over-react, setting 2 cores @ 1183MHz for the smallest of events, we disable it completely by manually editing the existing line in /system/build.prop from:
ro.mtk_perfservice_support=1 to ro.mtk_perfservice_support=0
You must do this yourself - this is vital since all further Governor and Hotplug settings rely upon it being disabled.
Editing /etc/perfservscntbl.txt is not required since this file will no longer be processed.
The settings for the Interactive Governor and Hotplug are modified from factory default to correct a couple of serious problems:
1. The cpu will not reliably throttle back to idle at 403MHz. This has a huge impact on battery.
This is caused by the timer_rate setting being too short allowing transient background activities to trigger scaling the freq up. Increasing the time effectively averages out the transient load spikes so the cpu will not break idle unnecessarily.
2. The cpu does not respond to increasing or decreasing load fast enough creating micro-lags and consuming battery. Reducing the min_sample_time will shorten the time taken for the cpu to lower in freq when load drops off. Reducing the above_hispeed_delay will reduce the response time to increase the cpu freq in response to a load. Both of these settings also compensate for the longer than standard timer_rate that introduces some sluggishness by necessity.
All other values are set to encourage the frequency and number of cores to rapidly and reliably return to idle to save battery while still providing sufficient responsiveness to sudden load demands.
Create an init.d script exactly as follows: (premade file 01_init also available to download)
Code:
#!/system/bin/sh
### CPU freqs standard RN2: 403000, 806000, 1183000, 1326000, 1469000, 1625000, 1781000, 1950000
### CPU freqs PRIME RN2: 403000, 806000, 1183000, 1326000, 1482000, 1664000, 1885000, 2158000
### GPU freqs standard RN2: 253500, 299000, 390000, 442000, 546000
### GPU freqs PRIME RN2: 253500, 338000, 390000, 546000, 676000
# Stop running boot-time services (enable the lines for services you want to stop)
#stop sn # USB serial number allocation
#stop wifi2agps # WiFi assisted GPS (for fine location)
#stop agpsd # Mobile Network assisted GPS (for fine locastion)
#stop emsvr_user # Engineering Mode server
#stop PPLAgent # Privacy Protection Lock
#stop mtkbt # MTK Bluetooth
#stop batterywarning # Battery warning service
#stop debuggerd64 # debug logging
#stop debuggerd # debug logging
#stop logd # logging
#stop autokd # autotune for WiFi
#Set to permissive (enable this line if SE permissive mode is required)
# setenforce 0
# Tweak Interactive Governor (now set in boot.img - enable here to override values)
#echo 403000 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq # factory default 1183000
#echo 99 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load # factory default 99
#echo 99 > /sys/devices/system/cpu/cpufreq/interactive/target_loads # factory default 90
#echo 25000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate # factory default 20000
#echo 10000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time # factory default 20000
#echo 5000 > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay # factory default 20000
#echo 40000 > /sys/devices/system/cpu/cpufreq/interactive/timer_slack # factory default 80000
# Limit CPU max freqs (To limit the maximum cpu freq, enable both of these lines. Select a valid freq for your device from table at start)
#echo 1781000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
#echo 1781000 > /proc/cpufreq/cpufreq_limited_max_freq_by_user
# Limit foreground CPU cores (set in boot.img - enable here to override values) 0-1 min, 0-7 max Example shows 5 cores (also needs to be set in Hotplug)
#echo 0-4 > /dev/cpuset/foreground/cpus
# Hotplug settings (set in boot.img - enable here to override values) Note: num_limit values are 1-8
#echo 5 > /proc/hps/num_limit_low_battery # factory default 8
#echo 5 > /proc/hps/num_limit_power_serv # factory default 8
#echo 5 > /proc/hps/num_limit_thermal # factory default 8
#echo 5 > /proc/hps/num_limit_ultra_power_saving # factory default 8
#echo 99 > /proc/hps/up_threshold # factory default 95
#echo 87 > /proc/hps/down_threshold # factory default 85
#echo 0 > /proc/hps/rush_boost_enabled # factory default 1
#echo 0 > /proc/hps/input_boost_enabled # factory default 1
# Tweak GPU Settings (Look in /proc/gpufreq/gpufreq_power_dump for power usage at different freqs)
# To disable GPU touch boost:
#echo 0 > /proc/gpufreq/gpufreq_input_boost # factory default 1 (enabled)
# To limit max GPU freq: (Select a valid freq for your device from table at start)
#echo 442000 > /proc/gpufreq/gpufreq_opp_max_freq # factory default 0 (disabled)
# Tweak VM (set in boot.img - enable here to override values)
#echo 300 > /proc/sys/vm/dirty_expire_centisecs # factory default 200
#echo 500 > /proc/sys/vm/dirty_writeback_centisecs # factory default 300
# Tweak LMK (set in boot.img - enable here to override values) 18 37 56 75 93 112MB # factory default 72 90 108 126 219 317MB (MB x 256 = value)
#echo 4608,9472,14336,19200,23808,28672 > /sys/module/lowmemorykiller/parameters/minfree
#Enable zram (no zram set by default, enable first 4 lines if 1 zram required, all 7 lines if 2 zram required)
#echo 40 > /proc/sys/vm/swappiness
#echo 268435456 > /sys/block/zram0/disksize # for single zram: 536870912 = 512MB (for non-prime version) 1073741824=1GB (for prime version)
#/system/xbin/busybox mkswap /dev/block/zram0
#/system/xbin/busybox swapon /dev/block/zram0
#echo 268435456 > /sys/block/zram1/disksize # for 2 zrams: 268435456 = 256MB (for non-prime version) 536870912 = 512MB (for prime version)
#/system/xbin/busybox mkswap /dev/block/zram1
#/system/xbin/busybox swapon /dev/block/zram1
# Tweak IO Scheduler (set in boot.img - enable here to override values)
#echo deadline > /sys/block/mmcblk0/queue/scheduler # factory default cfq (choice: noop deadline cfq)
#echo 128 > /sys/block/mmcblk0/queue/read_ahead_kb # factory default 128 Choose between 128, 256, 512, 1024, 2048
#echo 0 > /sys/block/mmcblk0/queue/add_random # factory default 1
#echo 0 > /sys/block/mmcblk0/queue/iostats # factory default 1
#echo deadline > /sys/block/mmcblk1/queue/scheduler # for ext sdcard (sdcard1)
#echo 2048 > /sys/block/mmcblk1/queue/read_ahead_kb # for ext sdcard (sdcard1)
#echo 0 > /sys/block/mmcblk1/queue/add_random # for ext sdcard (sdcard1)
#echo 0 > /sys/block/mmcblk1/queue/iostats # for ext sdcard (sdcard1)
#Tweak Entropy (set in boot.img - enable here to override values)
#echo 384 > /proc/sys/kernel/random/read_wakeup_threshold # factory default 64
#echo 448 > /proc/sys/kernel/random/write_wakeup_threshold # factory default 128
#Tweak for wifi router connection issues
#echo 1 > /proc/sys/net/ipv6/conf/wlan0/disable_ipv6
# Disable debugging on some modules (set in boot.img - enable here to override values)
#echo 0 > /sys/module/alarm_dev/parameters/debug_mask;
#echo 0 > /sys/module/alarmtimer/parameters/debug_mask;
#echo 0 > /sys/module/binder/parameters/debug_mask;
#echo 0 > /sys/module/earlysuspend/parameters/debug_mask;
#echo 0 > /sys/module/sbsuspend/parameters/sbsuspend_debug_mask;
#echo 0 > /sys/module/snd/parameters/debug;
#echo 0 > /sys/module/pvrsrvkm/parameters/gPVRDebugLevel;
#echo 0 > /sys/module/musb_hdrc/parameters/debug_level;
#echo 0 > /sys/module/lowmemorykiller/parameters/debug_level;
#FSTRIM
busybox fstrim /data
busybox fstrim /system
busybox fstrim /cache
Update BusyBox to version 1.25.1-1 (available to download)
Reduce the number of apps and services needlessly starting automatically at boot. Uninstall or freeze bloat apps. Replace "noisy" apps with better written ones.
Use BetterBatteryStats, WakelockDetector Root or similar to understand what invisible activities are consuming battery.
Use SDMaid, DisableServices, MyAndroidTools or similar to disable autostarts (receivers)and app related services. Use with caution.
To see what boot services are running, type getprop in Terminal. You will see a bunch of entries like [init.svc.66xx_launcher]: [running]
These service must remain running do not stop!:
Code:
[init.svc.66xx_launcher]: [running]
[init.svc.MtkCodecService]: [running]
[init.svc.NvRAMAgent]: [running]
[init.svc.aal]: [running]
[init.svc.ccci_fsd]: [running]
[init.svc.ccci_mdinit]: [running]
[init.svc.drm]: [running]
[init.svc.fuelgauged]: [running]
[init.svc.gsm0710muxd]: [running]
[init.svc.guiext-server]: [running]
[init.svc.healthd]: [running]
[init.svc.installd]: [running]
[init.svc.keystore]: [running]
[init.svc.lmkd]: [running]
[init.svc.media]: [running]
[init.svc.mnld]: [running]
[init.svc.netd]: [running]
[init.svc.ril-daemon-mtk]: [running]
[init.svc.sdcard]: [running]
[init.svc.servicemanager]: [running]
[init.svc.shelld]: [running]
[init.svc.surfaceflinger]: [running]
[init.svc.thermal]: [running]
[init.svc.thermald]: [running]
[init.svc.ueventd]: [running]
[init.svc.vold]: [running]
[init.svc.zygote]: [running]
[init.svc.zygote_secondary]: [running]
[init.svc.bmi160d]: [running]
If you only have 1 SIM, it is highly recommended to go into single SIM mode to turn off the second modem service. Edit build.prop existing line from:
persist.radio.multisim.config=dsds to persist.radio.multisim.config=ss
Turn off Developer Options/Memory Optimization and MIUI Optimization. This is a legacy of the mcd service zram configuration that is disabled.
Removal of Apps that are created by symlinks: (Updated information for any ROM version can be found in ROM \META-INF\com\google\android\updater-script)
Uninstall the app where possible and then delete the leftover libs if they exist.
Code:
[B]MAB[/B]
/system/lib/libDToken.so
/system/lib/libNative.so
/system/lib/libShopSigned.so
/system/lib/libentryexpro.so
/system/lib/libsecuritysdk-3.1.27.so
[B]Jeejen[/B]
/system/lib/libJeejenAisound.so
/system/lib/libbspatch.so
/system/lib/libfamily_jni.so
/system/lib/libgetuiext.so
/system/lib/libjeejenmsc.so
[B]MIUI Video[/B]
/system/lib/libDecRes_sdk.so
/system/lib/libminivenus.so
/system/lib/libmresearch.so
/system/lib/libsecurities_sdk.so
[B]Cleanmaster[/B]
/system/lib/libTmsdk-2.0.9-mfr.so
/system/lib64/libTmsdk-2.0.9-mfr.so
/system/lib/libdce-1.1.14-mfr.so
/system/lib64/libdce-1.1.14-mfr.so
/system/lib/libkcmutil.so
/system/lib/libkcmutilex.so
/system/lib/libsic_helper.so
[B]SecondSpace[/B]
/system/lib/libspaces_jni.so
[B]Sogou Input[/B]
/system/lib/libwebp.so
/system/lib/libweibosdkcore_sogou.so
[B]AMAP Network Location[/B]
/system/lib64/libapssdk.so
[B]YellowPage[/B]
/system/lib64/libdidi_secure.so
[B]XMPass[/B]
/system/lib64/libxmpass_sdk_patcher.so
/system/lib64/xmpass_libweibosdkcore.so
[B]PicoTTS[/B]
/system/lib64/libttscompat.so
/system/lib64/libttspico.so
[B]Miui Gallery[/B]
/system/lib64/libwrapnexpcmcalbody.so
/system/lib64/libnexralbody_audio.so
/system/lib64/libnexcralbody_mc_jb.so
/system/lib64/libnexeditorsdk.so
/system/lib64/libPinguoImageSDK.so
/system/lib64/libMiuiGalleryNSGIF.so
/system/lib/libMiuiGalleryNSGIF.so
/system/lib64/libDexHelper.so
[B]MIUI Scanner[/B]
/system/lib64/libQuadrangleRecognizer.so
/system/lib64/libhw_instanttrans.so
/system/lib64/libhwocr_cntools_shared.so
/system/lib64/libsgmain.so
/system/lib64/libsgmainso-5.1.2011.so
/system/lib64/libtbdecode.so
Remove inbuilt virus scanner(s)
Remove GuardProvider.apk and SecurityAdd.apk plus:
Code:
/system/lib64/libams-1.1.7-m-mfr.so
/system/lib64/libams-1.1.7-mfr.so
/system/lib64/libavast-utils.so
/system/lib64/libavast-vps-interface.so
/system/lib64/libavlasys.so
/system/lib64/libavlm.so
/system/lib64/libavlurl.so
Extra libs that can be removed: (if associated apps are removed)
Code:
[B]Lib:[/B]
libfdpp.so Find Device
libfdpp_jni.so Find Device
libffmpeg-miplayer.so Music / MIUIVideo
libhotknot.so
libhotknot_vendor.so
libnfc_ndef.so
libpatcher_game_jni.so
libpatcher_jni.so
libvoicerecognition.so Voice Extensions
libvoicerecognition_jni.so Voice Extensions
libwhetstone_jni.so
libwhetstone_sdk.so
libxiaomimediaplayer.so Music / MIUIVideo
libxiaomiplayerwrapper.so Music / MIUIVideo
[B]Lib64:[/B]
libBaiduMapSDK_base_v4_0_0.so
libBaiduMapSDK_search_v4_0_0.so
libBaiduMapSDK_util_v4_0_0.so
libBankCardRecognizer.so
libduokantext.so
libfdpp.so Find Device
libfdpp_jni.so Find Device
libhotknot.so
libhotknot_vendor.so
libidcardquality_v1.0.3.so
libjni_latinimegoogle.so Google Keyboard
libjni_pacprocessor.so
libjni_unbundled_latinimegoogle.so Stock Keyboard
libnfc_ndef.so
libpatcher_game_jni.so
libpatcher_jni.so
libprintspooler_jni.so Print Spooler
libtbtv3312.so
libTrafficRadar.so
libttscompat.so Pico TTS
libttspico.so Pico TTS
libunipaychsec.so
libweibosdkcore.so
libwhetstone_jni.so
libwhetstone_sdk.so
[B]/vendor/lib64:[/B]
libcom_fingerprints_productiontestmanager.so
libcom_fingerprints_sensor.so
Skinny Pro All versions:
https://drive.google.com/folderview?id=0BwdRTuyj12_yRk9Kcm1pZkxuZzg&usp=sharing
Enjoy
@jajk Awesome work! Do you intend to work on the aosp boot.img much or are you more invested in the miui one (or is it mostly the same project with not many differences between the two types)?
@Sleepy_Augie There is little difference between the 2 flavors so it is easy to keep them in sync
All,
I cannot possibly know what customization other devs are adding to their boot.imgs and whether or not that will make their ROMs incompatible with my boot.imgs. I will try to keep the AOSP version up with current developments while still keeping it "Generic".
Could you include Selinux: Permissive? Zram is better than swap built-in miui ?
@efr07 The beauty of not embedding tweaks - you can choose to be permissive or enforcing in your init.d script rather than me dictating it to all.
setenforce=0 or 1
and to answer the second part....
MIUI uses what could be called a "dynamic swap" system utilizing 4 zram swaps of variable size. The system prioritizes what gets access to that extra memory and what doesn't. No surprises - Xiaomi apps get priority over your own apps. The complexity of this system is so great, it would negate any performance advantage completely but it does make the Xiaomi apps more tenacious than other apps.
@jajk
First things first thank you so much for the effort you have done improving Redmi Note 2,
But I have some question if you please,
I have Miui 7.2.2.0 Lite on my Redmi Note 2 Prime (2.2 ghz) (Rom Link http://en.miui.com/thread-244684-1-1.html)
I have flashed the file as img to boot, and I have done as you said until the int.d thing, I went to #/system/bin/ and I found sh file and opened it in text editor, deleted everything in it and paste what you mentioned, till now we are ok with the device.
I did not find the files that you said I should delete from /vendor/lib, so I went to /vendor/lib64 and deleted the first file, After I deleted it suddenly Root Explorer shut off and whenever I open it again I cant find anything, just blank screen with its symbol and name above and nothing else. Tried to delete Root Explorer and install again and nothing new. Please help, Have I done everything okay? and what should I do to fix this thing and continue deleting the remaining files?
Thank you.
@jajk delete folder /system/etc/radv <- do you mean radvd?
@aghr11 I think that you did not understand the method to create the init.d script and modified an important file instead. You will have to replace that script file you blanked with the original or restore from a good backup and try again. The list of files for deletion is only if they exist in the location as described. If you have enabled any fingerprint settings for some obscure reason, you will probably get locked out of your phone.
Now to creating the script.
Using a text editor, create a file named 01tweaks in /system/etc/init.d folder.
Paste the text (including the first line #!/system/bin/sh) into this file. Leave a blank line at the bottom of the file and make sure your editor is set to Unix end-of-line characters (not Windows)
Save the file and give it 0755 permissions (rwxr-xr-x)
@tonydeli7 Yes, typo I will fix..... done It is a folder to receive advertising pushed to your phone courtesy of Xiaomi!!!!
jajk said:
@tonydeli7 Yes, typo I will fix..... done It is a folder to receive advertising pushed to your phone courtesy of Xiaomi!!!!
Click to expand...
Click to collapse
Yeap, just saw the conf file... WTF are they doing?!
By the way, thanks a lot for this kernel! Nice work!:good::good:
UPDATE:
I edited the latest Multirom Stable (7.2.1.0) and added your kernel&tweaks,deleted the files and everything works great!
I only changed the touchboost value to 806000
jajk, many thanks for this brilliant work!
IIRC, your personal preference for a base ROM with the best behavior and performance with these tweaks was v7.1.4.0 (or was it 7.1.3.0). Is this so or has anything changed? My RN2p is long overdue for an update, still on dev 5.10.29!
If a have a weekly miui based on Miui V 7.3 beta, will it work?
@tonydeli7 Did you give it some time on touchboost 403? I find it does not contribute to lags perceptibly.
@algida79 The most bug free ROM I have come across is MR7.2.30 ID (ported from reno3). I think I had a link to that in the Skinny thread.
Don't load the preloader, uboot or logo from this ROM - edit the updater-script to remove flashing of these. You will need to do an intermediate flash of 7.1.3 or 7.1.4 using SP Flash tool to get all the partitions the way they need to be if coming from an ancient ROM.
@Dnxss Yes it will still work.
@jajk Half an hour I think. I had no lag,just my preference
The phone usage is mostly surfing,facebook,twitter,music playback etc etc with no gaming.
GPS SYNC 3G all on..
Installed app count is around 120..
Includes six reboots while testing ZRAM(disabled it), and if it's good to deactivate Whetstone app.
I also used the app Autostarts to disable useless receivers for many apps like FB etc,and disabled Mail,Voice Unlock,PicoTTS.
I am satisfied..[emoji14]
Sent from my Redmi Note 2 using Tapatalk
@tonydeli7 Whetstone app is a source of a lot of spyware but is not a straight forward removal but you will find that out...
can then also delete:
/etc/WhetstonePermission folder
/system/lib
libwhetstone_jni.so
libwhetstone_sdk.so
/system/lib64
libwhetstone_jni.so
libwhetstone_sdk.so
Yeap, I searched a bit. I am using the Multirom Stable and after flashing the kernel,Whetstone crashes sometimes.
Didn't notice anything weird after freezing it..
This rom doesn't have the line
persist.sys.whetstone.level=2
in the build.prop for some reason.
Sent from my Redmi Note 2 using Tapatalk
@tonydeli7 Whetstone is linked to the mcd service to make things harder to unravel as in all Xiaomi apps. The boot.img disables mcd which is why you will see Whetsone having a fit sometimes. Completely removing Whetstone is a very good thing to do - it may give you an FC on Battery app, delete that too - it chews battery and does not affect normal operation!!!
Anyone wanting to increase their privacy, rename /system/xbin/tunman to tunmanbak. This is the Xunlei data saver/spyware tunneling manager. It is disabled from starting in the boot.img but will still run if called upon like all of the disabled services - they still exist, but not started by default. Make sure it is disabled in the Download Manager Settings
There is another service /sbin/mdbd that appears to be a method of tunneling over usb connections to gain access to a network and on to P.R.C. It is disabled in the boot.img already but I will rename this one in a next revision to be doubly sure it will not start.
Discovered an issue of some apps not recognizing internal sdcard so new versions posted to fix this plus rename /sbin/mdbd to mdbdbak to prevent it from being started after boot. See previous post for the reason.
Back up your internal sdcard contents if you flashed the original images - you will loose everything on sdcard0.
No action needs to be taken if this is a first-time flash.
@jajk How come this version doesn't just dump sd to folder 0? What was merged between miui and pro boot images?
@Sleepy_Augie It is a very complex issue how Android provides a virtual filesystem for SDCards. I thought I could implement it in a simpler fashion as per Android 5.1 which worked well except apps like the stock Contacts are stuck in the dark ages and are hard-coded to still look for the emulated/0 folder for the internal sdcard - not storage/sdcard0.
So going from stock to my original mod leaves an orphaned folder which becomes named 0 because it belonged to user 0. Going back the other way the folder representing access to sdcard0 simply disappears.
The real location of files that appear on the internal emulated sdcard is always /data/media. All other folders that appear to be the same thing are only symlinks to this. Make sense:silly:
Hey @jajk ,
Thanks for the reply, but I have done exactly everything you said and followed all of your steps, but after one day using it, I do not notice any change on battery life, it is still so bad, I have tried everyrom (and every way that was suggested from other users on XDA and MIUI forums including every battery calibration thing) I came across since I bought my RN2p and the maximum battery life I got is nearly 4:30 hours on screen!! After I flashed the boot.img I noticed a slightly more speed booting up the device, the performance is the same (which is good because am all satisfied about the performance except for the battery life).
I have flashed smiui today and it's slightly better consuming energy than the previous ones...
Maybe I have done something wrong doing the 01tweaks thing, if you can upload me yours so I can try paste it in /system/etc/int.d folder, if that will work, then I will be so thankful to you. And if you have any suggestions that I could do to improve and enhance the crazy energy draining then I will be more thankful.

Categories

Resources