Jump to content
Guest

[KERNEL] [Y300/G510] Stock Huawei

Recommended Posts

Guest

Uhm. The Y300 got hotplug, too.

If you meant something like kernel side hotplug, than that's something I'm working on.

Share this post


Link to post
Share on other sites

i tried to enable zram with lukas skript on b209 cleaned by fonz but it fail to work. also when i play music then lock the phone it reboots :S thats strange

Share this post


Link to post
Share on other sites

If this can help others italian users said to me that the wakeup issue happens with SlimKat 7.2 too.

They have set some test and the issue appear only if min cpu freq is set lower than 245 mhz (that is my case because I use min freq 122 mhz)

Share this post


Link to post
Share on other sites

I used my ROM for 2 days for testing purpose ( i usually use AOSP MOD) and i had not any problem of zRAM, you may need to use another script or it just has the wrong permissions

Edited by fonz93

Share this post


Link to post
Share on other sites

Do not install mine zram script in the latest esperimental build
I have to update it
It works only in the stable build and olders

 

 

EDIT: Now the scripts work correctly in new and old build ;-) and the zram is  64MB x Devices 

So 128 in the new builds and and 64 in the old

Edited by luca020400

Share this post


Link to post
Share on other sites
Guest

Just in case "your script" should look almost the same than the one of me it would be an idea to keep the notice where the idea(s) are take from wink.png

Share this post


Link to post
Share on other sites
Guest

No, if you are on stable you can't use them

I've re-uploaded the last stable build. No functional change. I only integrated those new "tuneables":

 

  • add new setprop options (only need to be set once. they persist during reboot, unless you restore an backup of your data partition):
    • persist.synopsis.frandom (1: enabled; 0: disabled; needs reboot to get applied)
    • persist.synopsis.ksm (1: enabled; 0: disabled; needs reboot to get applied - this is for both, either KSM or UKSM. currently the stable build is using KSM)
    • persist.synopsis.zram (1: enabled; 0: disabled; automatically setup of ZRAM after boot)
    • persist.synopsis.zram_size (0...xx MB in total, which is getting split across the number of total devices)
If you set 'persist.synopsis.zram' to '1' and got a size set (persist.synopsis.zram_size), ZRAM will be automatically available after reboot, without the need of any script or APP. Same goes for the other features listed above.

 

 

You can either add them to your build.prop or to any script of your choice.

 

In case you are using a script use:

setprop persist.synopsis.<tuneable> <value>
Edited by Guest

Share this post


Link to post
Share on other sites
Guest

To automatically load ZRAM with an total size of 50 MB for example, you would need to set:

  • persist.synopsis.zram 1
  • persist.synopsis.zram_size 50

Command line method:

setprop persist.synopsis.zram 1
setprop persist.synopsis.zram_size 50

Share this post


Link to post
Share on other sites
Guest

It got 2 devices and my zram script automatically detects the number of available devices and splits the set size across them. In case you are going to use that script, keep the header with my name in it. That's how dev's use to do it when they are migrating "intellectual property" cool.png

Share this post


Link to post
Share on other sites

So the zram size in build.prop is the total swap ??

How have you splitted it ??

Share this post


Link to post
Share on other sites
Guest

By taking the total ZRAM_SIZE and devide it through the number of available devices to get the SIZE_PER_DEVICE.

 

EDIT: [*ironically*] Math of 1st class biggrin.png -> "If you got 8 apples and 4 kids, how many apples does each child get?" wink.png [*ironically*]. That's by the way how the APP 'Performance Control' should do it too, if the author would have written it cleanly. But instead of fetching the number of present devices, it assumes 1 device per core. This isn't always true and thus it's even some kind of BUG of this APP. I did suggest some changes to the author of this app: https://github.com/erik96/android_packages_apps_PerformanceControl/pull/61

Edited by Guest

Share this post


Link to post
Share on other sites

Thanks

I will update mine script with this new way

 

EDIT : Thanks for the simply explain  :P  :P

 

EDIT 2 : I got some warnings when i unpack boot.img

unpack boot.img


Boot = boot.img
unmkbootimg version 1.2 - Mikael Q Kuisma
Kernel size 4756104
Kernel address 0x208000
Ramdisk size 999527
Ramdisk address 0x1500000
Secondary size 0
Secondary address 0x1100000
Kernel tags address 0x200100
Flash page size 2048
Board name is ""
Command line "androidboot.hardware=huawei zram.num_devices=2 loglevel=3"

*** WARNING ****
This image is built using NON-standard mkbootimg!
OFF_RAMDISK_ADDR is 0x01300000
Please modify mkbootimg.c using the above values to build your image.
****************

Extracting kernel to file zImage ...
Extracting root filesystem to file initramfs.cpio.gz ...
All done.
---------------
To recompile this image, use:
mkbootimg --kernel zImage --ramdisk initramfs.cpio.gz --base 0x200000 --cmdline 'androidboot.hardware=huawei zram.num_devices=2 loglevel=3' -o new_boot.img
---------------
3633 blocchi

 

EDIT 3 : Updated zram script now 128 of swap in every build ( Tell me for another size )

 

EDIT 4 : Can you include adb insicure ??

http://forum.xda-developers.com/showthread.php?t=2593581

 

EDIT 5 : You have service.frandom.sh in ramdisk and synopsis folder 

Can you remove service.frandom.sh in ramdisk ??

Thanks

 

EDIT 6 : A lot of edits XD

Edited by luca020400

Share this post


Link to post
Share on other sites
Guest

EDIT : Thanks for the simply explain  tongue.png  tongue.png

A good program writer always adds comments to his code. That's one of the basics.

 

EDIT 2 : I got some warnings when i unpack boot.img

Blame Huawei tongue.png

 

EDIT 3 : Updated zram script now 128 of swap in every build ( Tell me for another size )

Maximum shouldn't exceed 10% of available RAM. On our device I would consider 50MB as absolute max.

 

EDIT 4 : Can you include adb insicure ??

Almost no one will go to use it.

Share this post


Link to post
Share on other sites

Ok thanks i will create differents zram scripts with differents size

Can you give me the raccomanded size ??

Thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

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