Insert SCRITP - Android Q&A, Help & Troubleshooting

Hi! How can i insert a executable script in the boot or better when the phone is shutting down!?
I've the script, but where i have to put this file to execute it when the phone is shutting down or turning on?!
TNX GUYS!

I guess it's to be posted in /system/etc/init.d
Btw, the title of your post has a typo
Don't curse me for editing the post,I knew it was init.d,but the location slipped outta my mind
Sent from my Droidiser using xda premium

Why?!
However, all script in that are in /system/bin are executed in the boot?

If you want the script to be executed at boot put it in /system/etc/init.d
However, it will only work if there is kernel support for that. idt there js a way to execute a script at shutdown though
Sent from my SGH-I777 using xda premium

Dont you know how to do it at shutdown??
However, how can i know if my script work on ICS?

Related

[Help] ADB Push Permission Denied

I'm trying to push touchwizcalendar but it doesn't work. This is what I get:
C:\sdk\tools>adb push touchwizcalendar.apk /system/app/touchwizcalendar.apk
failed to copy 'touchwizcalendar.apk' to '/system/app/touchwizcalendar.apk': Per
mission denied
Click to expand...
Click to collapse
keep your phone unlocked, run the command and you'll see the Superuser app pop up. Hit allow.
The end.
Eugene has a init script that will have staten as rw always.. Its an update.zip you flash from cwmod recovery.. If you don't have a lag fix it will flash fine, if you do it will over write it so you have to modify...
His newest rom supports both, maybe you could just kang it..
I currently have his mount script on my phone bc im always editing my services.jar and need that ability..
Sent from my SGH-T959 using XDA App
cashless said:
keep your phone unlocked, run the command and you'll see the Superuser app pop up. Hit allow.
The end.
Click to expand...
Click to collapse
It didn't work and I got the same message.
junkdruggler said:
Eugene has a init script that will have staten as rw always.. Its an update.zip you flash from cwmod recovery.. If you don't have a lag fix it will flash fine, if you do it will over write it so you have to modify...
His newest rom supports both, maybe you could just kang it..
I currently have his mount script on my phone bc im always editing my services.jar and need that ability..
Sent from my SGH-T959 using XDA App
Click to expand...
Click to collapse
Really appreciate that you are trying to help but I don't have a clue what you said. I'm totally new to this.
We had are First Sleepless Night with the New baby Boy.... Between Trying Figure out what was Wrong & taking turns with the Wife Holding Aries, I tried Pushing File's & forgot adb push didn't work...
Now this Script originally is what I made for the Behold 2, but the Basic still works For the SGV..
Just mod the script if your using the userinit.sh
Using this script you can place the userinit.sh any place you would Like...
I hope ever gets Good use out of this & Please Enjoy!
~Eugene
Download > adbpushGS1.zip
Installing*
Reboot to recovery, run the update.zip to run ClockworkMod Recovery, then installed the ZIP..
Quoted from eugene's post-- hope this helps...
Sent from my SGH-T959 using XDA App
How do I "Reboot to recovery" and I think I already run the "update.zip" when I rooted the phone. Do I have to download ClockworkMod Reovery or something? Like said I'm new to this so I'm sorry if I'm a nuisance.
Edit: Is it the same thing as this?
http://awdisk.com/2010/01/how-to-reboot-your-motorola-milestone-in-recovery-mode/
Now we can start. Plug your device to your computer and enable the debugging mode of your phone (Go to MENU->SETTINGS->APPLICATIONS->DEVELOPMENT->Enable the “USB debugging”).
Then you need the adb tool that is given with the SDK. (You can find it it the “Tools” directory of the SDK).
Open a command prompt, go to the directory of “adb.exe” and type:
adb.exe devices
You should see your device. If there is no device connected, maybe your phone is not in the “debugging mode” see above. If your device appears, you can now type:
adb.exe -d reboot recovery
Then your phone will reboot in recovery mode and you will see this logo:
Click to expand...
Click to collapse
You can go to the market and download rom manager and use it to flash a custom recovery...
Flash cwmod recovery from the app
Reboot into cwmod recovery from the app
First thing to do its go to the nandroid option and do a backup (always recommended before changing anything)
Then dl the link from above.. This is a new .zip make sure its on the internal sdcard (the 16gb one).. When you reboot into recovery (from the app like last time) go to flash any zip from sdcard.. Choose the new .zip file you just downloaded.. Your /system should now be rw upon reboot
Sent from my SGH-T959 using XDA App
do we rename the adbpushGS1.zip file??
i reboot into recovery and chose reinstall packages because that's all there was, besides deleting ?
edit: i ionstalled the push zip but when i reboot i get stuck at the galaxy s logo
junkdruggler said:
We had are First Sleepless Night with the New baby Boy.... Between Trying Figure out what was Wrong & taking turns with the Wife Holding Aries, I tried Pushing File's & forgot adb push didn't work...
Now this Script originally is what I made for the Behold 2, but the Basic still works For the SGV..
Just mod the script if your using the userinit.sh
Using this script you can place the userinit.sh any place you would Like...
I hope ever gets Good use out of this & Please Enjoy!
~Eugene
Download > adbpushGS1.zip
Installing*
Reboot to recovery, run the update.zip to run ClockworkMod Recovery, then installed the ZIP..
Quoted from eugene's post-- hope this helps...
Sent from my SGH-T959 using XDA App
Click to expand...
Click to collapse
So can I just go into userinit script and add this to the top...
Code:
show_progress 0.100000 0
show_progress 0.500000 0
delete SYSTEM:bin/playlogos1
copy_dir PACKAGE:system SYSTEM:
set_perm 0 1000 0755 SYSTEM:bin/playlogos1
set_perm 0 1000 0755 SYSTEM:bin/playlogosnow
show_progress 0.100000 10
Or was it a diff script we pull from and add to it? Also do I have to put anything after I copy this into the script before the normal script in userinit to signify a pause or finishing one task and starting another?
I saw ;fi placed throughthe script alot and im guessing its afinish point or something to start the next set of commands fresh m???
Pooped from my Samsung Vibrant using XDA app...
Dont mind the skidmarks...
p()()pypants said:
So can I just go into userinit script and add this to the top...
Code:
show_progress 0.100000 0
show_progress 0.500000 0
delete SYSTEM:bin/playlogos1
copy_dir PACKAGE:system SYSTEM:
set_perm 0 1000 0755 SYSTEM:bin/playlogos1
set_perm 0 1000 0755 SYSTEM:bin/playlogosnow
show_progress 0.100000 10
Or was it a diff script we pull from and add to it? Also do I have to put anything after I copy this into the script before the normal script in userinit to signify a pause or finishing one task and starting another?
I saw ;fi placed throughthe script alot and im guessing its afinish point or something to start the next set of commands fresh m???
Pooped from my Samsung Vibrant using XDA app...
Dont mind the skidmarks...
Click to expand...
Click to collapse
I would hate to tell you something wrong... If you use twitter I would ask eugene... or you can send him a pm or here is a link to the OP, you could ask in there
http://forum.xda-developers.com/showthread.php?t=741664
sorry I wasnt more help
Ok so I added that except to the userinit script, lag fix still works, adb doesnt seem to...
Just ran .zip file through clockwork to overwrite other file then just fix later after adb use was done, still no positive results...
Keeps saying
Cannot stat 'touchwizcalendar.apk' : no such file our directory
And if I open a shell and type the same command i get push: not found
Maybe I am just approaching this all wrong and not getting adb set up right first or something...
Can some one just step me through this crap, I can almost always figure this kind of thing out and this is pissing me off that I can't do a simple command to reinstall a damn calendar apk I want and that's the whole frickin point of having root...
Starting fresh again...
Running a fresh flash of vibrant6, have an up to date busy box, no lag fix activated at this time (but files are there from vibe6 and had it installed in the past before nand restoring.stock w/root and flashing fresh vibe 6), no adb push script installed yet but.zip is in root of sd if needed, running version 1.0.26 of adb on my computer and have apk files pulled from deodexed rom that are desired to be pushed sitting in root of sdcard (files named; "TouchWizCalendar.apk", "TouchWizCalendarProvider.apk", "TouchWizCalculator.apk", "ClockPackage.apk".)
Again guys any help would be appreciated as this is driving me nuts and should be slot easier with how some of you make it sound...
Sent from my SGH-T959 using XDA App
Do you use droid explorer? It makes adb much easier...
Sent from my SGH-T959 using XDA App
Finally got the Calendar to show up. Thanks a lot Junkdruggler and other members!
what I got lost... What you trying to do now? What do you want in you system file?
Sent from my SGH-T959 using XDA App
junkdruggler said:
what I got lost... What you trying to do now? What do you want in you system file?
Sent from my SGH-T959 using XDA App
Click to expand...
Click to collapse
I deleted stock samsung calendar (touchwizcalendar) via titaniumbackup and I pushed it back.
oh so your good now? everything working fine?
if so glad I could help...
junkdruggler said:
oh so your good now? everything working fine?
if so glad I could help...
Click to expand...
Click to collapse
Yes, everything is working fine now. Thank you
Can I delete the .apk, .odex, and update.zip from the internal sdcard?
yes you can...they're not needed anymore..
junkdruggler said:
Do you use droid explorer? It makes adb much easier...
Sent from my SGH-T959 using XDA App
Click to expand...
Click to collapse
can i push a boot animation zip using root explorer??
and may i ask how does droid explorer make adb easier?
What kind of boot animation.zip? You prob have to flash that thru recovery...
Droid explorer makes install a one click thing... It adds the sdk to your paths and pushing apps just takes a double click.. Prob more things I don't use also..
Sent from my SGH-T959 using XDA App

[Q] Start up script for X10?

Anyone know how to get a script to run at every boot? I've tried putting it in /etc/, /etc/init.d, and modifying the xRecovery init.rc with no luck. Any guidance would be greatly appreciated. Thanks.
have you tried to edit the modded chargemon file? it's a part of Xrec and is a simple script which do the mounting, so appending you things at its end could do the job... I think
Adolf1994 said:
have you tried to edit the modded chargemon file? it's a part of Xrec and is a simple script which do the mounting, so appending you things at its end could do the job... I think
Click to expand...
Click to collapse
Thanks, but no dice. Script still didn't run.
kxhawkins said:
Thanks, but no dice. Script still didn't run.
Click to expand...
Click to collapse
whts the script exactly? u want to execute some other script thru chargemon?
oh btw permission are verified right? (chmod 755 <scriptname>)
Some sysctl settings, like busybox sysctl -w parameter=value
Code:
/system/etc/install-recovery.sh
This file never existed, but it's being called from init.rc during the system boot.
Rename your script accordingly and enjoy.
Cheers,
z
AWESOME, thanks so much. I'll try that in just a second...
Nope doesn't work. Would of been nice if you could of report your results after you tried it. (Changed permissions to 777 as well.)
Tried editing init.rc and a post boot script file also at / both ignored and files reverted back to originals on boot (with 1st Jan 1970 as time-stamp).
There is a init file full of random symbols and a few lines of what looks like it should belong in init.rc (mount /system ect), could this be a signed file that reloads the other files on boot or something similar? (Attached to post, had to be zipped cos this forum has a stupid limit on .txt files.)
Seems SE has gone out of its way to stop commands being executed at boot time! I'm running stock ROM. Anyone got any other ideas?
Figured it (Get in!)
I edited /system/etc/hw_config.sh
Look at that init with HTML viewer and scroll down a lot
Sent from my X10i using XDA Premium App

CRT Animation [WORKING]

For those of you who don't know exactly what the CRT animation is, it is the animation that Gingerbread uses when you press the power button and the screen gives a neat power off effect.
Well I wanted this. A lot. So I went out and did it. Just enabled it, and it looks gorgeous on my phone.
Please note, that you must be rooted in order to use this, and on Gingerbread.
It is a straightforward process.
PLEASE NOTE THIS REQUIRES ADB AND JAVA TO BE INSTALLED
A good idea to nandroid before this, as if something goes wrong it can screw up a lot of things.
Installation 1:
Download DX2-CRT-Animation.zip
Copy to sdcard
Flash in CWR
BIG THANKS TO p3droid FOR PACKAGING AS A ZIP
Installation 2 (the complicated, make you feel cooler, hardcore, original way):
This is modifying your framework-res so some themes may not work any longer.
Instructions:
[]Have phone plugged into computer, and in Charge Mode.
[]Download DX2-CRT-Animation.apk
[]Open Command Prompt (or Terminal) window in DX2-CRT-Animation.apk's location. (This can be accomplished by shift clicking on the folder where this resides, and clicking open command prompt here).
[]Push files onto the phone
Code:
adb push DX2-CRT-Animation.apk /data/local/tmp/framework-res.apk
[]Get shell access
Code:
adb shell
su
---When you enter this, make sure your phone is awake, as a Super User access allow/deny will pop up. Allow it.
In command prompt, you should now have a #.
[]Remove and copy files to proper location, reboot
Code:
mount -o rw,remount /dev/block/stl9 /system
stop
rm /system/framework/framework-res.apk
cp /data/local/tmp/framework-res.apk /system/framework/
rm /data/local/tmp/framework-res.apk
reboot
Whats next:
-Reverse CRT animation (hopefully!!!)
Any input is appreciated.
I am new to this. Give me your input, and help me get better.
Works great! Thanks!
I think everything is working as it should with crt animation working.
Directions worked well, I just had to change how I got into adb.
Great job.
This is awesome, however I'm a little confused. I'm no beginner by any means, but this looks to be outside the realm of what I've done.
When I go into the terminal, am I doing this from my computer? Or my phone (via Terminal Emulator)?
Here is what I'm thinking, and please tell me if I'm wrong:
Download apk
Enter terminal emulator
Type in all of your commands
Voila?
Sorry for all the newbness on this, but I'm dying for some CRT.
Thanks man!
Nevermind, I'm a fail.
I'm downloading the Android and Java SDK now.
I downloaded the necessary files. I can't get the first part to work.
"Open Command Prompt (or Terminal) window in DX2-CRT Animation.apk's location.
Can you explain this step more? I tried right-clicking...
People set up there adb differently. Important thing is to copy file to the directory of where your adb tools are. In my case its
/sdk/platform-tools
Hope this helps
Sent from my DROID X2 using XDA Premium App
Couldn't get it to work. Even had the IT guy from my work try to get it going. We couldn't get the terminal to find swt.jar
Is it possible for me to do this through root explorer, all through my phone? Change permissions and push it into the correct folder?
That would be awesome.
I am out of town but when I get back I will try to package a zip to flash.
Are you on linux?
If I can elaborate for you here:
When you download the apk, copy it to your documents folder. The use the cd command to change the directory to your documents folder. This is assuming you have your path files set up correctly. Hope this helps!
Sent from my DROID X2 using XDA Premium App
religi0n said:
I am out of town but when I get back I will try to package a zip to flash.
Are you on linux?
If I can elaborate for you here:
When you download the apk, copy it to your documents folder. The use the cd command to change the directory to your documents folder. This is assuming you have your path files set up correctly. Hope this helps!
Sent from my DROID X2 using XDA Premium App
Click to expand...
Click to collapse
Haha, it doesn't help. I'm clueless man. A zip file, or instructions on how to do it SOLELY from my phone (using root explorer) would be all I know.
Dying for this
I think you just need adb.
Nice work man! I'm on my way home to hook this up. This is a good excuse for me to get the Android SDK set up on my home machine.
Sent from my DROID X2 using XDA Premium App
can someone make this a file that I can flash in recovery?
I love this animation, but I have a mac and can't get this to work.
thanks
hodges1301 said:
can someone make this a file that I can flash in recovery?
I love this animation, but I have a mac and can't get this to work.
thanks
Click to expand...
Click to collapse
I've spent all day trying to get it to work. No dice.
Would love a zip as well...
Well, I tried both download links in the original post and each time it would successfully boot up but no CRT animation. I finally got it figured out as I have the X2 spare parts installed and had to turn off fancy input animations and now it works. Thanks for posting this.
EDIT: I take that back. I had to put the speed of transition animations to normal and can have fancy input animations enabled. For some reason this won't work when "fast" is checked.
Handing out cleveland steamers for a flashable zip file...
mistawolfe said:
Handing out cleveland steamers for a flashable zip file...
Click to expand...
Click to collapse
Do you have a pc?
I just put his file is /android-sdk-windows/tools
And followed his commands.
Just got this working. Thanks again to OP. I love this animation. Reverse would be cool. Or like a really old school crt that that has to warm up and slowly fades in. Haha.
Sent from my DROID X2 using XDA Premium App
rancifer said:
Do you have a pc?
I just put his file is /android-sdk-windows/tools
And followed his commands.
Just got this working. Thanks again to OP. I love this animation. Reverse would be cool. Or like a really old school crt that that has to warm up and slowly fades in. Haha.
Sent from my DROID X2 using XDA Premium App
Click to expand...
Click to collapse
Do you have to have the Android SDK kit? With the Java JDK? I could not get that to work at all...
Works great!
@mistawolfe I can help you out if you want man
Sent from my DROID X2 using XDA Premium App
mistawolfe said:
Do you have to have the Android SDK kit? With the Java JDK? I could not get that to work at all...
Click to expand...
Click to collapse
Nope. I just have the android sdk installed. The adb is not included in the dl from google so you have to dl and extract that into the android-sdk-windows/tools
http://www.megaupload.com/?d=RTEY0Q97
Then do the steps from beginning and test to confirm your device is recognized
Then proceed and follow the steps.
Sent from my DROID X2 using XDA Premium App
rancifer said:
Nope. I just have the android sdk installed. The adb is not included in the dl from google so you have to dl and extract that into the android-sdk-windows/tools
http://www.megaupload.com/?d=RTEY0Q97
Then do the steps from beginning and test to confirm your device is recognized
Then proceed and follow the steps.
Sent from my DROID X2 using XDA Premium App
Click to expand...
Click to collapse
Why link to mega upload when all you need to do is launch the sdk manager and add the platform tools package? I'd rather get my software from the distro than some megaupload. No offense.
Sent from my DROID X2 using XDA Premium App

[Solved] AOKP and Supercharger v6

Does anyone use Supercharger v6 on AOKP? I tried using it, but I got an awk error, so I installed the modified busybox from their site, but it doesn't persist after reboot (reverts back to 20-cm9).
I guess my question is does anyone know if I can get these two to play nicely?
For people having this issue, please refer to zepplinrox's Supercharger v6 thread where you can find a script that will reinstall busybox 1.19.4 on boot.
Did you completelyremove all busybox information from your phone before installing the new version?
If so, try doing a cache and dalvik wrote in between (can't hurt) for kicks. If you get out working but can't get the minfrees to stick, run 99SuperCharger.sh as root and at boot.
Lemme know.
Clay
Sent from my SGH-I777 using XDA
use script manager, and have it set to run at startup
Sent from my SGH-I777 using Tapatalk 2
Phalanx7621 said:
use script manager, and have it set to run at startup
Sent from my SGH-I777 using Tapatalk 2
Click to expand...
Click to collapse
just the 99SuperCharger.sh file, not the entire script.
Oh, and for sure use sm, haven't used terminal emulator but sm is easy to navigate and get used to.
Clay
Sent from my SGH-I777 using XDA
Last I checked, completely removing busybox is dangerous business. I can't seem to do it anyways . But I removed about as much as I can using the BusyBox app, but it still reverts back to 1.20.0-cm9 after a reboot.
Then I tried manually deleting /system/bin and /sbin, but as expected that caused very bad things to happen .-.
lol, nvm, deleting /system/bin and /sbin just f-ed up my su binary. After replacing that, BusyBox (app) is still reporting that I have 1.20.0-cm9 installed.
When you open busy box what does it tell you at the top? 1.20 or whatever?
Do you then have the option to choose what version you wish to install? If so, what happens if you choose 1.19.4?
I originally chose version 1 of the version 1.20's then reverted back to 1.19.4. I'm SuperCharged fine. I'm running a different Rom and Kernel, but that seems to working for me
Clay
Sent from my SGH-I777 using XDA
It tells me 1.20.0-cm9 installed if I use the free version. If I use the paid version, I get "multiple busybox installed" (possibly from TB?)
I'll give 1.19.4 a shot.
1.19.4 still reverts back to 1.20.0-cm9 on reboot.
use the boot reinstaller version from the supercharger OP.
It reinstalls wraithdu's v1.19.4 busybox build on every boot for situations like yours.
zeppelinrox said:
use the boot reinstaller version from the supercharger OP.
It reinstalls wraithdu's v1.19.4 busybox build on every boot for situations like yours.
Click to expand...
Click to collapse
Lol, I was just reallllyyy hoping to find a way around that lol.
I created that tool because there is no way around that - except for fight fire with fire
lol, thanks zeppelinrox. Should I set that up with sm? Or somehow put that in init.d? Does SS99Supercharger work then?
Yeah just run it like you do all my other scripts...
After rebooting, check to see which busybox build is active
Problem is that it always defaults to 1.20.0-cm9, lol. Whatever, I've just put your busybox installer script in init.d and having it run right before SS99Supercharger, and all seems to work well. Thanks a lot for you help and the awesome script
heh... well that's what the boot reinstaller script does - it converts the normal installer script to a proper init.d script (renames it to 96busybox and removes sleep commands and other stuff)
Oh my bad, you had a script for that? o.0 I assumed you meant "just copy it into init.d xD"
Looking now...lol
ya... it's called boot reinstaller or something like that... lol

[Q] Problem with overclocking

Hello.
I have problem with overclocking. I copied files to /system/lib/modules and script file to /etc/init.d/ but it's not overcloking at boot. When I writing commands in terminal manually it works, but it doesn't work in smanager.
Please help me to fix this problem.
I just used the autostart oc it sets up init for you.
Sent from my LG-P769 using xda app-developers app
Problem solved. There was a space beetwen #! and /system/bin/sh
Now working perfect. Please close thread.

Categories

Resources