[MOD]Enable/Disable Media Scanning at boot - Galaxy S Plus I9001 Android Development

I've been browing the forums for some helpfull stuff and I found this little mod that allows you to turn Media Scanning on Boot on or off. The original topic by aditya_t90 can be found here
Requirements:
- USB Debugging: ON
- Root Access
Enter one of the following commands in terminal emulator, adb shell or in a script file
To enable media scanning on boot:
Code:
su
pm enable com.android.providers.media/com.android.providers.media.MediaScannerReceiver
To disable media scanning on boot:
Code:
su
pm disable com.android.providers.media/com.android.providers.media.MediaScannerReceiver
Screenshot:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}

it says in the link :
The new v2.3 app works on all android devices!! It even works with internal and external sd cards!
so isn't it easier to install the app, u might not be near a pc when u need to change it
edit: actually u can use a terminal emulator ..ahhh

Thanks!!
If you prefer automated batch files like I do, download attached
Code:
@echo off
adb -d shell pm disable com.android.providers.media/com.android.providers.media.MediaScannerReceiver
echo all ok?
pause
Code:
@echo off
adb -d shell pm enable com.android.providers.media/com.android.providers.media.MediaScannerReceiver
echo all ok?
pause
Regards,
Nika.

nikagl said:
Thanks!!
If you prefer automated batch files like I do, download attached
Code:
@echo off
adb -d shell pm disable com.android.providers.media/com.android.providers.media.MediaScannerReceiver
echo all ok?
pause
Code:
@echo off
adb -d shell pm enable com.android.providers.media/com.android.providers.media.MediaScannerReceiver
echo all ok?
pause
Regards,
Nika.
Click to expand...
Click to collapse
Nice addition and thnx for posting this in your topic

So, when scanning not active after boot...when does it scan the files? Sorry noob....
|BroodRom RC2 Beta
|Instanet Free Access (no one believe its free)

pyronia said:
So, when scanning not active after boot...when does it scan the files? Sorry noob....
|BroodRom RC2 Beta
|Instanet Free Access (no one believe its free)
Click to expand...
Click to collapse
After unplugging an USB cable

nikagl said:
Thanks!!
If you prefer automated batch files like I do, download attached
Code:
@echo off
adb -d shell pm disable com.android.providers.media/com.android.providers.media.MediaScannerReceiver
echo all ok?
pause
Code:
@echo off
adb -d shell pm enable com.android.providers.media/com.android.providers.media.MediaScannerReceiver
echo all ok?
pause
Regards,
Nika.
Click to expand...
Click to collapse
The zip attach flash it via recovery? How to undo it?
EDIT: i see 2 script in the zip, enable n disable...how to get it working???
|:BroodRom RC2 Beta
|:Instanet Free Access (no one believe its free)

broodplank1337 said:
After unplugging an USB cable
Click to expand...
Click to collapse
I mean, after it working, avery boot it will not scan media right? Do i have to plug-unplug usb to get it scan the media? Averytime? Coz i actually charge my phone when it off at night....
Actually, what is this tweak for? Please answer me, really noob bout this...
|:BroodRom RC2 Beta
|:Instanet Free Access (no one believe its free)

pyronia said:
The zip attach flash it via recovery? How to undo it?
EDIT: i see 2 script in the zip, enable n disable...how to get it working???
|:BroodRom RC2 Beta
|:Instanet Free Access (no one believe its free)
Click to expand...
Click to collapse
Sorry, those scripts can be executed from the DOS command line. I guess they can be created for CWM too, but I am not too familiar with those scripts you can try attached, no idea whether it works (I'm sure broodplank will correct me if I'm wrong)

nikagl said:
Sorry, those scripts can be executed from the DOS command line. I guess they can be created for CWM too, but I am not too familiar with those scripts you can try attached, no idea whether it works (I'm sure broodplank will correct me if I'm wrong)
Click to expand...
Click to collapse
What does the tweak for actually?
|Post from XDA premium app
|BroodRom RC2 Beta
|Instanet Free Access (no one believe its free)

pyronia said:
What does the tweak for actually?
|Post from XDA premium app
|BroodRom RC2 Beta
|Instanet Free Access (no one believe its free)
Click to expand...
Click to collapse
It enables or disables media scanning of your sdcards at boot (see in your top bar when the device starts)
---------- Post added at 10:19 AM ---------- Previous post was at 10:09 AM ----------
Check out this video:
http://www.youtube.com/watch?v=fNhJ1DxKolE
It's for another device, but does demonstrate what this does (at around 1 minute)

Can u ise terminal emulator for this???
|Post from XDA premium app
|BroodRom RC2 Beta
|Instanet Free Access (no one believe its free)

pyronia said:
Can u ise terminal emulator for this???
|Post from XDA premium app
|BroodRom RC2 Beta
|Instanet Free Access (no one believe its free)
Click to expand...
Click to collapse
Yes, see OP
broodplank1337 said:
Enter one of the following commands in terminal emulator, adb shell or in a script file
Click to expand...
Click to collapse
Better reading before asking doesn't hurt

Ok done try it, after disable my gallery was empty...have to enable it....
Hmm...if rom have this, do need to enable it averytime?
|Post from XDA premium app
|BroodRom RC2 Beta
|Instanet Free Access (no one believe its free)

brood, I need your help... again!
You know... I got this music-gallery /emmc bug (cannot find music, pictures with music apps/gallery apps)
I made a long research, found out that the media scanner doesn't scan on boot. maybe the reason for this bug...
if I try to scan manually, the media scanner just scan the internal sd card.
maybe there is some build.prop tweak that disables the media scanner on emmc.
any suggestions?
tried to set media scanner on boot with this code and terminal emulator... doesn't work at all....

Droid843 said:
brood, I need your help... again!
You know... I got this music-gallery /emmc bug (cannot find music, pictures with music apps/gallery apps)
I made a long research, found out that the media scanner doesn't scan on boot. maybe the reason for this bug...
if I try to scan manually, the media scanner just scan the internal sd card.
maybe there is some build.prop tweak that disables the media scanner on emmc.
any suggestions?
tried to set media scanner on boot with this code and terminal emulator... doesn't work at all....
Click to expand...
Click to collapse
hmmm...emmc? which ROM are you using? Old CM9 build?

DreamerTKM said:
hmmm...emmc? which ROM are you using? Old CM9 build?
Click to expand...
Click to collapse
Oh... I'm sorry... no I'm using my own rom... http://forum.xda-developers.com/showthread.php?t=1957492

Is it possible to place this script in init.d? Since the media are empty after every reboot, I want to enable it during boot and disable after scan.

Does this work on Kit kat? Speciffically 4.4.2?

I made a simple shell script to enable/disable media scanning. I am a noob, so please don't hate
Code:
#!/system/bin/sh
echo ""
echo "<Usage: mediascanner <onboot|offboot>"
echo ""
case "$1" in
'onboot')
echo "Media scanner will be started on boot"
pm enable com.android.providers.media/com.android.providers.media.MediaScannerReceiver
;;
'offboot')
echo "Media scanner will not be started on boot"
pm disable com.android.providers.media/com.android.providers.media.MediaScannerReceiver
;;
esac
A shell file is attached if you want to be lazy. Rename it to mediascanner.sh (or just mediascanner) then push it to /system/bin/ and chmod 655 it. When you want to run it, do: su > mediascanner onboot|offboot (choose one). Ex: # mediascanner offboot
Hope that helps!
 @Rehab4Life it does work on 4.4 KitKat

Related

[Q] Easy way to convert to Froyo A2SD??

Hey Everyone,
Is anyone else having major issues getting all their apps over to Froyo's Apps2SD? I cant restore my apps using Froyo-compatible apps like Titanium Backup, I cant download them from the market because if fails during the install. Only way ive found that works (but is manual and tedious) is to install to internal, and then "Move to SD" for each app.
Till Apps2EXT gets officially implemented in CM6, does anyone know of a better method of converting to the Froyo Apps2SD. I have BART backups and all the apks, but nothing seems to work for batch install.
I am using the updated gapps that was posted for the market fix, btw
Thanks!
zimphishmonger said:
Hey Everyone,
Is anyone else having major issues getting all their apps over to Froyo's Apps2SD? I cant restore my apps using Froyo-compatible apps like Titanium Backup, I cant download them from the market because if fails during the install. Only way ive found that works (but is manual and tedious) is to install to internal, and then "Move to SD" for each app.
Till Apps2EXT gets officially implemented in CM6, does anyone know of a better method of converting to the Froyo Apps2SD. I have BART backups and all the apks, but nothing seems to work for batch install.
I am using the updated gapps that was posted for the market fix, btw
Thanks!
Click to expand...
Click to collapse
This is the part where I post a sarcastic pic and tell you to GTFO.
But I too am having the same problem. I tried to use ADB and DroidExplorer to batch install my backed up apps but they both failed.
I really want to use CM6 on a daily basis but I can't without my favorites apps.
There's a thread you might have missed where firerat has an implementation... for now.
Go check it out and I think you might be happier...
Sent from my HTC Dream using XDA App
philosophics said:
There's a thread you might have missed where firerat has an implementation... for now.
Go check it out and I think you might be happier...
Sent from my HTC Dream using XDA App
Click to expand...
Click to collapse
I saw that he put together a quick script for it, but I also heard that it slows things down. Might give it a shot anyways, though.
If anyone else has a good method of converting over to Froyo A2SD, def leave word here
apps
Z҉A҉L҉G҉O̚̕̚ said:
This is the part where I post a sarcastic pic and tell you to GTFO.
But I too am having the same problem. I tried to use ADB and DroidExplorer to batch install my backed up apps but they both failed.
I really want to use CM6 on a daily basis but I can't without my favorites apps.
Click to expand...
Click to collapse
same here i got over 300 apps and even though i dont use all of em i cant commit to cm6 without em. yes im an app addict.
found the apps2sd for cm6 aka froyo:
install firerats recovery 1.3 patch, install cm6,install gapps1-2.zip, install firerats boot 1.2,reboot,...
for apps2sd:
just re-install the apps one by one. theres no other fix as of now. nahh jus kiddin i found this **** earlier for you who missed it: http://forum.xda-developers.com/showthread.php?t=722861
B6gSix said:
found the apps2sd for cm6 aka froyo:
install firerats recovery 1.3 patch, install cm6,install gapps1-2.zip, install firerats boot 1.2,reboot,...
for apps2sd:
just re-install the apps one by one. theres no other fix as of now. nahh jus kiddin i found this **** earlier for you who missed it: http://forum.xda-developers.com/showthread.php?t=722861
Click to expand...
Click to collapse
That slowed down my phone.
B6gSix said:
found the apps2sd for cm6 aka froyo:
install firerats recovery 1.3 patch, install cm6,install gapps1-2.zip, install firerats boot 1.2,reboot,...
for apps2sd:
just re-install the apps one by one. theres no other fix as of now. nahh jus kiddin i found this **** earlier for you who missed it: http://forum.xda-developers.com/showthread.php?t=722861
Click to expand...
Click to collapse
The second file always gives an error, and Im currently using Firerat's patch to enable app2sd, although its a lil slow. I am looking for a method to batch install apps to froyo a2sd (on FAT)
zimphishmonger said:
The second file always gives an error, and Im currently using Firerat's patch to enable app2sd, although its a lil slow. I am looking for a method to batch install apps to froyo a2sd (on FAT)
Click to expand...
Click to collapse
Batch install on internal worked fine (titanium 2.9.7.6, 150 apps), it's better than nothing.I use FR data patch (85 instead of 55MB free space).
robuser007 said:
Batch install on internal worked fine (titanium 2.9.7.6, 150 apps), it's better than nothing.I use FR data patch (85 instead of 55MB free space).
Click to expand...
Click to collapse
Ya, I found that internal worked okay as well w/ Titanium backup. I just have to manually move all of them to the SD card :-|
I havent had any luck installing directly to the SD card, it gives an error each time, both when installing APKs within Android and using ADB
EDIT: Seems the only method working for me is to restore to internal, and "move to sd" (you need to enable it in CM settings)
zimphishmonger said:
Ya, I found that internal worked okay as well w/ Titanium backup. I just have to manually move all of them to the SD card :-|
I havent had any luck installing directly to the SD card, it gives an error each time, both when installing APKs within Android and using ADB
EDIT: Seems the only method working for me is to restore to internal, and "move to sd" (you need to enable it in CM settings)
Click to expand...
Click to collapse
this would move everything in /data/app to the FroYo sd
Code:
#!/system/bin/sh
#
# move all apps from /data/app/ to /sdcard/.android_secure ( FroYo apps2ext )
pm setInstallLocation 2
for apk in `ls /data/app/*apk`;do
cp $apk /dev/temp.apk
echo "uninstalling $apk"
pm uninstall -k `awk -F \" '/'\`basename $apk\`'/ { print $2 }' /data/system/packages.xml`
echo "reinstalling $apk"
pm install /dev/temp.apk
done
rm /dev/temp.apk
takes a while..
and it will move everything !!
change
for apk in `ls /data/app/*apk`;do
to
for apk in `ls /data/app/*apk|egrep -v "app1|app2|app3"`;do
where app1,2 and 3 are the ones you wish to keep on internal
BRILLIANT!
Firerat said:
this would move everything in /data/app to the FroYo sd
Code:
#!/system/bin/sh
#
# move all apps from /data/app/ to /sdcard/.android_secure ( FroYo apps2ext )
pm setInstallLocation 2
for apk in `ls /data/app/*apk`;do
cp $apk /dev/temp.apk
echo "uninstalling $apk"
pm uninstall -k `awk -F \" '/'\`basename $apk\`'/ { print $2 }' /data/system/packages.xml`
echo "reinstalling $apk"
pm install /dev/temp.apk
done
rm /dev/temp.apk
takes a while..
and it will move everything !!
change
for apk in `ls /data/app/*apk`;do
to
for apk in `ls /data/app/*apk|egrep -v "app1|app2|app3"`;do
where app1,2 and 3 are the ones you wish to keep on internal
Click to expand...
Click to collapse
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Firerat said:
this would move everything in /data/app to the FroYo sd
Code:
#!/system/bin/sh
#
# move all apps from /data/app/ to /sdcard/.android_secure ( FroYo apps2ext )
pm setInstallLocation 2
for apk in `ls /data/app/*apk`;do
cp $apk /dev/temp.apk
echo "uninstalling $apk"
pm uninstall -k `awk -F \" '/'\`basename $apk\`'/ { print $2 }' /data/system/packages.xml`
echo "reinstalling $apk"
pm install /dev/temp.apk
done
rm /dev/temp.apk
takes a while..
and it will move everything !!
change
for apk in `ls /data/app/*apk`;do
to
for apk in `ls /data/app/*apk|egrep -v "app1|app2|app3"`;do
where app1,2 and 3 are the ones you wish to keep on internal
Click to expand...
Click to collapse
Thanks FR!
terminal
Firerat said:
this would move everything in /data/app to the FroYo sd
Code:
#!/system/bin/sh
#
# move all apps from /data/app/ to /sdcard/.android_secure ( FroYo apps2ext )
pm setInstallLocation 2
for apk in `ls /data/app/*apk`;do
cp $apk /dev/temp.apk
echo "uninstalling $apk"
pm uninstall -k `awk -F \" '/'\`basename $apk\`'/ { print $2 }' /data/system/packages.xml`
echo "reinstalling $apk"
pm install /dev/temp.apk
done
rm /dev/temp.apk
takes a while..
and it will move everything !!
change
for apk in `ls /data/app/*apk`;do
to
for apk in `ls /data/app/*apk|egrep -v "app1|app2|app3"`;do
where app1,2 and 3 are the ones you wish to keep on internal
Click to expand...
Click to collapse
just to be clear i run this in terminal or adb correct? and do this AFTER i installed apps or before?
smuvman said:
just to be clear i run this in terminal or adb correct? and do this AFTER i installed apps or before?
Click to expand...
Click to collapse
after
it does take quite a long time,
but I guess its quicker/easier than going through the manage application settings bit.
smuvman said:
just to be clear i run this in terminal or adb correct? and do this AFTER i installed apps or before?
Click to expand...
Click to collapse
Now that I think about it. How DO we suppose to install the script? Is it an a2sd or userint.sh script, or an ADB/Terminal command?
Z҉A҉L҉G҉O̚̕̚ said:
Now that I think about it. How DO we suppose to install the script? Is it an a2sd or userint.sh script, or an ADB/Terminal command?
Click to expand...
Click to collapse
you can just
adb shell
then copy and paste that code block
or , save as text, put on sdcard
Code:
su
dos2unix /sdcard/thesrcipt.txt
sh /sdcard/thesrcipt.txt
Firerat said:
you can just
adb shell
then copy and paste that code block
or , save as text, put on sdcard
Code:
su
dos2unix /sdcard/thesrcipt.txt
sh /sdcard/thesrcipt.txt
Click to expand...
Click to collapse
Thank you. You brilliant, brilliant man .
YESS!
Z҉A҉L҉G҉O̚̕̚ said:
Now that I think about it. How DO we suppose to install the script? Is it an a2sd or userint.sh script, or an ADB/Terminal command?
Click to expand...
Click to collapse
and here i was wondering if you were gonna post some pic for me asking that. haha thanx alot firerat this was the one thing stopping me from using cm6 daily. last qeustion though, i have over 300 apps (i know useless) so just say i install half and i see mem space goes down then i use this code can i reboot then install the rest and use the code again?
method works
i tried it on a few apps just to test and it works. only prob is i get :failure container error on some apps. i think it may be because they are not froyo ready. have to leave but will post logcat when i get back. thanx again firerat

[2.1. Theme]Transparent status bar theme, now with AOSP theme(V0.6)

The Transparent status bar will only show up if you use ADW launcher, for some reason Launcher Pro doesn't show it as transparent (but the theme does still work, and I am still not sure why)
I have modified the status bar and the background, but currently using the standard icons, and I haven't yet figured out how to change the network provider text and date text colours to change the full theme (will research this tomorrow)
Will be changing the icons fairly soon
Still, here is the very first, mod from me for the new custom ROM or the X10
The status bar for AOSP is using a gradient, I like it, but let me know if you think a solid transparent colour would be better...
(You can see it best from the last screen shot in the market)
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
To install, you will need a rooted X10:
For Custom ROM (AKA AOSP) :download the transparentAOSP.7z and unzip.
For SE Standard: download transparent.7z and unzip
From the unzipped location, run the transparent setup.cmd file and choose the options you want.
Please be sure to select the correct theme for the version of 2.1 you are running. If you flash the wrong one, you will need to reflash with SEUS or update manager.
I would also advise you take a full backup with titanium, just in case
Release:
V0.1 Initial Release, black transparent mods to framework-res.apk
V0.2 Black mods to Conversations.apk, updated installer
V0.3 Red mods made to framework-res.apk and conversations.apk, updated installer to include black and red selection
V0.4 Blue and Green now added
V0.5 'Blank' theme added
V0.6 AOSP theme added
do i need to root my phone in order to perform this installation??
Looks good going to try when I get home i'll post how it looks on my mini pro
Sent from my U20i using XDA App
nfizree said:
do i need to root my phone in order to perform this installation??
Click to expand...
Click to collapse
Yes, you will.
I've used the super one click rooting method, as it is the best I have found so far, but if you root through another method makesure you install busybox and super user.
I have used Chewitt's installer from his theme, and modified it for my theme
Nice man
Added a link in the themes reference.
You might want to change 'Opaque' to 'Transparent' though
_calum_ said:
Nice man
Added a link in the themes reference.
You might want to change 'Opaque' to 'Transparent' though
Click to expand...
Click to collapse
Yea, that's probably wise... I started with an opaque idea, that changed to transparent, but the names didn't
No idea why I stuck with it here though
hurmm...i put my phone on debug mode n my phone is rooted and now it said mount: operation not permitted
cannot open for write: permission denied
nfizree said:
hurmm...i put my phone on debug mode n my phone is rooted and now it said mount: operation not permitted
cannot open for write: permission denied
Click to expand...
Click to collapse
OK, from a windows command line, with the phone in debug mode, try the following:
adb shell <press enter>
su <press enter - assuming you have super user on your phone, you will get a request for super user permissions, click allow>
mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system <press enter>
chmod 4755 /system/bin/sh <press enter>
exit <press enter>
exit <press enter>
Then try again...
sorry...but where can i found the windows command line?
nfizree said:
sorry...but where can i found the windows command line?
Click to expand...
Click to collapse
you will need to do this from a computer, rather than straight from your phone and for this I'm assuming you are using windows on your PC (I don't know the specifics for linux or mac OSX)
but, go to start and run, type 'cmd' and press enter. Then you will get the command line, then type as posted in the last post from me, then, finally, try to run the cmd file in the zip you downloaded from the first post.
again...
ok i run cmd n this come out after i typed adb shell ''adb is not recognized as an internal or external command, operable program or batch file.''
nfizree said:
ok i run cmd n this come out after i typed adb shell ''adb is not recognized as an internal or external command, operable program or batch file.''
Click to expand...
Click to collapse
OK, do you have the Android SDK installed?
If you have, then you will need to change directory in the command window to the SDK path - e.g. should you install SDK in C:\Android-SDK_windows then type cd Android-SDK_windows
Then run the adb shell command from there.
If you need the SDK, download from here:
http://developer.android.com/sdk/index.html
There are also a few ADB guides around on the XDA forums that will have more details step-by-step guides and should help with trouble shooting
(for example, this post: http://forum.xda-developers.com/showthread.php?t=821022)
yup i have sdk n now ''chmod 4755 /system/bin/sh <press enter>'' not permitted
*stucked again >.<
nfizree said:
yup i have sdk n now ''chmod 4755 /system/bin/sh <press enter>'' not permitted
*stucked again >.<
Click to expand...
Click to collapse
but the first line worked (so you are in adb shell and have been presented with the message on your phone asking to give unknown super user permissions)
Try taking a look at this guide (should help you through the whole process)
http://forum.xda-developers.com/showthread.php?t=835004&highlight=adb
thanks man for the help i really appreciate it
Thanks to u now i have a perfect xperia
Link seems not to work..It says "file is temporarily anavailable".
Mate its a good theme, can you post another link?
xenkato said:
Link seems not to work..It says "file is temporarily anavailable".
Mate its a good theme, can you post another link?
Click to expand...
Click to collapse
Don't worry, about to put up a change in about 10 minutes...
Gonna put the attachment on here, rather than on multi upload, seen a lot of unavailable files recently...
Thanks mate gonna try it soon keep good job on..
helping
another download link: http://dl.dropbox.com/u/9809641/Opaque.zip
thefunkaygibbon said:
OK, from a windows command line, with the phone in debug mode, try the following:
adb shell <press enter>
su <press enter - assuming you have super user on your phone, you will get a request for super user permissions, click allow>
mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system <press enter>
chmod 4755 /system/bin/sh <press enter>
exit <press enter>
exit <press enter>
Then try again...
Click to expand...
Click to collapse
I did what you asked to do. Still getting same error. Permission denied. Cannot open for read: No such file or directory.
Any ideas?

[SCRIPT][6/19/2011] Inspirefy 1.1 for CM7 nightly - Delete stuff & Replace stuff

Hello, I wrote this shell script to make the CM7 nightly the way I like. It was a pain to do it manually every time I would flash a new nightly.
NOOB WARNING:
THIS SCRIPT IS FOR CM7 NIGHTLY ONLY. IT MAY WORK FOR OTHER CM7 BASED ROM BUT USE IT AT YOUR OWN RISK. IT DELETE SOME FILES ON THE /SYSTEM/APP AND MODIFY YOUR BUILD.PROP FILE. I'M NOT RESPONSIBLE IF YOU DESTROY YOUR PHONE NOR IF YOUR PET DIES AND THINGS LIKE THAT.​​
This script do this:
1) delete some APKs from /system/app that I don't need
/system/app/Camera.apk - replaced by Miui camera
/system/app/Calculator.apk - I use RealCalc
/system/app/FileManager.apk - I use Root Explorer
/system/app/Music.apk - I use the new Music App
/system/app/BooksPhone.apk - I don't use this
/system/app/Protips.apk - Useless
Click to expand...
Click to collapse
2) replace the boot animation with a sharper and bigger version (file size is bigger too)
The original boot animation size is too small for our screen. Some people could car less for this as you don't reboot your phone that often.
Original boot image:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
New boot image:
Click to expand...
Click to collapse
3) replace the default camera for a Miui camera
We all know the AOSP camera sucks...
Click to expand...
Click to collapse
4) backup and edit build.prop to display "Inspire 4G" as device name
Some people asked how it affect the market and so far so good for me.
I have no idea if automatic backup/restore from Google is working or not. I use Titanium Backup to restore my apps before I login with my Google account.
Click to expand...
Click to collapse
Things you will need:
1) Scripting Layer for Android (SL4A)
Free app. We will use this to run the script.
Click to expand...
Click to collapse
2) Script and other files - RAR version inspirefy_files_v1.1.rar or ZIP version: inspirefy_files_v1.1.zip
All the files needed for the magic to happen...
VERSION 1.1 UPDATE: If you already have the version 1.0 on your phone you can download the attached zip file from this post to update the script to version 1.1 - Just extract the zip file to /sdcard/inspirefy/ and replace the old 'inspirefy.sh' script.
Click to expand...
Click to collapse
How to install & use it:
1) Extract the inspirefy_files.rar (or inspirefy_files.zip) to the root of your sdcard (/sdcard).
You will have 2 new folders (or just 1 new folder is SL4A was already installed): /sdcard/inspirefy and /sdcard/sl4a
2) Install the sl4a on your phone and run it.
2a) Select "run-inspirefy.sh" from the main screen. If it's your first time running the script you must confirm the super user request.
3) After the script is done (about 2s) you can close SL4A and reboot your phone.
Done
You can edit the file /sdcard/inspirefy/inspirefy.sh with your preferred text editor to make any changes you would like, maybe you want to keep the Tips widget
Have fun!
Thanks to dog77k for the feedback and suggestions and everybody who is using this script.
Good stuff LGSilva. Will let you know how things go after I find a free method to extract the rar (don't use root explorer) or when I get to my desk...
Very cool and glad to see this. Nice job
Sent from my Desire HD using XDA Premium App
Just added a ZIP version for the necessary files in case you want to do this on your phone.
forgive me, but I've never ran a script on android before. I loaded up the folders on the root of my sdcard, installed SL4A and ran it. Superuser didn't ask for permissions. Also, I can't figure out how to run what I need to. Help?
poetofsound said:
forgive me, but I've never ran a script on android before. I loaded up the folders on the root of my sdcard, installed SL4A and ran it. Superuser didn't ask for permissions. Also, I can't figure out how to run what I need to. Help?
Click to expand...
Click to collapse
When you ran the script did you get the terminal window output with something like this?
Code:
Inspirefy 1.0 by LGSilva
Remounting system partition rw...
Deleting apk files and boot animation...
Copying new boot animation and camera...
Setting permitions and ownership...
Backuping build.prop and changing device name...
Remounting system partition as ro...
DONE
.
The text is tiny but you can read it. Is there any error message on the terminal window?
Check the superuser app, sometimes it will have the SL4A marked to deny root...
Edit: Just testing on build 103... looks like SL4A is not happy with this build, time to investigate.
LGSilva said:
Edit: Just testing on build 103... looks like SL4A is not happy with this build, time to investigate.
Click to expand...
Click to collapse
They (nightly forum) are saying that the SU app is jacked on 103...
Nightly build #103 have a problem with Superuser not working right therefor my script won't work either.
To fix this download the Superuser from Rom Manager > Extras, reboot in recovery and install it.
dog77k said:
They (nightly forum) are saying that the SU app is jacked on 103...
Click to expand...
Click to collapse
Yep, you beat me to that, I blame the internet
Two suggestions/hints for the inspirefy.sh code:
"chown root.root /sys..." gave me an unknown user/group error, but "chown 0.0 /sys..." worked for me.
I was getting an error when trying to remount /system as ro that it was still busy so I added a 2 sec pause before trying to remount:
Code:
echo -e "Remounting system partition as ro...\n"
sleep 2
mount -o ro,remount -t ext4 /dev/block/mmcblk0p25 /system
echo -e "DONE.\n"
Otherwise the code worked well for me. Great work LGSilva.
I was having problems with SU thats why lol I'll fix it and try this again and update when I'm done
dog77k said:
Two suggestions/hints for the inspirefy.sh code:
"chown root.root /sys..." gave me an unknown user/group error, but "chown 0.0 /sys..." worked for me.
I was getting an error when trying to remount /system as ro that it was still busy so I added a 2 sec pause before trying to remount:
Code:
echo -e "Remounting system partition as ro...\n"
sleep 2
mount -o ro,remount -t ext4 /dev/block/mmcblk0p25 /system
echo -e "DONE.\n"
Otherwise the code worked well for me. Great work LGSilva.
Click to expand...
Click to collapse
Thank you dog77k for the suggestions.
I've updated the script with them and also added a 2sec pause after mounting it as RW just in case...
Files with version 1.1 updated on the first post, no need to reinstall SL4A.
tested and seemed to run just fine on build 104. thanks for the awesome script! very cool
Thank you!
+1 to both of you, thanks for the great scripting solution.

[MOD]viperMOD Bloat Manager v3.1.4 for HTC Sensation | Updated 8.7.11 |

Welcome everyone to viperMOD Bloat Manager, a wonderful little script that manages bloatware right on your device! No more generic scripts uninstalling whatever they want, choose from different presets or choose any app installed on your phone to enable/disable!
Here is what the script looks like...
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I like the colors over the standard blue/white
Updated 8/7
Fixed "permission denied" error on flashable .zip by settings perms in updater-script
Updated 8/6
Fixed coding for /system mount
Edited .bat file to mount system R/W before pushing files from PC
Updated 8/1
Updated for perm root (no more /system not mounted issues)
Removed overclock feature - since there are custom kernels now, no need to insmod.
Still a .bat file. If there is a demand for an update.zip, please post.
Updated 7/19
Fixed Advanced menu for HTC Sensation users
Updated 7/18
Enhanced Overclock feature
--- Added Telstra OC driver (experimental, please test)
--- Auto backup OC settings and prompt to reapply if file detected
Disable custom apps and enable custom apps allows manipulation of individual packages within presets
Minor scripting changes
Updated 7/16
Customizable overclock mod right from your phone! (Advanced menu)
Better support for the HTC Sensation
--- Disable\Enable T-Mobile Apps
--- Remove Sprint references on HTC Sensation
Enable custom apps will show packages and apps by presets and allow you to enable things 1 at a time.
Updated 7/14
Totally reworked with many enhancements and fixes!
Better /system detection
More intuitive UI and easier to use from the phone
5 categories of preset bloat disable\enable
--- *Sprint apps, *HTC apps, *other apps, *Rosie, HTC Widgets, and Live Wallpapers, and *Lockscreen
Moved custom options into "Advanced"
Moved backup/restore into "Advanced"
Added option to enable all custom bloat at one time
Warnings when disabling apps (depending on the menu)
Added count for disabled apps
Descriptions of what will be disabled\enabled before doing so
Added pause until enter button between menus (script was too fast )
Added better detection and action when entering an invalid option in all menus
Updated 7/13 @ 2PM
HTC Sensation support!
Allowed script to continue without R/W /system access with warning
Currently disabled bloat list is now sorted alphabetically and without "package:" in front of it
About info updated
Requirements:
Terminal Emulator (recommend setting to 12pt font)
Root Access (I like this one, personally)
Common Sense - please don't disable everything and wonder why things aren't working.
Features
Disable\Enable bloatware
Disable\Enable HTC Sense and HTC Widgets
Disable\Enable Experimental Apps
See what apps are still enabled or disabled
Ability to disable\enable ANY installed app on your phone!
Ability to backup your settings
Ability to restore your settings
Directions and Information
Apps will STILL BE DISABLED when you reboot - rooted or not!
Just download the .zip, extract, and run the viperMOD_Bloat_Manager_v3.1.1.bat file from your computer.
To run this, go into Terminal and type "su" (without quotes) then "viperbloat" (without quotes) and it will run. You can also set Terminal Emulator to run this right when you run the app by going to Menu > Preferences > Initial Command > Press "Enter" > type "su" (all lowercase, no quotes) > press Enter > type "viperbloat" (all lowercase, no quotes)
You can also run this through ADB on your computer by doing adb shell then ""viperbloat" (all lowercase, no quotes). Much easier to read the app list!
You can MAJORLY screw up your phone by using this! Be mindful of what you're playing with and if you really mess things up, just reboot and reroot.
Here is a helpful link to what some of the apps are.
Known Issues
None!
Download flashable .zip HERE
Download .bat HERE​​​​​
Special Thanks to:
Netarchy for some great shell scripting help!
freeza and ffolkes for their initial thread which I based the script on!
agrabren for getting the E3D rooted!
xdviper for the build.prop info needed for Sensation support!
Let me know if I forgot anyone!
giving this a go now. ill report back ;-)
Cant seem to get this to work. i just type viperbloat in adb or terminal emualtor and it says not found. then i type /sdcard/viperbloat and i get permission denied?
ran through terminal emulator and just removed safe bloatware and recommended. no errors and ill report back how it does for my battery life. there is a option that says no recommended and i followed it because i didnt want to start from scratch. So far i give this app a thumbs up.
Thanks for the hard work.
bpear96 said:
Cant seem to get this to work. i just type viperbloat in adb or terminal emualtor and it says not found. then i type /sdcard/viperbloat and i get permission denied?
Click to expand...
Click to collapse
Did you run the .bat file? Run it again.
And I assume you guys have the same deal as the EVO 3D and we are using /vendor for /system (symlink)? That's how I have it setup is to push it to /vendor/bin and chmod. Please let me know.
charlieb620 said:
ran through terminal emulator and just removed safe bloatware and recommended. no errors and ill report back how it does for my battery life. there is a option that says no recommended and i followed it because i didnt want to start from scratch. So far i give this app a thumbs up.
Thanks for the hard work.
Click to expand...
Click to collapse
what exactly did you type in terminal emu?
bpear96 said:
Cant seem to get this to work. i just type viperbloat in adb or terminal emualtor and it says not found. then i type /sdcard/viperbloat and i get permission denied?
Click to expand...
Click to collapse
are you temp rooted already? and when u run the bat file wait till it says press any button to continue than type su in terminal emulator to see if u have permission after that type viperbloat and the app should pop up.
bpear96 said:
what exactly did you type in terminal emu?
Click to expand...
Click to collapse
i typed viperbloat and i got the above screenshot but in white/blue.
charlieb620 said:
are you temp rooted already? and when u run the bat file wait till it says press any button to continue than type su in terminal emulator to see if u have permission after that type viperbloat and the app should pop up.
Click to expand...
Click to collapse
nevermind got it
-viperboy- said:
Did you run the .bat file? Run it again.
And I assume you guys have the same deal as the EVO 3D and we are using /vendor for /system (symlink)? That's how I have it setup is to push it to /vendor/bin and chmod. Please let me know.
Click to expand...
Click to collapse
what app are u using for screenshots? so i can post what i see and what i did....thanks.
bpear96 said:
yes im temprooted. when i type viperbloat in terminial emulator all i get is permission denied?
Click to expand...
Click to collapse
restart your phone. run the final temp root again and than do the viperbloat.bat
you may have made a error so the best thing to do is just start from scratch
I got it to run but my /sytem is r/o
My screenies
Sent from my HTC Sensation 4G using XDA Premium App
Go from my screen shots first line and second line should be diff
Sent from my HTC Sensation 4G using XDA Premium App
bpear96 said:
I got it to run but my /sytem is r/o
Click to expand...
Click to collapse
here too, script fails with the "busybox mount | grep /vendor/system" as there are no /vendor/system on my phone, and the grep finds 'ro' from probably /vendor/firmware ?
in /vendor/ i have bin and firmware directory
Also i cant seem to root now heres what i get in adb http://pastebin.com/gWb0eAsP
Also make sure that the exploit ran to ur Sd card. That may be the cause of the errors.
Sent from my HTC Sensation 4G using XDA Premium App
i changed
systemcheck=$(busybox mount | grep /vendor/system | cut -d \( -f 2 | cut -d \, -f 1)
to
systemcheck=$(busybox mount | grep /system | cut -d \( -f 2 | cut -d \, -f 1)
and got rw
then when disable bloat, i get
/vendor/bin/viperbloat: line 402: pm: not found
/vendor/bin/viperbloat: line 402: pm: not found
/vendor/bin/viperbloat: line 402: pm: not found
/vendor/bin/viperbloat: line 402: pm: not found
/vendor/bin/viperbloat: line 402: pm: not found
repeated maybe 20-30 times
bpear96 said:
Also i cant seem to root now heres what i get in adb http://pastebin.com/gWb0eAsP
Click to expand...
Click to collapse
Are u using the temp root final? I was getting errors as well in the beginning before this mod and I just rebooted my phone and everything worked
Sent from my HTC Sensation 4G using XDA Premium App
charlieb620 said:
Are u using the temp root final? I was getting errors as well in the beginning before this mod and I just rebooted my phone and everything worked
Sent from my HTC Sensation 4G using XDA Premium App
Click to expand...
Click to collapse
yes im sure.. the older v. actually works for me i get root. but the final doent work at all

{TUToRIAL]HOW TO DEODEX I9001 FOR NOoBS

HOW TO DEODEX YOUR I9001
THIS IS A SIMPLE GUIDE FOR THE NOOBS SO THAT THEY CAN DEODEX THERE I9001
What you'll need:
A Windows based machine
JDK
ANDROID SDK
LATEST XULTIMATE
And A Rooted I9001
Process:
1. Unzip xUltimate v2.2, and launch "Main.exe"
2. If everything goes well xUltIMATE should recognize the phone and make a connection. You now should see a list of options.
3. Run option 1. After option 1 is done, run option 2.
4. Now these well take a while. Run option 3.
5. IMPORTANT: After you have run option 3
6. Now run option 4, and wait.
7. Exit xUltimate, and put the phone in USB mass storage.
8. Go back into the xUltimate folder and copy "done_frame", and "done_app", and move them to the root of the internal sdcard not in the external sd.
9. Now Put the phone in USB DEBUGGING mode and DON'T PUT THE PHONE IN MASS STORAGE MODE
10. Open a command prompt, and do the following:
Code:
$ su
# stop
# mount -o remount rw /system
# rm /system/app/*.odex
# rm /system/framework/*.odex
# cp /sdcard/done_app/* /system/app/
# cp /sdcard/done_frame/* /system/framework/
# mount -o remount ro /system
# reboot
Credits to -
Xeodoxus for xultimate
Ghostlypickel for this guide
DO THIS AT YOUR OWN RISK
IF YOU LYK MY POST THEN PLEASE PRESS THE THANKS BUTTON
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
RESERVED...
RESERVED..........
For Android 2.3.x using this command
busybox cp /sdcard/done_app/* /system/app/
busybox cp /sdcard/done_frame/* /system/framework/
Maybe a stupid question but what are the benefits when I'm deodex my i9001?
Sent from my GT-I9001 using XDA App
oudbrood said:
Maybe a stupid question but what are the benefits when I'm deodex my i9001?
Sent from my GT-I9001 using XDA App
Click to expand...
Click to collapse
it is easier to make themes/mods for deodexed firmware
@ oudbrood
and you will got more space in system
Thanks for the reply's.
I get smarter every day
Sent from my GT-I9001 using XDA App
Not understand something here...does the phone always on usb? No plug in n plug out usb? The commant have to type where? Pc? Like this...start-run-cmd-enter?
GT-I9001 Adrenaline Shot - powered by Instanet free edition
Lol, thread looks familiar
kkrraazzyy said:
3. Run option 1. After option 1 is done, run option 2.
4. Now these well take a while. Run option 3.
5. IMPORTANT: After you have run option 3
6. Now run option 4, and wait.
Click to expand...
Click to collapse
Can be done in one step (option 5 - Pull and Deodex all).
Note that deodexing (steps 3 and 4) sometimes returns errors. Just repeat the procedure and it will work a second (or third) time...
kkrraazzyy said:
10. Open a command prompt, and do the following:
Click to expand...
Click to collapse
You can also make a batch file to move files from the xUltimate folder onto your device (put this patch-file into the xUltimate folder - this will not use the sdcard and push the files directly onto the device!). Something like this:
Code:
@echo off
jar\adb -d remount
jar\adb -d push done_app /system/app
jar\adb -d push done_frame /system/framework
echo all ok? going to remove *.odex files...press a key to continue...
pause >nul
jar\adb -d shell rm /system/app/*.odex
jar\adb -d shell rm /system/framework/*.odex
jar\adb -d remount
echo rebooting...press a key to continue...
pause >nul
jar\adb -d reboot
pause
---------- Post added at 08:31 AM ---------- Previous post was at 08:29 AM ----------
pyronia said:
Not understand something here...does the phone always on usb? No plug in n plug out usb? The commant have to type where? Pc? Like this...start-run-cmd-enter?
Click to expand...
Click to collapse
Yes, running Main.exe and deodexing requires the device to be plugged into USB. Using ADB also uses USB, although you can do it from your device too with shell tools. And if you want an automated DOS script for moving the files using ADB, see above
---------- Post added at 08:42 AM ---------- Previous post was at 08:31 AM ----------
One more thing: you need BusyBox too:
https://market.android.com/details?id=stericson.busybox
do i have to flash again tweak like adrenaline shot after deodexing???
pyronia said:
do i have to flash again tweak like adrenaline shot after deodexing???
Click to expand...
Click to collapse
No, it does not touch any of those (Adrenaline, Root, CWM, etc.)
Hahaha...i just back from bootloop....i think it will not workout for me...
GT-I9001 Adrenaline Shot - powered by Instanet free edition
pyronia said:
Hahaha...i just back from bootloop....i think it will not workout for me...
GT-I9001 Adrenaline Shot - powered by Instanet free edition
Click to expand...
Click to collapse
Lol, glad you're still laughing so how did you do it? On which base-ROM? I've done it several times and never had any issues...
nikagl said:
Lol, glad you're still laughing so how did you do it? On which base-ROM? I've done it several times and never had any issues...
Click to expand...
Click to collapse
ZSKP6...it stuck when i try to use terminal modulator...all apps fc then bam!!! Mr. Bootloop came out after remove battery....
GT-I9001 Adrenaline Shot - powered by Instanet free edition
So...using shell other than adb doesn't work tx 4 testing )
Sent from my GT-I9001 using XDA App
It doesn't work with the shell on your mobile since when u type "stop" it totally freezes.. ADB SHELL IS REQUIRED. the poster might want to say that since this is just a 100% copy of the deodex I9003 tutorial
when i tried it my phone got in a bootloop tho.. but I will try later again
I used ADB and it works. No bootloop or errors
to deodex always use ADB
and be sure that you have busybox installed on your device
otherwise the commands cant be executed
Guys, what am I doing wrong?
- Rooted XXKPS
- Ran main.exe ok with all steps.
- All okay until "(busybox) cp /sdcard/done_app/* /system/app/"
It can't find my sdcard.. I'm sure I have the files placed in the root of the internal sdcard.

Categories

Resources