watch out Samsung is being sneaky. - Samsung Galaxy Tab S7 / S7 Plus Guides, News, & Di

Samsung is sneaky about syncing their Samsung calendar from your Google account. when you open up Google calendar it shows in the screenshot below but it shows that you need to enable sync for your Google account calendar. when you enable this enable Samsung's calendar from your Google account calendar. I turned off Samsung calendar sync and when I open up Google calendar it said you need to sync your account and I enable it thinking that Google account calendar is not synced. so I had a suspicion to check Samsung's account settings sync for Samsung calendar, lo and behold it was freaking enabled. I turned it off go to Google calendar and I dismissed the notification of need to sync to my Gmail account and I open up Samsung's account under settings sync and Samsung calendar is not enabled then I go to Google account under Android settings, lo and behold my Google account calendar sync is enabled which is what I want. sneaky sly snake in the grass.
Android 11 one ui 3.1.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}

Android 11 one UI 3.1 Samsung tab S7 plus 5G versus Samsung S10 plus Android 11 one UI 3.0.

Samsung has a lot of things under the hood that even disabling those system apps via adb is not enough to stop them.
Back then I disabled Game Manager as I thought it would get in the way with gameplay (I don't have any use of it), but turned out disabling the app alone was not enough. Some of its functionalities remain active as the logcat keeps spamming stuffs related to it.
In overall, the system is spamming a lot of logcats in a speed I have never seen before, which I suspect the performance issues I'm having might be related to this.
It's possible that some Samsung secret functions are masquerading as, or hiding behind some supposedly "innocent" system apps (in the latter case, disabling it would also break core system functions)... Since the logcat itself doesn't really tell me much about which "real" app was spamming the logcats in question, I cannot be really sure.

LSS4181 said:
Samsung has a lot of things under the hood that even disabling those system apps via adb is not enough to stop them.
Back then I disabled Game Manager as I thought it would get in the way with gameplay (I don't have any use of it), but turned out disabling the app alone was not enough. Some of its functionalities remain active as the logcat keeps spamming stuffs related to it.
In overall, the system is spamming a lot of logcats in a speed I have never seen before, which I suspect the performance issues I'm having might be related to this.
It's possible that some Samsung secret functions are masquerading as, or hiding behind some supposedly "innocent" system apps (in the latter case, disabling it would also break core system functions)... Since the logcat itself doesn't really tell me much about which "real" app was spamming the logcats in question, I cannot be really sure.
Click to expand...
Click to collapse
horrible, samsung has best high performance devices besides apple out there crunching other brands.

I firewall block many Samsung and Android apks with Karma Firewall.
Most are rarely needed.
Samsung is a real pain in this respect.
Be glad you don't have Bixby which I completely disabled. No.
It's EULA is like signing your soul over to the devil.

i have bixby default installed but not sigmed in.

blackhawk said:
I firewall block many Samsung and Android apks with Karma Firewall.
Most are rarely needed.
Samsung is a real pain in this respect.
Be glad you don't have Bixby which I completely disabled. No.
It's EULA is like signing your soul over to the devil.
Click to expand...
Click to collapse
It's better to do some detailed tests if possible and make a list. I think Samsung is way too sneaky about things a system app would do as disabling the apps on the surface do not really disable the functionality itself (at least that's what the system logcats told me), in order to deter people from disabling them.
I do have a Samsung account but haven't used it on the tablet. I'm using it on my watch, which is currently paired with my phone that uses microG. At least this is something good from Samsung, that I'm finally able to ditch GApps on my phone for good.

LSS4181 said:
It's better to do some detailed tests if possible and make a list. I think Samsung is way too sneaky about things a system app would do as disabling the apps on the surface do not really disable the functionality itself (at least that's what the system logcats told me), in order to deter people from disabling them.
I do have a Samsung account but haven't used it on the tablet. I'm using it on my watch, which is currently paired with my phone that uses microG. At least this is something good from Samsung, that I'm finally able to ditch GApps on my phone for good.
Click to expand...
Click to collapse
Knox can't be fully disabled.
KMLS is always running; stopping it kills it for a while.
Samsung Payment is untouchable... damn crap app. Problem is they are set as embedded system administrators.
The Google verification system is even worse. I'm not worried about the phone being stolen; I'm worried about getting locked out by it.

blackhawk said:
Knox can't be fully disabled.
KMLS is always running; stopping it kills it for a while.
Samsung Payment is untouchable... damn crap app. Problem is they are set as embedded system administrators.
The Google verification system is even worse. I'm not worried about the phone being stolen; I'm worried about getting locked out by it.
Click to expand...
Click to collapse
Aegis is a better solution for 2FA codes. It has more features, and supports everything Google Authenticator could offer.
From what I read you should be able to secure (add a master password) and move (backup/restore) your vaults around with Aegis, so as long as you have a backup of the vault and a device you can access, you shouldn't be locked out.
I was originally thinking Samsung would do well enough to keep people on stock with Android 11 update... seeing how it's turning out now makes me even more want to switch to a custom ROM/GSI (in turn giving up whatever good Knox might be able to offer)... just that I'm yet to hear any success stories of GSI for such tablets from someone reputable.

LSS4181 said:
Aegis is a better solution for 2FA codes. It has more features, and supports everything Google Authenticator could offer.
From what I read you should be able to secure (add a master password) and move (backup/restore) your vaults around with Aegis, so as long as you have a backup of the vault and a device you can access, you shouldn't be locked out.
I was originally thinking Samsung would do well enough to keep people on stock with Android 11 update... seeing how it's turning out now makes me even more want to switch to a custom ROM/GSI (in turn giving up whatever good Knox might be able to offer)... just that I'm yet to hear any success stories of GSI for such tablets from someone reputable.
Click to expand...
Click to collapse
Not rooted so just working in the system. Rooting seems too time intensive and not having done it, perplexing as hell to flash successfully.
I do prefer to run as system administrator though on my Windows machines so the temptation is there

TL;DR: Guess I really need to be careful about Samsung in some ways...
Okay... just unlocked and rooted this tablet.
Although I can safely disable most bloated apps using this script (root not required at this point), there are some untouchable ones, especially Game Optimization Service/GOS, which I suspect it responsible for all the game issues.
You cannot disable com.samsung.android.game.gos because some Samsung service keeps re-enabling it, in a malware-like behavior.
I added these into NanoDroid overlay so the package in question can be banished to nothingness:
Code:
GameHome
GameOptimizingService
GameTools_Dream
This way the GOS is gone for good and I don't see it in the package list nor in most of the logcat. However, the logcat still mentions something like this, means the "malware" lies much deeper into the system.
Code:
02-11 17:13:42.447 1133 1541 D GameManagerService: GameService deos not exist
So the GameManagerService is not the three packages in question, with the GOS package gone, it can do nothing but complain about the package it wants "deos [sic] not exist".
For now it's one fewer app interfering with games, but I still worry about the performance as the stock firmware is spamming logs like crazy. Just keep adb logcat on for about 10-15 secs I got a whopping 20MB of logcat!

LSS4181 said:
TL;DR: Guess I really need to be careful about Samsung in some ways...
Okay... just unlocked and rooted this tablet.
Although I can safely disable most bloated apps using this script (root not required at this point), there are some untouchable ones, especially Game Optimization Service/GOS, which I suspect it responsible for all the game issues.
You cannot disable com.samsung.android.game.gos because some Samsung service keeps re-enabling it, in a malware-like behavior.
I added these into NanoDroid overlay so the package in question can be banished to nothingness:
Code:
GameHome
GameOptimizingService
GameTools_Dream
This way the GOS is gone for good and I don't see it in the package list nor in most of the logcat. However, the logcat still mentions something like this, means the "malware" lies much deeper into the system.
Code:
02-11 17:13:42.447 1133 1541 D GameManagerService: GameService deos not exist
So the GameManagerService is not the three packages in question, with the GOS package gone, it can do nothing but complain about the package it wants "deos [sic] not exist".
For now it's one fewer app interfering with games, but I still worry about the performance as the stock firmware is spamming logs like crazy. Just keep adb logcat on for about 10-15 secs I got a whopping 20MB of logcat!
Click to expand...
Click to collapse
wow.
I read about the script thanks!

This time I tried the Root method (which utilizes a Magisk module to systemlessly replace files, and can complement my NanoDroid overlay) so all the Samsung stuffs in question can be banished from the system.
I did not add other lists (namely the GFAM ones) as I might need to manually install some of those stuffs back and they don't appear to be behaving malware-like (that keep being re-enabled by something elses), just the Samsung list.
However, the logcat still has mentions to the GameManagerService and it keeps scanning for the packages in question.
Code:
02-12 11:34:45.759 1125 1125 D GameManager.DatabaseHelper: loadPkgDataFromDb(). entry size: 1
02-12 11:34:45.760 1125 1125 I GameManagerService: PkgUpdateReceiver, : ctor
02-12 11:34:45.760 1125 1125 I GameManagerService: SecFamilyPkgChangeReceiver, : ctor
02-12 11:34:45.760 1125 1125 D GameManagerService: Now checking pkgs enabled...
02-12 11:34:45.760 1125 1125 D GameManagerService: com.samsung.android.game.gos does not exist
02-12 11:34:45.760 1125 1125 D GameManagerService: isPkgEnabled(), begin
02-12 11:34:45.760 1125 1125 D GameManagerService: isPkgEnabled(), com.samsung.android.game.gamehome does not exist.
02-12 11:34:45.760 1125 1125 D GameManagerService: isPkgInstalled(), begin
02-12 11:34:45.760 1125 1125 D GameManagerService: isPkgInstalled(), com.samsung.android.game.gametools does not exist.
02-12 11:34:45.761 1125 1125 I GM:SystemHelper: ctor
02-12 11:34:45.761 1125 1125 D GameManagerService$Lifecycle: onStart
02-12 11:34:45.762 600 1404 I servicemanager: Adding 'u:r:system_server:s0' service (gamemanager:1125)
02-12 11:34:45.762 1125 1125 I SystemServer: GameManagerService Started
02-12 11:34:45.762 1125 1125 D SystemServerTiming: GameManagerService took to complete: 11ms
02-12 11:34:45.762 1125 1125 I SystemServer: GameSDKService
So there's definitely something hiding very deep (as system services) in stock ROM that monitors and re-enables certain other services if possible, should the users attempts to disable them. For now, as I've systemlessly banished them, it could do nothing but complain (for now).
PS: Wow... looked at the PID and found out the "malware" in question turned out to be system_server. Seriously, this behavior totally shocked me, to insert malware-like functions there...
Code:
gts7xl:/ $ ps -p 1125
USER PID PPID VSZ RSS WCHAN ADDR S NAME
system 1125 838 20193644 565008 0 0 S system_server
In this case there's really an immediate need for a ROM/GSI because this practice is way too scary if abused... Not to mention the performance improvement might be limited as the size for a 10-second logcat is only reduced by about one megabyte.
blackhawk said:
Samsung Payment is untouchable... damn crap app. Problem is they are set as embedded system administrators.
Click to expand...
Click to collapse
EDIT: Just noticed there were some follow-ups in that... Now I understood why Samsung Payment is untouchable...

At least all my Samsung devices, once I bought them, if I can't put them LineageOS, then I would disable everything from Google.
No problems from my side.
If you are very privacy concern, then you shouldn't have any Google app installed. If you need something from Google Play store, there is an alternative called Aurora Store.

LSS4181 said:
This time I tried the Root method (which utilizes a Magisk module to systemlessly replace files, and can complement my NanoDroid overlay) so all the Samsung stuffs in question can be banished from the system.
I did not add other lists (namely the GFAM ones) as I might need to manually install some of those stuffs back and they don't appear to be behaving malware-like (that keep being re-enabled by something elses), just the Samsung list.
However, the logcat still has mentions to the GameManagerService and it keeps scanning for the packages in question.
Code:
02-12 11:34:45.759 1125 1125 D GameManager.DatabaseHelper: loadPkgDataFromDb(). entry size: 1
02-12 11:34:45.760 1125 1125 I GameManagerService: PkgUpdateReceiver, : ctor
02-12 11:34:45.760 1125 1125 I GameManagerService: SecFamilyPkgChangeReceiver, : ctor
02-12 11:34:45.760 1125 1125 D GameManagerService: Now checking pkgs enabled...
02-12 11:34:45.760 1125 1125 D GameManagerService: com.samsung.android.game.gos does not exist
02-12 11:34:45.760 1125 1125 D GameManagerService: isPkgEnabled(), begin
02-12 11:34:45.760 1125 1125 D GameManagerService: isPkgEnabled(), com.samsung.android.game.gamehome does not exist.
02-12 11:34:45.760 1125 1125 D GameManagerService: isPkgInstalled(), begin
02-12 11:34:45.760 1125 1125 D GameManagerService: isPkgInstalled(), com.samsung.android.game.gametools does not exist.
02-12 11:34:45.761 1125 1125 I GM:SystemHelper: ctor
02-12 11:34:45.761 1125 1125 D GameManagerService$Lifecycle: onStart
02-12 11:34:45.762 600 1404 I servicemanager: Adding 'u:r:system_server:s0' service (gamemanager:1125)
02-12 11:34:45.762 1125 1125 I SystemServer: GameManagerService Started
02-12 11:34:45.762 1125 1125 D SystemServerTiming: GameManagerService took to complete: 11ms
02-12 11:34:45.762 1125 1125 I SystemServer: GameSDKService
So there's definitely something hiding very deep (as system services) in stock ROM that monitors and re-enables certain other services if possible, should the users attempts to disable them. For now, as I've systemlessly banished them, it could do nothing but complain (for now).
PS: Wow... looked at the PID and found out the "malware" in question turned out to be system_server. Seriously, this behavior totally shocked me, to insert malware-like functions there...
Code:
gts7xl:/ $ ps -p 1125
USER PID PPID VSZ RSS WCHAN ADDR S NAME
system 1125 838 20193644 565008 0 0 S system_server
In this case there's really an immediate need for a ROM/GSI because this practice is way too scary if abused... Not to mention the performance improvement might be limited as the size for a 10-second logcat is only reduced by about one megabyte.
EDIT: Just noticed there were some follow-ups in that... Now I understood why Samsung Payment is untouchable...
Click to expand...
Click to collapse
its a sh*t show imho.

blackhawk said:
Knox can't be fully disabled.
KMLS is always running; stopping it kills it for a while.
Samsung Payment is untouchable... damn crap app. Problem is they are set as embedded system administrators.
The Google verification system is even worse. I'm not worried about the phone being stolen; I'm worried about getting locked out by it.
Click to expand...
Click to collapse
How is Pay untouchable? I uninstalled it easliy with no problems. Along with Bixby

Greatness83 said:
How is Pay untouchable? I uninstalled it easliy with no problems. Along with Bixby
Click to expand...
Click to collapse
How?* It's set as an invisible system administrator.
*without root excess that is

blackhawk said:
How? It's set as an invisible system administrator.
Click to expand...
Click to collapse
Plus, Samsung would lock you out if you dare to touch anything related to it.
EDIT: I think it depends on how you debloat. If you debloat them all at once (I used this debloater's Root/Magisk mode to do so) you would be fine, so some Samsung system apps probably have watchdogs to ensure the presence of each other.

even xda forums website pissing me off with the bouncing up and down pages wtf?
anyways samsung is at it again. removed natural blue on the volume control to grey wtf
am I the only one going ???
samsung and xda's forum.

Hitti2 said:
even xda forums website pissing me off with the bouncing up and down pages wtf?
anyways samsung is at it again. removed natural blue on the volume control to grey wtf
am I the only one going ???
samsung and xda's forum.
Click to expand...
Click to collapse

Related

Temperature hacks on the Tab (battery, and the other sensor)

First of all, I needed SetCPU to detect the battery temperature on my overclocked Galaxy Tab (to switch profile when overheating), so I modified my home-brewed kernel with this small patch:
http://forum.xda-developers.com/showthread.php?p=11454036#post11454036
This is fine, but on my JMI ROM (even with the correct /system/lib/hw/sensors.default.so library), applications like "SensorTest" were not displaying the temperature from the AK8973B sensor. I found a way to fix this.
Basically, I compiled this open-source driver (or alternatively, this one), which provides a custom sensors.default.so library and akmd service executable. The former is actually not needed, only the latter needs to be run on the Tab (because the standard /dev/akm8973_daemon device node is used, via ioctl to update the /dev/input values for compass, etc.).
First, I stopped the default /system/bin/akmd2 service. I then launched the custom akm daemon, which showed wrongly-calibrated values for the compass and orientation sensors (because I entered random digital and analog gain values), but the correct temperature was displayed (actually higher than the battery one !). I then stopped akmd, and re-launched akmd2...and magic: the temperature is now picked-up correctly !
Note that the gyroscope and accelerometer sensors are *not* affected these AKM modifications (they are effectively different hardware, with different drivers). The ambient light and proximity sensors are also different hardware (the latter isn't enabled on the Tab, by the way...I suspect we need to compile/install a driver for it).
I will do more testing with akmd and akmd2, and I will probably modify my init.rc to launch the service accordingly (in my custom initramfs).
I hope this helps.
Cheers, Dan
--- EDIT ---
Mhmmm, here's an interesting update:
There is no need to compile the open-source AKM daemon ! Instead, you just need to kill the /system/bin/akmd2 process, and restart it.
Well, actually it's not that simple: it only really works when the temperature sensor is polled (for example, when the SensorTest or Elixir app is displaying current values). Oh, and the temperature sensor only spits-out results when the compass sensor is also polled at the same time ! (Elixir is useful to test this, because sensors can be selectively activated)
I tried to reverse-engineer the values coming out of /dev/input/event4 (which corresponds to the compass sensor, as shown by the getevent command). I used shell commands similar to that (note the automatic conversion from hexadecimal to decimal values):
Code:
getevent | grep "/dev/input/event4:" | sed 's/ffffff//g' | awk '{print $2 " " $3 " " ("0x"$4)+0 ">" $4}'
Unfortunately my time ran out before I could make sense out the stream of values.
By the way, here is the script I used to stop+restart the AKM daemon in init.d/ :
Code:
get_akmd_pid()
{
ps -w | grep akmd2 | grep -v grep | awk '{print $1}'
}
pid=`get_akmd_pid`
echo "Killing /system/bin/akmd2 (PID: ${pid}) ..."
kill -9 $pid
pid=`get_akmd_pid`
echo "Checking that /system/bin/akmd2 process has been terminated: now PID = [${pid}] (should be empty)"
echo "Restarting /system/bin/akmd2..."
/system/bin/akmd2 &
pid=`get_akmd_pid`
echo "Checking that /system/bin/akmd2 process has been restarted: now PID = [${pid}] (should NOT be empty)"
What temperature do you consider too hot on your tab? I currently have my set to underclock from 1.4 ghz to 800 mhz whenever it reaches 90 degrees Fahrenheit (I am a worry-wart), but it reaches that a lot, so I was wondering what you have the maximum temperature set to before you bring the clock speed down.
Thanks
caveman999 said:
What temperature do you consider too hot on your tab?
Click to expand...
Click to collapse
I'm not sure yet. The battery temperature is lower than the one indicated by the AK8973 sensor. As it stands, SetCPU switches profiles based on the battery temperature, so personally I use conservative values (at the moment, 35 degrees Celcius).
By the way, the original post has been updated to reflect new findings.
Cheers, Daniel
my temp sensor is stuck at 30 c after flashing a kernel how do i get it to work. what you posted did not work. im actually stuck in a boot loop
nev310 said:
my temp sensor is stuck at 30 c after flashing a kernel how do i get it to work. what you posted did not work. im actually stuck in a boot loop
Click to expand...
Click to collapse
Same here, stuck on 30 degrees C. Any fix would be appreciated.
Any updates on this

activity manager cpu 100%

Hi
i have a weird thing , dont know if its rom related but defenetly noticed it after rooting my device and installing cosutm roms. well i only used ARHD since 2.0.09 and i love it.
but , what happens is that suddenly and out of nothing (after like hours/days and the rom running smooth and ultra fast) , system cpu usage jumps to 100% and never bugs off only through a restart, and this seems to happen with all the different versions of ARHD i had, even though i install most of them with full wipes. but this i don't understand and it annoyes me cos it uses this cpu amount and drains battery and it happens suddenly and randomly , dunno what triggers it, and no matter how i tried to track it to see the error but couldn't find a thing.
i just hope u can help me by taking a look at this log i saved from android systeminfo app registering some errors (3 min log and it drained 14% battery ) , it shows something about "activity manager", im not a developer and i know nothing about those codes, but would be awesome if someone helps me out with any tip please.
thank you.
I am not a DEV but i don't think your log file includes any clue of what is causing your problem. Do you have sense account on? or any types of account that let you track your phone?
Activate usb debugging
Seems to be the bug with the .init process.
Sent from my Desire HD using Tapatalk
thank you for the replies , i already have usb debugging on. dunno what is causing this, its totally random and its driving me nuts.
can you see a process that uses 100% cpu in android system info? If yes, try to kill it and look at your cpu usage.
CPUNotify is a great tool. It shows cpu usage in the notification bar
Sent from my Desire HD using Tapatalk
the process showing 100% cpu usage (not always but randomly, no idea what triggers it ) is system , and u can't force close or end that task
Hmm strange... i can't even find a process called activity manager on my phone...
Well i don't know but maybe it's related to the DroidDream malware. Some apps in the market were infected with this virus. And i've read that the virus gains root access and can download other apps in the background.
Here's a link: http://forum.xda-developers.com/showthread.php?t=977154
I really don't know if it's related to this but it just came to my mind
Sent from my Desire HD using Tapatalk
thx for the help mate , but i dont think its related to droidream cos ive been having this issue since a while (long time before droidream was up )
im still monitoring to find out what is causing this issue.
i have the same issue since going to a rooted ROM (HD rev 2.0.12). tried every build up to 3.0 and i have the same issue. it seems to be randomly triggered (i've seen it trigger after playing "robo defense", playing music, making a call etc).
i have no sense account and dont have malware and have usb debugging on
I fix/hack it this way..open adb shell
type
chmod 700 /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state
ie disallow anything (even system_server) from reading this file.
in fact i automate this command to run every 15 mins using an app called phone prioritizer. as soon as you type the chmod..your logcat will stop spinning and all will be well (iove not seen any side effects yet).
ps. you have to run this every time you open setcpu, as it will reset the permission on this file to 777/666 depending on the version of setcpu you have.
Activate usb debugging
Seems to be the bug with the .init process.
Click to expand...
Click to collapse
nope that totally different. that problem shows itself in "top -m 5" as init taking all the cpu ..this will show as system_server.
the "bug" manifests itself in this kernel file:
goto url github.com/android/platform_frameworks_base/blob/master/services/java/com/android/server/ProcessStats.java#L157
it spins on getCpuSpeedTimes() where it reads time_in_state..why it does this i dont know..it looks like mBuffer is corrupt as nosuchelementException would indicate that the buffer didnt have 2 words per line of the file yet the real file looks fine if you cat it (readFile seems not to initialise this on reading it to null first (but i'm not a java expert..maybe ".read" does this) so perhaps it has junk in it on certain conditions..any java guys out there can explain why they made this a glbal variable? it seems like it should be a local one)
by chmodding the file i cause an IOException to throw in readFile (which is then ignored and the return is gracefully set as null..this then skips the infinate loop).
you can see this issue in a few bugs like android issue 9733..oxygen rom issue 507 etc.
wow , cheers mate for the help , sounds a bit complicated for me but at least we know what it is now and how to get over it.
but how come mike1986 doesnt know about this bug and its fix ? he could incorporate this into his next build so it saves us that command run every 15 mins. or it cant be incorporated ?
someone should tell him to be honest
but cheers for explanation mate, thank you
Is Apache14 informed about this? Maybe he can solve it in next Kernelversion.
walda said:
Is Apache14 informed about this? Maybe he can solve it in next Kernelversion.
Click to expand...
Click to collapse
i have no idea about that , if he does then im sure he will fix it
As I read in mikes 3.0 thread, he is informed. Fine...
sent from my DHD via Tapatalk
further to this.
in ProcessStats.java (im not sure if this is a kernel file or if it sits just outside the kernel).
mBuffer looks to me to be the main problem.
1. in apaches rom, which is overclocked he defines 23 CPU speeds..ProcessStats.java only allows 20
Code:
private long[] getCpuSpeedTimes(long[] out) {
long[] tempTimes = out;
long[] tempSpeeds = mCpuSpeeds;
final int MAX_SPEEDS = 20;
if (out == null) {
tempTimes = new long[MAX_SPEEDS]; // Hopefully no more than that
tempSpeeds = new long[MAX_SPEEDS];
this is a minor issue..as this overflow is trapped in the loop anyway:
Code:
if (speed == MAX_SPEEDS) break; // No more
however, the definition of mBuffer is too small:
Code:
private byte[] mBuffer = new byte[256];
my file at the moment is 300 bytes. the readFile reads only once instead of looping until end of file:
Code:
int len = is.read(mBuffer);
is.close();
so only the first 256 bytes are ever read.
My assumption is that IF the files first 256 bytes ends up cutting off the last read line (and that line lies in the first MAX_SPEEDS lines of the file) before the speed time element..this causes a NoSuchElementException to throw..as the last line will be like
921600 255
960000 750
998400 8042
10368
ie the line
1036800 3089
was cut off too soon and this code
Code:
long val = Long.parseLong(token);
tempSpeeds[speed] = val;
token = st.nextToken(); <-- here
val = Long.parseLong(token);.
in getCpuSpeedTimes() fails as it cant see the timing?
would then fail on the second nextToken().
the big question is who owns that code in our custom ROM? is it the same as the original android code so we are at the mercy of Google to fix it or is this something Mike / Apache will be able to patch up ..assuming i'm making sense
the only workaround is as i said before: to chmod this file to 700 and ensure it stays there (avoid using setcpu as it changes the permissions).
You can probably also reduce this by limiting the CPU frequency range your phone uses (ie keep the filesize smaller)..if you have profiles that span 200mhz to 1.2ghz then you will probably hit this sooner
i did a test.
1. rebooted my phone..ensured time_in_state had permissions -r--r--r--
2. manipulated CPU frequency using cpu tuner to make all frequencies have at least 5 bytes per line.
once the first 20 lines were > 256 bytes and the 256nd byte sat between <cpu speed> and <time spent at that speed> i get the loop.
eg just before the issue arose i saw:
Code:
# cat time_in_state
cat time_in_state
245000 200030
422400 12676
460800 11929
499200 10333
537600 37021
576000 10685
614400 13672
652800 10646
691200 14864
729600 13956
768000 12662
806400 15025
844800 22094
883200 26741
921600 10389
960000 9937
998400 17606
1036800 6864
1075200 1560
1113600 1296
1152000 2158
1190400 2540
1228800 2463
i had my cpu pinned to 960 mhz.
the 256 at this point lies here:
Code:
1075200 1560
1113600 1
ie line 20 is cut off after 1..this is still "valid" in terms of the data in mBuffer..but once 960 rolled into five digits
Code:
# cat time_in_state
cat time_in_state
245000 200030
422400 12676
460800 11929
499200 10333
537600 37021
576000 10685
614400 13672
652800 10646
691200 14864
729600 13956
768000 12662
806400 15025
844800 22094
883200 26741
921600 10389
960000 10288
998400 17606
1036800 6864
1075200 1560
1113600 1296
1152000 2158
1190400 2540
1228800 2463
the 256 byte now meant the last line shifts to:
Code:
1036800 6864
1075200
the 2nd word is now totally missing!
as soon as this happened..my logcat started issuing
Code:
Unexpected exception collecting process stats
java.util.NoSuchElementException
at java.util.StringTokenizer.nextToken(StringTokenizer.java:272)
at com.android.server.ProcessStats.getCpuSpeedTimes(ProcessStats.java:596)
at com.android.server.ProcessStats.getLastCpuSpeedTimes(ProcessStats.java:568)
at com.android.server.am.ActivityManagerService.updateCpuStatsNow(ActivityManagerService.java:1657)
at com.android.server.am.ActivityManagerService$4.run(ActivityManagerService.java:1583)
errors.
something later on then causes this behavior to go into a full tight loop (as once the issue starts..it just issues this every few seconds..so most uses wont notice it).
didnt mike fixed it with his latest release (ARHD 3.1) ?
Goodm7sn said:
didnt mike fixed it with his latest release (ARHD 3.1) ?
Click to expand...
Click to collapse
mike changed the file permission to 700 to get around it. the bug is still there in the code though. also im not sure if hes scheduling it to make it stay at 700..if not then users with setcpu installed may still get the problem (as setcpu changes the file permission back to 777/666 when you open the gui).
DazzaL said:
i have the same issue since going to a rooted ROM (HD rev 2.0.12). tried every build up to 3.0 and i have the same issue. it seems to be randomly triggered (i've seen it trigger after playing "robo defense", playing music, making a call etc).
i have no sense account and dont have malware and have usb debugging on
I fix/hack it this way..open adb shell
type
chmod 700 /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state
ie disallow anything (even system_server) from reading this file.
in fact i automate this command to run every 15 mins using an app called phone prioritizer. as soon as you type the chmod..your logcat will stop spinning and all will be well (iove not seen any side effects yet).
ps. you have to run this every time you open setcpu, as it will reset the permission on this file to 777/666 depending on the version of setcpu you have.
nope that totally different. that problem shows itself in "top -m 5" as init taking all the cpu ..this will show as system_server.
the "bug" manifests itself in this kernel file:
goto url github.com/android/platform_frameworks_base/blob/master/services/java/com/android/server/ProcessStats.java#L157
it spins on getCpuSpeedTimes() where it reads time_in_state..why it does this i dont know..it looks like mBuffer is corrupt as nosuchelementException would indicate that the buffer didnt have 2 words per line of the file yet the real file looks fine if you cat it (readFile seems not to initialise this on reading it to null first (but i'm not a java expert..maybe ".read" does this) so perhaps it has junk in it on certain conditions..any java guys out there can explain why they made this a glbal variable? it seems like it should be a local one)
by chmodding the file i cause an IOException to throw in readFile (which is then ignored and the return is gracefully set as null..this then skips the infinate loop).
you can see this issue in a few bugs like android issue 9733..oxygen rom issue 507 etc.
Click to expand...
Click to collapse
Thanks mate, your solution is really effective on my DHD with revolution 3.0.
I am going to reflash with revolution 3.1, hopefully 3.1 will cure the cpu 100% usage
im on android revolution HD and i can confirm this , 100% system cpu of death is still here, didnt get fixed , had to change setcpu frequency and it stopped
meh phone cant last 12 hrs without a restart, frustrating.
DazzaL said:
mike changed the file permission to 700 to get around it. the bug is still there in the code though. also im not sure if hes scheduling it to make it stay at 700..if not then users with setcpu installed may still get the problem (as setcpu changes the file permission back to 777/666 when you open the gui).
Click to expand...
Click to collapse
if setcpu changed the range once the gui is opened , what do u recommend us to use for overclocking ? something safer
thx for helping
I read that it happens with CPU tuner and even without anything also!
The only solution I see is to fix the frequency file.
sent from my DHD via Tapatalk

Utilising the Adreno130 Graphics on the Hero

So as it says i wish to utilise the Adreno130 graphics like the legend utilises the adreno200
Taken from egl.cfg (Legend [Adreno200] )
Code:
# One line per configuration, of the form:
#
# D I TAG
#
# D: display (0: default)
# I: implementation (0: software, 1: hardware)
# TAG: a unique tag
#
# The library name loaded by EGL is constructed as (in that order):
#
# /system/lib/egl/libGLES_$TAG.so
# /system/lib/egl/lib{EGL|GLESv1_CM|GLESv2}_$TAG.so
#
0 0 android
0 1 adreno200
As you can see it uses a cfg to use the adreno200, Is there no way of changing it and the drivers so the hero does the same?? Im no developer so i really need help!
Nearly 500 views and not a single comment....Im beggining to think this should go in Development
bonesy said:
Nearly 500 views and not a single comment....Im beggining to think this should go in Development
Click to expand...
Click to collapse
only edit egl.cfg
Code:
0 0 android
0 1 qcom
to
Code:
0 0 android
0 1 adreno130
EDIT: Then you definitely must add adreno files also
Note that the differences between 200 and 130 can be quite large.
While 200 is considered as a separate GPU unit, the 130 is integrated into the CPU I believe.
While legend and newer uses KGSL for rendering triangles, we unfortunately still use hw3d. I believe this is due the GPU/integrated differences.
Maybe it is of any help...
Should this improve the gfx performance on our Heros?
Ooh it got moved! Thanks!
I think it may speed up a little but now im thinking the drivers will have to be made,
dont think it'll be easy...
Ill search through other Adreno 130 device rom's to see if i can find one that already uses them
...EDIT...
Adreno 200
A quantum leap in graphics quality from the OpenGL-Es 1.x, the Adreno 200 GPU has a unified shader architecture that makes maximum use of its graphics processing power. Developers can use this GPU to implement high-end effects that were previously impossible.
Dont think it will be possible after looking on the qdevnet site
bonesy after reading your thread I thought I would check this out a little and stumbled upon a thread over at simply android. looks like some devs working on the moto cliq had the same idea as you and they have been trying to contact qualcomm about this, doesn't look too promising at the moment but they are trying so maybe something will come out of it.
http://www.simply-android.com/discussion/833/mod-opengl-es-1.1-for-motorola-cliq/p9
Thanks for that, i will keep an eye there i managed to currupt my HD last night so it may take me a while to get back all the stuff..Hopefully they will have has a response by then!

[ROM][28 August] Virtuous Infinity 1.35.0 Is Out! [FULL Sense 4+Working Camera!]

Note: I am not a developer. I am merely informing the community about this rom. I take no credit for this rom. All credits for this rom go to the Virtuous Team for such an amazing rom I will post updates as the rom gets updated
Click to expand...
Click to collapse
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Virtuous Infinity
We are pleased to announce the first release of Virtuous Infinity.This ROM is the first ever which brings the full Sense 4 experience to your favorite WVGA device.Thanks to great effort of our M10 team (including Cypis, Diamondback and Flemmard) we finally cracked the new m10 format to bring you the lastest HTC software!It is based on the 1.11.401.110 release RUU of VilleC2. We would like to give special thanks to Football for the RUU.This build currently is a X-Series release, however, it is suitable for use as a daily driver if you can live with a few minor bugs.We hope to have the ROM feature complete as soon possible. Check bellow for a full list of what is working and what is not.
Primo is the result of a collaborative, team effort by the following developers:
Flemmard
Diamondback
rmk
chrisch
mdj
seo
eViL_Dee
cypis
cjward
tbalden
Features
Based on the VilleC2 ROM (1.11.401.110).
"Full" Sense 4 resized for WVGA resolution
Tweaks app build with latest HTC SDK 15
Fully Deodexed
Ported for almost full functionality on all of supported devices
Heavily optimized for fluid performance and usability.
Market-sourced applications (Gmail, Maps, Voice, etc) automatically installed on first boot into /data/app for easy removal.
Bloatware and unnecessary applications removed.
Working
Camera
HW Acceleration
WiFi
Bluetooth
Mobile Data, SMS, MMS & Voice Calls
GPS
Sensors
Audio
USB Storgage (No 3rd Party App Required)
FM Radio
Not Working
Rosie: Folder isn't perfectly resized in landscape
Rosie: Mail widget is force closing
Weather: Weather animation in landscape mode broken
Weather :Full screen weather animation broken
Camera: Not all effects are working
You tell us
Screenshots:
Devices Supported:
Desire Z / G2
Desire HD
Inspire 4G
My Touch 4G
Desire S
Incredible S
My Touch 4G Slide
Incredible 2
Credits and Acknowledgements
Virtuous Team - For an amazing rom
Bangincrazy – For testing on MT4G
lowveld – For pointing us in the right direction to fix WiFi
Football – For the RUU
xvicdice – For music playback fix
Download Link:Bug Tracker​
Since you made a link here I'll go ahead and attach some stuff.
Wifi, Data, Music Player working.
Camera works rather nicely in both default app and third party apps (instagram etc)
Attached are some screen shot with the default camera app, actually doing special effects smoothly in live preview.
It's a bit slow, especially if you're multitasking, but I'm impressed with how far they got with the camera.
When initially setting up, the setup stage can seem painfully slow (i.e.: on screen keyboard taking a sec or two to register a key, or the next/confirm dialog taking just as long).
Also wake by trackpad doesn't work even though the option is there.
The power menu requires a longer than normal long-press to activate (noticed this when getting the screenshots).
Also Infinity appears to install some apps to the SD Card via it's own custom folder (screen shot also attached).
by the way in terms of 'not all effects', I haven't come across a single effect on the list of effects that didn't seem to crash (maybe not rendered, but didn't die either).
I've switched back to EliteMod in the meantime (normal working hours have approached), I haven't had much time to test extensively how multitasking behaves (i.e.: Facebook, twitter, etc) or any graphical type of games etc.
The free ram at just bout any time is around 10MB, and uptime showing loads around 5.0 on average. The launcher can lag a bit on redraw even if you got the device clocked to 1400mhz (I believe it's more a ram issue than anything, so between supercharger V6 and swap, it might be bearable.)
---------- Post added at 08:07 AM ---------- Previous post was at 08:05 AM ----------
Oh also adb connectivity is somewhat glitchy. Devices never showed up during the initial boot, and had to mess with the power menu a couple of times (between charge only, HTC sync, and disk) to get it to show up and be able to do stuff with adb shell. Switching between various USB modes tends to be laggy.
Though one nice thing about the preview is that I did not receive a single force close or crash, just lags, and some functionality not occurring at all (i.e.: trackpad wake, FM radio).
Desire HD (ace), Desire Z (vision), Inspire 4G bugs
When phone goes into sleep you need to make a long press of the power button to wake it up
Mic doesn't work in some apps like Voice Search, Soundhound, ...
Camera isn't working on some phones
Camcorder only works with disabling sound in the video settings
I have a funny feeling it's going to turn into a bit of a 'can you port Sense Camera to XXX ICS Rom?', when it was the other way around.
FM Radio appears to be broken on both the included FM app, and the FM Radio Widget.
Though fine with SpiritFM Free Edition (which of course requests root permission).
Also the stock FM Radio app, seems to never turn off, it's always "Turning Off", and when the dialog does go away, it's still "On" (showing the icon in the status bar)
How's video recording, 720p?
The above mention of 10MB of free RAM is scaring me away from trying it though. Hell with CM7 as soon as it hits 70MB's, I feel like its lagging too much.
Tried some games with this, with supercharger, swap and 1.4ghz o/c:
Temple Run: Without swap it closes immediately, with swap its getting huge lags while playing, but when theres no lags its smoother then previous kernels.
Death Rally: Smooth as s..t.
Helicopter 3D: Smooth as f..k.
these games rather heavy considering their 3d natures. so its a good thing that this rom can run them smoothly.
generally speaking, if you make this your dd, it will drive you crazy time to time because the interface is slower then most of the roms out there. hope it will get better tho.
edit: with swap and supercharge i get 100-120 mb free ram ( at least it shows that way on the task manager)
boost3d23 said:
How's video recording, 720p?
The above mention of 10MB of free RAM is scaring me away from trying it though. Hell with CM7 as soon as it hits 70MB's, I feel like its lagging too much.
Click to expand...
Click to collapse
I find this pretty common of just about every ICS rom though (mostly cached it would seem). i.e.: free ram is wasted ram.
I'll try out the video soon as TiB does some app restores (I kind of doubt it's full 720, but maybe it'll surprise me).
---------- Post added at 10:15 AM ---------- Previous post was at 10:13 AM ----------
By the way home screen lag ain't so bad once you replace HTC Sense with the Apex Launcher (though I guess some people want the whole experience )
---------- Post added at 10:24 AM ---------- Previous post was at 10:15 AM ----------
720p is Selectable (though 1080p is also shown, obviously won't record at that though), however when you finish recording and had audio turned on, it's the forever-saving-video issue.
With audio off... did saving video for a while, and then force closed, and also a very funky buffer issue (like the screen split in half and scrolled up while recording.
The result from both are files with thumbnails with exclamation marks.
Now if I set the Video quality to 800x480 Wide (default), and audio off, it saves fine.
I respect your work.I'm about to try.
Can't even get it working it lag badly after the setup and hot reboot more than 6 times =\ anyway,good job to them as they get the camera working make me looking forward for updates XD
Sent from my Desire Z using xda app-developers app
Steven How said:
Can't even get it working it lag badly after the setup and hot reboot more than 6 times =\
Sent from my Desire Z using xda app-developers app
Click to expand...
Click to collapse
Would help if your hboot/radio/etc info was in your signature
kbeezie said:
Would help if your hboot/radio/etc info was in your signature
Click to expand...
Click to collapse
Ah...I forget abt radio and all those... does it effect the performance? And I'm using a Italian dz not g2
Sent from my Desire Z using xda app-developers app
Steven How said:
Ah...I forget abt radio and all those... does it effect the performance? And I'm using a Italian dz not g2
Sent from my Desire Z using xda app-developers app
Click to expand...
Click to collapse
As long as it's a DZ hboot it should be fine (i.e.: because the G2 hboot only has a ~400MB /system which is way too small, as this preview takes up about 96% of /system on DZ hboot).
Also depending on what rom you're coming from (i.e.: /system, etc may still be formatted as ext3 instead of ext4).
And far as radio... I don't know if this requires 26.13.04.19 or equivalent.
I guess if you can attempt a logcat output, might be helpful to someone who knows how to read those things.
kbeezie said:
As long as it's a DZ hboot it should be fine (i.e.: because the G2 hboot only has a ~400MB /system which is way too small, as this preview takes up about 96% of /system on DZ hboot).
Also depending on what rom you're coming from (i.e.: /system, etc may still be formatted as ext3 instead of ext4).
And far as radio... I don't know if this requires 26.13.04.19 or equivalent.
I guess if you can attempt a logcat output, might be helpful to someone who knows how to read those things.
Click to expand...
Click to collapse
I'm using 4ext recovery and I only left 20mb in my system space..I have restore back to ARHD 6.3.3.. until infinity become more rock stable perhaps? hope so
Sent from my Desire Z using xda app-developers app
Steven How said:
I'm using 4ext recovery and I only left 20mb in my system space..I have restore back to ARHD 6.3.3.. until infinity become more rock stable perhaps? hope so
Sent from my Desire Z using xda app-developers app
Click to expand...
Click to collapse
Hence why it NEEDs the DZ hboot
it is an alpha/preview
I enabled swap with this script http://dl.dropbox.com/u/1169731/swap_enabler.sh (ie: pop it on /data/local/tmp, chmod 775 , run it, reboot). So will see how SD-swap helps it.
I would remove some unesacary apps from the Rom to free up space
Sent from my HTC Sensation 4G using xda premium
I DO know how to enable swap lol, but it still lag badly.. after opening an app it hang there and finally reboot...lol I understand it's an alpha build so I'm not that demanding for the best performance for now
Sent from my Desire Z using xda app-developers app
evilcuber said:
I would remove some unesacary apps from the Rom to free up space
Sent from my HTC Sensation 4G using xda premium
Click to expand...
Click to collapse
Seems kind of pointless since the /system partition isn't normally going to change after installation. So removing those apps from /system doesn't really give you much benefits in 'freeing up space'. If it were on /data/app that'd be a different story, but it's pretty light in that department upon start.
Now you *could* disable some system apps (if it won't break anything) to improve some degree of performance, but then again what would be the point of testing/previewing if you didn't take it as is.
---------- Post added at 11:26 AM ---------- Previous post was at 11:15 AM ----------
So with 128MB swap on, overall it does seem smoother. However for any *new* item, there can be occasional freezes for a few seconds, in which time I'll notice the swap usage (via adb shell) will jump 20-30MB at a time, eventually once the phone has unfrozen it'll be quite smooth after that. In the last 3 freezes I've jumped from about 30MB to 60MB to 96MB.
Right now it's down to 87MB after about a minute since the last freeze (added a power widget to the desktop, taped the brightness, froze for about 15-20 seconds, changed the brightness, was smooth after that).
Also I'm not using the launcher that came with it, but rather Apex Pro and fancy widgets.
current memory usage, uptime and top:
Code:
[email protected]:/ # free
total used free shared buffers
Mem: 370420 360300 10120 0 600
-/+ buffers: 359700 10720
Swap: 131580 88232 43348
[email protected]:/ # uptime
15:25:04 up 34 min, load average: 2.69, 3.22, 3.40
Code:
Mem: 360772K used, 9648K free, 0K shrd, 1020K buff, 57144K cached
CPU0: 5.7% usr 5.7% sys 0.0% nic 88.4% idle 0.0% io 0.0% irq 0.0% sirq
Load average: 2.18 2.93 3.29 2/680 8348
PID PPID USER STAT VSZ %MEM CPU %CPU COMMAND
316 104 1000 S 425m117.2 0 2.3 com.android.systemui
209 104 1000 S 403m111.3 0 1.1 system_server
7173 104 10148 S 378m104.5 0 0.0 com.facebook.katana
421 104 10165 S 373m103.0 0 0.0 com.anddoes.launcher
467 104 10141 S 372m102.7 0 0.0 com.htc.idlescreen.shortcut
513 104 10018 S 351m 97.0 0 0.0 android.process.acore
3783 104 10017 S 334m 92.2 0 1.1 com.google.process.gapps
501 104 1001 S 329m 91.0 0 2.3 com.android.phone
760 104 9999 S 322m 89.0 0 0.0 com.htc.launcher
7847 104 1000 S 313m 86.4 0 0.0 com.android.settings:remote
1323 104 10018 S 310m 85.6 0 0.0 com.android.htccontacts
482 104 10163 S 310m 85.5 0 0.0 com.touchtype.swiftkey
7394 104 10106 S 309m 85.3 0 0.0 com.android.mms
7882 104 10017 S 301m 83.0 0 0.0 com.google.android.gsf.login
8235 104 10014 S 301m 83.0 0 0.0 com.htc.calendar
8192 104 10014 S 301m 83.0 0 0.0 com.htc.bg
8163 104 9996 S 300m 82.9 0 0.0 com.htc.notes
7862 104 10153 S 300m 82.8 0 0.0 com.google.android.googlequicksear
8214 104 10146 S 300m 82.7 0 0.0 com.dropbox.android
5568 104 10162 S 298m 82.3 0 0.0 com.mhuang.overclocking.ProfilesSe
kbeezie said:
Seems kind of pointless since the /system partition isn't normally going to change after installation. So removing those apps from /system doesn't really give you much benefits in 'freeing up space'. If it were on /data/app that'd be a different story, but it's pretty light in that department upon start.
Now you *could* disable some system apps (if it won't break anything) to improve some degree of performance, but then again what would be the point of testing/previewing if you didn't take it as is.
---------- Post added at 11:26 AM ---------- Previous post was at 11:15 AM ----------
So with 128MB swap on, overall it does seem smoother. However for any *new* item, there can be occasional freezes for a few seconds, in which time I'll notice the swap usage (via adb shell) will jump 20-30MB at a time, eventually once the phone has unfrozen it'll be quite smooth after that. In the last 3 freezes I've jumped from about 30MB to 60MB to 96MB.
Right now it's down to 87MB after about a minute since the last freeze (added a power widget to the desktop, taped the brightness, froze for about 15-20 seconds, changed the brightness, was smooth after that).
Also I'm not using the launcher that came with it, but rather Apex Pro and fancy widgets.
current memory usage, uptime and top:
Code:
[email protected]:/ # free
total used free shared buffers
Mem: 370420 360300 10120 0 600
-/+ buffers: 359700 10720
Swap: 131580 88232 43348
[email protected]:/ # uptime
15:25:04 up 34 min, load average: 2.69, 3.22, 3.40
Code:
Mem: 360772K used, 9648K free, 0K shrd, 1020K buff, 57144K cached
CPU0: 5.7% usr 5.7% sys 0.0% nic 88.4% idle 0.0% io 0.0% irq 0.0% sirq
Load average: 2.18 2.93 3.29 2/680 8348
PID PPID USER STAT VSZ %MEM CPU %CPU COMMAND
316 104 1000 S 425m117.2 0 2.3 com.android.systemui
209 104 1000 S 403m111.3 0 1.1 system_server
7173 104 10148 S 378m104.5 0 0.0 com.facebook.katana
421 104 10165 S 373m103.0 0 0.0 com.anddoes.launcher
467 104 10141 S 372m102.7 0 0.0 com.htc.idlescreen.shortcut
513 104 10018 S 351m 97.0 0 0.0 android.process.acore
3783 104 10017 S 334m 92.2 0 1.1 com.google.process.gapps
501 104 1001 S 329m 91.0 0 2.3 com.android.phone
760 104 9999 S 322m 89.0 0 0.0 com.htc.launcher
7847 104 1000 S 313m 86.4 0 0.0 com.android.settings:remote
1323 104 10018 S 310m 85.6 0 0.0 com.android.htccontacts
482 104 10163 S 310m 85.5 0 0.0 com.touchtype.swiftkey
7394 104 10106 S 309m 85.3 0 0.0 com.android.mms
7882 104 10017 S 301m 83.0 0 0.0 com.google.android.gsf.login
8235 104 10014 S 301m 83.0 0 0.0 com.htc.calendar
8192 104 10014 S 301m 83.0 0 0.0 com.htc.bg
8163 104 9996 S 300m 82.9 0 0.0 com.htc.notes
7862 104 10153 S 300m 82.8 0 0.0 com.google.android.googlequicksear
8214 104 10146 S 300m 82.7 0 0.0 com.dropbox.android
5568 104 10162 S 298m 82.3 0 0.0 com.mhuang.overclocking.ProfilesSe
Click to expand...
Click to collapse
This rom didn't come with virtuous oc?
Sent from my Desire Z using xda app-developers app

[KERNEL] Bricked-Kernel Hammerhead | Sweep2wake | KnockKnock/Dt2w

Welcome to the most customizable N5 kernel on xda
Bricked-Kernel Nexus 5 (hammerhead)​
Features:
* Based upon Google's msm 3.4 source
* Various fixes, improvements and optimizatios (look @ github)
* Compiled with gcc4.7.2 toolchain (linaro 09.12)
* -O3+ optimized
* Snapdragon & CortexA15 optimizations
* replaced qcom's hotplug binary with msm_mpdecision (IN-KERNEL, better battery life + performance)
* Extensive sysfs interface for mpdecision with all the tuneables you want (/sys/kernel/msm_mpdecision/)
* replaced qcom's thermal binary with my IN-KERNEL solution. (/sys/kernel/msm_thermal/)
* export krait version to: /sys/kernel/debug/krait_variant
* Allow OC up to 2,5Ghz
* Allow UC to 96Mhz
* Undervolting (faux123)
* F2FS Support
* Multirom Support
* KCAL (savoca) & Gamma Control (faux123)
* Sound Control (faux123)
* Default clocks: 300 Mhz min & 2265,6 Mhz max
Zip features:
*** ON-THE-FLY-RAMDISK EDITS!
*** THIS KERNEL USES YOUR RAMDISK, it will just modify it on the fly while flashing. These changes are not creating any incompatibilities with roms/other kernels.
* removes min freq overrides from the ramdisk
* removes governor overrides from the ramdisk
* adds init.d support to your ramdisk (if not already supported)
* modifies stock ondemand settings
* add module insertion
Check the compare links for the rest ​
Where is tha Changelog???
There will be no more changelogs.
Instead the download pages were outfitted with compare links to github for each download.​
What is sweep2wake?
Disabled as default, activate through an app like KControl or over sysfs: echo 1 > /sys/android_touch/sweep2wake​
What is doubletap2wake / knock knock?
Disabled as default, activate through an app like KControl or over sysfs: echo 1 > /sys/android_touch/doubletap2wake​
How to install?
Flash through recovery. #done.​
How to uninstall?
Flash this:
http://bricked.de/downloads/kernel/hammerhead/bricked_uninstaller_hammerhead.zip
You are done. Bye.​
Where to complain about errors/bugs?
Please use the Issuetracker for bugs/errors/feature wishes!
Issuetracker @ https://github.com/showp1984/bricked-hammerhead/issues
[email protected]
IRC Chat: Freenode IRC #bricked​
Download:
No Guarantees! If it kills your grandmother or your device, I am NOT responsible! If you understand this:
(If you download, please hit Thanks below my post! Thank you!)
>>> DOWNLOAD <<<​
Donation Hall-of-Fame:​
> Hall of fame <
Thank you very much!​
Stock 4.4 Nexus5 boot.img - flash this if you come from another kernel coming with it's own ramdisk (eg: zip contains a *.img file) ONLY FLASH ON 4.4
Source:
​
What is msm_thermal?
Kernel based 3-phase thermal control!
This replaces your /system/bin/thermal-engine-hh binary which is renamed by the installer to thermal-engine-hh_bck.
It will throttle your cpu speed to keep it cool and unleash it if the cpu has cooled down enough. (3 phases: low, mid and high)
Check /sys/kernel/msm_thermal/conf/ for the thermal configuration
allowed_max_high = highest threshold (phase 3)
allowed_max_low = remove the throttling if we cooled down to this (clr_thrshold)
allowed_max_freq = max frequency if throttled (limit)
[...]mid[...] = same as above, just for phase 2
[...]low[...] = Lowest threshold (phase 1)
check_interval_ms = how often shall we check? (sampling rate)
shutdown_temp = if we reach this shut down the device!
If you want to see msm_thermal doing it's job:
Code:
adb shell
cat /proc/kmsg | grep 'thermal'
What is msm_mpdecision?
100% kernel based multi core decision! (should cpu1/2/3 be online or not?)
This replaces your /system/bin/mpdecision binary which is renamed by the installer to mpdecision_bck.
Check /sys/kernel/msm_mpdecision/conf/ for the configuration.
startdelay = time until mpdecision starts doing it's magic (20000)
delay = time between checks (130)
pause = if something else plugs in the cpu, fall asleep for 10000ms (10 secs)
scroff_single_core = if the screen is off, don't plug in cpu1/2/3. Additionally: Unplug all cpus except cpu0 when screen is turned off (1)
enabled = enable(1) or disable(0) mpdecision. This does not affect scroff_single_core!
min_cpus = min cpus to be online, cannot be < 1. Default: 1
max_cpus = max cpus to be online, cannot be > 4. (if you set it to 2 and min_cpus to 1 you will basically have a dualcore) Default: 4
idle_freq = a value against that will be checked if a core +/- is requested. (499200)
If cpu0 is below that value and a core up of another cpu is requested, nothing will happen.
If any other cpu is above that value and a core down of that cpu is requested, nothing will happen. (otherwise it would now put down that cpu even though it is still working, which isn't what we want)
Hot plug thresholds (aka now it gets 'complicated')
This small formula calculates which value will be used: (number_of_cpus_online - 1) * 2
The result of this formula will be the nwns_threshold where a new cpu is hotplugged.
The result of this formula + 1 will be the nwns_threshold where a cpu is unplugged.
nwns_threshold_x = runqueue threshold, if this is reached cpuX will be hot/unplugged
twts_threshold_x = time threshold, this amount of time must have passed for the related action to be taken (hot/unplug)
Example:
One cpu is online.
(1 - 1) * 2 = 0 ergo:
nwns_threshold_0 = cpu1 will be hotplugged at this value
((1 - 1) * 2) + 1 = 1
nwns_threshold_1 = cpu0 will be unplugged at this value
Since we can't unplug cpu0 this is '0'.
Two cpus are online.
(2 - 1) * 2 = 2 ergo:
nwns_threshold_2 = cpu2 will be hotplugged at this value
((2 - 1) * 2) + 1 = 3
nwns_threshold_3 = cpu1 will be unplugged at this value
etc...
Some values are:
NwNs_Threshold: 12, 0, 25, 20, 32, 28, 0, 35
TwTs_Threshold: 140, 0, 140, 190, 140, 190, 0, 190
Where the position and function of the number equals the result of the above explained formula.
(all times are in ms)
If you want to see the mpdecision magic happening:
Code:
adb shell
cat /proc/kmsg | grep 'MPDEC'
mpdecision's input event boost, aka project butter
This will boost your min cpu speed if you touch the screen or press a button and gives you full control.
In those events the min cpu freq will be risen to a predefined value (look below) on every online cpu. This boosts overall reaction times and smoothness a lot. (works similar to the qcom mpdecision binary)
Configuration files:
[email protected]:/sys/kernel/msm_mpdecision/conf # ls | grep boost
boost_enabled
boost_freqs
boost_time
All of them work like the usual sysfs files, except one special case:
boost_freqs will list all frequencies from cpu 0 to cpu x. Cpu 3 and any following cpu will share one frequency.
To change those frequencies echo the cpu number + the frequency in khz.
Example: To change the boost freq of cpu3 (and 4,5,6,7,8, etc) the echo would look as follows:
Code:
echo "3 960000" > /sys/kernel/msm_mpdecision/conf/boost_freqs
for cpu0:
Code:
echo "0 960000" > /sys/kernel/msm_mpdecision/conf/boost_freqs
Defaults:
Code:
cat /sys/kernel/msm_mpdecision/conf/boost_freqs
960000
960000
729600
576000
Why do I have no WLAN?
Due to this kernels very high optimization settings it is too big for our boot.img with WLAN included into the kernel, so it is built as a module. That means it needs to be inserted into the kernel upon boot up, which needs to be automated for maximum comfort.
The zip adds module insertion to your ramdisk, if that fails for some reason the wlan module cannot be inserted.
if
Code:
adb shell lsmod
doesn't show this:
Code:
tun 14701 0 - Live 0x00000000
cifs 275399 0 - Live 0x00000000
bcmdhd 2964650 0 - Live 0x00000000 (C)
Then something went horribly wrong.
Chances are that I broke it and this should never happen.
One post in the issue tracker will probably fix it with the next release
You can restore wlan for your current bootup by executing:
Code:
adb shell
su
insmod /system/lib/modules/bcmdhd.ko
Is there an app available to customize this pure bodacious and awesome kernel?
Yes there is: KControl. It's in the Google Playstore.
​
A few benchmark results:
Vellamo Metal:
http://vellamo2.quicinc.com/api/v2/app/plot/Metal/submission/PEE3B604B-8C49-69F5-001E-6BCA76DF491D
(usually ranges from 11xx-12xx. Depending on system background load, thermal status, air pressure, weather, world hunger, etc...)
Antutu:
https://plus.google.com/u/0/108262968419038009038/posts/VJbxpMoFJPN
(usually ranges from 28.xxx - 30.xxx. Depending on system background load, thermal status, air pressure, weather, world hunger, etc...)
3DMark Icestorm unlimited: (the others are maxed out)
https://plus.google.com/u/0/108262968419038009038/posts/N24t9ssoBcL
(17xxx)
FIRST! o yes!!! mwhahahah!! and so it begins
Finally a Bricked thread! :victory: No more F5 spamming the kernel website
Good stuff, you've finally joined the party.
Sent from my Nexus 5 using Tapatalk
Woot! first page!
+1
10 char
Ngo93 said:
Finally a Bricked thread! :victory: No more F5 spamming the kernel website
Click to expand...
Click to collapse
If you are familiar with rss, all kernel download pages have a little rss symbol, if you click it you get here:
http://bricked.de/kernelrss.php?action=krss&device=hammerhead&release=stable&type=aosp
Just something to consider instead of spamming F5
unforgivenmercy said:
Good stuff, you've finally joined the party.
Click to expand...
Click to collapse
If you take a look at the dates on my homepage you might notice that the party ended about 2 days ago. The after party on the other hand starts now!
faux123 said:
Woot! first page!
Click to expand...
Click to collapse
Indeed! Well the thread isn't that old yet
OBI ONE is here aweseome !!! Always a pleasure to hang around in ur threads
n3ocort3x said:
OBI ONE is here aweseome !!! Always a pleasure to hang around in ur threads
Click to expand...
Click to collapse
left something on github for you
I saw, many thanks for that, but i think i have to ask u a bit about this, already in bed now, but tomorrow is another day 5star and subscribed as always
show-p1984 said:
left something on github for you
Click to expand...
Click to collapse
In the op it just says to install. So no wiping of cache or D cache correct? Sorry just re assuring
Sent from my Nexus 5 using Tapatalk
Wiping cache is redundant and you don't have to do it with kernels.
Sent from my Nexus 5 using Tapatalk
Carbajal3009 said:
In the op it just says to install. So no wiping of cache or D cache correct? Sorry just re assuring
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
The zip does it for you.
However, if it gives you a warm and fuzzy feeling you are free to do it again (so twice then ^^).
Wow, finally it is here. Flashing now.
Has anyone actually demonstrated (scientifically or otherwise) anything wrong with the qcom mpdecision binary? Im not taking anything away from kernel developers who write their own mpdecision (especially those who also provides sources), but I am curious as to whether they are actually better than those provided by qcom. Surely they know more about the capabilities of their own cpus better than anyone no?
jazzor said:
Has anyone actually demonstrated (scientifically or otherwise) anything wrong with the qcom mpdecision binary? Im not taking anything away from kernel developers who write their own mpdecision (especially those who also provides sources), but I am curious as to whether they are actually better than those provided by qcom. Surely they know more about the capabilities of their own cpus better than anyone no?
Click to expand...
Click to collapse
A fair question, I imagine there is something sacrificed using either or.
Sent from my Nexus 5 using XDA Premium 4 mobile app
jazzor said:
Has anyone actually demonstrated (scientifically or otherwise) anything wrong with the qcom mpdecision binary? Im not taking anything away from kernel developers who write their own mpdecision (especially those who also provides sources), but I am curious as to whether they are actually better than those provided by qcom. Surely they know more about the capabilities of their own cpus better than anyone no?
Click to expand...
Click to collapse
It's not that complicated (there is no black voodoo magic), that's why bricked kernel was the first to introduce this feature back on the pyramid.
CPUs need to be plugged in / unplugged based on load, there is nothing more qcom can know that we can't also see inside of the kernel.
There is one HUGE thing that is wrong with qcom's mpdecision: It's closed. It's a black box. We don't have any idea what is going on in there. Literally, none. It's not even configurable. It could contain secret nsa code, or send dirty sms to your girlfriend (who might actually enjoy that, idk...)
If we would have source, hell, awesome. I wouldn't have spent over a year (first commit: Date: Thu, 21 Jun 2012 06:06:47 +0200, see here) to get my msm_mpdecision solution to the point where it is a) awesome and b) a lot better than the binary. It can be configured in any way you might need to. It features statistics on how often and how long a cpu is hotplugged. It has the input event boost. It's the full package deal.
If you compare my kernel with the stock kernel you will see huge performance improvements and battery savings on bricked. Those are not only because of my msm_mpdecision but certainly related. Furthermore: we can completely customize it, over sysfs, on a running kernel, without reflashing.
That's what I would have expected from qcom in the first place.
Another thing wrong with qcom's binary: It's static. Meaning: If you change your min freq on stock it will always reset back to defaults. Same with their thermal binary. That's just annoying.
msm_mpdecision will notice it if you change your min frequency and dynamically work with that from there on. It will also prevent hotplug wars between apps and it: eg: an app plugs in cpus to grab some cpu data (like frequencies, etc. That is only available if the cpu is plugged in). Qcom's mpdecision would now raise hell to keep that cpu unplugged, my msm_mpdecision just sits back and chills for 10 seconds to avoid those wars. (again, even that delay is fully configurable)
There are also a bunch of boring advantages as to why it is better to let something crucial to the system run in kernel space and not in user space, but that would most certainly explode the context of this thread by the factor of 4.
My solution is not inferior to that binary in any way, in fact it has been vastly superior in my testing up until now, otherwise I would a) improve it or b) ditch it. I don't keep around bad stuff just for the point of having it or because I wrote it. If it sucks I will say that and act accordingly.
Thanks for the very informative post. I suppose there are advantages in avoiding qcom's mpdecision. Though i'd like to point out that the Android framework (msm power HAL) does use some of the interfaces provided by the binary (see hardware/qcom/power/). With the nexus 4, this will spam a lot of stuff to logcat if you are missing this interface, not sure if this is the same with the nexus 5, but judging by the sources it seems it will. Maybe you could provide some notification about this side effect.
Similarly, this could apply to the thermal side of things as well.

Categories

Resources