[Q] CM11 HWA Settings FC

Search This thread

madmuffin

Member
Jun 11, 2014
7
4
Kassel (Germany)
Hi xda,

I've been reading the defy section for quite a while now, and love whats happening to the Defy! Thanks to everyone involved.

I have a problem with the HWA Settings, whenever I open them and whatever I do (scroll or uncheck an app), I get a forced closed notification. I am really running low on RAM and would love to disable HWA for a couple of apps, but am unable to do so.

Has anyone experienced a similar behaviour in the past and can recommend a procedure?

I am currently on 20140610, same problem occured to me with 20140518.

Thanks for all hints. If this is a yet unknown behaviour, I'll see if I can get any useful logs.

Cheers
 
  • Like
Reactions: gbossley

x53

Senior Member
May 8, 2013
126
90
Have you done a clean install means wiped data, cache and dalvik before install the new ROM? Because of I dont have such problems with the newest CM11 ROMs. At the other hand you could try to disable hwa for some apps with the terminal app. I can remember vaguely such a command exists but I dont know the precise writing anymore, sorry. Maybe someone with more profound knowledge can help you out.
 

madmuffin

Member
Jun 11, 2014
7
4
Kassel (Germany)
Thank you for the hint.

Just in case anyone else is facing this issue and looking for a manual workaround, just create empty files inside /data/local/hwui.deny/ and fix the permissions (likely chown system:system and chmod 600).

e.g.

Code:
cd /data/local/hwui.deny/
touch com.android.browser
chmod 600 *
chown system:system *

My system has beed dirty flashed ever since I started using CM 10.2, I actually do not want to try a clean install now, for this minor issue.

The error that I see in logcat is:
Code:
D/AndroidRuntime( 8960): Shutting down VM
W/dalvikvm( 8960): threadid=1: thread exiting with uncaught exception (group=0x415a4ce0)
E/AndroidRuntime( 8960): FATAL EXCEPTION: main
E/AndroidRuntime( 8960): Process: com.cyanogenmod.settings.device.hwa, PID: 8960
E/AndroidRuntime( 8960): java.lang.ClassCastException: android.text.SpannableString cannot be cast to java.lang.String
E/AndroidRuntime( 8960): 	at com.cyanogenmod.settings.device.hwa.PackageListFragment.onItemClick(PackageListFragment.java:191)
E/AndroidRuntime( 8960): 	at android.widget.AdapterView.performItemClick(AdapterView.java:298)
E/AndroidRuntime( 8960): 	at android.widget.AbsListView.performItemClick(AbsListView.java:1113)
E/AndroidRuntime( 8960): 	at android.widget.AbsListView$PerformClick.run(AbsListView.java:2911)
E/AndroidRuntime( 8960): 	at android.widget.AbsListView$3.run(AbsListView.java:3645)
E/AndroidRuntime( 8960): 	at android.os.Handler.handleCallback(Handler.java:733)
E/AndroidRuntime( 8960): 	at android.os.Handler.dispatchMessage(Handler.java:95)
E/AndroidRuntime( 8960): 	at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime( 8960): 	at android.app.ActivityThread.main(ActivityThread.java:5161)
E/AndroidRuntime( 8960): 	at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 8960): 	at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 8960): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
E/AndroidRuntime( 8960): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:611)
E/AndroidRuntime( 8960): 	at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 1618):   Force finishing activity com.cyanogenmod.settings.device.hwa/.HwaSettingsActivity
W/ActivityManager( 1618): Activity pause timeout for ActivityRecord{41fdfdc0 u0 com.cyanogenmod.settings.device.hwa/.HwaSettingsActivity t12 f}
I/Timeline( 1893): Timeline: Activity_idle id: android.os.BinderProxy@41863fd0 time:3048164
I/Timeline( 1618): Timeline: Activity_windows_visible id: ActivityRecord{4220a3d0 u0 com.teslacoilsw.launcher/com.android.launcher2.Launcher t1} time:3048618
I/Process ( 8960): Sending signal. PID: 8960 SIG: 9
I/ActivityManager( 1618): Process com.cyanogenmod.settings.device.hwa (pid 8960) has died.
I/WindowState( 1618): WIN DEATH: Window{421c25b0 u0 com.cyanogenmod.settings.device.hwa/com.cyanogenmod.settings.device.hwa.HwaSettingsActivity}

If it is just me, I'll leave it for now, if the problem arises for other users aswell, I'll try to find the upstream code and and hunt the issue down.
 
  • Like
Reactions: gbossley

gbossley

Senior Member
Jan 8, 2013
205
75
HWA Stopped Working

I've tried all sorts of things here.

I note that the folder hwui.deny to which madmuffin refers has no files at all.

I've deleted associated HWA Settings data via app settings.

This error persists in spite of my flashing a new ROM update today.:silly:
 

madmuffin

Member
Jun 11, 2014
7
4
Kassel (Germany)
@gbossley The folder was empty on my side as well.

Since I manually created these files I havent used HWA Settings, but when I wanted to show the problem to a friend this weekend, HWA Settings worked flawless.
 

madmuffin

Member
Jun 11, 2014
7
4
Kassel (Germany)
Could I trouble you for a file please - exactly as you've loaded into the folder? I'll PM you.

The files are completely empty. If you use a Unix-like O/S like Linux, you can use the touch command on the prompt. Or you can just create an empty textfile using any method you like.

I did not upload the files from anywhere, I created them on the device.

Side note: I believe that it doesn't even matter. They might as well contain something. I believe the system only reads the list of files from that folder and processes that list. It won't check the contents or open the files.
 
Last edited:
  • Like
Reactions: gbossley

gbossley

Senior Member
Jan 8, 2013
205
75
Progress!

Thanks to Madmuffin, and a bit of tenacity (?), I see progress.

When looking at HWA Settings, under each app the file name to be managed is shown.

EG. for Aero Control, the file name will be com.aero.control

For ASR (a voice-recorder app) the file name is com.nll.asr

I used ROM Toolbox because with it you can use ROM Browser, navigate to the folder /data/local/hwui.deny/ and press New to create a new blank file with the appropriate names (as for Aero Control or ASR examples above).

So I created three blank files for three of the apps that I want to turn acceleration off for.

Now HWA shows those three files as deselected! However, it still stops working after either trying to turn them back on or turn others off.

So it looks as though I need to create a new blank file for every app that I want to turn off acceleration for.

My only question is "if the app is deselected per the above process, is acceleration actually turned off?" How could I test?
 

gbossley

Senior Member
Jan 8, 2013
205
75
As Advised by Madmuffin, HWA Settings has started working! I'd love to know what logic goes on there...
 

gbossley

Senior Member
Jan 8, 2013
205
75
HWA Not Working (Again)

I upgraded my ROM - TO Quarx CM11 (0607). HWA now not working again.

The HWUI.Deny folder has a heap of blank files in it.

Ideas?
 

madmuffin

Member
Jun 11, 2014
7
4
Kassel (Germany)

gbossley

Senior Member
Jan 8, 2013
205
75
Is the HWA Settings app not working or is hardware acceleration not disabled for the apps previously deselected?


What do you mean by "blank files"? The files in the folder are empty files by design and need no content.

Sorry, I could have been more specific.

The EMPTY files are there. If I try to make any changes "Unfortunately, Hwa Settings has stopped".
 

madmuffin

Member
Jun 11, 2014
7
4
Kassel (Germany)
220

Sorry, I could have been more specific.

The EMPTY files are there. If I try to make any changes "Unfortunately, Hwa Settings has stopped".

Well thats the previously observed behaviour of the HWA Settings App. I guess it will start to work after a while again, just like it did before. Since I do not need to make any changes, I usually don't even open up the app.
This seems to be a bug in HWA Settings App, but to be honest, I do not really care to much.
 
  • Like
Reactions: gbossley

sevenrock

Senior Member
Nov 27, 2012
664
1,097
Motorola Defy
Moto G
Code:
E/AndroidRuntime( 8960): Process: com.cyanogenmod.settings.device.hwa, PID: 8960
E/AndroidRuntime( 8960): java.lang.ClassCastException: android.text.SpannableString cannot be cast to java.lang.String
E/AndroidRuntime( 8960): 	at com.cyanogenmod.settings.device.hwa.PackageListFragment.onItemClick(PackageListFragment.java:191)
Hi,

when searching for this error message I found this:
http://stackoverflow.com/questions/11041973/why-cant-i-pass-data-via-intent
It was because getText() needs to have a 'toString()' at the end. Without this 'toString()', it will crash on Android 4.x, but will work on Android 2.x.

According to answer #4 this should help, the patch is _not_ compile-tested:
Code:
--- a/packages/apps/HwaSettings/src/com/cyanogenmod/settings/device/hwa/PackageListFragment.java   2014-05-25 14:34:36.115629433 +0200
+++ b/packages/apps/HwaSettings/src/com/cyanogenmod/settings/device/hwa/PackageListFragment.java 2014-07-21 18:44:53.271472949 +0200
@@ -189,7 +189,7 @@
                                .findViewById(R.id.hwa_settings_enabled);
                boolean enableHwa = !hwaCheck.isChecked();
                String packageName = (String) ((TextView) view
-                               .findViewById(R.id.hwa_settings_packagename)).getText();
+                               .findViewById(R.id.hwa_settings_packagename)).getText().toString();
                Intent service = new Intent(mContext, HwaSettingsService.class);
                service.putExtra(PackageListProvider.PACKAGE_NAME, packageName);
                service.putExtra(PackageListProvider.HWA_ENABLED, enableHwa);
 
  • Like
Reactions: gbossley

gbossley

Senior Member
Jan 8, 2013
205
75
Hi,

when searching for this error message I found this:
http://stackoverflow.com/questions/11041973/why-cant-i-pass-data-via-intent


According to answer #4 this should help, the patch is _not_ compile-tested:
Code:
--- a/packages/apps/HwaSettings/src/com/cyanogenmod/settings/device/hwa/PackageListFragment.java   2014-05-25 14:34:36.115629433 +0200
+++ b/packages/apps/HwaSettings/src/com/cyanogenmod/settings/device/hwa/PackageListFragment.java 2014-07-21 18:44:53.271472949 +0200
@@ -189,7 +189,7 @@
                                .findViewById(R.id.hwa_settings_enabled);
                boolean enableHwa = !hwaCheck.isChecked();
                String packageName = (String) ((TextView) view
-                               .findViewById(R.id.hwa_settings_packagename)).getText();
+                               .findViewById(R.id.hwa_settings_packagename)).getText().toString();
                Intent service = new Intent(mContext, HwaSettingsService.class);
                service.putExtra(PackageListProvider.PACKAGE_NAME, packageName);
                service.putExtra(PackageListProvider.HWA_ENABLED, enableHwa);

Sevenrock if you posted this to assist me in some way thanks. However, I'm an ignoramus! How do I use this information? I haven't the faintest clue!:silly:
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Hi xda,

    I've been reading the defy section for quite a while now, and love whats happening to the Defy! Thanks to everyone involved.

    I have a problem with the HWA Settings, whenever I open them and whatever I do (scroll or uncheck an app), I get a forced closed notification. I am really running low on RAM and would love to disable HWA for a couple of apps, but am unable to do so.

    Has anyone experienced a similar behaviour in the past and can recommend a procedure?

    I am currently on 20140610, same problem occured to me with 20140518.

    Thanks for all hints. If this is a yet unknown behaviour, I'll see if I can get any useful logs.

    Cheers
    1
    Thank you for the hint.

    Just in case anyone else is facing this issue and looking for a manual workaround, just create empty files inside /data/local/hwui.deny/ and fix the permissions (likely chown system:system and chmod 600).

    e.g.

    Code:
    cd /data/local/hwui.deny/
    touch com.android.browser
    chmod 600 *
    chown system:system *

    My system has beed dirty flashed ever since I started using CM 10.2, I actually do not want to try a clean install now, for this minor issue.

    The error that I see in logcat is:
    Code:
    D/AndroidRuntime( 8960): Shutting down VM
    W/dalvikvm( 8960): threadid=1: thread exiting with uncaught exception (group=0x415a4ce0)
    E/AndroidRuntime( 8960): FATAL EXCEPTION: main
    E/AndroidRuntime( 8960): Process: com.cyanogenmod.settings.device.hwa, PID: 8960
    E/AndroidRuntime( 8960): java.lang.ClassCastException: android.text.SpannableString cannot be cast to java.lang.String
    E/AndroidRuntime( 8960): 	at com.cyanogenmod.settings.device.hwa.PackageListFragment.onItemClick(PackageListFragment.java:191)
    E/AndroidRuntime( 8960): 	at android.widget.AdapterView.performItemClick(AdapterView.java:298)
    E/AndroidRuntime( 8960): 	at android.widget.AbsListView.performItemClick(AbsListView.java:1113)
    E/AndroidRuntime( 8960): 	at android.widget.AbsListView$PerformClick.run(AbsListView.java:2911)
    E/AndroidRuntime( 8960): 	at android.widget.AbsListView$3.run(AbsListView.java:3645)
    E/AndroidRuntime( 8960): 	at android.os.Handler.handleCallback(Handler.java:733)
    E/AndroidRuntime( 8960): 	at android.os.Handler.dispatchMessage(Handler.java:95)
    E/AndroidRuntime( 8960): 	at android.os.Looper.loop(Looper.java:136)
    E/AndroidRuntime( 8960): 	at android.app.ActivityThread.main(ActivityThread.java:5161)
    E/AndroidRuntime( 8960): 	at java.lang.reflect.Method.invokeNative(Native Method)
    E/AndroidRuntime( 8960): 	at java.lang.reflect.Method.invoke(Method.java:515)
    E/AndroidRuntime( 8960): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
    E/AndroidRuntime( 8960): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:611)
    E/AndroidRuntime( 8960): 	at dalvik.system.NativeStart.main(Native Method)
    W/ActivityManager( 1618):   Force finishing activity com.cyanogenmod.settings.device.hwa/.HwaSettingsActivity
    W/ActivityManager( 1618): Activity pause timeout for ActivityRecord{41fdfdc0 u0 com.cyanogenmod.settings.device.hwa/.HwaSettingsActivity t12 f}
    I/Timeline( 1893): Timeline: Activity_idle id: android.os.BinderProxy@41863fd0 time:3048164
    I/Timeline( 1618): Timeline: Activity_windows_visible id: ActivityRecord{4220a3d0 u0 com.teslacoilsw.launcher/com.android.launcher2.Launcher t1} time:3048618
    I/Process ( 8960): Sending signal. PID: 8960 SIG: 9
    I/ActivityManager( 1618): Process com.cyanogenmod.settings.device.hwa (pid 8960) has died.
    I/WindowState( 1618): WIN DEATH: Window{421c25b0 u0 com.cyanogenmod.settings.device.hwa/com.cyanogenmod.settings.device.hwa.HwaSettingsActivity}

    If it is just me, I'll leave it for now, if the problem arises for other users aswell, I'll try to find the upstream code and and hunt the issue down.
    1
    Could I trouble you for a file please - exactly as you've loaded into the folder? I'll PM you.

    The files are completely empty. If you use a Unix-like O/S like Linux, you can use the touch command on the prompt. Or you can just create an empty textfile using any method you like.

    I did not upload the files from anywhere, I created them on the device.

    Side note: I believe that it doesn't even matter. They might as well contain something. I believe the system only reads the list of files from that folder and processes that list. It won't check the contents or open the files.
    1
    220

    Sorry, I could have been more specific.

    The EMPTY files are there. If I try to make any changes "Unfortunately, Hwa Settings has stopped".

    Well thats the previously observed behaviour of the HWA Settings App. I guess it will start to work after a while again, just like it did before. Since I do not need to make any changes, I usually don't even open up the app.
    This seems to be a bug in HWA Settings App, but to be honest, I do not really care to much.
    1
    Code:
    E/AndroidRuntime( 8960): Process: com.cyanogenmod.settings.device.hwa, PID: 8960
    E/AndroidRuntime( 8960): java.lang.ClassCastException: android.text.SpannableString cannot be cast to java.lang.String
    E/AndroidRuntime( 8960): 	at com.cyanogenmod.settings.device.hwa.PackageListFragment.onItemClick(PackageListFragment.java:191)
    Hi,

    when searching for this error message I found this:
    http://stackoverflow.com/questions/11041973/why-cant-i-pass-data-via-intent
    It was because getText() needs to have a 'toString()' at the end. Without this 'toString()', it will crash on Android 4.x, but will work on Android 2.x.

    According to answer #4 this should help, the patch is _not_ compile-tested:
    Code:
    --- a/packages/apps/HwaSettings/src/com/cyanogenmod/settings/device/hwa/PackageListFragment.java   2014-05-25 14:34:36.115629433 +0200
    +++ b/packages/apps/HwaSettings/src/com/cyanogenmod/settings/device/hwa/PackageListFragment.java 2014-07-21 18:44:53.271472949 +0200
    @@ -189,7 +189,7 @@
                                    .findViewById(R.id.hwa_settings_enabled);
                    boolean enableHwa = !hwaCheck.isChecked();
                    String packageName = (String) ((TextView) view
    -                               .findViewById(R.id.hwa_settings_packagename)).getText();
    +                               .findViewById(R.id.hwa_settings_packagename)).getText().toString();
                    Intent service = new Intent(mContext, HwaSettingsService.class);
                    service.putExtra(PackageListProvider.PACKAGE_NAME, packageName);
                    service.putExtra(PackageListProvider.HWA_ENABLED, enableHwa);