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

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.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
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]mail.com
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-
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]
Click to expand...
Click to collapse
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.

Screenies !!!!

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

gh0stslayer said:
mine
Click to expand...
Click to collapse
Boot Shell has stopped....
My system is 4.0.4
you one picture system UI is beautiful,can you sharing me?
:good:

Lumia997 said:
Boot Shell has stopped....
My system is 4.0.4
:good:
Click to expand...
Click to collapse
@Lumia997 :
Sorry about that, a new version has been uploaded , please try it. Thanks
you one picture system UI is beautiful,can you sharing me?
Click to expand...
Click to collapse
sorry I don't understand, what do you want me to share ?

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?

Dovidhalevi said:
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?
Click to expand...
Click to collapse
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.

gh0stslayer said:
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.
Click to expand...
Click to collapse
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.

Dovidhalevi said:
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.
Click to expand...
Click to collapse
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.

gh0stslayer said:
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.
Click to expand...
Click to collapse
... and maybe a tasker plugin to execute "favorites" entered to this app?

Dovidhalevi said:
... and maybe a tasker plugin to execute "favorites" entered to this app?
Click to expand...
Click to collapse
Hmmm, I will have to look into it. I have no knowledge about how to develop plugins for tasker :silly: but I can try, no promises though.
But can't you already add commands in tasker and schedule their execution ?

gh0stslayer said:
Hmmm, I will have to look into it. I have no knowledge about how to develop plugins for tasker :silly: but I can try, no promises though.
But can't you already add commands in tasker and schedule their execution ?
Click to expand...
Click to collapse
It is excruciatingly difficult to enter this stuff on the phone's keyboards. So if I have a "favorite"command in this app and later on decide to use it in tasker, I would not be to happy with struggling to enter it a second time
BTW, most of what I have entered as script are in bash script files. Can these be run by the app or only single line commands?

Dovidhalevi said:
It is excruciatingly difficult to enter this stuff on the phone's keyboards. So if I have a "favorite"command in this app and later on decide to use it in tasker, I would not be to happy with struggling to enter it a second time
BTW, most of what I have entered as script are in bash script files. Can these be run by the app or only single line commands?
Click to expand...
Click to collapse
Single line commands only, you can add the next line of bash script as another command .
Edit:
If you wanna use the same command else where , click on the command select edit and copy the command from the textbox. No need to enter it again.
Sent from my Galaxy Nexus using Tapatalk

gh0stslayer said:
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.
Click to expand...
Click to collapse
Big thanks for that.
In my opinion it's great that you finished your app. Good job. :good:

nikwen said:
Big thanks for that.
In my opinion it's great that you finished your app. Good job. :good:
Click to expand...
Click to collapse
Thank you very much

Hello everyone, Boot Shell is now available on Play Store. Please find it here
https://play.google.com/store/apps/details?id=com.kislay.bootshellcommand
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.

New version is up-
Changes -
Fixed up strings
Added feedback options (E-mail and Play Store)
There is an easter egg somewhere too

Version 1.2 is now up-
Changes -
-Fixed a bug with exporting commands to SD Card
-Added a cancel option to command edit dialog
-Minor Code Cleanup
Please feel free to drop your feedback/ comments/ ratings
Email if you need any help, guidance or wanna report a bug.

New major update -
Changelog-
Version 2.0 -> 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]
Pro Version Link - Boot Shell Pro

help
I use that bootshell but need more time for executing ,its that normal because i already w8 for 4 hours

Related

[MOD]viperMOD Bloat Manager v3.1.4 for HTC Sensation | Updated 8.7.11 |

Welcome everyone to viperMOD Bloat Manager, a wonderful little script that manages bloatware right on your device! No more generic scripts uninstalling whatever they want, choose from different presets or choose any app installed on your phone to enable/disable!
Here is what the script looks like...
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I like the colors over the standard blue/white
Updated 8/7
Fixed "permission denied" error on flashable .zip by settings perms in updater-script
Updated 8/6
Fixed coding for /system mount
Edited .bat file to mount system R/W before pushing files from PC
Updated 8/1
Updated for perm root (no more /system not mounted issues)
Removed overclock feature - since there are custom kernels now, no need to insmod.
Still a .bat file. If there is a demand for an update.zip, please post.
Updated 7/19
Fixed Advanced menu for HTC Sensation users
Updated 7/18
Enhanced Overclock feature
--- Added Telstra OC driver (experimental, please test)
--- Auto backup OC settings and prompt to reapply if file detected
Disable custom apps and enable custom apps allows manipulation of individual packages within presets
Minor scripting changes
Updated 7/16
Customizable overclock mod right from your phone! (Advanced menu)
Better support for the HTC Sensation
--- Disable\Enable T-Mobile Apps
--- Remove Sprint references on HTC Sensation
Enable custom apps will show packages and apps by presets and allow you to enable things 1 at a time.
Updated 7/14
Totally reworked with many enhancements and fixes!
Better /system detection
More intuitive UI and easier to use from the phone
5 categories of preset bloat disable\enable
--- *Sprint apps, *HTC apps, *other apps, *Rosie, HTC Widgets, and Live Wallpapers, and *Lockscreen
Moved custom options into "Advanced"
Moved backup/restore into "Advanced"
Added option to enable all custom bloat at one time
Warnings when disabling apps (depending on the menu)
Added count for disabled apps
Descriptions of what will be disabled\enabled before doing so
Added pause until enter button between menus (script was too fast )
Added better detection and action when entering an invalid option in all menus
Updated 7/13 @ 2PM
HTC Sensation support!
Allowed script to continue without R/W /system access with warning
Currently disabled bloat list is now sorted alphabetically and without "package:" in front of it
About info updated
Requirements:
Terminal Emulator (recommend setting to 12pt font)
Root Access (I like this one, personally)
Common Sense - please don't disable everything and wonder why things aren't working.
Features
Disable\Enable bloatware
Disable\Enable HTC Sense and HTC Widgets
Disable\Enable Experimental Apps
See what apps are still enabled or disabled
Ability to disable\enable ANY installed app on your phone!
Ability to backup your settings
Ability to restore your settings
Directions and Information
Apps will STILL BE DISABLED when you reboot - rooted or not!
Just download the .zip, extract, and run the viperMOD_Bloat_Manager_v3.1.1.bat file from your computer.
To run this, go into Terminal and type "su" (without quotes) then "viperbloat" (without quotes) and it will run. You can also set Terminal Emulator to run this right when you run the app by going to Menu > Preferences > Initial Command > Press "Enter" > type "su" (all lowercase, no quotes) > press Enter > type "viperbloat" (all lowercase, no quotes)
You can also run this through ADB on your computer by doing adb shell then ""viperbloat" (all lowercase, no quotes). Much easier to read the app list!
You can MAJORLY screw up your phone by using this! Be mindful of what you're playing with and if you really mess things up, just reboot and reroot.
Here is a helpful link to what some of the apps are.
Known Issues
None!
Download flashable .zip HERE
Download .bat HERE​​​​​
Special Thanks to:
Netarchy for some great shell scripting help!
freeza and ffolkes for their initial thread which I based the script on!
agrabren for getting the E3D rooted!
xdviper for the build.prop info needed for Sensation support!
Let me know if I forgot anyone!
giving this a go now. ill report back ;-)
Cant seem to get this to work. i just type viperbloat in adb or terminal emualtor and it says not found. then i type /sdcard/viperbloat and i get permission denied?
ran through terminal emulator and just removed safe bloatware and recommended. no errors and ill report back how it does for my battery life. there is a option that says no recommended and i followed it because i didnt want to start from scratch. So far i give this app a thumbs up.
Thanks for the hard work.
bpear96 said:
Cant seem to get this to work. i just type viperbloat in adb or terminal emualtor and it says not found. then i type /sdcard/viperbloat and i get permission denied?
Click to expand...
Click to collapse
Did you run the .bat file? Run it again.
And I assume you guys have the same deal as the EVO 3D and we are using /vendor for /system (symlink)? That's how I have it setup is to push it to /vendor/bin and chmod. Please let me know.
charlieb620 said:
ran through terminal emulator and just removed safe bloatware and recommended. no errors and ill report back how it does for my battery life. there is a option that says no recommended and i followed it because i didnt want to start from scratch. So far i give this app a thumbs up.
Thanks for the hard work.
Click to expand...
Click to collapse
what exactly did you type in terminal emu?
bpear96 said:
Cant seem to get this to work. i just type viperbloat in adb or terminal emualtor and it says not found. then i type /sdcard/viperbloat and i get permission denied?
Click to expand...
Click to collapse
are you temp rooted already? and when u run the bat file wait till it says press any button to continue than type su in terminal emulator to see if u have permission after that type viperbloat and the app should pop up.
bpear96 said:
what exactly did you type in terminal emu?
Click to expand...
Click to collapse
i typed viperbloat and i got the above screenshot but in white/blue.
charlieb620 said:
are you temp rooted already? and when u run the bat file wait till it says press any button to continue than type su in terminal emulator to see if u have permission after that type viperbloat and the app should pop up.
Click to expand...
Click to collapse
nevermind got it
-viperboy- said:
Did you run the .bat file? Run it again.
And I assume you guys have the same deal as the EVO 3D and we are using /vendor for /system (symlink)? That's how I have it setup is to push it to /vendor/bin and chmod. Please let me know.
Click to expand...
Click to collapse
what app are u using for screenshots? so i can post what i see and what i did....thanks.
bpear96 said:
yes im temprooted. when i type viperbloat in terminial emulator all i get is permission denied?
Click to expand...
Click to collapse
restart your phone. run the final temp root again and than do the viperbloat.bat
you may have made a error so the best thing to do is just start from scratch
I got it to run but my /sytem is r/o
My screenies
Sent from my HTC Sensation 4G using XDA Premium App
Go from my screen shots first line and second line should be diff
Sent from my HTC Sensation 4G using XDA Premium App
bpear96 said:
I got it to run but my /sytem is r/o
Click to expand...
Click to collapse
here too, script fails with the "busybox mount | grep /vendor/system" as there are no /vendor/system on my phone, and the grep finds 'ro' from probably /vendor/firmware ?
in /vendor/ i have bin and firmware directory
Also i cant seem to root now heres what i get in adb http://pastebin.com/gWb0eAsP
Also make sure that the exploit ran to ur Sd card. That may be the cause of the errors.
Sent from my HTC Sensation 4G using XDA Premium App
i changed
systemcheck=$(busybox mount | grep /vendor/system | cut -d \( -f 2 | cut -d \, -f 1)
to
systemcheck=$(busybox mount | grep /system | cut -d \( -f 2 | cut -d \, -f 1)
and got rw
then when disable bloat, i get
/vendor/bin/viperbloat: line 402: pm: not found
/vendor/bin/viperbloat: line 402: pm: not found
/vendor/bin/viperbloat: line 402: pm: not found
/vendor/bin/viperbloat: line 402: pm: not found
/vendor/bin/viperbloat: line 402: pm: not found
repeated maybe 20-30 times
bpear96 said:
Also i cant seem to root now heres what i get in adb http://pastebin.com/gWb0eAsP
Click to expand...
Click to collapse
Are u using the temp root final? I was getting errors as well in the beginning before this mod and I just rebooted my phone and everything worked
Sent from my HTC Sensation 4G using XDA Premium App
charlieb620 said:
Are u using the temp root final? I was getting errors as well in the beginning before this mod and I just rebooted my phone and everything worked
Sent from my HTC Sensation 4G using XDA Premium App
Click to expand...
Click to collapse
yes im sure.. the older v. actually works for me i get root. but the final doent work at all

[MOD][CWM] Bash 4.1 Default Shell Env. and Custom Terminal Emulator BML/MTD 01/07

Android Shell Environment - Bash 4.1
Package Version 1.2b - 01/06/2012
DOWNLOAD MOD_CWM-UltimateAndroidShell-Bash4.1-20120107.zip
File size: 5.3 MB / MD5 84cb672cd11b7a3e9b21e29c3416da21
​
DETAILS
This package is an amalgamation from various sources including my own to create the perfect shell environment for Local and Remote administration.
All solutions so far have been incomplete or require more configuration to get working, so i thought i would share what i've been running.
This package installs Bash and the other listed features and sets bash as the default shell.
Hope it's useful!
INCLUDED BINARIES
- Bash 4.1
- BusyBox 1.19.0
- Htop
- 7z (p7zip v9.20)
- bc
- Nano
- Joe
- Vim
- SSH/Dropbear
- SCP
- Rsync
- Curl
Android Terminal v1.0.39 - /system/Term.apk - com.senseisimple.androidterm
Custom Built Terminal based on Terminal Emulator by Jackpal
[Source on Github]
INCLUDED SCRIPTS
[sudo] Pseudo sudo, run a command as Root
Usage: sudo [command]
[reboot] BML/MTD Compatible reboot wrapper with recovery boot
Usage: sudo reboot [recovery]
[adbwifi] Easily enable/disable ADB over Wifi (persistent until reboot or disable) without an app/widget (su required or use with sudo)
Usage: sudo adbwifi [on | off | status]
[remount] Remount the /system partition as ReadOnly or Read/Write (su required)
Usage: sudo remount [ro | rw | status]
[defaultshell] Change default shell on the fly from Bash to sh (this is a persistent change)
Usage: sudo defaultshell [sh | bash | current]
[sdcardstuck] Media Provider Fix
If your phone is running warm and laggy and eating battery after a clean install,
it's possible "android.process.media", the Media Scanner process,
is stuck on a file it's unable to read on the sdcard causing it to hang indefinitely.
The script tests for stuck files, and offers to delete them or generate a list,
also cleans the Media Provider database.
Usage: sudo sdcardstuck
CUSTOM BASH ENVIRONMENT
Home (~) at /data/local
$ prompt as User
# prompt as Root
Preset shopt options
histappend, histverify, histreedit, cdspell, expand_aliases, cmdhist
hostcomplete, no_empty_cmd_completion, nocaseglob, dotglob, autocd
Bash/Su files
- /etc/profile
- /etc/bash_bashrc
- /etc/terminfo
- /etc/passwd
- /system/etc/init.d/00bashinit - for kernel compatibility if using bash as default shell (sets up/fixes the bash environment on boot)
- /data/local/.inputrc
- /data/local/.profile
- /data/local/.bashrc
- /data/local/.bashrc_support
- /data/local/.bashrc_user <- Edit this file to add shell functionality (loads last)
- /data/local/.bash_history
- /data/local/tmp
- /data/local/bin
- /data/local/sbin
- /data/local/xbin
ENVIRONMENT VARIABLES
PATH = /data/local/xbin:/data/local/bin:/data/local/sbin:/system/bin:/system/xbin:/sbin:/data/local/tmp
EDITOR = nano - default editor (used by edit/e/suedit aliases, set with seteditor)
VISUAL = $EDITOR
TERMINFO = /system/etc/terminfo
TERM = Linux
HISTCONTROL = ignoredups:ignorespace
AVAILABLE FUNCTIONS
motd - clear the screen, display the MOTD
Usage: motd
hist - search command history
Usage: hist [part of command]
pg - search processes
Usage: pg [running process name]
pid - get process id
Usage: pid [running process name]
appuid - get uid of running process
Usage: appuid [running process name]
bg - run process in the background
Usage: bg [command]
quiet - run process quietly
Usage: quiet [command]
ip - get active ip address
Usage: ip
seteditor - set default text editor availability by order of preference
Usage: seteditor [space separated bins | default]
Example (defaults): seteditor nano vim vi
AVAILABLE ALIASES
bb - Busybox (/sbin/busybox)
su - Su (Bash compatible)
ls - ls w/ color
l - ls -CF w/ color
la - ls -a w/ color
li - ls -laniF w/ color
ll - ls -alF w/ color
lsn - ls -lanF w/ color
dir - ls -halF
edit or e - Shortcut to your favorite editor by order of preference/availability (default: nano vim vi)
suedit - run editor as Root
HUMBLE GRATITUDE
Nubecoder for the bash 4.1 bin that makes this possible http://http://forum.xda-developers.com/showthread.php?t=1225296
bc54 for additional ideas, remount/default shell scripts http://forum.xda-developers.com/showthread.php?t=1229211
Jocala for the pointer to nano and joe and info in his post http://forum.xda-developers.com/showthread.php?t=1349454
Toadlife MTD help
Bbelos MTD help
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
CHANGELOG
v1.2b - 01/06/2012
- bash env init script fixes (Thanks bbelos!)
- reorganized user bin directories
v1.2a - 01/06/2012
- ssh/dropbearmulti update [jocala]
- fix su link
v1.2 - 01/05/2012
- Added BusyBox 1.19.0
- Addtl. Permissions fixes
v1.1 - 01/02/2012
- BML/MTD Compatible
- Added BML/MTD Reboot wrapper [based on Toadlife]
- Permissions fixes
- other minor changes
v1.0 - 12/30/2011
Initial upload
and this one
nice.
but joe? haha I don't use it but one of my coworkers does...always leaves those damn ~files around lol.
Thanks, but no Emacs?
Just kidding. Good to have nano and joe there.
This looks so sick, thank you!!
Sent from my SPH-D700 using XDA Premium App
doesn't work for me on mtd. should just need to change the way it mounts /system, and it SHOULD work
sent from my touchwiz 4.5-ed epic
lost_ said:
Thanks, but no Emacs?
Click to expand...
Click to collapse
lol. There's only room for one operating system on the phone.
For some reason, this completely disables vibration on the phone running computerkid23's ROM. I'm about to do some digging lol, never had anything like this happen.
toadlife said:
lol. There's only room for one operating system on the phone.
Click to expand...
Click to collapse
Unless you chroot an Ubuntu image... but what does that have to do with the Emacs text editor?
Sent from my SPH-D700 using XDA App
ugothakd said:
doesn't work for me on mtd. should just need to change the way it mounts /system, and it SHOULD work
sent from my touchwiz 4.5-ed epic
Click to expand...
Click to collapse
FYI,
I believe, you can run these two command in a row and it will mount the system whether it's MTD or BML...
Code:
run_program("/sbin/mount","/system");
run_program("/sbin/mount","/dev/block/mtdblock2","/system");
EDIT: I know for a fact that both command work. I don't think one of them failing will cause any issues.
Using busybox mount instead of the semi-braindead one floating in /sbin should take care of it. That or a incantation of mount | grep | cut to put the dev name in automagically.
-- Starfox
UPDATE!
v1.1 - 01/02/2012
- BML/MTD Compatible
- Added BML/MTD Reboot wrapper [based on Toadlife's]
- Permissions fixes
- other minor changes
Happy New Year Everyone!​
thomasskull666 said:
For some reason, this completely disables vibration on the phone running computerkid23's ROM. I'm about to do some digging lol, never had anything like this happen.
Click to expand...
Click to collapse
This has to be a kernel issue, we experienced this with ShadowKernel early on as init.d scripts were running in the middle of the script instead of at the end. Other than that, i'm not sure why that would happen... The update might help you but im not sure, i'm not familiar with that ROM workings
SenseiSimple said:
This has to be a kernel issue, we experienced this with ShadowKernel early on as init.d scripts were running in the middle of the script instead of at the end. Other than that, i'm not sure why that would happen... The update might help you but im not sure, i'm not familiar with that ROM workings
Click to expand...
Click to collapse
Thanks for the reply, I figured it was something like that. I'll definitely be trying the update here shortly so I'll let you know if it changes anything. If not, I may be switching to a different ROM as bash is something I use on a day to day basis, and this mod has all the goodies too
EDIT: Yep, unfortunately it happens also on Legendary ROM. I'll see if I can find specifically what is causing it, I haven't been able to run a logcat yet although I suspect, like you said, it's something to do with the kernel.
Sent from my SPH-D700 using XDA Premium App
Thanks for the mtd fix something you might want to do though is set the updater-script to delete Androidterm.apk, which is the terminal emulater included with cm7. I had to do that manually
sent from my cm7 touchwiz 4.5-ed epic
thomasskull666 said:
Thanks for the reply, I figured it was something like that. I'll definitely be trying the update here shortly so I'll let you know if it changes anything. If not, I may be switching to a different ROM as bash is something I use on a day to day basis, and this mod has all the goodies too
EDIT: Yep, unfortunately it happens also on Legendary ROM. I'll see if I can find specifically what is causing it, I haven't been able to run a logcat yet although I suspect, like you said, it's something to do with the kernel.
Sent from my SPH-D700 using XDA Premium App
Click to expand...
Click to collapse
It is almost certainly to do with the kernel... you can try to unset bash as the default shell, try: sudo defaultshell sh and restart... since the custom android terminal is customized for bash, the default shell being bash is not strictly necessary but is more a matter of convenience in writing/running scripts... that MAY help.
ugothakd said:
Thanks for the mtd fix something you might want to do though is set the updater-script to delete Androidterm.apk, which is the terminal emulater included with cm7. I had to do that manually
sent from my cm7 touchwiz 4.5-ed epic
Click to expand...
Click to collapse
Thanks i added it! i already watch out for like 10 different names/locations to delete for the emulator, always helps to know more.
Bash Environment 1.2b 1/7
UPDATE
This update addresses some issues with the init script causing loss of vibrate functionality, as well as making sure busybox/su/bash/ssh all work together.
Changelog
v1.2b - 01/07/2012
- bash env init script fixes (Thanks bbelos!)
- reorganized user bin directories
v1.2a - 01/06/2012
- ssh/dropbearmulti update [jocala]
- fix su link
v1.2 - 01/05/2012
- Added BusyBox 1.19.0
- Addtl. Permissions fixes
SenseiSimple said:
UPDATE
This update addresses some issues with the init script causing loss of vibrate functionality, as well as making sure busybox/su/bash/ssh all work together.
Changelog
v1.2b - 01/07/2012
- bash env init script fixes (Thanks bbelos!)
- reorganized user bin directories
v1.2a - 01/06/2012
- ssh/dropbearmulti update [jocala]
- fix su link
v1.2 - 01/05/2012
- Added BusyBox 1.19.0
- Addtl. Permissions fixes
Click to expand...
Click to collapse
How did I miss this?! Definitely trying it out, I'll report back here soon.
EDIT: It works, no more vibration being killed! thank you, I appreciate the effort and will use this every day
Sent from my SPH-D700 using xda premium
This works great on my Galaxy Tab Plus. Thanks for this. Backtrack is running smooth.
UPDATE: I posted a link to this thread in the Galaxy Tab Plus Dev section.
Sent from my Samsung Galaxy Tab Plus with XDA Premium

[MOD][APK+SCRIPT+ZIP] Enable Init.d for Any Phones w/o Need of Custom Kernels!!!

** NOT Android 4.3 compatible!!! Term-init is recommended for now!!!
**Note...this is only for those who do not have init.d support...if you are using custom kernels (cyanogen mod original kernel etc.) that already supports init.d, you shouldn't run this......but if you accidentally ran this, it is ok...won't mess up anything...
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
v1.0
init.d support through an app!!!​
What is init.d:
the_scotsman (Moderator Liaison Admin / Moderator Committee / XDA News Writer) said:
Init.d plays an important role in the world of Android development and customization It allows users to install scripts and mods to be run at boot—everything from battery tweaks to performance tweaks. It essentially opens the door to a world of mods only possible through the Init.d process, which in turn is usually only available on custom kernels.
Click to expand...
Click to collapse
But how?
Concept:
I have recently learnt some linux scripting and was searching for a method to enable init.d scripts support for my phone which has a stock kernel. Inspired by this thread by iridaki, I finally managed to get init.d working in my phone!!! However, I thought of the other users who still do not have a proper custom recovery...how are they gonna flash zip packages? And if it has to be done manually, it requires a lot of typing, changing file permissions etc....a very tedious process...
Therefore, I've decided to come up with a script to automate this process!!! *Drum rolls*...lol
BUT now, with the aid of Androguide.fr (creator of Pimp My ROM), we managed to integrate the script into an app to save the hassle of typing commands in terminal emulator! With just a button click, the commands will be carried out! With just a button click, the app will verify whether is there init.d support or not!
Do I have init.d support?:
Well, here is a way to test:
1. Download the file from here: View attachment 1612958
2. Extract the file, you will get a file named 00test. DO NOT flash!
3. Paste it into /etc/init.d. If there is no init.d folder, most probably you DO NOT have init.d support. However, if you still wanna try, just create the folder named "init.d"
4. Change the permissions of the init.d folder and 00test into rwxrwxrwx.
5. Reboot.
6. If you see a file named Test.log in /data, you have init.d support. If not, you will have to run Uni-init, Term-init or Zip-init.
Features:
- Utilises install-recovery.sh (if your kernel supports that, but of course, but most do...) to enable init.d scripts (busybox run-parts required)
- Will add lines in install-recovery.sh if it already exists (will not replace install-recovery.sh because certain apps such as Link2SD requires that to work), creates it if it doesn't
- Creates the init.d folder with correct permissions
- Adds 2 init.d scripts: one for testing (shows time of execution), another to ensure that the scripts in init.d folder always have the correct permissions
- Adds sysinit in /system/bin, will add the required lines if it already exists
- Deletes duplicate files and lines to ensure the least of errors
Requirements:
- a rooted phone of course...
- busybox with required applets (especially run-parts), if not sure what is this, just install this by Stericson: Link and please reboot after installing before running this script......use "normal install" method, don't use "smart install"...
Instructions:
1. Download the apk.
2. Install the apk like any normal app.
3. Launch the app.
4. The rest are pretty self-explanatory...
5. You can uninstall the app after that...
Screenshots:
**To check whether init.d is really working or not, reboot your phone and navigate to /data...you should find a Test.log in there...If it is present, congrats, you have a WORKING init.d support!
Download:
If you have already read all the instructions and understand them, then click here to download:
Uni-init v1.0.apk
Credits:
Thanks to:
Androguide.fr for the android app base!
Donators (big thank you! ):
@bigknowz
Feel free to posts questions below...I will try my best to help......By the way, those who used the app and found that it works, please leave a post here, stating you phone model, android version and ROM...thanks! but don't just leave comnents saying 'it doesn't work' etc...give more details if possible...
Please don't mirror / modify my work, ask for permissions first...​
**UPDATE: v3 is out now! Android 4.3 compatible!
**Term-init is also used in Droid Manager!!!**
**Featured in the XDA News Portal: Init.d Support for Any Rooted Phone (Thanks to the_scotsman!)
Hi guys...as stated in the title above, I have created a script to be ran in terminal emulator so that it will enable the support of init.d scripts!!!
**Note...this is only for those who do not have init.d support...if you are using custom kernels (cyanogen mod original kernel etc.) that already supports init.d, you shouldn't run this......but if you accidentally ran this, it is ok...won't mess up anything...
init.d support through terminal emulator!!!​
What is init.d:
the_scotsman (Moderator Liaison Admin / Moderator Committee / XDA News Writer) said:
Init.d plays an important role in the world of Android development and customization It allows users to install scripts and mods to be run at boot—everything from battery tweaks to performance tweaks. It essentially opens the door to a world of mods only possible through the Init.d process, which in turn is usually only available on custom kernels.
Click to expand...
Click to collapse
But how?
Concept:
I have recently learnt some linux scripting and was searching for a method to enable init.d scripts support for my phone which has a stock kernel. Inspired by this thread by iridaki, I finally managed to get init.d working in my phone!!! However, I thought of the other users who still do not have a proper custom recovery...how are they gonna flash zip packages? And if it has to be done manually, it requires a lot of typing, changing file permissions etc....a very tedious process...
Therefore, I've decided to come up with a script to automate this process!!! *Drum rolls*...lol
Do I have init.d support?:
Well, here is a way to test:
1. Download the file from here: View attachment test_initd.zip
2. Extract the file, you will get a file named 00test. DO NOT flash!
3. Paste it into /etc/init.d. If there is no init.d folder, most probably you DO NOT have init.d support. However, if you still wanna try, just create the folder named "init.d"
4. Change the permissions of the init.d folder and 00test into rwxrwxrwx.
5. Reboot.
6. If you see a file named Test.log in /data, you have init.d support. If not, you will have to run Uni-init, Term-init or Zip-init.
Features:
- Auto checks for required files [v2]
- Utilises install-recovery.sh (if your kernel supports that, but of course, but most do...) to enable init.d scripts (busybox run-parts required)
- Will move install-recovery.sh to install-recovery-2.sh if it already exists and call it from the main install-recovery.sh (will not replace install-recovery.sh because certain apps such as Link2SD requires that to work), creates it if it doesn't [v3]
- If Superuser is using install-recovery.sh, will use install-recovery-2.sh instead [v3]
- Creates the init.d folder with correct permissions
- Adds 2 init.d scripts: one for testing (shows time of execution [v2]), another to ensure that the scripts in init.d folder always have the correct permissions
- Adds sysinit in /system/bin, will add the required lines if it already exists. This is for utilising a similar method to enabling init.d in AOSP ROMs
Requirements:
- a rooted phone of course...
- busybox with required applets (especially run-parts), if not sure what is this, just install this by Stericson: Link and please reboot after installing before running this script......use "normal install" method, don't use "smart install"...
- terminal emulator such as this: Link
Instructions:
1. Download the file.
2. Place it in the root of your sdcard directory.
3. Launch terminal emulator.
4. Type: su
5. Grant SuperUser access if prompted
6. Type: sh /sdcard/term-init.sh
7. The script will run and follow the instructions! As simple as that...
**To check whether init.d is working or not, reboot your phone and navigate to /data...you should find a Test.log in there...If it is present, congrats, you have init.d support!
Download:
If you have already read all the instructions and understand them, then click here to download:
term-init.sh v3
Feel free to posts questions below...I will try my best to help......By the way, those who used my script and found that it works, please leave a post here, stating you phone model, android version and ROM...thanks! but don't just leave comnents saying 'it doesn't work' etc...give more details and screenshots if possible...
Please don't mirror / modify my work, ask for permissions first...
Source code & changelog: https://github.com/Ryuinferno/Term-init​
** NOT Android 4.3 compatible!!! Term-init is recommended for now!!!
**Note...this is only for those who do not have init.d support...if you are using custom kernels (cyanogen mod original kernel etc.) that already supports init.d, you shouldn't run this......but if you accidentally ran this, it is ok...won't mess up anything...
As Term-init does not work for certain people, I have came up with a CWM flashable zip:
init.d support through CWM!!! ​
What is init.d:
the_scotsman (Moderator Liaison Admin / Moderator Committee / XDA News Writer) said:
Init.d plays an important role in the world of Android development and customization It allows users to install scripts and mods to be run at boot—everything from battery tweaks to performance tweaks. It essentially opens the door to a world of mods only possible through the Init.d process, which in turn is usually only available on custom kernels.
Click to expand...
Click to collapse
Do I have init.d support?:
Well, here is a way to test:
1. Download the file from here: test_initd.zip
2. Extract the file, you will get a file named 00test. DO NOT flash!
3. Paste it into /etc/init.d. If there is no init.d folder, most probably you DO NOT have init.d support. However, if you still wanna try, just create the folder named "init.d"
4. Change the permissions of the init.d folder and 00test into rwxrwxrwx.
5. Reboot.
6. If you see a file named Test.log in /data, you have init.d support. If not, you will have to run Uni-init, Term-init or Zip-init.
Features:
- Utilises install-recovery.sh (if your kernel supports that, but of course, but most do...) to enable init.d scripts (busybox run-parts required)
- Will add lines in install-recovery.sh if it already exists (will not replace install-recovery.sh because certain apps such as Link2SD requires that to work), creates it if it doesn't
- Creates the init.d folder with correct permissions
- Adds 2 init.d scripts: one for testing, another to ensure that the scripts in init.d folder always have the correct permissions
- Adds sysinit in /system/bin, will add the required lines if it already exists
- Deletes duplicate files and lines to ensure the least of errors
Requirements:
- a rooted phone of course...
- busybox with required applets (especially run-parts), if not sure what is this, just install this by Stericson: Link and please reboot after installing before running this script......use "normal install" method, don't use "smart install"...
- a working CWM custom recovery
Instructions:
1. Download the file.
2. Flash zip-init.zip thorough CWM.
3. Reboot and you are done!
**If you get a status 0 error in CWM, please replace the update-binary in zip-init.zip with a working update-binary of your phone (just extract it from any CWM zip meant for your phone)...
**To check whether init.d is working or not, reboot your phone and navigate to /data...you should find a Test.log in there...If it is present, congrats, you have init.d support!
Download:
If you have already read all the instructions and understand them, then click here to download:
zip-init.zip v2
Feel free to posts questions below...I will try my best to help......By the way, those who used my mod and found that it works, please leave a post here, stating you phone model, android version and ROM...thanks! but don't just leave comnents saying 'it doesn't work' etc...give more details and screenshots if possible...
Please don't mirror / modify my work, ask for permissions first...​
Troubleshooting
Troubleshooting:
**CWM might warn something about disable recovery flash when using this mod, it is just a false positive, please DO NOT select yes or else it won't work anymore**
If you have already applied the script but there is no /data/Test.log, please refer the steps below:
1. Check whether have you installed busybox properly, especially run-parts. REBOOT after installing, then only apply this script.
2. If you are using the busybox installer by Stericson, please use "normal installation method", NOT "smart installation method".
3. Check whether are these files present with the correct permissions (please change if the permissions are wrong):
- /system/bin/sysint (rwxr-xr-x) [owner: root (0), group: shell (2000)]
- /system/etc/init.d (rwxrwxrwx) [owner: root (0), group: root (0)]
- /system/etc/init.d/00test (rwxrwxrwx) [owner: root (0), group: root (0)]
-/system/etc/init.d/08setperm (rwxrwxrwx) [owner: root (0), group: root (0)]
- /system/etc/install-recovery.sh (rwxr-xr-x) [owner: root (0), group: root (0)]
- /system/etc/install-recovery-2.sh (rwxr-xr-x) [owner: root (0), group: root (0)] (may or may not be present)
4. Check whether you have run-parts installed. Go to /system/xbin, you should be able to find a fine named "run-parts"
5. Check whether you have these lines in /system/etc/install-recovery.sh (if not, please add them in manually (using Root Explorer or keep the EOL in Unix format...Google about it), remember to leave an EMPTY line at the end of the file)
Code:
# init.d support
busybox run-parts /system/etc/init.d/
6. If all the above are still not helping, please download this: run-parts.zip and extract it (DO NOT flash it). Place the file named "run-parts" in /system/xbin. Change permissions to rwxrwxrwx, owner to root (o) and group to shell (2000). Reboot and check /data again.
7. Still fails? Check your /init.rc for any lines containing "install-recovery"...if there are none, this method won't work...so use the Script Manager method.
8. Use this as a last resort: Download Script Manager from Play Store: Link. Then navigate to /etc/install-recovery.sh, select it and run as root and at boot (select the skull and gear icon).
9. If all the above are not working, and the "install-recovery" line is present, then please paste the contents of your /etc/install-recovery.sh and /etc/install-recovery-2.sh if present somewhere (like http://pastebin.com and after applying the mod of course) here for me to debug. Take a screenshot of the output after running Term-init and post here, along with your ROM version, android version and name of device.
ace 5830i stock rom
Ryuinferno said:
Hi guys...as stated in the title above, I have created a script to be ran in terminal emulator so that it will enable the support of init.d scripts!!!
Term-init --> init.d support through terminal emulator!!!
But how?
Concept:
I have recently learnt some linux scripting and was searching for a method to enable init.d scripts support for my phone which has a stock kernel. Inspired by this thread by iridaki, I finally managed to get init.d working in my phone!!! However, I thought of the other users who still do not have a proper custom recovery...how are they gonna flash zip packages? And if it has to be done manually, it requires a lot of typing, changing file permissions etc....a very tedious process...
Therefore, I've decided to come up with a script to automate this process!!! *Drum rolls*...lol
Features:
- Utilises install-recovery.sh to enable init.d scripts (busybox run-parts required)
- Will add lines in install-recovery.sh if it already exists (will not replace install-recovery.sh because certain apps such as Link2SD requires that to work), creates it if it doesn't
- Creates the init.d folder with correct permissions
- Adds 2 init.d scripts: one for testing, another to ensure that the scripts in init.d folder always have the correct permissions
- Adds sysint in /system/bin, will add the required lines if it already exists
- Deletes duplicate files and lines to ensure the least of errors
Requirements:
- busybox with required applets (especially run-parts), if not sure what is this, just install this by Stericson: BusyBox
- terminal emulator such as this
Instructions:
1. Download the file.
2. Place it in the root of your sdcard directory.
3. Launch terminal emulator.
4. Type: su
5. Grant SuperUser access if prompted
6. Type: sh /sdcard/term-init.sh
7. The script will run and follow the instructions! As simple as that...
Example:
**To check whether init.d is working or not, reboot your phone and navigate to /data...you should find a Test.log in there...If it is present, congrats, you have init.d support!
Download:
If you have already read all the instructions and understand them, then click here to download:
term-init.sh
Feel free to posts questions below...I will try my best to help...
Hit the thanks button if you liked my work...it gives me a boost!
Please don't mirror / modify my work, ask for permissions first...​
Click to expand...
Click to collapse
its not working
ranjitkhera said:
its not working
Click to expand...
Click to collapse
Well, are the all the files present? Did you follow all the steps? I suggest you to reinstall busybox by using the link I gave...then attempt this again...
This mod work on MIUI UK official for desire s
Tested with v6 supercharger by zep
Thanks a lot
Sent from my HTC Desire S using xda app-developers app
Hi ,
I use an Motoluxe xt615 , i Fllow your guide step by step . But nothing.
The Phone Restarts an in /data is no Test.log
Busybox install Terminal install . Terminal say all is ok but the test.log fails. After Reboot i cant find it.
Sorry for my bad Englisch
hexer7568 said:
Hi ,
I use an Motoluxe xt615 , i Fllow your guide step by step . But nothing.
The Phone Restarts an in /data is no Test.log
Busybox install Terminal install . Terminal say all is ok but the test.log fails. After Reboot i cant find it.
Sorry for my bad Englisch
Click to expand...
Click to collapse
Ok...let me interpret...you installed busybox by using the link I gave, then you ran this in terminal emulator right? Can you please give me a screenshot of your terminal emulator running this script? Thanks...
Ryuinferno said:
Ok...let me interpret...you installed busybox by using the link I gave, then you ran this in terminal emulator right? Can you please give me a screenshot of your terminal emulator running this script? Thanks...
Click to expand...
Click to collapse
how can i make this???
ah ok
http://s1.directupload.net/file/d/3042/ofxoh9z3_png.htm
Err...run the script in terminal emulator, when it finished running, take a screenshot...
Ryuinferno said:
Err...run the script in terminal emulator, when it finished running, take a screenshot...
Click to expand...
Click to collapse
http://s1.directupload.net/file/d/3042/ofxoh9z3_png.htm
hexer7568 said:
how can i make this???
ah ok
http://s1.directupload.net/file/d/3042/ofxoh9z3_png.htm
Click to expand...
Click to collapse
Ok...by looking at your first few lines...I saw that su permissions for terminal emulator are not granted properly...and my script seems to be only running in the surface (only shows the text)...did you reboot after installing busybox? And by the way, please check your /system/etc...is there a init.d folder and a file named "install-recovery.sh"? And what andriod version are you using?
P.s. A working example should be like my screenshot on the first page...the first few lines in your screenshot should not appear...
Ok...I will include a flashable zip soon...cause terminal emulator does not seem to work with some...
Ryuinferno said:
Ok...by looking at your first few lines...I saw that su permissions for terminal emulator are not granted properly...and my script seems to be only running in the surface (only shows the text)...did you reboot after installing busybox? And by the way, please check your /system/etc...is there a init.d folder and a file named "install-recovery.sh"? And what andriod version are you using?
P.s. A working example should be like my screenshot on the first page...the first few lines in your screenshot should not appear...
Click to expand...
Click to collapse
1 Reboot after busybox install no
2, no
3. no
That's why...the script did not have the correct permissions to run...did you grant terminal emulator su access when you type "su"? Try installing busybox again, reboot, run the script and reboot again...
Ryuinferno said:
That's why...the script did not have the correct permissions to run...did you grant terminal emulator su access when you type "su"? Try installing busybox again, reboot, run the script and reboot again...
Click to expand...
Click to collapse
When i type su , the first massage is "log_write: cannot open Device" , then after this massage i have su
When you type "su" for the first time after installing terminal emulator, a pop up will appear, asking you to grant or deny superuser access...did that happen?
Ryuinferno said:
When you type "su" for the first time after installing terminal emulator, a pop up will appear, asking you to grant or deny superuser access...did that happen?
Click to expand...
Click to collapse
i install emulator new, and i lock that
Ok..seems that the su access in your terminal emulator is not working well, so I will upload a cwm zip soon...wait for that...

[TOOL/SCRIPT/RC2]FreeXplain-r / freex-BETTER than free & Why "free" RAM ISN'T WASTED!

[TOOL/SCRIPT/RC2]FreeXplain-r / freex-BETTER than free & Why "free" RAM ISN'T WASTED!
See Post #2 for Installation/Requirements/Download.
Now before getting into my new tool, I'd like to explain why I felt the need to even bother making it.
First of all, if you've ever typed "free" in terminal, you'd see that it shows almost no free ram while any app you check with would show lots of free ram.
This what it looks like.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Now if you're like me, you'd probably do a google search to figure out what the hell it means lol
Because I had over 200 mb "free" when I took that screen shot but that shows only 40mb free and it would be nice if it actually made some sense
Some of you familiar with my V6 SuperCharger may have read this post of mine before: "Why 'Free RAM' Is NOT Wasted RAM!"
In there, I post some findings from my first hand experience and how it correlates with this article Linux Memory Consumption (which I had found afterwards)
Unfortunately, that page is now down but I had a saved copy in PDF format which I've attached.
In that pdf, it reads "The absolute free memory number is not only the value of MemFree, but the sum of the MemFree, Buffers and Cached fields."
There are many pages that can help you figure it out.
Here is a good one Check Linux Memory Usage Using Free Command
If you need to know exactly what buffers and cache actually are, click the button
Info taken from http://nilesh-joshi.blogspot.ca/2010/04/interpreting-output-of-free-command.html
The "buffers" column shows the amount of memory being used by the kernel buffer cache. The buffer cache is used to speed up disk operations, by allowing disk reads and writes to be serviced directly from memory. The buffer cache size will increase or decrease as memory usage on the system changes; this memory is reclaimed if it is needed by applications.
The "cache" column indicates how many memory pages the kernel has cached for faster access later. Since the memory used for buffers and cache can easily be reclaimed for use by applications, the second line (-/+ buffers/cache) provides an indication of the memory actually used by applications (the "used" column) or available to applications (the "free" column). The sum of the memory used by buffers and cache reported in the first line is subtracted from the total used memory and added to the total free memory to give the two figures on the second line.
Swap space is generally used as a last resort when the system can't reclaim physical memory in other ways.
Another light hearted link is Help! Linux ate my RAM! That page has this table:
The middle yellow bar above is referring to the buffers (91 mb) and cache (764 mb) values below (855 mb total).
Code:
$ free -m
total used free shared buffers cached
Mem: 1504 1491 13 0 91 764
-/+ buffers/cache: 635 [B][COLOR=Green]869[/COLOR][/B]
Swap: 2047 6 2041
869 mb is readily available and not just 13 mb!
So if you read that page, you'd know that 855 mb is NOT actually wasted, it's being used by linux to speed things up!
Basically, if you're not using the ram for apps, linux is using it for cache instead.
And when you need that ram for apps, you get to reclaim it instantly
Therefore...
======================================================
Ok that's all nice nice but why did I bother making a new tool?
Well, if you look at the first screen shot up top, you'll see that the android/busybox free command does NOT have the cached column.
Therefore, the free command on Android actually tells us a little something...
...but whole lotta nothing!
So, this is what I did about it...
Basically, I:
Added the cached colum
Removed the useless shared column (which is always 0 and is a waste of real estate)
Added the swap -/+ adjustment line (notice that 4076 kB is actually available, not just 16 kB)
Then total everything up nice nice
So here's a direct comparison of the 2 outputs:
I added colour to the free output for easy comparison.
But notice how the -/+ adjustment line is COMPLETELY different.
The free command shows only 44,644 kB as being freely available but in reality, the value is 208,352 kB... not even close! Simply because free doesn't utilize the cached value (which is found /proc/meminfo along with all the other data.)
The math works both downwards... (add same colours to get the bold ie green plus green = green bold)
...and sideways ie. freely available(208352) = free(40104) + buffers(4540) + cached(163708)
Now, not everybody like rainbows so there is an alternate colour scheme...
Of course, while I was at it (it took me nearly a month to perfect it), I added a whole bunch of options...
So let's see it actually explain something with the -x option...
And explaing even more with -r... ( it's kinda like a mini tutorial )
Since it has so many options, it would be a pita to remember all the options so that you can have your favourite output format all the time...
So it will actually remember your last command (but ignores -help and -install).
Just type "freex" and it automagically does what you did last time...
The output is different depending on whether swap is enabled...
I added the -o option from free which omits the -/+ adjustment line and added a -total only option...
Force -wide option when not using kilobytes (and using a smaller font)...
It's nice to see the percentage table along with kB and/or mb tables.
Also note that it automatically uses wide output when using kB.
Click the button for some gratuitous screen grabs...
Root is NOT required to use this script!
However, if not root, to actually install it for easy command line usage requires a little workaround.
Requirements:
1. An app that can run scripts lol
Fully compatible with Terminal Emulator and Script Manager/Script ManagerPro.
Other terminal apps probably won't display colours properly.
In fact Script Manager didn't either until I requested 256 colour support for it and @devwom updated it quite fast
So make sure to UPDATE Script Manager if that's your preference!
Tho it may not display all the colours, Terminal IDE will work too while installing BusyBox for itself.
2. BusyBox (for the grep and printf commands)
If you're rooted, then there is nothing else to do and go to the Install section.
If NOT rooted you have a few options.
a) download the attached busybox.zip and put it in the same place as the freex script. It is not a zip file. It's the busybox binary from Kbox2. I chose it for it's small size.
Just run freex as explained in the install section and freex will install "busybox.zip" for you as long as it's in the same location as the script.
b) install OneBox. It requires Terminal Emulator and automates the process to...
c) Install Kbox2
d) Easiest solution is probably BusyBox Non-Root but also for use with Terminal Emulator.
e) Use Terminal IDE (has its own BusyBox)
FreeXplain-r Installation:
(Pronounced "Free Explainer")
Note: Installation merely simplifies the execution of freex so that you can just type "freex" in your terminal app without having to type "sh /sdcard/freex*" all the time. Of course, if you're using a script runner like Script Manager, it doesn't matter too much since their purpose is to make it easy to run scripts.
1. Save attached script to sdcard. (No need to rename it from freex*.pdf)
2. Then just run the script!
If using Script Manager, no need for me to explain how to use that app.
If using a terminal app, do:
Code:
cd /sdcard
sh freex*
No need for the -i switch it should install automatically.
Use the -i switch for forced installation/update/refresh.
If not running as root, it will copy to your terminal app's data folder and give you further instructions.
Notice that it says to run with "sh freex" in the help section?
That's because the $PATH statement hasn't yet been setup in the terminal app's settings.
If running as root, it will automatically install to /system/xbin and it's easy as pie.
Here is a forced refresh/reinstall.
Not running as root at first but the $PATH is setup so it doesn't give the additional help info to set that up.
Then as root, of course it installs to /system/xbin
Another masterpiece from the GoRM!
Even for a simple(but not so simple ) script you can explain this much. This really sums up what an amazing developer you are zep.
Sent from my GT-P7500 using Tapatalk
This is nice!! Explains all! I like rainbows of course..
Noted something.. when running (installing) the script saved to a folder which has a name with spaces, an error occurs (I'm using ScriptManager). "freex" didn't get installed to xbin properly (size=0). No issues otherwise.
i'll try it later, thanks man... :good:
Daniel D. said:
Another masterpiece from the GoRM!
Click to expand...
Click to collapse
ok I give up... what's GoRM? IMMA N00B and forgot the URL for google.com
eushaun99 said:
Even for a simple(but not so simple ) script you can explain this much. This really sums up what an amazing developer you are zep.
Sent from my GT-P7500 using Tapatalk
Click to expand...
Click to collapse
I don't bother if it don't work on all devices
mrhnet said:
This is nice!! Explains all! I like rainbows of course..
Noted something.. when running (installing) the script saved to a folder which has a name with spaces, an error occurs (I'm using ScriptManager). "freex" didn't get installed to xbin properly (size=0). No issues otherwise.
Click to expand...
Click to collapse
Ah the scripter's life long nemesis... the evil space in a folder name.
I shall quash that empty soul in our next duel.
Btw you didn't update Script Manager... the rainbow is all wrong lol
Edit: Added a poll. For fun, I'm gonna view it as an IQ test. heh.
God of RAM Management :silly:
Hey zepp just wanted to confirm after running this script this is what my free ram should look like
sent from my DNA
zeppelinrox said:
Btw you didn't update Script Manager... the rainbow is all wrong lol
Click to expand...
Click to collapse
Yup.. noted that. I meant rainbows in terminal emulator..
"watch freex" command lets me to enjoy the rainbows every 2 seconds
Ok any idea as to why I'm getting this
sent from my DNA
Or this
sent from my DNA
Daniel D. said:
God of RAM Management :silly:
Click to expand...
Click to collapse
Oh right!
I'm too humble to have figured that one out lol
mrhnet said:
Yup.. noted that. I meant rainbows in terminal emulator..
"watch freex" command lets me to enjoy the rainbows every 2 seconds
Click to expand...
Click to collapse
That's funny I was looking at other free options and thoughr about adding the interval option with -s and also saw that watch tip lol
But it clears the screen so it only shows the latest output.
eriknors said:
Or this
sent from my DNA
Click to expand...
Click to collapse
what if you don't use exec? I just tried with exec and terminal emulator crashed.
zeppelinrox said:
Oh right!
I'm too humble to have figured that one out lol
That's funny I was looking at other free options and thoughr about adding the interval option with -s and also saw that watch tip lol
But it clears the screen so it only shows the latest output.
what if you don't use exec? I just tried with exec and terminal emulator crashed.
Click to expand...
Click to collapse
I don't follow how else could I run it without exec? All I do is open terminal emulator type su then type freex
sent from my DNA
eriknors said:
I don't follow how else could I run it without exec? All I do is open terminal emulator type su then type freex
sent from my DNA
Click to expand...
Click to collapse
I think you might be experiencing the issue related to this below::
mrhnet
Noted something.. when running (installing) the script saved to a folder which has a name with spaces, an error occurs ... "freex" didn't get installed to xbin properly (size=0). No issues otherwise.
Click to expand...
Click to collapse
zeppelinrox
Ah the scripter's life long nemesis... the evil space in a folder name.
I shall quash that empty soul in our next duel.
Click to expand...
Click to collapse
:::::::::::::::
move your downloaded ""freex_RC1.sh.pdf "" to just the /sdcard
::: I personally re-name it to ""freex_RC1.sh""
and then open terminal
give her the ole su command
and
Use the -i switch for forced installation/update/refresh.
:: sh /sdcard/freex_RC1.sh -i ::
Then as root, of course it installs to /system/xbin
Now run your commands...
.
Ok I double checked where I have the file and its path is /sdcard/freex_RC1.sh no spaces. Did exactly what u suggested and when I try to run freex -i I get this. Could it have been installed to system/xbin incorrectly and now unless I either dirty flash my Rom or restore system it's not gonna change?
sent from my DNA
eriknors said:
Ok I double checked where I have the file and its path is /sdcard/freex_RC1.sh no spaces. Did exactly what u suggested and when I try to run freex -i I get this. Could it have been installed to system/xbin incorrectly and now unless I either dirty flash my Rom or restore system it's not gonna change?
sent from my DNA
Click to expand...
Click to collapse
Maybe you have an incomplete download
eriknors said:
Ok I double checked where I have the file and its path is /sdcard/freex_RC1.sh no spaces. Did exactly what u suggested and when I try to run freex -i I get this. Could it have been installed to system/xbin incorrectly and now unless I either dirty flash my Rom or restore system it's not gonna change?
sent from my DNA
Click to expand...
Click to collapse
according to your photo you did not type the command properly
look at your command it should read this
:: sh /sdcard/freex_RC1.sh -i ::
that is a minus and lowercase letter i
that is what tells it to force re-install
you should then see it tell you
"installing myself to...
/system/xbin/feeex"
I'm not 100% sure but you may want to run it as su,
then the command
.
hhp_211 said:
according to your photo you did not type the command properly
look at your command it should read this
:: sh /sdcard/freex_RC1.sh -i ::
that is a minus and lowercase letter i
that is what tells it to force re-install
you should then see it tell you
"installing myself to...
/system/xbin/feeex"
I'm not 100% sure but you may want to run it as su,
then the command
.
Click to expand...
Click to collapse
I'm pretty sure zepp is right I'm gonna redownload it. I did run the exact command u are referring to I just didn't screenshot it. Who knows though knowing my luck the script probably isn't going to work correctly for my phone cause it's an HTC or for some random reason my kernel doesn't support something. I've always trusted @zepplinrox scripts and I've lived by V6 for as long as I can remember but even when I follow every step to a T I almost always run into these random isolated quirks. I mean everyone else that's ran this has had no issue yet I do exactly the same thing and for whatever reason the script runs but no info shows up? I will redownload and start from scratch and report back. Thanks again zepp. Can't wait for ur V6 kk edition
sent from my DNA
Just in case there is something weird, post the output of this:
cat /proc/meminfo
also see what happens if you use script manager to run it

[TOOL][LOG] Easy-to-share log and report for developers and users

Hello XDA comunity!
I want to share you a very useful tool that I have created, its name is: "kielyd".
What's keilyd?
Keilyd is a BASH daemon that constantly dumps the system's logs, warnings and other useful info in a easy-to-share "ZIP" with the main purpose to create a very informative and useful bug report.
keilyd is expansible and configurable. It's very easy to add new features because BASH interacts directly with the Linux/BSD commands in the Android System.
How does it works?
Keilyd is launched at device boot, with the "init.d support" and as root (see requeriments below). After launched, keilyd relaunches itself in a "daemon mode", that runs in the background, then, it dumps several information in the /sdcard and compress it in a single zip, so, the user can send that zip (in fact, are 2 zip's or more if you use the "snapshot" feature) to the developer of their ROM, to a forum or send it to a 3rd party developer and report a bug with all the system logs included.
Keilyd stores 2 zips: the first one is the current log (the "very last file") and the second one is the last log before keilyd were launched again.
If you won't enable de daemon, you can create a single zip when you use the "snapshot" feature, if you take two or more snapshots in the same minute, the ZIP will be the same, otherwise, one script per different minute will be created. The Snapshot feature can create as much zips as needed.
What info is collected?
That's a good question!
The info that is collected is (this applies ONLY for a vanilla copy of keilyd):
Kernel log (aka "dmesg") and other kernel info
Logcat (aka "logcat")
List of process running and memory statics
A copy of all tweaks in init.d (including keilyd itself)
A copy of build.prop and sysctl.conf
A copy of /proc/config.gz (if exists)
Some cpuinfo
Mounted filesystems and usage
How does this "daemon" can help me?
Developer:
Have you had the need to get some system log from a user?
Probably the answer is "yes", but, the user may have no idea how to do that, so, you have to give them a "step-by-step" guide of "how to get a system log in the terminal".
This simplifies the process, so, the user can report a bug with logs with no terminal (if the daemon is enabled) or with a single command that looks like
Code:
keilyd --snap
User:
Well, the complement of the developer... You can share "golden" information just by sending 2 zips files to the dev. Minimal Android knowledge is the only prerequisite if the daemon is working as spected.
This daemon is not a demon, but it can be very bad if not implemented as spected. Please, ensure that ALL THE COMMANDS ARE KNOWN and that THERE IS NO PORPRIETARY interference.
Why BASH?
A good idea is to create a daemon in C/C++ and share it as a "binary", BUT, as we are recolecting information from the device, the user must have to be concient of what are the script recollecting, if the user can't read bash, it can ask to a 3rd developer. You can feel safer because it's under the GPLv3 licence!
In addition, BASH run in (almost) any UNIX based OS, including but not limited to Apple OS X, GNU/Linux, Android, iPhone OS, etc...
This prevent a "blind trust" from the user, and give them facility of enable-disable the script, add features and so on.
Requeriments
- A rooted device
- Busybox (or run-parts)
- init.d support
- BASH 4.3.x ONLY SUPPORTED by the moment.
- Terminal emulator/HIDE]
How can I include it in my ROM?
Take a look of my repo in GitHub, it contains the last version of keilyd and the implementation during compilation in the Makefile.
If you are a ROM modder, download the latest version from above, include init.d and bash support in you ROM.
Or you can create a CWM/TWRP/Philz... flashable zip (it would be great!)
Users: how to use
When something goes weird, open the terminal emulator and write:
Code:
keilyd --snap
and send to the developer all zips in
Code:
/sdcard/keilyd/out
type
Code:
keilyd --help
and a helpful message will be printed.
If something goes wrong and you need to reboot the device (or the device reboots itself), just send both zips to the developer or the forum where you are asking help (This feature only works if the daemon is enabled).
Developers: how to use
You can add/remove things in order to fit your needs, the only thing that we ask you is that you write the whole script in BASH, without "blobs" that may private the user from know what is exacly logged and stored.
If some user sends you the zip, you will notice that the files are plain-text, and you can view it in any text editor.
TODO:
List all apps installed (system and user)
Secure "user-modificable" settings (Allmost DONE)
A graphical interface (an app) to manage the daemon
A flashable ZIP
Aports and sugestions are WELLCOME, please, coment in the box below
Install redistributable package:
If the avobe requeriments are meet...
1. Open this GItHub URL
Click in the "Download ZIP" icon in the right.
2. Put the zip in your phone
3. Unzip it.
4. If you want to use the script... A; otherwise, B.
A.
a. Open the terminal emulator.
b. cd to the folder that contains
Code:
install.sh
c. As root, type "
Code:
sh install.sh
" in the terminal.
B.
a. Open ES File Explorer
b. Enable root explorer and mount /system as rw
c. Copy
Code:
daemon/18keily
to
Code:
/etc/init.d
d. Tap and hold the
Code:
18keily
file and open the poperties
e. Change te permisions to
Code:
rwx r-x r-x
f. Copy the
Code:
redistrib/bash
file to
Code:
/system/xbin/bash
g. Change the permisions as above.
h. Symlink /etc/init.d/18keily to /system/xbin/keilyd
i. Reboot
NOTE:
Keilyd can be used in 2 ways:
1. As a daemon that does it job without human interaction, that constatantely and automaticaly creates 2 zips in the output directory.
2. As a Script that only needs to be called with the '--snap' parameter, but it requieres human interaction and does not constantely repeat the process.
Use the first one if you are a beta tester, or if you know that you ROM can hang sudently. Recomended for Unstable ROM'S.
Use the Last One if your ROM is stable or official, but you want to do a bug report.
You can allways use the second option if you use the first one.
By default, the daemon is disabled. You can enable if you change the "ENABLED" variable to "Y". I personally recommend values for "MINS" between 5 and 15.
BUGS REPORTS in the GITHUB REPOSITORY
Reserved
Hi there,
This looks like what I need, did you close the repo? Can you share a link to the script? I have a few devices, and I want to have some forensic information for troubleshooting (I.E. log all the warnings, errors and critical logs, + a snapshot every n minutes about the system usage). Right now I have to go where the device is, connect it with ADB and query the logs (most of the time, the logs were overwrited)... Thanks in advance.

Categories

Resources