yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] killian32:
Have you tryed to flash, from CWM, the zip in the first post ?
[Android Apps and Games] TheMasterBaron:
It is possible. But it requires that you manually extract all the APK files off of your phone and put them in your own ZIP file. Then run the resign tool on that ZIP file. Finally, you need to manually copy the APKs back onto your phone.
[Android Apps and Games] twinsen.net:
Does this plugin work on Cyanogenmod 10 (4.1.2)?

And second question - why there is need of resigning all apks in the system, how they are connected to 2g/3g switching??
[Android Apps and Games] TheMasterBaron:
1. Yes, without resigning.

2. Only the system can change networks. Toggle2G needs to be a system app and so must have the same signature as the system.
[Android Apps and Games] _drone_:
It didn't help. I made a full backup, then untar files and zipped obtained folder. ResignUpdate finished Ok so I unzipped *resigned.zip and took all the files which were resing_alligned into ResignUpdate log. These files were from data/media/RootUninstaller/autobackup (com.android_stk4.0.4-65.apk), couple from /system/framework (framework-res.apk , moto-res.apk) and a lot from /system/app folders. I pushed them back to the appropriate phone folders using adb shell into restore mode but after restart got only softbrick. Did I made something wrong?

---------- Post added at 01:55 AM ---------- Previous post was at 01:44 AM ----------

Yes I had.
[Android Apps and Games] 93ae8074:
You forgot a factory wipe, it's mandatory.
[Android Apps and Games] enjawd:
only know if this works on normal stock rom? tried on a samsung s3 lte version but nothing seems to happen
[Android Apps and Games] TheMasterBaron:
I've also noticed this, I'll play around with it. It may be a timing issue where I'm switching to the 2G network before the network is handed off to the WiFi connection. If I can't get it working perfectly, I'll add some sort of option.

Cheers,

MB

P.S. And akxak, thanks for taking the time to answer some of the other posters questions.
[Android Apps and Games] akxak:
Additionally, I experience here a problem with reconnecting to an available wifi network. I have to disable and manually reenable wifi to get connected. After that, wifi remains connected as long as my Desire is not switched off too long.

I would prefer (as I can control wifi with other local plugins) if I could restrict Toogle2G to just what its name says... enabling or disabling 3G via Locale where Toogle 2G should first check if the requested state is already active and then just skip any action.

You're welcome.
[Android Apps and Games] akxak:
@TheMasterBaron

Btw. did you check regarding permissions in which context the "Energy control" widget (which is available at least with OpenDesire) is running?

That widget has an option to toggle 2G/3G.
[Android Apps and Games] TheMasterBaron:
If you don't use the automatic setting, then Toggle 2G will do nothing unless Locale tells it to. Including changing to 2G when wifi is on. So just never set it to automatic if you want 100% control.

Toggle 2G also does not set the network if it's already in 2G or 3G. Meaning if 2G is already enabled, setting it to 2G does nothing. I have

Cheers,

MB
[Android Apps and Games] Ok_Kaleidoscope5109:
has anyone tried this on another phone? a non nexus one?
[Android Apps and Games] razorseal:
I've been trying to get it to run Droid with verizon. The dev and I were emailing eachother back and forth about the settings, I had to go through troubles of unrooting and stuff, but I figured out where I was wrong.

It works with Simply Stunning 4.7 btw, I'm testing it on CM6 now, but I'm going to switch back to SS 4.7 momentarily and do some more testing on SS instead as I prefer that rom
[Android Apps and Games] akxak:
Although I have superuser installed, Toggle2G never requested su rights and automatic switching is frequently enabled when calling setup.
[Android Apps and Games] bigr1979:
I had this working perfectly on adam g's official froyo with sense 1.0c, I have just updated to Leedroid 2.0c and it wont install at all, any ideas ?
[Android Apps and Games] TheMasterBaron:
I've uploaded a version(In the first post) that is unsigned so that ROM builders that do not use the same CM6 cert can sign the apk for their users. Leedroid is obviously is not using the same cert and CM6. You need to ask for them to sign it using their platform cert, or have them publish the cert and you can sign it yourself.
[Android Apps and Games] gens:
Very useful. thank you!
[Android Apps and Games] bigr1979:
Nice 1 I appreciate the reply, Cheers :)
[Android Apps and Games] EnhancerFIN:
Is anyone else experiencing the same, that those preset 2G and 3G networks keep on going to their default settings? I´ve configured those so, that my default 2G network is GSM auto prl, and my default 3G is WCDMA only.

I´m not sure, but I think rebooting the phone at least resets those (2G = GSM only, 3G = WCDMA preferred), and that is really annoying. Also the 2G/3G auto setting goes disabled by defauld, and the 2G when wifi get´s enabled.

The reason for me to configure it this way is, that I wan´t the 3G to be automatic always, until I put my phone to the car dock, there I wan´t WCDMA only for audio streaming. I´m doing this toggle from tasker, using the inbuilt locale plugin, which tasker can command also.

It would be great though, if we could get a fourth option for the locale plugin / software, as then one could select preferable 2G/3G auto (gsm auto prl in my case), 2G only, 3G only and the automatic control from the toggle 2g software (screen off, wifi, battery level etc.) Would this be an impossible idea?

I use latest CM6 nightly, with the froyo radio.
[Android Apps and Games] TheMasterBaron:
Try un-installing toggle 2g and re-installing. Be sure to allow toggle 2g su permissions the first time you run it after installing otherwise setting will not be saved.

It would be possible to add support for selecting a specif network in the locale plugin instead of just 2g/3g/auto. I'll add it to the features to add.
[Android Apps and Games] EnhancerFIN:
Thanks for the help, I think that the re-install will do the trick, since I switched recently to the market version of your app, but didn't clear the su permission.

Possibility to select a specific network would be a dream come true, I think I'm not the only one who would like to have rules for example app x --> 3G only etc.
[Android Apps and Games] Deegan87:
I'm using toggle 2g on my cliq running the Eclair2Cliq rom and it works brilliantly so far.
[Android Apps and Games] bigr1979:
Ah, I really want to get this working again, I posted in Leedroid's rom thread but nobody made any response..... How on earth would I go about signing this app to work with this ?

Ive tried reposting again.....
[Android Apps and Games] TheMasterBaron:
Check out this post as the 2nd step shows how to signing it using signapk. http://www.londatiga.net/it/how-to-sign-apk-zip-files/

The first step about using openssl you will not do. Instead you need to get the .pem and .pk8 files from Leedroid and use them instead.

So you'll end up running something that looks like this:

java -jar signapk.jar leedroid.pem leedroid.pk8 toggle2g-unsigned.apk toggle2g-signed-leedroid.apk
[Android Apps and Games] TheMasterBaron:
Thanks! I'll add that ROM to the list of working ROMs
[Android Apps and Games] Albert Poon:
I am using MCR R9 on Desire and it's working so far.

Suggestion:

1. Since the widget offers selection of 2G / 3G / Auto, please allow us to define all selections including Auto, instead of only 2G Network and 3G Network. Currently, the widget with icon A does nothing for me.

2. Group "2G Delay", with "Auto Manage 2G/3G" in settings. Guess they should be linked? i.e. if "Auto Manage 2G/3G" is disabled, "2G Delay" should be dimmed.

3. Allow disable of "2G Battery Level". Maybe add 0%?

Some more questions.

The logic of this app is to use 2G under these scenarios:

I. Sleep

II. Battery Level < X

III. Wi-Fi is On

Which of them is having higher priority? Is it either one of them will trigger switching to 2G? Moreover, if "Manually Activate 3G" is unticked, does it require all 3 scenarios to be negative to resume 3G automatically?

Thanks!
[Android Apps and Games] TheMasterBaron:
Can you explain this some more, I'm not sure what you mean?

Actually, all the options are linked to the Auto mode except the 2G and 3G Network selections. But I can certainly look to make it more obvious by enabling and disabling the options.

Seems reasonable

2G and 3G are never changed if your in a call.

2G is set if:

1. Phone is asleep for x minutes

or

2. Phone is asleep and battery is < x

or

3. WiFi is enabled (With a 1 minute delay)

3G is enabled (Automatically or Manually) if

1. Phone is awake

and

2. WiFi is off

and

3. Battery > x

I hope this help clear things up.

Cheers,

MB
[Android Apps and Games] 93ae8074:
It does mate.
[Android Apps and Games] enjawd:
thanks, ill try to figure something out.

---------- Post added at 05:09 PM ---------- Previous post was at 05:03 PM ----------

i tried to install the APK but it failed, any idea why? :confused:
[Android Apps and Games] _drone_:
Thanks it helped. But only after I changed permissions of resigned files to rw-r--r--.
[Android Apps and Games] eyeseal:
If the following functions already exists, then please ignore them. :p

Idea:

1. As a plugin for Takser's profile or for internal use of this app, store the current network state (No network/2G/3G only/3G preferred/4G) to a variable. I want this function because the internal one in Tasker is not accurate.

For example, a profile called 'is3G' to detect whether the network is 3G is created, then if my phone is currently in 3G, after wifi is turned on, 'is3G' is disabled. Another example is that if the network is switched from 2G to '3G preferred', it will be still detected as 2G. It will be only correctly detected as 3G when the network is switched to '3G only'.

Not only for Tasker's profile plugin, this idea can also be internally used in auto mode of Toggle2G, please see idea 2.

2. When Toggle2G is in auto mode and it is switching network, keep checking the variable stored from idea 1 if the network has successfully been switched. If not, switch again till the network is switched.
[Android Apps and Games] 93ae8074:
Hi there,

Is it possible to implement a feature to activate 3G when WiFi is disconnected?

The idea is to be in 2G only when a WiFi connection exists.

What do you think Mr. Baron?

Cheers.

--

Carved from my GN using my knife for human sacrifices
[Android Apps and Games] CptanPanic:
Looking at my phone status screen, phone is not connected to 3g or 2g when connected to wifi by default. This is on 4.2.1
[Android Apps and Games] aMerkuri:
@TheMasterBaron

Can you implement feature to turn off data between hours (night time)?

Thank you for providing amazing app.
[Android Apps and Games] 93ae8074:
On WiFi our phone is always connected to 2G or 3G, if there is enough coverage, of course. What you are seeing is that your E, G, 3 or H symbols aren't present.

Am I mistaken Mr. Baron?

Cheers.

Update: I'm in doubt, after connecting to my phone and checking network routes I can see only my WiFi IP address. I suppose that you are right... :-?
[Android Apps and Games] TheMasterBaron:
1. I suppose I could expose the current network setting to Tasker. I will need to look into that implementation.

2. If the network does not change, then trying over and over doesn't seem like it will do much except waste battery

That feature is already there. It should switch back to 3G when WiFi is disconnected.

You can use other apps to do this. Like JuiceDefender.

When I'm on WiFi, I see the network still connected. I've attached a screen shot.
[Android Apps and Games] 93ae8074:
Oh, yeah! I tried, the description in the feature it's not clear regarding enabling 3G back. Anyway, it is common sense. Nice!

Yeah, same here, that corroborates what I though.
[Android Apps and Games] eyeseal:
For idea 1, could you also expose data connection(Connected/Disconnected/Connecting) to Tasker?

For idea 2, how about

a) check the variable per few seconds, limit the number of checking

b) stop changing when facing any error and tell the user

c) do not check the variable when the app is checking the traffic (threshold)

d) perform the changing only after the network is COMPLETELY changed (in Connected state), because I found that changing the network when it is in Connecting state might cause some problems.

e) stop all previous tasks when new task arrives (for the case of continuous turning off the screen and unlocking)

And I would like to add 2 more idea.

1. vibrate after the network has successfully been changed (may be it is an option that users can decide to turn it on or not)

2. If "unlock -> change to 3G" is selected, then one more option which is "hold 'back' key to prevent the changing (keep on 2G)" will be available
[Android Apps and Games] treszerotres:
Help please

the first thing I apologize for my English.

I'm from Spain and my English is a bit low

My problem is that when starting the app Togle v 0.3.4 to adjust the options I get an error:

The process has stopped Com.android.phone

What is the solution?

I'm using a Galaxy S2 Rom Nakrdroid ICX3

PS: Some time ago I put the toggle and never had any problems.

Thank you very much in advance!!

:good::good::good::good:
[Android Apps and Games] el_campi:
+1 The same problem for me too, i'm on Super Nexus ROM. The problem is that the program crash when i do scrool down.

The program works fine, the problem is that i can't acces to the options of the bottom.

Thanks.

AUs
[Android Apps and Games] zaratustraelimpio:
+1
[Android Apps and Games] treszerotres:
that's the only problem.

when you do scroll, jams App
[Android Apps and Games] 93ae8074:
Yo que tú probaba a responder en Inglés que es el idioma oficial del foro. ;)

Sorry guys... I know, I know, English from now on.
[Android Apps and Games] TheMasterBaron:
I'll need someone to post some logs of the crash using logcat. I don't have any idea why it would crash on scroll since it's a simple preferences page.
[Android Apps and Games] raditz_dbss:
Same problem!!!! using [jOP40D] OFICIAL ANDROID 4.2.1 <Beta 5> (JB) GALAXY NEXUS STOCK ROM on a Galaxy S
[Android Apps and Games] 93ae8074:
I think that is due a resigning problem. Seems quite similar to my first problems with Toggle2G. May I recommend that you resign the ROM even if it's not stock?

<Spanish>Tiene toda la pinta de tener que ver con el firmado de la ROM. Se parece mucho a un problema que tuve al principio yo con la aplicación. ¿Por qué no haces un firmado con la aplicación Resign del Zip de la ROM y luego un Wipe Factory y la instalas?</Spanish>

Cheers.
[Android Apps and Games] Javi22:
Hello, I am thinking about resign the Rom I use (currently not compatible) so I can try this mod :) But I have read that the app Toggle2g itself wastes battery when is running. Before doing anything I want to ask If is there any chance to use only the tasker plugin so I can configurate it as I want with tasker, with no using the main app

I ask this because is a lot of work to resign the rom, make a fresh install, restore all apps and data... So I want to be sure If it worth it :) Thank you
[Android Apps and Games] TheMasterBaron:
I'm not having this problem so I can't fix it. I need someone who is having the problem post some the error that would be logged in the logcat.
[Android Apps and Games] Stryder5:
Haven't noticed any battery drain. If anything, battery life improved. And yes, you can leave the app disabled and only use the Tasker plugin.
[Android Apps and Games] 93ae8074:
Your phone uses more battery switching networks. If switching is constant or it really really switches many times it will waste your battery, but this is an unlikely scenery.

I'm just switching to 2G when I'm on WiFi and I'm getting much better battery life at the end of the day.
[Android Apps and Games] Javi22:
Ok, that's what I wanted to know. Thank you!

That's what I was thinking, by switching networks many times might waste even more battery. So my intention is to use the Tasker plugin to switch 2g when I'm in a wifi network, instead of switching 2g every time I turn screen off :)

Thank you
[Android Apps and Games] Stryder5:
The app already has this feature built in. It was my original intention to use Tasker to do that as well, until I found out the app can already handle it.
[Android Apps and Games] Javi22:
Yeah I know it does, but I've read more than one time that keeping the app enabled waste a bit of battery. I don't know if it's true or not so I am just going to make test, if there is no extra drain, obviously I will use the app :)

PS: I have just made the resign process with the PC. It has done many things... does it affect any way in the performance of the rom?
[Android Apps and Games] Stryder5:
I've never seen the app use enough battery to even be listed under the battery stats.
[Android Apps and Games] Javi22:
Ok I've resign the rom and flashed it, but I get the same error as this user when I try to start the app

Any idea? Thank you!
[Android Apps and Games] 93ae8074:
Nope.

---------- Post added at 08:37 AM ---------- Previous post was at 08:35 AM ----------

Why don't you take a logcat? I will be quite useful to see what's happening. I used Toggle2G in the stock ROM, Xylon v14, Purity 3 and now with AOKP without any trouble at all.

Do a installation of Toggle2G-3.4-Update, sometimes when Toggle2G didn't work straight after ROM flashing it helped me.
[Android Apps and Games] Javi22:
Thank you for helping :)

Please how can I get a logcat? I have already flashed the .zip but the process still crashing at start
[Android Apps and Games] 93ae8074:
It's easy just execute in your computer

adb logcat Toggle2G

open the app and send the result to its developer. :)
[Android Apps and Games] Javi22:
Ok, thank you

Sorry but I am a bit lost with this xD I type "adb logcat Toggle2G" in cmd, but It shows a loooot of things, and it dont stop appearing lines (it still running and appearing more lines...)

So I dont think it is what you need. Indeed I can read many apps names on the lines, not only "Toggle2G" app

Btw, when I made the resign, I didnt have adb drivers full installed in windows. Could it be related to the problem?
[Android Apps and Games] 93ae8074:
You've got a PM.

My fault, Javi do this please:

adb logcat Toggle2G *:S > logcat.txt

It will create a file called logcat.txt that contains all the information needed to check your problem.

If you remove > logcat.txt you can see trace messages directly in your screen.

Regarding your ROM resign process, it's not necessary to have installed ADB in your computer unless you're using adb push to send your new ROM to your device.

Cheers.
[Android Apps and Games] Infy_AsiX:
Loved having this work on my S3 with stock based rom. However I found a bug. Tethering doesn't provide an internet connection with the mod. Things can connect to it but on the tethering phone it doesn't acknowledge a connection like it normally does. A factory reset with stock rom gets tethering working again. Simply flashing over a Toggle 2G rom with stock unmodified doesn't fix the problem.
[Android Apps and Games] Javi22:
@93ae8074 Thank you. Here is the log created when I type it on cmd and then I run the app. I dont know If you can get something from here...I hope it is useful

C:\Windows\system32>adb logcat Toggle2G *:S
--------- beginning of /dev/log/system
--------- beginning of /dev/log/main
I/Toggle2G( 1297): loading preferences
I/Toggle2G( 1297): using shared preferences
I/Toggle2G( 1297): setting default network to 0

Cheers
[Android Apps and Games] TheMasterBaron:
Sounds like the resigned process is breaking the rom's ability to tether. I'm not sure there is much I can do about it. You could switch to a CM based ROM where your don't have to resign the rom.

The error isn't there. Try this, and be sure to trigger the error just before running this command. This command will list all errors for all apps on the phone

adb logcat *:E
[Android Apps and Games] TheMasterBaron:
Thanks, I'll take a look at this and see what I can do.
[Android Apps and Games] TheMasterBaron:
It's the Spanish translation file that's breaking Toggle 2G. The work around is to set you phone to English just long enough to set Toggle 2G settings. You can set it back once you make the settings.

I'll start working on a fix tonight.
[Android Apps and Games] TheMasterBaron:
I just released 0.3.5. This has the Spanish fix along with an addition of a "Always" switch mode. I also decided to rename 2G and 3G to "Low Power" and "Fast" since users can also use this to switch between LTE and 3G.
[Android Apps and Games] Javi22:
Hahahah thank you very much, let's see if it works, thank you for your quick fix

Edit: Yeah, of course is working. Good
[Android Apps and Games] Infy_AsiX:
It's a big shame Toggle 2G can't work with the tether. The S3's auto network mode works as WCDMA preferred not as true auto. I can't give up tether so poor signal battery life is the only go.

?????? Galaxy S3 ??????
[Android Apps and Games] akshat24:
I'm already using 0.3.4 ... Now how to use 0.3.5???? By resigning again???? :confused:
[Android Apps and Games] 93ae8074:
Quite curious, my phone is always configured to show English language, that's why it works here! :D

---------- Post added at 08:19 AM ---------- Previous post was at 08:19 AM ----------

Nope, just install Toggle2G-3.0.5-Update.zip using TWRP or CWM. You can just install the APK file too and reboot your phone.
[Android Apps and Games] akshat24:
Thanxxx for adding immediate option.. :):thumbup:
[Android Apps and Games] zaratustraelimpio:
Thanks TheMasterBaron!! It work fine in Spanish!! :good:
[Android Apps and Games] Infy_AsiX:
Toggle 2G is not at fault after all. It was Droidwall blocking root applications access to internet.

I got confused as flashing the Toggle 2G rom after factory reset wouldn't tether until after deleting the saved configuration on the connecting phone.

Sorry about the fuss. It's proven to me Toggle 2G is a must have that my battery would be so much poorer without.

?????? Galaxy S3 ??????
[Android Apps and Games] Javi22:
I think this might be a bug or something, I can't set the app to don't switch back to 3g itself. When I press on "when to switch to 3g" it displays three options : always, phone unlock and screen on. So I can't disable automatic switch to 3g

Indeed I check the "switch to 3g manually", and "use notification bar" as well, but the phone still switching 3g itself, always. If I go settings and put 2g manually, it just restore it to 3g.

Anyway, using tasker plugin might be a solution

Edit : just installed the plugin app and now it works :)
[Android Apps and Games] drtek:
Hi guys,

is this confirmed working on stock 4.2.1 on a nexus 4? Don't want to flash CM just for this nifty tool :)

Thanks,

Tek
[Android Apps and Games] TheMasterBaron:
It should work if you resign the ROM using the resign tool linked in the OP.
[Android Apps and Games] TheInVisibleGoD:
I'm using AOKP 4.2.1, is it normal that it takes like 2 or 3 mins to change from 2G to 3G after I enable data (I have "switch to 2G when data disabled" option enabled)? Just tested with 0.3.4 and 0.3.5...
[Android Apps and Games] TheMasterBaron:
Does it take a long time to switch when you do it manually through the 2G setting in the settings? Some phone's radios take longer than others to switch.
[Android Apps and Games] TheInVisibleGoD:
When manually, it switches in 5 sec or less... Would you like a logcat?
[Android Apps and Games] TheMasterBaron:
Is it disconnected for those 2 to 3 minutes, or does it take 2 to 3 minutes before it attempts to make the switch?

logcats are always helpful :)
[Android Apps and Games] TheInVisibleGoD:
Yes, it is disconnected for those 2 or 3 min.

Here you have it: ;)

http://pastebin.com/rh63EU9t