Hi,
I am trying to re-run the setup wizard. I'm aware that I can do a factory reset and it will come up, but id like to not do that. I found an adb command that may launch it :
adb shell am start -a android.intent.action.MAIN -n com.google.android.setupwizard/.SetupWizardTestActivity*
But that gives me a permission denied error. (Error is at the bottom of the post). Can anyone help me launch the setup wizard after it has*finished?
Alternatively, the only reason I'm trying to do this is to get back the ability to copy stuff over using the quickswitch adapter and cable. if anyone knows how to bring that up without the setup wizard, would be very helpful as well.
Thanks for all your help.
Error :
Starting: Intent { act=android.intent.action.MAIN cmp=com.google.android.setupwizard/.SetupWizardTestActivity } java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN flg=0x10000000 cmp=com.google.android.setupwizard/.SetupWizardTestActivity } from null (pid=6398, uid=2000) not exported from uid 10037 at android.os.Parcel.readException(Parcel.java:1684) at android.os.Parcel.readException(Parcel.java:1637) at android.app.ActivityManagerProxy.startActivityAsUser(ActivityManagerNative.java:3137) at com.android.commands.am.Am.runStart(Am.java:635) at com.android.commands.am.Am.onRun(Am.java:388) at com.android.internal.os.BaseCommand.run(BaseCommand.java:51) at com.android.commands.am.Am.main(Am.java:121) at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method) at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:262)
You need to do a factory reset to do that.
I did mention that I was aware that a factory reset would do that, but I would like to avoid that and do it in a different way. I know it can be invoked using adb, and I somehow was able to find the command as well, but didn't seem to work. Anyway, if anyone knows a way to do this without a factory reset, I would highly appreciate it.
It won't run unless you factory reset, that is what I was telling you, permissions will be denied otherwise.
The setup wizard only works if there are no accounts already setup on the device and the device is in an unsetup state. That only happens if you factory refresh.
Circling Back
So, just wanted to circle back... Contrary to the above, it is indeed possible*and I was able to do it and reproduce it reliably.*Long story short, it was the following two commands that did the trick :
1. adb shell
su
pm enable com.google.android.setupwizard/com.google.android.setupwizard.SetupWizardActivity
2. adb shell settings put secure user_setup_complete 0
The first command is case sensitive (SetupWizardActivity)
Thanks to this source for the help and guidance : http://android.stackexchange.com/qu...-setup-wizard-at-next-boot-using-command-line
taimoorhusain said:
So, just wanted to circle back... Contrary to the above, it is indeed possible*and I was able to do it and reproduce it reliably.*Long story short, it was the following two commands that did the trick :
1. adb shell
su
pm enable com.google.android.setupwizard/com.google.android.setupwizard.SetupWizardActivity
2. adb shell settings put secure user_setup_complete 0
The first command is case sensitive (SetupWizardActivity)
Thanks to this source for the help and guidance : http://android.stackexchange.com/qu...-setup-wizard-at-next-boot-using-command-line
Click to expand...
Click to collapse
Great job! I don't foresee I'd ever need to do something like this; however, I have great appreciation for all forms of ingenuity.
taimoorhusain said:
So, just wanted to circle back... Contrary to the above, it is indeed possible*and I was able to do it and reproduce it reliably
Click to expand...
Click to collapse
Congrats
I assume this requires root to enable? Any way around that? Thanks.
taimoorhusain said:
So, just wanted to circle back... Contrary to the above, it is indeed possible*and I was able to do it and reproduce it reliably.*Long story short, it was the following two commands that did the trick :
1. adb shell
su
pm enable com.google.android.setupwizard/com.google.android.setupwizard.SetupWizardActivity
2. adb shell settings put secure user_setup_complete 0
The first command is case sensitive (SetupWizardActivity)
Thanks to this source for the help and guidance : http://android.stackexchange.com/qu...-setup-wizard-at-next-boot-using-command-line
Click to expand...
Click to collapse
Thank you, worked like a charm! :highfive:
@taimoorhusain A million thanks!!! You just saved my phone.
taimoorhusain said:
So, just wanted to circle back... Contrary to the above, it is indeed possible*and I was able to do it and reproduce it reliably.*Long story short, it was the following two commands that did the trick :
1. adb shell
su
pm enable com.google.android.setupwizard/com.google.android.setupwizard.SetupWizardActivity
2. adb shell settings put secure user_setup_complete 0
The first command is case sensitive (SetupWizardActivity)
Thanks to this source for the help and guidance : http://android.stackexchange.com/qu...-setup-wizard-at-next-boot-using-command-line
Click to expand...
Click to collapse
THANKS A LOT IT WORKED!! You save my day because due to a pixel bug (this one) i was unable to do nothing unless i could open the SetupWizardActivity. Otherwise i would had to restore it.
taimoorhusain said:
So, just wanted to circle back... Contrary to the above, it is indeed possible*and I was able to do it and reproduce it reliably.*Long story short, it was the following two commands that did the trick :
1. adb shell
su
pm enable com.google.android.setupwizard/com.google.android.setupwizard.SetupWizardActivity
2. adb shell settings put secure user_setup_complete 0
The first command is case sensitive (SetupWizardActivity)
Thanks to this source for the help and guidance : http://android.stackexchange.com/qu...-setup-wizard-at-next-boot-using-command-line
Click to expand...
Click to collapse
Do you need root for this?
Yes, you need root - doesnt appear to be possible to do it without.
I created an ' activities' shortcut using Nova launcher (it's added as a widget) by selecting pixel setup from the activities list. Super easy! And doesn't require root I think...
cant restore from cloud, thoguh
This works without root access
Code:
adb shell am start -a android.intent.action.MAIN -n com.google.android.setupwizard/.deferred.DeferredSetupWizardActivity
Xdevillived666 said:
cant restore from cloud, thoguh
Click to expand...
Click to collapse
Yes it just cycles through the set up skipping the restore. How do we get the app restore part
Maybe just remove the google ac ? and then it will come to the restore part ?
If someone get the restore wizard running . Holler ....
taimoorhusain said:
So, just wanted to circle back... Contrary to the above, it is indeed possible*and I was able to do it and reproduce it reliably.*Long story short, it was the following two commands that did the trick :
1. adb shell
su
pm enable com.google.android.setupwizard/com.google.android.setupwizard.SetupWizardActivity
2. adb shell settings put secure user_setup_complete 0
The first command is case sensitive (SetupWizardActivity)
Thanks to this source for the help and guidance : http://android.stackexchange.com/qu...-setup-wizard-at-next-boot-using-command-line
Click to expand...
Click to collapse
I just want to confirm that it worked on HavocOS on OnePlus 6T rooted.
I had an incident of total freezing, phone entering the Qualcomm CrashDump Mode, which I fixed by fastboot booting into twrp and reflashing (dirty flashing) the rom, twrp, gapps and magisk. Then it would notify me that I need to finish setting up the phone, but it didn’t worked (clicking the notification did nothing and I could not dismiss it). After running those two commands and rerunning the setup, it is effectively dismissed.
taimoorhusain said:
So, just wanted to circle back... Contrary to the above, it is indeed possible*and I was able to do it and reproduce it reliably.*Long story short, it was the following two commands that did the trick :
1. adb shell
su
pm enable com.google.android.setupwizard/com.google.android.setupwizard.SetupWizardActivity
2. adb shell settings put secure user_setup_complete 0
The first command is case sensitive (SetupWizardActivity)
Thanks to this source for the help and guidance : http://android.stackexchange.com/qu...-setup-wizard-at-next-boot-using-command-line
Click to expand...
Click to collapse
Saved me TWICE within 1,5 month
taimoorhusain said:
Circling Back
So, just wanted to circle back... Contrary to the above, it is indeed possible*and I was able to do it and reproduce it reliably.*Long story short, it was the following two commands that did the trick :
1. adb shell
su
pm enable com.google.android.setupwizard/com.google.android.setupwizard.SetupWizardActivity
2. adb shell settings put secure user_setup_complete 0
The first command is case sensitive (SetupWizardActivity)
Thanks to this source for the help and guidance : http://android.stackexchange.com/qu...-setup-wizard-at-next-boot-using-command-line
Click to expand...
Click to collapse
An old thread, but a life saver!!!
To get this to work for me on a Moto g power running AICP-15 (Android Q), I had to remove the "adb shell" part im line #2.
Related
Ok... If your wimax isn't working and you want to downgrade to try to get it working this is how to do it...
1st get all of the files like you want to do Toast's Part-2. link: http://forum.xda-developers.com/showthread.php?t=701835
Then do this part:
STEP 2~FLASHING MTD PARTITION TO ENABLE DOWNGRADE:
- download all files posted above
- unzip the flash_image.zip and the mtd-eng.zip
- put the flash_image and mtd-eng.img on the root of your sdcard
- go into shell on ur pc and do:
adb shell
cat /sdcard/flash_image > /data/flash_image
chmod 755 /data/flash_image
/data/flash_image misc /sdcard/mtd-eng.img
- this should only take a second or two
- now put the PC36IMG.zip on the root of your sdcard
- power off the phone
STEP 3~FLASHING ENG BUILD:
- hold volume down + power to boot into hboot
- it should now find and verify the PC36IMG.zip on the root of your sdcard. itll show a blue status bar on the top right of the screen.
- after a minute or so it will ask u if u wanna flash SAY YES
- affter it flashes the PC36IMG.zip it will ask if you wanna reboot. SAY YES
After if finally boots you should see HTC quietly brilliant which hangs forever but it should eventually get past it. Once it does you will have the oldest everything. This is a beta build and has a bunch of tools but just do an upgrade to root like you normally would. I would suggest going to .6 then upgrading to the latest 47 from there.
Hope that this helps someone.
P.S. is anyone willing to dump all of the tools that are included in this rom. It might be helpful for the other devs.
Thats the hard way... but yeah it'l work.
Why is everyone so hype on adb everything...?
Tell me the easy way. I would love to do it instead.
kthejoker20 said:
Thats the hard way... but yeah it'l work.
Why is everyone so hype on adb everything...?
Click to expand...
Click to collapse
It's just easier to copy and paste stuff, even typing on a real keyboard. It's a pain in the ass doing it via terminal emulator with the lack of a physical keyboard on our Evo's.
Can anyone confirm if this helps fix the 4g issue?
krosemm said:
Can anyone confirm if this helps fix the 4g issue?
Click to expand...
Click to collapse
If you used the unrevoked, no it wont.
There is no fix for 4g from unrevoked yet.
Neotelos_com said:
If you used the unrevoked, no it wont.
There is no fix for 4g from unrevoked yet.
Click to expand...
Click to collapse
I used the toast method. And if i'm not mistaken I should flash roms w/o the 1.47.651.1 OTA update after downgrading right?
Nope, I try this method and it is not working. Some how the new OTA encrypted a code that any lower version will not over write it.
You don't have root access to even copy/paste or push the files to /data. I tried this and got a permission denied error message.
How do you input adb shell into Vista, I clicked "start", "run" and type "cmd" it bring up C:\users\XXXXX\ cd c:\android hit "enter"
then I type
c:\android>adb remount
Access is denied
Please advise what I did wrong. thanks
It worked for me... you have to make sure that when you enter the su command in adb to look at your phone. There should be a super user permission box that pops up. Accept it and youll be able to adb. It went fine for me after that.
urcboss07 said:
How do you input adb shell into Vista, I clicked "start", "run" and type "cmd" it bring up C:\users\XXXXX\ cd c:\android hit "enter"
then I type
c:\android>adb remount
Access is denied
Please advise what I did wrong. thanks
Click to expand...
Click to collapse
1) Put your phone on USB Debug
2) On your Phone make sure the Ninja(SuperUserPermission) is set to prompt you when you have a request.
3) go to your PC and type in adb shell
4) type in SU
5) Once do you that you will see a prompt from the Ninja asking for a request. Allow for it. And it will remember from that point forward.
6) Look at your cmd prompt screen for a # - if you have it you have full access.
Then so what commands you have been given to do.
It can also be done from the Android Terminal Emulator but some might not like working with a smaller screen I like it myself. Makes me feel geeky
mrmomoman said:
1) Put your phone on USB Debug
2) On your Phone make sure the Ninja(SuperUserPermission) is set to prompt you when you have a request.
3) go to your PC and type in adb shell
4) type in SU
5) Once do you that you will see a prompt from the Ninja asking for a request. Allow for it. And it will remember from that point forward.
6) Look at your cmd prompt screen for a # - if you have it you have full access.
Then so what commands you have been given to do.
It can also be done from the Android Terminal Emulator but some might not like working with a smaller screen I like it myself. Makes me feel geeky
Click to expand...
Click to collapse
This would only work if after the messup your still has root access. Some people have root and the "SU" will work but for the people w/o root will get access denied.
also
From above (I hate quoting) have you tried going to your tools folder inside your android folder and from there try your adb commands?
If you applied the OTA sent from Sprint, you lost root access. There will be no Ninja in the programs folder, because it was a new rom that the was flashed with the OTA. Root access has been closed for those that downloaded the update. If you try and type su, you will get permission denied.
Those of you that still have the root and superuser rights, DON'T DOWNLOAD THE OTA!! You are in a better position then the rest of us. I wanted the good battery life, so that's why I did it.
I am trying to put fm radio on the droid 2 but when i try to adb remount under adb shell i get adb not found. But before i do adb shell i can see my device. HELP!!!!!
Resolved
Hello!
First off, please make sure that your topics actually state what your issue is. Typing "HELP!" for a topic won't get you the response that you want, because many people skip these threads.
Okay, do you mean that you are not able to adb remount while you are IN the shell? This makes sense, because adb is an application that allows you to access your device in a Linux terminal style. If you need to use adb to remount the device, you must first exit your shell..
$exit
C:\android-sdk\adb remount
As an example. I hope this helps!
- Andy
i try but i get permission denied
[APP] FM Radio for the Droid 2!! - Page 2 - xda-developers
These are the complete start to finish exact instructions.
i got it. i just had to put the bootstrap on it so would recognize i had root.
You should edit your topis to issue resolved
This root was rendered unusable at this time due to AT&T disabling the Ready2Go app installation feature. Working on a work around now.
Original content:
http://www.androidpolice.com/2012/0...the-att-htc-one-x-on-version-1-85-or-earlier/
Hope you get your One X soon dude!
Confirmation number: 8PH11891CA483914J
In! Thanks Justin!
Billy
Damn, thanks a lot!
jcase said:
Now comes the timing critical part, you have to use ATT Ready2Go to Download "AT&T Mark the Spot", and interrupt the install process right after the download has finished. Easiest way is to reboot the device, but we have found other ways to do it.
Click to expand...
Click to collapse
OK, so when exactly do we reboot? There is no download status bar or whatnot, and I have rebooted right when it says install started to no avail. Do we have to do it before that point?
<---Not a noob, just crappy at timing.
id10terrordfw said:
OK, so when exactly do we reboot? There is no download status bar or whatnot, and I have rebooted right when it says install started to no avail. Do we have to do it before that point?
<---Not a noob, just crappy at timing.
Click to expand...
Click to collapse
You need to reboot right after the download is done. I haven't had a chance to do this in person, I just found it in the firmware and asked others to test for confirmation. Hopefully someone can chime in and tell us what visual indicators show when to do the reboot.
Some testers got it first try, some took 3-4 tries.
id10terrordfw said:
OK, so when exactly do we reboot? There is no download status bar or whatnot, and I have rebooted right when it says install started to no avail. Do we have to do it before that point?
<---Not a noob, just crappy at timing.
Click to expand...
Click to collapse
I'm with you on this one. I've been trying this for last hour but to no avail. The minute it says in status bar that it's installing, I tried command. I tried when I press finish on phone and LTE signals go up and down and even tried as soon as I was done with att site but can't get it to work. I've restarted 20 times and this startup sounds I think is now annoying other people in the office
jcase said:
You need to reboot right after the download is done. I haven't had a chance to do this in person, I just found it in the firmware and asked others to test for confirmation. Hopefully someone can chime in and tell us what visual indicators show when to do the reboot.
Some testers got it first try, some took 3-4 tries.
Click to expand...
Click to collapse
Hah, well now I just feel dumb as I am on try 10 or so. I must not be able to hit the timing right at all. I'll keep at it, as I am constant as the northern star.
Don't feel dumb, it is very timing critical, with few real indicators of when to pull it off.
Maybe xfinrodx or designgears can chime in on this one
noobsquared said:
I'm with you on this one. I've been trying this for last hour but to no avail. The minute it says in status bar that it's installing, I tried command. I tried when I press finish on phone and LTE signals go up and down and even tried as soon as I was done with att site but can't get it to work. I've restarted 20 times and this startup sounds I think is now annoying other people in the office
Click to expand...
Click to collapse
Turn your ringer off, it will silence the startup sound. At least I can help with that!
id10terrordfw said:
Turn your ringer off, it will silence the startup sound. At least I can help with that!
Click to expand...
Click to collapse
Thanks, but everytime I do factory reset...it comes back on?
I might be doing something dumb.
After I get permission denied error, I try to start at the process of tryping:
Code:
adb shell ln -s /data/local.prop /data/install/com.att.android.markthespot.apk
but when I do that after uninstalling AT&T Mark the spot, it gives me erorr:
link failed File exists
So I do a factory reset and then try again from scratch.
Is there an easier way to repeat the process?
Edit: I figured it out, just delete the file like this:
Code:
adb shell rm -r /data/install/com.att.android.markthespot.apk
Hope that's the right way of doing it.
Thank you.
I have been deleting the file from data/install
adb shell
cd data/install
rm com.att.android.markthespot.apk
exit
then repeat the process...i'm in double digits on attempts...going to have to walk away from it for a bit.
going on 10x for me and still nothing. Any suggestions?
id10terrordfw said:
OK, so when exactly do we reboot? There is no download status bar or whatnot, and I have rebooted right when it says install started to no avail. Do we have to do it before that point?
<---Not a noob, just crappy at timing.
Click to expand...
Click to collapse
No worries. Here's the way I did it back when I did it:
Open 2 cmd windows
adb devices on both (to make sure daemon is running)
In first shell type adb reboot but do not execute (obviously!)
In second window, cd /data/install
Enter ls -l
Now tell Ready2Go to install.
In that second window SPAM "up arrow - enter" to repeatedly execute ls -l. Observe the .apk file growing in size. When it stops growing it's probably done downloading (It is 3801413 bytes as of today). Go back to that first window IMMEDIATELY and hit enter on that adb reboot you typed in. It's a small apk so you need to be fast.
This was my method. Hopefully it works for you!
noobsquared said:
Thanks, but everytime I do factory reset...it comes back on?
I might be doing something dumb.
After I get permission denied error, I try to start at the process of tryping:
Code:
adb shell ln -s /data/local.prop /data/install/com.att.android.markthespot.apk
but when I do that after uninstalling AT&T Mark the spot, it gives me erorr:
link failed File exists
So I do a factory reset and then try again from scratch.
Is there an easier way to repeat the process?
Edit: I figured it out, just delete the file like this:
Code:
adb shell rm -r /data/install/com.att.android.markthespot.apk
Hope that's the right way of doing it.
Thank you.
Click to expand...
Click to collapse
Um, why are you doing a factory reset?
---------- Post added at 12:11 PM ---------- Previous post was at 12:10 PM ----------
xfinrodx said:
No worries. Here's the way I did it back when I did it:
Open 2 cmd windows
adb devices on both (to make sure daemon is running)
In first shell type adb reboot but do not execute (obviously!)
In second window, cd /data/install
Enter ls -l
Now tell Ready2Go to install.
In that second window SPAM "up arrow - enter" to repeatedly execute ls -l. Observe the .apk file growing in size. When it stops growing it's probably done downloading (I think it was around 5MB but it's been a while). Go back to that first window IMMEDIATELY and hit enter on that adb reboot you typed in. It's a small apk so you need to be fast.
This was my method. Hopefully it works for you!
Click to expand...
Click to collapse
I will give that a shot, and I should have thought of that. Thanks!
xfinrodx said:
No worries. Here's the way I did it back when I did it:
Open 2 cmd windows
adb devices on both (to make sure daemon is running)
In first shell type adb reboot but do not execute (obviously!)
In second window, cd /data/install
Enter ls -l
Now tell Ready2Go to install.
In that second window SPAM "up arrow - enter" to repeatedly execute ls -l. Observe the .apk file growing in size. When it stops growing it's probably done downloading (It is 3801413 bytes as of today). Go back to that first window IMMEDIATELY and hit enter on that adb reboot you typed in. It's a small apk so you need to be fast.
This was my method. Hopefully it works for you!
Click to expand...
Click to collapse
Good advice, was the first person to test it for me. I confirmed it with 4 users before posting, and all got it eventually.
id10terrordfw said:
I will give that a shot, and I should have thought of that. Thanks!
Click to expand...
Click to collapse
I was the first one I'm aware of who used this exploit a couple weeks ago. I won't claim that the process is clean, but it should work for you if you do it the way I intended the instructions to read... Good luck!
Thanks for all the help but I think this red bull is not working today.
Here is what I did:
First CMD:
Code:
adb shell
cd /data/install
ls -l <- it only gives me the file name..it doesn't tell me the size.
Also, I delete the file and run the first command in second CMD and right after that I see this in ls -l:
[email protected]:/data/install $ ls -l
ls -l
lrwxrwxrwx shell shell 2012-05-25 12:16 com.att.android.markthesp
ot.apk -> /data/local.prop
Second CMD:
Execute:
Code:
adb shell ln -s /data/local.prop /data/install/com.att.android.markthespot.apk
Wait to execute:
Code:
adb reboot
xfinrodx said:
No worries. Here's the way I did it back when I did it:
Open 2 cmd windows
adb devices on both (to make sure daemon is running)
In first shell type adb reboot but do not execute (obviously!)
In second window, cd /data/install
Enter ls -l
Now tell Ready2Go to install.
In that second window SPAM "up arrow - enter" to repeatedly execute ls -l. Observe the .apk file growing in size. When it stops growing it's probably done downloading (I think it was around 5MB but it's been a while). Go back to that first window IMMEDIATELY and hit enter on that adb reboot you typed in. It's a small apk so you need to be fast.
This was my method. Hopefully it works for you!
Click to expand...
Click to collapse
Great Idea !!!.... If you could post the exact size of the file , we can probably try to script it...( I have an idea in mind as mentioned below , but not sure if it works the way I intended in android )
for Ex:
szie=`ls -l /data/install/com.att.android.markthespot.apk | awk '{print $4}'`
while [ "$szie" -lt <size-of-apk> ];do
echo "waiting......"
done
adb reboot
dharani1234 said:
Great Idea !!!.... If you could post the exact size of the file , we can probably try to script it...( I have an idea in mind as mentioned below , but not sure if it works the way I intended in android )
for Ex:
szie=`ls -l /data/install/com.att.android.markthespot.apk | awk '{print $5}'`
while [ "$szie" -lt <size-of-apk> ];do
echo "waiting......"
done
adb reboot
Click to expand...
Click to collapse
If you can get a working script, that was reliable I would love to post it in the OP. To get an idea of the size, you could install the app, and do adb shell ls -l /data/app/<filename>
Wouldn't it be cool to be able to automate the swicthing data between SIM 1 and SIM 2 using Tasker given the location of the device? Let's figure out how to do it together. Do we need root? ADB command comes to mind...
@MishaalRahman any ideas?
What do you mean by "switching data?" Sorry, I usually don't use two SIMs so I'm not sure what you mean.
MishaalRahman said:
What do you mean by "switching data?" Sorry, I usually don't use two SIMs so I'm not sure what you mean.
Click to expand...
Click to collapse
The dual sim version mha-l29 has an option to set the default 4g slot from within the settings menu
I have found already a system variable that can be changed using secure settings plugin for tasker, and running the adb command adb shell settings list system I can see that the variable switch_dual_card_slots does change from 0 to 1 when doing it from the ui, but when done from a put command nothing happens. Any ideas?
dmorales023 said:
The dual sim version mha-l29 has an option to set the default 4g slot from within the settings menu
I have found already a system variable that can be changed using secure settings plugin for tasker, and running the adb command adb shell settings list system I can see that the variable switch_dual_card_slots does change from 0 to 1 when doing it from the ui, but when done from a put command nothing happens. Any ideas?
Click to expand...
Click to collapse
The screenshot shows you doing the command from the Secure Settings plug-in, not from shell. Have you tried it from shell?
MishaalRahman said:
The screenshot shows you doing the command from the Secure Settings plug-in, not from shell. Have you tried it from shell?
Click to expand...
Click to collapse
Yes, same results executing directly from shell. Nothing happens. Is there a trigger like command to update ui from settings or something like that? Sort of:
1. adb shell command x
2. Commit?
dmorales023 said:
Yes, same results executing directly from shell. Nothing happens. Is there a trigger like command to update ui from settings or something like that? Sort of:
1. adb shell command x
2. Commit?
Click to expand...
Click to collapse
@MishaalRahman The shell command I am using is "adb shell settings put system switch_dual_card_slots 0/1"
dmorales023 said:
@MishaalRahman The shell command I am using is "adb shell settings put system switch_dual_card_slots 0/1"
Click to expand...
Click to collapse
Yeah, that seems like it would do it.
dmorales023 said:
@MishaalRahman The shell command I am using is "adb shell settings put system switch_dual_card_slots 0/1"
Click to expand...
Click to collapse
Is it working? I am trying to do same thing on my phone. No luck till now
midhunmanohar said:
Is it working? I am trying to do same thing on my phone. No luck till now
Click to expand...
Click to collapse
No luck on my side either. Did you find a solution? This seems so trivial...
dmorales023 said:
Yes, same results executing directly from shell. Nothing happens. Is there a trigger like command to update ui from settings or something like that? Sort of:
1. adb shell command x
2. Commit?
Click to expand...
Click to collapse
I am using the shell command successfully on my Honor 6X.
First I set switch_dual_card_slots to 0 or 1 , and to commit I simply kill the phone process, which will automatically restart instantly.
It is not the most elegant solution, but works flawlessly for me.
The two commands I run (with root priveleges)
1: settings put system switch_dual_card_slots 1
2: pkill phone
dual SIM data switch
RealParity said:
The two commands I run (with root priveleges)
1: settings put system switch_dual_card_slots 1
2: pkill phone
Click to expand...
Click to collapse
i tried the above.
1 executes something, no msg.
2 gives an error message: pkill: TERM->24469: Operation not permitted
the data SIM does not change. but i guess it can't, as the 2nd command fails. what other things i might try?
and yes, i'm a noob on terminal commands - please walk me through how to automate this.
Bump after disabling one sim on location has I get no signal at work
zdoe said:
i tried the above.
1 executes something, no msg.
2 gives an error message: pkill: TERM->24469: Operation not permitted
the data SIM does not change. but i guess it can't, as the 2nd command fails. what other things i might try?
and yes, i'm a noob on terminal commands - please walk me through how to automate this.
Click to expand...
Click to collapse
Not sure if you got this figured out but you need to be rooted. Then in adb shell/terminal you must type "su" first then do the pkill
Anybody tried with a Xiaomi phone?
There's an app 4 this (dual sim switch widget) but it doesn't work on Xiaomi phones
Hi, I have a xiaomi mi 9t, I wish I could change the default sim for data, how much I receive or send a call.
What command can I give tasker for modifying the data sim?
Dear XDA community,
this my first own thread and guide so please be forbear with me
And i hope i choose the right section
As the topic in the thread says it handles about the Captive Portal Checkin done by Android.
So first some general info about this.
1. What is the Captive Portal Checkin?
Every time your android phone connects to the internet via mobile connection or wlan it sends a request to the following url:
http://connectivitycheck.gstatic.com (Google URL).
After that your gets device gets http 204 answer from the mentioned url and at that point the x-symbol at your network icon in the status bar disappears.
The reason for that behavior is that Android wants to be sure that your connection has internet access.
If you block that request via AfWall for example the dns fails in some cases and you can't go into the Internet.
Silly.
2. Why is this problematic?
That's a good question because this answer from Google doesn't much hold data. But every time when this connection is done Google get the following information:
- IP-adress
- Time of the internet access
- the Browser which you use
In my case i use custom roms and no Gapps to avoid Google as much as i can. So i don't want that "ping" to Google.
That's the reason why i searched for possibilitys to get rid of this ping. And thanks to a german security and privacy specalist i found a possibilty to avoid the ping to Google and have working Internet, too.
3. What did that guy do?
Very simple. He just started his own Captive Portal Checkin Service. So no need for Google anymore
WHAT YOU NEED:
- Computer with installed ADB
- Active USB Debugging at your phone
- At least Android 7
TESTED ON:
I tested his instructions on my old Xperia Z3 phone (CarbonROM 7.0 based on Android 9, Custom Rom).
IMPORTANT:
You need to execute the commands with a booted system (valid for both posts where i write the instructions). It DOESN'T work in the terminal of recoveries (e.g. twrp).
Thanks @jaysir for the information.
INSTRUCTIONS:
Android 7:
1. Connect the phone with your computer
2. Activate ADB and test the connection with the "adb devices" command. If your phone shows up go to step 3.
3. Execute these commands in your terminal:
=> adb shell 'settings put global captive_portal_http_url "http://captiveportal.kuketz.de" '
=> adb shell 'settings put global captive_portal_https_url "https://captiveportal.kuketz.de" '
Android 8 and 9:
1. Connect the phone with your computer
2. Activate ADB and test the connection with the "adb devices" command. If your phone shows up go to step 3.
3. Execute these commands in your terminal:
=> adb shell 'settings put global captive_portal_http_url "http://captiveportal.kuketz.de" '
=> adb shell 'settings put global captive_portal_https_url "https://captiveportal.kuketz.de" '
=> adb shell 'settings put global captive_portal_fallback_url "http://captiveportal.kuketz.de" '
=> adb shell 'settings put global captive_portal_other_fallback_urls "http://captiveportal.kuketz.de" '
Well that's it. When you want to revert back just execute the commands again with this url:
http command: http://connectivitycheck.gstatic.com/generate_204
https command:
https://connectivitycheck.gstatic.com/generate_204
Link to the source:
https://www.kuketz-blog.de/android-...204-http-antwort-von-captiveportal-kuketz-de/
If i make any typos tell me
Thanks again to the german security researcher and his community there is a way to deactivate the captive portal checkin completly.
It works on Android 7 and Android 8.1/9. But in comparision to the method in my first post this needs root access on your phone.
For all new users:
I recommend Magisk to gain root.
So now the instructions:
For Android 8/9:
1. Open a terminal on your phone (via terminal apps).
2. Type the following command:
- su
- su
- pm disable com.android.captiveportallogin
- settings put global captive_portal_detection_enabled 0
- settings put global captive_portal_server localhost
- settings put global captive_portal_mode 0
3. Then reboot your phone (via hardware buttons, system or terminal app).
For Android 7:
1. Open a terminal on your phone (via terminal apps).
2. Type the following commands:
- su
- settings put global captive_portal_detection_enabled 0
- settings put global captive_portal_server localhost
- settings put global captive_portal_mode 0
3. Then reboot your phone (via hardware buttons, system or terminal app).
Link to Source
https://www.kuketz-blog.de/empfehlungsecke/#captive-portal
Very nice and very important tutorial!
Just for completeness; and I don't claim and definitely don't have a copyright. I reported these procedures already here end of April in the thread "Enhanced Privacy, Security and Battery Duration! My Measures...". I mentioned it also once here in the AFWall+ thread.
I'm very glad that these procedures get repeated and repeated again. From my personal point of view it's so important to develop the stance to not allow Google to collect our data. I've subscribed to Mike Kuketz and am very grateful for his job and dedication.
Oswald Boelcke said:
Very nice and very important tutorial!
Just for completeness; and I don't claim and definitely don't have a copyright. I reported these procedures already here end of April in the thread "Enhanced Privacy, Security and Battery Duration! My Measures...". I mentioned it also once here in the AFWall+ thread.
I'm very glad that these procedures get repeated and repeated again. From my personal point of view it's so important to develop the stance to not allow Google to collect our data. I've subscribed to Mike Kuketz and am very grateful for his job and dedication.
Click to expand...
Click to collapse
I agree to you. It's a pity that so much people don't care about it.
I must admit i forgot to search in forum whether the instructions was already posted but as you said every mention helps.
Thanks, however, not working on pixel experience rom.
Update:
Seems no settings command under ADB shell, worked when turning on Usb debugging.
jaysir said:
Thanks, however, not working on pixel experience rom.
seems no settings command under ADB shell
Click to expand...
Click to collapse
Thx for your info. And i will try it on my old z3 with the custom rom which you mentioned.
I know there is a Android 9 based Pixel Experience for the z3.
Will report then.
dhacke said:
Thx for your info. And i will try it on my old z3 with the custom rom which you mentioned.
I know there is a Android 9 based Pixel Experience for the z3.
Will report then.
Click to expand...
Click to collapse
Sorry, I did not make myself clear.
It just not working under recovery mode.
After booting to the system and opening the USB debugging, it is working.
jaysir said:
Sorry, I did not make myself clear.
It just not working under recovery mode.
After booting to the system and opening the USB debugging, it is working.
Click to expand...
Click to collapse
Good to know (and i'm happy that now everything works)
I will edit the guide and add your information to it.
Thanks.
Thanks dhacke for all this information.
I got here from a link on an XDA forum for the Huawei Watch 2 LTE smartwatch. Do you know if this can be done to the watch as well?
ajlajluk said:
Thanks dhacke for all this information.
I got here from a link on an XDA forum for the Huawei Watch 2 LTE smartwatch. Do you know if this can be done to the watch as well?
Click to expand...
Click to collapse
As far as i see it the adb method (post 1) could working because according to the Internet the device runs Wear OS which is basically a android version for smartwatches.
So in theory you can activate USB debugging and redirect the captive portal to mike kuketz service as long as the commands are accepted.
Regarding method 2 i can't say anything because i don't own a smartwatch and have zero knowledge whether root is possible/how it is done on those smartwatches (which is needed for that method).
dhacke said:
As far as i see it the adb method (post 1) could working because according to the Internet the device runs Wear OS which is basically a android version for smartwatches.
So in theory you can activate USB debugging and redirect the captive portal to mike kuketz service as long as the commands are accepted.
Regarding method 2 i can't say anything because i don't own a smartwatch and have zero knowledge whether root is possible/how it is done on those smartwatches (which is needed for that method).
Click to expand...
Click to collapse
Just as you said, I enabled adb debugging, opened a terminal session from my mac to the watch and sent the commands from version 1 and they were both accepted. I should be able to check if it has worked tomorrow so will keep everyone updated when I've tested it.
OK. My watch appeared to connect to wifi but then said "No Internet".
I've now done the same mod to my phone, deleted the supermarket wifi I'm trying to connect my watch to from both the watch and the phone and will try again. I'm also wondering whether haveing BT on at the same time is causing a problem so I'll try with it on and then off and see if it makes any difference.
Thanks again for giving me hope I'll be able to connect WearOS 2 to a captive portal wifi network.
Further to above, unfortunately still no joy. Watch says "Connected" for the briefest moment then "No Internet" and won't go any further.
Never mind.
Thanks again for your work for the Android community.
Is it safe?
We are sending data to completely unknown server, that's why asking.
Datta258 said:
Is it safe?
We are sending data to completely unknown server, that's why asking.
Click to expand...
Click to collapse
In my opinion yes. The mentioned security expert has a good reputation afaik and he didn't make any things in the past which give me a reason to distrust him.
And in the near future he will work for german commissioner for data protection and freedom of Informationen. So i think he is a trustworthy person.
In the privacy policy on his site for the captive portal check service he writes that no information at all will be logged.
Of course you can ask him directly via e-mail if my words don't soothe you; i can only share my opinion about that guy
Thanks.
dhacke said:
For Android 8/9:
1. Open a terminal on your phone (via terminal apps).
2. Type the following command:
- su
- su
- pm disable com.android.captiveportallogin
- settings put global captive_portal_detection_enabled 0
- settings put global captive_portal_server localhost
- settings put global_portal_mode 0
3. Then reboot your phone (via hardware buttons, system or terminal app).
Click to expand...
Click to collapse
Does this still work on Pie?
On my rooted Galaxy Note 10 (Pie, 1st Sept. Patch) it does not.
Btw. there is a typo, should it be "settings put global captive_portal_mode 0"? This is what I tried. If I then check the values by "settings get..." I get
1: 0
2: localhost
3: 0
So the values were taken, but it still tries to connect to captiveportal.kuketz.de or google (whatever I have set). If I block it, I will get the exclamation next to the wifi symbol.
ZXR said:
Does this still work on Pie?
On my rooted Galaxy Note 10 (Pie, 1st Sept. Patch) it does not.
Btw. there is a typo, should it be "settings put global captive_portal_mode 0"? This is what I tried. If I then check the values by "settings get..." I get
1: 0
2: localhost
3: 0
So the values were taken, but it still tries to connect to captiveportal.kuketz.de or google (whatever I have set). If I block it, I will get the exclamation next to the wifi symbol.
Click to expand...
Click to collapse
Oh yes you are right. There was a typo. It must be 'settings put global captive_portal_mode 0'.
Now it's corrected. Thanks.
Did you make a reboot after execute the commands?
On my side it works on Pie too. I have a z3 with Lineage 16 and my device doesn't make the check.
When it' still not work after the reboot and the commands are typed in right (=> no issue notification in the terminal comes up) the Samsung stock rom could be the problem.
In that case i would recommend to use kuketz server.
dhacke said:
Did you make a reboot after execute the commands?
Click to expand...
Click to collapse
Yes and even after several reboots I get:
adb shell settings get global captive_portal_detection_enabled
0
adb shell settings get global captive_portal_server
localhost
adb shell settings get global captive_portal_mode
0
But, if not opened via script, I can see 185.163.119.132 (kuketz) being blocked by AFWall and the exclamation mark. So I open it with
$IPTABLES -A "afwall" -d 185.163.119.132 -m owner --uid-owner 1000 -p tcp -j ACCEPT
This works but I would prefer no C-P check.
One off-topic question:
Do you have an idea how to open the IP 0.1.0.1:0 in AFWall? It is used for VoLTE, but even I use th script line above (with 0.1.0.1) it still gets blocked. I have to open UID 1000 completely...
ZXR said:
Yes and even after several reboots I get:
adb shell settings get global captive_portal_detection_enabled
0
adb shell settings get global captive_portal_server
localhost
adb shell settings get global captive_portal_mode
0
But, if not opened via script, I can see 185.163.119.132 (kuketz) being blocked by AFWall and the exclamation mark. So I open it with
$IPTABLES -A "afwall" -d 185.163.119.132 -m owner --uid-owner 1000 -p tcp -j ACCEPT
This works but I would prefer no C-P check.
Click to expand...
Click to collapse
You wrote 'adb'. Does it mean that you tried the commands in the adb shell from your Computer with connected phone?
That could explain why it isn't working. The commands must be typed in directly on the phone for deactivation.
I use the App 'Terminal Emulator' from F-Droid for this.
Link: https://f-droid.org/app/jackpal.androidterm
You could try it with that app once more. Apart from that i'm running out of ideas atm.
ZXR said:
One off-topic question:
Do you have an idea how to open the IP 0.1.0.1:0 in AFWall? It is used for VoLTE, but even I use th script line above (with 0.1.0.1) it still gets blocked. I have to open UID 1000 completely...
Click to expand...
Click to collapse
Sorry, but no. I don't use VoLTE or Scripts in AfWall+.