Autostart Programs (app autostarts only allows deleting) - G1 Q&A, Help & Troubleshooting

Is there a way to modify a userint.sh script to autorun programs at start or autoend??? If so what are the basic command principals??? Thank you in advance for your help.
My main goal is to add certain programs to start on boot.....anyone know the commands or an app that can assist?

Download program called Autostarts, I think that thing can do it for you.

sorry to bump my own post...but i edited and thought this was better than adding an additional post.

The app is called autostart (Root)
Once installed, you make the autostart.sh and put it in the /data/opt/ which will run the items in su after the G1 boots up.
Kinda interesting to find this. Maybe this is how Ill update my odex files automatically..

could anyone help me create the autostart.sh file?
For instance, I'd like to autostart Nimbus when the phone boots. What syntax do I have to use within the .sh file to get this to happen?

Related

Root access with Astro?

Is there anyway to start Astro as root so you can use it to edit system directories?
I had wished for the same thing.. but i didnt tell nobody.. soo maybe this will be more effective. prevents having to type in the terminal all the time.. not that its bad.. ive learned so much allready since ive had this phone...
I totally agree! That would be perfect! Maybe there a way of editing the code or smth...
If you can't work *MORE EFFICIENTLY* directly from the terminal, then you definitely should NOT have root access via GUI.
lbcoder said:
If you can't work *MORE EFFICIENTLY* directly from the terminal, then you definitely should NOT have root access via GUI.
Click to expand...
Click to collapse
Pretty much this. It seems like most of the people having problems on this website just want root because it's "kewl" but really have no idea what it is or even have a clue on how Linux works.
I actually Emailed the Dev of Astro about this same question and here was his reply.
Here is the email copied and pasted from gmail.
My question
Are you able to make a version that requests root access to delete chmod rename move etc for the 100,000+ users from xda and other boards with root access?
His Reply
On Jan 21, 2009 10:57 AM, "Kevin Payne" <metago.inc[at]gmail> wrote:
This is a bit outside ASTRO's scope at the moment. Technically, ASTRO should work fine on files owned by root if it were run as a root process, but running applications as root is not advised in general. Someone really needs to create a sudo type command to let an individual application run as root.
lbcoder said:
If you can't work *MORE EFFICIENTLY* directly from the terminal, then you definitely should NOT have root access via GUI.
Click to expand...
Click to collapse
d00m said:
Pretty much this. It seems like most of the people having problems on this website just want root because it's "kewl" but really have no idea what it is or even have a clue on how Linux works.
Click to expand...
Click to collapse
Considering the fact that I'm a Systems Administrator as my profession and work with hundreds of Linux/Unix/Windows servers a day, the whole reason why I bought the G1 was for development and tinkering, the fact that my home PC is running Vista x64 (i haven't gotten around to creating a VM or messing with the drivers), and that I do wipes frequently to test different configurations, I'm pretty sure I'll be ok with root access. I'm just tired of manually doing something on that tiny keyboard that can easily be done with a nice pretty GUI. I stare at consoles all day and thousands of lines of black and white text, when I come home I don't exactly want to be anywhere near a terminal.
Also, why bother doing anything on a phone, other than using it as a phone (or for email, texting, etc.), if you don't do it because it's "kewl". I mess with my phone because it's cool to have a mini-*nix based computer with several fun radios on it. If I do something stupid like type "rm -Rf /*" after logging in as root (never going to happen) then that's my own fault.
I don't care if you're a Unix purist and you write up your office reports, spreadsheets, and diagrams in vi. Good for you, you're wasting time that can be better spent on other things because of your stubborn prejudice against GUI's. I asked a question, because I have a reason for that question. If you don't have any answers to that question, then please don't bother replying.
diabolical28 said:
I actually Emailed the Dev of Astro about this same question and here was his reply.
Here is the email copied and pasted from gmail.
My question
Are you able to make a version that requests root access to delete chmod rename move etc for the 100,000+ users from xda and other boards with root access?
His Reply
On Jan 21, 2009 10:57 AM, "Kevin Payne" <metago.inc[at]gmail> wrote:
This is a bit outside ASTRO's scope at the moment. Technically, ASTRO should work fine on files owned by root if it were run as a root process, but running applications as root is not advised in general. Someone really needs to create a sudo type command to let an individual application run as root.
Click to expand...
Click to collapse
I looked into the commands to launch an application from the CLI and found that Astro can be started using the following command:
am start -n com.metago.astro/.FileManagerActivity
However, this doesn't do us any good, since the dalvik VM will take that command and create a process as a sandbox user regardless of what user executes that command. There looks like there's a way to tell the VM to fork the process as a specific uid and gid, but that requires editing the AndroidManifest.xml.
I'm not too good with Java, and I don't know how strict Android's API is, so I don't know if running an apk application as root is even possible.
However, I do know that running commands from inside an application, like su, is possible.
~TM
"Wise men speak because they have something to say; Fools because they have to say something." ~Plato
Solved--Astro with root...(workaround)
kinda late, but in case anyone wants to know this is what I did.
This way technically doesnt allow astro to run with root, but its just as good.
I originally did this a few months back for my G1, and just mod it a little to work on my nexus
- created a script to mount system as rw
- created a script that gives r/w permission to all app directories (/data, /data/app, /data/app-private, /system, /system/app, /system/sd, ...) and all apps inside those directories
-then merged the 2 scripts and named it astro_root_perm
-installed GScript from the market
-created another script that
-first changes all permissions on apps back to what they started as(644, 640...)​-then changes permissions of directories back to what they were​-and finally remounts system back to ro, and named this script to astro_basic_perm​
-used Gscript to create shortcuts of the 2 scripts to my home screen.
-then with bettercut, I changed the scripts' icons to the astro icon. I just colored the astro stock icons "A" green for one script and red for the other
So anytime I want to use astro as root, I just click the shortcut I made with gscript off my home screen, open astro,
Then when Im done with astro, I just run the other script
I know its not the same as running astro AS root, but it works for me.
Im not really a linux guy......I'd really appreciate if someone could help me with this next step
++++++++++++++++++++++++++++++++++++
Does anyone know what I need to include in a script to have it call/open a program automatic?
My ultimate goal is to create one script that will
Mount system rw
Change needed permissions to rw
Automatically open up Astro
Then change all permissions back when astro is terminated
Possibly create a keyboard shortcut for the G1
What do ya think?? is it possible??
Estrongs has limited root file browsing on some ROMs and SU File Manager or Root File Manager will let you browse as root for a small price.
+1 recommendation on Estrongs File Explorer's root option if you want it for free, includes Windows shares browsing over lan.
Otherwise try SUFBS, also has built-in terminal.
Sent from my HTC Hero using Tapatalk
louieG1 said:
My ultimate goal is to create one script that will
Mount system rw
Change needed permissions to rw
Automatically open up Astro
Then change all permissions back when astro is terminated
Possibly create a keyboard shortcut for the G1
What do ya think?? is it possible??
Click to expand...
Click to collapse
I'm not sure exactly how gscript handles things, but with a normal bash (shell) script, the lines are run sequentially. That is, the next line isn't run until the previous line is done. It would seem that you could put all that in one script, and the still-running script wouldn't change the permissions back until astro has ended. But then again, java adds complexity to it and I'm not sure if it works the same.
louieG1 said:
kinda late, but in case anyone wants to know this is what I did.
++++++++++++++++++++++++++++++++++++
Does anyone know what I need to include in a script to have it call/open a program automatic?
My ultimate goal is to create one script that will
Mount system rw
Change needed permissions to rw
Automatically open up Astro
Then change all permissions back when astro is terminated
Possibly create a keyboard shortcut for the G1
What do ya think?? is it possible??
Click to expand...
Click to collapse
Love this idea! Unfortunatly I'm no coder but would love to see something like this created.
I created a "GodMode" script that does exactly this, email me if you want it, I can edit it to work for the G1.
Totally forgot I started this thread, then happened to find it on Google when looking for the same thing, again.
Went back to Windows Mobile for a little bit, missed Android, and now have a Samsung Vibrant.
Still want a way to use ASTRO with root priviledges, especially since I don't have a tactile keyboard anymore.
phaelox said:
+1 recommendation on Estrongs File Explorer's root option if you want it for free, includes Windows shares browsing over lan.
Otherwise try SUFBS, also has built-in terminal.
Sent from my HTC Hero using Tapatalk
Click to expand...
Click to collapse
Thank you.
Estrongs File Explorer enabled me to flash Tamil font in my Rooted T-Mobile G2X mobile phone.
I know i am not answering the question directly. But, i use Linda Manager it gets the job done.
---------- Post added at 08:17 PM ---------- Previous post was at 08:14 PM ----------
raddy said:
Thank you.
Estrongs File Explorer enabled me to flash Tamil font in my Rooted T-Mobile G2X mobile phone.
Click to expand...
Click to collapse
Hi raddy,
I'm also from TN as well, i would love to get the Tamil fonts. Can you please guide me?
Not having tamil fonts on the browser is simply annoying
Hi
If your mobile is rooted, then follow this link.
http://forum.xda-developers.com/showthread.php?t=798380
Sent from my LG-P999 using XDA App
raddy said:
Hi
If your mobile is rooted, then follow this link.
http://forum.xda-developers.com/showthread.php?t=798380
Sent from my LG-P999 using XDA App
Click to expand...
Click to collapse
Cool, i got the tamil fonts on my G1, thanks for the help.

[Q] Non-OS services running on startup

Folks, please be gentle if I'm asking something obvious... I'm new to Android. The question is if there is a way to disable some non-OS services (such as Skype, HeyTell, Google BlogService, HeyWire etc) from starting after my ROOTED DS7 is powered off/on. I'm UNIX guy, so was looking for something like /etc/rcX.d start scripts but was not able to find it. Advanced Task Killer for Froyo cant disable those permanently as well. Basically I need to stop it manually every time I turning on my DS7.
Any help is greatly appreciated. Thank you.
RusGrizzly said:
Folks, please be gentle if I'm asking something obvious... I'm new to Android. The question is if there is a way to disable some non-OS services (such as Skype, HeyTell, Google BlogService, HeyWire etc) from starting after my ROOTED DS7 is powered off/on. I'm UNIX guy, so was looking for something like /etc/rcX.d start scripts but was not able to find it. Advanced Task Killer for Froyo cant disable those permanently as well. Basically I need to stop it manually every time I turning on my DS7.
Any help is greatly appreciated. Thank you.
Click to expand...
Click to collapse
It has been a while since I went into an android installation, but the install packages have the extension .apk. There is a folder on the device that contains the .apk files that are installed when the device is reset. If you go into that folder you can rename the .apk to .bak or whatever, and then do a hard reset, the programs won't install. Maybe someone with a rooted device can provide the directory names.
Questions or Problems Should Not Be Posted in the Development Forum
Please Post in the Correct Forums and Read THIS
Moving to General
stevedebi said:
It has been a while since I went into an android installation, but the install packages have the extension .apk. There is a folder on the device that contains the .apk files that are installed when the device is reset. If you go into that folder you can rename the .apk to .bak or whatever, and then do a hard reset, the programs won't install. Maybe someone with a rooted device can provide the directory names.
Click to expand...
Click to collapse
Thank you for the reply. There is a directory /system/app with bunch of apk(s) in it. However if I rename those which are starting after the reboot wouldn't it disable app permanently? It is not my goal, honestly. I just trying to find the way to use those on demand basis. Thank you again.
lufc said:
Questions or Problems Should Not Be Posted in the Development Forum
Please Post in the Correct Forums and Read THIS
Moving to General
Click to expand...
Click to collapse
My fault. Sorry.
RusGrizzly said:
Thank you for the reply. There is a directory /system/app with bunch of apk(s) in it. However if I rename those which are starting after the reboot wouldn't it disable app permanently? It is not my goal, honestly. I just trying to find the way to use those on demand basis. Thank you again.
Click to expand...
Click to collapse
Titanium backup can freeze those app so they won't run, and then un-freeze them if you want.
Thanks a lot! Worked as a charm!
Sent from my Dell Streak 7 using xda premium

[Q] running debloat script.. won't run??

Got the new one for 5.7.906 rooted and dled script manager
when I run psouza4's script after answering questions about what I wanted to keep
It froze right away saying myverizon.apk was read only or something
rebooting... reboot not permitted.
so.. I figured I'd just change that one manually.. changed it, ran it again.. and it froze saying file not found...
so i edited to script to remove that one command/file..
ran it again and i got
"working please wait.....
reboot: operation not permitted"
so I was going to go the titanium route but I can't afford pro version.. also reading through psouza4's thread it notes that some apps will circumvent freezing and load anyway unless renamed..
[q1] does anyone else have this problem with script and if so what was the fix?
[q2] if I have to rename everything manually (a huge pain in the arse) what are the names of the *.apk's associated with
home launcher, motorolas text messaging, widgits, swipe keyboard, ect.. in his list so i don't accidentally remove them?
Thanks!
production said:
Got the new one for 5.7.906 rooted and dled script manager
when I run psouza4's script after answering questions about what I wanted to keep
It froze right away saying myverizon.apk was read only or something
rebooting... reboot not permitted.
so.. I figured I'd just change that one manually.. changed it, ran it again.. and it froze saying file not found...
so i edited to script to remove that one command/file..
ran it again and i got
"working please wait.....
reboot: operation not permitted"
so I was going to go the titanium route but I can't afford pro version.. also reading through psouza4's thread it notes that some apps will circumvent freezing and load anyway unless renamed..
[q1] does anyone else have this problem with script and if so what was the fix?
[q2] if I have to rename everything manually (a huge pain in the arse) what are the names of the *.apk's associated with
home launcher, motorolas text messaging, widgits, swipe keyboard, ect.. in his list so i don't accidentally remove them?
Thanks!
Click to expand...
Click to collapse
Ensure usb debugging is on under development in application settings. Verify you are rooted, if not, only motofail will root 906. Else, try using a root browser, or manually make /system and /system/app writable before running the script.
Skreelink said:
Ensure usb debugging is on under development in application settings. Verify you are rooted, if not, only motofail will root 906. Else, try using a root browser, or manually make /system and /system/app writable before running the script.
Click to expand...
Click to collapse
root = verified
/system and /system/app set to R/W
usb debuging = on
used modified script removing all instances of 2>/dev/null and reboot command
now I'm getting *.apk not read/writable
confirm that /system and /system/app it set to read/write and when i hit properties.. only the read box is checked.. so i go to change it again.. and the other boxes (read,write,execute) are already checked... I don't understand.
I have the newest version of busy box installed I know he changed the syntax after v1.182 but I can't seem to find a copy of that version.. maybe thats the problem? ugh..
production said:
Got the new one for 5.7.906 rooted and dled script manager
when I run psouza4's script after answering questions about what I wanted to keep
It froze right away saying myverizon.apk was read only or something
rebooting... reboot not permitted. !
Click to expand...
Click to collapse
When you loaded the script into script manager, did you check the select to allow the script to run with SU permissions? in other words, you start script manager, you load the debloat script, there are a bunch of options available before you hit the "run" button, one of which allows the script to run with root permissions. My guess is that you missed that, based on what you are describing.
Thanks to everyone who contributed.. :good:
got it to work.. It was afterall allowing to run the script as root as doogald suggested.. can't believe i missed that.
THANKS

How to get rid of the annoying "System Update"

Hello!
I'm on a rooted Cricket Android 4.4.2 device.
ROM Version: 1.11.506.1
Software Number: 1.11.506.1
HTC Sense 6
Baseband: 1.101.1372.19
Can somebody please tell me how to get rid of the annoying software update that has been coming the last week?
Is there way to somehow either change my software number to trick the phone into thinking I'm updated or perhaps I should update? If so, how?
I appreciate the help.
Using a root file explorer and freezing the updater app manually would probably be the safest (personally I like Root Browser by JRummy hasn't been updated in awhile but if ain't broke it don't need to be, and it is a tool I know will always perform these critical tasks correctly)
By freezing the the system updater app in the following way, you will be able to easily reverse the process using the same process. While there are some mods that can hide the notification itself (eg.: Xposed FW), this method completely disables the update check process, thus freeing up system resources. Twofold if you look at it this way imo, rather than adding potentially harmful additional resources.
# Open your root fs explorer
# navigate to fs root:
/
# then to:
/system/priv-app
# locate the file:
Updater.apk
# append ".bak" to the file name. In other words rename it to:
Updater.apk.bak
# note: no need to mess with it's .odex file, it never hurt no one. Also depending on your fs explorer and personal settings, the app's icon thumbnail has likely changed to a blank white square/unkown/generic file icon and is totally normal.
# profit and celebrate the newly liberated space in your notifications and don't forget to miss that pesky "remind me later" pop up.
#should there be an update that your are feeling compelled to (try) and install simply remove ".bak" from the files name and proceed as usual. Note that the only thing you should be changing in all this is +/- ".bak" from the file name. Don't go trying to change this or other apps file name. It don't work like that. Speaking of other apps, I urge great caution against going ape$#¡+ and doing this carelessly, especially for apps anywhere under "/system".
# The Disable button on the App Info pages should be the primary resource for disabling apps for most users. Know what the app does and is used for on your system BEFORE making changes or worse yet, deleting it.
~/#: print <INSERT STANDARD DISCLAIMER, AKA CYA STATEMENT HERE>
Don't just say it, hit that thanks button if I helped you in any way!!!
Sent from my HTC Desire 510 using Tapatalk
wow thank you so much :laugh:
jackunoff said:
Using a root file explorer and freezing the updater app manually would probably be the safest (personally I like Root Browser by JRummy hasn't been updated in awhile but if ain't broke it don't need to be, and it is a tool I know will always perform these critical tasks correctly)
By freezing the the system updater app in the following way, you will be able to easily reverse the process using the same process. While there are some mods that can hide the notification itself (eg.: Xposed FW), this method completely disables the update check process, thus freeing up system resources. Twofold if you look at it this way imo, rather than adding potentially harmful additional resources.
# Open your root fs explorer
# navigate to fs root:
/
# then to:
/system/priv-app
# locate the file:
Updater.apk
# append ".bak" to the file name. In other words rename it to:
Updater.apk.bak
# note: no need to mess with it's .odex file, it never hurt no one. Also depending on your fs explorer and personal settings, the app's icon thumbnail has likely changed to a blank white square/unkown/generic file icon and is totally normal.
# profit and celebrate the newly liberated space in your notifications and don't forget to miss that pesky "remind me later" pop up.
#should there be an update that your are feeling compelled to (try) and install simply remove ".bak" from the files name and proceed as usual. Note that the only thing you should be changing in all this is +/- ".bak" from the file name. Don't go trying to change this or other apps file name. It don't work like that. Speaking of other apps, I urge great caution against going ape$#¡+ and doing this carelessly, especially for apps anywhere under "/system".
# The Disable button on the App Info pages should be the primary resource for disabling apps for most users. Know what the app does and is used for on your system BEFORE making changes or worse yet, deleting it.
~/#: print <INSERT STANDARD DISCLAIMER, AKA CYA STATEMENT HERE>
Don't just say it, hit that thanks button if I helped you in any way!!!
Sent from my HTC Desire 510 using Tapatalk
Click to expand...
Click to collapse
I'm gonna chime in here and I know you're trying to help but this really isn't helping because you didn't actually freeze the app like you said. All you did was change the apps name so now when the system actually calls upon that app it's simply going to error out and actually cause it to use more resources and not less as you said albeit it will not show up anymore but that's not the way to stop it! If I go into /system/priv-app and change Phonesky.apk to Phonesky.apk.bak the play store is going to break and then send me the error to my screen every second until I fix it and that uses more resources and the only reason you're not seeing the error on the screen for the Updater is because it's doing it behind the scene in a log. Now the real way to stop this app is to actually really freeze it or uninstall it so the system actually knows the app is no longer there and there are plenty of apps in the play store that can do that.
---------- Post added at 06:17 AM ---------- Previous post was at 06:16 AM ----------
Khiddfrost said:
wow thank you so much :laugh:
Click to expand...
Click to collapse
You should read my post above.

Create module that executes code if another app is started or run forever in background?

Hello!
I'm currently playing around with Java and Xposed development and I have created a simple Android app that creates a .txt file in a folder.
What I would like to do is create a Xposed module that can automatically detect when I create said .txt file, I have 2 ideas on how I could achieve that but I'm not sure what might be the best:
Idea #1:
Create some sort of background service that will always be runnning and check if there are any or new files in said folder or maybe use the FileObserver method.
Idea #2:
Hook into the app and run a function inside my Xposed module that checks with regular interval if there are any files in the folder.
I have never really done any Java or Xposed development before so all this is quite new, but I would love to know what would be the best aproach or if anyone has some better suggestions!
Thank you all!
I don't see a xposed requirement here. File change observation is easily done by automation apps like Tasker(event->file->file modified), doesn't need xposed for it. Xposed framework better used for modifications to system or apps.
As per second requirement of performing user actions on a app, you can use Xposed edge(xposed plugin) inject gestures / AutoInput(tasker plugin)

Categories

Resources