1. Download our Official Android App: Forums for Android!

Root [LINARO] AWEstruck v1.04 12/14/14 | [3.4.107] v1.05b6 5/30/15

Discussion in 'Android Devices' started by spock1104, May 17, 2014.

  1. spock1104

    spock1104 Android Expert
    Thread Starter
    Rank:
    None
    Points:
    223
    Posts:
    1,038
    Joined:
    Jul 9, 2013

    Jul 9, 2013
    1,038
    905
    223
    Introducing the AWEstruck kernel. I've taken the stock kernel source from and compiled it with Linaro 4.9.3, with cortex-a15 optimization. The result from benching seems to be better I/O and memory performance. My goal is to continue adding updates and customizations, this is just a start. As such, I'm taking feature requests.

    Features:
    Linaro O3 compilation
    CPU overclocking up to 2 GHz (Try clocks 1 step at a time or you may break your phone)
    CPU voltage controls
    Extra CPU governors
    Extra GPU governor
    Built-in thermal control
    Built-in mpdecision
    Dynamic readahead
    Common code base for JellyBean and KitKat

    Beta Features:
    UHID
    Kernel 3.4.107
    exFAT/SDXC
    Prevent entropy depletion

    To tweak the kernel (such as governors, schedulers, mpdecision) the use of 3C Toolbox is highly recommended. Trickster Mod is a simpler option but is prone to busybox issues. These are the only two verified to have full support. I'm in the process of validating Kernel Adiutor, looks promising.

    **Disclaimer** I take no responsibility for a broken phone. Make sure you have backups.

    Your WiFi MAC will change on first boot of this kernel! JellyBean versions will say JB in the file name, KitKat will say KK.
    AWEStruck_JB_v1.04.zip - 9.34 MB

    Feel a little more daring? Try a beta!
    http://www.mediafire.com/download/d7qs9j7ui9u6v8i/AWEStruck_JB_v1.05_beta6.zip
    MD5: 9A1D422F9388F8478AF58DF9B319E61D

    http://www.mediafire.com/download/5h9jr69vuy3k75d/AWEstruck_KK_v1.05_beta6.zip
    MD5: 6FC16EC3ADE220589EB12CBA62106E16

    Recommended CPU settings are 162MHz - 1.35GHz, defaults are 162MHz - 1.18GHz (manufacturer low was 384MHz). 162MHz will squeeze a little more battery life out of the phone on low loads, and 1.35GHz has the same voltage as 1.18GHz so more bang for your power. For great I/O, use the SIO scheduler with a cache size of 2048 or the FIOPS scheduler with a cache size of 3072.

    *** Overclocking is luck of the draw, not all processors can overclock and some can overclock better than others. DO NOT set an overclock on boot until you have stability tested that clock, otherwise you will end up in a boot loop ***

    If you encounter a stability issue please collect a logcat and a dmesg/last_kmsg for me so I can investigate. I stability test on my phone and generally don't have issues when I release. [HOW TO] - [Post Kernel last_kmsg] - [make Nova Launcher fully expand(desktop mode)] - xda-developers for more detail on last_kmsg

    Switch back to stock: http://androidforums.com/awe-all-things-root/848066-dev-kernel-linaro-awestruck.html#post6572619 - Thanks brittnearl!

    Source code here: https://github.com/spock1104/android_kernel_zte_nex
    If you make use of this code please try to fork or at least cherry-pick to facilitate code sharing. If you build this code or any subset into a binary you must make your source code available at the same time, per GPL.

    Loading instructions:
    To perform a one-off test:
    Make sure you have ADB working. Extract the boot.img from the zip and place in your ADB directory.

    adb reboot-bootloader

    wait for the phone to boot to the blank bootloader screen

    fastboot boot boot.img

    The phone will then reboot using the new kernel. This can be verified in the about phone menu, svn10896 will no longer appear in the version. WiFi likely won't work until you flash the zip.

    To permanently load the kernel, flash the zip in recovery. This WILL overwrite system files, make sure you have a backup!

    See post #2 for tips on reducing battery drain

    See post #3 for a guide on compiling your own kernel

    Code (Text):
    1.  
    2. CHANGELOG:
    3. AWEstruck v.105 beta6 5/30/15
    4. Linaro 4.9.3 2015.03
    5. Port audio drivers from n9520 (hopefully fix sound reboots)
    6. patched up to 3.4.107
    7.  
    8. AWEstruck v1.05 beta5 1/24/15
    9. Linaro 4.9.3 2015.01
    10. fix UHID
    11.  
    12. AWEstruck v1.05 beta4 1/16/15
    13. Linaro 4.9.3 2014.12
    14. disabled HID battery and hidraw
    15. voltage corrections for clocking beyond 1.83GHz
    16.  
    17. AWEstruck v1.05 beta3
    18. add UHID support (thanks PhenomX4)
    19. enable HID battery and hidraw
    20.  
    21. AWEstruck v1.05 beta2
    22. patched the kernel up to 3.4.105
    23. add exFAT support (should enable the use of SDXC)
    24.  
    25. AWEstruck v1.05 beta 1
    26. readahead tweaks
    27. prevent entropy depletion
    28. patched the kernel up to 3.4.86
    29.  
    30. [B]AWEstruck v1.04 12/14/14[/B]
    31. Switch to Linaro 4.9.3
    32. unify KitKat and JellyBean code (Thanks PhenomX4)
    33. Switch to LZO compression for faster boots
    34. Remove GPU OC, it didn't actually work
    35. Fix CPU overclock table, add new clocks up to 2 GHz
    36. Add CPU voltage tuning
    37. Set minimum clock to 162MHz
    38. Add Intelliactive, Intellidemand, and Lionheart governors (Thanks PhenomX4)
    39. Add dynamic readahead (Thanks rbheromax)
    40. Add compilation of zram/zcache/zsmalloc modules (not included by default) (thanks rbheromax)
    41.  
    42.  
    43. [B]AWEstruck v1.03c 6/25/14[/B]
    44. Modify mpdecision for two cores and re-enable
    45.  
    46. [B]AWEstruck v1.03a 6/24/14[/B]
    47. Fix an error in init.qcom.post_boot.sh
    48.  
    49. [B]AWEstruck v1.03 6/22/14[/B]
    50. Revise [B]CPU [/B]overclocks based on jimsmith80's tables. 1.512GHz and 1.674GHz have replaced 1.566GHz and 1.62GHz.
    51. Enable [B]GPU[/B] 450, 487.5, 504, 545, 600, and 627MHz overclocks
    52. Add faux123's simple GPU governor
    53. thermald replaced with kernel based thermal throttling and shutdown (thermald caused the CPU to exceed the user set max)
    54. Remove CPU frequency jumps when coming back from suspend
    55. Update CPU frequency handling
    56. Disabled kernel MPdecision for the time being
    57. Reduce size of init.qcom.post_boot.sh
    58.  
    59. [B]AWEstruck v1.02 5/30/14[/B]
    60. Update Prima to 3.2.2.17b
    61. Add kernel based mpdecision from showp1984(updater deletes ROM based mpdecision)
    62. Enable [B]CPU [/B]162, 270, and 378MHz underclocks
    63. Enable [B]CPU [/B]1.242, 1.296, 1.350, 1.404, 1.458, 1.566, 1.62, and 1.728GHz overclocks
    64. Add VR, ZEN, SIO, and FIOPS I/O Schedulers
    65. Add Wheatley and Conservative CPU governors
    66.  
    67. [B]AWEstruck v1.01a[/B]
    68. Fix the updater script.  This is why editing files at 1:30AM isn't always a great idea.
    69.  
    70. [B]AWEstruck v1.01[/B]
    71. Update WCNSS WiFi, add Prima kernel module v3.2.2.6 from CM11 MAKO (WiFi fix)
    72. Remove some debug
    73. Switched from Ofast to O3, some programs won't like ffast-math
    74.  
    75. [B]AWEstruck v1.0[/B]
    76. Downloaded source from ZTE
    77. Pulled defconfig from phone
    78. Linaro optimized
    79.  
    I appreciate any feedback, testing, and development help I can get.

    Thanks to brittnearl, starkraving, DysMnapTic, and dragonhart6505 for being willing and eager guinea pigs testers

    Thanks for the source:
    aosp
    cyanogenmod
    codeaurora
    rbheromax
    phenomx4
    jimsmith80
    showp1984
    faux123
    dorimanx
    f4k
    DooMLoRD
    franciscofranco
    Grarak
    And a HUGE thanks to Christopher83 for his Linaro binaries


    Enjoy!

    To Do:
    OTG support
    Add color controls
    cleanup unnecessary code
    update drivers
    init.d support
    anykernel updater for full KitKat support
     

    Advertisement

    #1 spock1104, May 17, 2014
    Last edited: May 30, 2015
  2. spock1104

    spock1104 Android Expert
    Thread Starter
    Rank:
    None
    Points:
    223
    Posts:
    1,038
    Joined:
    Jul 9, 2013

    Jul 9, 2013
    1,038
    905
    223
    Helping you and me reduce battery drain

    In order to reduce battery drain, we need to know what on the phone is actually draining it. We can accomplish this via Better Battery Stats. Download and install the app, and give it root permissions.

    What can you do to reduce your own battery use?
    Monitor the partial wakelocks, which will come from apps waking the phone up to do their thing. Some apps just like to be greedy about their CPU usage. If it's an app you can do without, uninstall it. If it's a system app you can do without, I recommend using ES File Explorer to force an uninstall (BUT BE VERY CAREFUL ABOUT WHAT YOU REMOVE). Make a backup first, either nandroid or with Titanium Backup. If you want or need to keep the app, I recommend using Greenify to hibernate the app.

    What can you do to help me reduce battery use?
    Monitor the kernel wakelocks tab. If it looks like the kernel has gone wild:

    • Open the BetterBatteryStats settings
    • Open Advanced
    • Open Sharing Options
    • Select Text, Logcat, and dmesg
    • Go back to the main screen
    • Select the share button in the top right
    • Select save
    • Grab the dated BetterBatteryStats, dmesg, and logcat files from your sdcard
     
  3. spock1104

    spock1104 Android Expert
    Thread Starter
    Rank:
    None
    Points:
    223
    Posts:
    1,038
    Joined:
    Jul 9, 2013

    Jul 9, 2013
    1,038
    905
    223
    This is a work in progress and open source. I have limited time to work on it and would rather not do so alone. So, here's the basics to get started. The environment will also set you up for ROM building for the eventuality we get full ROM builds from source.

    Environment
    This can be done on either a dedicated box or a virtual machine. I've seen recommendations of 50-100GB of space, but I recommend 150 for managing several build directories at once. Follow most of the instructions on Initializing a Build Environment | Android Developers . Also don't mind the RAM requirements, I run my virtual machine with 4GB and its fine.

    and to install git

    sudo apt-get update sudo apt-get install git git-core
    use the instructions at Downloading the Source | Android Developers to install Repo

    You'll also need a toolchain. The source provided by ZTE will not boot with a 4.8 or later GNU-based toolchain, but I've since fixed this. I'm using a custom Linaro 4.9.2 build from [LINARO GCC] Cross Compiler Toolchains [Linaro GCC 4.9 2014.05, 4.8 and 4.7 2014.04][17/05/2014] - xda-developers
    Make a directory in your home folder called toolchains, and unzip the toolchain in this directory.

    Lastly, you'll need the tool for building boot images

    sudo apt-get install abootimg

    Downloading the source
    Decide on a directory structure for yourself on where you want to put your builds. I recommend ~/nex/

    Sign up for an account on GitHub, and then go to https://github.com/spock1104/android_kernel_zte_nex and click the Fork button. This will duplicate the source code on GitHub to an area where you can make your own changes, and hopefully lead to collaboration. On the webpage for your fork, on the right side there will be an HTTPS Clone URL. Copy this URL.

    Back to the terminal, go to your working directory and type
    git clone <clone_url>

    This will download the source to your computer so that you can begin working on it.

    now open the android_kernel_zte_nex directory and do a

    git checkout

    Build the code!
    First we'll set up variables that tell the system what we're building and how to do it

    export ARCH=arm
    export SUBARCH=arm
    export CROSS_COMPILE=~/toolchain/arm-cortex_a15-linux-gnueabihf-linaro_4.9.2-2014.09/bin/arm-gnueabi-

    Next many more variables that tell the system what kernel options we want

    make nex_defconfig

    And lastly building the code

    make

    *Or if you are set up with multiple processors and want to run a faster build, add a -j# where the # is one above the number of processors you're using. Ex. for two processors run

    make -j3

    You'll see a lot of compiler messages scroll by. With any luck, you'll get no errors and the magical words at the end:

    "Kernel: arch/arm/boot/zImage is ready"

    Create a bootable image
    The zImage is what you need from the compilation but it's not enough to run with. Now you need to piece together a full boot image. Download the stock boot that britnearl provided and extract the boot.img from the zip into your kernel directory. Copy to a new name, like test.img. Then do:

    abootimg -u test.img -k arch/arm/boot/zImage

    this will likely result in an error message that the image is too big, like this one:

    test.img: updated is too big for the Boot Image (7712768 vs 6828032 bytes)

    The solution to this is going to seem far too easy but it works, and will work so long as your boot image doesn't exceed 16MB. Copy the size it is complaining about and feed it back to the tool.

    abootimg -u test.img -k arch/arm/boot/zImage -c "bootsize=7712768"

    You now have a usable boot image that you can run through the bootloader or directly flash. You will also need to copy ./drivers/staging/prima/wlan.ko to /system/lib/modules/prima/prima_wlan.ko for WiFi to work.

    If you want to make a flashable zip, copy the latest AWEstruck zip and extract. copy your boot.img over mine with the same name, and do the same for prima_wlan.ko. Zip it back up.


    Let me know what information you'd like to see added or improved in this guide. Thanks, and happy compiling!
     
    A android B likes this.
  4. starkraving

    starkraving Android Expert
    Rank:
    None
    Points:
    323
    Posts:
    2,484
    Joined:
    Apr 27, 2013

    Apr 27, 2013
    2,484
    1,363
    323
    Male
    Contractor
    Las Vegas, Nv
    Is it currently at default clock speed? My major feature requests would be undervolting, I/O and governor options. Thanks will give this initial build a go. :D
     
  5. edodson84

    edodson84 Android Expert
    Rank:
    None
    Points:
    223
    Posts:
    1,218
    Joined:
    Jan 29, 2014

    Jan 29, 2014
    1,218
    510
    223
    Male
    Master Powersports Technician
    Bellwood, pa
    Im assuming default speeds?? Any plans for gpu oc?? Nice work!! I agree with starkraving more governor options and I/O :)

    Edit: i wouldn't go over 1.5ghz cpu OC for stability purposes
     
  6. starkraving

    starkraving Android Expert
    Rank:
    None
    Points:
    323
    Posts:
    2,484
    Joined:
    Apr 27, 2013

    Apr 27, 2013
    2,484
    1,363
    323
    Male
    Contractor
    Las Vegas, Nv
    Not bad at all..
    [​IMG]
     
  7. cell2011

    cell2011 Android Enthusiast
    Rank:
    None
    Points:
    43
    Posts:
    479
    Joined:
    Mar 26, 2011

    Mar 26, 2011
    479
    38
    43
    Male
    caregiver/laborer
    charleston WV
    Any chance of fixing wifi thats broken?
     
  8. starkraving

    starkraving Android Expert
    Rank:
    None
    Points:
    323
    Posts:
    2,484
    Joined:
    Apr 27, 2013

    Apr 27, 2013
    2,484
    1,363
    323
    Male
    Contractor
    Las Vegas, Nv
    Yup besides WiFi being broken, it's a good start. Seems smooth for the most part. Good work.
     
  9. spock1104

    spock1104 Android Expert
    Thread Starter
    Rank:
    None
    Points:
    223
    Posts:
    1,038
    Joined:
    Jul 9, 2013

    Jul 9, 2013
    1,038
    905
    223
    The wife is demanding time with me. I'll see what I can do about the wifi once I put her to bed... I spent most of the afternoon couped up testing toolchains
     
    sawbones999 likes this.
  10. DsyMnapTic

    DsyMnapTic Android Expert
    Rank:
    None
    Points:
    153
    Posts:
    1,119
    Joined:
    Apr 29, 2011

    Apr 29, 2011
    1,119
    204
    153
    The rocky mountains
    Is it just an error with the driver modules?
     
  11. spock1104

    spock1104 Android Expert
    Thread Starter
    Rank:
    None
    Points:
    223
    Posts:
    1,038
    Joined:
    Jul 9, 2013

    Jul 9, 2013
    1,038
    905
    223
    Looks that way. The vermagic of the stock wlan.ko expects svn10896. Under normal circumstances I'd just have to package the module with the zip, but the stock config from ZTE didn't spit out a new module.
     
  12. spock1104

    spock1104 Android Expert
    Thread Starter
    Rank:
    None
    Points:
    223
    Posts:
    1,038
    Joined:
    Jul 9, 2013

    Jul 9, 2013
    1,038
    905
    223
    For documentation's sake, it looks like we have the Prima wcnss wifi module
     
  13. DsyMnapTic

    DsyMnapTic Android Expert
    Rank:
    None
    Points:
    153
    Posts:
    1,119
    Joined:
    Apr 29, 2011

    Apr 29, 2011
    1,119
    204
    153
    The rocky mountains
    Sweet, I don't know anything about the modules, LoL. Just thought I'd try to sound Dev savvy for a moment. I just know I had to switch mine to use a kernel from another Rom, on my current one. :p
     
  14. modhatter6811

    modhatter6811 Android Enthusiast
    Rank:
    None
    Points:
    88
    Posts:
    311
    Joined:
    Nov 23, 2013

    Nov 23, 2013
    311
    231
    88
    Male
    Outer Space
    Another +1 I've been dying for an under volt. Phone gets too hot to charge sometimes. I think its more a ram clearing issue, but under volting would definitely drop temps. Downloading now to test. :)
     
  15. spock1104

    spock1104 Android Expert
    Thread Starter
    Rank:
    None
    Points:
    223
    Posts:
    1,038
    Joined:
    Jul 9, 2013

    Jul 9, 2013
    1,038
    905
    223
    Little confused right now. The default configuration compiled the driver into the kernel instead of as a module, but the logcats show it thinks it can't get a signal. To top it off, the code as-is won't compile as a module.

    Sorry guys, no quick fix. I'll look into undervolting once I do get the wifi going to make up for it.
     
  16. starkraving

    starkraving Android Expert
    Rank:
    None
    Points:
    323
    Posts:
    2,484
    Joined:
    Apr 27, 2013

    Apr 27, 2013
    2,484
    1,363
    323
    Male
    Contractor
    Las Vegas, Nv
    No worries I think you did a nice job for an initial build. I'm wondering if for our device like so many other ZTE sources is incomplete? If there could be drivers etc missing from source? I say this because even in the theming and modding of xmls, smali and images for various system level apks there's lots extraneous code, xhdpi, mdpi drawable folders that serve no apparent purpose because they're not being called by anything... Looking at the stock ROM as a whole it seems very sloppily made and a lot of things seem like after thoughts.
     
    spock1104 and edodson84 like this.
  17. edodson84

    edodson84 Android Expert
    Rank:
    None
    Points:
    223
    Posts:
    1,218
    Joined:
    Jan 29, 2014

    Jan 29, 2014
    1,218
    510
    223
    Male
    Master Powersports Technician
    Bellwood, pa
    Agreed lots of obsolete code from previous devices eg: lock screen, also theres code for sim eg: network controller, so probably incomplete or obsolete kernel source
     
    starkraving likes this.
  18. spock1104

    spock1104 Android Expert
    Thread Starter
    Rank:
    None
    Points:
    223
    Posts:
    1,038
    Joined:
    Jul 9, 2013

    Jul 9, 2013
    1,038
    905
    223
    From what I can tell the other drivers are working and present, though I admittedly haven't tried bluetooth yet. In this case it looks like they tried to integrate the driver but their own edits to it got in the way and they eventually pulled a module from a different phone.
     
  19. edodson84

    edodson84 Android Expert
    Rank:
    None
    Points:
    223
    Posts:
    1,218
    Joined:
    Jan 29, 2014

    Jan 29, 2014
    1,218
    510
    223
    Male
    Master Powersports Technician
    Bellwood, pa
    Thats zte for ya lol
     
  20. spock1104

    spock1104 Android Expert
    Thread Starter
    Rank:
    None
    Points:
    223
    Posts:
    1,038
    Joined:
    Jul 9, 2013

    Jul 9, 2013
    1,038
    905
    223
    Well, I figured out the zero signal issue. The wifi firmware wasn't included with the kernel source. No firmware on the chip means no signal!
     
  21. starkraving

    starkraving Android Expert
    Rank:
    None
    Points:
    323
    Posts:
    2,484
    Joined:
    Apr 27, 2013

    Apr 27, 2013
    2,484
    1,363
    323
    Male
    Contractor
    Las Vegas, Nv
    Yup incomplete source...just like I have read with other devices. Sad...well the old adage "You get what you pay for..." Lol oh ZTE.
     
  22. starkraving

    starkraving Android Expert
    Rank:
    None
    Points:
    323
    Posts:
    2,484
    Joined:
    Apr 27, 2013

    Apr 27, 2013
    2,484
    1,363
    323
    Male
    Contractor
    Las Vegas, Nv
    Yeah definitely one of the hottest on charge handsets I've ever had. Even powered off it can get warm to the touch. I'm guessing its battery/hardware...But anything that helps is a positive.
     
  23. DsyMnapTic

    DsyMnapTic Android Expert
    Rank:
    None
    Points:
    153
    Posts:
    1,119
    Joined:
    Apr 29, 2011

    Apr 29, 2011
    1,119
    204
    153
    The rocky mountains
    I've actually had better temps with an after market charger and I keep airplane mode on and GPS off, auto syncing off and rotation off.
     
  24. starkraving

    starkraving Android Expert
    Rank:
    None
    Points:
    323
    Posts:
    2,484
    Joined:
    Apr 27, 2013

    Apr 27, 2013
    2,484
    1,363
    323
    Male
    Contractor
    Las Vegas, Nv
    Wow...well we shouldn't have to shut every feature of the device off to charge. Its ridiculous imo...and the manufacturer doesn't care because its not a big 4 device and aren't going to do a maintenance update or a HW revision. I guess that's where the dev community steps in.
     
  25. DsyMnapTic

    DsyMnapTic Android Expert
    Rank:
    None
    Points:
    153
    Posts:
    1,119
    Joined:
    Apr 29, 2011

    Apr 29, 2011
    1,119
    204
    153
    The rocky mountains
    Well it's easy for me because I only use it over Wi-Fi as of right now. I may activate it one day, LoL but VOIP every now and then is cool with me.
     
Tags:

Share This Page

Loading...