[Z00L][KERNEL]Enhancements For Increased Battery Backup

Status
Not open for further replies.

pokipokipxorn

Senior Member
Nov 22, 2016
366
194
0
Hi all, there won't be any kernel updates for the time being, coz I'm busy for Chinese new year, maybe 2nd/3rd week of Feb.

Noticed some battery issues with RR nougat for the past week, its the ROM itself with stock kernel (check their thread). I recommend either roll back to previous working versions or wait it out.

TBH, its really best to wait for Lineage to streamline everything officially, then the ROMs adopt it. Try to understand the birthing pains coz CM is gone for good, their infra & back end devs. Its the same for other phone models, their ROMs and custom kernels. Once u see the night lies are up, wait for the ROM devs to sync.

I haven't been using my PC for the past 7 days. Battery savings apps I'm using now

Cm13 xposed

Greenify, shallow hibernation & aggressive doze disabled

ForceDoze, doze delay 0, disable motion sensing for doze (root), (force doze immediately after screen off, ignore any physical movement)

Disable Battery Optimization for apps which need immediate notifications, ie greenify, forcedoze, calendar, clock alarm app, WhatsApp etc

Note greenify & forcedoze need root but can function without xposed, so nougat users can try them, pls report results if you do

Check with BetterBatteryStats XDA version, phone goes into Deep Sleep most of the time, batt drainage is 0-1.5%/hr if your network/WiFi coverage is good, moderate usage
 
Last edited:
  • Like
Reactions: ThanveerAliSayed

pokipokipxorn

Senior Member
Nov 22, 2016
366
194
0
@nougat users

pls indicate which nougat rom, especially version & build date, which is more or less stable, which DOESN'T have any battery draining issues. I will then recompile a custom kernel of that rom, no eta though.

Note that I do not keep track of any nougat roms coz I don't use them. If u give me a buggy rom version, a custom kernel will not have much impact on battery backup (wasted effort). So, pls examine properly which rom version is suitable.
 

heerarana

Senior Member
Oct 18, 2013
568
71
0
Kathmandu
@nougat users

pls indicate which nougat rom, especially version & build date, which is more or less stable, which DOESN'T have any battery draining issues. I will then recompile a custom kernel of that rom, no eta though.

Note that I do not keep track of any nougat roms coz I don't use them. If u give me a buggy rom version, a custom kernel will not have much impact on battery backup (wasted effort). So, pls examine properly which rom version is suitable.
Hi Dev,
Yes, there is a new build for RR-N-v5.8.0-20170121-Z00L and has improved some battery life and fast charging but still it won't stick for a while... I would suggest to develop good kernel for XOSP Rom (this rom has butter smoothness than any other ROMs)
 

pokipokipxorn

Senior Member
Nov 22, 2016
366
194
0
for reference, I won't be doing this forever, if any of u want to do the same in future, here is the workflow (wip) to compile a custom kernel for any rom. Setup a kernel development environment on linux, google on how to do this properly for your linux distro.

Example: [ROM] [UNOFFICIAL] XOSP N 7.1.1 for Z00L


#01 extract running kernel config

first download the extract config tool named extract-ikconfig, which is a script from Linus Torvalds to pull kernel config from any linux kernel
Code:
mkdir -p ~/kerneldev/config ;
cd ~/kerneldev/config ;
wget https://raw.githubusercontent.com/torvalds/linux/master/scripts/extract-ikconfig ;
chmod +x extract-ikconfig ;
copy boot.img from the ROM zip file to folder ~/kerneldev/config, then extract kernel config
Code:
./extract-ikconfig boot.img > xosp711_Z00L_defconfig
(boot.img is the kernel of the rom
> xosp711_Z00L_defconfig will output kernel config to file xosp711_Z00L_defconfig)


#02 identify running kernel version, source & commit
Settings > About Phone
Locate Kernel version
3.10.49-cyanogenmod-gb95f221
(kernel version is 3.10.49
source is from cyanogenmod
with latest commit gb95f221)


#03 locate & clone kernel source from github
note the branch & latest commit, kernel source
Code:
cd ~ ;
mkdir -p ~/kerneldev/source/xosp_nougat ;
cd ~/kerneldev/source/xosp_nougat ;
git init ;
git clone "https://github.com/CyanogenMod/android_kernel_asus_msm8916/tree/cm-14.1"
(source is around 1.6Gb, I'm on 4Mbps/512kbps line, took me 1.5 hours to download
it's best to setup a proper github account, google for tutorial
if rom dev did not publish kernel source, just search github for it, important to verify version, branch & commit info
kernel sources for nougat roms:
xosp https://github.com/CyanogenMod/android_kernel_asus_msm8916/tree/cm-14.1
aicp https://github.com/LineageOS/android_kernel_asus_msm8916
aokp https://github.com/LineageOS/android_kernel_asus_msm8916 )


#04 locate & clone toolchain
I use UBER-4.9-kernel toolchain for max. compatibility
Code:
mkdir -p ~/kerneldev/toolchain ;
cd ~/kerneldev/toolchain ;
git init ;
git clone "https://bitbucket.org/UBERTC/aarch64-linux-android-4.9-kernel.git" ;
(toolchain is a collection of libs, utils specific to the platform we are compiling for, which is arm64)


#05 setup environment for kernel compile
Code:
export PATH=~/kerneldev/toolchain/aarch64-linux-android-4.9-kernel/bin:$PATH ; 
export CROSS_COMPILE=~/kerneldev/toolchain/aarch64-linux-android-4.9-kernel/bin/aarch64-linux-android- ;
(do this each time you open a terminal for kernel compile, it specifies the tools & path needed for successful compilation)


#06 compile ROM stock kernel for testing purposes, this verifies your kernel dev environment is error-free
Code:
mkdir -p ~/kerneldev/source/xosp_nougat/output ;
cd ~/kerneldev/source/xosp_nougat/android_kernel_asus_msm8916 ;
(folder output is the location of kernel after successful compilation
to be exact, the kernel file will be located at output/arch/arm64/boot/ folder)

Code:
make ARCH=arm64 O=~/kerneldev/source/xosp_nougat/output clean ;
make ARCH=arm64 O=~/kerneldev/source/xosp_nougat/output mrproper ;
make ARCH=arm64 O=~/kerneldev/source/xosp_nougat/output distclean ;
(flush the output folder, start with clean slate)

Code:
cp ~/kerneldev/config/xosp711_Z00L_defconfig ~/kerneldev/source/xosp_nougat/android_kernel_asus_msm8916/arch/arm64/configs/ ;
(copy the ROM stock kernel config to kernel source)

Code:
make ARCH=arm64 O=~/kerneldev/source/xosp_nougat/output xosp711_Z00L_defconfig ;
(ARCH=arm64 specifies the architecture we are cross-compiling for, note your pc is installed with linux x86/x86_64
O=~/kerneldev/source/xosp_nougat/output defines the output folder
xosp711_Z00L_defconfig, which is the ROM stock kernel config to be used for compile)

Code:
make ARCH=arm64 O=~/kerneldev/source/xosp_nougat/output savedefconfig ;
(make a copy of current kernel config, which is xosp711_Z00L_defconfig, to be used as default from now on)

Code:
make ARCH=arm64 O=~/kerneldev/source/xosp_nougat/output -j4 Image ;
(start compile of kernel
-j4 specifies the number of cpu cores to be used for compilation, if your cpu is dual-core, use -j4
if your cpu is quad-core, use -j8
more cores means faster compilation times
file Image is the kernel itself, required)

Code:
make ARCH=arm64 O=~/kerneldev/source/xosp_nougat/output -j4 Image.gz ;
(file Image.gz is a gzipped version of the kernel, required)

Code:
make ARCH=arm64 O=~/kerneldev/source/xosp_nougat/output -j4 dtbs ;
(files dtbs are qualcomm's device tree binaries, required)

Code:
make ARCH=arm64 O=~/kerneldev/source/xosp_nougat/output -j4 Image.gz-dtb ;
(file Image.gz-dtb is the kernel with qualcomm dtb files appended, which we will use for packing
it is located ~/kerneldev/source/xosp_nougat/output/arch/arm64/boot/)


#07 locate & clone boot image tools
Code:
mkdir -p ~/kerneldev/bootimg ;
cd ~/kerneldev/bootimg ;
git init ;
git clone https://github.com/xiaolu/mkbootimg_tools.git ;

#08 unpack original rom boot image, to extract ramdisk.packed & settings from file img_info
Code:
mkdir -p ~/kerneldev/bootimg/new ;
mkdir -p ~/kerneldev/bootimg/source ;
mkdir -p ~/kerneldev/bootimg/unpacked ;
copy boot.img from rom zip file into folder ~/kerneldev/bootimg/source then
Code:
mv boot.img xosp711_stock.img ;
(rename boot.img to xosp711_stock.img)

unpack xosp711_stock.img
Code:
~/kerneldev/bootimg/mkbootimg_tools/mkboot ~/kerneldev/bootimg/source/xosp711_stock.img ~/kerneldev/bootimg/unpacked/xosp711
(mkboot is the utility used for unpacking boot images
xosp711_stock.img is the boot image
~/kerneldev/bootimg/unpacked/xosp711 is the output folder)

open file ~/kerneldev/bootimg/unpacked/xosp711/img_info using any text editor, note the values


#09 repack boot image
Code:
cd ~/kerneldev/bootimg/unpacked/xosp711 ;
~/kerneldev/bootimg/mkbootimg_tools/mkbootimg --base 0x80000000 --pagesize 2048 --kernel_offset 0x00008000 --ramdisk_offset 0x01000000 --second_offset 0x00f00000 --tags_offset 0x00000100 --cmdline 'console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci lpm_levels.sleep_disabled=1 buildvariant=userdebug' --kernel ~/kerneldev/source/xosp_nougat/output/arch/arm64/boot/Image.gz-dtb --ramdisk ramdisk.packed -o ~/kerneldev/bootimg/new/xosp711_MYstock.img ;
(mkbootimg is the utility to pack boot image
--base corresponds to base_addr in file img_info, value is 0x80000000
--pagesize corresponds to page_size in file img_info, value is 2048
--kernel_offset corresponds to kernel_offset in file img_info, value is 0x00008000
--ramdisk_offset corresponds to ramdisk_offset in file img_info, value is 0x01000000
--second_offset leave the value unchanged, which is 0x00f00000
--tags_offset corresponds to tags_offset in file img_info, value is 0x00000100
--cmdline is a bit tricky, the values is DIFFERENT for each rom/kernel, copy exactly from file img_info
--cmdline corresponds to cmd_line in file img_info, value is 'console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci lpm_levels.sleep_disabled=1 buildvariant=userdebug'
--kernel points to full path of Image.gz-dtb, which is the final kernel file compiled in #06
--ramdisk points to stock ramdisk.packed
-o ~/kerneldev/bootimg/new/xosp711_MYstock.img points to output folder, with new boot image filename xosp711_MYstock.img)


#10 test your kernel
Note that, at this point, you have successfully re-compiled a kernel based on stock config from the ROM. Your boot image is exactly the same as the one being supplied in the ROM itself. Steps #01-#10 is necessary to prove your kernel development tools/environment is error-free. This reduces complications during custom kernel compile.

Connect phone to PC using USB cable, put phone into fastboot mode
Code:
fastboot boot ~/kerneldev/bootimg/new/xosp711_MYstock.img
(this will boot the phone using your kernel, one time only
nothing is being flashed onto the phone
If your phone boots into Home Screen, that means your kernel is complete and boots successfully)

if you want to FLASH (not test) a boot image:
Connect phone to PC using USB cable, put phone into fastboot mode
Code:
fastboot flash boot ~/path/to/boot.img
After phone boots successfully into Home Launcher screen, launch SuperSU to update its binary, select TWRP method, it will restart phone into TWRP and update itself automatically, followed by a restart again.

Once reach Home Launcher screen, launch SuperSU to verify everything is fine.
Install Kernel Adiutor Mod from XDA to test/use new kernel features. Just by compiling a feature into a custom kernel means nothing, if the feature does not work.


#11 custom kernel by editing kernel config file

open file ~/kerneldev/source/xosp_nougat/android_kernel_asus_msm8916/arch/arm64/configs/xosp711_Z00L_defconfig using any text editor
save file as xosp711v01_Z00L_defconfig

find the following strings, change value from =y to =n
Code:
CONFIG_CPU_BOOST
CONFIG_MSM_CORE_CTL_HELPER
CONFIG_MSM_CORE_CTL
CONFIG_MSM_PERFORMANCE
CONFIG_MSM_PERFORMANCE_HOTPLUG_ON
find the following string, change value from ="cubic" to ="westwood"
Code:
CONFIG_DEFAULT_TCP_CONG
scroll down to end of file, copy and paste the following
Code:
CONFIG_CLUSTER_PLUG=n
CONFIG_SCHED_SMT=n
CONFIG_IKCONFIG_PROC=y
CONFIG_NTFS_FS=y
CONFIG_NTFS_RW=y
CONFIG_NTFS_DEBUG=n
CONFIG_TCP_CONG_ADVANCED=y
CONFIG_TCP_CONG_WESTWOOD=y
CONFIG_KSM=y
CONFIG_CLEANCACHE=y
CONFIG_FRONTSWAP=y
CONFIG_ZSWAP=n
CONFIG_ZCACHE=n
CONFIG_TCP_CONG_BIC=y
CONFIG_TCP_CONG_HTCP=y
CONFIG_TCP_CONG_HSTCP=y
CONFIG_TCP_CONG_HYBLA=y
CONFIG_TCP_CONG_VEGAS=y
CONFIG_TCP_CONG_SCALABLE=y
CONFIG_TCP_CONG_LP=y
CONFIG_TCP_CONG_VENO=y
CONFIG_TCP_CONG_YEAH=y
CONFIG_TCP_CONG_ILLINOIS=y
CONFIG_DEFAULT_WESTWOOD=y
save and close file

( kernel features added:
- tcp-algorithm: westwood
- kernel config.gz at /proc
- filesystem: ntfs
- kernel: samepage merging, frontswap, cleancache)

( kernel features removed:
- cpu: cpu boost
- cpu hotplug: msm performance, including touch boost)

recompile kernel with custom config as above, we will label it as v01
Code:
cd ~/kerneldev/source/xosp_nougat/android_kernel_asus_msm8916 ;
make ARCH=arm64 O=~/kerneldev/source/xosp_nougat/output xosp711v01_Z00L_defconfig ;
make ARCH=arm64 O=~/kerneldev/source/xosp_nougat/output savedefconfig ;
make ARCH=arm64 O=~/kerneldev/source/xosp_nougat/output -j4 Image ;
make ARCH=arm64 O=~/kerneldev/source/xosp_nougat/output -j4 Image.gz ;
make ARCH=arm64 O=~/kerneldev/source/xosp_nougat/output -j4 dtbs ;
make ARCH=arm64 O=~/kerneldev/source/xosp_nougat/output -j4 Image.gz-dtb ;
repeat steps #09 & #10, but use a different file name for kernel image, example xosp711_custom-v01.img

Code:
cd ~/kerneldev/source/xosp_nougat/android_kernel_asus_msm8916 ;
git status ;
(see 2 files listed in red color
these 2 files were the only changes in the kernel source so far)

Code:
git add arch/arm64/configs/xosp711_Z00L_defconfig ;
git add arch/arm64/configs/xosp711v01_Z00L_defconfig ;
(add the 2 files so git can track and commit to kernel source)

Code:
git commit ;
(will be presented with a vi screen
locate the 2 lines listing the 2 files
uncomment/delete the # at beginning of the 2 lines
save and quit
if you don't know how to use vi, google for tutorial)

Code:
git status ;
(nothing to commit, v01 changes added successfully to kernel source, tracked by git)


#12 cherry-pick worthy commits, one at a time

there are many custom kernels all over xda & other forums, with a lot of desired kernel features (example)
how do we choose which feature to implement?
some tips:
- always choose features from the same device family/model if possible
- best to choose only 1 feature to implement at a time, troubleshooting is easier
- kernel source date is not important, it could be 1 week ago or 2 years ago
- always choose the oldest commit date for that feature, example a file could be edited 10 times, but always choose the 1st change/commit
- the feature chosen may or may not work on our device, need to test & verify function, revert feature if necessary
explained here

For our usage, we will use the excellent Nemesis Fusion kernel by abhishekr700

go to Nemesis Fusion kernel thread
look through the features, choose one to implement in our custom kernel
example
Code:
[b]23.) Set SELINUX to permissive permanently from the kernel.[/b]
go to Nemesis Fusion kernel source page at github
top-left, "This repository" | Search
input: selinux
press ENTER

left-center, Commits "1", click
center, "Set SELINUX to permissive permanently", click
(there is only 1 commit for SELinux
note the commit hash 210b6576b592eaa30c10b688d9b770f3b2a09229 at upper-right
now examine the commit page
"Showing 1 changed file with 1 addition and 0 deletions."
note file security/selinux/selinuxfs.c
line 170 +
means the commit added lines 170-173 into file security/selinux/selinuxfs.c
note for some other commits, there could 2 or more file changes
+ is added lines or text
- is removed lines or text)

Code:
cd ~/kerneldev/source/xosp_nougat/android_kernel_asus_msm8916 ;
git fetch https://github.com/abhishekr700/Nemesis_Kernel.git ;
(fetch could take some time
fetch links our kernel source to Nemesis Fusion kernel source)

Code:
git cherry-pick 210b6576b592eaa30c10b688d9b770f3b2a09229 ;
(this will select commit hash 210b6576b592eaa30c10b688d9b770f3b2a09229
from Nemesis Fusion Kernel source to merge with our kernel source)

Code:
git status ;
git commit ;
kernel change log
version 02

kernel features added:
security: SELinux set to permissive
commit hash 210b6576b592eaa30c10b688d9b770f3b2a09229

recompile kernel with custom config as above, we will label it as v02
Code:
cd ~/kerneldev/source/xosp_nougat/android_kernel_asus_msm8916 ;
make ARCH=arm64 O=~/kerneldev/source/xosp_nougat/output xosp711v01_Z00L_defconfig ;
make ARCH=arm64 O=~/kerneldev/source/xosp_nougat/output savedefconfig ;
make ARCH=arm64 O=~/kerneldev/source/xosp_nougat/output -j4 Image ;
make ARCH=arm64 O=~/kerneldev/source/xosp_nougat/output -j4 Image.gz ;
make ARCH=arm64 O=~/kerneldev/source/xosp_nougat/output -j4 dtbs ;
make ARCH=arm64 O=~/kerneldev/source/xosp_nougat/output -j4 Image.gz-dtb ;
repeat steps #09 & #10, but use a different file name for kernel image, example xosp711_custom-v02.img


#13 Other commits == WIP ==
version 03
Disable CRC Check for 30% Performance Boost
38ce9f82183c3ded60115a061b6d1531d05a4051


version 04
Adding USB Fast Charge, credits to @ENGstk
d90d3fe1a9efc6d870131467ccdf5b6b4dbb9400
.config append, CONFIG_FORCE_FAST_CHARGE=y
answer N to all other config options


version 05
added autosmp hotplug
autosmp.c file to be copied from
https://github.com/Tomoms/helium_kernel/commit/640b9d36ce0322d9817fe45f4a7424c130e66493

Code:
.config
CONFIG_ASMP=y
CONFIG_MSM_PERFORMANCE=n
CONFIG_MSM_PERFORMANCE_HOTPLUG_ON=n

Kconfig
config ASMP
    bool "Multi-core automatic hotplug support"
    depends on SMP
    default y
    help
      Automatically hotplugs the multiple cpu cores on and off
      based on cpu load and suspend state

Makefile
obj-$(CONFIG_ASMP)	+= autosmp.o
# compile new kernel (custom)
# repack new kernel (custom) into boot image
# test new boot image
# flash new boot image
 
Last edited:

pokipokipxorn

Senior Member
Nov 22, 2016
366
194
0
DOWNLOAD
edit: download link removed, to comply with GPLv3, will reinstate download link once sources are published, no ETA though
before flashing my kernel, read disclaimer at post #1, make a backup of your phone partitions, imei, running kernel, settings, data etc
unzip & copy to sdcard, flash via fastboot or TWRP

New Upload, 2017 Jan 26th, features are the same as previous kernels (nothing new), just a re-compile
ROM aicp_Z00L_n-12.1-UNOFFICIAL-20170122
kernel v05-aicp_Z00L_n-12.1-20170122.7z

ROM aokp_Z00L_nougat_unofficial_2017-01-24_0801
kernel v05-aokp_Z00L_nougat_2017-01-24_0801.7z

ROM XOSP-RL7-REV2-UNOFFICIAL-20170115-Z00L
kernel v05-XOSP-RL7-REV2-20170115-Z00L.7z
 
Last edited:

pokipokipxorn

Senior Member
Nov 22, 2016
366
194
0
DOWNLOAD
edit: download link removed, to comply with GPLv3, will reinstate download link once sources are published, no ETA though
before flashing my kernel, read disclaimer at post #1, make a backup of your phone partitions, imei, running kernel, settings, data etc
unzip & copy to sdcard, flash via fastboot or TWRP

New Upload, 2017 Jan 27th, features are the same as previous kernels (nothing new), just a re-compile

ROM RR-N-v5.8.0-20170121-Z00L-OFFICIAL
kernel v05-RR-N-v5.8.0-20170121-Z00L.7z
 
Last edited:
  • Like
Reactions: ThanveerAliSayed

pokipokipxorn

Senior Member
Nov 22, 2016
366
194
0
using my kernels for quick antutu benchmarking, the results are close to each other

(nougat roms)

aokp v05
antutu 22440

aicp v05
antutu 22298

rr v05
antutu 22170

xosp v05
antutu 22057
 
Last edited:

pokipokipxorn

Senior Member
Nov 22, 2016
366
194
0
Need some help from you guys. If you have ZE550KL ZE500KL ZE551KL ZE600KL ZE601KL, SKU Global or WW, can you donate your edited QCN file to me? Please PM or mail (myuserid-at-geemaildotcom) the edited QCN file to me, otherwise I have to send my phone to ASUS service center, and it will take weeks to repair. Coz I don't have any connection to 3G/4G data connection right now, only have 2G. Thank you.

Steps to extract QCN file from phone, you need to backup your own QCN anyway

1st to disable "Driver Signature Enforcement" in Windows, allowing Qualcomm drivers to load/install
- restart windows
- before Windows logo shows, *quickly* press F8 multiple times
- a menu appears, press arrow down key, go to bottom
- select "Disable Driver Signature Enforcement"
- press Enter to continue booting into Windows

Connect phone to PC, set phone in DIAG mode, at any command prompt
Code:
adb shell
wait for the adb shell, then
Code:
su
setprop sys.usb.config diag,adb
(phone will switch mode to DIAG, Windows will install some drivers automatically, if driver install is unsuccessful, use Qualcomm_Diag_QD_Loader_2016_driver)

To install QPST v2.7.437 & backup QCN file (note save as .qcn, NOT .xqcn)
Follow this tutorial (Step #4 onwards)

Edit QCN file using HEXedit, to replace your IMEI with 88 88 88 88 88 88 88 88 88 (imei1) and 88 88 88 88 88 88 88 88 88 (imei2), IMEI Converter if required
Follow this guide
 
Last edited:
  • Like
Reactions: ThanveerAliSayed

ThanveerAliSayed

Senior Member
Jun 29, 2016
411
176
0
kochi
DOWNLOAD
https://drive.google.com/drive/folders/0B6el2bQ1QEMuVW5iSDJiYmpQRXM?usp=sharing
before flashing my kernel, read disclaimer at post #1, make a backup of your phone partitions, imei, running kernel, settings, data etc
unzip & copy to sdcard, flash via fastboot or TWRP

New Upload, 2017 Jan 27th, features are the same as previous kernels (nothing new), just a re-compile

ROM RR-N-v5.8.0-20170121-Z00L-OFFICIAL
kernel v05-RR-N-v5.8.0-20170121-Z00L.7z


I tried this kernel. And getting best backup thanks

I am on RR nougat 21-2017 build

---------- Post added at 05:42 AM ---------- Previous post was at 05:40 AM ----------

Need some help from you guys. If you have ZE550KL ZE500KL ZE551KL ZE600KL ZE601KL, SKU Global or WW, can you donate your edited QCN file to me? Please PM or mail (myuserid-at-geemaildotcom) the edited QCN file to me, otherwise I have to send my phone to ASUS service center, and it will take weeks to repair. Coz I don't have any connection to 3G/4G data connection right now, only have 2G. Thank you.

Steps to extract QCN file from phone, you need to backup your own QCN anyway

1st to disable "Driver Signature Enforcement" in Windows, allowing Qualcomm drivers to load/install
- restart windows
- before Windows logo shows, *quickly* press F8 multiple times
- a menu appears, press arrow down key, go to bottom
- select "Disable Driver Signature Enforcement"
- press Enter to continue booting into Windows

Connect phone to PC, set phone in DIAG mode, at any command prompt


wait for the adb shell, then

(phone will switch mode to DIAG, Windows will install some drivers automatically, if driver install is unsuccessful, use Qualcomm_Diag_QD_Loader_2016_driver)

To install QPST v2.7.437 & backup QCN file (note save as .qcn, NOT .xqcn)
Follow this tutorial (Step #4 onwards)

Edit QCN file using HEXedit, to replace your IMEI with 88 88 88 88 88 88 88 88 88 (imei1) and 99 99 99 99 99 99 99 99 99 (imei2), IMEI Converter if required
Follow this guide

I can give u. I already got the qpst installed in my pc.
 

ThanveerAliSayed

Senior Member
Jun 29, 2016
411
176
0
kochi
Need some help from you guys. If you have ZE550KL ZE500KL ZE551KL ZE600KL ZE601KL, SKU Global or WW, can you donate your edited QCN file to me? Please PM or mail (myuserid-at-geemaildotcom) the edited QCN file to me, otherwise I have to send my phone to ASUS service center, and it will take weeks to repair. Coz I don't have any connection to 3G/4G data connection right now, only have 2G. Thank you.

Steps to extract QCN file from phone, you need to backup your own QCN anyway

1st to disable "Driver Signature Enforcement" in Windows, allowing Qualcomm drivers to load/install
- restart windows
- before Windows logo shows, *quickly* press F8 multiple times
- a menu appears, press arrow down key, go to bottom
- select "Disable Driver Signature Enforcement"
- press Enter to continue booting into Windows

Connect phone to PC, set phone in DIAG mode, at any command prompt
Code:
adb shell
wait for the adb shell, then
Code:
su
setprop sys.usb.config diag,adb
(phone will switch mode to DIAG, Windows will install some drivers automatically, if driver install is unsuccessful, use Qualcomm_Diag_QD_Loader_2016_driver)

To install QPST v2.7.437 & backup QCN file (note save as .qcn, NOT .xqcn)
Follow this tutorial (Step #4 onwards)

Edit QCN file using HEXedit, to replace your IMEI with 88 88 88 88 88 88 88 88 88 (imei1) and 99 99 99 99 99 99 99 99 99 (imei2), IMEI Converter if required
Follow this guide


I've made the file. i will pm you the drive link .and the imei1 and imei2 is replaced as you said

my phone is Zenfone laser 550kl 2gb ram model
 

pokipokipxorn

Senior Member
Nov 22, 2016
366
194
0
It took me non-stop 36 hours, but I did it. My dead-bricked phone is alive. Just yesterday, it was totally non-responsive, no light, no led, no buzz, not even fastboot/recovery, due to me flashing other Zenfone 2 Laser dump image, while trying to fix my 2G problem.

Luckily, I had a partition dump backup made 2 months ago, which I found deep in my sdcard. I would recommend everyone also make a full backup, and test the restore process.

Will write a proper guide in time, for now, at the very least, use this excellent Partition Backup by wanam. Be sure to choose to backup the 100MB of phone low-level partitions.
 

pokipokipxorn

Senior Member
Nov 22, 2016
366
194
0
gotta jot this down before I go to sleep

note requirments of access modes, file types, restore conditions/modes, severe limitations, flow
backup & restore utility
restore utils/methods must be well tested, supported, fits limitations

EMMCRAW.exe
qpst
qfil
miflash
toolstudio
qcn editor

always make backups in preparation for restoring under worst possible scenarios like the following

#1 deadboot, without recovery, fastboot, no led/screen/buzz/response
need files emmc dump (bin/img) restore using utilities emmcraw, HDDRawCopy1.10Portable, qpst_emmcswdownload/service programming etc
need files gpt_partition_table/mbn from special service/raw asus firmware, restore using utilities qfil, miflash, qpst, asus flash tool

#2 qdloader 9006/9008 mode need latest qualcomm drivers, windows disable driver signing, minitool partition wizard, miflash, qfil

#4 partition data corruption need individual partition dumps, adb dd access

#5 nvram data corruption need efs pro, qxdm, qpst qcn access, diag mode & non-asus rom

#6 loss of screen due to breakage

new service firmware
 
Last edited:

ThanveerAliSayed

Senior Member
Jun 29, 2016
411
176
0
kochi
It took me non-stop 36 hours, but I did it. My dead-bricked phone is alive. Just yesterday, it was totally non-responsive, no light, no led, no buzz, not even fastboot/recovery, due to me flashing other Zenfone 2 Laser dump image, while trying to fix my 2G problem.

Luckily, I had a partition dump backup made 2 months ago, which I found deep in my sdcard. I would recommend everyone also make a full backup, and test the restore process.

Will write a proper guide in time, for now, at the very least, use this excellent Partition Backup by wanam. Be sure to choose to backup the 100MB of phone low-level partitions.

Congrats. Expecting your custom kernel with more updates in future :)
 

pokipokipxorn

Senior Member
Nov 22, 2016
366
194
0
@all

Please download the kernels you need coz I may remove the links in a few days time.

I have been told to publish the sources of all the kernels and that means I have to upload the source & commits. But I'm on a measly 4Mbps-download/512kbps-upload ADSL line (shared with others in the house) {oooe-gasp!}. Each set of kernel source takes 1.5 hours to download, plus the fetchs/commits takes longer. Typically go through 5-10 fetches to find a working version of a commit, each fetch takes 30-45mins. Can't manage so many kernels anymore, probably choose 1-2 only. Sorry.
 
Status
Not open for further replies.