[APP] [2.3 and EXTSD 5/13/2011] Disable Media Scanning on Boot & Scan Media on Demand

Search This thread

aditya_t90

Senior Member
Jan 18, 2010
175
43
Bombay
www.adityatalpade.com
[APP] [2.3 and EXTSD 5/13/2011] Disable Media Scanning on Boot & Scan Media on Demand

[INTRO]
I noticed a large number of Android users wanted to STOP/DISABLE
the media scan at every boot, but still retain the ability to
Scan Media Files on demand.
My app allows just that.

[EXPLANATION]
The app works by killing/disabling/stopping the media scanner process at boot silently. This saves the total time till the phone is usable by about 20-30 seconds on some devices!

[REQUIREMENTS]
The new v2.3 app works on all android devices!! It even works with internal and external sd cards!

You need to have USB Debugging on. USB debugging,
WILL NOT AFFECT YOUR PHONE OR ANY OTHER APP IN ANY WAY AT ALL.

[QUESTIONS]

Does this app affect my ringtones/songs/apps?
This app cannot harm your phone at all and all your apps/ringtones/songs/* remain unaffected and everything can be undone. There are some rare ROMs that seem to have some issues with the app like ringtones not showing up.
You can fix this by going to Step X in the issues sub-section of this post.


So many versions which one to use for my device?
Everyone can use Rescan Media 2.3.apk
The older versions are there just in case someone needs them.



Why the new interface in v2.2??
People did not like an app that looked messy but functioned well.
The interface is now completely overhauled.


How will I scan for new items if I have disabled the scanner from your app?
When you add new media and the system does not show a change, you can open my app and the scan will take place automatically.


I'm stuck and this is the first time I have opened the app ever.
If for the first time you open my app and the app hangs at any stage, you have to type the following commands either in a terminal or in a adb shell only ONCE EVER. The commands are available to copy/paste in the app itself if you don't want to type/misspell such a complicated command.

Code:
su

pm enable com.android.providers.media/com.android.providers.media.MediaScannerReceiver


Why do you need ROOT?
If you are afraid and ask why I need ROOT permission...

Android does not allow the user to start and stop mission critical services(or at least i believe so from my experimentation). Only ROOT is given such privileges.

My app does only the following two lines of shell code.
Try it if you want to in a terminal emulator or a adb shell, if your are skeptical :D.
Code:
su

pm disable com.android.providers.media/com.android.providers.media.MediaScannerReceiver

pm enable com.android.providers.media/com.android.providers.media.MediaScannerReceiver


How long should everything take?
The entire process should complete before you can count to 20 Mississippi.


Can i get the app on the market?
Yes you can.
Just search for "Aditya" without the quotes in the Android market. there are two versions. One for Rooted devices and one for Non Rooted devices.

What happens if I uninstall the app after I'm done with it? a.k.a. Step X
If you are done with my app and want to uninstall it or you are facing any issues want to get the phone back to normal, execute the following commands in a terminal emulator or adb shell

Code:
su

pm enable com.android.providers.media/com.android.providers.media.MediaScannerReceiver


Can I use the Non Rooted app in conjunction with the Rooted app?
Simply put No.
Once the media scanner is killed/stopped/disabled by the ROOT app, the non ROOT app will not be able to do anything.


Where can I find you?
If you have any more questions/suggestions/complaints/issues please don't hesitate to contact me here, or at my website or on my facebook. Search for "Aditya Talpade" on google and press I'm feeling lucky.


Humble Donation Request
I do not earn anything from the Android Market and create apps for the enrichment of the community and for the love of it.
If you enjoyed using this amazing app or any of my apps, please consider making a small donation here.




*******************************************************************************************************
Update 5/13/2011
My app works 100% with the external as well as the internal card now!!!
Get the latest 2.3 version form the market!
Everyone can now use the 2.3 version!


Android Market Link

QR CODE
chart
 

Attachments

  • MediaScannerTogglerROOT1.4.apk
    23.4 KB · Views: 1,700
  • MediaScannerTogglerROOT1.5.apk
    23.4 KB · Views: 416
  • MediaScannerTogglerROOT1.8.apk
    23.3 KB · Views: 14,051
Last edited:

tristecire

Senior Member
Jul 18, 2010
76
1
better than Switchpro

I used switchpro widget "reload sdcard", it was the only way to see new imported pictures in gallery, or new music, etc. ( web saved or home filezilla ftp ) but i had the media scanning on start. long and boring process

With your app, and startup manager disabling media scanning, the widget didn't reload new pictures efficiently. Your app did it.

So, a big thanks. Now, it's "on demand". Very good work.
 

aditya_t90

Senior Member
Jan 18, 2010
175
43
Bombay
www.adityatalpade.com
For now you will have to keep usb debugging on our else it won't work.
Nothing ever bad will come of leaving it on.

I suppose most of those that have rooted will have left usb debugging on.

I put usb debugging on all the time coz I need to debug my apps all the time. Also incase my phone goes black or any odd issue arises, I can always use adb.
It's one of the first things I do after flashing roms.
I will sleep on this and try to get a solution soon.

I have noticed that it is not just my app but even all the terminal emulators that fail to enter that pm command even after giving it root permission, if usb debugging is off. o_O

Sent from my GT-I9000 using XDA App
 

mystifiyer

Senior Member
Jun 26, 2010
272
23
For now you will have to keep usb debugging on our else it won't work.
Nothing ever bad will come of leaving it on.

I suppose most of those that have rooted will have left usb debugging on.

I put usb debugging on all the time coz I need to debug my apps all the time. Also incase my phone goes black or any odd issue arises, I can always use adb.
It's one of the first things I do after flashing roms.
I will sleep on this and try to get a solution soon.

I have noticed that it is not just my app but even all the terminal emulators that fail to enter that pm command even after giving it root permission, if usb debugging is off. o_O

Sent from my GT-I9000 using XDA App

No wonder it wasn't working when I went to work in the morning. Haha. So it was USB debugging issue.

That be abit of a headache since I mount my SD cards to transfer files and use wired tethering. Hopefully the reliance on USB debugging can be resolved someday :)
 

sturmeh

Senior Member
Sep 5, 2009
481
11
Sydney
No wonder it wasn't working when I went to work in the morning. Haha. So it was USB debugging issue.

That be abit of a headache since I mount my SD cards to transfer files and use wired tethering. Hopefully the reliance on USB debugging can be resolved someday :)

USB Debugging does not prevent you from doing any such things.

The only reason you would want it off is because there is a warning whenever you have it on.
 
  • Like
Reactions: alvazettu

mystifiyer

Senior Member
Jun 26, 2010
272
23
USB Debugging does not prevent you from doing any such things.

The only reason you would want it off is because there is a warning whenever you have it on.

I can offer no other explanation other than that by enabling USB Debugging, the app works.

I try entering the command in terminal but it didnt work. It works (or so I thought) is because when I entered the command, USB Debugging was enabled because I was using adb shell to execute. Seemingly it didnt work today because I was travelling around with USB Debugging off.

Strange but true. USB Debugging works.
 

aditya_t90

Senior Member
Jan 18, 2010
175
43
Bombay
www.adityatalpade.com
searching in the market, all i see is Rescan Media, and not Rescan Media ROOT....

I see your operator is AT&T. I'm taking a guess here and saying that they must be filtering apps.

No problem. I have attached the apk here in the first post.
Download it and be enjoy.

I have made some progress in the USB debugging issue but it looks bleak.
I will update this thread the instant I solve it.
 

uneek-n1

Senior Member
Aug 4, 2010
90
7
Did all what you said and now all my apps are getting FC errors so much so that am unable to use the phone. I guess will have to reflash the firmware. This is very irritating.
 

aditya_t90

Senior Member
Jan 18, 2010
175
43
Bombay
www.adityatalpade.com
You must be jokingor your phone must be messed before my app.

My app has no connection whatsoever to the file system hence it is impossible to cause fc's on the phone.
If you can mount your sd card for reading and writing on a desktop this app will run fine.

If you can't mount your sd card for reading and writing on a desktop then you have some problem with your device and should have it checked out.

Don't call an app a waste of time before you check that your device has an issue when everyone here says it works fine.

Sent from my GT-I9000 using XDA App
 

uneek-n1

Senior Member
Aug 4, 2010
90
7
Aditya

My device was working perfectly and after i installed this it started to FC all over the place...each and every app FC'd

After that i reflashed and all is well now. So no problem with the phone.

My phone was rooted and had a lag fix running. Check your app with a lag fix.

I did waste a whole lot of time resetting and re configuring my phone.
 

aditya_t90

Senior Member
Jan 18, 2010
175
43
Bombay
www.adityatalpade.com
Aditya

My device was working perfectly and after i installed this it started to FC all over the place...each and every app FC'd

After that i reflashed and all is well now. So no problem with the phone.

My phone was rooted and had a lag fix running. Check your app with a lag fix.

I did waste a whole lot of time resetting and re configuring my phone.

I checked my app using the ext2 lagfix as well as the external sd ext3/ext4 lagfix.
It works perfectly with both.:)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 35
    [APP] [2.3 and EXTSD 5/13/2011] Disable Media Scanning on Boot & Scan Media on Demand

    [INTRO]
    I noticed a large number of Android users wanted to STOP/DISABLE
    the media scan at every boot, but still retain the ability to
    Scan Media Files on demand.
    My app allows just that.

    [EXPLANATION]
    The app works by killing/disabling/stopping the media scanner process at boot silently. This saves the total time till the phone is usable by about 20-30 seconds on some devices!

    [REQUIREMENTS]
    The new v2.3 app works on all android devices!! It even works with internal and external sd cards!

    You need to have USB Debugging on. USB debugging,
    WILL NOT AFFECT YOUR PHONE OR ANY OTHER APP IN ANY WAY AT ALL.

    [QUESTIONS]

    Does this app affect my ringtones/songs/apps?
    This app cannot harm your phone at all and all your apps/ringtones/songs/* remain unaffected and everything can be undone. There are some rare ROMs that seem to have some issues with the app like ringtones not showing up.
    You can fix this by going to Step X in the issues sub-section of this post.


    So many versions which one to use for my device?
    Everyone can use Rescan Media 2.3.apk
    The older versions are there just in case someone needs them.



    Why the new interface in v2.2??
    People did not like an app that looked messy but functioned well.
    The interface is now completely overhauled.


    How will I scan for new items if I have disabled the scanner from your app?
    When you add new media and the system does not show a change, you can open my app and the scan will take place automatically.


    I'm stuck and this is the first time I have opened the app ever.
    If for the first time you open my app and the app hangs at any stage, you have to type the following commands either in a terminal or in a adb shell only ONCE EVER. The commands are available to copy/paste in the app itself if you don't want to type/misspell such a complicated command.

    Code:
    su
    
    pm enable com.android.providers.media/com.android.providers.media.MediaScannerReceiver


    Why do you need ROOT?
    If you are afraid and ask why I need ROOT permission...

    Android does not allow the user to start and stop mission critical services(or at least i believe so from my experimentation). Only ROOT is given such privileges.

    My app does only the following two lines of shell code.
    Try it if you want to in a terminal emulator or a adb shell, if your are skeptical :D.
    Code:
    su
    
    pm disable com.android.providers.media/com.android.providers.media.MediaScannerReceiver
    
    pm enable com.android.providers.media/com.android.providers.media.MediaScannerReceiver


    How long should everything take?
    The entire process should complete before you can count to 20 Mississippi.


    Can i get the app on the market?
    Yes you can.
    Just search for "Aditya" without the quotes in the Android market. there are two versions. One for Rooted devices and one for Non Rooted devices.

    What happens if I uninstall the app after I'm done with it? a.k.a. Step X
    If you are done with my app and want to uninstall it or you are facing any issues want to get the phone back to normal, execute the following commands in a terminal emulator or adb shell

    Code:
    su
    
    pm enable com.android.providers.media/com.android.providers.media.MediaScannerReceiver


    Can I use the Non Rooted app in conjunction with the Rooted app?
    Simply put No.
    Once the media scanner is killed/stopped/disabled by the ROOT app, the non ROOT app will not be able to do anything.


    Where can I find you?
    If you have any more questions/suggestions/complaints/issues please don't hesitate to contact me here, or at my website or on my facebook. Search for "Aditya Talpade" on google and press I'm feeling lucky.


    Humble Donation Request
    I do not earn anything from the Android Market and create apps for the enrichment of the community and for the love of it.
    If you enjoyed using this amazing app or any of my apps, please consider making a small donation here.




    *******************************************************************************************************
    Update 5/13/2011
    My app works 100% with the external as well as the internal card now!!!
    Get the latest 2.3 version form the market!
    Everyone can now use the 2.3 version!


    Android Market Link

    QR CODE
    chart
    2
    For now you will have to keep usb debugging on our else it won't work.
    Nothing ever bad will come of leaving it on.

    I suppose most of those that have rooted will have left usb debugging on.

    I put usb debugging on all the time coz I need to debug my apps all the time. Also incase my phone goes black or any odd issue arises, I can always use adb.
    It's one of the first things I do after flashing roms.
    I will sleep on this and try to get a solution soon.

    I have noticed that it is not just my app but even all the terminal emulators that fail to enter that pm command even after giving it root permission, if usb debugging is off. o_O

    Sent from my GT-I9000 using XDA App
    1
    No wonder it wasn't working when I went to work in the morning. Haha. So it was USB debugging issue.

    That be abit of a headache since I mount my SD cards to transfer files and use wired tethering. Hopefully the reliance on USB debugging can be resolved someday :)

    USB Debugging does not prevent you from doing any such things.

    The only reason you would want it off is because there is a warning whenever you have it on.
    1
    Suggestion!

    First I would like to thank aditya_t90 for this amazingly simple app that saves us boot time and for the source code --> commands that are executed.
    Now since I'm not a guy that would post meaningless posts here is my suggestion and a alternative fix if this will not get implemented or something.
    I think that there are some SGS users that would like both, a faster boot and also use the media scanner.
    Well now you can! :D (read below!)
    It would be cool if you could implement a setting with a user configurable delay in minutes when the enable command would be executed at phone boot. And at shutdown/reboot the disable command would be automatically executed. If you don't know how to automatically execute a command at phone shutdown/reboot, you could make a widget/app that when you start it would show you options like "shutdown/reboot/cancel".

    And now for MY FIX:
    With the help of aditya_t90's shell commands and Tasker(great app - must have!) & Locale Execute Plug-in I made these two profiles:
    1. Make a new profile; set Event --> System --> Boot; add Tasker --> Wait X minutes (I set it to 3 minutes); add Plugin --> Execute command:
    "@! pm enable com.android.providers.media/com.android.providers.media.MediaScannerReceiver"
    2. Make a new profile; set Event --> System --> Shutdown; add Plugin --> Execute command:
    "@! pm disable com.android.providers.media/com.android.providers.media.MediaScannerReceiver"
    Do not forget to "Test" both tasks so that they will get executed and you will get the SU grand permission dialog.
    Now you're all done (yes, I also love Tasker)! :D
    Hope this helps some people!

    aditya_t90 keep up the good work and I hope you will implement my suggestion.
    1
    Android " Mediascanner" AKA " Media Scanner " SUCKS!

    I can't believe how stupid this media scanner service is.

    What with flag files named .noimage and .nomedia turning functions off,
    when by default, the action (scanning) should be off.
    ie. media scanning should be an opt-in process, instead, we are forced
    to opt-out by dropping flag files into directories to keep it from
    doing it's thing..
    Developers writing apps that are utilizing media files from the storage,
    should be the ones that have to "opt-in" to creating their JPG and MP3
    and WMV folders as having a file in them, named .image or .media.
    Unfortunately it is bass-ackward in Android-Land, and we have the
    Media Scanner service finding album art, ebook covers, thumbnails,
    application icons, etc., and displaying then for viewing/listening. Weird.


    Also, what, don't Linux and FAT32 Windows files have
    attributes/flags built into them, that could have been used,
    to define weather or not a file was scanned (and thumbnailed)...
    ie. set the 'hidden' attribute on a .mp3 song when it has been scanned...

    Better yet, each directory, on each volume (includes SD cards) should
    have a small index file, that could be compared to a quick check of the
    folder's contents, to determine if any files have been added or removed,
    and THEN, re-scan that folder for 'media'.
    ie. .index file contains the total bytes stored in folder, Media Scanner
    then does a "DIR" or is it "LS" command on that folder, and compares the
    value with what was written to .index on the last scan, and if they are
    equal, then the folder hasn't changed, and is skipped... NEXT!


    Makes me sick, wondering as to why the programmers would
    waste our time and battery charge, rescanning all folders,
    fully, everytime the device is unplugged from a PC.

    No I haven't a cellphone, but a newer Archos 70 tablet. I plug it
    in and out of the USB daily, and mediascanner has me ticked off!


    :confused: