Second core script

Search This thread

trafalger888

Senior Member
Aug 18, 2010
1,018
231
I haven't done or used any scripts on my x2.. but I've had it for the past 7 months and have been doing a lot of flashing.. so anyway someone would be willing to put this in step by step format so that others can have dual core enables as well? :D

I can probably mess around with it and figure it out.. but I would rather follow a guide that ensures I'm doing it correctly.. anyway thanks for all the new dev stuff going on.. I feel brighter days for the x2.

-sips coffee, sparks a blunt *.*

I will write something up and get it to you I am on my to work now sorry wed Thursday fri and sat ate busy since I work overnights on those days

Sent from my DROID X2 using xda premium
 

754boy

Senior Member
Sep 28, 2008
351
75
Shaw, MS
Lemme get this correct.....So our phone is only using one core? What about during gaming? Seriously, why call t the X2 when the second core is dormant???
 
  • Like
Reactions: skwoodwiva

litetaker

Senior Member
Dec 2, 2011
1,746
629
London
Google Pixel 2
Are you serious?

DZK initially had issues with CM7DX2 maxing out one core but the other core was idle. Several system info apps reveal that both cores are running... So I highly doubt that one of the cores is dormant in our Device...

I would like people like ash and MoonShadow to give their opinion and correct me if I am wrong but I really don't think that one of our cores is dormant.

Or may be I am missing the point of the OP...
 
  • Like
Reactions: skwoodwiva

trafalger888

Senior Member
Aug 18, 2010
1,018
231
I would like to warn everyone that performing this mod WILL severely impact your battery usage. The Android operating system is designed to operate on ONE processor and turn the second one on on-demand. IF you choose to enable both processors, your phone will run better/fast/snappier, however, this will eat your battery. Just a warning.

You can monitor what is happening with the command:
Code:
htop

Ciao!

This pretty much sums it up lietaker...

Sent from my DROID X2 using xda premium
 

Travisdroidx2

Senior Member
Sep 9, 2011
3,699
976
Bay Area California
Any chance of someone making this into something we can run with script manager? And also run at boot so we do not have to re install it every time? Good find I will keep up on this thread.
 
Lemme get this correct.....So our phone is only using one core? What about during gaming? Seriously, why call t the X2 when the second core is dormant???
as moon stated the second core DOES come on when needed
if you would like to see for your self, download an app called 2nd core, we can't use it for anything except showing when the 2nd core becomes active. when you open it you will, see one core active, have an app that requires intense CPU activity in you recent apps, long press home button open that app,an immediately long press home button and go back to 2nd core app, you will notice that the second core came online while it was opening that intense game/app.

Are you serious?

DZK initially had issues with CM7DX2 maxing out one core but the other core was idle. Several system info apps reveal that both cores are running... So I highly doubt that one of the cores is dormant in our Device...

I would like people like ash and MoonShadow to give their opinion and correct me if I am wrong but I really don't think that one of our cores is dormant.

Or may be I am missing the point of the OP...
I think point of the OP is to share script that allows you to have both core CONSTANTLY active if you prefer. as moon stated tho it will impact battery life, tho, I would like to see a script along side this that puts it back to where it was, this way if you want to enable both cores and then go back to how it operates stock, then you could have two SM widgets to do that, I, am curious to see how this impacts music playing , wondering if when music is playing if the system is utilizing the second core when it is needed or not .
I would like to warn everyone that performing this mod WILL severely impact your battery usage. The Android operating system is designed to operate on ONE processor and turn the second one on on-demand. IF you choose to enable both processors, your phone will run better/fast/snappier, however, this will eat your battery. Just a warning.

You can monitor what is happening with the command:
Code:
htop

Ciao!

thanks for the info moon, always insightful as usual :)
 

trafalger888

Senior Member
Aug 18, 2010
1,018
231
as moon stated the second core DOES come on when needed
if you would like to see for your self, download an app called 2nd core, we can't use it for anything except showing when the 2nd core becomes active. when you open it you will, see one core active, have an app that requires intense CPU activity in you recent apps, long press home button open that app,an immediately long press home button and go back to 2nd core app, you will notice that the second core came online while it was opening that intense game/app.


I think point of the OP is to share script that allows you to have both core CONSTANTLY active if you prefer. as moon stated tho it will impact battery life, tho, I would like to see a script along side this that puts it back to where it was, this way if you want to enable both cores and then go back to how it operates stock, then you could have two SM widgets to do that, I, am curious to see how this impacts music playing , wondering if when music is playing if the system is utilizing the second core when it is needed or not .


thanks for the info moon, always insightful as usual :)

Yes ash you are correct in what you saw as the point...I am not always as eloquent as I should be I suppose...changing the echo to 0 will turn oyster off although I have not played with this so o am not sure if it will shut it completely down or take it to its original state

For me at work I normally get 12-14 hours out of my battery with moderate to heavy use ...I still see those same numbers

As far as music..I decided to try an experiment. On my way home, which os a 30 minute drive, I played music the whole way...I did not experience one skip the whole way...I see that as an improvement :D

Sent from my DROID X2 using xda premium
 
  • Like
Reactions: skwoodwiva
I had some time to try this out this morning.

I made a script called cpu1 with this in it:

Code:
#!/system/bin/sh

echo "==================================="
echo "cpuinfo before:"
echo "==================================="
cat /proc/cpuinfo
echo ""
echo ""
echo "==================================="
echo "activate cpu1:"
echo "==================================="
chmod 666 /sys/devices/system/cpu/cpu1/online 
echo 1 > /sys/devices/system/cpu/cpu1/online 
chmod 444 /sys/devices/system/cpu/cpu1/online
echo ""
echo ""
echo "==================================="
echo "cpuinfo after:"
echo "==================================="
cat /proc/cpuinfo
echo "==================================="


I put that script /mnt/sdcard/
Then ran it in a terminal in a terminal (i'm using eclipse and there is one built in):

Code:
$ export PATH=/data/local/bin:$PATH
$su
# cd /mnt/sdcard
# pwd
/mnt/sdcard
# sh ./cpu1 > cpu1.txt
# cat /proc/cpuinfo
Processor       : ARMv7 Processor rev 0 (v7l)
processor       : 0
BogoMIPS: 1998.84

processor       : 1
BogoMIPS: 1992.29

Features: swp half thumb fastmult vfp edsp vfpv3 vfpv3d16
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x1
CPU part: 0xc09
CPU revision    : 0

Hardware: Daytona
Revision: 83a0
Serial  : 02804105417f8657
#

the # sh ./cpu1 > cpu1.txt line saved the output to /mnt/sdcard.cpu1.txt

Here is what is in cpu1.txt:

Code:
===================================
cpuinfo before:
===================================
Processor	: ARMv7 Processor rev 0 (v7l)
processor	: 0
BogoMIPS	: 1998.84

Features	: swp half thumb fastmult vfp edsp vfpv3 vfpv3d16 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x1
CPU part	: 0xc09
CPU revision	: 0

Hardware	: Daytona
Revision	: 83a0
Serial		: 02804105417f8657


===================================
activate cpu1:
===================================


===================================
cpuinfo after:
===================================
Processor	: ARMv7 Processor rev 0 (v7l)
processor	: 0
BogoMIPS	: 1998.84

processor	: 1
BogoMIPS	: 1992.29

Features	: swp half thumb fastmult vfp edsp vfpv3 vfpv3d16 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x1
CPU part	: 0xc09
CPU revision	: 0

Hardware	: Daytona
Revision	: 83a0
Serial		: 02804105417f8657
===================================

I have not done much with benchmarks so I just picked Antutu and ran one before and then after.

Take a look at the screenshots attached. The after looks slightly better but it also shows that I had more ram. So I don't know if it helped. Interesting stuff though. :)

I don't think it's showing you had more ram available per say, just that your ram performed better on that run giving you a better score for it ;)

by the way would you be able to upload the script you used so I can slip it into init.d ?

Sent from my DROID X2 using Tapatalk
 
  • Like
Reactions: skwoodwiva

hedwig34

Inactive Recognized Developer
Sep 25, 2011
665
1,134
Pittsburgh
www.teamoctos.com
I don't think it's showing you had more ram available per say, just that your ram performed better on that run giving you a better score for it ;)

by the way would you be able to upload the script you used so I can slip it into init.d ?

Sent from my DROID X2 using Tapatalk

I'm a total noob when it comes to benchmarks. lol


As for the script, I think trafalger888 is cooking something up for init.d. Keep and eye out. ;)
 

skwoodwiva

Senior Member
Apr 24, 2011
1,161
183
Just a BTW note. Uh-oh Rant coming . Why do people use those blasted code boxes? They never help and just make you wonder if xda is meant to be browsed on a 'ing phone? Just like the Tiny Little arrow that you always mis-hit to get latest post. Rant off:rolleyes:
 
Last edited:

Moon Shadow - NM

Senior Member
Jul 14, 2011
455
502
Albuquerque
Are you serious?

DZK initially had issues with CM7DX2 maxing out one core but the other core was idle. Several system info apps reveal that both cores are running... So I highly doubt that one of the cores is dormant in our Device...

I would like people like ash and MoonShadow to give their opinion and correct me if I am wrong but I really don't think that one of our cores is dormant.

Or may be I am missing the point of the OP...

I answered this in one of my previous posts and Ash provided a much deeper analog that I.

Just a BTW note. Uh-oh Rant coming . Why do people use those blasted code boxes? They never help and just make you wonder if xda is meant to be browsed on a 'ing phone? Just like the Tiny Little arrow that you always mis-hit to get latest post. Rant off:rolleyes:

Skwoodwiva (Screwdriver as Scoobydo would pronounce it?? Anyhow...) I use the code boxes because I mainly use XDA on my laptop when I'm developing something, or checking something out. I use Tap-a-talk when I'm mobile to read and post minor stuff. I'm not going to apologies for using "the damn" code boxes because for code, it is much cleaner. :p :D

Ciao!
 
  • Like
Reactions: tallyforeman

Moon Shadow - NM

Senior Member
Jul 14, 2011
455
502
Albuquerque
Quick script to run in script manager or terminal

This script and flashable zip file are for CM7DX2 ONLY! It _MIGHT_ work on other ROMs, but your mileage may vary!


Okay, it was requested by Ash for me to make a script that would run from init.d. I have included a flashable zip that installs a much simplified version of this script in init.d. Please keep in mind that the only way to change CPU1 back to "On Demand" is by using the script that is in this post as well.


As with all of my mods, I am not responsible for what you choose to do with your phone.

Flashable Zip:
Nandroid backup FIRST! Then flash this zip via Bootstrap Recovery. No need to clear cache or dalvik-cache.

Script:
If you are going to run this script in the terminal, please remember to set the permissions with chmod to 755. Example:

Code:
chmod 755 CPU_Core1_OnDemand_AlwaysOn.sh
In script manager, there is no need to do this.

Grrr... XDA doesn't allow uploading of .sh files. Just remove the .pdf extension. This file is _NOT_ a PDF file.

Your welcome!

Ciao!
 

Attachments

  • CPU_Core1_OnDemand_AlwaysOn_signed.zip
    129.2 KB · Views: 177
  • CPU_Core1_OnDemand_AlwaysOn.sh.pdf
    2.5 KB · Views: 160
Last edited:
If you are going to run this script in the terminal, please remember to set the permissions with chmod to 755. Example:

Code:
chmod 755 CPU_Core1_OnDemand_AlwaysOn.sh
In script manager, there is no need to do this.

Grrr... XDA doesn't allow uploading of .sh files. Just remove the .pdf extension. This file is _NOT_ a PDF file.

Your welcome!

Ciao!
is it possible to just slip that into init.d as well and have it run at boot or will it not work?

edit
I see what this is now
disregard question lol
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 7
    Ok so I was reading that bootloader effort thread and _base2 had mentioned overclocking his RAZR I tried to link the post and it wasn't working well on the app...kept foreclosing so anyways...I made a script that activates the second core...the way I verified this is looking in system tuner with it running and with out...also without it shows as an ARM processor in antutu benchmark and a dual core with it. with the limits of our kernel its not going to let us multithread obviously if I am not mistaken

    Razz1 was the original poster if this on rootzwiki for the razr

    If you choose to make changes or try it and something bad happens its up to you and I can't be held responsible

    Ok so to further clarify what im trying to say with this is....prior to using this the second core was not visible using cat proc /cpuinfo nor was it available to java according to quadrant or antutu...after it is available and shows in the cat

    This is what I used when I built my script

    chmod 666 /sys/devices/system/cpu/cpu1/online
    echo 1 > /sys/devices/system/cpu/cpu1/online
    chmod 444 /sys/devices/system/cpu/cpu1/online
    7
    Quick script to run in script manager or terminal

    This script and flashable zip file are for CM7DX2 ONLY! It _MIGHT_ work on other ROMs, but your mileage may vary!


    Okay, it was requested by Ash for me to make a script that would run from init.d. I have included a flashable zip that installs a much simplified version of this script in init.d. Please keep in mind that the only way to change CPU1 back to "On Demand" is by using the script that is in this post as well.


    As with all of my mods, I am not responsible for what you choose to do with your phone.

    Flashable Zip:
    Nandroid backup FIRST! Then flash this zip via Bootstrap Recovery. No need to clear cache or dalvik-cache.

    Script:
    If you are going to run this script in the terminal, please remember to set the permissions with chmod to 755. Example:

    Code:
    chmod 755 CPU_Core1_OnDemand_AlwaysOn.sh
    In script manager, there is no need to do this.

    Grrr... XDA doesn't allow uploading of .sh files. Just remove the .pdf extension. This file is _NOT_ a PDF file.

    Your welcome!

    Ciao!
    4
    Well said man. Well said. This guy thinks hes a genius for all this stuff. I remember the soft keys thing. He threatened to make people do it themselves if they didn't like his work. If you ask for a general ETA the guy gets pissed. Every reboot and freeze my phone has gotten, I dislike this dude more and more. The above statement just made me really dislike this guy. For the record, Alpha 4 was worse than alpha 3 with the addition of themes and camera and lock screen stuff. In addition, we cant even get a MMS update that was apparently "very simple". Really dragonzkiller...this guy worked hard on this script, it works for him, and he is happy with it. If it doesn't work for others, they don't have to use it. But there is no reason to put his work down because of conflicts with your incomplete work. Honestly, who cares if you stop deving...stock is stable, eclipse is stable, other roms are stable, there are lots of options and this phone has gotten outdated faster and faster since Google IO. Point is, please don't criticize someone else's work in their own thread and act like you're a god on the internet. I certainly wouldn't want my work to be criticized and I'm sure others, including you wouldn't either. BTW the dragon out thing was pretty damn lame...

    I'd like to point out that half of our future roms would be screwed if not for cm updates. Ever follow miui or eclipse changes? Notice how they all come along very shortly following a cm update?

    (Here comes odd me) PLEASE for your sake refrain from grandiose statements when attacking. Forms high emotional imagery (thereby forming "points") and basic argumentation says no to non-fact discourse. Has a place but a tech forum full of techies ain't it.

    As much as I hate these little shots certain people are taking I have to face facts and acknowledge great work; kudos to cm9 and all its ICS bugginess and go on Traflager for giving all a shot at an amazing device.

    Please don't attack people. Find smoothness, snapyness in everything. Keep it clean cause I like this place.

    Sent from my Galaxy Nexus using Tapatalk 2
    4
    That's impossible as putting anything in the init.rc doesn't take affect until reboot and if you reboot the init.rc is overwritten.

    I am once again saying that you shouldn't use this script at all. It is pointless and drains your battery. The *slight* (and I mean slight) amount of performance you gain out of it is worthless compared to the loss in battery life.

    dragon out.

    Yes the statement about init.rc is correct won't work...although you don't like when people sat negative things about your work and just tell them don't use it or do it themselves but you have no problem saying negative things about mine

    Plenty of people like it and have used it with no or little extra battery drain and have no problem with it.

    Why don't you just step off man we get it you don't like it blah blah blah you've made your opinion known so let it go already.

    You don't like negative comments even when someone asks about something as simple as soft keys yet you have no problem criticizing others....funny how that works

    Sent from my MB870 using xda premium
    4
    Yes the statement about init.rc is correct won't work...although you don't like when people sat negative things about your work and just tell them don't use it or do it themselves but you have no problem saying negative things about mine

    Plenty of people like it and have used it with no or little extra battery drain and have no problem with it.

    Why don't you just step off man we get it you don't like it blah blah blah you've made your opinion known so let it go already.

    You don't like negative comments even when someone asks about something as simple as soft keys yet you have no problem criticizing others....funny how that works

    Sent from my MB870 using xda premium

    ..