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

steadfasterX

Recognized Developer
Nov 13, 2013
5,593
14,810
263
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/ke...r0.2/Documentation/kernel-parameters.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/ke..._r0.2/Documentation/kernel-parameters.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).

.
 

threehappypenguins

Senior Member
Jan 13, 2014
163
16
0
I think I need to change mine to 2 cores. I'm having trouble installing abootimg on FWUL. I tried using the command git clone and everything successfully downloaded. But I don't know what to do after that. Please help!
 

steadfasterX

Recognized Developer
Nov 13, 2013
5,593
14,810
263
I think I need to change mine to 2 cores. I'm having trouble installing abootimg on FWUL. I tried using the command git clone and everything successfully downloaded. But I don't know what to do after that. Please help!
Use FWUL v3 as there it is included.


Sent from my OnePlus 6T using XDA Labs
 

threehappypenguins

Senior Member
Jan 13, 2014
163
16
0
Use FWUL v3 as there it is included.


Sent from my OnePlus 6T using XDA Labs
I finally got FWUL 3 running, but it's in German. I have no choice but to convert it from .img to .vdi, open that in VirtualBox, then convert the .vdi to .vdmk because USB doesn't work right in VirtualBox, but it does in VMWare. When I did all this months ago, the first thing I did was try to put it on on USB and boot my computer into FWUL, but I couldn't get it to work. So that is why I use VMWare. But now it's all in German, and I've spent the last couple of hours using Google Translate and looking up how to change Arch Linux Manjaro's language. I still can't get this figured out. I thought all I needed to do was install abootimg on the current FWUL that worked, but I couldn't figure that out either. So here I am, stuck, trying to change a language because I can't read anything, and when I type things in the keyboard, they're different (slashes are dashes, and I don't know where the slash is so I have to copy and paste it from Google in Firefox, etc).
 

steadfasterX

Recognized Developer
Nov 13, 2013
5,593
14,810
263
I finally got FWUL 3 running, but it's in German. I have no choice but to convert it from .img to .vdi, open that in VirtualBox, then convert the .vdi to .vdmk because USB doesn't work right in VirtualBox, but it does in VMWare. When I did all this months ago, the first thing I did was try to put it on on USB and boot my computer into FWUL, but I couldn't get it to work. So that is why I use VMWare. But now it's all in German, and I've spent the last couple of hours using Google Translate and looking up how to change Arch Linux Manjaro's language. I still can't get this figured out. I thought all I needed to do was install abootimg on the current FWUL that worked, but I couldn't figure that out either. So here I am, stuck, trying to change a language because I can't read anything, and when I type things in the keyboard, they're different (slashes are dashes, and I don't know where the slash is so I have to copy and paste it from Google in Firefox, etc).
Do you read the changelog of FWUL v3? It's just some clicks to fix that language bug



Sent from my OnePlus 6T using XDA Labs
 

threehappypenguins

Senior Member
Jan 13, 2014
163
16
0
Do you read the changelog of FWUL v3? It's just some clicks to fix that language bug
I keep reading it over and over, and I just don't see it in the changelog. I tried ctrl + f to find anything about "language" or "German" and I can't find anything. I'm really sorry. I just don't see it. How do I change it?

---------- Post added at 05:49 PM ---------- Previous post was at 05:40 PM ----------

I managed to figure out that if I put:

$ localectl set-locale LANG=en_US.utf8

in terminal, that upon reboot, the flag in the bottom corner changes to a US one (rather than a German one), but everything is still in German.
 

steadfasterX

Recognized Developer
Nov 13, 2013
5,593
14,810
263
I keep reading it over and over, and I just don't see it in the changelog. I tried ctrl + f to find anything about "language" or "German" and I can't find anything. I'm really sorry. I just don't see it. How do I change it?

---------- Post added at 05:49 PM ---------- Previous post was at 05:40 PM ----------

I managed to figure out that if I put:

$ localectl set-locale LANG=en_US.utf8

in terminal, that upon reboot, the flag in the bottom corner changes to a US one (rather than a German one), but everything is still in German.
https://forum.xda-developers.com/an...-fastboot-driver-issues-t3526755/post78693097



Sent from my OnePlus 6T using XDA Labs
 

threehappypenguins

Senior Member
Jan 13, 2014
163
16
0
I successfully got FWUL going, changed the language (I didn't see the background arrow pointing to where the Language can be changed), and then converted everything to work in VMWare. Now I'm stuck on modifying the boot.img. I read, re-read, re-read again and again, and could not find *how* to modify boot.img. I am using Leafpad to edit all the text that I need to, ready to paste it into wherever I need to paste the modification. You explicitly said not to unpack boot.img I looked up how to modify boot.img, but all I can find are instructions on unpacking, modifying, and re-packing. I read every post in this thread. I cannot find anything on how to modify it. I'm sorry, I know I'm new at this.

---------- Post added at 08:02 PM ---------- Previous post was at 07:46 PM ----------

Doing more reading, I *think* I need to mount the boot image. However, I tried:

sudo mkdir /media/boot

then,

sudo mount -o loop boot.img /media/boot

but I get the error

mount: /media/boot: wrong fs type, bad option, bad superblock on /dev/loop1, missing codepage or helper program, or other error.
 

threehappypenguins

Senior Member
Jan 13, 2014
163
16
0
Okay, I GET IT NOW. Wayyyy overthinking this.

You said to modify the image, and gave an example of a command line to put in:

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"
So I needed to start with:

Code:
abootimg -u boot.img -c
And then continue with

Code:
"cmdline =
I just wasn't thinking clearly. I combed over the readme, and saw this:

Image configuration can be updated either by giving a configuration file
(-f option) or by giving individual config entries on the command line (-c).
Severial config entries (-c) can be given on comamd line.

As an example:

$ abootimg -u boot.img -f bootimg.new.cfg

will update the configuration without touching the kernel
nor the ramdisk

$ abootimg -u boot.img -c "cmdline = [email protected] [email protected] vmalloc=320M \
video=tegrafb console=tty0 usbcore.old_scheme_first=1 quiet splash elevator=noop \
tegraboot=sdmmc tegrapart=recovery:700:a00:800,boot:1100:1000:800,mbr:2100:200:800,\
system:2300:25800:800,cache:27b00:32000:800,misc:59b00:400:800,userdata:5a000:9a600:800"
 

steadfasterX

Recognized Developer
Nov 13, 2013
5,593
14,810
263
Okay, I GET IT NOW. Wayyyy overthinking this.

You said to modify the image, and gave an example of a command line to put in:


So I needed to start with:



And then continue with



I just wasn't thinking clearly. I combed over the readme, and saw this:
It's clearly written that you don't need to unpack or mount or whatever.
It's clearly written which command to use to view your current config:


Code:
abootimg -i boot.img
This will print your current cmdline like

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

You should copy that line and extend it at the beginning like this

Code:
abootimg -u boot.img -c "cmdline = [B]maxcpus=4 boot_cpus=0-3[/B] [COLOR="Red"]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[/COLOR]"

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.

All the above is copied from the OP and I have no idea how to describe it even more clear then this .
You are using complete other command switches (e.g -f which is not mentioned ever) and the cmdline of your example above is completely wrong for your device.
Just follow the steps they are there for a reason.





Sent from my OnePlus 6T using XDA Labs
 

threehappypenguins

Senior Member
Jan 13, 2014
163
16
0
Yes, I know, I'm saying I didn't see what was clearly there. I think what happened was I thought that the abootimg -u boot.img -c was all part of editing and not a command. I apologize. I can't delete my posts, so I figured I'd leave it and explain why I asked. This is a huge learning curve for me, especially since I don't even touch Linux except for maybe every 6 months when I need to fix a phone for myself, my husband, or a friend.
 

steadfasterX

Recognized Developer
Nov 13, 2013
5,593
14,810
263
Yes, I know, I'm saying I didn't see what was clearly there. I think what happened was I thought that the abootimg -u boot.img -c was all part of editing and not a command. I apologize. I can't delete my posts, so I figured I'd leave it and explain why I asked. This is a huge learning curve for me, especially since I don't even touch Linux except for maybe every 6 months when I need to fix a phone for myself, my husband, or a friend.
Fully ok to ask and usually there is never a reason do delete posts unless they harm or attack others.

Even more important your questions may can help others.

Sent from my OnePlus 6T using XDA Labs
 

renguer0

Senior Member
Apr 14, 2012
413
71
0
Hi, thanks for this thread!!

I have boot.bin file generated with SALT. How can I turn it into IMG file? I'm looking for H815_20a and H810_20g files.
 

renguer0

Senior Member
Apr 14, 2012
413
71
0
seems. you don't tell me the steps you have done...
Solved. Images created using su instead fwul user.

fastboot command didn't recognize the unlocked phone (it has bootloader unlocked). What can I do? I'm trying to upload this boot image to make it usable. ATM it is in bootlop because motherboard problem.
 
Last edited: