FORUMS

[App] [ 4.0+] [ROOT] Boot Shell - Execute Shell Commands and scripts at Boot [V 3.5]

302 posts
Thanks Meter: 288
 
By gh0stslayer, Senior Member on 8th February 2014, 05:06 PM
Post Reply Email Thread
Boot Shell allows you to save Linux Shell commands and execute them at boot. The Pro version allows to execute complete shell scripts at boot.


You can also save your favourite Linux commands and execute them at your will.
It can also eliminate the need of using init.d scripts for basic needs such as setting CPU parameters at boot such as, CPU Frequencies, governors, and also IO Governers,enable/disable Fastcharge, GPU Overclock etc.



REQUIREMENTS -
->ROOT
->BUSYBOX

Pro Version Extras -
-Ability to Execute Scripts at boot
-View outputs and errors after command execution
-Inbuilt Text/Script Editor


For any queries or problems please feel free to E-mail me at [email protected]

Try not to execute a resource intensive task or scripts at boot, it can slow down your device startup.


Explanation for Permissions -

-> Read/Write USB Storage - Allow the Shell commands to read/write on Device Storage
-> SuperUser Permission - To Execute Shell Commands
-> Run at Startup - To be able to execute Shell commands at Boot


Credits:

-> CMDProcessor Library, for making Root easy, and to @Androguide.fr for sharing it.

-> @nikwen - For being a very helpful and active contributor in the Java for Android App Development section, and for clearing my initial programming doubts.

Changelog-
Quote:

8/2/14 -
Initial Release
10/2/14 -
Added notification to confirm execution of commands at boot.
Execution of commands at boot time should be faster now.

12/02/14 -
Added option to enable/disable execution of commands at boot.
Added link to XDA thread in settings.

21/02/14 -
Uploaded to play store
Added option to export saved commands as txt file to sdcard
Fixed a command delete bug
Added help documentation
25/02/14-
Fixed up some strings
Added more feedback options in settings
07/03/2014-
Fixed a bug with exporting of commands
Added a cancel option to command edit dialog
Minor code cleanup
21- Mar - 2014
-Major Overhaul
-Ability to Execute Scripts at boot [Pro Version]
-View outputs and errors after command execution [Pro Version]
-Inbuilt Text/Script Editor [Pro Version]

Please try to download from Google Play as it will help me to keep record of number of downloads, app crashes, etc.


For those who do not use Gapps download V3.0 from the attachments below.

P.S. - If you are coming from the Beta Version of the app, the signature for the app has changed so you will have to uninstall the old version to be able to install the new one. To backup your commands, please backup app data using titanium backup or helium, uninstall, reinstall from play store and restore app data. I am really sorry for this inconvenience.
Attached Files
File Type: apk Boot Shell V3.apk - [Click for QR Code] (473.3 KB, 1863 views)
File Type: apk Boot shell 3.5.apk - [Click for QR Code] (993.2 KB, 3174 views)
The Following 18 Users Say Thank You to gh0stslayer For This Useful Post: [ View ] Gift gh0stslayer Ad-Free
8th February 2014, 05:07 PM |#2  
gh0stslayer's Avatar
OP Senior Member
Flag Bangalore
Thanks Meter: 288
 
More
Phone Screenies !!!!
The Following 2 Users Say Thank You to gh0stslayer For This Useful Post: [ View ] Gift gh0stslayer Ad-Free
8th February 2014, 05:08 PM |#3  
gh0stslayer's Avatar
OP Senior Member
Flag Bangalore
Thanks Meter: 288
 
More
Tutorial Some useful Shell Commands
USB FAST CHARGE Enable:
Code:
echo 1 > /sys/kernel/fast_charge/force_fast_charge
USB FAST CHARGE Disable:
Code:
echo 0 > /sys/kernel/fast_charge/force_fast_charge
SET GPU CLOCK:
Code:
echo x > /sys/devices/system/cpu/cpu0/cpufreq/gpu_oc
where x is your desired GPU Frequency or frequency step

SET CPU GOVERNER
Code:
echo interactive > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
replace interactive with your desired governer

LOAD A KERNEL MODULE
Code:
insmod /system/lib/modules/module_name
TCP CONGESTION ALGORITHM
Code:
/system/xbin/sysctl -w net.ipv4.tcp_congestion_control=reno
replace reno with your desired value

SET CPU MIN FREQUENCY
Code:
echo 350000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
replace 350000 (350 MHz)with your desired frequency

SET CPU MAX FREQUENCY
Code:
echo 1500000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
replace 1500000(1.5 Ghz) with your desired frequency

SET READ AHEAD BUFFER
Code:
echo 1024 > /sys/block/mmcblk0/queue/read_ahead_kb
replace 1024 with your desired value(in KB)

SET I/O SCHEDULER
Code:
echo row > /sys/block/mmcblk0/queue/scheduler
replace row with your desired governer
The Following 5 Users Say Thank You to gh0stslayer For This Useful Post: [ View ] Gift gh0stslayer Ad-Free
8th February 2014, 05:40 PM |#4  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by gh0stslayer

mine

Boot Shell has stopped....

My system is 4.0.4

you one picture system UI is beautiful,can you sharing me?


8th February 2014, 06:06 PM |#5  
gh0stslayer's Avatar
OP Senior Member
Flag Bangalore
Thanks Meter: 288
 
More
Quote:
Originally Posted by Lumia997

Boot Shell has stopped....

My system is 4.0.4




@Lumia997 :
Sorry about that, a new version has been uploaded , please try it. Thanks

Quote:

you one picture system UI is beautiful,can you sharing me?

sorry I don't understand, what do you want me to share ?
The Following User Says Thank You to gh0stslayer For This Useful Post: [ View ] Gift gh0stslayer Ad-Free
9th February 2014, 09:07 AM |#6  
Senior Member
Thanks Meter: 1,186
 
More
OK, how does this baby work? That is, what executes the commands? When (linux boot, zygote startup, dalvik up and running)??
How does this relate to selinux?

I have scripts in /data/local/userinit.d/ which are supposed to be run by the init.d system. The only one I know that runs is link2sd's script if I move it to there. Others, apparently do not run, even in cm-10.2 with permissive selinux. I have tasker run them, successfully, when it begins its "listening."

The lead question here is critical! If the app must be present at boot (it is an apk, however!), then it needs be on internal storage or better, on system! If the app needs be present only for its UI, it can be on sdcard or linked (link2sd). It is a user app but maybe it needs place something on system or /etc/init.d/ to operate?
9th February 2014, 09:21 AM |#7  
gh0stslayer's Avatar
OP Senior Member
Flag Bangalore
Thanks Meter: 288
 
More
Quote:
Originally Posted by Dovidhalevi

OK, how does this baby work? That is, what executes the commands? When (linux boot, zygote startup, dalvik up and running)??
How does this relate to selinux?

I have scripts in /data/local/userinit.d/ which are supposed to be run by the init.d system. The only one I know that runs is link2sd's script if I move it to there. Others, apparently do not run, even in cm-10.2 with permissive selinux. I have tasker run them, successfully, when it begins its "listening."

The lead question here is critical! If the app must be present at boot (it is an apk, however!), then it needs be on internal storage or better, on system! If the app needs be present only for its UI, it can be on sdcard or linked (link2sd). It is a user app but maybe it needs place something on system or /etc/init.d/ to operate?

The commands saved on this app are executed in the same way they are executed by a Linux Shell Emulator, or a Terminal on a Native Linux system. The only difference is it save the commands you enter and executes them as soon as the device finishes booting. You can also save commands to a favourite list , which will not be executed at boot, but allows you to manually execute them as you wish.

Edit: - Info: - It uses busybox to execute shell commands

The app works fine when placed on the internal storage of the device, though I am not sure about if it will work if placed on SD Card but in theory it should work, no need to place it on the /system partition.

It cannot run whole shell scripts only single commands, but you can save as many commands as you like

Just make sure you enter a valid command and that you kernel or device supports it.
9th February 2014, 09:41 AM |#8  
Senior Member
Thanks Meter: 1,186
 
More
Quote:
Originally Posted by gh0stslayer

The commands saved on this app are executed in the same way they are executed by a Linux Shell Emulator, or a Terminal on a Native Linux system. The only difference is it save the commands you enter and executes them as soon as the device finishes booting. You can also save commands to a favourite list , which will not be executed at boot, but allows you to manually execute them as you wish.

Edit: - Info: - It uses busybox to execute shell commands

The app works fine when placed on the internal storage of the device, though I am not sure about if it will work if placed on SD Card but in theory it should work, no need to place it on the /system partition.

It cannot run whole shell scripts only single commands, but you can save as many commands as you like

Just make sure you enter a valid command and that you kernel or device supports it.

Thanks for the info. In other words, would work as I use tasker now but with a much easier UI for scripts entry. Not really a substitute for /etc/init.d functionality because would get run later but otherwise, quite nice. Note that current cm-11 ROMs (for my old LG P500 at any rate) are quite slow getting startup services going.
The Following User Says Thank You to Dovidhalevi For This Useful Post: [ View ] Gift Dovidhalevi Ad-Free
9th February 2014, 09:53 AM |#9  
gh0stslayer's Avatar
OP Senior Member
Flag Bangalore
Thanks Meter: 288
 
More
Quote:
Originally Posted by Dovidhalevi

Thanks for the info. In other words, would work as I use tasker now but with a much easier UI for scripts entry. Not really a substitute for /etc/init.d functionality because would get run later but otherwise, quite nice. Note that current cm-11 ROMs (for my old LG P500 at any rate) are quite slow getting startup services going.

Yup, not really a substitute for complex init.d scripts, and yes quite similar to the way tasker does shell commands at boot.
But it should be more than enough for some simple CPU, I/O and kernel tweaking etc.
9th February 2014, 10:27 AM |#10  
Senior Member
Thanks Meter: 1,186
 
More
Quote:
Originally Posted by gh0stslayer

Yup, not really a substitute for complex init.d scripts, and yes quite similar to the way tasker does shell commands at boot.
But it should be more than enough for some simple CPU, I/O and kernel tweaking etc.

... and maybe a tasker plugin to execute "favorites" entered to this app?
9th February 2014, 10:32 AM |#11  
gh0stslayer's Avatar
OP Senior Member
Flag Bangalore
Thanks Meter: 288
 
More
Quote:
Originally Posted by Dovidhalevi

... and maybe a tasker plugin to execute "favorites" entered to this app?

Hmmm, I will have to look into it. I have no knowledge about how to develop plugins for tasker but I can try, no promises though.

But can't you already add commands in tasker and schedule their execution ?
Post Reply Subscribe to Thread

Tags
boot, init.d, linux, script manager, shell command

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

Advanced Search
Display Modes