[JuiceDefender beta] v1.4.5 - more cleaning up for GSM, CDMA temporarily on hold

3 views
Skip to first unread message

Mark Lowne

unread,
May 2, 2010, 2:45:00 PM5/2/10
to JuiceDefender
apk here: http://groups.google.com/group/juicedefender/web/JuiceDefender145.apk

This one should be fully functional for GSM phones - if the setup has
an happy ending (and by all means it should), please test it throughly
and let me know of any surviving bugs.

On the CDMA side: I'm giving up on the current approach:
- still didn't find a working solution
- it's too low level and hairy and messy
- it seems that Motorola somehow had fun messing with the kernel
('root' method didn't work on Milestone either...), and their fun is
really, really detrimental to *my* fun. So yea.

So, what's next? Well, right now JD will only be able to toggle
AutoSync - better than nothing. It *will* save some juice.

Coming soon, it'll hopefully be able to directly toggle Background
data (root only, though) - hopefully most apps obey the setting
(disclaimer-of-sorts: it works on my Magic, but after seeing what
we've seen, I wouldn't hold my breath for Droids).

The real deal is going to be the RIL. If I manage to make it work,
it's going to be a whole new world of opportunity. Chances are tiny,
but nonzero. Oh, and I'll have to write the thing in C :((((((

Nitin Philip

unread,
May 2, 2010, 2:52:27 PM5/2/10
to juiced...@googlegroups.com

That sucks mark, but is you do figure out how to access the ril,  awesome.

Turning off auto sync and background data seems to be an ok idea. Probably better than disabling net traffic?

BTW the previous methods for disabling apn was alright except for the re enabling part which only worked with an airplane mode cycle. Couldn't you make your app refresh airplane mode automatically every time data is re enabled? I know apps can access the airplane mode part (Bit messy I know)

Nitin Philip

unread,
May 2, 2010, 2:56:43 PM5/2/10
to juiced...@googlegroups.com

Sorry for typos, sent from my Droid, which is soon to become a Droid Incredible!

Lots of awesome Android phones are due to be out Mark (HTC EGO comes to mind) and they're all CDMA!

On May 2, 2010 2:52 PM, "Nitin Philip" <nitin...@gmail.com> wrote:

That sucks mark, but is you do figure out how to access the ril,  awesome.

Turning off auto sync and background data seems to be an ok idea. Probably better than disabling net traffic?

BTW the previous methods for disabling apn was alright except for the re enabling part which only worked with an airplane mode cycle. Couldn't you make your app refresh airplane mode automatically every time data is re enabled? I know apps can access the airplane mode part (Bit messy I know)


>
> On May 2, 2010 2:45 PM, "Mark Lowne" <mark...@gmail.com> wrote:
>

> apk here: http://groups.g...

marklowne

unread,
May 2, 2010, 3:37:41 PM5/2/10
to juicedefender
Airplane mode: yes I could (that's what JD already does when
connectivity is still down after restoring APN) but I don't know how
it'd work in practice. Over here an airplane mode cycle is painfully
slow (3-6 seconds, too much to have it done every single time),
perhaps it's faster on the Droid?
And btw, are you sure it works consistently? Does it still require an
'ifconfig up' beforehand? test, test! ;)

CDMA phones: it's not that I have a problem with CDMA as a technology
(well, save the part where you're married to your carrier forever and
ever (I know most GSM carriers similarly sell SIM-locked phones, but
it's practically illegal (and rightly so) in EU, and at the very least
the presence of a SIM card makes it possible to switch, if sometimes
requiring to go through the motions) (I'm finding myself in dire need
of parenthesis-level-highlight like in Eclipse - boo Gmail editor! :D
) ) but with its actual Android implementation by Motorola - and
likely soon everybody else. They have the perfect excuse to do
whatever they want with the core OS, since they are a different,
walled garden anyway. And I'm sure it came into being in the first
place thanks to the 'american exceptionalism' meme, which in general
does more harm than good.

So, good thing it's going to succumb eventually (die! die!) to 'proper' 4G :p

Sorry for the lame rant, had to let off some steam :)

Breece

unread,
May 2, 2010, 7:17:38 PM5/2/10
to JuiceDefender
Just sent you a log from my nexus.
It's not using the root method anymore and therefore the apn bug is
back :-(
Setup worked...
> > On May 2, 2010 2:52 PM, "Nitin Philip" <nitinphi...@gmail.com> wrote:
>
> > That sucks mark, but is you do figure out how to access the ril,  awesome.
>
> > Turning off auto sync and background data seems to be an ok idea. Probably
> > better than disabling net traffic?
>
> > BTW the previous methods for disabling apn was alright except for the re
> > enabling part which only worked with an airplane mode cycle. Couldn't you
> > make your app refresh airplane mode automatically every time data is re
> > enabled? I know apps can access the airplane mode part (Bit messy I know)
>

Nitin Philip

unread,
May 2, 2010, 10:27:28 PM5/2/10
to juiced...@googlegroups.com
Its nearly instantaneous when switching to airplane mode and about 2-3 seconds to switch back to normal. Cycling airplane mode after ifconfig up works all the time.

I can somewhat sympathize with you on the whole CDMA business; I used to be an ardent CDMA hater until the Droid came out. It was the first Android phone with half decent hardware specs, and it still manages to hold its own thanks to how versatile the OMAP 3430 chipset is (overclocking ftw!).

There simply HAS to be a way to modify the APN settings at an OS level, some XML file somewhere that determines what dns server to connect to. I actually think this is possible because there are certain people that can "flash" your CDMA phone to a different network by modifying the PRLs (preferred roaming list, which as the name suggests is responsible for what towers/carriers the phone picks up network signals from). Now the interesting part is that these people can also make data work completely with a different network, and this is only possible by modifying the APN list since you can't connect to verizon's servers on from a non verizon number. If you can modify the APN list to make the droid connect to a different network, you can also disable it!

Unfortunately these people won't share their secrets and they charge you about 150 bucks for the network switch deal. I don't know if you visit howardforums, but there's quite a lot of reliable information about APNs and CDMA phones and stuff there. The difficult part is finding the right info!

Nitin Philip

unread,
May 2, 2010, 10:35:59 PM5/2/10
to juiced...@googlegroups.com
On a related note, I sent an E-mail to a fella who had data working successfully on MetroPCS (That's a different CDMA carrier here in the US). He mentioned something about hex editing a certain file in /system, but failed to mention which one exactly. Probably an XML file? Some of these are in binary form so hex editing is the only way to modify the values. Hopefully he replies back.

Oh and yeah, gonna need root obviously.

Fernando Takai

unread,
May 3, 2010, 10:12:47 AM5/3/10
to JuiceDefender
Testing it under 2.1-1/rooted and it's working quite well - it
discovered that my phone is rooted, and everything worked as
expected :D

Hyatari

unread,
May 3, 2010, 1:21:43 PM5/3/10
to JuiceDefender
I see auto sync in the log but no control button for it?

On May 2, 6:45 pm, Mark Lowne <marklo...@gmail.com> wrote:
> apk here:http://groups.google.com/group/juicedefender/web/JuiceDefender145.apk
>
> This one should be fully functional for GSM phones - if the setup has
> an happy ending (and by all means it should), please test it throughly
> and let me know of any surviving bugs.You

marklowne

unread,
May 3, 2010, 2:01:37 PM5/3/10
to juicedefender
@Nitin: some precious info! I'll go study this PRL business and see
what I can make out of it. (any specific link to suggest?) Of course
the big, big problem is that I don't have a Droid to play with... It's
like when aunt Clara calls and says "my internet is not working!".
After looong minutes spent with the obvious "plug the cord, click the
button" stuff, you realize the problem is in the DHCP client, or the
hosts file, or a corrupt driver, or something else that is going to
require HOURS to fix via on-the-phone-assistance. No rosy scenario....
so bug the guy until you get an answer! :)

@Hyatari: the button only shows when nothing else works (i.e.,
currently on CDMA phones). If the APN works normally, it'll just be
enforced enabled behind the scene.

Tony Harverson

unread,
May 3, 2010, 4:21:39 PM5/3/10
to juiced...@googlegroups.com

I've been testing this both near my wireless points and away from them, and so far, it's worked great.  I answered yes to the pin prompt, and haven't had the pin problem recur. 

Tony

Fernando Takai

unread,
May 3, 2010, 9:03:01 PM5/3/10
to juiced...@googlegroups.com
Found a bug, i think.

If i have autosync off JD will enable it next time it enables my apn
and it keeps it enabled.
--
Fernando Takai

Nitin Philip

unread,
May 4, 2010, 6:04:36 PM5/4/10
to juiced...@googlegroups.com
Well, good news Mark! (I hope). I'm switching to MetroPCS because I'm sick of paying Verizon 70+ bucks a month for basic phone service (I'm a poor college student and they've mooched off me enough for the past 2 years). A guy offered me the "software + instructions" on how to modify the PRL's and get 3G working for a modest price. I think the magical software is actually Qualcomm's CDMA workshop, and the instructions on getting data working (the key!) is probably about how to edit some XML file. This is all quite legal actually, the carrier's themselves offer this service (no data though)!

It took me quite a bit of searching on Craigslist to find someone that can get data working on the Droid, most people could only manage to get talk + text. Will let you know how I modified my APN settings if I succeed.

Nitin Philip

unread,
May 4, 2010, 9:22:05 PM5/4/10
to JuiceDefender
*Grumble grumble*

Guess it wasn't some XML file :(

Here's how you change the APN settings on the Droid.
http://www.howardforums.com/showthread.php?t=1639417&page=1&pp=15
Also http://www.howardforums.com/showpost.php?p=13710105&postcount=301
(Cricket is another network provider like Verizon)

It looks like you have to use QPST to modify some settings, and it
seems to be modifying the baseband (i think?) to get it to change the
APN. That err.. sounds a lot more complicated than the whole RIL
business you were attempting! QPST is a PC program and you need to put
your Droid in diag mode to get it working too, so I think its outside
the scope of your app. But check out the thread anyway and see if you
can figure out how exactly it works, since they don't explain it.

I never imagined having to go through so many hoops just to change my
damn APN! I'll keep you posted if I find any alternative ways.

Dave

unread,
May 5, 2010, 3:15:24 AM5/5/10
to JuiceDefender
Just tried it on my non-rooted GSM Nexus One. The first time I ran
setup, the APN control tested fine. However, I ran it again afterwards
and it always fails now. (Tried it 3 more times.) Do you need a
logfile or something?

Julián

unread,
May 6, 2010, 11:14:47 AM5/6/10
to JuiceDefender
Hi!

I'm trying this version And i found the same problem than before... It
no activate automatically the gprs and turn it off...

Im using Android 2.1 on a HTC Desire.

Andrés López

unread,
May 6, 2010, 1:42:15 PM5/6/10
to juiced...@googlegroups.com
In my experience, it's working great on a Motorola Milestone with Android 2.1 rooted.
Previously i would lost 3g connection after a few hours, but it's been working without trouble for the last couple of days.
The setup detected that the phone is rooted and configured the APNs correctly.

Thanks

Mark Lowne

unread,
May 9, 2010, 8:01:57 AM5/9/10
to JuiceDefender
@Fernando: thanks, that's now fixed.

@Nitin: In my endless RIL explorations, I think I found something
relevant for CDMA; there is indeed a system xml file involved and some
sort of cross-validation with the vendor implementation of the RIL.
Bad news: from *that* point of view, it is very much possible (and as
you discovered, that's indeed the case) that the baseband has to have
its say too. More bad news: even if it wasn't, it's pretty much
impossible to intercept that thing - it'd surely require patching the
vendor RIL library (which lacks sources); so, I guess we can finally
put a big 'fail' sticker to the APN business on CDMA.

Good news: I actually finally managed (with *unbelievable* amounts of
sweat) to talk to the RIL in a semi-reliable way. I *might* be able to
talk the RIL into switching the modem off (didn't try that one yet,
don't know for sure if it's possible).
Counter-good news (a.k.a. even more bad news): it involves all sorts
of hacks, so far it only works on my (new!) N1 w/ Cyanogenmod, and if
all goes well it's going to work *only* on Cyanogenmod-based ROMs
anyway. Guess it's better than nothing...
Is it popular enough on the Droid? (well, I guess I could make it work
on other ROMs that have full sources, but I'd rather spare myself the
pain...)

@Dave: doesn't it ask to send the logfile after setup fails? It
should! If it does, please do send it; otherwise, send it manually via
'help', 'send feedback'.
@Julián: does the setup succeed? Again, please send me the log :)


Sweet new build coming later today!

Mark Lowne

unread,
May 9, 2010, 8:13:17 AM5/9/10
to JuiceDefender
@Julián: "disregard that", I found your log. Guess it's a problem with
ping... Can you confirm that your mobile data connection *does* work
prior to running setup? (disable WiFi, load some web pages to make
sure, then run setup).

quattro

unread,
May 9, 2010, 8:44:49 AM5/9/10
to JuiceDefender
some discoveries about turning off the background sync:

it seems that once turned on again, the OS does some sort of a full
sync which produces a lot of traffic.
hence using up a lot of energy.

I have to admit, that I was one of those who asked for this feature.
now it seems to be not such a good idea.

also interesting:
wifi seems to be much less power draining then 3G.
I've left JD disabled and had the phone on wifi all the time. (no turn-
off while screen off in android's settings)
and now, after over 24h with normal usage I still have 50% battery
left.

all observations done on a Moto Milestone(Droid) with android 2.1 and
root.

-q

Julián

unread,
May 10, 2010, 2:41:35 AM5/10/10
to JuiceDefender
Hi!

Webpages works fine And I still get tuerto error.

Austin Hsu

unread,
May 10, 2010, 1:40:45 PM5/10/10
to juiced...@googlegroups.com
Hi Mark,

Cyanogenmod has a pretty large user base. There are several big names in the ROM world, CM is one of them.

And I'm pretty sure CM is VERY popular on the Droid. Aside from strong sales (did you read the news? Android OS overtook Apple OS for Q1!), the chip can be overclocked to Nexus One speeds. I always wondered how much the N1 could be overclocked but apparently it's not much more than 1.13 Ghz or something. My Droid scales up to 1.2 Ghz right now.

So, because CM is essentially Nexus 1 software (3d launcher, 5 screens), this gives a lot of people who bought a popular phone with good hardware a very good choice.

http://forum.cyanogenmod.com/index.php

The Motorola Droid forum seems to have more activity going on than the N1. Koush is the main man behind porting CM to the Droid. You should talk to him. PDR447 seems to be very knowledgeable as well.

Nitin Philip

unread,
May 10, 2010, 6:33:50 PM5/10/10
to juiced...@googlegroups.com
Hmm, I don't know if you've tried this but it sort of works on my Droid. Typing radiooptions 7 in adb disables data for me. Can someone else test this and see if it works too? The binary should be included in most ROMs, but if not I'm attaching it here. Push the binary to /system/bin/
radiooptions

Nitin Philip

unread,
May 10, 2010, 6:35:28 PM5/10/10
to juiced...@googlegroups.com
Oh yeah, I can't get it to re-enable data though. lol.

Andrés López

unread,
May 10, 2010, 7:26:35 PM5/10/10
to juiced...@googlegroups.com
Just a simple question, and sorry if it has been asked before, but why not use the same method as APNDroid? I think it works fine in every Android device.
Basically, it changes the url for the APN with a prefix, so no connection is possible.

Peter Hartman

unread,
May 11, 2010, 6:38:45 PM5/11/10
to JuiceDefender
I am getting the same. Sometimes it works, but usually the APN remains
disabled and requires an airplane mode toggle or a reboot to
recover...

Mark Lowne

unread,
May 12, 2010, 8:37:13 PM5/12/10
to JuiceDefender
@Julian and all Desire owners: thanks. So it's a ping error indeed.
Could you try opening a terminal (for example you can use ConnectBot)
and typing this:

ping -c 1 -W 5 www.google.com

and let me know the output - make sure you have a working mobile
connection (not wifi) first!


@quattro: that's weird, can you confirm it does so consistently? Can
you isolate which app(s) are causing the full resync? (Go to settings/
sync and try toggling the various pieces one at a time). Over here
that doesn't happen at all - it transfers a total of maybe 5kb (WITH
one or two new emails included).


@Andrés: JD used the same method from the start (I actually found out
about APNdroid later, when users started reporting problems when using
both JD and APNdroid...).
However: APNdroid does NOT work on CDMA phones, and now we know enough
about the matter to say that no app will EVER be able to change the
APN on Droids (well, unless moto+vzw decide to rewrite their broken
firmwares, but that's as likely as the Pope winning the Nobel prize on
physics).


@Nitin: interestingly enough, radiooptions 7 on my GSM phones does
deactivate the data connection - only to reactivate it immediately
afterwards. Not sure it's supposed to do that. Anyway, so airplaning
doesn't fix it? You should try first with

radiooptions 6 something

where 'something' is either an APN id number (from the APN db in data/
data/.....telephony/databases/telephony.db, if I remember correctly)
or an APN proper (I mean the string, I don't remember what it is for
vzw). Over here, no matter what I type, it just shows some stuff going
on on the radio log, then always tries to reconnect (successfully,
since it's already connected) to the default APN.
Anyway, try with that and THEN with airplaining. Perhaps it's
something similar to the ifconfig down/up/airplane procedure.

Another question: the above procedure does also work with your native
netcfg? (e.g. /system/bin/netcfg ppp0 down, netcfg ppp0 up, airplane
on/off) If not, does it work with the 'jnetcfg' binary in /data/data/
com.latedroid.juicedefender/files ?


@Everybody on CDMA: could you check the setuid bit of ifconfig, netcfg
and radiooptions on your ROM? i.e. can you run these commands also
from non-root? (or, cd /system/bin and ls -l netcfg and see the first
letter). I read somewhere that on stock Android only netcfg and ping
have setuid...


@Everybody on GSM: a new build is ready (and, apparently, working
well) - I'll post it tomorrow.

Rod Hull

unread,
May 14, 2010, 5:32:12 AM5/14/10
to JuiceDefender
On 4 May, 02:03, Fernando Takai <fernando.ta...@gmail.com> wrote:
> Found a bug, i think.
>
> If i have autosync off JD will enable it next time it enables my apn
> and it keeps it enabled.

I have seen this too - on a stock ROM HTC Desire with JD versions 144
and 145 - if Auto-sync is disabled (through the Power Control widget,
or in the Settings menu), then JD seemed to turn it back on by itself.
It also at the same time re-enabled my Wifi which had been switched
off previously. I disabled both auto-sync and wifi again, put the
display to sleep and checked a few minutes later and both had been re-
enabled at the next APN activation, and a "full" sync was being
attempted. Also bizarrely, airplane mode was turning itself on/off at
times...

ratson

unread,
May 14, 2010, 5:34:32 AM5/14/10
to JuiceDefender
is it really needed to initiate a full sync every time when phone
returns from suspend?
experiencing it on rooted N1

D.

unread,
May 21, 2010, 12:52:29 AM5/21/10
to JuiceDefender


Hi,

I'm running JD 1.45 on a unlocked Motorola Milestone, running Android
2.1, and using it on GSM. Has anyone else noticed that after
unplugging, or plugging the phone into a charger, the CPU maxes out at
100% for about 3 minutes? Is there a work around or fix for this?

I decided to give this version a try, as I hoped it'd be more stable
than some of the more recent versions as there seems to be a lot of
newer CDMA work being done.

On the plus side, it seems to switch between APN and WIFI quite well
so far, and it does so much quicker than the V1.37 (on the Market).

Thanks!


Mark Lowne

unread,
May 21, 2010, 6:29:44 PM5/21/10
to JuiceDefender
Don't worry about all the CDMA stuff - if you can get past the setup,
you're all set (and JD won't use CDMA-related things). So you should
try the latest beta, as the abovementioned problems with AutoSync (and
many others) should be fixed ;)

Knowthenazz

unread,
May 22, 2010, 1:16:50 AM5/22/10
to JuiceDefender
Thanks for your advice Mark!
Reply all
Reply to author
Forward
0 new messages