[Q] Why can't I disable captive portal detection with ADB? - General Questions and Answers

I issued the following command in terminal to disable captive portal detection.
"settings put global captive_portal_detection_enabled 0"
But it comes with the following failure message
"The term 'settings' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ settings put global captive_portal_detection_enabled 0
+ ~~~~~~~~
+CategoryInfo : ObjectNotFound: (settings:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException"
Note that my phone has USB debugging enabled. When I type "ADB devices" it shows my device as connected.

You need to bring up shell first. Like:
> adb shell
> settings put global captive_portal_detection_enabled 0

Related

[Resolved] [Q] Setting Up ADB/USB Drivers for Android Devices in Ubuntu maverick 10.10?

OK so I tried these instruciton for Lucid on Maverick. I would post the link but I can't cuz I'm a newbie.
Download the latest Android SDK from Google: Android SDK
Extract the TGZ file to your home/user directory
NOTE: User would be your username
On your phone, click Settings > Applications > Development and make sure USB Debugging is on.
Login as root and create this file: /etc/udev/rules.d/##-android.rules
NOTE: In the above file replace ## with the number 50 if you are running Gusty/Hardy/Dapper (50-android.rules) or with the number 70 if you are running Karmic Koala/Lucid Lynx(70-android.rules)
Or simply type in terminal sudo gedit /etc/udev/rules.d/##-android.rules then enter your password
The file should read:
For Gusty/Hardy: SUBSYSTEM==”usb”, SYSFS{idVendor}==”0bb4″, MODE=”0666″
For Dapper: SUBSYSTEM==”usb_device”, SYSFS{idVendor}==”0bb4″, MODE=”0666″
For Karmic Koala: SUBSYSTEM==”usb”, SYSFS{idVendor}==”0bb4″, MODE=”0666″
For Lucid: SUBSYSTEM==”usb”, SYSFS{idVendor}==”0bb4″, MODE=”0666″
NOTE: In the above lines the code ”0bb4″ refers to a HTC device. If your phone is from a different manufacturer, replace the code with the appropriate from the table below.
Execute: sudo chmod a+rx /etc/udev/rules.d/70-android.rules
Reboot
To run ADB you need to add an environment variable to your bashrc file:
Open a terminal window and type: sudo gedit .bashrc
Add the following line at the end: export PATH=${PATH}:~/home/user/android-sdk-linux_86/tools
Save and close
You should be ready to go, type adb devices in a terminal window with your phone plugged in.
If you see a serial number pop up that means you are done. Should look something like this:
List of devices attached
HT99PHF02521 device
If for some reasons when running adb devices gives you a “no permissions” error, try typing the following in terminal
adb kill-server
adb start-server
USB Vendor IDs
MANUFACTURER USB VENDOR ID
Acer 0502
Dell 413c
Foxconn 0489
Garmin-Asus 091E
HTC 0bb4
Huawei 12d1
Kyocera 0482
LG 1004
Motorola 22b8
Nvidia 0955
Pantech 10A9
Samsung 04e8
Sharp 04dd
Sony Ericsson 0fce
ZTE 19D2
Common ADB Commands
- Lists which devices are currently attached to your computer
adb devices
- Drops you into a basic linux command shell on your phone with no parameters, or lets you run commands directly
adb shell
- Lets you install an Android application on your phone
adb install
- Remounts your system in write mode – this lets you alter system files on your phone using ADB
adb remount
- Rets you upload files to your phones filesystem
adb push
- Lets you download files off your phones filesystem
adb pull
- Starts dumping debugging information from your handset to the console – useful for debugging your apps
adb logcat
Now, as for the credits, I took TheUnlockr “How To” for Windows as a base for this guide.
Click to expand...
Click to collapse
But it doesn't work in maverick. Please help. Because I really want to overlock my phone.
Also keep in mind I'm fairly new to Linux so be easy on the newbie.
Thanks guys.
49 views and no responds? Please help I'm desperate here.
So did post this in the wrong section? This silent treatment is killing me. lol
in terminal type:
$ sudo -i
$ gedit .bashrc
insert the same line at the end: export PATH=${PATH}:~/home/user/android-sdk-linux_86/tools
$ exit
$ sudo -i
$ adb kill-server
$ adb start-server
$ adb devices
benholiio said:
in terminal type:
$ sudo -i
$ gedit .bashrc
insert the same line at the end: export PATH=${PATH}:~/home/user/android-sdk-linux_86/tools
$ exit
$ sudo -i
$ adb kill-server
$ adb start-server
$ adb devices
Click to expand...
Click to collapse
Dude this is for adb, not for recognizing the USB...
My phone is HTC Desire and I am still figuring out why it doesnt work on 10.10 with all the rules...
hungrysquid said:
Dude this is for adb, not for recognizing the USB...
My phone is HTC Desire and I am still figuring out why it doesnt work on 10.10 with all the rules...
Click to expand...
Click to collapse
I'm assuming thisisspeedy got to the same stage i did: USB connects, i can access files through maverick, however adb won't detect the device to allow push/pull/shell.
simply elevating to root & editing the bash script on maverick solves the problem.
I have my Galaxy S connected to Maverick via USB, and i can run all ADB functions.
It should work for HTC using the correct code. If you have a problem with Ubuntu detecting your device on USB when you've set USB to mount on Android, PM me and I'll see if i can help.
Could someone post a link for the Lucid dirs? Thanks.
Sent from my T-Mobile G2 using XDA App
Thanks for everyone responses.
I figured it out thanks to this.
[QUOTEThe Android Debug Bridge (adb) is a tool lets you manage the state of an emulator instance or Android-powered device.
I was trying to run it for the first time on my ubuntu 9.10 box and I kept getting this error:
desktop:~/dev/Android/android-sdk-linux/tools$ adb
No command 'adb' found, did you mean:
Command 'cdb' from package 'tinycdb' (main)
Command 'gdb' from package 'gdb' (main)
Command 'aub' from package 'aub' (universe)
Command 'dab' from package 'bsdgames' (universe)
Command 'mdb' from package 'mono-debugger' (universe)
Command 'arb' from package 'arb' (multiverse)
Command 'tdb' from package 'tads2-dev' (multiverse)
Command 'pdb' from package 'python' (main)
Command 'jdb' from package 'openjdk-6-jdk' (main)
Command 'jdb' from package 'sun-java6-jdk' (multiverse)
Command 'ab' from package 'apache2-utils' (main)
adb: command not found
What was I doing wrong?
A quick google search shows me the error of my ways.. I haven't added my Android SDK tools directory to my system path!
It should go something like this...
open a terminal window and type:
$ echo $PATH
---(should return the directories associated with $PATH)
$ export PATH=$PATH:/home/YOUR-USERNAME/sdk/tools
---(replace with path to your tools directory, you may need to add 'sudo' to the beginning of this cmd)
$ echo $PATH
---(you should now see your tools directory added to the end of the $PATH variable)
$ adb devices
---(now adb should do something, if nothing else at least error, no devices)
And now I get:
List of devices attached
emulator-5554 device
Sweet Success!
p.s. Adding to the system path in Windows is along the lines of :
right-click '(My) Computer'
Select 'Properties'
Go to 'Advanced' or whatever tab you find 'Environment Variables'
Select 'Path' then 'Edit' and add your new path in.][/QUOTE]
adb trouble
Hi i am runing on Ubuntu Maverick with device Huawei U8110 on Celestial Teapot 4 ROM
java jdk ver6
installed Android SDK and tools in the home folder
i edit the rules file 99-android.rules to SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", SYMLINK+="android_adb", MODE="0666" GROUP="plugdev"
saved and added the file permisions
restart the udev
Connected the Phone put the debug mode on
kill the adb then started
And Then Run The comand
[email protected]:/home/android-sdk-linux_x86/platform-tools# ./adb devices
List of devices attached
There is nothing in the list....?
HELP!? Please......
I use it for Marveric.
vim /etc/udev/rules.d/70-android.rules
# IS01
SUBSYSTEM=="usb",ATTRS{idVendor}=="04dd",ATTRS{idProduct}=="04dd",MODE="0666",OWNER="root"
# GalaxyS
SUBSYSTEM=="usb",ATTRS{idVendor}=="04e8",ATTRS{idProduct}=="681c",MODE="0666",OWNER="root"
# bravo
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"
add like a above. then
/etc/init.d/udev restart
Good luck!
thisisspeedy said:
I figured it out thanks to this.
[QUOTEThe Android Debug Bridge (adb) is a tool lets you manage the state of an emulator instance or Android-powered device.
I was trying to run it for the first time on my ubuntu 9.10 box and I kept getting this error:
desktop:~/dev/Android/android-sdk-linux/tools$ adb
No command 'adb' found, did you mean:
Command 'cdb' from package 'tinycdb' (main)
Command 'gdb' from package 'gdb' (main)
Command 'aub' from package 'aub' (universe)
Command 'dab' from package 'bsdgames' (universe)
Command 'mdb' from package 'mono-debugger' (universe)
Command 'arb' from package 'arb' (multiverse)
Command 'tdb' from package 'tads2-dev' (multiverse)
Command 'pdb' from package 'python' (main)
Command 'jdb' from package 'openjdk-6-jdk' (main)
Command 'jdb' from package 'sun-java6-jdk' (multiverse)
Command 'ab' from package 'apache2-utils' (main)
adb: command not found
What was I doing wrong?
A quick google search shows me the error of my ways.. I haven't added my Android SDK tools directory to my system path!
It should go something like this...
open a terminal window and type:
$ echo $PATH
---(should return the directories associated with $PATH)
$ export PATH=$PATH:/home/YOUR-USERNAME/sdk/tools
---(replace with path to your tools directory, you may need to add 'sudo' to the beginning of this cmd)
$ echo $PATH
---(you should now see your tools directory added to the end of the $PATH variable)
$ adb devices
---(now adb should do something, if nothing else at least error, no devices)
And now I get:
List of devices attached
emulator-5554 device
Sweet Success!
p.s. Adding to the system path in Windows is along the lines of :
right-click '(My) Computer'
Select 'Properties'
Go to 'Advanced' or whatever tab you find 'Environment Variables'
Select 'Path' then 'Edit' and add your new path in.]
Click to expand...
Click to collapse
============================================================
THANK YOU!! (I did hit 'THANKS' as well)...
You pointed me in the right direction with Ubuntu 10.04.
The only change was with SDK..the 'adb' has moved to $ ~/platform-tools/
By the way folks, when you install SDK, it would be wise to do all the updates, otherwise the platform-tools folder won't be an option....:cyclops:
"The order has been restored.."

[Q] Need help using ADB to push files to my MAXX HD

I have a stock factory ROM, ROOTED, MAXX HD. It's on the latest firmware pushed by VZW. After rooting, I had removed a bunch of apk's I knew I wouldn't need. The problem happened when I did a factory reset due to some minor GPS issues. I had forgotten that I removed the Setup.apk. (Yes I'm kicking myself regarding backups... but too late now).
Now my MAXX HD has no launcher. It states the Setup Wizard has stopped working. I have no access to files or applications. I can access the notification bar and the systems menu and such and can see the standard programs running under APPS. Wifi works, etc. I even signed into my gmail accounts, but I don't have access to any apps. Pressing the home button does nothing except bring up the error message again.
I've been trying to use ADB to push the missing files into the /system/app folder and that is described below. If anyone has any other ideas on what I can do, I'm all ears.
This part is for those that know a thing or two about ADB. I'm a noob at this so please correct away!
So, my ADB exploits... I've tried to push the setup files to /system/app via adb but have had no luck. I keep coming across access denied or this action is not allowed in production phone, etc.
The commands I've used are:
adb push setup.apk /system/app/setup.apk (This just gives the copy protected blah blah)
remount and root don't work.
in shell, when I type "su" the "$" does change to "#"
I've remounted the system as rw but pushing the file still gives me a not allowed value.
I'm just going to list the commands I've used now. If anyone has any suggestions or if I'm doing it wrong, please correct away. Thanks!
adb shell (this gives me a @Vanquish:/ $)
su (this changes the $ to a #)
mount | gret system (this gives me a long device-system name. it indicates it is now rw. it was originally ro)
mount -o rw, remount <device name from the previous command> /system
exit
exit (back to C:/adb)
adb push setup.apk /system/app/setup.apk (still says not allowed) (the root and remount commands still don't work)
I read that I need to type in "adb shell su push..." but I cannot get that command line to work at all.
Any help is extremely appreciated. Thanks!
Solved it myself
I guess I need to brush up on my ADB.
I got it to work by pushing the files to /sdcard/, then in shell, used # cp /sdcard/<file> /system/app/<file>
To all the ADB guys out there, how could I have done this in 1 step? I definitely don't have the syntax down.
T0ked said:
I guess I need to brush up on my ADB.
I got it to work by pushing the files to /sdcard/, then in shell, used # cp /sdcard/<file> /system/app/<file>
To all the ADB guys out there, how could I have done this in 1 step? I definitely don't have the syntax down.
Click to expand...
Click to collapse
Android Debug Bridge
-d - directs command to the only connected USB device
returns an error if more than one USB device is present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is running.
-s <serial number> - directs command to the USB device or emulator with
the given serial number. Overrides ANDROID_SERIAL
environment variable.
-p <product name or path> - simple product name like 'sooner', or
a relative/absolute path to a product
out directory like 'out/target/product/sooner'.
If -p is not specified, the ANDROID_PRODUCT_OUT
environment variable is used, which must
be an absolute path.
devices - list all connected devices
connect <host>:<port> - connect to a device via TCP/IP
disconnect <host>:<port> - disconnect from a TCP/IP device
device commands:
adb push <local> <remote> - copy file/dir to device
adb pull <remote> <local> - copy file/dir from device
adb sync [ <directory> ] - copy host->device only if changed
(see 'adb help all')
adb shell - run remote shell interactively
adb shell <command> - run remote shell command
adb emu <command> - run emulator console command
adb logcat [ <filter-spec> ] - View device log
adb forward <local> <remote> - forward socket connections
forward specs are one of:
tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
dev:<character device name>
jdwp:<process pid> (remote only)
adb jdwp - list PIDs of processes hosting a JDWP transport
adb install [-l] [-r] <file> - push this package file to the device and install it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data)
adb uninstall [-k] <package> - remove this app package from the device
('-k' means keep the data and cache directories)
adb bugreport - return all information from the device
that should be included in a bug report.
adb help - show this help message
adb version - show version num
DATAOPTS:
(no option) - don't touch the data partition
-w - wipe the data partition
-d - flash the data partition
scripting:
adb wait-for-device - block until device is online
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints: <serial-number>
adb status-window - continuously print device status for a specified device
adb remount - remounts the /system partition on the device read-write
adb reboot [bootloader|recovery] - reboots the device, optionally into the bootloader or recovery program
adb root - restarts the adbd daemon with root permissions
adb usb - restarts the adbd daemon listening on USB
adb tcpip <port> - restarts the adbd daemon listening on TCP on the specified port
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PPP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns
adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:
- If <directory> is not specified, both /system and /data partitions will be updated.
- If it is "system" or "data", only the corresponding partition
is updated.

[Tutorial] ADB and Deletting/Making 3 ext with any size (Windows & Mac)

First Step : Installing ADB Drivers
For windows : download PdaNet from here http://pdanet.co/a/
Second Step : Downloading ADB
For Mac : View attachment 2566782
For Windows : View attachment 2566785
Third Step : Installing ADB :-
For windows : Just extract it in directly in "C" partition
For Mac : Just extract it in any partition you want
Fourth Step :-
Openingthe ADB on Windows : Open start > Type "cmd" > Open the appeared program > Type in it "cd.." > Type "cd.." again
Opening the ADB on Mac :-
1) Open Start
2) Type "Terminal"
3) Open the appeared program
4) Type in it "nano ~/.bash_profile"
5) Type in it "export PATH=${PATH}:@@@@" (Replace the "@@@@" with the folder where you extract the ADB)
6) Save the files
7) press CTRL+X (To exit)
8) press Y (to confirm the save then press enter)
Final Step :-
Using the ADB on Windows/Mac :-
1) Type : "adb shell reboot recovery" (To reboot your phone into recovery)
2) Type "adb shell" (after rebooting Your phone into ClockworkMod Recovery)
3) Type "parted /dev/block/mmcblk0" (To open parted and mounts your SD-Card)
4) Type "print" (displays SD-Card partitions info)
5) Type "rm" (To delete a partition) then write the number of it
6) Type "mkpartfs primary fat32 0 27992" (This is for the Primary SD-Card-Ext) 28GB
7) Type "mkpartfs primary ext2 27992 28492" (This is for the System) 3GB
8) Type "mkpartfs primary ext2 28492 31492" (This is for the SD-Card-Int) 500MG
9) Type "mkpartfs primary ext2 31492 31692" (This is for the SD-Cache)199 MG
10) Type "mkpartfs primary linux-swap 00000 00000" (This is for the Lynux-swap) (If you do not know what it do, Do not try to make it)
You can change the Blue number according to your SD-Card size the provided numbers in this thread is for 32GB SD-Card
Note : You can Creat 4 SD-Partitions including the Primary SD-Card
Useful ADB commands :-
Note: to run all these commands, make sure USB debugging is enabled on your device
adb devices = list all connected devices
adb push = copy file/dir to device
adb pull [] = copy file/dir from device
adb sync [] = copy host->device only if changed
adb reboot = reboot your phone normally
adb reboot recovery = to reboot into recovery
adb reboot fastboot = to reboot fastboot
adb reboot bootloader = to reboot into bootloader
adb install [-l] [-r] [-s] = push this package file to the device and install it
adb uninstall [-k] = remove this app package from the device (‘-k’ means keep the data and cache directories)
adb help = show this help message
adb version = show version num
adb root = restarts the adbd daemon with root permissions
adb shell = run remote shell interactively
adb shell = run remote shell command
Useful Fastboot commands :-
Note: to run all these commands, your android devices must be in fastboot mode.
fastboot devices = to detect devices in fastboot mode
fastboot flash recovery twrp.img = to flash a recovery called twrp.img (put it in your fastboot folder)
fastboot oem unlock = to unlock bootloader of Nexus devices.

To Unlock Your Phone

Unlocking your phone by code free network tested on several Samsung
The phone is set in debug mode or debugging mode and connected to the computer to type in the console (cmd)
- Adb shell
Enter your (If you get an error when typing "su" and says permission denied, jump down,
*** 1 ***) and give root permission on the phone later in this order must type the following commands (** * 2 ***)
cd /
mount o remount rw /
mkdir / efs
mount-or nosuid, ro, nodev-t vfat / dev / block / STL5 / efs
cat /efs/mits/perso.txt
Check the attach file
Thanks

ADB on Windows: output to text file?

Hi,
I wonder how to output the text from adb on Windows to a textfile. I tried:
adb list packages > test.txt //gives the error: Read-only file system
when I enter a path that exists and has user write access, I get the same error, like:
adb list packages > c:\\temp\\test.txt //it won't take single backslashes at all
What is the correct way to redirect the output of adb to a text file?

Categories

Resources