[Script][Linux]Push files or folders with right-click in nautilus - G1 Android Development

Code:
#!/bin/bash
# Script for adb push file or contents of directory to /sdcard/ with
# right-click in nautilus.
# Requires adb to be in PATH and gdialog from gnome-utils or Xdialog for dialogs.
# Place this script in ~/.gnome2/nautilus-scripts/
# Can also be used without nautilus.
# Made by Tomasz Cielecki (tomasz [at] ostebaronen.dk)
# Feel free to edit and distribute as much as you want.
# if you want dialogs set dialog_enable=1 else dialog_enable=0
dialog_enable=1
# Write the entire path to adb here
adbPath="/home/tomasz/AndroidSDK/tools/adb"
function dialogs {
if [ $dialog_enable = 1 ]; then
if [ -e "/usr/bin/gdialog" ]; then
gdialog --title "adb push" --msgbox "$1" 200 200
elif [ -e "/usr/bin/Xdialog" ]; then
Xdialog --title "adb push" --msgbox "$1" 0 0
else
echo "No dialog program present"
fi
fi
}
if [ $# -ne 1 ]; then # If arguments not equal 1, complain!
echo "Usage - $0 file"
echo "or - $0 directory"
exit 1
fi
if [ -d "$1" ]; then
$adbPath shell mkdir "/sdcard/`basename "$1"`" # Create the directory on SDcard
$adbPath push "$1" "/sdcard/`basename "$1"`" # Push files in the folder to folder on SDcard
dialogs "Folder $1 was pushed"
elif [ -e "$1" ]; then
$adbPath push "$1" /sdcard/ # Push single file to SDcard
dialogs "$1 was pushed"
else
echo "Gurumeditation!" # Oops!
fi
Get it here: http://ostebaronen.dk/android/adbpush.sh
Remember to chmod u+x
Place it in ~/.gnome2/nautilus-scripts/
And write the full path to the adb tool in the adbPath variable.
Remember to have permissions to access the file or folder you are pushing

AMAZING!!!!!!!!!! i've needed this for sooooo long this is the best ever. thanks man you get mad props.

i should really learn sh/bash...

I'm not sure what will happen if there is a folder inside the folder you are trying to push.
And i think it will crash if you are trying to push something with an absolute path.
Will look into this!

wouldn't that be up to adb?

yes, but for instance if you are trying to push the folder /home/user/test then the script will try to make the exact same folder name on the SDcard. But i have a sollution for that
For the folder in a folder thing I will probably have to make a recursive function.

Cheesebaron said:
yes, but for instance if you are trying to push the folder /home/user/test then the script will try to make the exact same folder name on the SDcard. But i have a sollution for that
For the folder in a folder thing I will probably have to make a recursive function.
Click to expand...
Click to collapse
If you fix it or improve it that would be nice. I am using it now and like it.....thanks

I've been testing it some now and it seems to behave correctly.
made a file structure that looks like this:
test
  test1 (file)
  test2 (file)
  a (folder)
   hest(file)
  test2_dir (folder)
   prut
And it creates the folder test on the SDcard with the correct sub folders. So I guess it is ok. Could you guys please test this for me and give me feedback?

Works great from the terminal for me but not from Nautilus. I get the dialog that the correct file was pushed, but the file is not on the sdcard. Very weird.

Was it a single file or a folder?

Silly me, I wasn't aware of adb being able to push entire folders...
Should work now!

Cheesebaron said:
Was it a single file or a folder?
Click to expand...
Click to collapse
Just a single file. Adb is in the path, and it worked fine from the terminal.
I also had to change the crunch-bang to bash, doesn't work with sh.
Edit: I put the entire path to adb in the script and it is working. I can type adb from any directory and it works. I don't know why it doesn't in this script.

Related

Batch file rename

Im trying to rename some files from .mp4 to .tmp and dont know how to go about this. I a little new to Linux commands, didnt start to learn till i got my G1. I know you can use the mv command to rename files but doesnt seem like you can do that in a batch. Wanna hide the porn on my phone from the little women and it shows up in the gallery
I don't know exactly, but try
mv *.mp4 *.tmp
I did try that and I get a error "failed on <fileName> - Invalid argument"
just open a DOs window..
cd to the directory you wan't to rename and type ren *.tmp *.mp4
eg:
cd C:\Myfiles
ren *.tmp *.mp4
Yep i know how to in DOS, but basically I want to create two scripts, one to rename them to .tmp and another one to rename them back to .mp4 and be able to run the scripts from the phone. I was thinking of maybe created a little app to do this, i do know abit about java script from a web development standpoint.
ok.. if you want to run it from the phone.. than it wont be a batch script woudl be an shell script bash script with is *nix format...
try this.. save it inside /system/bin as ren.sh chmod it to 777 or 755 and use it liek this
to rename mp4 to tmp use sh ren.sh mp4 | to rename mp4 to tmp use sh ren.sh tmp
Code:
if [ $1 = "tmp" ];
then
for f in *.tmp; do mv "$f" "`basename "$f" .tmp`.mp4"; done;
elif [ $1 = "mp4" ];
then
for f in *.mp4; do mv "$f" "`basename "$f" .mp4`.tmp"; done;
fi
when i try to run it i get "failed on '*.mp4' - No such file or directory"
sh ren.sh mp4 was the command I sent.
are you running it insicde the directory where teh tmp or mp4 files are located?
Sweet that worked. One thing though is that it i get a message after its done saying ": not found". Also is there a way I can use that sh without having to put the full path to the sh. right now it only works like this
Code:
cd /sdcard/downloads
sh /system/bin/ren.sh mp4
PS thank you for the help.
MonkySlap said:
Sweet that worked. One thing though is that it i get a message after its done saying ": not found". Also is there a way I can use that sh without having to put the full path to the sh. right now it only works like this
Code:
cd /sdcard/downloads
sh /system/bin/ren.sh mp4
PS thank you for the help.
Click to expand...
Click to collapse
should respond with chmod 755 /system/bin/ren.sh i think .. then it'll run from anywhere
LucidREM said:
should respond with chmod 755 /system/bin/ren.sh i think .. then it'll run from anywhere
Click to expand...
Click to collapse
i would just rename it "ren" and you should be able to "ren tmp" etc
LucidREM said:
i would just rename it "ren" and you should be able to "ren tmp" etc
Click to expand...
Click to collapse
That worked. Thank you. now i get to watch cake and eat it too lol
as i said before, you need to put the file inside your bin directory, and chmod to 755 or 777 which ever works not sure as LucidREM said move it to /system/bin and chmod it
than u can be abel to use ren.sh mp4 ect..

[UTIL] a2sd Updated script w/ error checking! 10/12/09

**New version in the works. See last page for my post**
**Updated 5:51pm CST**
-Made sweeping changes to the script. Thanks Farmatito for the suggestions. Output from script also goes to adb logcat
-See script for additional changelog
**Updated 11:00am CST**
-Changed a couple "cp" commands to "ln" as this is a smarter way of doing it. Script has been updated and re-uploaded
After having issues with the current a2sd script floating around (under certain environments the script would erase all user & system apps) I decided to update it so that there is proper error checking, logging, and back-out procedures on failure. The log is stored in /data/a2sd.log so if you get stuck at a black screen or it won't boot, now you can check the log and find out where its failing! By the way, if your phone won't boot or you have a black screen obviously the only way you can read the log is by connecting the phone to a pc and using adb shell cat /data/a2sd.log .
Anyways here it is, enjoy.
Procedure
Code:
adb remount
adb shell cp /system/bin/a2sd /system/bin/a2sd.bak
adb shell push a2sd.txt /system/bin/a2sd
adb shell chmod 777 /system/bin/a2sd
adb shell reboot
Everything should work like before. But you can rest at night knowing if your phone won't boot you now have a way to know if it was related to a2sd and what the cause was
**NOTE: If you get stuck at the boot screen it's probably b/c your /system/sd partition is failing the fsck. You should probably fsck it on your own to fix any corruption. If you don't want the fsck then comment it out of the script.
Very cool, lets hope a developer picks this up and uses it.
bubonik said:
Very cool, lets hope a developer picks this up and uses it.
Click to expand...
Click to collapse
I could toss this in my next build if the masses like it (sure they will)
I was going to read through this and give a full opinion but it is too long for me to do it this late. My eyes are crossing trying to read it. But at first glance it looks good (logs are always good right ). And I've never seen shafty not do good work. I'll try to look it over in full tomorrow. Plus you've inspired me to try to think of same way to contribute to this file. So now I have to put that on my todo list.
miketaylor00 said:
I was going to read through this and give a full opinion but it is too long for me to do it this late. My eyes are crossing trying to read it. But at first glance it looks good (logs are always good right ). And I've never seen shafty not do good work. I'll try to look it over in full tomorrow. Plus you've inspired me to try to think of same way to contribute to this file. So now I have to put that on my todo list.
Click to expand...
Click to collapse
O hell yea, mike the masters on it!
miketaylor00 said:
I was going to read through this and give a full opinion but it is too long for me to do it this late. My eyes are crossing trying to read it. But at first glance it looks good (logs are always good right ). And I've never seen shafty not do good work. I'll try to look it over in full tomorrow. Plus you've inspired me to try to think of same way to contribute to this file. So now I have to put that on my todo list.
Click to expand...
Click to collapse
The more the merrier. It's too bad everyone doesn't have bash installed or we'd be able to take advantage of all the features bash includes (functions, advanced iteration loops, arithmetic).
That would be on all the ROM devs to include it though. Oh and I'm a UNIX Admin so writing shell scripts is like 60% of my job. We try and make our lives easier by writing scripts to do the work for us
shafty023 said:
The more the merrier. It's too bad everyone doesn't have bash installed or we'd be able to take advantage of all the features bash includes (functions, advanced iteration loops, arithmetic).
That would be on all the ROM devs to include it though. Oh and I'm a UNIX Admin so writing shell scripts is like 60% of my job. We try and make our lives easier by writing scripts to do the work for us
Click to expand...
Click to collapse
I figured you did something like that. Your scripts are always good. I've learned a lot from reading through stuff that you have posted. I wish I had your experience with it. I always have to fumble through to find the right syntax to do what I want to do.
miketaylor00 said:
I figured you did something like that. Your scripts are always good. I've learned a lot from reading through stuff that you have posted. I wish I had your experience with it. I always have to fumble through to find the right syntax to do what I want to do.
Click to expand...
Click to collapse
Ya I started out fumbling around just as well. Keep at it and if you ever have any questions about how to do something feel free to PM me. Shell scripting, among the other 10 programming languages I code in fluently, come second nature after years of coding in them. Java/C/C++/Sh/Bash/Lisp/Javascript/Html/Php/Jquery.
shafty023 said:
Ya I started out fumbling around just as well. Keep at it and if you ever have any questions about how to do something feel free to PM me. Shell scripting, among the other 10 programming languages I code in fluently, come second nature after years of coding in them. Java/C/C++/Sh/Bash/Lisp/Javascript/Html/Php/Jquery.
Click to expand...
Click to collapse
Sweet, i will probably take you up on that offer sometime. I have a question about running e2fsck. I always run it with the -f option because it seems like it never finds problems unless they are really bad if I don't. Would there be a problem running it in your a2sd with -fy? I've always wondered why no one uses the -f option.
miketaylor00 said:
Sweet, i will probably take you up on that offer sometime. I have a question about running e2fsck. I always run it with the -f option because it seems like it never finds problems unless they are really bad if I don't. Would there be a problem running it in your a2sd with -fy? I've always wondered why no one uses the -f option.
Click to expand...
Click to collapse
Well there's two sides to this. One could argue we should force a fsck at every boot, and then the other side is to let Android mark the partition as dirty so fsck will run only when needed. Normally the filesystem is supposed to be marked dirty if in fact it is dirty.
So if we force a fsck at every boot then that would add to the boot time of the OS but then again would ensure the filesystem isn't corrupted. It's really personal preference. It breaks down to "Speed of boot" vs "filesystem integrity"
I can't even find a2sd in cm4.1.999. Seems to have gone missing. Anyone know if it exists, and if so, where it's at?
overground said:
I can't even find a2sd in cm4.1.999. Seems to have gone missing. Anyone know if it exists, and if so, where it's at?
Click to expand...
Click to collapse
The default location is /system/bin/a2sd . If it's not there not sure where else it could be hidden at
shafty023 said:
The default location is /system/bin/a2sd . If it's not there not sure where else it could be hidden at
Click to expand...
Click to collapse
That's where it should be and used to be. I looked in the original zip and it's not there either. Checked sbin and xbin and other places where it also shouldn't be, and can't find it...weird.
overground said:
That's where it should be and used to be. I looked in the original zip and it's not there either. Checked sbin and xbin and other places where it also shouldn't be, and can't find it...weird.
Click to expand...
Click to collapse
Perhaps it was integrated into the swap file. And I don't mean swap file as in the literal swap file. I mean /system/bin/swap which is a conf file & shell script in one. I would check there to see if it was incorporated in there.
Hi,
just some comments about the "monster" a2sd script. ;-)
Hope they will help you to imprrove it further.
I would suggest to change the logging so that
it could be seen during a adb logcat of the boot process, from:
echo "Beginning a2sd `date`" >$LOG;
to e.g:
echo "Beginning a2sd `date`" | busybox tee -a $LOG;
(LOG must be initialized if it not exists)
Line 40:
e2fsck -y /dev/block/mmcblk0p2;
if [ $? -ne 0 ];
then
echo "Fail" >>$LOG;
exit 1;
fi;
else
echo "Ok" >>$LOG;
fi;
# set property with exit code in case an error occurs
setprop cm.e2fsck.errors $?;
Setprop is not executed in case of errors as we do exit. Is this intended?
Line 144:
# don't allow /data/data on sd because of upgrade issues - move it if possible
if [ -d /system/sd/data ];
then
echo -n "Found /system/sd/data which is a no-no, removing: " >>$LOG;
busybox cp -a /system/sd/data/* /data/data/;
busybox rm -rf /system/sd/data;
echo "Ok" >>$LOG;
fi;
I suggest cp -ap to preserve permissions and ownership of the copied files
I suggest to mv /system/sd/data to /system/sd/data.bak if cp fails
rather than rm all the data
Line 195:
if [ `ls -l /data/$i/ | wc -l` -ne 0 ];
then
echo -n "Moving /data/$i: " >>$LOG;
busybox cp -a /data/$i/* /system/sd/$i/;
if [ $? -ne 0 ];
then
echo "Fail" >>$LOG;
busybox umount /system/sd;
exit 1;
else
echo "Ok" >>$LOG;
fi;
fi;
I suggest to use cp -ap to preserve permissions and ownership
Line 206:
echo -n "Deleting contents in /data/$i: " >>$LOG;
busybox rm -f /data/$i/*;
I suggest rm -fR /data/$i;
Line 329:
if [ -f /system/lib/hw/lights.msm7k.so ] && [ ! -e /system/lib/hw/lights.trout.so ];
then
busybox cp /system/lib/hw/lights.msm7k.so /system/lib/hw/lights.trout.so;
fi;
if [ -f /system/lib/hw/copybit.msm7k.so ] && [ ! -e /system/lib/hw/copybit.trout.so ];
then
busybox cp /system/lib/hw/copybit.msm7k.so /system/lib/hw/copybit.trout.so;
fi;
if [ -f /system/lib/hw/sensors.msm7k.so ] && [ ! -e /system/lib/hw/sensors.trout.so ];
then
busybox ln -s /system/lib/hw/sensors.msm7k.so /system/lib/hw/sensors.trout.so;
fi;
I suggest to use ln for all.
Line 353:
/system/bin/sh /system/bin/swap;
Cannot find /system/bin/swap on my rom, maybe
if [ -e /system/bin/swap ] ; then.
shafty023 said:
The default location is /system/bin/a2sd . If it's not there not sure where else it could be hidden at
Click to expand...
Click to collapse
update-cm-4.1.99-signed/system/etc/init.d/04apps2sd
farmatito said:
update-cm-4.1.99-signed/system/etc/init.d/04apps2sd
Click to expand...
Click to collapse
Thank you...knew it had to be in there. Love your work, BTW.
echo "Beginning a2sd `date`" >$LOG;
to e.g:
echo "Beginning a2sd `date`" | busybox tee -a $LOG;
Click to expand...
Click to collapse
Unfortunately during boot anything thrown to console is not caught by adb logcat, BUT! You gave me a good idea, it will now look like this
Code:
/system/bin/logwrapper echo "Beginning a2sd `date`";
# set property with exit code in case an error occurs
setprop cm.e2fsck.errors $?;
Click to expand...
Click to collapse
Removed
Line 144:
# don't allow /data/data on sd because of upgrade issues - move it if possible
if [ -d /system/sd/data ];
then
echo -n "Found /system/sd/data which is a no-no, removing: " >>$LOG;
busybox cp -a /system/sd/data/* /data/data/;
busybox rm -rf /system/sd/data;
echo "Ok" >>$LOG;
fi;
I suggest cp -ap to preserve permissions and ownership of the copied files
I suggest to mv /system/sd/data to /system/sd/data.bak if cp fails
rather than rm all the data
Click to expand...
Click to collapse
Great catch, this has been changed
Line 195:
if [ `ls -l /data/$i/ | wc -l` -ne 0 ];
then
echo -n "Moving /data/$i: " >>$LOG;
busybox cp -a /data/$i/* /system/sd/$i/;
if [ $? -ne 0 ];
then
echo "Fail" >>$LOG;
busybox umount /system/sd;
exit 1;
else
echo "Ok" >>$LOG;
fi;
fi;
I suggest to use cp -ap to preserve permissions and ownership
Click to expand...
Click to collapse
Changed
Line 206:
echo -n "Deleting contents in /data/$i: " >>$LOG;
busybox rm -f /data/$i/*;
I suggest rm -fR /data/$i;
Click to expand...
Click to collapse
This was already being done in the following FOR loop but after inspecting further I merged the app symlinks FOR loop with this IF statement.
Line 329:
if [ -f /system/lib/hw/lights.msm7k.so ] && [ ! -e /system/lib/hw/lights.trout.so ];
then
busybox cp /system/lib/hw/lights.msm7k.so /system/lib/hw/lights.trout.so;
fi;
if [ -f /system/lib/hw/copybit.msm7k.so ] && [ ! -e /system/lib/hw/copybit.trout.so ];
then
busybox cp /system/lib/hw/copybit.msm7k.so /system/lib/hw/copybit.trout.so;
fi;
if [ -f /system/lib/hw/sensors.msm7k.so ] && [ ! -e /system/lib/hw/sensors.trout.so ];
then
busybox ln -s /system/lib/hw/sensors.msm7k.so /system/lib/hw/sensors.trout.so;
fi;
I suggest to use ln for all.
Click to expand...
Click to collapse
This change has already been made and I uploaded a new script earlier today.
Line 353:
/system/bin/sh /system/bin/swap;
Cannot find /system/bin/swap on my rom, maybe
if [ -e /system/bin/swap ] ; then.
Click to expand...
Click to collapse
Added.
Thanks for all your suggestions, I will re-upload a new version in an hour or so soon as I get a chance to change the echo commands to use logwrapper. Well I'm keeping the existing echo commands which spit output to my log but will also add another which will spit output to logcat.
miketaylor00 said:
Sweet, i will probably take you up on that offer sometime. I have a question about running e2fsck. I always run it with the -f option because it seems like it never finds problems unless they are really bad if I don't. Would there be a problem running it in your a2sd with -fy? I've always wondered why no one uses the -f option.
Click to expand...
Click to collapse
I take it back, after having suffered yet another file system corruption on my /system/sd partition I'm putting that darn "-f" in there. I'll re-upload a new copy with other changes shortly
Posted a new copy of the a2sd script with lots of changes. Check it out everyone. As always suggestions & questions are welcome

REQUEST/IDEA for a safety script for tweaking/OC

I had an Idea for a script that would run at bootup, and if a certain variable had a "value" of NOT 1.
then the script would change the CHMOD of a userinit.sh located in the sd-ext from 050 or 777 to 750 then it would change the variable "value" to 0 were it would stay untill another script that runs at shut down or reboot setts the variable to 1 and changes CHMOD back to 050 or 777 so that the userinit.sh is not run.
That way if a change is made during operating the phone that causes the phone to crash with out shutting down properly the script runs which causes the userinit.sh to run and "resets" userinit.sh values to a "default". Otherwise if shut down properly nothing happens.
This could be expanded on to include repairing the EXT or clearing some special cache or other stuff I am unfamiliar with but that you might want to run after a crash.(like logcat?)
any way what do you think? any promise?
I think, for overclocking purposes anyway, making the userinit.sh unrunnable would make the phone break immediately, as I think it would go to the highest available frequency. However, I like the idea, though I'm not sure how to run scripts on shutdown. I think for overclocking, it would check if the shutdown was clean on startup, and if not change the applicable line to the next lowest number, which it would get either from a seperate file or maybe it could be stuffed in the script itself. (Just my somewhat uneducated thoughts)
TheNewGuy said:
I had an Idea for a script that would run at bootup, and if a certain variable had a "value" of NOT 1.
then the script would change the CHMOD of a userinit.sh located in the sd-ext from 050 or 777 to 750 then it would change the variable "value" to 0 were it would stay untill another script that runs at shut down or reboot setts the variable to 1 and changes CHMOD back to 050 or 777 so that the userinit.sh is not run.
That way if a change is made during operating the phone that causes the phone to crash with out shutting down properly the script runs which causes the userinit.sh to run and "resets" userinit.sh values to a "default". Otherwise if shut down properly nothing happens.
This could be expanded on to include repairing the EXT or clearing some special cache or other stuff I am unfamiliar with but that you might want to run after a crash.(like logcat?)
any way what do you think? any promise?
Click to expand...
Click to collapse
Keep it simple. If a change in userinit.sh breaks your system, reboot to recovery and edit it and reboot again.
TheNewGuy said:
I had an Idea for a script that would run at bootup, and if a certain variable had a "value" of NOT 1.
then the script would change the CHMOD of a userinit.sh located in the sd-ext from 050 or 777 to 750 then it would change the variable "value" to 0 were it would stay untill another script that runs at shut down or reboot setts the variable to 1 and changes CHMOD back to 050 or 777 so that the userinit.sh is not run.
That way if a change is made during operating the phone that causes the phone to crash with out shutting down properly the script runs which causes the userinit.sh to run and "resets" userinit.sh values to a "default". Otherwise if shut down properly nothing happens.
This could be expanded on to include repairing the EXT or clearing some special cache or other stuff I am unfamiliar with but that you might want to run after a crash.(like logcat?)
any way what do you think? any promise?
Click to expand...
Click to collapse
most rom devs/tweakers launch userinit.sh by calling it with a sh
e.g.
/system/bin/sh /system/sd/userinit.sh
so it will still run !! ( as init doesn't care about permissions, it is god )
don't believe me?
Code:
echo "echo I ran" > /data/test.sh
chmod 000 /data/test.sh
sh /data/test.sh
Keep it simple. If a change in userinit.sh breaks your system, reboot to recovery and edit it and reboot again.
Click to expand...
Click to collapse
Yea thats the easy way!...
(Seriously I'm not that good at Linux Command Line code,wording,but i'm getting there.)
I think, for overclocking purposes anyway, making the userinit.sh unrunnable would make the phone break immediately, as I think it would go to the highest available frequency. However, I like the idea, though I'm not sure how to run scripts on shutdown. I think for overclocking, it would check if the shutdown was clean on startup, and if not change the applicable line to the next lowest number, which it would get either from a seperate file or maybe it could be stuffed in the script itself. (Just my somewhat uneducated thoughts)
Reply With Quote
Click to expand...
Click to collapse
And I know that most roms now have a script called something like in /system/etc/init.d/20userinit that runs at startup and checks to see if a userinit.sh is present in sd-ext,if so it runs it.Also I noticed that the script can be there but if it is CHMOD to 777 it wont run. This is the "Reset script" Set to restet to something you like and run other tasks to help Fix/Diagnose probs.
The OC changes would be made from a different script such as 86supersettings
Or a userinit located in system/sd maybe ?
The thing is making sure one is read before the other.
Any way I probably will just learn the language better and do it from recovery console.
Thanks again
TheNewGuy said:
Yea thats the easy way!...
(Seriously I'm not that good at Linux Command Line code,wording,but i'm getting there.)
And I know that most roms now have a script called something like in /system/etc/init.d/20userinit that runs at startup and checks to see if a userinit.sh is present in sd-ext,if so it runs it.Also I noticed that the script can be there but if it is CHMOD to 777 it wont run. This is the "Reset script" Set to restet to something you like and run other tasks to help Fix/Diagnose probs.
The OC changes would be made from a different script such as 86supersettings
Or a userinit located in system/sd maybe ?
The thing is making sure one is read before the other.
Any way I probably will just learn the language better and do it from recovery console.
Thanks again
Click to expand...
Click to collapse
chmod 777 makes it rw and executable by everyone!!!!!!!!
have a look here
http://www.comptechdoc.org/os/linux/usersguide/linux_ugfilesp.html
but as I mentioned above, init ( the initial progam runs as root and doesn't care about permissions, ( it wouldn't be very good at doing initialising the system if it had to seek permission )
Yea your right. Well I said I wasn't that good at this linux stuff! Now I Proved it.
Any way as you can see this is more of a request..... I still think it's a good Idea.
Thanks for your help FireRat.
Keep it simple. If a change in userinit.sh breaks your system, reboot to recovery and edit it and reboot again.
Click to expand...
Click to collapse
I understand how I could manualy Replace the modified script with a default one that was on my sdcard from within recovery after a faild OC change...but..
Are you saying I could actualy modify the original script from recover? Do you have any info on how? A link?
TheNewGuy said:
I understand how I could manualy Replace the modified script with a default one that was on my sdcard from within recovery after a faild OC change...but..
Are you saying I could actualy modify the original script from recover? Do you have any info on how? A link?
Click to expand...
Click to collapse
If you have RA-Recovery, adb works, so you can pull/push the userinit.sh script. You can also enter the terminal and use vi to edit it from recovery. You may have to mount the ext partition first, but that's pretty easy. "mount /system/sd" will do it, if /system/sd doesn't exist, "mkdir /system/sd".
Ok, Thanks that makes sense. I'm still learning adb though. And I tried vi once before with no luck. But now I know what to learn about.
Thanks a lot I appreciate it.
TheNewGuy said:
Ok, Thanks that makes sense. I'm still learning adb though. And I tried vi once before with no luck. But now I know what to learn about.
Thanks a lot I appreciate it.
Click to expand...
Click to collapse
ok, this would do what you want
/system/bin/shutdown
bold is new
Code:
#!/system/bin/sh
stop;
stop dhcpcd;
sleep 1;
[B]echo "1" > /data/cleanshutdown[/B]
for i in `cat /proc/mounts | cut -f 2 -d " "`;
do
busybox mount -o remount,ro $i 2>&1 > /dev/null;
done
sync;
if [ "$1" = "-r" ];
then
toolbox reboot -f;
else
toolbox reboot -fp;
fi
your script
Code:
#!/system/bin/sh
if [ "`cat /data/cleanshutdown`" != "1" ];
then
echo "shutdown was not clean"
[B]your tweaks[/B]
else
echo "shutdown was clean"
[B]your tweaks[/B]
fi
echo "0" > /data/cleanshutdown
I'm not sure you need it,
this is for education value, if you want to play ^^^ is where to start
Thank You!
That is perfect
I need to add all of this to the startup script right?
if [ "`cat /data/cleanshutdown`" != "1" ];
then
echo "shutdown was not clean"
your tweaks
else
echo "shutdown was clean"
your tweaks
fi
echo "0" > /data/cleanshutdown
Click to expand...
Click to collapse
I am going to use the beta boot up script from ZKX called 86Supersettings, but I could use a userinit/user.conf like most do. Correct?
TheNewGuy said:
Thank You!
That is perfect
I need to add all of this to the startup script right?
I am going to use the beta boot up script from ZKX called 86Supersettings, but I could use a userinit/user.conf like most do. Correct?
Click to expand...
Click to collapse
well, a .conf file should be just that
a file with configurations , not an executable script
well, a .conf file should be just that
a file with configurations , not an executable script
Click to expand...
Click to collapse
OK. I guess I meant both together. I would use the user.conf to make tweaks. Then have to modify the userinit.sh with the part you made. Something like.
#!/system/bin/sh--LEAVE THIS OUT. ITS ALL READY AT THE BEGINNING
if [ "`cat /data/cleanshutdown`" != "1" ];
then
echo "shutdown was not clean"
Dont run user.conf
and set cpu or other stuff to "default"
else
echo "shutdown was clean"
Run user.conf for tweaked settings
fi
echo "0" > /data/cleanshutdown
Click to expand...
Click to collapse
If I'm way off then I guess I need to re-read the Userinit thread.
TheNewGuy said:
OK. I guess I meant both together. I would use the user.conf to make tweaks. Then have to modify the userinit.sh with the part you made. Something like.
If I'm way off then I guess I need to re-read the Userinit thread.
Click to expand...
Click to collapse
well, in practise it doesn't matter
the file extension is only for use humans, if I'm looking in a directory and I see .conf I expect it to be a configuration file, I see .sh, its a shell script, .py python, pl perl .......
I see. Well Thanks again for your help. Your script does work. I tried it. crash on purpose.
I still have a lot to learn.
Folks;
1) If you're OC'ing via SetCPU, remember that this doesn't change the recovery kernel, and you can uninstall SetCPU from Recovery. From there, all you need is a "safe" userinit.sh.
3) If you're OC'ing via userinit.sh -- same deal. Your phone crashes on you and you just edit it to a safe config from recovery.
Tweak away.
This is what I ended up with
Thanks to
XxKolohexX
FireRat
Licknuts
Code:
#!/system/bin/sh
#
echo 255 >/sys/class/leds/blue/brightness;
echo "+++ Now entering the speedy madness of Z.X.D.!"
echo "----- let's clear that Cache first."
echo "----- Too much DBs make System go sloow..."
echo "----- Also be shure to check out CacheMate"
echo "----- It's in the Market. (Made by Android AppCritic)."
echo "----- It's way more powerfull than this script!"
echo "----- (Times 10 or 100... Clears everything :P)"
echo "----- And this script already took hours to build..."
echo "----- domenukk - 2010."
find /data/data -name app_admob_cache | while read line; do du -s $line/* | cut -f1; rm -Rf $line/*; done;
find /data/data -name cache | while read line; do du -s $line/* | cut -f1; rm -Rf $line/*; done;
find /data/data -name google_analytics.db | while read line; do du -s $line | cut -f1; rm -Rf $line; done;
find /data/data -name webviewCache.db | while read line; do du -s $line | cut -f1; rm -Rf $line; done;
rm -rf /data/data/com.facebook.katana/files
rm -rf /data/data/com.google.android.apps.genie.geniewidget/app_news_image_cache
rm -rf /data/data/com.code.i.music/app_admob_cache
rm -rf /data/data/fm.last.android/databases/google_analytics.db
echo "--- All the Cache has been cleared."
sleep 10
echo 0 >/sys/class/leds/blue/brightness;
####determin if shutdown was clean####
if [ "`cat /data/cleanshutdown`" != "1" ];
then
####RUN CLEAN SHUTDOWN SCRIPT####
echo 255 >/sys/class/leds/green/brightness;
####Turbo Script by [email protected]####
####Prioritize everyting ####
echo "----- Enabling Turbo."
dirty_writeback_centisecs=500
/system/bin/prior &
#
# Linux-SWAP
#
if [ -e /dev/block/mmcblk0p3 ];
then
if [ -n /dev/block/mmcblk0p3 ];
then
echo "+++ Set Linux Swap"
busybox mkswap /dev/block/mmcblk0p3;
fi;
if [ -e /dev/block/mmcblk0p3 ];
then
echo "+++ Set Swapiness"
echo 100 > /proc/sys/vm/swappiness;
echo "+++ Activate Swap"
busybox swapon /dev/block/mmcblk0p3;
fi;
fi;
####Better CPU Settings...####
echo "----- Speed up the CPU"
echo 633600 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq;
echo 122800 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq;
echo 95 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold;
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/ignore_nice_load;
echo 100000 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate;
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/powersave_bias;
echo 0 >/sys/class/leds/green/brightness;
echo 255 >/sys/class/leds/blue/brightness;
else
####RUN DIRTY SHUTDOWN SCRIPT####
echo 255 >/sys/class/leds/red/brightness;
####Turbo Script by [email protected]####
####Prioritize everyting ####
echo "----- Enabling Turbo."
dirty_writeback_centisecs=500
/system/bin/prior &
#
# Linux-SWAP
#
if [ -e /dev/block/mmcblk0p3 ];
then
if [ -n /dev/block/mmcblk0p3 ];
then
echo "+++ Set Linux Swap"
busybox mkswap /dev/block/mmcblk0p3;
fi;
if [ -e /dev/block/mmcblk0p3 ];
then
echo "+++ Set Swapiness"
echo 83 > /proc/sys/vm/swappiness;
echo "+++ Activate Swap"
busybox swapon /dev/block/mmcblk0p3;
fi;
fi;
####Better CPU Settings...####
echo "----- Speed up the CPU"
echo 576000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq;
echo 122800 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq;
echo 45 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold;
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/ignore_nice_load;
echo 2000000 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate;
echo 200 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/powersave_bias;
fi;
echo "0" > /data/cleanshutdown
echo "+++ continue on lame stock SuperD boot "
##Clearing Davlik-Cache##
for dc in dalvik-cache;
do
umount /cache/$dc;
rm -fr /cache/$dc;
mkdir /cache/$dc;
chown 1000:1000 /cache/$dc;
chmod 771 /cache/$dc;
mount -o bind /data/$dc /cache/$dc;
done;
Named 86supersettings so it runs after userinit.sh if one exists.
I put some Led indicators in so you can tell if it ran right at boot up. (about all I did besides copy and paste) Thinking about adding some other stuff like repair ext, or some kind of log to help me see what happed... any suggestions.
OK, here's another Idea for another safety feature...
I would like to "hard code" a temp fail-safe in to the code. I would like to get rid of SetCPU and when OC-ing it's nice to have a temp failsafe.SHUTDOWN!LOL
Any way I guess I would just add a few lines to some existing script in my phone?.... Any suggestions.
Thanks for your time.

[MOD][SCRIPTS] Boot Script Utilities

About this thread
In this thread i will post my work on a init.d like support for stock rom which i call "Boot Script Utilities".
This work was developed for personal use and for my personal purposes.
If you do not like to use it please do not.
Click to expand...
Click to collapse
Just to be clear
I am not responsible for whatever happens to your phone.
Some Info
What is init.d?
Init.d is a folder located in "/system/etc/init.d/", but not all roms have his folder (stock rom don't have the folder).
What is special with this folder is that any script inside this folder will run on phone boot.
Why to run scripts on boot?
On boot many system variables are initiated before any application run, so you can make automatic tweaks on every boot.
ex. Swap external storage to internal.
Click to expand...
Click to collapse
Boot Script Utilities on stock Samsung Galaxy Core
This was developed for personal use. This is not the original init.d support.
I developed a similar support in order to implement some more features.
This do not means that this is a better way to roon scripts on boot.
What do i need?
A rooted Samsung Galaxy Core (I used I8260, for how to root search the forum)
A good root explorer (well Root Explorer worked)
A recovery with backup/restore support (to backup your rom in case you soft brick your phone)
What we will do?
We will edit a system file to run a script i wrote. This script will run all scripts (or not all read more below) inside /system/etc/init.d/ folder.
Step 0 - Backup your rom
Boot into your recovery and make a backup.
Step 1 - init.d folder
Create a directory on "/system/etc/" and name it "init.d".
So now directory "/system/etc/init.d/" exist.
Step 2 - Boot Script Utilities main script
Copy "init.bsu.boot.sh" file (link on the end of the post) in "/system/etc/".
So now file "/system/etc/init.bsu.boot.sh" exist.
Step 3 - Edit system file, run Boot Script Utilities
The system file we will edit is "/system/etc/init.qcom.post_boot.sh"
Insert this code on the bottom of the script
Code:
# Run Boot Script Utilities
# For galaxy core stock rom
# by DarkThanos
/system/bin/sh /system/etc/init.bsu.boot.sh > /data/tmp/init.bsu.log 2>&1 &
Step 4 - Ready
Insert your scripts inside "/system/etc/init.d/" and whey will run on boot.
Click to expand...
Click to collapse
Boot Script Utilities features
Disable all scripts
If file "/system/etc/init.d/disabled" exist no script will run.
Disable scripts
Any script named like "*.disabled" or "*.disabled.sh" will not run.
ex. "/system/etc/init.d/testscript.disabled.sh" will not run.
Run scripts asynchronous
Any script named like "*.async" or "*.async.sh" will run asynchronous.
ex. "/system/etc/init.d/testscript.async.sh" will run asynchronous.
Scripts run order
Scripts run in name order.
Log on every boot
All scripts results-errors output (stdout/stderr) will be printed on "/data/tmp/init.bsu.log"
Click to expand...
Click to collapse
[Change log]
1.0 Version
Script Public for first time.
init.d like support
Click to expand...
Click to collapse
[Dev Doc]
It does not really matters from where the script is called.
The script first checks if boot is completed, if not it sleeps for 2 seconds.
(so you need to call the script after boot, or before but asynchronous)
Code:
# Get boot complete state
isBootCompleted=`getprop dev.bootcomplete`
# Wait For boot complete event
# Probably useless unless script called from other file
while [ "$isBootCompleted" -ne '1' ]
do
# Wait and check again
sleep 2
# Check if boot completed
isBootCompleted=`getprop dev.bootcomplete`
done
The next step is to check if "/system/etc/init.d/disabled" file exist.
If it do not exist, it will run all not disabled scripts inside "/system/etc/init.d/".
It will check every file inside and analyze its name so it knows if the script is disabled or asynchronous.
Code:
# Create a init.d Support
# Implement /system/etc/init.d/ folder
# Check if init.d is disabled
# If /system/etc/init.d/disabled file exist, then init.d is disabled
if [[ ! -f /system/etc/init.d/disabled ]]
then
echo "[$manager_name] Initiating init.d scripts"
# Run every script on init.d folder
for scriptfile in /system/etc/init.d/*
do
if test -f "$scriptfile"
then
# Get script name
scriptname=$(basename $scriptfile)
# Check if script is disabled
# ex1 : 'testscript.sh.disabled' is disabled
# ex1 : 'testscript.disabled.sh' is disabled
echo "$scriptname" | grep -q -E '\.(disabled|disable\.sh)$'
if [ $? -eq 0 ]
then
echo "[$manager_name] Script $scriptname is disabled"
else
# check if script is asynchronous
# ex1 : 'testscript.sh.async' is asynchronous
# ex2 : 'testscript.async.sh' is asynchronous
echo "$scriptname" | grep -q -E '\.(async|async\.sh)$'
if [ $? -eq 0 ]
then
echo "[$manager_name] Run Script $scriptname asynchronous"
/system/bin/sh "$scriptfile" | script_log &
else
echo "[$manager_name] Run Script $scriptname"
/system/bin/sh "$scriptfile" | script_log
fi
fi
fi
done
else
echo '[$manager_name] init.d is disabled'
fi
That's all.
Please suggest any fixes or any improvements by messaging me.
Thanks for your time.
Click to expand...
Click to collapse
All Scripts
Links to all scripts posts
Optimize apks using ZipAlign
Optimize SQlite databases of apps
Swap External SD with Internal SD
Click to expand...
Click to collapse
[Script][Swap External SD with Internal SD][v1.0]
Name : Swap External SD with Internal SD
Version : v1.0
Author : DarkThanos
Thanks to: codlab
Click to expand...
Click to collapse
This script wait for your external sd card to be mounted and swap it with internal if it is bigger.
One minute after boot it will stop waiting.
(Fastest swap method I found)
I am not responsible for whatever happens to your phone.
Tested on my Samsung Galaxy Core (I8260)
[Change log]
1.0 Version
Script Public for first time.
Swap internal sd with external (if external>internal)
Click to expand...
Click to collapse
[Dev Doc]
The script first creates 2 directories to mount external sd and internal sd,
so that it can distinguish them from each other ("/data/sd_cards/internal/", "/data/sd_cards/external/").
Code:
# Mount root rw
mount -o remount,rw /
# Create directory to mount sd cards
# Make directory to save cards
mkdir -p /data/sd_cards
# Make directory to save internal
mkdir -p /data/sd_cards/internal
# Make directory to save external
mkdir -p /data/sd_cards/external
In the next step, the script waits for an external sd to be mounted.
This wait time is the reason why the script is better to be asynchronous.
The script checks every 5 seconds for an external sd, but after 1 minute (12 tries) it stops.
Code:
# Wait for external sd card to be mounted
# Max wait time is 1 minute
maxWaitTime=60
# While external Sd Card has 0 Capacity
while [[ $(du -s /storage/extSdCard | awk '{print $1}') == "0" && $maxWaitTime>0 ]]
do
# Check again in 5 seconds
sleep 5
# Count down max wait time
maxWaitTime=maxWaitTime-5
done
As soon as an external sd is mounted, the script mounts the external sd on "/data/sd_cards/external/"
and the internal on "/data/sd_cards/internal/".
Code:
# Save mount points on folders
# Mount bind internal SD in folder /data/sd_cards/internal
mount -o bind /storage/sdcard0 /data/sd_cards/internal
# Mount bind external SD in folder /data/sd_cards/external
mount -t vfat -o rw,nosuid,nodev,noexec,relatime,user_id=1023,group_id=1023,default_permissions,allow_other /dev/block/vold/179:33 /data/sd_cards/external
So now the real internal sd can be found in the directory "/data/sd_cards/internal/"
and the real external sd can be found in the directory "/data/sd_cards/external/".
The reason we do this is to be able to make a script swap them again.
Then it checks the size of each, so that it knows if it ia worthing of swapping them.
Code:
# Get sd cards sizes
internalSdSize=$(du -s /storage/sdcard0 | awk '{print $1}')
externalSdSize=$(du -s /storage/extSdCard | awk '{print $1}')
If external sd is bigger, then on "/storage/sdcard0/" we mount "/data/sd_cards/external/"
and on "/storage/extSdCard/" we mount "/data/sd_cards/internal/".
Code:
# Swap sd cards
# If external sd card is bigger than internal swap
if [ $externalSdSize -gt $internalSdSize ]
then
# Swap
mount -o bind /data/sd_cards/internal /storage/extSdCard
mount -o bind /data/sd_cards/external /storage/sdcard0
fi
Click to expand...
Click to collapse
[Script][Optimize SQlite databases of apps][v1.0]
Name : Optimize SQlite databases of apps
Version : v1.0
Rewritten by : DarkThanos
Based on work of: pikachu01
Click to expand...
Click to collapse
This script optimize applications' database using sqlite3 (Vacuum/Reindex) every 5 boots or 5 days.
On any other boot it optimize only databases of phone, contacts, mms and settings .
Before use make a folder "libs" inside "/system/etc/init.d/",
insert the "sqlite3" file inside and give it execute permissions (the file is given with the script)
Bugs: (Its safe for use, its a warning not an error)
Contacts database is always locked, so can't be optimized.
I am not responsible for whatever happens to your phone.
Tested on my Samsung Galaxy Core (I8260)
[Change log]
1.0 Version
Script Public for first time.
SQlite databases on "/data/" optimize every 5 boots or 5 days.
SQlite databases of phone, contacts, mms and settings optimize on every boot.
Click to expand...
Click to collapse
[Dev Doc]
Script first initiate some variables
(path to Sqlite lib, path to a folder to save scripts data, minimum time between optimizes)
Code:
# Some variables
# SQLite path
sql_lib="/system/etc/init.d/libs/sqlite3";
# Data folder path
data_folder="/data/boot_scripts_data/";
# Data counter file name
data_file_counter="sql_optimize_counter";
# Data last run file name
data_file_lastrun="sql_optimize_lastrun";
# Max time between optimizes (in sec)
# 5 days = $(expr 5 \* 24 \* 60 \* 60 )
max_time_dif=432000
Check how many boots passed since last optimize
and when the last optimize was by reading scripts data.
Code:
# Create data folder if not exist
mkdir -p "$data_folder"
# Get data from files
# Run Counter
if [[ ! -f "$data_folder$data_file_counter" ]]
then
# File do not exist
touch "$data_folder$data_file_counter"
echo "0" > "$data_folder$data_file_counter"
runCount="0"
else
runCount=$(cat $data_folder$data_file_counter)
fi
# Last run date
if [[ ! -f "$data_folder$data_file_lastrun" ]]
then
# File do not exist
touch "$data_folder$data_file_lastrun"
echo "0" > "$data_folder$data_file_lastrun"
lastRun=0
else
lastRun=$(cat $data_folder$data_file_lastrun)
fi
If boots passed since last optimize equals with 5 or last optimized more than 5 days before,
then make a full database optimization.
Code:
# Check if its time for optimize
if [ $(( $(date +%s) - $lastRun )) -ge $max_time_dif -o $runCount -ge 5 ]; then
echo "Full mode optimize"
# Save data
echo "0" > "$data_folder$data_file_counter"
echo $(date +%s) > "$data_folder$data_file_lastrun"
# Optimize /data/
optimize_folder "/data/"
echo "All applications' databases were optimized"
Else make a light optimize.
(only phone, contacts, mms and settings)
Code:
else
echo "Light mode optimize"
# Save data
echo $((runCount+1)) > "$data_folder$data_file_counter"
# Only for Galaxy Core
# Count databases optimized
count=0
# phone optimize
optimize_folder "/data/data/com.android.phone/databases/"
# contacts optimize
optimize_folder "/data/data/com.android.providers.contacts/databases/"
# mms optimize
optimize_folder "/data/data/com.android.mms/databases/"
# email optimize
optimize_folder "/data/data/com.android.mms/databases/"
# settings optimize
optimize_folder "/data/data/com.android.settings/databases/"
echo "Important databases were optimized"
fi;
Optimize functions
Code:
# Some functions
# Optimize db
optimize_db(){
# Vacuum and then reindex
$sql_lib $1 'VACUUM;';
$sql_lib $1 'REINDEX;';
#echo $(basename $1)" was optimized."
}
# Optimize every db on folder
optimize_folder(){
local path=$1
count_result=0;
find $path -type f -iname "*.db" -print0 | while IFS= read -r -d $'\0' database; do
optimize_db $database
done
#echo "Databases inside $path were optimized."
}
Use the sqlite binary to VACUUM and REINDEX the given database.
Click to expand...
Click to collapse
[Script][Optimize apks using ZipAlign][v1.0]
Name : Optimize apks using ZipAlign
Version : v1.0
Author : Wes Garner
Suggestions : oknowton
Edited by : DarkThanos
Click to expand...
Click to collapse
This script zipalign applications' apk (only the apks that are not already zipaligned) on every boot.
First boot may take a while.
Before use make a folder "libs" inside "/system/etc/init.d/",
insert the "zipalign" file inside and give it execute permissions (the file is given with the script)
Bugs:(Not for use, more testing needed)
Some apps return an error after zipaligned, and need to be reinstalled.
(Found fix. Zipaligned apk do not holds read rights after copy. Command "cp -p" do not hold permissions. Temp fix "chmod 644". [I need help with that])
A download will be posted when it is stable.
I am not responsible for whatever happens to your phone.
Tested on my Samsung Galaxy Core (I8260)
Need to be tested for stable use.
[Change log]
1.0 Version
Script Public for first time.
Optimize apks using ZipAlign (on every boot check apps).
Click to expand...
Click to collapse
[Dev Doc]
Script code
Code:
#!/system/bin/sh
# Optimize apks using ZipAlign
#
# Work of:
# Wes Garner (Script code)
# oknowton (Suggestions)
#
# Modifications by:
# DarkThanos
#
# For the xda Galaxy Core users
#
# Some variables
# SQLite path
zipalign_lib="/system/etc/init.d/libs/zipalign";
# Data folder path
data_folder="/data/boot_scripts_data/";
# Data database file name
apk_cache="zipalign_apk_cache";
# Counters
count_apps=0
count_zipaligned_apps=0
count_zipalign_failed=0
# Report ZipAlign start
echo "ZipAlign Optimization Start";
# For every apk in /data/app/
for apk in /data/app/*.apk ; do
# Check if this apk is zipaligned
$zipalign_lib -c 4 $apk;
# Get results
not_zipaligned=$?;
# Count app
count_apps=$((count_apps+1))
# If not, align it
if [ $not_zipaligned -eq 1 ]; then
# ZipAlign app
result=`$zipalign_lib -f 4 $apk $data_folder$apk_cache`
if [ -e $data_folder$apk_cache -a ${#result} -eq 0 ]; then
# Successful zipalign
/system/xbin/busybox cp -p $data_folder$apk_cache $apk;
chmod 644 $apk;
rm $data_folder$apk_cache;
count_zipaligned_apps=$((count_zipaligned_apps+1))
else
echo "[ERROR] $result"
# Failed zipalign
count_zipalign_failed=$((count_zipalign_failed+1))
#echo ZipAligning $(basename $apk) Failed | tee -a $LOG_FILE;
fi;
fi;
done;
# Report results
echo "Apks ZipAligned $count_zipaligned_apps/$count_apps ($count_zipalign_failed failed)";
# Exit
exit 0
I need help with the code:
Code:
/system/xbin/busybox cp -p $data_folder$apk_cache $apk;
chmod 644 $apk;
rm $data_folder$apk_cache;
I try to make all my script work with no busybox. "cp" command do not exist in android (without busybox).
Is "cat" a good alternative?
Also, should I use "chmod 644 $apk;"? "cp -p" do not work and I am pretty sure the script has root rights.
Thanks for your time.
Click to expand...
Click to collapse
I need betatester
Sent from my GT-I8262 using XDA Premium 4 mobile app
NieeLz said:
I need betatester
Click to expand...
Click to collapse
Download the "init.bsu.boot" script (from first post). Create the "/system/etc/init.d/" folder. And run the script (from your download folder) using Script Manager (do not forget to enable "su"). Then check "/data/tmp/init.bsu.log" (open as text) and see the log.
This is an easy safe test.
You can also make a test script, like:
Code:
#!/system/bin/sh
# Test Script
echo "This will be on log."
(You can read the script codes too, I have many comments.)

[GUIDE][TUT] Learn basic scripting, how to execute scripts, mod building

Hello guys, I want to share my expirience with users who wants to learn basic scripting stuff, busybox commands, how to use them, how to execute them, how to make .sh files.
Ok, let's start!!! ​
First we must to learn what is busybox. BusyBox is software that provides several stripped-down Unix tools in a single executable file. It runs in a variety of POSIX environments such as Linux, Android.
Busybox allows you or programs to perform actions on your phone using Linux (copied from Unix) commands. Android is basically a specialized Linux OS with a Java compatible (Dalvik) machine for running programs. The Android kernel is a modified version of the Linux kernel (that is why the Android kernel must always be open source). Busybox gives functionality to your phone that it does not have without it. Many programs, especially root programs such as Titanium Backup, require busybox to perform the functions of the program. Without busybox installed your phone is much more limited in what it can do.
{
"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"
}
Here is some info about busybox, you can track here release dates, you can download sources...
http://spblinux.de/2.0/doc/commands.html
Also here is busybox installer for our "linux devices" heheh ^~^ by stericson. You have two versions of it as you see paid and free.
Chose paid if you want to donate him for awesome job.
Free:
https://play.google.com/store/apps/details?id=stericson.busybox
Paid(PRO):
https://play.google.com/store/apps/details?id=stericson.busybox.donate
After that you need Terminal app, you can download it from playstore too.
Link: Download it from here
This app emulates Linux terminal, with it you can access to android shell.
Lets's start with learning basic terminal stuff
The most of shell commands doesn't need root access, but some of them are need it.
To give root access to the terminal app, you need to type next.
Code:
su [I](press enter)[/I]
After pressing enter, another window will popup to grant root access. Tap on GRANT
***When you typing something into the terminal window, take care because EVERYTHING IS CASE SENSITIVE.***
We all know there are three permissions per group on a file read,write,execute or rwx.
To set permissions as rw-r--r-- we use chmod 644 or 0644 but most don't know why ? Here's why
Read or r has a positional weight of 4, Write or w has 2 and Execute or x has 1. Add them up for each group and you'll get the chmod number to use. For above example, the numbers will be (4+2)(4)(4) i.e. 644 or if you want four digits, use 0644 and that's pretty much it. It comes in very handy if you're learning shell scripting because Linux revolves around permissions. (Thanks to @MSF Jarvis)
Let's go trough basic shell commands. ​
If you interested about all commands, you can check them HERE.
cat [file destination] - use this command to print everything from a file to the terminal window
Example:
Open terminal window, and type next:
Code:
busybox cat /proc/meminfo [I](press enter)[/I]
You will get output after pressing enter
Now, you can see here, if you open any file manager and go to destination which was given for example "/proc/meminfo"
You will see next file and stuff inside it
Heheh, is it same?? ^~^ for sure that it is, you can use it for any file on your device which have text in it.
Let's go to the next basic command ^~^
echo - this command can be used for printing arguments to stdout. Also you can use it for adding text in already existing file which we need here, because we are learning scripting stuff, right? ^~^
Example:
Open terminal window, and type next:
Code:
busybox echo "Scripting is awesome" > /sdcard/test [I](press enter)[/I]
Ok, let's explain this.
First you added a command echo to add something in existing file, then between "..." we need to put arguments, for our case this is "Scripting is awesome" next we see symbol " > " which will forward arguments to next added direction, in our case this is "/sdcard/test".
First we need to have a existing file (IMPORTANT)
After we agreed with that we have a file
Open terminal as I already explained and after pressing enter you will get output on the terminal window.
That is a file from our /sdcard/
Don't delete this file, we will use it later with " sh" command.
Let's go to the next basic command
clear - Use this comand to clear whole terminal window.
Example:
You have a terminal window which have a lot of stuff on it, for example stuff from previous lines, text, etc.
You can simply make it blank with just one command
Code:
busybox clear [I](then press enter)[/I]
And voila, terminal window is blank
touch [file destination] - Use this command to create a blank file on any destination on your android device.
Example:
Open terminal window, and type next:
Code:
busybox touch /sdcard/scripting_007 [I](press enter)[/I]
This will create file called "scripting_007" on "/sdcard/" in this case, you can put any.
As you can see file "scripting_007" exist on /sdcard/
mkdir [file destination] - Use this command to create one empty folder on any destination on your android device.
Example:
Open terminal window, and type next:
Code:
busybox mkdir /sdcard/development [I](press enter)[/I]
This will create folder called "development" on "/sdcard/" in this case, you can put any.
sh [path of a file] - Use this command to execute basic script
Example:
Open terminal window, and type next:
Code:
sh /sdcard/test [I](press enter)[/I]
This will execute file which you make before with "echo" command
sleep [time in secs] - Use this command to make an offset between executing lines inside script.
Example:
Open terminal window, and type next:
Code:
busybox echo "Scripting is"
busybox sleep 10
busybox echo "awesome"
This is a combination of two commands as you can see, echo and sleep.
After launching this simple script in terminal window you will get first "Scripting is" and after 10 secs you will get awesome.
rm [ -f (file) -rf (folder)] - this is a command for removing files (-f) and folders (-rf)
Example:
Create a file called "android" on sdcard, then open terminal window, and type next:
Code:
busybox rm -f /sdcard/android
This simple code will remove a file called android from sdcard.
Now do the same thing with a folder, create one with the name "android" and run terminal emulator
Code:
busybox rm -rf /sdcard/android
This will remove folder called android from your sdcard.
Now, let's go with some advanced stuff​
You need any text editor, I suggesting this one
Link: Download from here
Now, open the app and write a new file and give it a name "test1"
Inside a file write next text:
Code:
busybox echo "Android"
busybox sleep 2
busybox echo "is"
busybox sleep 2
busybox echo "Awesome"
Save the file and copy it to some location, i suggest /sdcard/.
Open up terminal emulator and type next
Code:
sh /sdcard/test1 [I](press enter)[/I]
This thing will execute your script with the name test1 from /sdcard/.
Output will be "Android", then after two seconds will appear "is" and then after two more seconds "Awesome" will appear. THATS IT!!! You learned how to make a file (script) and how to execute it with terminal emulator.
Now do the same thing make a file with the name "test2" and make another file with a name "print"
First open "test1" and write next:
Code:
busybox echo "After 5 seconds"
busybox sleep 1
busybox echo "You will get a suprice"
busybox sleep 2
busybox clear
busybox echo "1"
busybox sleep 1
busybox clear
busubox echo "2"
busybox sleep 1
busybox clear
busybox echo "3"
busybox sleep 1
busybox clear
busybox echo "4"
busybox sleep 1
busybox clear
busybox echo "5"
busybox sleep 1
busybox clear
sh /sdcard/print
I think that you already know whats happened here
You have print, then you have sleep to make offset, and after that you have clear command to make window blank
Now open file with the name "print"
Inside it write next:
Code:
busybox echo "Voila, suprise"
Save this file, and open terminal emulator, and write next:
Code:
sh /sdcard/test2
And magic happens
In this example you learned how to execute second file with first, I think that it's not difficult for you
In this example we will play a bit with colors outputs
Codes for colors are below
Code:
busybox echo -e " 1. Black \e[0;100m \e[00;37;40m"
busybox echo -e " 2. Red \e[0;101m \e[00;37;40m"
busybox echo -e " 3. Green \e[0;102m \e[00;37;40m"
busybox echo -e " 4. Yellow \e[0;103m \e[00;37;40m"
busybox echo -e " 5. Blue \e[0;104m \e[00;37;40m"
busybox echo -e " 6. Purple \e[0;105m \e[00;37;40m"
busybox echo -e " 7. Cyan \e[0;106m \e[00;37;40m"
busybox echo -e " 8. White \e[0;107m \e[00;37;40m"
Try to copy this into terminal window and see what will happened or try whing which you learned before with the executing files. Copy whole code to a file and execute it with "sh" command. USE YOUR KNOWLEDGE.
Here you can see all things based on bash script coloring
https://wiki.archlinux.org/index.php/Color_Bash_Prompt
or
http://misc.flogisoft.com/bash/tip_colors_and_formatting
Here you can see all codes and it's nice descirbed.
Now, let's start
Make a file with the name "test3" open it and write or copy next code inside:
Code:
busybox echo " .... "
busybox echo " / / "
busybox echo " / / "
busybox echo " / / "
busybox echo " / /_._._. "
busybox echo -e " /_._._._._./ \e[00;41m SPEED MOD \e[00;37;40m v3.0"
busybox echo "*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*"
busybox echo -e "\e[01;32m Feel smoothness \e[00;37m"
busybox echo " "
As you can see this part was taken from mine L Speed performance/battery mod
Save the file, open terminal and type inside
Code:
sh /sdcard/test3
And you will get the same screen like in first L Speed menu.
Let's play a bit with this
You see the code
Code:
\e[00;41m SPEED MOD \e[00;37;40m v3.0
Just change one number instead of 41 write 42 and you will get green color, then give a try to other nubers. Every number is another color for example:
Code:
# Reset
Color_Off='\e[0m' # Text Reset
# Regular Colors
Black='\e[0;30m' # Black
Red='\e[0;31m' # Red
Green='\e[0;32m' # Green
Yellow='\e[0;33m' # Yellow
Blue='\e[0;34m' # Blue
Purple='\e[0;35m' # Purple
Cyan='\e[0;36m' # Cyan
White='\e[0;37m' # White
# Bold
BBlack='\e[1;30m' # Black
BRed='\e[1;31m' # Red
BGreen='\e[1;32m' # Green
BYellow='\e[1;33m' # Yellow
BBlue='\e[1;34m' # Blue
BPurple='\e[1;35m' # Purple
BCyan='\e[1;36m' # Cyan
BWhite='\e[1;37m' # White
# Underline
UBlack='\e[4;30m' # Black
URed='\e[4;31m' # Red
UGreen='\e[4;32m' # Green
UYellow='\e[4;33m' # Yellow
UBlue='\e[4;34m' # Blue
UPurple='\e[4;35m' # Purple
UCyan='\e[4;36m' # Cyan
UWhite='\e[4;37m' # White
# Background
On_Black='\e[40m' # Black
On_Red='\e[41m' # Red
On_Green='\e[42m' # Green
On_Yellow='\e[43m' # Yellow
On_Blue='\e[44m' # Blue
On_Purple='\e[45m' # Purple
On_Cyan='\e[46m' # Cyan
On_White='\e[47m' # White
# High Intensity
IBlack='\e[0;90m' # Black
IRed='\e[0;91m' # Red
IGreen='\e[0;92m' # Green
IYellow='\e[0;93m' # Yellow
IBlue='\e[0;94m' # Blue
IPurple='\e[0;95m' # Purple
ICyan='\e[0;96m' # Cyan
IWhite='\e[0;97m' # White
# Bold High Intensity
BIBlack='\e[1;90m' # Black
BIRed='\e[1;91m' # Red
BIGreen='\e[1;92m' # Green
BIYellow='\e[1;93m' # Yellow
BIBlue='\e[1;94m' # Blue
BIPurple='\e[1;95m' # Purple
BICyan='\e[1;96m' # Cyan
BIWhite='\e[1;97m' # White
# High Intensity backgrounds
On_IBlack='\e[0;100m' # Black
On_IRed='\e[0;101m' # Red
On_IGreen='\e[0;102m' # Green
On_IYellow='\e[0;103m' # Yellow
On_IBlue='\e[0;104m' # Blue
On_IPurple='\e[0;105m' # Purple
On_ICyan='\e[0;106m' # Cyan
On_IWhite='\e[0;107m' # White
On the next phase we will learn how to use variables, in bash scripts this is simple, just add a simple "tag" then what you want to connext wit this tag.
Here is an example:
Code:
file=/sdcard/test4
busybox touch $file
Ok, here is one simple thing, this is same like in touch command explaining, but there is a little difference. We added variable or you can call it shortcut if it's easier for you.
To call variable somewhere in a file you need to use a dollar sign "$" then name of your variable. Let's to next examole with variables.
As we now have file called test4 on our SD, we can go trough.
Code:
file=/sdcard/test4
busybox echo "hey file" > $file
As you can see everything is repeating from previous examples just with variable. This is much easier, and you will save a bit of time.
Now we can see what is inside file Open terminal emulator and type next
Code:
busybox cat /sdcard/test4
And you will get output "hey file"
Simple isn't it?
In this part we will learn how to use if, elif, else It's pretty simple, let's start.
Pattern for this will be:
Code:
if [what]; then
do something
fi
if [what]; then
do something
elif [what if not "if"]
do something
else
what to do else
fi
Ok what we have here?
The first part of code show us simple code which mean if for example something is true then do something and then close if with fi.
Second part of code is a bit "complicated". If somethig is true then do something, then we have elif, in case that if is false then it will do what is under elif. In case that both of them are false, everything what is under else will be executed.
Ok here is an example:
Code:
if [ -e /sdcard/test5 ]; then
busybox echo "hello" > /sdcard/test5
else
busybox touch /sdcard/test5
busybox echo "hello" > /sdcard/test5
fi
Ok, if file test 5 exists add hello to it, else(if not) then create a file and add text hello in it.
Another example with a bit of complications heheh
Code:
if [ -e /sdcard/test5 ]; then
busybox echo "file 5 exists"
elif [ -e /sdcard/test6 ]; then
busybox echo "file 6 exists"
else
busybox echo "files are not exist"
fi
Ok, here is explanation, if test5 exist then print "file 5 exists" going to the next line, if file test6 exist pri t "file 6 exists" and else if both of them doesn't exist print "files are not exist".
Donation:
http://forum.xda-developers.com/donatetome.php?u=5514152
Everyone who knows a bit of the performance/battery mods wants sometime to learn what is inside and how it's working
Here is a guide by @Paget96 (me) ^~^
As we know for every mod we need root, this is needed because we must to access to android shell.
init.d support, that is a folder which launch files from it on every boot. Init.d is included on some ROM's by default, but on some you need yo enable it by default(I will explain later how).
Next thing what you need is for sure busybox. And a little bit of free space on the /system partition.
Everyone knows how to root, I don't need to explain how to do that right?
User who doesn't have init.d will make it with next steps.
1. Flash superSU by @Chainfire (IMPORTANT)
2. In /system/etc/ make a file with the name "install-recovery-2.sh and push next code in it
Code:
#!/system/bin/sh
/system/bin/sysinit
3. Inside system/bin make a file with the name " sysinit" and push next code in it
Code:
#!/system/bin/sh
busybox sleep 30
export PATH=/sbin:/system/sbin:/system/bin:/system/xbin
run-parts /system/etc/init.d
4. Open /system/etc and make folder with the name "init.d"
Now you need to set permissions for all of this files.
Open terminal emulator and do next:
Code:
su
This will give root access
Code:
busybox chmod 755 /system/etc/install-recovery-2.sh
busybox chown 0.2000 /system/etc/install-recovery-2.sh
With this you will set "executable" permissions.
And we need permission for sysinit
Code:
busybox chmod 755 /system/bin/sysinit
busybox chown 0.2000 /system/bin/sysinit
And that's it
To install busybox use app "busybox installer" by stericson from playstore.
***IMPORTANT*** Don't change too much things, because you will get crap in your hands
Tools which are needed is
Text editor, I suggest Turbo Editor
Terminal emulator
ES file explorer
Ok, let's start
We will start with virtual memory tweaking...
Open file manager and create one folder where you will build a mod.
Inside it we will create one file for beginning and call it "00sysmod"
Code:
#!/system/bin/sh
busybox chmod 644 /proc/sys/vm/*
busybox sysctl -e -w vm.dirty_background_ratio=3
busybox sysctl -e -w vm.dirty_ratio=15
busybox sysctl -e -w vm.swappiness=40
busybox sysctl -e -w vm.dirty_expire_centisecs=500
busybox sysctl -e -w vm.dirty_writeback_centisecs=3000
busybox sysctl -e -w vm.min_free_kbytes=4096
busybox sysctl -e -w vm.overcommit_memory=1
busybox sysctl -e -w vm.overcommit_ratio=75
busybox sysctl -e -w vm.page-cluster=0
busybox sysctl -e -w vm.panic_on_oom=0
Copy this inside file, save it and copy to init.d folder
After that set permissions to 755
Code:
busybox chmod 755 /system/etc/init.d/00sysmod
Let's explain every line:
First line is a header of every script.
Next line will change permissions (in this case read, write, read, read) of a files which are inside /proc/sys/vm/*. * means every file.
Everything below it are vm parameters.
vm.dirty_background_ratio
Contains, as a percentage of total available memory that contains free pages
and reclaimable pages, the number of pages at which the background kernel
flusher threads will start writing out dirty data.
The total avaiable memory is not equal to total system memory.
dirty_ratio
Contains, as a percentage of total available memory that contains free pages
and reclaimable pages, the number of pages at which a process which is
generating disk writes will itself start writing out dirty data.
The total avaiable memory is not equal to total system memory.
swappiness
This control is used to define how aggressive the kernel will swap
memory pages. Higher values will increase agressiveness, lower values
decrease the amount of swap. A value of 0 instructs the kernel not to
initiate swap until the amount of free and file-backed pages is less
than the high water mark in a zone.
The default value is 60.
dirty_expire_centisecs
This tunable is used to define when dirty data is old enough to be eligible
for writeout by the kernel flusher threads. It is expressed in 100'ths
of a second. Data which has been dirty in-memory for longer than this
interval will be written out next time a flusher thread wakes up.
dirty_writeback_centisecs
The kernel flusher threads will periodically wake up and write `old' data
out to disk. This tunable expresses the interval between those wakeups, in
100'ths of a second.
Setting this to zero disables periodic writeback altogether.
min_free_kbytes
This is used to force the Linux VM to keep a minimum number
of kilobytes free. The VM uses this number to compute a
watermark[WMARK_MIN] value for each lowmem zone in the system.
Each lowmem zone gets a number of reserved free pages based
proportionally on its size.
Some minimal amount of memory is needed to satisfy PF_MEMALLOC
allocations; if you set this to lower than 1024KB, your system will
become subtly broken, and prone to deadlock under high loads.
Setting this too high will OOM your machine instantly.
overcommit_memory
This value contains a flag that enables memory overcommitment.
When this flag is 0, the kernel attempts to estimate the amount
of free memory left when userspace requests more memory.
When this flag is 1, the kernel pretends there is always enough
memory until it actually runs out.
When this flag is 2, the kernel uses a "never overcommit"
policy that attempts to prevent any overcommit of memory.
Note that user_reserve_kbytes affects this policy.
DON'T CHANGE THIS VALUE, YOU WILL GET CRAP IN A HANDS, THIS IS JUST FOR INFO
overcommit_ratio
With this parameter you will set how much space will allocations use in physical RAM. (Percentage)
page-cluster
page-cluster controls the number of pages up to which consecutive pages
are read in from swap in a single attempt. This is the swap counterpart
to page cache readahead.
The mentioned consecutivity is not in terms of virtual/physical addresses,
but consecutive on swap space - that means they were swapped out together.
It is a logarithmic value - setting it to zero means "1 page", setting
it to 1 means "2 pages", setting it to 2 means "4 pages", etc.
Zero disables swap readahead completely.
panic_on_oom
This enables or disables panic on out-of-memory feature.
If this is set to 0, the kernel will kill some rogue process,
called oom_killer. Usually, oom_killer can kill rogue processes and
system will survive.
If this is set to 1, the kernel panics when out-of-memory happens.
If this is set to 2, the kernel panics compulsorily even on the
above-mentioned. Even oom happens under memory cgroup, the whole
system panics
In this part we will tweak kernel parameters
Open file manager as before and create a file with the name " 00kerneltweak"
Here we will use if statement, just for a little practise ^~^
Code:
if [ -e /proc/sys/kernel/shmmni ]; then
busybox echo "2048" > /proc/sys/kernel/shmmni
fi
if [ -e /proc/sys/kernel/shmall ]; then
busybox echo "1572864" > /proc/sys/kernel/shmall
fi
if [ -e /proc/sys/kernel/shmmax ]; then
busybox echo "33554432" > /proc/sys/kernel/shmmax
fi
if [ -e /proc/sys/kernel/msgmni ]; then
busybox echo "512" > /proc/sys/kernel/msgmni
fi
if [ -e /proc/sys/kernel/msgmnb ]; then
busybox echo "16384" > /proc/sys/kernel/msgmnb
fi
if [ -e /proc/sys/kernel/msgmax ]; then
busybox echo "8192" > /proc/sys/kernel/msgmax
fi
Copy this inside file, save it and copy to init.d folder
After that set permissions to 755
Code:
busybox chmod 755 /system/etc/init.d/00kerneltweak
Same as we learned before if file exist then do next
Let's explain this parameters:
shmall
The total amount of shared memory (in pages) which can be allocated on the system
shmmax
The maximum size of a shared memory segment (in pages)
shmmni
The maximum number of shared memory segments available on the system
msgmni
The number of IPC message queue resources allowed (by default, 16).
msgmnb
Defines the maximum size in bytes of a single message queue. The default value is 65536 bytes.
msgmax
The maxim...
Remove Google Play Services data
Code:
#!/system/bin/sh
mount -o remount,rw /data
busybox mount -o remount,rw /data
GSM=/data/data/com.google.android.gms
for i in $GSM
do
busybox rm -rf $i/*
done
make a file, and add this inside, like before
copy to /system/etc/init.d
set permissions to 755
Clear browser data
Code:
#!/system/bin/sh
mount -o remount,rw /data
busybox mount -o remount,rw /data
browser=/data/data/com.android.NAME_OF_THE_BROWSER
for i in $browser
do
busybox rm -rf $i/*
done
make a file, and add this inside, like before
copy to /system/etc/init.d
set permissions to 755
first write a name of the browser, some devices have chrome as a default, then name will be
com.android.chrome
I'm sure that its
com.android.browser for default one
Check that inside /data/data, then just change inside the script
Or you can use this package
Code:
#!/system/bin/sh
while true; do
mount -o remount,rw /data
busybox mount -o remount,rw /data
busybox echo -n "Enter a name of the browser: "
busybox read -r name
brw=/data/data/com.android.$name
if [ -d $brw ]; then
for i in $brw
do
busybox rm -rf $i/*
done
busybox echo "Clearing done"
busybox sleep 2
else
busybox echo "Browser doesn't exist, please type another one..."
busybox sleep 3
fi
done
Well, this for this file guide is different,
Call the file "ccleaner" copy it to /system/bin
Set permissions to 755 like before
Open terminal emulator
Code:
su
ccleaner
Thanks Man
Thanks @Paget96 for your Support Man It will help Many user to Learn From You :fingers-crossed::good:
And Am the First to Comment on your Forum
cheers:laugh:
axays said:
Thanks @Paget96 for your Support Man It will help Many user to Learn From You :fingers-crossed::good:
And Am the First to Comment on your Form [emoji14]
Click to expand...
Click to collapse
I hope so
This thread needs too much stuff here, I cannot finish it in one day
Sent from my Nexus 5 using Tapatalk
Wow Good Job and Good Luck @Paget96 Its willbe Awesome
Paget96 said:
I hope so
This thread needs too much stuff here, I cannot finish it in one day
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
I'm a fan of your L Speed Mod, and this tutorial clears up many things. Subscribing now for updates when you add more stuff here.
Sent from my HTC Desire 616 dual sim using Tapatalk
Evolutionzz said:
Wow Good Job and Good Luck @Paget96 Its willbe Awesome
Click to expand...
Click to collapse
Thank you mate ^~^
MSF Jarvis said:
I'm a fan of your L Speed Mod, and this tutorial clears up many things. Subscribing now for updates when you add more stuff here.
Sent from my HTC Desire 616 dual sim using Tapatalk
Click to expand...
Click to collapse
Heh fans everywhere ^~^ Yeah, but TUT is not finished this is maybe 20% of stuff which are need to be here
Sent from my Nexus 5 using Tapatalk
Guys, more stuff will come tomorrow
Sent from my Nexus 5 using Tapatalk
Paget96 said:
Thank you mate ^~^
Heh fans everywhere ^~^ Yeah, but TUT is not finished this is maybe 20% of stuff which are need to be here
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
Just 20%!!!! I'm dying to see the rest....
Paget96 said:
Thank you mate ^~^
Heh fans everywhere ^~^ Yeah, but TUT is not finished this is maybe 20% of stuff which are need to be here
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
Sent from my HTC Desire 616 dual sim using Tapatalk
MSF Jarvis said:
Just 20%!!!! I'm dying to see the rest....
Sent from my HTC Desire 616 dual sim using Tapatalk
Click to expand...
Click to collapse
Heheh, there will be whole stuff about scripting which I used for L Speed building
Sent from my Nexus 5 using Tapatalk
For now, I think that it's enough, if you have more request, type below
Also I want to see screenshots of your attempts
Sent from my Nexus 5 using Tapatalk
Hell yeah!! Awesome Guide my bro @Paget96 Fantastic! This what people wanted from a long time. Amazing.
Sent From dark_world through my Android One
dark_optimistic said:
Hell yeah!! Awesome Guide my bro @Paget96 Fantastic! This what people wanted from a long time. Amazing.
Sent From dark_world through my Android One
Click to expand...
Click to collapse
Thank you, this is why I created it
Sent from my Nexus 5 using Tapatalk
Paget96 said:
For now, I think that it's enough, if you have more request, type below
Also I want to see screenshots of your attempts
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
I borked my phone a bit (this is a non - rooted phone ) so I'll post screenshots later when I UN-bork it.
Sent from my HTC Desire 616 dual sim using Tapatalk
MSF Jarvis said:
I borked my phone a bit (this is a non - rooted phone ) so I'll post screenshots later when I UN-bork it.
Sent from my HTC Desire 616 dual sim using Tapatalk
Click to expand...
Click to collapse
What you mean with borked?? hehh
I'm waiting for your screenshots, just to see how users understood stuff ^~^
Sent from my Nexus 5 using Tapatalk
delete
Awesome work as usual :angel:
Black_Eyes said:
Awesome work as usual :angel:
Click to expand...
Click to collapse
Thank you
I just want to share mine experience with the users
And probably to teach someone
Sent from my Nexus 5 using Tapatalk
Paget96 said:
What you mean with borked?? hehh
I'm waiting for your screenshots, just to see how users understood stuff ^~^
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
Borked means I changed my recovery and flashed a GB ROM instead of using my friends custom built CM 11 build. My trusty Tahr system also broke down, but I am resilient so I'll manage and you WILL see the screenshots before 5PM IST.[emoji16] [emoji16] [emoji16] [emoji6] [emoji6] [emoji6] [emoji6]
Sent from my HTC Desire 616 dual sim using Tapatalk

Categories

Resources