FORUMS
Remove All Ads from XDA

[GUIDE][any UNLOCKED G4]create a custom X cores boot image (ILAPO tempfix)

4,454 posts
Thanks Meter: 10,989
 
By steadfasterX, Recognized Developer on 12th December 2017, 06:31 PM
Post Reply Email Thread
24th January 2018, 08:30 PM |#11  
Senior Member
Thanks Meter: 155
 
More
I've been using this on a phone that was overheating a couple times a day. It's been two days without a reboot/loop. Thanks!

You've given new life for a phone that was sitting in a drawer. This, combined with the bootloader unlock, and the roms are fantastic!
The Following User Says Thank You to DoughMucker For This Useful Post: [ View ] Gift DoughMucker Ad-Free
 
 
24th January 2018, 09:56 PM |#12  
steadfasterX's Avatar
OP Recognized Developer
Thanks Meter: 10,989
 
Donate to Me
More
Quote:
Originally Posted by DoughMucker

I've been using this on a phone that was overheating a couple times a day. It's been two days without a reboot/loop. Thanks!

You've given new life for a phone that was sitting in a drawer. This, combined with the bootloader unlock, and the roms are fantastic!

I'm glad it helps



Sent from my LG-H815 using XDA Labs
The Following User Says Thank You to steadfasterX For This Useful Post: [ View ]
15th February 2018, 03:11 PM |#13  
Member
Thanks Meter: 20
 
More
Can I do it on Nougat or Oreo based roms? Do I need to flash the rom first and then edit or do it before?
15th February 2018, 03:21 PM |#14  
steadfasterX's Avatar
OP Recognized Developer
Thanks Meter: 10,989
 
Donate to Me
More
Quote:
Originally Posted by ojcu

Can I do it on Nougat or Oreo based roms? Do I need to flash the rom first and then edit or do it before?

ANY means ANY right?
You would first first flash your ROM then the modified boot image.

.
15th February 2018, 04:08 PM |#15  
Member
Thanks Meter: 20
 
More
Quote:
Originally Posted by steadfasterX

ANY means ANY right?

.

I know it was one of the noobest questions I could ask but I've never done it before so just making sure. Thanks
15th February 2018, 07:05 PM |#16  
Senior Member
Thanks Meter: 338
 
More
I've had a quick look for a way to do this from within android but had no luck. I wonder if there's a kitchen tool in the play store that would work, or some android shell or busybox type add-on.
11th March 2018, 11:19 PM |#17  
Junior Member
Thanks Meter: 2
 
More
@steadfasterX Apologies for the noob request, I am not very good with linux , i followed the steps above , and when i try to flash the boot image it raises an error in fastboot remote:image is not a boot image
Kindly assist me.
15th March 2018, 09:05 PM |#18  
Junior Member
Thanks Meter: 2
 
More
Quote:
Originally Posted by steadfasterX

The X cores GUIDE

About

I have created many bootloop-fix boot images in the past and as the way to do it on your own is (in general) very easy I wanted to write it down so everyone can do it by himself.
The reason? The ILAPO (hardware related bootloop) happens due to overheating and so throttling the device may help in extends the life of your device and can even resurrect your phone when in a bootloop.
Again using a reduced amount of cores will be a temporary fix only as the ILAPO is a hardware issue! Read the bootloop-fixit-list for details.

Maybe you do not need to create one - checkout the current available 4-core boot images here: temporary-bootloop-fix-thread

This requires an unlocked device to flash and use!



Howto

Creating a custom boot image is very easy and done in 5 sec.

you need the tool: abootimg - so Linux or FWUL

Code:
abootimg -i boot.img
note and copy the whole cmdline output. Example (in red and bold):

Code:
Android Boot Image Info:

* file name = boot.img

* image size = 29614080 bytes (28.24 MB)
  page size  = 4096 bytes

* Boot Name = ""

* kernel size       = 26722280 bytes (25.48 MB)
  ramdisk size      = 1668572 bytes (1.59 MB)

* load addresses:
  kernel:       0x00008000
  ramdisk:      0x01000000
  tags:         0x00000100

* cmdline = console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom user_debug=31 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 msm_rtb.filter=0x37 boot_cpus=0-5 buildvariant=userdebug

* id = 0xf19c37df 0x9734fb7a 0x3c6b45f4 0x3a8d0267 0x32786841 0x00000000 0x00000000 0x00000000
Ok now you need to modify - NOT UNPACK the boot image!! thats 1) not necessary and 2) it will make your boot image unbootable (when using abootimg).

Now modify for your wanted amount of cores.
Let's assume you want to use in Android 4 cores as max and on boot 4 cores max as well:

Code:
abootimg -u boot.img -c "cmdline = maxcpus=4 boot_cpus=0-3 console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom user_debug=31 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 msm_rtb.filter=0x37 boot_cpus=0-5 buildvariant=userdebug"
  • Noted the bold part: maxcpus=4 boot_cpus=0-3 ? That is the magic which sets the wanted cores.
  • Noted the red part: console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom user_debug=31 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 msm_rtb.filter=0x37 boot_cpus=0-5 buildvariant=userdebug ?
    Thats just the regular cmdline copied from the original boot image you written done in the first step.
  • You may noticed that there is another boot_cpus value in that particular case set right? boot_cpus=0-5 in this case. You can remove or leave it as u like.
    The reason is: the boot cmdline will be handled like: first match = wins. so when doing as explained you will set boot_cpus and maxcpus at the very beginning of the cmdline and so we will overwrite whatever comes next.

maxcpus=X (recommended value for bootloop devices: 4)
X can be 1-6 and this defines the maximal amount of cores in Android. If you set it to 4 Android can use 4 only.

boot_cpus=Y-Z (recommended value for bootloop devices: "0-3" or if that still bootloops "0-1")
Y-Z can be 0-5(!) yes no 6! Thats the CPU core number to use on boot. 0-3 will use 4 cpus (so only the little ones) on boot. The difference to maxcpus is that the cpu number starting from 0 where 0 is the first core.

Verify your modified boot image:

Code:
abootimg -i boot.img

Android Boot Image Info:

* file name = boot.img

* image size = 29614080 bytes (28.24 MB)
  page size  = 4096 bytes

* Boot Name = ""

* kernel size       = 26722280 bytes (25.48 MB)
  ramdisk size      = 1668572 bytes (1.59 MB)

* load addresses:
  kernel:       0x00008000
  ramdisk:      0x01000000
  tags:         0x00000100

* cmdline = maxcpus=4 boot_cpus=0-3 console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom user_debug=31 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 msm_rtb.filter=0x37 boot_cpus=0-5
buildvariant=userdebug

* id = 0x00000160 0x4bd3a2b4 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000


Whats next?

So now you're prepared to flash your modified X cores boot image via fastboot and see if it boots

You can do this on every boot image or recovery image (so yes even on TWRP !)


Cheers
steadfasterX

Hello @steadfasterX
I wanted to request your assistance in creating a custom boot image for my device I tried to do it from your thread a couple of times I really don't know what the issue could be.
It raises the error remote :image is not a boot image when I try to flash it in fastboot
I have attached a link to my boot.bin image file
Thanks.https://mega.nz/#!m8QRXSJJ!R90SoS48O...IJ_Uvdrsp9tYoE
I am on the latest twrp for N posted on your server
16th March 2018, 07:02 AM |#19  
steadfasterX's Avatar
OP Recognized Developer
Thanks Meter: 10,989
 
Donate to Me
More
Quote:
Originally Posted by izzle47

Hello @steadfasterX
I wanted to request your assistance in creating a custom boot image for my device I tried to do it from your thread a couple of times I really don't know what the issue could be.
It raises the error remote :image is not a boot image when I try to flash it in fastboot
I have attached a link to my boot.bin image file
Thanks.https://mega.nz/#!m8QRXSJJ!R90SoS48O...IJ_Uvdrsp9tYoE
I am on the latest twrp for N posted on your server

first of all I have a friendly advice for you never ever quote big posts like mine. Regarding your problem try FWUL to modify it. I have no time at the moment sorry but maybe someone else can help you as well if FWUL doesn't help


Sent from my LG-H815 using XDA Labs
19th May 2018, 07:44 PM |#20  
Junior Member
Thanks Meter: 1
 
More
Hi

Thanks for sharing the method. I want to boot with only 1 core and later use 4 cores. How can i write for that:

maxcpus=4 boot_cpus=0-0
OR
maxcpus=4 boot_cpus=0

Also wanted to confirm that when do the maxcpus=4 become functional, i gues that starts to happen right after the LG logo appears or it happens when the boot process has finished.

I am guessing that boot_cpus=0-0 and 0 are not working. I can guess that because of the speed the animated logo appears. WHen it set it like max_cpus=1 it only boots and works on one core.

WHat i want is to boot with one core and later automatically switch to 4 cores when the system has loaded.
27th September 2018, 11:04 AM |#21  
steadfasterX's Avatar
OP Recognized Developer
Thanks Meter: 10,989
 
Donate to Me
More
Quote:
Originally Posted by capricorn85

Hi

Thanks for sharing the method. I want to boot with only 1 core and later use 4 cores. How can i write for that:

maxcpus=4 boot_cpus=0-0
OR
maxcpus=4 boot_cpus=0

Also wanted to confirm that when do the maxcpus=4 become functional, i gues that starts to happen right after the LG logo appears or it happens when the boot process has finished.

I am guessing that boot_cpus=0-0 and 0 are not working. I can guess that because of the speed the animated logo appears. WHen it set it like max_cpus=1 it only boots and works on one core.

WHat i want is to boot with one core and later automatically switch to 4 cores when the system has loaded.

boot_cpus=0-0 is wrong just boot_cpus=0 should work if not use "=1" or "=0-1"

maxcpus means: max available CPU cores (https://android.googlesource.com/ker...eters.txt#1883)
boot_cpus means: these CPU cores (0,1,2,3,4,5) will be powered on/enabled on boot (https://android.googlesource.com/ker...meters.txt#544)

so when you set maxcpus=4 and boot_cpus=0 it will use 1 core on boot and you will need to enable (up to 4 cores) in android (e.g. by an app).

.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes