[SCRIPT] KILL android.process.media for Better Battery life - Optimus L3, L5, L7 Android Development

.
Okay first of all this is no hardcore coding or difficult to understand linux scripting - i got the idea when i saw this thread by bambamx , first i thought it was just a placebo effect but when i tried i could see a noticeable difference so i thought i'd share with you guys .
What is mediaserver ?
Media server accesses local media files be it music/video from your "SD" memory for playback.In short any app that streams,plays music or video triggers mediaserver.
Click to expand...
Click to collapse
What benefit does killing it bring ?
Well you could see your battery usage statistics by going to settings>battery in cm and see how much of your battery is media server eating if its over 15% this script might benefit you.The idea is to schedule the execution of this script for example each 1 hour as it restarts every now and then we
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"
}
Instructions :
*The recommended way:
->Download attached '.txt' file
->Change the extension to .sh - run it via script manger (don't forget to run as su) and also create a widget on home screen for the same to run as ans when needed
->Also tick run on boot in script manager or push the script to /system/etc/init.d if your kernel supports init,d scripts (most custom kernels and cm kernels do)
or
->Simply run via terminal emulator
Code:
su
#!/system/bin/sh
killall -9 android.process.media
killall -9 mediaserver
or if you have the script file in root of sdcard
Code:
su
cd sdcard
sh 00mediaserver.sh
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Notes:
exadeci said:
The issue is not the media server but one or several apps that run in services and keep it awake.
All the apps that are galleries or media player uses media server to play/show/scan so if you use any of those app mediaserver while be get a high percentage of battery usage and that's normal, the issue is when one of the apps is badly coded an keeps awake media server even if you are not using the app
So you just need to hunt the ****ty app that makes mediaserver drain your battery
Click to expand...
Click to collapse
Any Comments and feedbacks are welcome
Click to expand...
Click to collapse
.

good work

emokeizer said:
good work
Click to expand...
Click to collapse
Thanks bro do try out and give feedback

Flashing failed.. but i extracted it and put it to the system and it works fine

If i flash the zip works it?
Sent from my LG-E400 using xda app-developers app

emokeizer said:
Flashing failed.. but i extracted it and put it to the system and it works fine
Click to expand...
Click to collapse
Okay maybe meta.inf should be modified, I'll see it to it when I get on pc

diego88it said:
If i flash the zip works it?
Sent from my LG-E400 using xda app-developers app
Click to expand...
Click to collapse
No the zip doesn't work as of now I'll update it
Edit : don't have pc acess right now so just download the text file attached and rename it to .sh extension and run via an app like root explorer or script manager

Killing mediaserver process on gingerbread disables all audio outputs and cannot use video playback. Any ideas?

Looks cool
Sent from my SAMSUNG-SGH-I747 using xda app-developers app

Related

[Sense][BatteryMOD]STOCK SENSE BAR WITH NO PERCENTAGE.

This is just a stock sense battery w/o the percentage. I only made this cause I worry about my phone battery A LOT and battery percentage makes it worse for me and I wondered if other people felt the same, so I'm sharing it here. It's really not much so don't criticize or talk crap about it. Just for those iffy people who HATE battery percentages. Enjoy!
Installation Process
- Unzip files into a folder called battery.
- Go into cmd enter " cd C:\AndroidSDK\tools "
- Then enter " adb pull /system/framework/framework-res.apk "
- Open the .apk file w/winRAR
- Go to res>drawable-hdpi
- Drag contents from the "Battery Folder" into drawable-hdpi
- Now, put framework-res.apk into SDK tools folder and " adb push framework-res.apk /system/framework "
- Enjoy
{
"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 tried it on fusion 1.18 and it deleted all my accounts and wouldn't let me resync them...is this only compatible with sense 2.1?
kirkcody said:
I tried it on fusion 1.18 and it deleted all my accounts and wouldn't let me resync them...is this only compatible with sense 2.1?
Click to expand...
Click to collapse
O.O weird... I'm running the same and mines fine. Let me check real quick..
Thanks I'd really appreciate it, I feel the same way about battery percentages...yeah I used root explorer moved the apk to...wait I think I just moved it to system/framework...and didn't follow the rest ill try it again....sorry please repost zip
kirkcody said:
Thanks I'd really appreciate it, I feel the same way about battery percentages...yeah I used root explorer moved the apk to...wait I think I just moved it to system/framework...and didn't follow the rest ill try it again....sorry please repost zip
Click to expand...
Click to collapse
lol. just extract those .png files INTO A FOLDER.(Very Important) then move them to /system/framework/drawable-hdpi/ and reboot. =)
I found it but root explorer won't allow me to access the framework-res.apk...it won't allow me to paste them there, only options available for the framework apk are install,view and cancel when pressed.
kirkcody said:
I found it but root explorer won't allow me to access the framework-res.apk...it won't allow me to paste them there, only options available for the framework apk are install,view and cancel when pressed.
Click to expand...
Click to collapse
Same with me
Sent from my HTC Glacier using XDA Premium App
kirkcody said:
I found it but root explorer won't allow me to access the framework-res.apk...it won't allow me to paste them there, only options available for the framework apk are install,view and cancel when pressed.
Click to expand...
Click to collapse
I will post a new method. lol. darn. too many fails..
kirkcody said:
I tried it on fusion 1.18 and it deleted all my accounts and wouldn't let me resync them...is this only compatible with sense 2.1?
Click to expand...
Click to collapse
just restart and itll be fine
kinnyswaggg said:
I will post a new method. lol. darn. too many fails..
Click to expand...
Click to collapse
Uh need to unzip it and do that thats why
Sent from my WhiteHTCMyTouch4G using XDA Premium App

[System]Custom system mod [2.3.3 .145]

Here is my custom system mod!
{
"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 removed, added and updated some apps.
Removed
Code:
Anonymous Usage Stats
BBC iPlayer
Bruce Lee Dragen Warrior
Chinese keyboard
Email
Gmail
Home screen tips
LiveWare manager
Media server
Music Likes
Postcard
Retail Demo
Setup guide
Star Battalion
Store
Support
Talk
Tetris
The Sims
TrackID
Added
Code:
Busybox
MyPhoneExplorer Client
Titanium Backup
Twitter
WhatsApp
Updated
Code:
Adobe Flash Player
Facebook
Market
Mods
Code:
HTC Sense statusbar
WALKMAN
Camera background
Reboot option (thanks to AdamTt)
CRT animation
Homescreen with 9 screens
Download here
thomassafca said:
Here is my custom system mod!
Added
Code:
RootExplorer
Click to expand...
Click to collapse
This is a paid app.... you need to remove it mate
Yeah I know that, removed it already but not from that list. Sorry
thomassafca said:
Yeah I know that, removed it already but not from that list. Sorry
Click to expand...
Click to collapse
Sent from my R800i using XDA Premium App
Wicked sick. Im going to flash this tomorrow!
i tried to flash your system but it just hangs, herse what it says
c:\Program Files\Android\android-sdk\fastboot>fastboot flash system system.img
sending 'system' (197356 KB)...
i have flashed another system image as well as clockwork mod which have both worked fine
Should I be using flashtool or recovery for this? For some reason, recovery isn't seeing the image.
Sent from my R800i using XDA App
you should flash it on Fastboot mode.
By the way, thomassafca, could you point to ressources for learning how to make these images? I want to do a gaming-focused one (with Snes9x pre-installed and other goodies). If you feel an MP is a better way, please send one
Logseman said:
you should flash it on Fastboot mode.
By the way, thomassafca, could you point to ressources for learning how to make these images? I want to do a gaming-focused one (with Snes9x pre-installed and other goodies). If you feel an MP is a better way, please send one
Click to expand...
Click to collapse
Factory Reset, do modifications, nandroid and pluck system.img
Sent from my R800i using XDA Premium App
And how would I install apk's not belonging to the original system partition? Simply move them to the /system/app folder before the nandroid backup?
what is the pre-requisite in order to flash this rom? does the XP need to be rooted and unlocked?
Logseman said:
And how would I install apk's not belonging to the original system partition? Simply move them to the /system/app folder before the nandroid backup?
Click to expand...
Click to collapse
Correct, but make sure you chmod 644 after moving them (or RW-R-R in root root explorer)
monsterday2002 said:
what is the pre-requisite in order to flash this rom? does the XP need to be rooted and unlocked?
Click to expand...
Click to collapse
The bootloader should be unlocked else you can't flash the image
Thanks FrAsErTaG, for answering some questions!
Logseman,
If you make a Games related System Image, would you be including the games that come with the phone?
All the best,
NSCXP2005
Good question. The answer is probably negative. I am more inclined towards emulation gaming, and the games which come with the phone are not my cup of tea (Star Battalion is all right, but that's about it for me).
Oh man if I had an unlocked bootloader I would upload mine I've got ALL the games plus the games in the Xperia play app
Sent from my R800i using XDA App
When i try to flash this in fastboot it always has this error saying "too many links"

[Q] Internet Browser apk help please.

Situation:
-I have a rooted device Samsung Galaxy Ace [GT-S5830L] Android 2.3.4
-I accidentally deleted with Titanium Backup my default browser [Internet 1.0 (1)]
-Therefore I installed Dolphin which is not that bad.
Problems:
-Now wherever I try to watch any youtube video I'm just able to see the loading circle without loading the video.
-I can't use the default browser.
-I lost the voice app to type.
I've tried without good results:
-Use my friends phone [exact same one I have] did a back up with Titanium Back up, copy the backup to my phone and tried to restore.
-I downloaded several [internet.apk] [browser.apk] for my phone and tried to install with Optimize toolbox and from manage applications.
Screen capture when I tried to open.
{
"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"
}
Flash any other roms
Or
Restore ur phone with factory settings
Sent from my GT-S5830 using XDA
Get a root file browser and put Browser.apk in /system/app then change to the correct permissions
AnoopKumar said:
Flash any other roms
Or
Restore ur phone with factory settings
Sent from my GT-S5830 using XDA
Click to expand...
Click to collapse
Fried, you can download Dolphin HD in this link...
https://play.google.com/store/apps/...wsMSwxLDEsIm1vYmkubWdlZWsuVHVubnlCcm93c2VyIl0.
Or use the APK in attachment. This apk was retired of a ROM 2.3.4
scoffyburito said:
Get a root file browser and put Browser.apk in /system/app then change to the correct permissions
Click to expand...
Click to collapse
What do u mean by [change to correct permissions] ?
Pmendex said:
What do u mean by [change to correct permissions] ?
Click to expand...
Click to collapse
rwx
rxx
rxx
Sent from my GT-S5830 using Tapatalk
We help you? Click in Thks button.
tks.
XD
Pmendex said:
What do u mean by [change to correct permissions] ?
Click to expand...
Click to collapse
So for the file to be accepted by the phone you need to change the file so it has system access. That feature is built in on most root file explorers
Sent from my GT-P7500 using xda premium
shreyasvb said:
rwx
rxx
rxx
Sent from my GT-S5830 using Tapatalk
Click to expand...
Click to collapse
I just tried that and still not working, about the person who recomended Dolphin, that a fare option however there must be something between the browser apk and the youtubr apk cause im not able to load youtube videos...
I've consider getting a ROM but I need a functional ROM and I see a lot of them w/bugs on the camera, wifi, gps, ect... Is there any stable ROM that works over networkbands 900/1800?
Why not re-install your current rom (if you are happy with that) from sammobile via odin perhaps?
themountig said:
Why not re-install your current rom (if you are happy with that) from sammobile via odin perhaps?
Click to expand...
Click to collapse
+1. This is the best way.
Sent from my GT-S5830 using Tapatalk
If you still have the zip file from your rom, you can copy the original files from it to your phone.
It should be in /system/app (copy both browser.apk and browser.odex). Make sure you put all the correct permissions (mine has all permisions for reading and owner permissions for writing).
Can I get that system internet apk file I also have same problem

[PORT/MOD] SmartActions app Port 12/13/12 v0.2.4

The very first Smart Actions Port v0.1.2(12/13/12)
Ported from Droid Razr MAXX VRZ_XT912_6.7.2-180_DHD-16_M4-31_1FF
Requires ICS
Has not been tested on JB. (Should work)
All rooted devices should work.
Miui doesn't seem to work, you can try it
{
"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"
}
Install:
1. Download Here
2. Do a nandroid backup
3. Extract and run bat file in windows
4. Enjoy
Alternate method:
1. Open command prompt
2. Do a Nandroid backup
3. Extract zip
4. In Command Prompt explore to adb location and type:
Code:
adb remount
5. Then:
Code:
adb push [drag and drop system folder from extraction location] /system
ex.: adb push C:\Users\Joe-Acer\Desktop\SmartActions\bin\system /system
6. Reboot
Code:
adb reboot
Do not update from market, WILL BREAK IT
Known Bugs, Not working:
1. Location conditions
Code:
Change log:
v0.1.0:
Initial Release
v0.2.3
Released to Public
v0.2.4:
Fixed wallpaper (Only limited to RAZR wallpapers)
Added:
homescreen
LiveWallpapers.apk
MagicSmokeWallpapers.apk
NetworkLocation.apk
SocialShare.apk (not tested, more like public test)
How to use SmartActions:
PM me questions
If you want to integrate this into your rom be sure to PM and credit me.
Hmm what's this?
(First...)
from my E3D
tatnai said:
Hmm what's this?
(First...)
from my E3D
Click to expand...
Click to collapse
Heard of tasker, like that but more reliable, in my opinion anyway
How do I install this from my phone...
donbudafuko said:
How do I install this from my phone...
Click to expand...
Click to collapse
copy the files from bin/system to /system... need a root file explorer to copy the files... then reboot
Would it be possible to get some screenies?
Sent from my PG86100 using Tapatalk 2
Many people don't understand this.
Would be great if you do a "How To" w/Review video.
That would be great.
Looks very interesting thanks for this
Sent from my PG86100 using Tapatalk 2
joekp said:
copy the files from bin/system to /system... need a root file explorer to copy the files... then reboot
Click to expand...
Click to collapse
What root explorer do you use? I tried Astro and it did not let me write the files to the directories, gave me errors every time, and when I tried individually it said could not write also.... Going to look for another root explorer
Redneckhightech said:
What root explorer do you use? I tried Astro and it did not let me write the files to the directories, gave me errors every time, and when I tried individually it said could not write also.... Going to look for another root explorer
Click to expand...
Click to collapse
Esfilexplorer and go to settings and check all three checkmarks under root
joekp said:
Esfilexplorer and go to settings and check all three checkmarks under root
Click to expand...
Click to collapse
You may need to make sure that the permissions are set right. ES will change them. Just long press the files, go to properties, then change the permissions.
So we copy each of the files in the /system directory of the smartactions folders into their respective folders in the phones /system?
for instance there is a folder for the app, all of those files go into the /system/app folder of our phones?? etc...
Roxxas049 said:
So we copy each of the files in the /system directory of the smartactions folders into their respective folders in the phones /system?
for instance there is a folder for the app, all of those files go into the /system/app folder of our phones?? etc...
Click to expand...
Click to collapse
Yes
As soon as I set up a rule it force closes, and then continues to do so each time. I'm using a standard PA JB rom.
Roxxas049 said:
As soon as I set up a rule it force closes, and then continues to do so each time. I'm using a standard PA JB rom.
Click to expand...
Click to collapse
OP clearly states "requires ICS".
ZWYATT said:
OP clearly states "requires ICS".
Click to expand...
Click to collapse
To be fair, it also says "Has not been tested on JB. (Should work)".
ramjet73
ZWYATT said:
OP clearly states "requires ICS".
Click to expand...
Click to collapse
Check the play store for update
Roxxas049 said:
As soon as I set up a rule it force closes, and then continues to do so each time. I'm using a standard PA JB rom.
Click to expand...
Click to collapse
Check the play store for update might fix it
Update worked for me... No fc so far
there is another app in the play store that basically operates the same way. https://play.google.com/store/apps/details?id=AutomateIt.mainPackage&feature=search_result#?t=W251bGwsMSwxLDEsIkF1dG9tYXRlSXQubWFpblBhY2thZ2UiXQ.. its called automateit. Good job with the port.

I cannot uninstall system apps even after I ROOTED my android phone

Hi everyone
I managed to root my android phone yesterday (I checked with 2 root-checker apps). Now I'm having trouble removing pre-installed apps like Twitter and Yellow Pages which I never use. I tried few uninstall apps, and after granting them permission from SuperUS, they perform an uninstall (some apps do it forcefully) and give a message that the apps were deleted. The apps are not removed from my application list but when I click on it to run, they give an error message. But when I restart my phone, those apps I deleted start working again as if nothing happened.
What I'm I doing wrong? My phone is HTC One M8, android.
Thank you for any help
Did you unlock your bootloader?
Sent from my XT1528 using XDA Free mobile app
nobreak1970 said:
Did you unlock your bootloader?
Sent from my XT1528 using XDA Free mobile app
Click to expand...
Click to collapse
Yes, I did that before I rooted it.
I also tried using a File Explorer (rooted version) to uninstall those system app but couldn't find System files. I found a file called Root, but nothing is in the file.
Try app master
android-incredible said:
Try app master
Click to expand...
Click to collapse
I just tried it now but same problem. I select twitter to delete. It gives me a message that uninstall was successful. I check to see if it's listed on my home page, and it is although when I click on it, it gives an error message. However after restarting the phone, twitter somehow recovers and works again!!! Really strange. It's as if it wasn't uninstalled to begin with.
Does anyone know? I still can't solve it
Moon light said:
Does anyone know? I still can't solve it
Click to expand...
Click to collapse
Using Root Explorer, please show me what resides in the System/App folder.
#WhiteUIsMustDie, #EndDarkAppOppression
micmars said:
Using Root Explorer, please show me what resides in the System/App folder.
#WhiteUIsMustDie, #EndDarkAppOppression
Click to expand...
Click to collapse
I don't have a System or App folder folder!!! I don't know why that is. I've captured 2 images to show you:
{
"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 don't know why the images are not showing. Here are the links:
http://pasteboard.co/L8o1aCW.png
http://pasteboard.co/L8vqzIS.png
You need to remove read / write protection. You can do this most easily by flashing a modded kernel (boot.img) through fastboot. Alternatively, there's custom roms that have this already or you can mod a kernel module. There's a guide in the General section of your phone's forum. If you go that route, make sure that the module is compatible with the update you're on as the guide might be outdated.
es0tericcha0s said:
You need to remove read / write protection. You can do this most easily by flashing a modded kernel (boot.img) through fastboot. Alternatively, there's custom roms that have this already or you can mod a kernel module. There's a guide in the General section of your phone's forum. If you go that route, make sure that the module is compatible with the update you're on as the guide might be outdated.
Click to expand...
Click to collapse
Okay, I'll look into that as soon as I get a chance and I'll update the post. I hope it helps.

Categories

Resources