Jump to content

[ROM] FusionX Huawei Y300 v1.0 [B199] [Full HWA]


Guest tillaz

Recommended Posts

Guest Ducsidu

the utilisation of the RAM is definitely much improved now, and this is with HWA fully working (system apps working)

and all my apps / games installed, which is around 35

post-913969-0-98629100-1377107971_thumb.

That's amazing! :o :D How did you do that?

Link to comment
Share on other sites

Guest Clarkiieh
the utilisation of the RAM is definitely much improved now, and this is with HWA fully working (system apps working)

and all my apps / games installed, which is around 35

post-913969-0-98629100-1377107971_thumb.

That looks tasty, is it cwm flashable?

Link to comment
Share on other sites

Guest Clarkiieh
the utilisation of the RAM is definitely much improved now, and this is with HWA fully working (system apps working)

and all my apps / games installed, which is around 35

post-913969-0-98629100-1377107971_thumb.

That looks tasty, is it cwm flashable?

Link to comment
Share on other sites

think someone mentioned the phone not vibrating when ringing or the option in sound settings not working?

you need to enable it in the diallers settings to work.

Yeah, now it works! Thank you Tillaz!

I suggest you to put this in the FAQ :)

the utilisation of the RAM is definitely much improved now, and this is with HWA fully working (system apps working)

and all my apps / games installed, which is around 35

post-913969-0-98629100-1377107971_thumb.

:Q________

Edited by kmau
Link to comment
Share on other sites

I've got a friend out in Canada that has a Y300-0151. I've told them how to unlock it, install recovery and root it. The issue now is that the 0151 doesn't seem to have the B194 or the B190 update and I wouldn't want to tell them to flash a whole new ROM that might not work for them.

Has anyone used something like WinMerge to compare a dump of their original firmware to the latest firmware? It'd help to see what files have changed and then a patch might be possible for all Y300 variants.

As for this ROM it looks great, but I wish it used the stock fonts in some places. A downloadable addon maybe? It does look much better without the Emotion UI either way :)

What I'm interested in most is how you've got HWA fully working, if not by editing every single app to add hardwareAccelerated=true? At the moment I've told my friend to simply enable the force GPU option in the dev settings. It's not the best solution but it seems to work well enough for them (they're not technically minded).

I don't plan on doing any work for the Y300 as I can't personally test anything, but I'd like to give my friend a few patches if possible. Also could anyone with the Y300-0151 confirm if this ROM works flawlessly on it?

Thanks.

Link to comment
Share on other sites

It will render things with the GPU instead of the CPU, which makes the whole ROM feel smoother in most cases.

The updates mention a Viber audio fix, some Google patches (I'm guessing they're master key related), an improved photo effect and some performance tweaks. If located most of this stuff could be patched into peoples existing ROM's.

I'm curious to know if the stock ROM's are odexed as it'd make things much easier if they weren't.

If I had a system dump of B194 I'd try to single out the changes so that things could be patched.

Edited by H3ROS
Link to comment
Share on other sites

Guest tillaz

if not by editing every single app to add hardwareAccelerated=true?

that's actually the problem on the stock based roms,

the hardwareAccelerated="true" tag is strangely ignored for any apps that are on the system partition, but works fine for apps on the data partition :huh:

enabling the force GPU option in the dev settings makes it work on the system but not ideal like you said.

If I had a system dump of B194 I'd try to single out the changes so that things could be patched.

same here but no one has uploaded it yet, if someone uploads it i will make a flashable zip from the update.app

Link to comment
Share on other sites

Guest jackosterman

i think its been caused by fast dormancy not been configured properly

maybe i will get a chance to take a look befor my phone sells.

I had been looking into fast dormancy for a little while now, obviously to no workable results. I assume no one has determined if Huawei has implemented any secret dialer menus?

Edited by jackosterman
Link to comment
Share on other sites

Guest tillaz

I had been looking into fast dormancy for a little while now, obviously to no workable results. I assume no one has determined if Huawei has implemented any secret dialer menus?

try adding these to your build.prop

turned off


ro.ril.fast.dormancy.rule=0
ro.config.hw_fast_dormancy=0
ro.config.hw_fast_dormancy_ap=false[/code] or this which is turned on
[code]
ro.ril.fast.dormancy.rule=1
ro.config.hw_fast_dormancy=1
ro.config.hw_fast_dormancy_ap=true

Link to comment
Share on other sites

that's actually the problem on the stock based roms,

the hardwareAccelerated="true" tag is strangely ignored for any apps that are on the system partition, but works fine for apps on the data partition :huh:

Do the stock apps contain the tag at all? If they do then there might be something in the framework that's fixable just by returning false in one of the functions. I'm not sure how you'd locate that specific line though unless you have a ROM that's very similar and allows HWA to work.

Also how are you getting around it in your next update? I mean if the tags there and it's ignored then the only thing I can think of off the top of my head is to create a symbolic link to the data partition for each system app. Maybe that'd fool it. It's just that HWA is the one thing I'd like to be fully working on my friends Y300.

Edited by H3ROS
Link to comment
Share on other sites

Guest tillaz

Do the stock apps contain the tag at all? If they do then there might be something in the framework that's fixable just by returning false in one of the functions. I'm not sure how you'd locate that specific line though unless you have a ROM that's very similar and allows HWA to work.

Also how are you getting around it in your next update? I mean if the tags there and it's ignored then the only thing I can think of off the top of my head is to create a symbolic link to the data partition for each system app. Maybe that'd fool it. It's just that HWA is the one thing I'd like to be fully working on my friends Y300.

yep, they all have the tag in there AndroidManifest.xml its just been ignored,

i suspected huawei had changed something somewhere in the framework and did try to look but its like looking for a needle in a hay stack...

a few of us even emailed them and asked what they had done but they just replied saying it is working and to check again lol

not sure when i will get the next version out or if it will actually get finished as i'm currently working on new stuff for the play store as well as updating

and in the process of selling the Y300

Link to comment
Share on other sites

yep, they all have the tag in there AndroidManifest.xml its just been ignored,

i suspected huawei had changed something somewhere in the framework and did try to look but its like looking for a needle in a hay stack...

a few of us even emailed them and asked what they had done but they just replied saying it is working and to check again lol

not sure when i will get the next version out or if it will actually get finished as i'm currently working on new stuff for the play store as well as updating

and in the process of selling the Y300

Well I'm guessing you've tried a bunch of build.prop stuff?

persist.sys.ui.hw=1

debug.sf.hw=1

debug.performance.tuning=1

video.accelerate.hw=1

debug.egl.profiler=1

debug.egl.hw=1

debug.composition.type=gpu

ro.config.disable.hw_accel=false

If you could figure out which of them trigger the GPU to start working for the system app then you could search for that specific string in the framework. Once found it's then just a matter of looking through the functions. You might even be able to compare the smali file to a similar ROM for a different Huawei device.

Edited by H3ROS
Link to comment
Share on other sites

Guest tillaz

Well I'm guessing you've tried a bunch of build.prop stuff?

persist.sys.ui.hw=1
debug.sf.hw=1
debug.performance.tuning=1
video.accelerate.hw=1
debug.egl.profiler=1
debug.egl.hw=1
debug.composition.type=gpu
ro.config.disable.hw_accel=false[/code]

If you could figure out which of them trigger the GPU to start working for the system app then you could search for that specific string in the framework. Once found it's then just a matter of looking through the functions. You might even be able to compare the smali file to a similar ROM for a different Huawei device.

[s]debug.egl.hw=1[/s] enables forced GPU render in dev settings

[b]EDIT[/b]

its actually persist.sys.ui.hw=1

Link to comment
Share on other sites

In that case that's what you need to be searching for in the framework. Either "egl.hw" or "egl". You might get some hits by using notepad++ and doing a find in files scan. If you then find a specific smali file then the function that controls the CPU/GPU rendering option based on app location will be close by.

Out of curiosity have you tried logging the launch of an app in the data partition and then converting it to a system app and creating a second log? If you're really lucky it might log the CPU/GPU decision which would make finding the function easy.

Edited by H3ROS
Link to comment
Share on other sites

Guest tillaz

just found this, might help me track down the problem, will take a proper look when i get time

WTF it keeps making the W in window.java lower case which is making it not load :huh:

line 126

android.googlesource.com/platform/frameworks/base/+/master/core/java/android/view/window.java

Link to comment
Share on other sites

You could compare /core/java/android/view/window.smali to window.smali from another Huawei device that has hardware rendering. In fact if you find any stock Jelly Bean 4.1.1 ROM for any device then you might be able to use the whole window.smali file from it, since they should contain the same functions.

mHardwareAccelerated = hardwareAccelerated || SystemProperties.getBoolean(PROPERTY_HARDWARE_UI, false);

That says that if the app has the hardwareAccelerated flag or the system has the flag then we'll render it with the GPU.

There's also something within the adjustLayoutParamsForSubWindow function.

Edit:

I should of thought of it earlier, but you could also just search for "hardwareAccelerated". That will have a string somewhere in the framework. That or an ID you can search for.

https://github.com/a...ted&ref=cmdform

core/java/android/content/pm/PackageParser.java - It might of been modified.

Edited by H3ROS
Link to comment
Share on other sites

Guest tillaz

just compared window.smali from AOSP 4.1 against huawei's and there identical except huawei's has an extra method

.method public setHwFlags(II)V
.registers 6
.parameter "privateFlags"
.parameter "mask"

.prologue
.line 766
invoke-virtual {p0}, Landroid/view/Window;->getAttributes()Landroid/view/WindowManager$LayoutParams;

move-result-object v0

.line 767
.local v0, attrs:Landroid/view/WindowManager$LayoutParams;
iget v1, v0, Landroid/view/WindowManager$LayoutParams;->privateFlags:I

xor-int/lit8 v2, p2, -0x1

and-int/2addr v1, v2

and-int v2, p1, p2

or-int/2addr v1, v2

iput v1, v0, Landroid/view/WindowManager$LayoutParams;->privateFlags:I

.line 768
return-void
.end method[/code]

lets see what happens when i remove it :ph34r:

[b]Edit[/b]

that didn't make a difference

Link to comment
Share on other sites

Removing it may cause a crash. Instead add return-void before the first invoke.

Also use notepad++ and do a seach for setHwFlags as somethings obviously calling it.

You may also want to compare PackageParser.smali as thats also a key area.

Edited by H3ROS
Link to comment
Share on other sites

Guest tillaz

Removing it may cause a crash. Instead add return-void before the first invoke.

Also use notepad++ and do a seach for setHwFlags as somethings obviously calling it.

You may also want to compare PackageParser.smali as thats also a key area.

yeah, i'm quite familiar with smali, will look at PackageParser.smali now as changes to window.smali made no differance

Link to comment
Share on other sites

Guest tillaz

aha... sorted, thanks for pointing me in the right direction :)

i noticed a big chunk of code in PackageParser.smali which is different to AOSP which is setting exceptions for certain apps in system/app

to allow HWA after checking some of them it matched up.

this is just part of it

 .line 2179
move-object/from16 v0, p0

iget-object v2, v0, Landroid/content/pm/PackageParser;->mArchiveSourcePath:Ljava/lang/String;

const-string v3, "/system/app"

invoke-virtual {v2, v3}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

move-result v2

if-eqz v2, :cond_324

move-object/from16 v0, p0

iget-object v2, v0, Landroid/content/pm/PackageParser;->mArchiveSourcePath:Ljava/lang/String;

invoke-virtual {v2}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

move-result-object v2

const-string v3, "hwlauncher"

invoke-virtual {v2, v3}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

move-result v2

if-nez v2, :cond_324

move-object/from16 v0, p0

iget-object v2, v0, Landroid/content/pm/PackageParser;->mArchiveSourcePath:Ljava/lang/String;

invoke-virtual {v2}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

move-result-object v2

const-string v3, "browser"

invoke-virtual {v2, v3}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

move-result v2

if-nez v2, :cond_324

move-object/from16 v0, p0[/code] i changed line 3660
[code] const-string v3, "/system/app"
to
 const-string v3, "/system/apps"

so huawei's restriction is pointing at a directory that does not exist... this has now fixed the problem

PackageParser.smali and its counter parts are so different to AOSP it would be a huge hassle to try and revert the changes

the above seems to be working fine and is very easy for anyone to do on any stock based rom

so HWA is now fully working :)

Link to comment
Share on other sites

Guest tillaz

think i will upload Beta 3 today as i'm not sure if i will have time to do anything else before the Y300 is sold,

its been working good so far though... much better than 02

RAM is much improved from previous versions

post-913969-0-82212000-1377157117_thumb.

Link to comment
Share on other sites

Guest Frankish

Huawei oblivious to their own mistakes and unwilling to take responsibility as usual hope you can push one final amazing update before your device goes mate.

Link to comment
Share on other sites

Guest blairpoodle
think i will upload Beta 3 today as i'm not sure if i will have time to do anything else before the Y300 is sold,

its been working good so far though... much better than 02

RAM is much improved from previous versions

post-913969-0-82212000-1377157117_thumb.

Tillaz. Might be a big ask I know, but is there any chance of a walk through on how you created your ROM so us noons may continue its when you more to the new phone.

Sorry if this is one of those facepalm questions, if so point my in the right direction and I'll read the rest.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.