[Q]-Answered-Android notification system via shell script / unix subsystem - Atrix 4G Q&A, Help & Troubleshooting

Hello, I was just wondering if it is possible to access the notification system from a shell script.
What I wanted to do was have a notification if a file has been updated locally. Been searching for information about how to do the notification access on google but I'm probably not looking in the right places. Any help pointing me in the right direction would be wonderful.
thanks'
-thedd

-bump- anyone?

In case anyone was wondering how to do this:
http://chris.boyle.name/2010/06/chrome-to-phone-cl
You can send an URl to your phone's browser via a shell script (either on another computer or from your phone's internal system)

Related

Is it possible / OK to uninstall default apps?

Hi folks,
I have installed the Steel web browser and like it much more that the one supplied by HTC with the phone... is it possible to uninstall it and just leave Steel?
The above is just an example, my HTC hero has lots of stuff I don't really plan to use, ever. Is there a way to get rid of them FOR GOOD?
Thanks in advance!
frandavid100 said:
Hi folks,
I have installed the Steel web browser and like it much more that the one supplied by HTC with the phone... is it possible to uninstall it and just leave Steel?
The above is just an example, my HTC hero has lots of stuff I don't really plan to use, ever. Is there a way to get rid of them FOR GOOD?
Thanks in advance!
Click to expand...
Click to collapse
I'm so with you on this one...I've added Twidroid and turned off Peep but would love to completely delete it in order to avoid any conflicts. Also the default messaging program is a bit of a dog when compared to Handcent SMS.
There used to be a way on the WinMo 6 phones to change the registry values to allow deletion of TouchFlo UI programs but I've not been able to find anything online yet. Maybe it's too early in the phone's life for anyone to have cracked this.
At the moment, the only thing I can do is to make sure that notifications from default programs that I have replaced with better ones are turned off so that they only come from the new software.
I realise this doesn't help you (or me) very much but I'd pay good money to have an add/remove program that works on the default apps (ASTRO, Appmanager and OI File Manager do not seem to be able to access the default programs for uninstallation).
Does anyone with modding experience (obviously I don't ;D) have any suggestions on how to achieve this?
DBR
i have installed QuickUninstall app and it offers all the built in apps as well as the added ones....didn't try to delete any though, they don't bother me that much to toy with it just yet
Kewl...thnx for the heads up. QuickUninstall is downloaded. I'll try to get rid of Peep and the inbuilt message program and if something goes wrong I'll be back here begging for more help
DBR
I've had some success with Root Explorer - I've successfully removed the stocks app and the stocks widget.
Big pointer before you start on removing default or stock Rom apps is to MAKE A NANDROID BACKUP!! You can do this by booting the temporary Recovery image from the rooting thread here
http://forum.xda-developers.com/showthread.php?t=543571
That way, if you do mess up, you can restore the Nandroid Backup.
Just ask Auntie Dayzee (BTW I wish I was this sensible with other stuff in my life!! LOL)
I need to partition my hard drive and install Windows in order to use Nandroid and root the phone (you need to root it in order to use root explorer right?).
As soon as I find a way for the installer to find my hard drive I'll poke you for advice, thanks dayzee
Does anyone know what's the name of the web'n'walk app? Can't find it in the app folder.
It's not an app afaik, it's just a shortcut.
all it does is open the default browser to the t-mob web and walk homepage.
Oh.. do you also happen to know where I can remove it?
Nevermind, found it in the app folder as "urlshortcut.apk"
frandavid100 said:
I need to partition my hard drive and install Windows in order to use Nandroid and root the phone
Click to expand...
Click to collapse
As far as i understand, ADB works in Mac and Linux as well, you just need to prefix the commands with ./
or have i missed something?? there's no point installing windows if you don;t have to....
how did you do it?
Dayzee said:
I've had some success with Root Explorer - I've successfully removed the stocks app and the stocks widget.
Big pointer before you start on removing default or stock Rom apps is to MAKE A NANDROID BACKUP!! You can do this by booting the temporary Recovery image from the rooting thread here
http://forum.xda-developers.com/showthread.php?t=543571
That way, if you do mess up, you can restore the Nandroid Backup.
Just ask Auntie Dayzee (BTW I wish I was this sensible with other stuff in my life!! LOL)
Click to expand...
Click to collapse
Hi Dayzee,
noob here. i just rooted my htc hero and i have root explorer running.
can you explain how you removed those apps?
I want to ditch peep, footprints and possibly pc synchronization (if this is safe).
I am a little lost in this file directory structure...
...or could you point me to a really great link on this topic?
thanks so much,
sprinkles
had success using Paul's method on Modaco...all credit to him in my case.
http://android.modaco.com/content/htc-hero-hero-modaco-com/291521/if-you-want-to-remove-htc-sync/
Used a file explorer (astro in my case) to view the folder /system/app so that i could see what needed to be removed, but am now happily without Peep, Learn More, Stocks,HTC Sync, Mail etc.
adb remount
adb shell rm /system/app/xxxxxx
replace xxxxxx with the app you want to remove
HTC Sync - PCSCII*
HTC Stocks and Widget - *Stock*
Peep - *Twit*
Learn More - Learn*
Footprints - *Foot*
Mail - HtcMail*
there's plenty of others in there as well if you have a look. Just be sure to be careful what you delete, and remember that the app names are case sensitive.
The rooted 2.73 rom from Modaco works fine with this command, and i expect the Modaco custom roms will as well.
I used a similar method to get rid of some HTC app which kept bugging me since I upgraded to the new ROM (Peep, Stock, etc), works perfectly and no problem so far.
It's pretty straightforward, even for a newb like me, but if anyone is interested in the steps I followed :
0- Before doing anything that can mess up your phone, it's recommended to do a nandroid backup.
I'll explain how to backup each removed app individually, but we're never cautious enough !
1- Load the recovery image and mount the system:
Code:
fastboot boot cm-hero-recovery.img
adb shell mount /system
2- Get the list of app installed, spot the files you want to delete
Code:
adb shell ls /system/app/
3.a - First alternative : Backup on SDcard and delete
Mount sdcard.
Create a folder saveHtcApp.
Move (copy + delete in one go ! ) files from system/app to saveHtcApp
Code:
adb shell mount /sdcard
adb shell mkdir /sdcard/saveHtcApp
adb mv /system/app/Stock.apk /sdcard/saveHtcApp
adb mv /system/app/Stock.odex /sdcard/saveHtcApp
adb mv /system/app/com.htc.StockWidget.apk /sdcard/saveHtcApp
adb mv /system/app/com.htc.StockWidget.odex /sdcard/saveHtcApp
Then check that all worked right by doing some ls (Yeah, I'm found of double-checking)
Code:
adb shell ls /sdcard/saveHtcApp
adb shell ls /system/app/
3.b - Second Alternative : (don't do it after 3.a !) Backup on Computer and delete.
(on Windows, I assume Linux's folks won't need explanations to do the same on linux.)
Create a folder saveHtcApp : in the following example, in the working directory.
(Of course, you can make it anywhere, but it make the path smaller to work on working directory... and move the save folder afterwards)
Then pull (copy) the files from the phone to the computer.
Just to make sure, a little dir to see that all files were actually copied on the computer.
Code:
mkdir saveHtcApp
adb pull /system/app/Stock.apk ./saveHtcApp
adb pull /system/app/Stock.odex ./saveHtcApp
adb pull /system/app/com.htc.StockWidget.apk ./saveHtcApp
adb pull /system/app/com.htc.StockWidget.odex ./saveHtcApp
dir
Then, delete them :
Code:
adb shell rm /system/app/Stock.odex
adb shell rm /system/app/Stock.apk
adb shell rm /system/app/com.htc.StockWidget.odex
adb shell rm /system/app/com.htc.StockWidget.apk
4 - Reboot the device !
Hope that could help someone.
Tested on Brown French Hero, 2.73.405.5 ROM offi.
Brill stuff - I'm rubbish at the coding stuff - where does this back the apps up to? and what does the dot do? and if its pulling to the PC, does the slash have to go the other way?
Dayzee
Good question, I should have explain that a little
I'll update my previous post.
For the slash-thing... I'm always switching from windows to linux to windows, so I'm always confused between which slash use.
When I have issue with /, I try with \.
BTW, in the present case, I run all those lines on Windows 7 without any issue.
Edit : post step-by-step edited. Is it clearer ?
If anyone see anything to change or explain, just say so.
removing htc hero sucka apps
Tweedeldee said:
Good question, I should have explain that a little
I'll update my previous post.
Click to expand...
Click to collapse
great and thanks. while you were sleeping, i went in and did some removals; just the apk files. what about the .odex files?
I took these apps out at the knees
-peep
-footprints
-tutorial
any other suggestions?
thanks.
Hey, I wasn't sleeping ! Just finding a way to save on sdcard instead of pc and re-redacting the post ! >.<
I didn't knew what was an odex file either, so I googled it :
http://groups.google.com/group/android-framework/browse_thread/thread/70ee61a240edc84a?pli=1
They are created for a final system image. They are not required --
if they don't exist, the system will create them in /data during
boot.
Click to expand...
Click to collapse
I backuped them too, just in case...
For the suggestion, the list to remove is pretty simple : anything you don't use at all.
As long as you keep the backups, there shouldn't be any problem to put them back if there is any issue.
Of course, any app used by other apps must stay on the phone.
I removed :
Stock
Peep
Footprints
Tutorial
HTC Sync
rhedgehog says he removed HtcMail too.
removing htc hero sucka apps
Tweedeldee said:
Hey, I wasn't sleeping ! Just finding a way to save on sdcard instead of pc and re-redacting the post ! >.<
I didn't knew what was an odex file either, so I googled it :
http://groups.google.com/group/android-framework/browse_thread/thread/70ee61a240edc84a?pli=1
I backuped them too, just in case...
For the suggestion, the list to remove is pretty simple : anything you don't use at all.
As long as you keep the backups, there shouldn't be any problem to put them back if there is any issue.
Of course, any app used by other apps must stay on the phone.
I removed :
Stock
Peep
Footprints
Tutorial
HTC Sync
rhedgehog says he removed HtcMail too.
Click to expand...
Click to collapse
thanks dog.
technically, if you wipe the device and start over all these apps are reinstalled from the get go.
this list is great. i am going to do some more cleaning and move onto the next task of partitioning my storage.
dayzee did a wonderful job for that newb root posting...i wish there was locked how to list that was easy enough for anyone to:
-1- root the htc hero (completed)
-2- remove and replace htc's crapware apps (maybe this thread is part 2)
-3- partition storage (not seeing an easy way yet but downloaded apps2sd)
-4- recommended replacement apps and next steps
i'd be glad to help put this together, make it easy to read, make it pretty, etc.
-sprinkles
Not a bad idea, you're on your way !
I want a pretty, clean, post with colors, pics, screencasts, videos, nice fonts...
Good luck with that !
sprinkles said:
thanks dog.
technically, if you wipe the device and start over all these apps are reinstalled from the get go.
this list is great. i am going to do some more cleaning and move onto the next task of partitioning my storage.
dayzee did a wonderful job for that newb root posting...i wish there was locked how to list that was easy enough for anyone to:
-1- root the htc hero (completed)
-2- remove and replace htc's crapware apps (maybe this thread is part 2)
-3- partition storage (not seeing an easy way yet but downloaded apps2sd)
-4- recommended replacement apps and next steps
i'd be glad to help put this together, make it easy to read, make it pretty, etc.
-sprinkles
Click to expand...
Click to collapse
I agree - I've added Tweedeldee's method to the Hero Wiki which is here
http://wiki.xda-developers.com/index.php?pagename=HTC_Hero
and has some other guides - Sprinkles, there is also a Dayzee Walkthrough for installing MoDaCo Roms, including some tips on Aps2SD partitioning methods.
Hugs - Dayzee xxx

[Q]How to Mount Archos G9 to (X)Ubuntu 11.10

Hello,
I tried to see the internal storage directly on Xubuntu 11.10 like a hard drive, so I tried to mount it without success.
Ok, to push some file on internal storage I can using adb, but it's not very "look" friendly.
So I've tried many post, this one seem to be the near goal.
[Guide] Mount Internal Storage in Ubuntu
But for me still don't work.
Do you have any idea?
Edit:
1st solution (Thanks iourine) :
. Install it from Synaptics of Application Center and see Multimedia-->gMTP in the system menu. To some degree, it is sufficient to manage the user content on the device
Edit:
2nd solution nut not working for me : help
Please see the file archos9.bash
Plug your device and in a terminal sudo sh "le fichier"
Just tried gMTP, works as it should. Siply install it from Synaptics of Application Center and see Multimedia-->gMTP in the system menu. To some degree, it is sufficient to manage the user content on the device; you don't need adb for that only purpose.
Note that I also have necessary settings in ~/.android/adb_usb.ini and in /etc/udev/rules.d/51-android.rules (I think you too, once you can see the device in adb.)
Also look Wiki for "Media_Transfer_Protocol" for other options. If you have Kubuntu, it will probably work off-the-box, with the above two files.
Or do
Code:
adb shell
and manage the /storage directory by hand.
I wonder, has anybody ported MC onto this device?
Thank you it's work. You just have to open this prog
Do you have a solution to mount automatically this internal storage?
I was just thinking about this "issue"
I've managed to get it mounted and showing up in nautilus, although I think the mtpfs fuse driver may be a little buggy, I had to do a little rain dance to get it to show up.
Which part is not working for you?
So with the first link! I block at the end.
so --> I don"t see in the "Places" menu a Drive marked with 'xoom' (or for me "tablette")
Even if I Plug in archos.
An idea?
Solution
The same thing,
I modified this script, but it not working. Any archos9 seen on xubuntu.
I see in media the dir but that's it. I tried to reinstall the mtfs... nothing, to do it manualy. Same thing.
You can find the script in the first message.
Let me know if it's work for you or how to improve it.
In advance thank you
Link : http://forum.xda-developers.com/attachment.php?attachmentid=921218&stc=1&d=1330292862
What do you think about this line : mtpfs on /media/archos9 type fuse.mtpfs (rw,nosuid,nodev,allow_other)
Do have you tried "MTPFS" ?
Do have you tried "MTPFS" ?
It works like a charm..
I've done this:
sudo apt-get install mtpfs
then
sudo mkdir /media/tablet
..and..
sudo mtpfs -o allow_other /media/tablet
is a piece of cake.
Yes i've tried
Yes, thank you, I tried.
I'm going to trie 2 thing:
- because i'm under 64 xubuntu, i wil install the 32 prog
- instal the last aos from archos, i read that they improve something for that!

[Q] Howto upgrade the busybox properly ??

Hi,
I tried to upgrade the busybox with different manner (busybox, busybox installer, manual installation from xda), but no one works properly.
Each time i broke the original Archos busibox, so i lose the adb shell.
Can someone explain to me the good way to upgrade the busybox?
Thanks.
SirOch
Hi,
Nobody to explain a clean upgrade of the busybox?
cheers
SirOch said:
Hi,
Nobody to explain a clean upgrade of the busybox?
cheers
Click to expand...
Click to collapse
Google? also XDA has a great search feature have you tried that? :silly: Any particular reason why you want/need to upgrade busybox?
Hi,
As i said, i tried the different busybox installers and the installation was ok, but i each time, i lost the shell from adb.
That's just my problem.
So i just want to understand why the upgrade of the busybox broke the original archos busybox?
Moreover some application need to have other busybox installed.
Regards.
David
SirOch said:
Hi,
As i said, i tried the different busybox installers and the installation was ok, but i each time, i lost the shell from adb.
That's just my problem.
So i just want to understand why the upgrade of the busybox broke the original archos busybox?
Moreover some application need to have other busybox installed.
Regards.
David
Click to expand...
Click to collapse
Ahhh right, the quest for knowledge Your problem is as much to do with adb ( /sbin/adbd to be precise ) as it is to do with busybox, firstly you've probably wiped out the symlinks in /bin, especially /bin/sh which is the location that adbd on archos looks to run the when you do adb shell from your desktop. This is not the default location which just about every other android OEM adheares ,that is /system/bin/sh.
If you are going to upgrade the archos busybox be aware that a large number of symlinks back to /bin/busybox exist not only in /bin but also in /usr/bin /usr/sbin
Archos for reasons I still haven't fathomed, really went to town on restructuring and customized Android on the platform level.
A little tip if you've got more question, to save you bumping threads , which really does upset some folks round here... you'll probably get more more if you add more details, such as error messages etc. Saying " i lost the shell from adb." doesn't really help anyone who might be able to offer assistance. There about 10 different ways adb can fail to connect, Did the device disappear from the list or report as offline. or even come up with the message "- exec '/bin/sh' failed: No such file or directory (2) -".??
Hopefully that's helped.
Hi SirOrch,
i don't know why you loose your adb shell, but concerning busybox... the things on Archos tablets are like this:
Basically on a non rooted device we got a squashfs image mounted read only.
This image contains the stock busybox compiled by Archos (sharing system's uclibc) with limited functionality,
but containing enough tools to handle the daily job.
The path to this busybox is "hard-coded" as well. It's location is /bin which is the second entry in the path environment.
You might check that by typing printenv in your console.
The first entry should be /data/local/bin on your device.
So if you like to replace stock busybox with an advanced one, you should make sure that it will be installed to /data/local/bin.
Often there's no need to use all this apk Android Market stuff to get a proper busybox installation.
Sometimes it's little better to really understand what's happening under the hood.
Most busybox app's are statically linked, because with a static binary you don't have to take care of the device's libc or uclibc.
So you might easily extract on of the apk's or get one from xda-developers.
There are many floating around in the end.
If got one push it to /data/local/bin with adb.
You might need softlinks in this directory as well. This could be done by hand as well.
Anyway if you are a lazy person, who doesn't care about what's happening, go to the market install busybox.
Then check at /data/local/bin if it is there.
If it got installed elsewhere, some commands will still use stock busybox.
Extended commands might then use the installed one.
So check it out...
EDIT:
... aaaargh again simultaneous posting.
scholbert
Hi gentlemen,
Thanks for your help and sorry to forget to give you the error message i had:
the message was : - exec '/bin/sh' failed: No such file or directory (2) -
After investigation i found my mistake:
- In manual mode, i forget to change the ownership of busybox to root in /bin.
- when i tried to use any application from the market, the busybox was well updated in /system/xbin but the application also delete the busybox in /bin and don't change the symlinks in /bin. That's explain why adb shell won't work.
Regards.
SirOch

[Q] How to launch shell command from home screen?

Hello everybody,
I am looking for a simple way of starting a predefined shell command from the homescreen.
I assume that this is not a built-in feature of Android, but I am pretty sure that I'm not the only in need of that feature. I look forward to hearing about any app recommendations or other hints that could help me accomplish this.
If you're wondering what I need that for: I would like to be able (un)mount a partition on my sdcard, without having to start the terminal emulator manually and to enter the same commands over and over again.
I know about GScript:
http://forum.xda-developers.com/showthread.php?t=486486&page=21
However, it's still in alpha status and as far as I understand it, it brings its own shell and in general much more features than I need.
Thank you,
David

[Q] Mounting CIFS - Empty Directories

Hi all,
So I've spent hours trying to solve this, using everything I have found on the Internet.
Basically I have an android box that's running 4.4.2. I need to mount a NAS box onto the file system. I can do this no problem using Terminal as SU. As soon as I use another App to navigate to the location, the mounted location isn't visible. I know that it is a known bug/security restriction after 4.2, and is due to multiusers or something. People have suggested including the mount command into /system/bin/debuggerd because the start command is a system command that has higher privileges or something. Anyway, I've tried this by just removing the contents of debuggerd and typing the following:
#!/bin/sh
mount -o username=JOELB,password=password -t cifs //192.168.1.252/PUBLIC /data/media/0/NAS
However, this doesn't work on boot, or if i run 'start debuggerd'
Apparently /data/media/0 is the location I should be mounting to, due to the bug/security flaw. Apps like mount manager are useless because they only work for that app.
Can anyone help me on this... It's killing me!!
Many thanks
Joel

Categories

Resources