yashsingh1/xdaforums huggingface dataset:
[Galaxy S II Original Android Development] dexterdave:
you can try to use terminal emu, just type su then navigate to folder where the script located, then type sh init_expandsd.sh then enter. this might do the trick to execute .sh ;)
[Galaxy S II Original Android Development] g2tl:
Does it work for you?
[Galaxy S II Original Android Development] TheFirstBen:
It's a great idea thanks a lot for your work. I was wondering why ln was not working.

But too bad it does not work for me, i get the following error :

[1] Segmentation fault

Do you have any idea why ?

Thanks again
[Galaxy S II Original Android Development] Deleted member 267841:
problems when connecting phone to pc

hi,

tried the "mount --bind" in order to try your script.

works fine. the directory contents is shared between the 2 path's,

but i have a problem when i connect the phone to a pc.

when i try to disconnect, the sdcard and external_sd are not

available anymore until i reboot the phone :(

note: the commands that i have executed are:

mkdir /mnt/sdcard/external_sd/foo
echo "test" > /mnt/sdcard/external_sd/foo/test
mkdir /mnt/sdcard/foo
mount --bind /mnt/sdcard/external_sd/foo /mnt/sdcard/foo
[Galaxy S II Original Android Development] skeptic1007:
Can this script be placed in init.d folder for autorun at boot?

Edit: sorry, already answered above: no, it cannot.
[Galaxy S II Original Android Development] Idan73:
Seems abandoned by @ownhere

Sent from my GT-I9100
[Galaxy S II Original Android Development] freemini:
too bad, it could be very useful..
[Galaxy S II Original Android Development] almaqdad:
got the same problem please help
[Galaxy S II Original Android Development] nicksean:
How to use?
[Galaxy S II Original Android Development] dawabz94:
thanks,

this is genius

I'm not using your script (have myself some ux & scripting skills) but did not know about the -bind option on android

Ridiculously simple and efficient

Did it my own way and it works great

Thanks a lot for this :)
[Galaxy S II Original Android Development] Chairmansaab:
Then why not share with us :D please !

Let us know how you did :)
[Galaxy S II Original Android Development] benc88:
Yes I'd like to know another method also.!
[Galaxy S II Original Android Development] dawabz94:
Hi,

it's very easy indeed, once you got the point.

I do most of my stuff using an "adb shell" session so I'll post here my steps to get it working.

Also I like simple implementation so my script is the strict minimum needed to mount necessary folders

I assume you have a rooted device with working busybox and a kernel that supports /etc/init.d/

I suggest you do the test on a dummy folder before applying on a real folder.

So start by creating a folder called /sdcard/dummy

Do it the way you want , I do it with an "adb shell" session

cd /sdcard
mkdir dummy

Then copy some files in it (photos for examples)

cd /sdcard
cd DCIM
cd Camera
cp `ls -1 |tail -5` /sdcard/dummy

From now on, we consider we want to move transparently /sdcard/dummy to the external SD

1. move the folder to the external sd

CAUTION : I'm running a CM9 rom => my external sd is mounted on /mnt/emmc

Standard samsung sdcard mount is /sdcard/external_sd

The path might be different according to your brand and rom

Moving the folder code

cd /sdcard
mv dummy /mnt/emmc/

2. Create the mount point in the indernal SD

cd /sdcard
mkdir dummy

3.a Check the mount is successful by manually doing it

mount --bind /mnt/emmc/dummy /sdcard/dummy

3.b Check you see exactly the same thing on both folders

Both commands should return exactly the same output

ls -l /sdcard/dummy

ls -l /mnt/emmc/dummy

If everything is fine, then you're good to go

4. Automate mount at boot time

Create a script in /etc/init.d to automate the mount at boot time

I personally use "vi" but most people prefer graphical UIs, I can't recommend any here, do it your own way

So basically you would go root,remount /system in read/write mode and create the file

su
mount -o remount,rw /dev/block/mmcblk0p9 /system
cd /etc/init.d
vi 90binds

Insert following lines, save and exit

Note that the "sleep 60" is to let the system boot up before mounting partitions (thanks to the initial script shared here)

#!/system/bin/sh
sleep 60
mount --bind /mnt/emmc/dummy /sdcard/dummy

Change owner and permissions, flush disk cache and remount /system in read only

su
mount -o remount,rw /dev/block/mmcblk0p9 /system
cd /etc/init.d
chown root:shell
chmod 6755 90binds
sync
mount -o remount,ro /dev/block/mmcblk0p9 /system

To check, run

su
cd /etc/init.d
ls -l 90binds

The output should look like this :

-rwsr-sr-x 1 root shell [I]0 MMM D HH:MM[/I] 90binds

5. Now you can reboot and check - after reboot - that the mount is done

Both commands should return exactly the same output (always ran in an "adb shell" session)

ls -l /sdcard/dummy

ls -l /mnt/emmc/dummy

6. Now you're good to move other folders

Basically, you move the folder to external SD

Create the mount point on the internal SD

Append the mount command in the 90binds script

And that's it

Hope this helps :)

---------- Post added at 11:09 AM ---------- Previous post was at 11:04 AM ----------

Just posted :)

Take time to read and understand the idea
[Android Q&A, Help & Troubleshooting] KnowledgeBroker:
We should be able to make a list of the notorious apps that we've experienced that cause battery drain. No, not some 3d launcher, not some game you play too much, but apps that when installed kill your battery without good cause..

This is an opinion thread, if you see the same app repeatedly than maybe that opinion should matter, and feel free to give your insight.. but no "you're an idiot, because blah blah"

I've used poweramp music player for nearly a year, I've emailed the dev because it will kill my battery at huge rates, but they claimed that it isn't the app. Even though there are tons of posts about the same thing(many about my phone the Samsung galaxy s).. I'm sure it does, but I love the functionality it has and can't give it up. Which is fine.

But I suddenly have battery drain really bad and tthe only change I made was switching to go launcher. Maybe it is the Widgets, but I have lost several hours a day of battery only after using it.

Either way, since I couldn't find a thread about apps people think cause needless battery drain I figured I'd post one. I bet there are a ton of apps people will hate on, but maybe qe can save someone from finding out the hard way, or maybe a developer will see their app listed and think they should work on it..

Regardless, what apps have you installed and noticed needless battery drain?
[Android Q&A, Help & Troubleshooting] AppMania_ua:
Wi-Fi Finder from Android Market drains the battery of my HTC Desire HD :(
[Android Q&A, Help & Troubleshooting] gerbetta33:
I hear the android IRC app drains battery pretty badly.
[Android Q&A, Help & Troubleshooting] jolaren:
Go!chat is litteraly eating the battery of every android device i've put it on
[Android Q&A, Help & Troubleshooting] khaytsus:
This thread is going to be full of complete nonsense.. There are badly written apps that are going to do stupid stuff, but there are also apps which have custom codecs which use more power to decode certain file formats (PowerAmp) and apps which by design are going to use power (Wifi Scanners).
[Android Q&A, Help & Troubleshooting] scottmog:
The sorta new free warcraft type game, eternity warriors or something like that. Impossible to turn off
[Android Q&A, Help & Troubleshooting] KnowledgeBroker:
The exact kind of comment that doesn't contribute. No, it may list some apps that cause NEEDLESS battery drain. According to the dev of poweramp it doesn't process the muscle any differently, and shouldn't drain more than the stock app. There's no custom codecs to read mp3s.

I wont waste anymore time on someone who isn't contributing, only trolling.
[Android Q&A, Help & Troubleshooting] Danzanzio:
The yahoo! Mail app with it's push only setting had been a HUGE battery killer!
[Android Q&A, Help & Troubleshooting] khaytsus:
You clearly don't get that PowerAmp doesn't use the same codecs as most media players.. It has custom ffmpeg libs. The author can say they should be similar in cpu but doesn't mean they are.

And I agree that it does use more cpu.. Mostly notice it when I listen to music while sleeping, the phone gets much warmer than if I'm using stock codecs.

And watch your use of the word troll...

Back to my point..

:rolleyes:
[Android Q&A, Help & Troubleshooting] paalkr:
NetCounter prevents the phone from enter sleep mode. Stay clear!
[Android Q&A, Help & Troubleshooting] nyydynasty:
+1 for the yahoo mail app.
[Android Q&A, Help & Troubleshooting] claus1953:
I am using Go Launcher Ex, Launcher Pro + and ADW Launcher and cannot say that one consumes more battery than the other, it depends more on what widgets or live WP you use in the launcher, so i think we should focus on pinpointing what widgets and in what settings or conditions drain the battery, for example i found that Animated Weather was for me draining to much juice and replaced it by BeWeather, for the same reason i replaced Executive Widgets by Pure Widget.

On the other hand i removed K9 Mail and am using MailDroid, as in several occasions K9 climbed to the top of the list in battery usage, doubling even the screen usage.

At this point i never more experienced excessive battery drain, other than screen and phone cell standby (due to bad reception in my area).
[Android Q&A, Help & Troubleshooting] khaytsus:
Let me guess, you were using POP...

Actually I might as well complain about a widget I installed, but I uninstalled it a month ago and haven't been able to figure out exactly which one it is in the market... Doh.. I installed it and it literally woke the phone and my tablet up ONCE A MINUTE to update. Deep sleep was gone, battery life about 30% lower than expected. So beware of widgets that update often ;)
[Android Q&A, Help & Troubleshooting] claus1953:
Yes you are right i am using pop.

You point is also correct, there are widgets which wont let deep sleep the phone. A method to pinpoint them is to look at the logcat and see which app is waking up the phone constantly.
[Android Q&A, Help & Troubleshooting] kannan66:
tunein radio pro and sensor

I had a problem with tunein radio pro. Even after I shut it down though (App Management), under battery use, tunein radio was listed as draining battery continuously under sensor usage.

No idea if it is a sensor issue or the app issue.
[Android Q&A, Help & Troubleshooting] nyydynasty:
kik (gotten better with battery but still needs improvement)
[Android Q&A, Help & Troubleshooting] bringonblink:
yup same here

---------- Post added at 02:47 PM ---------- Previous post was at 02:45 PM ----------

why not IMAP?
[Android Q&A, Help & Troubleshooting] melvinchng:
FIRST KILLER,

GOOGLE MAP!

I disabled it to prevent it auto start via autostart app.

Accidentally sent from my Nexus S using XDA Premium App
[Android Q&A, Help & Troubleshooting] mudferret:
I've noticed the Photobucket app likes to open itself up in the background at times (i.e. overnight) and use up to 5% of my battery power.
[Android Q&A, Help & Troubleshooting] JohnCorleone:
Maps, Google+, PURE News and Messager widgets, K9 for Pure, XDA App (unfoortunately)
[Android Q&A, Help & Troubleshooting] :
If "use wireless networks" is checked under Location and Security, Maps can/will open itself up in the background so Major League Baseball can track your movements.

I've just disable that, so I'll see if it makes a difference.

LOL...my friend just asked me "You didn't read the 7 pages of fine print regarding that when you set up the phone?" Me: "You lost me at the".
[Android Q&A, Help & Troubleshooting] KCRic:
Not sure why everyone is saying Google Maps is draining their battery. It's never drained my battery, ever. In fact this is really the first I've heard of it doing that unless you're using it as a LWP or something.

Just curious if everyone knows the difference between a background app and an active app...

In case we've all forgot how Android works. A background app is

inactive

, meaning it uses no CPU power. It just sits in memory until it's activated. Unless it's listed as foreground, active, running, in which case it is using the CPU. Just because it's listed doesn't means it's active.

Get something like Watchdog (lite) and periodically check it. SystemPanel (lite) will show you how long any process/app has actively used the CPU. OSMonitor will do the same. That's how you tell if something is killing your battery - not by the fact that it's residing in your memory. That means nothing
[Android Q&A, Help & Troubleshooting] melvinchng:
Google maps send your location constantly to Google server.

Accidentally sent from my Nexus S using XDA Premium App
[Android Q&A, Help & Troubleshooting] :
I've found it under the "running" tab of my app drawer, whether this means it was actively using power or resources I'm not sure (?) More of a curiosity for me; it wasn't listed under battery usage however.
[Android Q&A, Help & Troubleshooting] melvinchng:
See how long it uses your CPU, and how much battery is being used in battery use tab. It will be quite a lot if you travel here and there.

If you sign in in latitude, I prefer you set the update location setting to 'never' to prevent drainage of battery.

Accidentally sent from my Nexus S using XDA Premium App
[Android Q&A, Help & Troubleshooting] rogier666:
Even with network location, latitude etcetera switched off Google Maps pulls in data when it's supposed to be doing nothing.

The Facebook app is another offender that refuses to stay quiet in the background.

They don't eat a lot of battery on my phone, but they do wake up by themselves to download data.

Task killers usually make no sense, but there are exceptions. Google Maps and Facebook are among them.
[Android Q&A, Help & Troubleshooting] Synergies14:
Maps is almost always running unless you have a custom rom that allows you to uninstall it completely. But if you click on it in the running processes, you can see that Network Location Service is initialized and is being used(not sure why and what the connection between them is). This has never affected my batter life nor have i ever seen any other claims of it doing so.

Ever since the 2.2 update, the use of task killers has been a Needless battery drain. Using them can actually drain alot more battery than saving them. android actually kills apps and services not being used after a short period of time, including alot of the services started up when you start the phone up. Alot of people don't realize this. The task killer will kill the processes but since android didn't finish processing them and letting them be idle long enough to shut it down on its own, it will keep restarting those processes until it shuts them off on its own. the longer the processes run, the more battery gets drained. Also, the taskiller running in the background constantly also helps contribute to the drain of the battery on top of things.

As for the wifi scanners, android has the ability to scan for wifi networks itself. Unless you are looking for a more user friendly or robust wifi scanner, but thats a personal choice and not needed as android has the core function.

Facebook and mail(not necessarily needless) apps are battery drainers also. Facebook loves to run in the background so it pulls updates and notifications, but if you go to the apps manager and go to facebook and clear cache and data, it will delete your login info and it wont run in the background anymore. Mail apps in my opinion dont drain as much battery as facebook app does, but still puts a drain on the battery, but depending on the settings you have set for it and how often you get mail. Both have to wake the phone up and use data to send and receive updates/mail/notifications. Data is right next to "screen" as one of the top killers of battery. It comes down to cell coverage strength, and again, how often you have them set to update and receive things.
[Android Q&A, Help & Troubleshooting] droganche:
Tnx guys, this is very helpful!
[Android Q&A, Help & Troubleshooting] melvinchng:
Try to use "autostarts" from market to disable the auto start after boot or change network... so you don't have to uninstall.. :-)

Accidentally sent from my Nexus S using XDA Premium App
[Android Q&A, Help & Troubleshooting] BeaverusIV:
I have to say I found Go Launcher EX to use more battery than ADW. I wasn't using any widgets or live wallpapers.
[Android Q&A, Help & Troubleshooting] bringonblink:
auto starts is not a task killer, it just defines when an app CAN start.

very useful

Sent from my Google Sexus S
[Android Q&A, Help & Troubleshooting] melvinchng:
You have a little more knowledge than others :-)

Accidentally sent from my Nexus S using XDA Premium App
[Android Q&A, Help & Troubleshooting] bringonblink:
hmm not sure if sarcasm

Sent from my Google Sexus S
[Android Q&A, Help & Troubleshooting] thehumble1:
^-^-^ Pretty sure it wasn't.

I am wondering about GO Launcher EX too. It's such a nice launcher, but it might be a bigger drain than others. I generally think this is because I have more shortcuts and widgets on it, but even at stock I think it's trying to do more and generally not built with battery saving in mind.

Today I added Pandora, Beyond Pod and Grooveshark widgets to the desktop and it seems that one of them was burning through the battery at almost 1%/3 minutes. I don't know if it was just syncing for the first time or something, but it definitely tore it up. The problem is that I don't think widget use shows up properly under battery use. Is there a chance that they are hidden in the system battery use? I had tons of partial wake usage, but when I looked at what was doing it, the specific apps didn't show up. Go Launcher Ex shows up with a ton of CPU use though.

I'm also wondering if my POS Patriot 16gb SD card is causing more problems. I have a SanDisk 16gb class 4 on the way, but I think there is a chance that switching from the 8gb to the 16 has increased my drain. Any theories about that?

Thanks for the thread guys!
[Android Q&A, Help & Troubleshooting] KnowledgeBroker:
Widgets operate under the android os when you check battery use.. so if it says "android os" is using tons of battery, that's why.. but the problem likely isn't the launcher. Install CPU spy, it tells you how long it is in each state(deep sleep, or which MHz).. your phone should show a few seconds of deep sleep when you turn it off for about 5-10 seconds- if it does, put a widget on screen, then check a few times to see if it still deep sleeps. Keep doing that till you find which is doing it.

That is definitely the problem and easiest fix. Even if a widget drains, download autostarts and disable that app after startup or see if it triggers on a certain system state, it should keep the app from keeping the phone from deep sleep. If not, find another widget that does what you want.

Hope it helps!
[Android Q&A, Help & Troubleshooting] :
Forgot to refreeze it after flashing a new ROM, I freeze it when not in use. Here's an ironically hosted picture of the wake locks it caused last night totallying ~10 minutes.
[Android Q&A, Help & Troubleshooting] thehumble1:
I switched from a widget-heavy Go Launcher to Zeem without any widgets and I know there is plenty of RAM available, so I don't think apps are competing for space as yet. It does seem to drastically reduce battery drain.

what I've also found is that the biggest drain seems to be when there are data drops or data problems with the ROM or with my APN (internet2.voicestream.com), which makes the HSDPA connection try over and over again to send information. If I switch from 3G+ (HSDPA) to 2G (Edge) the drain is reduce. Makes sense. But what is also reduced is the amount that it is trying to connect, which only makes sense if it's having problems keeping the HSDPA connection. Even when I have data drops (I'm on cLK) the usage stays high because of the frequent attempts to use data by the phone's system/apps/syncs etc. Of course if I turn off mobile data and turn off sync battery drain drops to a really nice 2-6ma and I can run around all day with it barely using any battery. But I don't have a really nice phone with Gingerbread just so I have to manually check email and news, etc. so I generally let it auto sync most of the day.

I also tried using the options in the Power Widget that let you select what states cause what actions. I thought it would be just great if it only turned on auto sync when on WiFi and also turned off 3G when on WiFi. That seemed to cause all kinds of data drops though so I turned it back off.

Thanks for the help and ideas. I think this is one of the better threads already for really looking at battery drain without getting off topic.
[Android Q&A, Help & Troubleshooting] prj71:
I've been using this and found out it helps with battery drain.

https://market.android.com/details?id=com.a0soft.gphone.aDataOnOff&hl=en

Basically it turns off the data connection when the phone is in sleep mode. It also has the option to not turn on the data connection at all or only poll data every 15,20,30,60, 120 or 240 minutes.

Also includes a night mode which turns on/off airplane mode at specified times.
[Android Q&A, Help & Troubleshooting] Modus Pwnenz:
Spotify seems to cause quite a big drain
[Android Q&A, Help & Troubleshooting] panamamike:
Wifi Manager was a surprise battery killer for me, wasn't really doing anything but caused significant battery drain.

Of course the heavy data connection stuff and GPS, but I suppose that's to be expected.

It would be cool to categorize the battery killer apps as those that are expected to and those that do because of poor design.

Mike
[Android Q&A, Help & Troubleshooting] Europa.:
Thanks for reminding us! I may check myself apps too.
[Android Q&A, Help & Troubleshooting] ofantastic:
TextFree battery drain, TextFree resource hog

TextFree (pinger.com), adware that gives the user a ten digit number to receive SMS, and send SMS with that number as sender ID

Ver 1.2

Ver 1.2.1

INANELY it polls for new messages every 15 seconds - a rate that is NOT user configurable. Because it is adware (malware) it also polls for ads, and polls for future ads.

This is true for ALL people not permitted to use gmail. The ad polling is true for both non-gmail and gmail alike.

TextFree is the least-worst-malware privacy-as-commodity SMS service/app.

Pinger NEED provide a pool setting to all users. Many are uncomfortable routing all user data through google servers (who have added a gmail account to the device): interstitially or caching.
[Android Q&A, Help & Troubleshooting] galaxynotes:
Don't know if these have been mentioned or not but Wechat is a famous battery drainer.

Also Freepp or at least for me.It would drain the battery needlessly when wifi and screen off.

So watch out for these two.
[Android Software/Hacking General [Developers Only]] sercan192:
Hi to you all

I have a problem with my gio. I did an installation or an upgrade to 2.3.4 but none was Turkey rom so I disliked it and wanted to return to my original rom but I could not find any Turkey roms.

Would anyone help me finding it and send it to me?
[XPERIA X8 Q&A, Help & Troubleshooting] Droid117:
Can a mod close this? I've sorted my problem.
[Motorola Droid 3] ckarrow2:
I just received a soak test invite from Motorola Owner's Forum...

I'm rooted and have installed the current LEAKED OTA update (which is running nicely, I might say)...

Should I complete the form to volunteer for the soak test?

Here's one of the last pages of the questionnaire. On a prior page I had to give them my HEX MEID in order to receive the update:

Any advice on whether I should proceed or not? And, if so, should I be honest about the rooting or nervous that I already have a version of their OTA?

I can unroot and restore to stock file condition, but not the system version.

Thanks!
[Motorola Droid 3] ctheory83:
I'd say for the safety of your device i'd be straightforward about root.