Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,780,683 Members 53,242 Now Online
XDA Developers Android and Mobile Development Forum

[KERNEL] [DEV] [P31xx] AA-ANYKERNEL- fix the Android 4.4.x drain

Tip us?
 
sanefirst
Old
#121  
Senior Member
Thanks Meter 54
Posts: 308
Join Date: Dec 2010
Location: Warsaw
Quote:
Originally Posted by Android-Andi View Post
Complete discharge it, then recharge.

Gesendet von meinem GT-I8190 mit Tapatalk
Hi Andi. Sorry, but this solution also doesn't seem to be working

Sent from my GT-P3110 using Tapatalk
Past phones:
Nokia 3210 | Nokia 5210 | Siemens C75 | SE Walkman W810i | HTC Diamond | Apple iPhone 3G | HTC Touch HD | SE Xperia X8 | Samsung Omnia II I8000 | RIM BlackBerry Curve 9360

Present phones:
RIM BlackBerry Bold 9900 | Samsung Galaxy S Plus I9001 | Samsung Galaxy S III Intl. I9300



Past tablets:
Wondermedia WM8650 7"


Present tablets:
Samsung Galaxy Tab 2 7" P3110
 
150208
Old
#122  
Senior Member
Thanks Meter 53
Posts: 143
Join Date: Dec 2013
Quote:
Originally Posted by sanefirst View Post
Hi Andi. Sorry, but this solution also doesn't seem to be working

Sent from my GT-P3110 using Tapatalk
complete discharge > charge until full > clear battery stats, use this.
if it's still doesn't working, it must be hardware fault..
i've experienced your issues, and fixed it by those method.
Devices:
Samsung galaxy tab 2 p3100
 
sanefirst
Old
#123  
Senior Member
Thanks Meter 54
Posts: 308
Join Date: Dec 2010
Location: Warsaw
Quote:
Originally Posted by 150208 View Post
complete discharge > charge until full > clear battery stats, use this.
if it's still doesn't working, it must be hardware fault..
i've experienced your issues, and fixed it by those method.
I'll try.

It cannot be hardware fault as I don't encounter such problems i.e. in Cody's 4.4.2.

Sent from my GT-P3110 using Tapatalk
Past phones:
Nokia 3210 | Nokia 5210 | Siemens C75 | SE Walkman W810i | HTC Diamond | Apple iPhone 3G | HTC Touch HD | SE Xperia X8 | Samsung Omnia II I8000 | RIM BlackBerry Curve 9360

Present phones:
RIM BlackBerry Bold 9900 | Samsung Galaxy S Plus I9001 | Samsung Galaxy S III Intl. I9300



Past tablets:
Wondermedia WM8650 7"


Present tablets:
Samsung Galaxy Tab 2 7" P3110
 
Tsjoklat
Old
(Last edited by Tsjoklat; 26th August 2014 at 02:01 AM.)
#124  
Tsjoklat's Avatar
Senior Member
Thanks Meter 2,180
Posts: 1,597
Join Date: Apr 2010
Ive noticed that the Vendor-Blobs installer is not setting the proper permissions on some of the files (for CM11). Ive made a patch.

Edit: I forgot to mention that this kernel is working really well with latest cm11 nightly. The battery life is great and the video drivers are also playing everything nicely.

Code:
--- updater-script.orig	2014-08-25 22:47:29.917239481 +0200
+++ updater-script	2014-08-25 23:27:45.113237599 +0200
@@ -26,23 +26,50 @@
 run_program("/tmp/cleaner.sh");
 package_extract_dir("system", "/system");
 ui_print("- Set permissions");
-set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
-set_perm_recursive(0, 0, 0755, 0644, "/system/etc/wifi");
-set_perm(0, 0, 0644, "/system/etc/wifi/wpa_supplicant.conf");
-set_perm(0, 0, 0644, "/system/etc/powervr.ini");
-set_perm_recursive(0, 0, 0755, 0644, "/system/lib");
-set_perm_recursive(0, 0, 0755, 0644, "/system/lib/hw");
-set_perm_recursive(0, 0, 0755, 0644, "/system/lib/modules");
-set_perm(0, 0, 0755, "/system/lib/drm");
-set_perm(0, 0, 0755, "/system/lib/egl");
-set_perm(0, 0, 0755, "/system/lib/soundfx");
-set_perm(0, 0, 0755, "/system/lib/ssl");
-set_perm_recursive(0, 0, 0755, 0644, "/system/vendor");
-set_perm_recursive(0, 2000, 0755, 0755, "/system/vendor/bin");
-set_perm_recursive(0, 0, 0755, 0644, "/system/vendor/firmware");
-set_perm_recursive(0, 0, 0755, 0644, "/system/vendor/lib");
-set_perm_recursive(0, 0, 0755, 0644, "/system/vendor/lib/egl");
-set_perm_recursive(0, 0, 0755, 0644, "/system/vendor/lib/hw");
+
+set_metadata_recursive("/system/bin", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
+set_metadata("/system/bin/app_process", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:zygote_exec:s0");
+set_metadata("/system/bin/clatd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:clatd_exec:s0");
+set_metadata("/system/bin/debuggerd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:debuggerd_exec:s0");
+set_metadata("/system/bin/dhcpcd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dhcp_exec:s0");
+set_metadata("/system/bin/dnsmasq", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dnsmasq_exec:s0");
+set_metadata("/system/bin/drmserver", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:drmserver_exec:s0");
+set_metadata("/system/bin/hostapd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:hostapd_exec:s0");
+set_metadata("/system/bin/installd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:installd_exec:s0");
+set_metadata("/system/bin/keystore", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:keystore_exec:s0");
+set_metadata("/system/bin/mediaserver", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mediaserver_exec:s0");
+set_metadata("/system/bin/mksh", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:shell_exec:s0");
+set_metadata("/system/bin/mtpd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mtp_exec:s0");
+set_metadata("/system/bin/netcfg", "uid", 0, "gid", 3003, "mode", 02750, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
+set_metadata("/system/bin/netd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:netd_exec:s0");
+set_metadata("/system/bin/ping", "uid", 0, "gid", 0, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ping_exec:s0");
+set_metadata("/system/bin/pppd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ppp_exec:s0");
+set_metadata("/system/bin/racoon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:racoon_exec:s0");
+set_metadata("/system/bin/run-as", "uid", 0, "gid", 2000, "mode", 0750, "capabilities", 0xc0, "selabel", "u:object_r:runas_exec:s0");
+set_metadata("/system/bin/sdcard", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:sdcardd_exec:s0");
+set_metadata("/system/bin/servicemanager", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:servicemanager_exec:s0");
+set_metadata("/system/bin/surfaceflinger", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:surfaceflinger_exec:s0");
+set_metadata("/system/bin/tf_daemon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:tee_exec:s0");
+set_metadata("/system/bin/vold", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:vold_exec:s0");
+set_metadata("/system/bin/wpa_supplicant", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:wpa_exec:s0");
+set_metadata("/system/etc/powervr.ini", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
+set_metadata_recursive("/system/etc/wifi", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
+set_metadata_recursive("/system/lib", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
+set_metadata_recursive("/system/vendor", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
+set_metadata("/system/vendor", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
+set_metadata_recursive("/system/vendor/bin", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:pvrsrvinit_exec:s0");
+set_metadata("/system/vendor/bin", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
+set_metadata("/system/vendor/bin/pvrsrvctl_SGX540_120", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
+set_metadata_recursive("/system/vendor/etc", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
+set_metadata("/system/vendor/etc/audio_effects.conf", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
+set_metadata("/system/vendor/firmware", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
+set_metadata("/system/vendor/firmware/ducati-m3.bin", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:firmware_ducati:s0");
+set_metadata("/system/vendor/lib", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
+set_metadata_recursive("/system/vendor/lib/drm", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
+set_metadata("/system/vendor/lib/drm/libdrmwvmplugin.so", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
+set_metadata("/system/vendor/lib/egl", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
+set_metadata("/system/vendor/lib/hw", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
+
 ui_print("- Running final installer");
 set_perm(0, 0, 0755, "/tmp/installer.sh");
 run_program("/tmp/installer.sh");
The Following User Says Thank You to Tsjoklat For This Useful Post: [ Click to Expand ]
 
Skazzy3
Old
#125  
Skazzy3's Avatar
Recognized Contributor
Thanks Meter 924
Posts: 2,104
Join Date: Jan 2012
Location: Toronto

 
DONATE TO ME
You know what? I found that undervolting the CPU actually makes the battery life much worse. All the problems I was posting about are gone and I can end the day at 50 or 40%. And sorry like I said I've missed over a year of gtab2 development so if someone actually said not to do that before I'm sorry.
http://www.youtube.com/Luigi2012SM64DS

I'm back!
Devices: Samsung Galaxy Tab 2 7.0 - SlimROM - Stock kernel
The Following User Says Thank You to Skazzy3 For This Useful Post: [ Click to Expand ]
 
Tsjoklat
Old
#126  
Tsjoklat's Avatar
Senior Member
Thanks Meter 2,180
Posts: 1,597
Join Date: Apr 2010
Ive optimized the patch I made for updater-script:

Code:
--- updater-script.orig	2014-04-05 21:08:05.000000000 +0200
+++ updater-script	2014-08-26 23:54:46.240750755 +0200
@@ -26,23 +26,25 @@
 run_program("/tmp/cleaner.sh");
 package_extract_dir("system", "/system");
 ui_print("- Set permissions");
-set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
-set_perm_recursive(0, 0, 0755, 0644, "/system/etc/wifi");
-set_perm(0, 0, 0644, "/system/etc/wifi/wpa_supplicant.conf");
-set_perm(0, 0, 0644, "/system/etc/powervr.ini");
-set_perm_recursive(0, 0, 0755, 0644, "/system/lib");
-set_perm_recursive(0, 0, 0755, 0644, "/system/lib/hw");
-set_perm_recursive(0, 0, 0755, 0644, "/system/lib/modules");
-set_perm(0, 0, 0755, "/system/lib/drm");
-set_perm(0, 0, 0755, "/system/lib/egl");
-set_perm(0, 0, 0755, "/system/lib/soundfx");
-set_perm(0, 0, 0755, "/system/lib/ssl");
-set_perm_recursive(0, 0, 0755, 0644, "/system/vendor");
-set_perm_recursive(0, 2000, 0755, 0755, "/system/vendor/bin");
-set_perm_recursive(0, 0, 0755, 0644, "/system/vendor/firmware");
-set_perm_recursive(0, 0, 0755, 0644, "/system/vendor/lib");
-set_perm_recursive(0, 0, 0755, 0644, "/system/vendor/lib/egl");
-set_perm_recursive(0, 0, 0755, 0644, "/system/vendor/lib/hw");
+set_metadata("/system/bin/dock_kbd_attach", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
+set_metadata("/system/bin/geomagneticd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
+set_metadata("/system/bin/gpsd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
+set_metadata("/system/bin/hostapd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
+set_metadata("/system/bin/orientationd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
+set_metadata("/system/etc/powervr.ini", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
+set_metadata_recursive("/system/etc/wifi", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
+set_metadata_recursive("/system/lib", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
+set_metadata_recursive("/system/vendor/bin", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:pvrsrvinit_exec:s0");
+set_metadata("/system/vendor/bin", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
+set_metadata("/system/vendor/bin/pvrsrvctl_SGX540_120", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
+set_metadata("/system/vendor/firmware/BCM4330.hcd", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
+set_metadata("/system/vendor/firmware/ducati-m3.bin", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:firmware_ducati:s0");
+set_metadata_recursive("/system/vendor/lib", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
+set_metadata("/system/vendor/lib", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
+set_metadata_recursive("/system/vendor/lib/drm", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
+set_metadata("/system/vendor/lib/drm/libdrmwvmplugin.so", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
+set_metadata("/system/vendor/lib/egl", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
+set_metadata("/system/vendor/lib/hw", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
 ui_print("- Running final installer");
 set_perm(0, 0, 0755, "/tmp/installer.sh");
 run_program("/tmp/installer.sh");
The Following User Says Thank You to Tsjoklat For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes