[EXPERIMENTAL][androidarmv6/android_kernel_lge_msm7x27-3.0.x]WiFi Voltage Reduction - Optimus One, P500 Android Development

Experimental test of wifi voltage reduction, and activate commented out msm-7627 regulator for ldo12 (wlan)
Read: EXPERIMENTAL.
It has been flashed to one thunderg p500 which seems to still be completely functional (which I don't own one of unfortunately, but I've been testing this patch on the thunderc with basically the same kernel for a while with no ill effects.)
Use at your own risk, of course, but this is an experiment to try to reduce the wifi power drain with the 3.0 kernel. Needs testers to give opinions or evaluation.
If it actually can be verified to cut power consumption noticeably, I'd like to send it upstream, but first it needs tested to be more than a placebo.
For androidarmv6 kitkat (muklsoni's or jenkins nightly)
dunno how it'll get along with other kitkat ROMS. Doubt it'll work on anything under Jellybean.
source:
https://github.com/androidarmv6/android_kernel_lge_msm7x27-3.0.x branch cm-11.0
with this patch
Code:
Subject: [PATCH] wifi regulator and voltage reduction test
---
arch/arm/mach-msm/board-msm7627-regulator.c | 3 ++-
arch/arm/mach-msm/lge/board-thunderg-mmc.c | 27 ++++++++++++++-------------
2 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/arch/arm/mach-msm/board-msm7627-regulator.c b/arch/arm/mach-msm/board-msm7627-regulator.c
index 6ab2977..4540e6e 100644
--- a/arch/arm/mach-msm/board-msm7627-regulator.c
+++ b/arch/arm/mach-msm/board-msm7627-regulator.c
@@ -226,7 +226,8 @@ static struct proccomm_regulator_info msm7627_pcom_vreg_info[] = {
PCOM_VREG_LDO(ldo09, 8, NULL, 1800000, 1800000, 0, -1, 0, 0, 0, 0),
PCOM_VREG_LDO(ldo10, 7, NULL, 2600000, 2600000, 0, -1, 0, 0, 0, 0),
PCOM_VREG_LDO(ldo11, 21, NULL, 2800000, 2800000, 0, -1, 0, 0, 0, 0),
- PCOM_VREG_LDO(ldo12, 11, NULL, 1800000, 1800000, 0, -1, 0, 0, 0, 0),
+// PCOM_VREG_LDO(ldo12, 11, NULL, 1800000, 1800000, 0, -1, 0, 0, 0, 0),
+ PCOM_VREG_LDO(ldo12, 11, NULL, 1800000, 2400000, 0, -1, 0, 0, 0, 0),
PCOM_VREG_LDO(ldo13, 15, NULL, 2850000, 3000000, 0, -1, 0, 0, 0, 0),
PCOM_VREG_LDO(ldo14, 24, NULL, 2700000, 2700000, 0, -1, 0, 0, 0, 0),
PCOM_VREG_LDO(ldo15, 23, NULL, 2800000, 2800000, 0, -1, 0, 0, 0, 0),
diff --git a/arch/arm/mach-msm/lge/board-thunderg-mmc.c b/arch/arm/mach-msm/lge/board-thunderg-mmc.c
index 056bcfa..20f9575 100644
--- a/arch/arm/mach-msm/lge/board-thunderg-mmc.c
+++ b/arch/arm/mach-msm/lge/board-thunderg-mmc.c
@@ -181,8 +181,8 @@ static unsigned sdcc_cfg_data[][6] = {
static unsigned long vreg_sts, gpio_sts;
static unsigned mpp_mmc = 2;
-static struct vreg *vreg_mmc;
-//static struct regulator *vreg_mmc;
+//static struct vreg *vreg_mmc;
+static struct regulator *vreg_mmc;
static void msm_sdcc_setup_gpio(int dev_id, unsigned int enable)
{
@@ -226,8 +226,8 @@ static uint32_t msm_sdcc_setup_power(struct device *dv, unsigned int vdd)
MPP_CFG(MPP_DLOGIC_LVL_MSMP,
MPP_DLOGIC_OUT_CTRL_LOW));
} else
- rc = vreg_disable(vreg_mmc);
-// rc = regulator_disable(vreg_mmc);
+// rc = vreg_disable(vreg_mmc);
+ rc = regulator_disable(vreg_mmc);
if (rc)
printk(KERN_ERR "%s: return val: %d \n",
__func__, rc);
@@ -242,15 +242,16 @@ static uint32_t msm_sdcc_setup_power(struct device *dv, unsigned int vdd)
MPP_DLOGIC_OUT_CTRL_HIGH));
} else {
#ifdef CONFIG_MMC_MSM_CARD_HW_DETECTION
- rc = vreg_set_level(vreg_mmc, VREG_SD_LEVEL);
-// rc = regulator_set_voltage(vreg_mmc, VREG_SD_LEVEL*1000, VREG_SD_LEVEL*1000);
+// rc = vreg_set_level(vreg_mmc, VREG_SD_LEVEL);
+ rc = regulator_set_voltage(vreg_mmc, VREG_SD_LEVEL*1000, VREG_SD_LEVEL*1000);
#else
- rc = vreg_set_level(vreg_mmc, 2850);
+// rc = vreg_set_level(vreg_mmc, 2850);
// rc = regulator_set_voltage(vreg_mmc, 2850000, 2850000);
+ rc = regulator_set_voltage(vreg_mmc, 1800000, 2400000);
#endif
if (!rc)
- rc = vreg_enable(vreg_mmc);
-// rc = regulator_enable(vreg_mmc);
+// rc = vreg_enable(vreg_mmc);
+ rc = regulator_enable(vreg_mmc);
}
if (rc)
printk(KERN_ERR "%s: return val: %d \n",
@@ -313,11 +314,11 @@ static struct mmc_platform_data msm7x2x_sdc1_data = {
static void __init msm7x2x_init_mmc(void)
{
if (!machine_is_msm7x25_ffa() && !machine_is_msm7x27_ffa()) {
- vreg_mmc = vreg_get(NULL, "wlan");
-// vreg_mmc = regulator_get(NULL, "wlan");
+// vreg_mmc = vreg_get(NULL, "wlan");
+ vreg_mmc = regulator_get(NULL, "wlan");
if (IS_ERR(vreg_mmc)) {
-// printk(KERN_ERR "%s: regulator get failed (%ld)\n",
- printk(KERN_ERR "%s: vreg get failed (%ld)\n",
+ printk(KERN_ERR "%s: regulator get failed (%ld)\n",
+// printk(KERN_ERR "%s: vreg get failed (%ld)\n",
__func__, PTR_ERR(vreg_mmc));
return;
}
--
1.7.9.5
This enables the regulator instead of vreg for ldo12 (wlan) like the other board devices.
It also reduces wlan voltage from 2.85V to 2.4V max and allows a low setting of 1.8V instead of the original off/2.85V mode
built with custom ct-ng linaro 4.7 armv6k toolchain branch 4.7.4
(the few v6k instructions in the toolchain should be no issue for your msm7227, especially compared to the armv7 ones in the 4.8 and newer toolchains I've tried.)
Download link in 2nd post.

Download here
Feedback appreciated, and the test will go nowhere without your information.

iwconfig can be placed on xbin, used to set lower txpower. Tasker script to redo this whenever WIFI comes on.

Dovidhalevi said:
iwconfig can be placed on xbin, used to set lower txpower. Tasker script to redo this whenever WIFI comes on.
Click to expand...
Click to collapse
Nice to have another way to reduce drain. Thanks. Maybe that can be incorporated into ROM without too much hassle.
My thought was that many users need something transparent that you install once and it's done, or even built in, and that wifi drain on this kernel has been a common complaint across both thunderg and thunderc builds for a long time.
I like to play around with new things. Don't know about the Optimus One, but an activatable Optimus V is now down to under $25 shipped, so I am not worried about messing mine up anymore. Trying experiments with low level parameters, like tweaking voltages, is the best way I know of to find the usable lower limits of things so that function is maximized.
If this type of thing can fix it...
Also, Broadcom specs say the voltage can go even lower, down to 2.3V. I can't find good data on its low power mode. But I don't know why it's set way up to 2.85V on the thunder* board (Same with stock 2.6.35,) when it definitely still works at 2.4V.

bigsupersquid said:
Nice to have another way to reduce drain. Thanks. Maybe that can be incorporated into ROM without too much hassle.
My thought was that many users need something transparent that you install once and it's done, or even built in, and that wifi drain on this kernel has been a common complaint across both thunderg and thunderc builds for a long time.
I like to play around with new things. Don't know about the Optimus One, but an activatable Optimus V is now down to under $25 shipped, so I am not worried about messing mine up anymore. Trying experiments with low level parameters, like tweaking voltages, is the best way I know of to find the usable lower limits of things so that function is maximized.
If this type of thing can fix it...
Also, Broadcom specs say the voltage can go even lower, down to 2.3V. I can't find good data on its low power mode. But I don't know why it's set way up to 2.85V on the thunder* board (Same with stock 2.6.35,) when it definitely still works at 2.4V.
Click to expand...
Click to collapse
iwconfig is easily pushed, could/should come with the ROM.
The ROM's startup would set the default txpower to say, 11 instead of 32. That would be transparent, no need to think about it.
I need a startup script and a tasker script because every time WIFI comes on, the txpower gets back to 32.
How much battery I really save by all this, I really cannot document (but a little less EM radiation around cannot hurt).
With iwconfig, I can reset things should I so desire. I am not bound by the kernel to a given voltage or power. BTW, sweetnsour's kernels (dont use them now, out-of-date) had lower CPU voltage to save battery. Did notice.

Dovidhalevi said:
iwconfig is easily pushed, could/should come with the ROM.
The ROM's startup would set the default txpower to say, 11 instead of 32. That would be transparent, no need to think about it.
I need a startup script and a tasker script because every time WIFI comes on, the txpower gets back to 32.
How much battery I really save by all this, I really cannot document (but a little less EM radiation around cannot hurt).
With iwconfig, I can reset things should I so desire. I am not bound by the kernel to a given voltage or power. BTW, sweetnsour's kernels (dont use them now, out-of-date) had lower CPU voltage to save battery. Did notice.
Click to expand...
Click to collapse
I'll test the bigsupersquid patch, i've a 2nd p500 now i think it's simple apply a patch (also in jenkins repo) and then forget it.
no 3rd app needed (tasker) = space for other apps
1st test on os2sd:
flashed as is, boot loop (i think is the different mount point of the /system folder, i'll put files directly in the rom and then reflash the entire rom)
meanwhile
2nd test with rhar**** omega rom: with bigsupersquid patch 5h 30 @ 25%, probably 6h 30 @10%
i've to keep my 2nd p500 in aereo, because i haven't a 2nd sim. without a sim or aereo mode on the rom lag a lot

bigsupersquid said:
Download here
Feedback appreciated, and the test will go nowhere without your information.
Click to expand...
Click to collapse
Does Spirit radio free work on this kernel.

samade123 said:
Does Spirit radio free work on this kernel.
Click to expand...
Click to collapse
dunno, no p500 to test with.
if it works with the androidarmv6 chocolate+perf kernel, it should. This is that plus the patch.
fm doesn't work at all on the thunderc. never has.

bigsupersquid said:
dunno, no p500 to test with.
if it works with the androidarmv6 chocolate+perf kernel, it should. This is that plus the patch.
fm doesn't work at all on the thunderc. never has.
Click to expand...
Click to collapse
Spirit radio does work on Omni rom

samade123 said:
Spirit radio does work on Omni rom
Click to expand...
Click to collapse
and from what I've read it doesn't on cm11.
make a backup to try the kernel in omni.

bigsupersquid said:
and from what I've read it doesn't on cm11.
make a backup to try the kernel in omni.
Click to expand...
Click to collapse
I have already tried it on Omni and Spirit Free doesn't work.

samade123 said:
I have already tried it on Omni and Spirit Free doesn't work.
Click to expand...
Click to collapse
please can you confirm that in omni (7.1 or pre8) with wifi connected&aereo on, the battery endurance (100%->0%) is ~ 8,5h

I can try to build a kernel for omni too using the patch.
BTW, you have changed the voltage according to patch, right? Isn't there any other way to implement the older drivers in the newer kernel?
Sent from my Xperia M using XDA Premium 4 mobile app

rhar**** said:
I can try to build a kernel for omni too using the patch.
BTW, you have changed the voltage according to patch, right? Isn't there any other way to implement the older drivers in the newer kernel?
Sent from my Xperia M using XDA Premium 4 mobile app
Click to expand...
Click to collapse
the patch cuts voltage and switches wlan to regulator instead of vreg.
the 2.6 kernel uses the same voltage as before my patch.
i hadn't tried to cram the old drivers into the new kernel, and other than changing txpower like suggested earlier, this patch was all i could think of to cut wlan power usage.

xdema said:
please can you confirm that in omni (7.1 or pre8) with wifi connected&aereo on, the battery endurance (100%->0%) is ~ 8,5h
Click to expand...
Click to collapse
I think your getting confused between Omni rom and Omega rom(A CM11 variation). And sorry I can't because my primary phone is going for repair so I don't want to mess with this phone till my other gets repaired

bigsupersquid said:
the patch cuts voltage and switches wlan to regulator instead of vreg.
the 2.6 kernel uses the same voltage as before my patch.
i hadn't tried to cram the old drivers into the new kernel, and other than changing txpower like suggested earlier, this patch was all i could think of to cut wlan power usage.
Click to expand...
Click to collapse
Ok. I get it. Nice work. Keep it up!
samade123 said:
I think your getting confused between Omni rom and Omega rom(A CM11 variation). And sorry I can't because my primary phone is going for repair so I don't want to mess with this phone till my other gets repaired
Click to expand...
Click to collapse
Well, Omega ROM is omni based, and not cm11. Previously it was CM based but beta5 onwards, its Omni based. And that's the reason why I'll even try to build it for omni.
Sent from my LG-P500 using XDA Premium 4 mobile app

rhar**** said:
Ok. I get it. Nice work. Keep it up!
Well, Omega ROM is omni based, and not cm11. Previously it was CM based but beta5 onwards, its Omni based. And that's the reason why I'll even try to build it for omni.
Sent from my LG-P500 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Oh ok fair enough then it would be good to get this on Omega then the battery will last longer.

bigsupersquid said:
the patch cuts voltage and switches wlan to regulator instead of vreg.
the 2.6 kernel uses the same voltage as before my patch.
i hadn't tried to cram the old drivers into the new kernel, and other than changing txpower like suggested earlier, this patch was all i could think of to cut wlan power usage.
Click to expand...
Click to collapse
Please, could you make a patch for the os2sd roms?
i tried to apply the patch to an os2sd rom (hardlight's KK) but the result was a bootloop after the LG logo
however it's ok on the omega 7.1 and mukulsoni's KK

xdema said:
Please, could you make a patch for the os2sd roms?
i tried to apply the patch to an os2sd rom (hardlight's KK) but the result was a bootloop after the LG logo
however it's ok on the omega 7.1 and mukulsoni's KK
Click to expand...
Click to collapse
it's too old for the TLS-enabled ROMs and needs rebuilt for that.
The rebuild won't work on the ROMs that the current version works on.
plus the comments in HardLight's thread indicate the battery holds up pretty well in his version anyway...
you can apply my patch to the current androidarmv6source and build a kernel that should work with the TLS-enabled ROMs.

Spirit free
After a second attempt of flashing this patch to Omni, It seems Spirit free works well. Brilliant patch. :good:

Related

I9000 on Captivate with the rotation fixed? Can it be done?

I figured I'd make this a thread of it's own, since the subject pops up on many other threads.
I have a Captivate i897 and I wanna run the I9000 kernel (cool gadgets and I like some other differences from the captivate kernels). I did that and added the J8 modem so I could get all bands required in US on AT&T for voice and data, only the 3G changed to an H (I know, I read the other thread..... for us ATT zombie's it's mostly the same diff).
The buttons work properly except power, so you have to flash a captivate kernel to make the power button work again, like to choose an option in recovery mode to flash an update.zip, etc. (note - QuickBoot is a GREAT app!!!). Now that would be nice if it could be fixed, but I can live without the power button.
BUT THAT DARN ROTATE!!!!! Can't one of you brilliant people (Zilch, Design, Reaver and Tayutama, just to name a few of whom's work I personally enjoy) figure out a fix for it? I really wanna run my frankensetup
I9000JM7
J8 modem
? lagfix and other package
Anyone care to figure it out? i know there are a lot of us who want to see this......
Why don't you just use Unhelpful's modified Captivate kernel? It provides the same functionality as the i9000 kernel, but works with the i897 hardware (you can even have mobile AP working) as well as the overclocking
edit: oh right, you want the JG8 modem with HSUPA enabled, sorry, somehow I glossed over that.
Kaik541 said:
Why don't you just use Unhelpful's modified Captivate kernel? It provides the same functionality as the i9000 kernel, but works with the i897 hardware (you can even have mobile AP working) as well as the overclocking
edit: oh right, you want the JG8 modem with HSUPA enabled, sorry, somehow I glossed over that.
Click to expand...
Click to collapse
Also there are slightly different settings and such in the I9000 than the stock captivate. I REALLY like that widget on the home screen that tells you how many apps are running.....
techmik67 said:
Also there are slightly different settings and such in the I9000 than the stock captivate. I REALLY like that widget on the home screen that tells you how many apps are running.....
Click to expand...
Click to collapse
I hear a lot of people like that widget, but that has nothing to do with the kernel, that's the ROM. use unhelpful's kernel with the mobile AP script and the only thing you'll have an issue with is the JG8 modem (I know, you want both, but I think we're going to have to wait until Rogers releases their version of the Captivate before we'll see working HSUPA with a stock kernel)
Kaik541 said:
I hear a lot of people like that widget, but that has nothing to do with the kernel, that's the ROM. use unhelpful's kernel with the mobile AP script and the only thing you'll have an issue with is the JG8 modem (I know, you want both, but I think we're going to have to wait until Rogers releases their version of the Captivate before we'll see working HSUPA with a stock kernel)
Click to expand...
Click to collapse
It really seems that I9000JM7 LOOKS and has a lot of additions to SETTINGS that I liked for the 20 minutes or so played with it. The lack of the auto-rotate (1 of my favorite features) was just a deal breaker tho, so here I am on this setup (check signature).
I just figured some super guru could just like WHAMMO! punch out a mod..... I9000 WITH auto rotate for captivate =)
While u on i-9000 ROM, use root explorer or some sort search for SamsungWidget_ProgramMonitor.apk , that's the task manager thing you see on the home screen. Just copy and paste it /sdcard/ then u can install it on any ROMs you want after flashing.
And here is my set up if you care
I9000TGYJH1 with JG8 modem file + capticate kernal.
the rotation working fine in borwoser and menus if that's the problem you having.
tg9413 said:
While u on i-9000 ROM, use root explorer or some sort search for SamsungWidget_ProgramMonitor.apk , that's the task manager thing you see on the home screen. Just copy and paste it /sdcard/ then u can install it on any ROMs you want after flashing.
And here is my set up if you care
I9000TGYJH1 with JG8 modem file + capticate kernal.
the rotation working fine in borwoser and menus if that's the problem you having.
Click to expand...
Click to collapse
Thanks for the info!
Please tell me there is some way to find it other than re-installing I9000 just to copy that......
techmik67 said:
Thanks for the info!
Please tell me there is some way to find it other than re-installing I9000 just to copy that......
Click to expand...
Click to collapse
Someone posted most of the i9000 ROM in the i9000 forum so here you go....
I have not tried this yet.
alphadog00 said:
Someone posted most of the i9000 ROM in the i9000 forum so here you go....
I have not tried this yet.
Click to expand...
Click to collapse
thanks.... wouldn't install =(
techmik67 said:
thanks.... wouldn't install =(
Click to expand...
Click to collapse
From my reading;
If you are on the stock kernel you need to remount the system partition as root in RW mode, install the apk, then put the System partition back.
I found this post:
http://forum.xda-developers.com/showpost.php?p=7979264&postcount=13
But i am trying to figure out why the partition says it is RW via the mount command, then we mount it RW, but put it back to RO - I don't want to screw anything up until i understand what i am doing. If i understand, then screwing up is OK.
I9000 on Captivate with the rotation fixed? Can it be done = Yes.
eugene373 said:
I9000 on Captivate with the rotation fixed? Can it be done = Yes.
Click to expand...
Click to collapse
will that also fix the accelerometer ?
Unless there is another non-compiled setting, the auto-rotation is handled inside compiled code. In the source breakdown between the three source trees (captivate, vibrant, I9000) that is one of the differences. The code uses matrix transformations to send x, y, z data to where ever else it goes in the system. These matrices differ in each source tree. If the source code could be compiled without it's own set of errors (like wake lag and such) then it would be as simple as changing the matrix values to reflect the captivate hardware.
I think the rotation is controlled in the /drivers/sensor/compass/yamaha.c file so in theory a kernel could be compiled with the captivate settings instead of the I9000/Vibrant ones or the other way around. Someone like Eugene or Unhelpful with a working tool chain would need to build it and I think Zilch and the others would be willing to test it out.
Code:
I900 settings
#define YAMAHA_GSENSOR_TRANSFORMATION_EMUL \
{ { -1, 0, 0}, \
{ 0, 1, 0}, \
{ 0, 0, 1} }
#define YAMAHA_MSENSOR_TRANSFORMATION_EMUL \
{ { 1, 0, 0}, \
{ 0, 1, 0}, \
{ 0 , 0 , 1} }
//Real target
#define YAMAHA_MSENSOR_TRANSFORMATION_00 \
{ { 0, -1, 0}, \
{ -1, 0, 0}, \
{ 0 , 0 , -1} }
#define YAMAHA_GSENSOR_TRANSFORMATION \
{ { -1, 0, 0}, \
{ 0, -1, 0}, \
{ 0, 0, -1} }
#define YAMAHA_MSENSOR_TRANSFORMATION \
{ { -1, 0, 0}, \
{ 0, 1, 0}, \
{ 0 , 0 , -1} }
I897 Settings
#define YAMAHA_GSENSOR_TRANSFORMATION_KEPLER \
{ { 0, 1, 0}, \
{ -1, 0, 0}, \
{ 0, 0, -1} }
#define YAMAHA_MSENSOR_TRANSFORMATION_KEPLER \
{ { 0, -1, 0}, \
{ -1, 0, 0}, \
{ 0 , 0 , -1} }
#define YAMAHA_MSENSOR_TRANSFORMATION_KEPLER_B5 \
{ { 0, 1, 0}, \
{ -1, 0, 0}, \
{ 0 , 0 , 1} }
T959 Settings
#define YAMAHA_GSENSOR_TRANSFORMATION_KEPLER \
{ { -1, 0, 0}, \
{ 0, -1, 0}, \
{ 0, 0, -1} }
#define YAMAHA_MSENSOR_TRANSFORMATION_KEPLER \
{ { -1, 0, 0}, \
{ 0, 1, 0}, \
{ 0 , 0 , -1} }
Stuff like this is why I started doing all the source diffs. Unfortunately other than the file and the default settings I don't know they relate or which one does what. If anyone figures it out (or proves it doesn't work or its something else) please let me know so I can update the source diff thread.
And I'm glad I rechecked the thread before submitting asrrin29 was looking at it.
Sherpa
You can download my working toolchain in the toolchain thread...
Sent from my SAMSUNG-SGH-I897 using XDA App
I'd be more than happy to test it out! If we're on the topic of replacing the Captivate kernel with the I9000, we might want to look into why the external SD doesn't work as well though
Anyone have the reasoning behind why the captivate kernel is not working with other JG8 modem? I looked at the source diff listed in the other thread and nothing stood out as a reason behind this incompatibility.
Nevermind, I mostly read the diffs and not the comments by everyone else. Been a long week, I should know not to type something without coffee in my hand.

Development team V2

Hello everyone,
I want to start again with a development team. After miroslav decided to finish the project on his own, I want to try it again. But this time with a real team Only with people who want to participate, and not just type make. Who wants to join?
miroslav_mm said:
So, I opened your eyes and showed real face our "superstar"!?
Ok! Let's stop this stupid discussion and continuous develop ROM.
At this moment I have main part:
Torchscreen +
BT (BT-calling) +
WiFi (need to test) +
Sensor +
GSM (Waiting call) +
Mobile Data +
Audio +
Vibrate +
HW + 3D ??? (need new kernel or port new 3D kernel driver (kgsl) (in progress))
usb storage ??? (only with special app (native in progress))
Camera ??? (in progress)
Video codec ??? (in progress)
Anyone doing something? Maybe fix some stuff?
Click to expand...
Click to collapse
He just want to clean his topic. Send him a PM.
I understand that but there is still no team. He just made his project open for patches. And I think, personally, a team could help the speed on development of a ROM So please join
Sent from my GT540 using Tapatalk
So join his team , and start patching?
wwenigma said:
So join his team , and start patching?
Click to expand...
Click to collapse
Since when does he have a team? What I know about it, is that he just made some kind of open-source project where you can add your own updates and where he gets no credit.
Sent from my GT540 using Tapatalk
I can help you with Java stuff!
I think miroslav_mm wants to release ICS under name of SWIFT-TEAM, with developer names in credits.... may you ask him about it?
Do not split guys...
Miroslav said that it's only him on the team...so i don't see any team there..if we are more than 1 guy in a team we can get faster a daily ROM for our Phones
rexes13 said:
Miroslav said that it's only him on the team
Click to expand...
Click to collapse
Jep, because PCF+MGP join then leave and jasper580 cant make neccessary steps... ask him. All two, ask him about it.
wwenigma said:
Jep, because PCF+MGP join then leave and jasper580 cant make neccessary steps... ask him. All two, ask him about it.
Click to expand...
Click to collapse
I can make nesseccary steps if I want, but I don't want to. I want to start cleaned up. That's why I created this topic. So:
If you want to join: welcome.
If you don't want to: stop spamming
@rexes13 Welcome to the team!
Sent from my GT540 using Tapatalk
Good news.
Yesterday I successfully ported 3d kernel driver (kgsl) from 35, so now we have full functionality kernel with OpenGL ES-CM 1.1.
So HW, 3D and other stuff with support OpenGL working, not excellent but working, need improve source code Surfaceflinger and HardwareDisplay.
Maybe next weak I will make new thread and publish first public test version, but all development moments we can discus here.
Before I need redownload all sources CM9 again. Yesterday I had the same error like in wwenigma and aaa801
Code:
target thumb C: libhardware_legacy <= hardware/libhardware_legacy/power/power.c
arm-linux-androideabi-gcc: ": No such file or directory
<command-line>: warning: missing terminating " character
and I dont know WTF, so delete all source tree. Maybe today will try download again and build again.
hell yeah! im just another non-dev member LOL sry
Need help!
Look on code:
Code:
//static int32_t msm_tscal_scaler = 65536;
static int32_t msm_tscal_xscale = 70046;
static int32_t msm_tscal_xoffset = -4191987;
static int32_t msm_tscal_yscale = 71735;
static int32_t msm_tscal_yoffset = -3004437;
this pointers for torch 320*240. So when I using that I need tap on 2mm high on icon for open something. This pointer need for screen calibration. Need find right pointer.
I can't find a logic in this numbers.
miroslav_mm said:
Need help!
Look on code:
Code:
//static int32_t msm_tscal_scaler = 65536;
static int32_t msm_tscal_xscale = 70046;
static int32_t msm_tscal_xoffset = -4191987;
static int32_t msm_tscal_yscale = 71735;
static int32_t msm_tscal_yoffset = -3004437;
this pointers for torch 320*240. So when I using that I need tap on 2mm high on icon for open something. This pointer need for screen calibration. Need find right pointer.
I can't find a logic in this numbers.
Click to expand...
Click to collapse
The offsets appear to have a ~4:3 ratio. It doesn't make sense though why it's x:y=4:3, and not the other way around, since the screen is usually 3:4(e.g. 320x480 or 240x320). Also, considering our screen is 320x480, which is a ratio of 1,5 and not 1,(3), I think those would be totally wrong for our phone. Maybe try to modify one of the two to match 1,5 ratio. E.g. make xoffset=-4506655. I don't know. :/
Please discuss development on your page. I want to make a dev team here
Sent from my GT540 using Tapatalk
deleted
10 character
This numbers working with this java code together:
]
Code:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Read current values
final int xoffset = (readValue("xoffset")*240+480)/960;
final int yoffset = (readValue("yoffset")*320+460)/920;
final int xscale = readValue("xscale");
final int yscale = readValue("yscale");
view = new View(this) {
private int step = 1;
private int rawx1;
private int rawy1;
private int rawx2;
private int rawy2;
private void writeValue(String parameter, int value) {
try {
FileOutputStream fos = new FileOutputStream(new File("/sys/module/msm_touch/parameters/tscal_" + parameter));
fos.write(String.valueOf(value).getBytes());
fos.flush();
fos.getFD().sync();
fos.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
@Override
public boolean onTouchEvent(MotionEvent ev) {
if (ev.getAction() != MotionEvent.ACTION_UP)
return true;
if(step==1) {
rawx1 = ((int)ev.getRawX()*65536-xoffset+32768)/xscale;
rawy1 = ((int)ev.getRawY()*65536-yoffset+32768)/yscale;
if(rawx1<100 && rawy1<100)
step = 2;
} else if(step==2) {
rawx2 = ((int)ev.getRawX()*65536-xoffset+32768)/xscale;
rawy2 = ((int)ev.getRawY()*65536-yoffset+32768)/yscale;
if(rawx2>140 && rawy2>220)
step = 3;
} else {
int distx = rawx2 - rawx1;
int new_xscale = (140*65536 + distx/2)/distx;
int disty = rawy2 - rawy1;
int new_yscale = (220*65536 + disty/2)/disty;
int new_xoffset = 1;
new_xoffset += 50*65536-rawx1*new_xscale;
new_xoffset += 190*65536-rawx2*new_xscale;
new_xoffset /= 2;
new_xoffset = (new_xoffset*960+120)/240;
int new_yoffset = 1;
new_yoffset += 50*65536-rawy1*new_yscale;
new_yoffset += 270*65536-rawy2*new_yscale;
new_yoffset /= 2;
new_yoffset = (new_yoffset*920+160)/320;
// Pass new calibration to kernel
writeValue("xoffset", new_xoffset);
writeValue("yoffset", new_yoffset);
writeValue("xscale", new_xscale);
writeValue("yscale", new_yscale);
// Save calibraiton data to /data/system/pointercal
StringBuilder sb = new StringBuilder();
sb.append(new_xscale);
sb.append(" ");
sb.append(0);
sb.append(" ");
sb.append(new_xoffset);
sb.append(" ");
sb.append(0);
sb.append(" ");
sb.append(new_yscale);
sb.append(" ");
sb.append(new_yoffset);
sb.append(" ");
sb.append(65536);
App + ui input framework + kernel working together.
App - creation poinercal
ui input framework - reading pointercal send correct info to kernel
kernel touch driver - doing move.
Öhm, the touchscreen driver use a virtual square (320*320) to detect touch, stretched to a rectangle(320*480)?
mod: about calibration, http://code.google.com/p/openeve/issues/detail?id=91
jasper580 said:
Please discuss development on your page. I want to make a dev team here
Click to expand...
Click to collapse
I cant understand you! What do you mean? Do you wanna make new dev team? Working on my sources but without me?
I exactly want to ask that. Maybe he start from scratch, his github is near empty.

[KERNEL][ICS Sense available][S2W] Prosperous Kernel for Sensation XL v1.0

Please Read this!!!!!
​Hi guys,
Recently, I am interesting in kernel building of Sensation XL kernel.
First of all, I don't have Sensation XL device.
But, I tested this kernel from Korean HTC cafe user.
You can find these functions in kernel down blow.​
​p.s. I don't speak English well so I got a hand of English translation from hTC community site of Korea
ChangeLog
v1.0
added SWEEP2WAKE
supported init.d ramdisk from boot.img
compiled with linaro toolchain 4.7-12.09
fix compile to linaro toolchain 4.6.x and 4.7.x
Supported 1.8GHz OC
changed voltage
added governor :
-SmartassV2
-lazy
-lagfree
-intellidemand
-Lionheart
-SavagedZen
-Scary
-interactive
added i/o scheduler :
-BFQ
-SIO
patched linux from 3.0.16 to upstream 3.0.44
added VDD table interface
added optimize compile neon
ondemand governor various tweak
Update BFQ Scheduler to v4
bfq: prevent aliased requests from starving I/O
CFS Scheduler tweaks brought over
ratio for deadline io, more like noop fifo_batch = 1
Optimize SLUB and set as defalut
Lower Wifi chip voltage to lowest
WiFi PM=FAST in Standby
netfilter: xt_log.h: fix warning: value computed is not used
* Current KERNEL Settings
Default max-min clock : 1516800 - 368640
Defalut Governor : ondemand
Default I/O Scheduler : sio
Available CPU freq :
245, 368, 460, 576, 652, 768, 806, 921, 1024, 1113, 1209, 1305, 1401, 1516, 1612, 1708, 1804 (MHz)
Available Governor :
powersave, userspace, ondemand, conservative, smartassV2, lazy, lagfree, Lionheart, SavagedZen, Scary, interactive
Available I/O Scheduler : bfq, cfq, deadline, noop, sio
Current CPU Frequency Table, VDD :
{ 1, 245760, PLL_3, 5, 2, 61440000, 900, VDD_RAW(900) },
{ 1, 368640, PLL_3, 5, 1, 122800000, 900, VDD_RAW(900) },
{ 1, 460800, PLL_1, 2, 0, 153600000, 925, VDD_RAW(925) },
{ 1, 576000, PLL_1, 2, 0, 153600000, 950, VDD_RAW(950) },
{ 1, 652800, PLL_1, 2, 0, 153600000, 1000, VDD_RAW(1000) },
{ 1, 768000, PLL_1, 2, 0, 153600000, 1025, VDD_RAW(1025) },
{ 1, 806400, PLL_2, 3, 0, 192000000, 1025, VDD_RAW(1025), &pll2_tbl[0]},
{ 1, 921600, PLL_2, 3, 0, 192000000, 1050, VDD_RAW(1050), &pll2_tbl[1]},
{ 1, 1024000, PLL_2, 3, 0, 192000000, 1075, VDD_RAW(1075), &pll2_tbl[2]},
{ 1, 1113000, PLL_2, 3, 0, 192000000, 1100, VDD_RAW(1125), &pll2_tbl[3]},
{ 1, 1209600, PLL_2, 3, 0, 192000000, 1125, VDD_RAW(1150), &pll2_tbl[4]},
{ 1, 1305600, PLL_2, 3, 0, 192000000, 1150, VDD_RAW(1175), &pll2_tbl[5]},
{ 1, 1401600, PLL_2, 3, 0, 192000000, 1200, VDD_RAW(1225), &pll2_tbl[6]},
{ 1, 1516800, PLL_2, 3, 0, 192000000, 1250, VDD_RAW(1275), &pll2_tbl[7]},
{ 1, 1612800, PLL_2, 3, 0, 192000000, 1350, VDD_RAW(1325), &pll2_tbl[8]},
{ 1, 1708800, PLL_2, 3, 0, 192000000, 1400, VDD_RAW(1400), &pll2_tbl[9]},
{ 1, 1804800, PLL_2, 3, 0, 192000000, 1475, VDD_RAW(1475), &pll2_tbl[10]},
DOWNLOAD
Dev-Host
How to install this kernel?
S-ON users should follow the instruction provided below
1. First, flash boot.img inside the zip file with fastboot.
2. reboot recovery
3. install from *.zip file on SD card
4. choose zip from sdcard
5. select .zip
Installation Methods For S-OFF*
1. zip on the root of your SD Card
2. reboot recovery
3. install from *.zip file on SD card
4. choose zip from sdcard
5. select .zip
What is SWEEP2WAKE??
Special Big THX
베르나르도게으른님 (xda:bananacakes / He created Holics ROM of holiday devices)
윈피님
셜록스님
마린님
치콘님
m0narX
j4n87
richmond
LeeDrOiD
Football
Chainfire
Coolexe
showp1984
faux123
Team Virtuous
Team BlckOut
Htc cafe of korea & XDA users..
and Many people helped to...
want to visit my world?
Htc cafe of Korea
my blog
(You can meet MY ROM/KERNEL of Desire HD)
Don't forget This
(Dok-Do is a territory of Korea. Dok-do is Korean land.)​
Will the code source be made available, or the git page?
Lexmazter said:
Will the code source be made available, or the git page?
Click to expand...
Click to collapse
Sent message.
korea_CHUN said:
Sent message.
Click to expand...
Click to collapse
Kernel doesn't install via AROMA, it says installed but it is not - check your installer, untill then, i will install it using the good, old, flashable zip method
--
More feedback:
-On Isanely Cool Sense v3, the touchscreen is non-responsive after a screen-lock, so no good here, tested on Blood and Glory Legend using smartassV2, and stock frequency (1500mhz), and the performance was rather poor.
In my opinion is not that stable for daily use
korea_CHUN said:
Please Read this!!!!!
​Hi guys,
Recently, I am interesting in kernel building of Sensation XL kernel.
First of all, I don't have Sensation XL device.
But, I tested this kernel from Korean HTC cafe user.
You can find these functions in kernel down blow.​
​p.s. I don't speak English well so I got a hand of English translation from hTC community site of Korea
ChangeLog
v1.0
added SWEEP2WAKE
supported init.d ramdisk from boot.img
compiled with linaro toolchain 4.7-12.09
fix compile to linaro toolchain 4.6.x and 4.7.x
Supported 1.8GHz OC
changed voltage
added governor :
-SmartassV2
-lazy
-lagfree
-intellidemand
-Lionheart
-SavagedZen
-Scary
-interactive
added i/o scheduler :
-BFQ
-SIO
patched linux from 3.0.16 to upstream 3.0.44
added VDD table interface
added optimize compile neon
ondemand governor various tweak
Update BFQ Scheduler to v4
bfq: prevent aliased requests from starving I/O
CFS Scheduler tweaks brought over
ratio for deadline io, more like noop fifo_batch = 1
Optimize SLUB and set as defalut
Lower Wifi chip voltage to lowest
WiFi PM=FAST in Standby
netfilter: xt_log.h: fix warning: value computed is not used
* Current KERNEL Settings
Default max-min clock : 1516800 - 368640
Defalut Governor : ondemand
Default I/O Scheduler : sio
Available CPU freq :
245, 368, 460, 576, 652, 768, 806, 921, 1024, 1113, 1209, 1305, 1401, 1516, 1612, 1708, 1804 (MHz)
Available Governor :
powersave, userspace, ondemand, conservative, smartassV2, lazy, lagfree, Lionheart, SavagedZen, Scary, interactive
Available I/O Scheduler : bfq, cfq, deadline, noop, sio
Current CPU Frequency Table, VDD :
{ 1, 245760, PLL_3, 5, 2, 61440000, 900, VDD_RAW(900) },
{ 1, 368640, PLL_3, 5, 1, 122800000, 900, VDD_RAW(900) },
{ 1, 460800, PLL_1, 2, 0, 153600000, 925, VDD_RAW(925) },
{ 1, 576000, PLL_1, 2, 0, 153600000, 950, VDD_RAW(950) },
{ 1, 652800, PLL_1, 2, 0, 153600000, 1000, VDD_RAW(1000) },
{ 1, 768000, PLL_1, 2, 0, 153600000, 1025, VDD_RAW(1025) },
{ 1, 806400, PLL_2, 3, 0, 192000000, 1025, VDD_RAW(1025), &pll2_tbl[0]},
{ 1, 921600, PLL_2, 3, 0, 192000000, 1050, VDD_RAW(1050), &pll2_tbl[1]},
{ 1, 1024000, PLL_2, 3, 0, 192000000, 1075, VDD_RAW(1075), &pll2_tbl[2]},
{ 1, 1113000, PLL_2, 3, 0, 192000000, 1100, VDD_RAW(1125), &pll2_tbl[3]},
{ 1, 1209600, PLL_2, 3, 0, 192000000, 1125, VDD_RAW(1150), &pll2_tbl[4]},
{ 1, 1305600, PLL_2, 3, 0, 192000000, 1150, VDD_RAW(1175), &pll2_tbl[5]},
{ 1, 1401600, PLL_2, 3, 0, 192000000, 1200, VDD_RAW(1225), &pll2_tbl[6]},
{ 1, 1516800, PLL_2, 3, 0, 192000000, 1250, VDD_RAW(1275), &pll2_tbl[7]},
{ 1, 1612800, PLL_2, 3, 0, 192000000, 1350, VDD_RAW(1325), &pll2_tbl[8]},
{ 1, 1708800, PLL_2, 3, 0, 192000000, 1400, VDD_RAW(1400), &pll2_tbl[9]},
{ 1, 1804800, PLL_2, 3, 0, 192000000, 1475, VDD_RAW(1475), &pll2_tbl[10]},
DOWNLOAD
Dev-Host
How to install this kernel?
S-ON users should follow the instruction provided below
1. First, flash boot.img inside the zip file with fastboot.
2. reboot recovery
3. install from *.zip file on SD card
4. choose zip from sdcard
5. select .zip
Installation Methods For S-OFF*
1. zip on the root of your SD Card
2. reboot recovery
3. install from *.zip file on SD card
4. choose zip from sdcard
5. select .zip
What is SWEEP2WAKE??
Special Big THX
베르나르도게으른님 (xda:bananacakes / He created Holics ROM of holiday devices)
윈피님
셜록스님
마린님
치콘님
m0narX
j4n87
richmond
LeeDrOiD
Football
Chainfire
Coolexe
showp1984
faux123
Team Virtuous
Team BlckOut
Htc cafe of korea & XDA users..
and Many people helped to...
want to visit my world?
Htc cafe of Korea
my blog
(You can meet MY ROM/KERNEL of Desire HD)
Don't scrap this thread on Htc community user of Korea!!!
한국 htc카페 유저분들은 이 쓰레드를 스크랩하거나 카페 내에 이 쓰레드를 알리지 마십시오.
Don't forget This
(Dok-Do is a territory of Korea. Dok-do is Korean land.)​
Click to expand...
Click to collapse
It is usable with Miui?
Godric8 said:
It is usable with Miui?
Click to expand...
Click to collapse
No, Sense v3.6 and 4.0 only
Lexmazter said:
No, Sense v3.6 and 4.0 only
Click to expand...
Click to collapse
only 3.6
Closed post
Godric8 said:
It is usable with Miui?
Click to expand...
Click to collapse
MIUI based on ICS SENSE??
I followed instruction for s-off to install the zip file from sdcard. It said installed but does not work.
Can you please sort out the problem.
it works great and fine,except that not every sweep does success.. you have to sweep it correctly.. but thats fine when we get used to it.
the only problem is when i want to turn off the screen (sweep from right to left), it sometimes take a picture of my own screen(power+home button), probably because sweep = power button, and when i sweep from right to left, the last button i touched was the home button, so the device thought it was power+home button, thus making some conflicts.
anyway, we could just turn the self capture function off, and its all good.
woshikevin said:
it works great and fine,except that not every sweep does success.. you have to sweep it correctly.. but thats fine when we get used to it.
the only problem is when i want to turn off the screen (sweep from right to left), it sometimes take a picture of my own screen(power+home button), probably because sweep = power button, and when i sweep from right to left, the last button i touched was the home button, so the device thought it was power+home button, thus making some conflicts.
anyway, we could just turn the self capture function off, and its all good.
Click to expand...
Click to collapse
That problem, you have to ask your ROM developer to solved it, even show-p can't solve it.
i have sense 3.6.Rom fshami ICS XL 3.6 v1.7
installed 2 times ( S2W and S2W with backlight)
its look installed succesfully but dont work...
vorderas said:
i have sense 3.6.Rom fshami ICS XL 3.6 v1.7
installed 2 times ( S2W and S2W with backlight)
its look installed succesfully but dont work...
Click to expand...
Click to collapse
Work well all rom fshami ( v1.7 non apm, stock Asia wwe, India, EU)
Sent from my HTC Sensation XL with Beats Audio X315e using xda premium
Sense 3.6.by fshami ICS XL 3.6 v1.7 no APM....
Install correct but not working for me....
thienthanty said:
Work well all rom fshami ( v1.7 non apm, stock Asia wwe, India, EU)
Sent from my HTC Sensation XL with Beats Audio X315e using xda premium
Click to expand...
Click to collapse
what can u say now.
have problem with too non apm.
vorderas said:
what can u say now.
have problem with too non apm.
Click to expand...
Click to collapse
I tested & kernel work 100%. I flashed my phone & 2 friends.
Sent from my HTC Sensation XL with Beats Audio X315e using xda premium
Can you please tell me how to install it without using aroma?
I stopped trying.
not working...
I'm facing troubles trying to install the kernel. Aroma seems to do nothing... Anyone could please tell me what I have to modify or erase from the zip to skip aroma launching?

[KERNEL][exp: (3.1.10) #5] Firtecy Kernel - a modified Kowalski Kernel

This is an EXPERIMENTAL Kernel that continues the work of @pengus77, but with some additions i make. That means a huge thank to pengus77! Please check his thread http://forum.xda-developers.com/showthread.php?t=2097788
This kernel is completely based on his latest release.
This kernel only supports newbl and will only work on roms with 3.1 support (these are atm only 4.4 (aka KitKat) Roms and tonyps TheRom that is compatible with the 3.1 kernel
Features:
Features from the kowalski kernel:
3.1.10 Kernel Version
bcmdhd wifi driver
Dynamic FSync
Overclock to 1.5 GHz (Not all phones work well with 1.5 Ghz!)
Undervolting
MultiCore Sched PM
Auto Hotplug
Fast charge
Wifi PM
and many more ...
Features added by me:
PKSM as enhanced KSM module
Built in ZRAM Modul (that makes it possible to use the android default zram solution)
Possibility to use deferred_timer for (P)KSM
0, 16 or 32 MB Ramhack
Support for extra free kbytes tunable (more a ROM dev feature)
Custom vibration force/strength through sysfs
120MHz and 168 MHz frequencies for more battery savings during wakelock
Known bugs:
Camera Bug
Gyro does not work properly
If you want to report a new kernel bug, you must describe your problem in detail, post your kmsg and last_kmsg (if available) (you can found them under /proc/kmsg and /proc/last_kmsg) otherwise the rule is: no log = no issue
Downloads:
This is more a personal kernel build. I have built these kernels for weeks for myself and used them in private. Now i just want to share them with you guys!
You can download the kernels here: https://s.basketbuild.com/devs/firtecy/p990/kernel/3.1/ They are labeled like this: firtecy_kernel_X-N.zip where X is either exp for an experimental kernel release and stable for a stable kernel and where N is the build number (this number is always incremental!)
Sourcecode:
You can find the sourcecode at github: https://github.com/Firtecy/kowalski/ the branch is exp. The config file is: "kowalski_defconfig"
The intention of this thread is to continue the 3.1 kernel development pengus started. Development related questions or discussions are appreciated
Have fun!
And to quote pengus77:
On a side note... i'm not really responsible if you decide to test it and your phone melts... right?
Thanks to:
@hjunii for bringing up 3.1 Kernel
@pengus77 for the kowalski kernel
XDA:DevDB Information
Firtecy Kernel - a modified Kowalski Kernel, Kernel for the LG Optimus 2x
Contributors
Firtecy, pengus77, hjunii, djnoxd
Kernel Special Features:
Version Information
Status: Beta
Current Beta Version: 3.1#5
Beta Release Date: 2014-08-25
Created 2014-10-31
Last Updated 2014-10-31
Changelog:
firtecy_kernel_exp-5 - 25.8.2014
Added intellactive governor (thanks to @faux123) and powersave
Some bug fixes
Added sync framework and exfat support (but not active for the moment)
Added a "kowalski touch driver" and dt2w files (since they are not stable enough for now, they are disabled)
The reason why I disabled those things is that I didn't had the time to test them. If you want to test them you have to build your own version. Especially for other developers that can be interesting.
Click to expand...
Click to collapse
firtecy_kernel_exp-4 - 25.6.2014
minor updates/fixes from other kernels
Added the min screen on freq back
Added a sysfs attribute to change the min screen on freq
when disabling pksm, it will be disabled completely
Screen on min freq
If your screen is on, this frequency is the lowest that will be used. If your screen goes off for whatever reason the cpu will go to the normal min frequency.
Note: It seems like 120MHz and 168MHz are stable even for screen on, but since there was the question if i can add it, here you go:
How to change the value:
Code:
echo [value] > /sys/module/cpu_tegra/parameters/cpu_screen_on_min_cap
You have to use a value that is in the frequency table, but you have to echo the frequency in KHz, so 120MHz -> 120000KHz:
Code:
echo 120000 > /sys/module/cpu_tegra/parameters/cpu_screen_on_min_cap
This option does not stick after a reboot
According to @BS86 this release should be more stable than exp3 and thanks for testing!
Click to expand...
Click to collapse
firtecy_kernel_exp-3 - 13.6.2014
tons of updates to zram/zcache (picked from faux123 tegra kernels)
crypto: added optimized AES and SHA1 routines
added permission checker for binder IPC
tegra video driver updates
Fixed the voltage table -> all values below 770 MHz are not supported by the regulator chip (thanks to all who helped researching! )
Click to expand...
Click to collapse
firtecy_kernel_exp-2 - 8.6.2014
Added the possibility to change the vibration force (or vibration strength)
Added 120MHz and 168MHz as cpu frequencies
Enabled 600 mV as lowest undervolting value (undervolting is very dangerous if you go too low! Better stay at defaults)
Fixed a nvidia or lg cpu derp.
For security reasons it is not possible that the cpu will go underneath 216MHz when screen is on!
Option to use: No ramhack, 16Mb Ramhack or 32 Mb Ramhack!
Vibration force:
to change the vibration force echo a number between 0 and 127 to /sys/module/tspdrv/parameters/vibration_force. Where 127 is the highest and the default. 20 seems to be the last noticeable value.
Code:
echo [force] > /sys/module/tspdrv/parameters/vibration_force
This option does not stick after a reboot. Rom support will be available (hopefully) soon. I'm preparing a patch for tonyps Rom, so that it is possible to change it in the Rom settings.
120 and 168Mhz:
These values are useful for the case where the phone helds a wake lock. This means because of the wake lock it won't enter deepsleep. The phone would run at 216MHz even if it isn't needed. Running at 168Mhz or even 120MHz should result in a better battery life.
If you experience any problems, try to raise the voltage at this frequencies to a higher value and test again. If it is still unstable report it (with a description of the problem) and change the minimum frequency to 216Mhz.
Click to expand...
Click to collapse
firtecy_kernel_exp-1 - 1.6.2014
Initial release
Base source: kowalski kernel
Added built in ZRam (no need to use zram.ko for longer)
Added PKSM as replacement for ksm (http://code.google.com/p/pksm/)
Enabled deferred timers for pksm and ksm
Notice: Since there is no ksm available, but pksm you will not find the options for ksm in any app. All configurations are no longer under: /sys/kernel/mm/ksm/ , but under: /sys/kernel/mm/pksm/
To deativate pksm run this command as root:
Code:
echo 0 > /sys/kernel/mm/pksm/run
This option does not stick after a reboot
Click to expand...
Click to collapse
How to build your own kernel:
You need a Linux PC with either 32 or 64Bit. I'm using Linux Mint Debian Edition 64Bit. And you will need the following packages:
build-essential kernel-package libncurses5-dev bzip2
For example to install them run:
Code:
sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2
Hint: If you run into troubles with installing packages, check this post
1. Create a new directory for your kernel building (for example: ~/kernel_p990)
Code:
mkdir ~/kernel_p990
2. cd to your kernel dir
Code:
cd ~/kernel_p990
3. Run this command to download the source code for compiling:
Code:
git clone https://github.com/Firtecy/kowalski
4. Now we need to download the toolchain for compiling: Download it from here: http://www.linaro.org/downloads/ under the Bare-Metal section. It is labeled GCC ARM Embedded. Version: 4.7-2013.q3 ; Release: 13.11
5. Now extract the toolchain to a new dir, for example: ~/kernel_p990/toolchain
6. Now we have to define some values for the build enviroment:
Set the CROSS_COMPILE var to your path where you have downloaded your toolchain. For example:
Code:
export CROSS_COMPILE=~/kernel_p990/toolchain/gcc-arm-none-eabi-4_7-2013q3/bin/arm-none-eabi-
Notice at the end you find this prefix: arm-none-eabi- this is not a dir, but the prefix for all files inside the bin directory(for example: arm-none-eabi-gcc)
7. Set the architecture (processor architecture) for which the kernel should be build. So in our case arm:
Code:
export ARCH=arm
and
Code:
export SUBARCH=arm
8. The next step defines the configurations for the kernel (in this case the configuration is named kowalski_defconig)
Code:
make kowalski_defconfig
Notice: this takes the configuration from the file located under arch/arm/configs and will write it to .config
9. Now we can finally build the kernel :victory: Run:
Code:
make
You will find the kernel under: arch/arm/boot/zImage. You just have to copy the zImage and replace the one found in the flashable zip (e.g. my downloads) under kernel/zImage with your own.
Troubleshooting:
Before you can build or run any from step 8 or 9 you have to make sure that all three vars are set correctly (so ARCH, CROSS_COMPILE and SUBARCH). You can check it by running:
Code:
echo $ARCH
for ARCH (for CROSS_COMPILE and SUBARCH it is the seem, but you have to change the name)
If they are not set correctly repeat step 6 and 7.
If you get a compile error first try to run:
Code:
make clean
and try to build the kernel again.
How to diff 2 files or directories in linux
If you are running linux and have two files on your computer and you want to find the differences you can run the diff command in the terminal.
Let's say you have a file "hjunii/traps.c" and "kowalski/traps.c", this is how you compare them:
Code:
diff -u hjunii/traps.c kowalski/traps.c
The command will compare both and will print an output to the terminal that will be similar to this:
Code:
@@ -27,6 +27,7 @@
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/sched.h>
+#include <linux/slab.h>
#include <linux/atomic.h>
#include <asm/cacheflush.h>
@@ -483,25 +484,38 @@
static inline void
do_cache_op(unsigned long start, unsigned long end, int flags)
{
- struct mm_struct *mm = current->active_mm;
- struct vm_area_struct *vma;
-
if (end < start || flags)
return;
+ return flush_cache_user_range(start, end);
+}
+
+static inline int
+do_cache_op_iov(const struct iovec __user *uiov, unsigned long cnt, int flags)
+{
+ int i, ret = 0;
+ unsigned long len = cnt * sizeof(struct iovec);
+ struct iovec *iov = kmalloc(len, GFP_KERNEL);
- down_read(&mm->mmap_sem);
- vma = find_vma(mm, start);
- if (vma && vma->vm_start < end) {
- if (start < vma->vm_start)
- start = vma->vm_start;
- if (end > vma->vm_end)
- end = vma->vm_end;
+ if (iov == NULL) {
+ ret = -ENOMEM;
+ goto out;
+ }
- up_read(&mm->mmap_sem);
- flush_cache_user_range(start, end);
- return;
+ if (copy_from_user(iov, uiov, len)) {
+ ret = -EFAULT;
+ goto out_free;
}
- up_read(&mm->mmap_sem);
+
+ for (i = 0; i < cnt; ++i) {
+ unsigned long start = (unsigned long __force)iov[i].iov_base;
+ unsigned long end = start + iov[i].iov_len;
+ do_cache_op(start, end, flags);
+ }
+
+out_free:
+ kfree(iov);
+out:
+ return ret;
}
/*
@@ -550,6 +564,10 @@
do_cache_op(regs->ARM_r0, regs->ARM_r1, regs->ARM_r2);
return 0;
+ case NR(cacheflush_iov):
+ do_cache_op_iov((const struct iovec __user *)regs->ARM_r0,
+ regs->ARM_r1, regs->ARM_r2);
+
case NR(usr26):
if (!(elf_hwcap & HWCAP_26BIT))
break;
Each line starting with a "+" are lines that were added, for example:
Code:
+#include <linux/slab.h>
On the other side lines starting with a "-" are lines that were deleted, for example:
Code:
- struct mm_struct *mm = current->active_mm;
A line like the following should just show you were you find the changes:
Code:
@@ -550,6 +564,10 @@
with the following syntax:
Code:
@@ -[line number in 1. file],[number of lines that were printed from 1.file] + [line number in 2. file], [number of lines that were printed from 2.file] @@
But the basic syntax is the following:
Code:
diff -u [base file] [file containing the changes you want to display]
You can also compare whole directories!
ProTip: Install the program "colordiff". It will color the console output, that means the output is more readable!
Syntax:
Code:
diff -u [base file] [file containing the changes you want to display] | colordiff
Example:
Code:
[COLOR="Plum"]@@ -1,8 +1,8 @@[/COLOR]
[COLOR="Red"]-VERSION = 2
-PATCHLEVEL = 6
-SUBLEVEL = 39
-EXTRAVERSION = .4
-NAME = Flesh-Eating Bats with Fangs[/COLOR]
[COLOR="RoyalBlue"]+VERSION = 3
+PATCHLEVEL = 1
+SUBLEVEL = 10
+EXTRAVERSION =
+NAME = "Divemaster Edition"[/COLOR]
Nice New kernel!
will try that one as soon as possible.
thanks for the work.we dont let the 2x die!
Will this work on Mokee rom?
If you don't understand the subconscious you will always bump into it calling it fate...
themistoklisv said:
Will this work on Mokee rom?
If you don't understand the subconscious you will always bump into it calling it fate...
Click to expand...
Click to collapse
Which kernel is included by default in the Rom or can you paste a link?
Gesendet von meinem LG-P990 mit Tapatalk
[email protected]#126
If you don't understand the subconscious you will always bump into it calling it fate...
themistoklisv said:
[email protected]#126
If you don't understand the subconscious you will always bump into it calling it fate...
Click to expand...
Click to collapse
Then I am sorry, but it is not compatible.
The 3.1 kernel differs too much to be compatible with ROMs that are build for an 2.6 kernel
Gesendet von meinem LG-P990 mit Tapatalk
Oh my God, amazing! Finally some serious development! Great work Firtecy. Time to bust CM11 back on my device and try this ramhacked wonder
Oh...i see...this why no ksm settings
Btw...i would suggest a higher ramhack like 32mb like m1 ramhack...but this kernel works great so far...just classic low ram problem exist (well...obviously) need to set an aggresive value (i'm using swap without zram)
Do i need to post a logcat?
Sent from my LG-P990
Will this work with cm 10.1?
Wysłane z mojego LG-P990 przy użyciu Tapatalka
No, it has a different wifi driver, sorry for my english
Sent from my ME173X using XDA Free mobile app
Okey
Wysłane z mojego LG-P990 przy użyciu Tapatalka
The first change:
Okay since there was the wish that there should be a 32 MB ramhack version and the poll showed the same i built one. You can find it at my basketbuild https://s.basketbuild.com/devs/firtecy/p990/kernel/3.1/.
So the 32 MB Ramhack version is labeled: firtecy_kernel_exp-1_32MB-RH.zip and the previous one is labeled: firtecy_kernel_exp-1_16MB-RH.zip
I have flashed it and in the settings app, I had 372MB available (Settings > About)
The second change:
Since i have been asked to explain how to build my kernel from source code i wrote a small how to in the third post of the thread. Check it and maybe try to build it for your own.
If you wish i can also write how to change the kernel by your own. (So add new stuff or something similiar)
Great job firtecy...downloading asap
--------------------++-
Very fluid ui with 32rh and with performance control app i can set lmk on boot (dunno..the one come with rom 0527 always reset after reboot)
So far...no bugs for me (except known bugs)
Btw i'm using swap only..no zram but zram works too (i turned it off)
Sent from my LG-P990
Would like to know if random reboot and phone always waking is a kernel related or rom?
Sent from my LG-P990 using Tapatalk 2
mkchan said:
Would like to know if random reboot and phone always waking is a kernel related or rom?
Sent from my LG-P990 using Tapatalk 2
Click to expand...
Click to collapse
I haven't got random reboots or always waking phone in fact on 3.1 kernel there's a bug for waking phone (need press power button twice or thrice)
Maybe your memory full ocupied and still lot queued job to do...that's sometimes happen to me...that's why i need to set lmk a bit aggresive...
Well as dev always said...log or it's not happen
Sent from my LG-P990
Firtecy said:
How to build your own kernel:
You need a Linux PC with either 32 or 64Bit. I'm using Linux Mint Debian Edition 64Bit. And you will need the following packages:
build-essential kernel-package libncurses5-dev bzip2
For example to install them run:
Code:
sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2
Click to expand...
Click to collapse
I have even had to install libc6-dev-i386 in my 64bit vbox image, then the make seems to have started working :good:
If you wish i can also write how to change the kernel by your own. (So add new stuff or something similiar)
Click to expand...
Click to collapse
+1 (if you don't mind and have time for it )
Thanks!
Thx for your dev. but can you build this kernel for su660?
나의 LG-P990 의 Tapatalk에서 보냄

How to save & load module settings after MODE_WORLD_READABLE is gone?

According to document, trying to use MODE_WORLD_READABLE will crash the module UI with a SecurityException.
I've tried to use a ContentProvider, but unable to get the Context object in handleLoadPackage (Illegal state).
Is there any better way?
Tried to downgrade targetSdkVersion, the app no longer crashes but XSharedPreferences still can't read the file (the preferences file is already world readable)
You can use Remotepreferences (awesome library!). You will need a context however, so it is not suitable for methods in initzigote or where you can't access the context. I think is the only way as of now.
Massi-X said:
You can use Remotepreferences (awesome library!). You will need a context however, so it is not suitable for methods in initzigote or where you can't access the context. I think is the only way as of now.
Click to expand...
Click to collapse
Remotepreferences will complicate things.
The easiest way to do is to remove the below line
Code:
getPreferenceManager().setSharedPreferencesMode(MODE_WORLD_READABLE);
And add the following on class level.
Code:
@Override
public void onPause() {
super.onPause();
// Set preferences permissions to be world readable
// Workaround for Android N and above since MODE_WORLD_READABLE will cause security exception and FC.
final File dataDir = new File(getActivity().getApplicationInfo().dataDir);
final File prefsDir = new File(dataDir, "shared_prefs");
final File prefsFile = new File(prefsDir, getPreferenceManager().getSharedPreferencesName() + ".xml");
if (prefsFile.exists()) {
dataDir.setReadable(true, false);
dataDir.setExecutable(true, false);
prefsDir.setReadable(true, false);
prefsDir.setExecutable(true, false);
prefsFile.setReadable(true, false);
prefsFile.setExecutable(true, false);
}
}
This method will work on any sdk :good:
I tested it myself and it is working fine.
Thanks to @PunchUp @pyler
laura almeida said:
Remotepreferences will complicate things.
The easiest way to do is to remove the below line
Code:
getPreferenceManager().setSharedPreferencesMode(MODE_WORLD_READABLE);
And add the following on class level.
Code:
@Override
public void onPause() {
super.onPause();
// Set preferences permissions to be world readable
// Workaround for Android N and above since MODE_WORLD_READABLE will cause security exception and FC.
final File dataDir = new File(getActivity().getApplicationInfo().dataDir);
final File prefsDir = new File(dataDir, "shared_prefs");
final File prefsFile = new File(prefsDir, getPreferenceManager().getSharedPreferencesName() + ".xml");
if (prefsFile.exists()) {
dataDir.setReadable(true, false);
dataDir.setExecutable(true, false);
prefsDir.setReadable(true, false);
prefsDir.setExecutable(true, false);
prefsFile.setReadable(true, false);
prefsFile.setExecutable(true, false);
}
}
This method will work on any sdk :good:
I tested it myself and it is working fine.
Thanks to @PunchUp @pyler
Click to expand...
Click to collapse
Yeah but it seems an hacky thing. It will work with any Android? With selinux enabled? On custom ROMs? Surely Remotepreferences complicate things but is the best way (also for previous Android versions) of reading the preferences file. Anyway this can be another solution :good:
EDIT: I also found in marshmallow my apps was randomly failing reading the preferences (no real reason) and Remotepreferences solved the problem.
Massi-X said:
Remotepreferences will complicate things.
The easiest way to do is to remove the below line
And add the following on class level.
Yeah but it seems an hacky thing. It will work with any Android? With selinux enabled? On custom ROMs? Surely Remotepreferences complicate things but is the best way (also for previous Android versions) of reading the preferences file. Anyway this can be another solution :highfive:
Click to expand...
Click to collapse
With any android version - Yes
Will it work with previous android version - Yes
On custom ROMs - Yes
With selinux enabled ? - not tested yet. But I think it works.
laura almeida said:
With any android version - Yes
Will it work with previous android version - Yes
On custom ROMs - Yes
With selinux enabled ? - not tested yet. But I think it works.
Click to expand...
Click to collapse
Previous versions: I was speaking about another thing. See edit. Anyway it's another way, 2 is always better than 1.

Categories

Resources