5,593,650 Members 39,604 Now Online
XDA Developers Android and Mobile Development Forum

@OMNI-DEVS: VM-Settings

Tip us?
 
lagloose
Old
#1  
lagloose's Avatar
Senior Member - OP
Thanks Meter 2908
Posts: 682
Join Date: Feb 2008

 
DONATE TO ME
Default @OMNI-DEVS: VM-Settings

in my build for crespo (Nexus S) it is not possible to change VM-Settings in Power menu, due to permission problems. Here's part of logcat while trying to change 'swappiness'

D/dalvikvm( 437): GC_EXPLICIT freed 1558K, 15% free 10394K/12176K, paused 6ms+8ms, total 106ms
D/dalvikvm( 2218): GC_CONCURRENT freed 413K, 15% free 3081K/3592K, paused 2ms+2ms, total 22ms
D/dalvikvm( 967): GC_CONCURRENT freed 505K, 14% free 3747K/4320K, paused 3ms+3ms, total 53ms
D/dalvikvm( 967): WAIT_FOR_CONCURRENT_GC blocked 27ms
E/PerformanceControl( 2676): Error writing to /proc/sys/vm/swappiness. Exception:
E/PerformanceControl( 2676): java.io.FileNotFoundException: /proc/sys/vm/swappiness: open failed: EACCES (Permission denied)
E/PerformanceControl( 2676): at libcore.io.IoBridge.open(IoBridge.java:409)
E/PerformanceControl( 2676): at java.io.FileOutputStream.<init>(FileOutputStream.j ava:88)
E/PerformanceControl( 2676): at java.io.FileOutputStream.<init>(FileOutputStream.j ava:73)
E/PerformanceControl( 2676): at java.io.FileWriter.<init>(FileWriter.java:80)
E/PerformanceControl( 2676): at com.brewcrewfoo.performance.util.Helpers.writeOneL ine(Helpers.java:198)
E/PerformanceControl( 2676): at com.brewcrewfoo.performance.fragments.VM$4.onClick (VM.java:297)
E/PerformanceControl( 2676): at com.android.internal.app.AlertController$ButtonHan dler.handleMessage(AlertController.java:166)
E/PerformanceControl( 2676): at android.os.Handler.dispatchMessage(Handler.java:10 2)
E/PerformanceControl( 2676): at android.os.Looper.loop(Looper.java:136)
E/PerformanceControl( 2676): at android.app.ActivityThread.main(ActivityThread.jav a:5017)
E/PerformanceControl( 2676): at java.lang.reflect.Method.invokeNative(Native Method)
E/PerformanceControl( 2676): at java.lang.reflect.Method.invoke(Method.java:515)
E/PerformanceControl( 2676): at com.android.internal.os.ZygoteInit$MethodAndArgsCa ller.run(ZygoteInit.java:779)
E/PerformanceControl( 2676): at com.android.internal.os.ZygoteInit.main(ZygoteInit .java:595)
E/PerformanceControl( 2676): at dalvik.system.NativeStart.main(Native Method)
E/PerformanceControl( 2676): Caused by: libcore.io.ErrnoException: open failed: EACCES (Permission denied)
E/PerformanceControl( 2676): at libcore.io.Posix.open(Native Method)
E/PerformanceControl( 2676): at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110 )
E/PerformanceControl( 2676): at libcore.io.IoBridge.open(IoBridge.java:393)
E/PerformanceControl( 2676): ... 14 more
D/dalvikvm( 2218): GC_CONCURRENT freed 413K, 15% free 3081K/3596K, paused 3ms+1ms, total 22ms
D/dalvikvm( 967): GC_CONCURRENT freed 524K, 14% free 3732K/4324K, paused 9ms+3ms, total 32ms
D/dalvikvm( 967): WAIT_FOR_CONCURRENT_GC blocked 21ms
D/BluetoothAdapter( 2676): 1100192384: getState() : mService = null. Returning STATE_OFF

Is this a known bug in all releases or did i miss something ?

Greetz
like my work ? Press Thanks button.
 
khalldeveloper
Old
#2  
Junior Member
Thanks Meter 5
Posts: 25
Join Date: Oct 2013
Quote:
Originally Posted by lagloose View Post
in my build for crespo (Nexus S) it is not possible to change VM-Settings in Power menu, due to permission problems. Here's part of logcat while trying to change 'swappiness'

D/dalvikvm( 437): GC_EXPLICIT freed 1558K, 15% free 10394K/12176K, paused 6ms+8ms, total 106ms
D/dalvikvm( 2218): GC_CONCURRENT freed 413K, 15% free 3081K/3592K, paused 2ms+2ms, total 22ms
D/dalvikvm( 967): GC_CONCURRENT freed 505K, 14% free 3747K/4320K, paused 3ms+3ms, total 53ms
D/dalvikvm( 967): WAIT_FOR_CONCURRENT_GC blocked 27ms
E/PerformanceControl( 2676): Error writing to /proc/sys/vm/swappiness. Exception:
E/PerformanceControl( 2676): java.io.FileNotFoundException: /proc/sys/vm/swappiness: open failed: EACCES (Permission denied)
E/PerformanceControl( 2676): at libcore.io.IoBridge.open(IoBridge.java:409)
E/PerformanceControl( 2676): at java.io.FileOutputStream.<init>(FileOutputStream.j ava:88)
E/PerformanceControl( 2676): at java.io.FileOutputStream.<init>(FileOutputStream.j ava:73)
E/PerformanceControl( 2676): at java.io.FileWriter.<init>(FileWriter.java:80)
E/PerformanceControl( 2676): at com.brewcrewfoo.performance.util.Helpers.writeOneL ine(Helpers.java:198)
E/PerformanceControl( 2676): at com.brewcrewfoo.performance.fragments.VM$4.onClick (VM.java:297)
E/PerformanceControl( 2676): at com.android.internal.app.AlertController$ButtonHan dler.handleMessage(AlertController.java:166)
E/PerformanceControl( 2676): at android.os.Handler.dispatchMessage(Handler.java:10 2)
E/PerformanceControl( 2676): at android.os.Looper.loop(Looper.java:136)
E/PerformanceControl( 2676): at android.app.ActivityThread.main(ActivityThread.jav a:5017)
E/PerformanceControl( 2676): at java.lang.reflect.Method.invokeNative(Native Method)
E/PerformanceControl( 2676): at java.lang.reflect.Method.invoke(Method.java:515)
E/PerformanceControl( 2676): at com.android.internal.os.ZygoteInit$MethodAndArgsCa ller.run(ZygoteInit.java:779)
E/PerformanceControl( 2676): at com.android.internal.os.ZygoteInit.main(ZygoteInit .java:595)
E/PerformanceControl( 2676): at dalvik.system.NativeStart.main(Native Method)
E/PerformanceControl( 2676): Caused by: libcore.io.ErrnoException: open failed: EACCES (Permission denied)
E/PerformanceControl( 2676): at libcore.io.Posix.open(Native Method)
E/PerformanceControl( 2676): at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110 )
E/PerformanceControl( 2676): at libcore.io.IoBridge.open(IoBridge.java:393)
E/PerformanceControl( 2676): ... 14 more
D/dalvikvm( 2218): GC_CONCURRENT freed 413K, 15% free 3081K/3596K, paused 3ms+1ms, total 22ms
D/dalvikvm( 967): GC_CONCURRENT freed 524K, 14% free 3732K/4324K, paused 9ms+3ms, total 32ms
D/dalvikvm( 967): WAIT_FOR_CONCURRENT_GC blocked 21ms
D/BluetoothAdapter( 2676): 1100192384: getState() : mService = null. Returning STATE_OFF

Is this a known bug in all releases or did i miss something ?

Greetz
good work
 
Entropy512
Old
#3  
Senior Recognized Developer
Thanks Meter 23382
Posts: 12,770
Join Date: Aug 2007
Location: Owego, NY

 
DONATE TO ME
Hmm, probably a bug. Probably need to change the perms of that file in the init scripts.
*so much sig updating needed*

My Github profile - Some Android stuff, some AVR stuff

An excellent post on "noobs vs. developers"

A few opinions on kernel development "good practices"

Note: I have chosen not to use XDA's "friends" feature - I will reject all incoming "friend" requests.

Code:
<MikeyMike01> Smali is a spawn of hell
<shoman94> ^^^ +!
Code:
<Entropy512> gotta be careful not to step on each other's work.  :)
<Bumble-Bee> thats true
<jerdog> compeete for donations
 
lagloose
Old
#4  
lagloose's Avatar
Senior Member - OP
Thanks Meter 2908
Posts: 682
Join Date: Feb 2008

 
DONATE TO ME
Quote:
Originally Posted by Entropy512 View Post
Hmm, probably a bug. Probably need to change the perms of that file in the init scripts.
... one possible solution, the other one would be to change the way the values are written. See: ...packages/apps/PerformanceControl/src/com/brewcrewfoo/performance/fragments/VM.java, around line 300:

Code:
...
                if (Helpers.isSystemApp(getActivity())) {
                    Helpers.writeOneLine(path, Integer.toString(newProgress));
                } else {
                    new CMDProcessor().su.runWaitFor(
                            "busybox echo " + newProgress + " > " + path);
                }
...
perhaps change this, so that values are always written by "busybox echo ".

greetz
like my work ? Press Thanks button.
 
Entropy512
Old
#5  
Senior Recognized Developer
Thanks Meter 23382
Posts: 12,770
Join Date: Aug 2007
Location: Owego, NY

 
DONATE TO ME
Quote:
Originally Posted by lagloose View Post
... one possible solution, the other one would be to change the way the values are written. See: ...packages/apps/PerformanceControl/src/com/brewcrewfoo/performance/fragments/VM.java, around line 300:

Code:
...
                if (Helpers.isSystemApp(getActivity())) {
                    Helpers.writeOneLine(path, Integer.toString(newProgress));
                } else {
                    new CMDProcessor().su.runWaitFor(
                            "busybox echo " + newProgress + " > " + path);
                }
...
perhaps change this, so that values are always written by "busybox echo ".

greetz
Honestly since our PC will always be a system app, we should be removing all of those isSystemApp checks
*so much sig updating needed*

My Github profile - Some Android stuff, some AVR stuff

An excellent post on "noobs vs. developers"

A few opinions on kernel development "good practices"

Note: I have chosen not to use XDA's "friends" feature - I will reject all incoming "friend" requests.

Code:
<MikeyMike01> Smali is a spawn of hell
<shoman94> ^^^ +!
Code:
<Entropy512> gotta be careful not to step on each other's work.  :)
<Bumble-Bee> thats true
<jerdog> compeete for donations
 
lagloose
Old
#6  
lagloose's Avatar
Senior Member - OP
Thanks Meter 2908
Posts: 682
Join Date: Feb 2008

 
DONATE TO ME
Quote:
Originally Posted by Entropy512 View Post
Honestly since our PC will always be a system app, we should be removing all of those isSystemApp checks
Ok, perfect.
additionally you should check if values stay resident after reboot. As far as i remember not all values do this.

Greetz
like my work ? Press Thanks button.
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

Windows Phone 8.1 Developer Preview Now Available!

About two weeks ago at the BUILD conference in San Francisco, Microsoft unveiled Windows … more

Prevent Unwanted Butt Dialing with Smart Pocket Guard

You may recall that back in August of last year, we took a look atAir SwiperbyXDA … more

Google ATAP Details Project Ara in Developers’ Conference

Earlier today, the Google ATAP teamkicked offits first ever Project Ara … more