Related
Is there any way to log AT commands sent and response received from the device modem?
I'm interested in logging AT commands sent and received through RIL API to the modem on windows mobile 5.0.
Thanks.
Can't use this to log them all the time, but if your just interested in learning what the AT commands are:
http://www.handhelds.org/moin/moin.cgi/ApachePhoneTrace
I have found a way to connect any modem to the tablet even if the tablet does not recognizes it. your device must be ROOTED to do so. I am not a developer, i just found out somewhere and modified the instructions to make it easy. i am not responsible to any thing that happens to your device (however this method isn't risky at all).
Just follow the instructions and enjoy. First download the attachment...
. First you need to move the modem to "modem only" for this you will need a terminal, you can use Hyper Terminal on windows.
Google search for AT commands for your modem to make it modem only mode and how to do that.
All right .... transferred the modem to the modem-only mode ....
Then note the vid and pid of your modem. one way to do this is to connect the modem to computer then go to device manager, expand modems, right click your modem >properties>details.
2. Next we need ES File Explorer
Install it on your tablet ... Open, go to settings -> Root rights, and tick all checkboxes.
3. Then go to /system/bin/preinstall.sh on your tablet and add a line to the file using es file explorer echo "19d2 1176" > /sys/bus/usb-serial/drivers/option1/new_id (see my preinstall.sh in the archive).
here 19d2 is my modem (vodafone K3370-z) vid and 1176 the pid. replace the vid and pid with your own.
REEBOT YOUR TABLET
4.There is a folder peers in the archive you downloaded. open conf-chat in the folder with es file explorer and replace your apn here with the apn of your service provider .
When the tablet does not recognize the modem it will not generate ttyUSB files which are needed to communicate with the modem. In Step 3 you made the tablet to recognize the modem and it now generates the ttyUSB files. You can check that in Terminal emulator(download from play store) by typing "dmesg" command(without qoutes). scroll the output down, you will see the generated ttyUSB ports as given in attached screenshot Pic1. It also gives the number of ports genetated. If you see these lines you can Connect your modem to Internet. But wait a minute you have additional things to do in order to get connected.
Now you need to find which port is pppd port because we need it to insert in the file Conf-pppd in peers folder of the archive you downloaded. (open the conf-pppd using wordpad you would see ttyUSB1 on the top because pppd port of my modem is 1, those modems who has pppd port at 1 would be able to connect without any modifications, if the pppd port of your modem is not 1 you would have to edit it e.g if the pppd port of your modem is 2, the top line in conf-pppd would look like ttyUSB2 and so on)
To determine which is pppd port follow the below steps...(see the attached screenshots)
Open 2 windows in terminal emulator. (you can copy paste the commands in terminal emulator)
(1) In first window type busybox tr -s "\n" < /dev/ttyUSBx (Pic2)
where x is the first port generated by your modem.(this command opens the port)
(2) Now in window 2 type echo -e "ATi\r" > /dev/ttyUSBx (pic3)
Here x is the same you typed in window 1.
You would see OK in WINDOW 1(Not in window 2). IF YOU DONT SEE ANY OUTPUT IN WINDOW 1(pic4), YOU HAVE TO UNPLUG YOUR MODEM AND PLUG IT AGAIN AND THEN USE NEXT PORT. yOU HAVE TO DO THIS EVERY TIME YOU DONT SEE ANY OUTPUT. IF YOU DO SEE AN OUTPUT PROCEED TO NEXT STEP.(pic 5, 6, and 7)
(3) Again type echo -e "AT+CGDCONT=1,\"IP\",\"www\"\r" > /dev/ttyUSBx in window 2. (Pic8)
Here replace www with your apn
You will see the OK again in window 1.(pic9)
(4) Again type echo -e "ATDT*99#\r" > /dev/ttyUSBx in WINDOW 2(pic10)
You will See the output in window 1. if you see ERROR in window 1, then it is your AT port not PPPD port. Unplug your modem and try next port untill you get CONNECT message in window 1(pic11). If you get Connect Message the at any port then it is your pppd port. IF you get these messages at port 2, then replace 1 in ttyUSB with 2, ehich then reads ttyUSB2 at the top of conf-pppd file.
Now copy the folder Peers in /etc/ppp/ in your sd card.
Install the application GScript_Mod.apk lies just in the archive .... open it and add the two scripts in the folder gscript of your sdcard : inet-ON.sh (Which brings up connection) and inet-OFF.sh (which disables the connection)
5. REBOOT TABLET. insert the modem. Start the application Gscript and run inet-ON.sh(pic12)
If you do everything on the instructions, your modem will connect to the Internet, although you will not see the 3G connection on the tablet...(pic13)
Thanks for reading..
Great Work..
A person who never made a mistake never tried anything new.
- Albert Einstein
Dear Bhaskar1109,
Kindly tell me how to use Hyper Terminal and make it a modem only mode. I have Micromax 310G modem with aircel connection and Micromax Funbook Infinity P275. I am unable to connect my modem as it says damaged sd card.
Thank You for your wonderful guide.
Micromax 310G..
manb7 said:
Dear Bhaskar1109,
Kindly tell me how to use Hyper Terminal and make it a modem only mode. I have Micromax 310G modem with aircel connection and Micromax Funbook Infinity P275. I am unable to connect my modem as it says damaged sd card.
Thank You for your wonderful guide.
Click to expand...
Click to collapse
Select COM port in HyperTerminal and try AT Commands.. i know AT commands to disable Emulated CDROM for few modems. Try it otherwise google commands for your modem
Huawei AT^U2DIAG=x command to control emulated CD-ROM and Micro-SD card
values of <x>:
0: disable CD-ROM and Micro-SD
1: enable CD-ROM only
255: enable CD-ROM and Micro-SD
256: enable Micro-SD only
ZTE AT+ZCDRUN=x command to control emulated CD-ROM and Micro-SD card
values of <x>:
8: disable autorun (modem appears when plugged in)
9: enable autorun (only CD-ROM appears when plugged in)
E: enable download mode (CD-ROM does not appear when plugged in)
F: disable download mode (CD-ROM appears when plugged in)
ZTE(ICERA chipsets) AT%USBMODEM?: to check the actual state
AT%USBMODEM=x command to control emulated CD-ROM and Micro-SD card
values of <x>
0: modem only mode
1: modem + CD-ROM + microSD
Great work.Usefull
Instructions added...
oops, i forgot some vital instructions earlier which i have added in bold letters now. Please view those if you were not able to connect to internet earlier and give your experiences.
great work, now i can connect any dongle to my tab. took some time though to make the dongle to modem only mode.
thanks.
Hi there,
I have checked the presence of ttyUSB into the /dev, but when I run the inet-ON I get.
Waiting ttyUSB1
Starting pppd
stderr: pppd: in file /etc/ppp/peers/conf-pppd unrecognized option TIMEOUT
Connecting....
Can anybody help me on this issue?
Thanks.
siraci said:
Hi there,
I have checked the presence of ttyUSB into the /dev, but when I run the inet-ON I get.
Waiting ttyUSB1
Starting pppd
stderr: pppd: in file /etc/ppp/peers/conf-pppd unrecognized option TIMEOUT
Connecting....
Can anybody help me on this issue?
Thanks.
Click to expand...
Click to collapse
which sim r u using? and what are the settings for the connection? these problems arise due to incorrect settings. check pm
Hi Bhaskar1109,
thanks for your reply. As you suggested, I have check all installation and I found the mistake, using the adb command I pushed the conf-pppd file but with the conf-chat's file contents .
So now "almost" it works fine. Almost because I have to give manually from adb shell or terninal:
echo "1ee8 0014" > /sys/bus/usb-serial/drivers/option1/new_id
in order to create the USBtty
and when the connection is on
setprop net.dns1 208.67.222.222
to set the dns server, because when I run the inet-ON.sh i get the error:
stderr: usage: setprop <key> <value>
This time I have checked the preinstall.sh and inet-ON.sh contents and permissions.
Any clues?
siraci said:
Hi Bhaskar1109,
thanks for your reply. As you suggested, I have check all installation and I found the mistake, using the adb command I pushed the conf-pppd file but with the conf-chat's file contents .
So now "almost" it works fine. Almost because I have to give manually from adb shell or terninal:
echo "1ee8 0014" > /sys/bus/usb-serial/drivers/option1/new_id
in order to create the USBtty
and when the connection is on
setprop net.dns1 208.67.222.222
to set the dns server, because when I run the inet-ON.sh i get the error:
stderr: usage: setprop <key> <value>
This time I have checked the preinstall.sh and inet-ON.sh contents and permissions.
Any clues?
Click to expand...
Click to collapse
Maybe that you have done some typing mistakes like extra spaces etc. and have you restarted your tablet?. you can set dns in inet-on.sh file. Are you able to browse internet normally after these commands?
p.s Google play and internal download manager may not work. You can browse play market but cannot install any apps(probably). UC browser download manager works fine. Use 1 mobile market instead of google play.
I have done other tests and now the only small issue is that I have to run the
echo "1ee8 0014" > /sys/bus/usb-serial/drivers/option1/new_id
into a separate sh file because seems that doesn't work into preinstall.sh file.
Anyway all works fine and let me say that you have done a great and clever job.
Thanks
it s cool
Hello Bhaskar1109,
I have the tablet N101 by Yuandao and I was successfully using PPPwidget with a Huawei E173 stick for 3G browsing.
Recently it stopped connecting, so after searching new alternatives, I found your very useful topic. I would appreciate your help, since I am trying now to find a way to make it work with your way.
I started using your guide, but I cant pass Step 4 with the terminal emulators.
First of all in Terminal Emulator, when I run dmesg command I get "converter now disconnected from ttyUSB0" and I get this for all USB (0,1,2)
Then when I run busybox tr -s "\n" < /dev/ttyUSBx ( I tried with USB0 till USB2), I am getting a message "cannot open /dev/ttyUSB0 (0,1,2)"
Any help?
RASTAVIPER said:
Hello Bhaskar1109,
I have the tablet N101 by Yuandao and I was successfully using PPPwidget with a Huawei E173 stick for 3G browsing.
Recently it stopped connecting, so after searching new alternatives, I found your very useful topic. I would appreciate your help, since I am trying now to find a way to make it work with your way.
I started using your guide, but I cant pass Step 4 with the terminal emulators.
First of all in Terminal Emulator, when I run dmesg command I get "converter now disconnected from ttyUSB0" and I get this for all USB (0,1,2)
Then when I run busybox tr -s "\n" < /dev/ttyUSBx ( I tried with USB0 till USB2), I am getting a message "cannot open /dev/ttyUSB0 (0,1,2)"
Any help?
Click to expand...
Click to collapse
the ports will be available only when the tab recognizes it as a modem. Following questions might help-
Is your tab Rooted?
Is your modem OK?
Is you modem vid pid correct?
Have You followed step 3 Correctly?Can You see the new line in preinstall.sh?
Have you restarted the tab?
Have You given su permissions to the scripts?
Bhaskar1109 said:
the ports will be available only when the tab recognizes it as a modem. Following questions might help-
Is your tab Rooted?
Is your modem OK?
Is you modem vid pid correct?
Have You followed step 3 Correctly?Can You see the new line in preinstall.sh?
Have you restarted the tab?
Have You given su permissions to the scripts?
Click to expand...
Click to collapse
Since I mentioned before that this dongle was working right for some time with PPP widget, I think most of your questions are already covered.
From your experience, could the Otg cable have started to fail and create these problems that never had before?
The command dmesg is showing that first these ports are available and after they are not.
Also, I think its important that I get this ""cannot open /dev/ttyUSB0 (0,1,2). No such file or directory"
Unleashed by my rooted Nexus 4
Gscript is not working .and from step 4 my confusion starts.
RASTAVIPER said:
Since I mentioned before that this dongle was working right for some time with PPP widget, I think most of your questions are already covered.
From your experience, could the Otg cable have started to fail and create these problems that never had before?
The command dmesg is showing that first these ports are available and after they are not.
Also, I think its important that I get this ""cannot open /dev/ttyUSB0 (0,1,2). No such file or directory"
Unleashed by my rooted Nexus 4
Click to expand...
Click to collapse
Sorry i didnt notice the ppp widget thing.
It may be otg problem, otherwise why would ppp widget failed suddenly at the first place. i suggest u to replace the cable and try again.
Devarishi said:
Gscript is not working .and from step 4 my confusion starts.
Click to expand...
Click to collapse
Can you tell what exactly is the problem/error with Gscript?
Error i faced...
I installed Gscript apk from your download link from your thread. I put that two script under sdcard/"another folder"/gscript. I opened gscript application and it says "process.android.com(alike this) stop working". What happened to my tablet. Im using micromax funbook p300. Is there is any way or the other to let it work ?
Dear smart people,
When attempting to root my phone, in command prompt I type adb devices and my phone shows up but also emulator-5554. It prevents me from rooting or much else because I get error -2 devices connected.
So because of this I tried lots of other options and I was afraid I might have done something wrong onto my phone and last night I flashed with lg flash tool to 11a.
I am back to stock. please help me with root and recovery install.
thanks!
emulator-5554
hi
emulator-5554 refers to your Bluestack application in windows
you need to stop or kill those services, to do it follow the steps
1. Open Run command: press start and type run ( or ) press Window key +R
2. type "services.msc" and enter
3. wait for some time and this should open a window
4. In the new window, select "BlueStacks Android Service" and click stop [you just need to stop that service]
5. Now check in adb with "adb devices"
6. This should have removed the additional emulator, so you can continue with the rest of the process
If above steps didn't helped then try "adb -e reboot"
Good Luck :good:
Never mind. I
For LG use stump root application for easy root
Hi Folks,
I'm trying to send AT command and retrieve it's output via adb shell or an app.
I tried several stuff I already found here, like service ATFwdCmd but it didn't exist in MTK device.
I found with getprop that the "baseband" device must be on /dev/ttyC0 but on my device it didn't exist.
output of getprop
[rild.libargs]: [-d /dev/ttyC0]
[rild.libpath]: [/system/lib/mtk-ril.so]
So I started reversing the mtk-ril.so and found that there is a "property_get("mux.debuglog.enable")", and I tried to set this property with setpropex but it's not working too.
I tried using atinout tool at sourceforge with echo 'at+cops?' | atinout - /dev/ttyGS0 -. I also tried the MTK Engineering App and tried to enable full modem log, without luck again.
I'm stuck at here now, if anyone has an idea, i will be very happy to speak with him
PS: sorry for my bad english
Cheers,
Jon
hi, did you solved this ?
I also need to send AT commands on a MTK device, but I have no luck .
Using "cat /dev/pts/4 &" & "echo -e 'ATI\r' > /dev/pts/4" approach gives me no predictive response (the output is sent to logcat and ...partially to the above background process (even when calling "stop ril-daemon", i suspect this is doing nothing, the mtkrild process is still running, killing the mtkrild ..is no solution, the connectivity is lost).
Is there any reliable way we can use mtkrild directly to send AT Commands "
Hi everyone,
I have a Nexus 6P which simply refuses to connect via USB on my Mac (i.e. it doesn't show up as a valid device under adb devices or via Android File Transfer). I believe it was working at some point but it seems to have stopped now. Might be worth noting, I did try connecting it to my car's charger a few months ago but had the worst time with it, it would charge and disconnect every few seconds (may or may not be relevant in this case as it pertains to the USB). I tried a different charger and it works fine with it though.
I have tried a lot of different things (which I'll list below) but have had no luck getting my Nexus 6P being recognized as a device when I connect it to my Mac (or any other). I do have the Developer settings enabled and I am able to switch to MTP but I never get the prompt to change USB mode. Anytime I connect my device, adb devices doesn't list it at all. I tried ADB File transfer as well and that also says "Please connect your device".
Here are some of the things I have tried so far:
1. Used different cables - no luck
2. Used a different mac - no luck
3. Tried a different Nexus 6P with my cable, it works fine (so it is not a cable issue)
4. Tried a different Nexus 6P with my mac, it works fine (so my Mac seems to be OK too)
5. Restarted in recovery mode - no luck
6. Tried removing a bunch of apps in case there was something conflicting - no luck so far
7. Chatted up Google support - They couldn't tell me much outside of the last option - Factory Reset - I have been holding off on that since I want to be able to transfer my files out first but I really want to avoid having to try that before exhausting all other options. They did offer to replace with a refurb'ed device but I had to decline that.
I did create a bug report dump using the device to see if anything interesting showed up and the only thing noticeable there is an exception related to USB. I am putting that info here in case it is useful in helping with this.
Code:
DUMP OF SERVICE usb:
USB Manager State:
USB Device State:
mCurrentFunctions: mtp,adb
mCurrentFunctionsApplied: true
mConnected: false
mConfigured: false
mUsbDataUnlocked: false
mCurrentAccessory: null
Kernel state: DISCONNECTED
Kernel function list: mtp,ffs
USB Debugging State:
Connected to adbd: true
Last key received: null
User keys:
IOException: java.io.FileNotFoundException: /data/misc/adb/adb_keys: open failed: ENOENT (No such file or directory)
System keys:
IOException: java.io.FileNotFoundException: /adb_keys: open failed: ENOENT (No such file or directory)
USB Host State:
USB Port State:
otg_default: port=UsbPort{id=otg_default, supportedModes=dual}, status=UsbPortStatus{connected=true, currentMode=ufp, currentPowerRole=sink, currentDataRole=device, supportedRoleCombinations=[source:host, sink:device]}, canChangeMode=true, canChangePowerRole=false, canChangeDataRole=false
USB Audio Devices:
USB MIDI Devices:
Settings for user 0:
Device permissions:
Accessory permissions:
Device preferences:
Accessory preferences:
Any help here is really appreciated! Thanks
desimunda42 said:
Code:
USB Debugging State:
Connected to adbd: true
Last key received: null
User keys:
IOException: java.io.FileNotFoundException: /data/misc/adb/adb_keys: open failed: ENOENT (No such file or directory)
System keys:
IOException: java.io.FileNotFoundException: /adb_keys: open failed: ENOENT (No such file or directory)
Click to expand...
Click to collapse
That seems suspicious. Was this taken while the phone was connected to your mac?
Here's my phone's dump while NOT connected to a computer
Code:
USB Manager State:
USB Device State:
mCurrentFunctions: mtp,adb
mCurrentFunctionsApplied: true
mConnected: false
mConfigured: false
mUsbDataUnlocked: false
mCurrentAccessory: null
Kernel state: DISCONNECTED
Kernel function list: mtp,ffs
USB Debugging State:
Connected to adbd: true
[COLOR="red"] Last key received: blahblahblahblah (not null)
User keys: blahblahblahblah (no exception)
[/COLOR] System keys:
IOException: java.io.FileNotFoundException: /adb_keys: open failed: ENOENT (No such file or directory)
Here it is when connected to computer
Code:
DUMP OF SERVICE usb:
USB Manager State:
USB Device State:
mCurrentFunctions: mtp,adb
mCurrentFunctionsApplied: true
[COLOR="red"] mConnected: true
mConfigured: true
[/COLOR] mUsbDataUnlocked: false
mCurrentAccessory: null
[COLOR="red"] Kernel state: CONFIGURED
[/COLOR] Kernel function list: mtp,ffs
USB Debugging State:
Connected to adbd: true
[COLOR="Red"] Last key received: blahblahblahblah (not null)
User keys: blahblahblahblah (no exception)
[/COLOR] System keys:
IOException: java.io.FileNotFoundException: /adb_keys: open failed: ENOENT (No such file or directory)
Are you on a custom rom? Do you get an authorization prompt if you call "adb device" after doing "Revoke USB debugging authorizations" from Develop options?
adotkdotjh said:
That seems suspicious. Was this taken while the phone was connected to your mac?
Are you on a custom rom? Do you get an authorization prompt if you call "adb device" after doing "Revoke USB debugging authorizations" from Develop options?
Click to expand...
Click to collapse
I wasn't connected to my Mac at the time I pulled the report (I confirmed by repeating it just now and still get that 'FileNotFoundException" in the logs for USB device. I don't have a custom rom, I have the standard OEM from the Google Store and didn't do anything else with it.
Also, I did revoke the USB debugging auth multiple times and inspite of that I never get any prompt when I connect.
I also got the report while connected to the Mac and am still seeing the same exception:
Code:
DUMP OF SERVICE usb:
USB Manager State:
USB Device State:
mCurrentFunctions: mtp,adb
mCurrentFunctionsApplied: true
mConnected: false
mConfigured: false
mUsbDataUnlocked: false
mCurrentAccessory: null
Kernel state: DISCONNECTED
Kernel function list: mtp,ffs
USB Debugging State:
Connected to adbd: true
Last key received: null
User keys:
IOException: java.io.FileNotFoundException: /data/misc/adb/adb_keys: open failed: ENOENT (No such file or directory)
System keys:
IOException: java.io.FileNotFoundException: /adb_keys: open failed: ENOENT (No such file or directory)
USB Host State:
USB Port State:
otg_default: port=UsbPort{id=otg_default, supportedModes=dual}, status=UsbPortStatus{connected=true, currentMode=ufp, currentPowerRole=sink, currentDataRole=device, supportedRoleCombinations=[source:host, sink:device]}, canChangeMode=true, canChangePowerRole=false, canChangeDataRole=false
USB Audio Devices:
USB MIDI Devices:
Settings for user 0:
Device permissions:
Accessory permissions:
Device preferences:
Accessory preferences:
desimunda42 said:
Hi everyone,
I have a Nexus 6P which simply refuses to connect via USB on my Mac (i.e. it doesn't show up as a valid device under adb devices or via Android File Transfer). I believe it was working at some point but it seems to have stopped now. Might be worth noting, I did try connecting it to my car's charger a few months ago but had the worst time with it, it would charge and disconnect every few seconds (may or may not be relevant in this case as it pertains to the USB). I tried a different charger and it works fine with it though.
I have tried a lot of different things (which I'll list below) but have had no luck getting my Nexus 6P being recognized as a device when I connect it to my Mac (or any other). I do have the Developer settings enabled and I am able to switch to MTP but I never get the prompt to change USB mode. Anytime I connect my device, adb devices doesn't list it at all. I tried ADB File transfer as well and that also says "Please connect your device".
Here are some of the things I have tried so far:
1. Used different cables - no luck
2. Used a different mac - no luck
3. Tried a different Nexus 6P with my cable, it works fine (so it is not a cable issue)
4. Tried a different Nexus 6P with my mac, it works fine (so my Mac seems to be OK too)
5. Restarted in recovery mode - no luck
6. Tried removing a bunch of apps in case there was something conflicting - no luck so far
7. Chatted up Google support - They couldn't tell me much outside of the last option - Factory Reset - I have been holding off on that since I want to be able to transfer my files out first but I really want to avoid having to try that before exhausting all other options. They did offer to replace with a refurb'ed device but I had to decline that.
I did create a bug report dump using the device to see if anything interesting showed up and the only thing noticeable there is an exception related to USB. I am putting that info here in case it is useful in helping with this.
Code:
DUMP OF SERVICE usb:
USB Manager State:
USB Device State:
mCurrentFunctions: mtp,adb
mCurrentFunctionsApplied: true
mConnected: false
mConfigured: false
mUsbDataUnlocked: false
mCurrentAccessory: null
Kernel state: DISCONNECTED
Kernel function list: mtp,ffs
USB Debugging State:
Connected to adbd: true
Last key received: null
User keys:
IOException: java.io.FileNotFoundException: /data/misc/adb/adb_keys: open failed: ENOENT (No such file or directory)
System keys:
IOException: java.io.FileNotFoundException: /adb_keys: open failed: ENOENT (No such file or directory)
USB Host State:
USB Port State:
otg_default: port=UsbPort{id=otg_default, supportedModes=dual}, status=UsbPortStatus{connected=true, currentMode=ufp, currentPowerRole=sink, currentDataRole=device, supportedRoleCombinations=[source:host, sink:device]}, canChangeMode=true, canChangePowerRole=false, canChangeDataRole=false
USB Audio Devices:
USB MIDI Devices:
Settings for user 0:
Device permissions:
Accessory permissions:
Device preferences:
Accessory preferences:
Any help here is really appreciated! Thanks
Click to expand...
Click to collapse
I usually only get the key prompt for ADB authorzation when I connect my device and type "adb devices"..... If worse comes to worse, You can restore your phone to factory settings without wiping your sd card. Then you could test that option with compromising your data. Just flash each image from the archive yourself when restoring the firmware as opposed to using the flash-all scipt, or resetting the phone from settings... DO NOT flash the "userdata.img" included in the factory firmware archive or issue the command "fastboot format userdata" during the restore process and all of your files will be fine. This may be an option as long as fastboot is still functional on your device. Ive come across so many different devices in so many different conditions over the years, as long as the device could power on and the usb port was functional, fasboot has worked time and time again.
PS adb on Mac can be a bit tricky especially if this is the first time youre attempting to o install and use it. Unless you set the correct enviornment variables during the install process, you will oly be able to access adb from inside the folder that its stored in on your mac. Youll have to pull up your terminal and and direct it to the folder containing adb and fastboot. Its usually ina a folder called "platform-tools" Which can be found in the dictory in whch you installed the Android SDK or SDK Tools packages... Now that I think about it, you have to download adb from the SDK package I just mentioned. After doing so, youll find the platform tools folder and it should contain what you need. As long as java is correctly installed on your mac then everything should work once you issue the "adb devices" command in a terminal session thats points at the "platform-tools" folder. YOU ALSO HAVE TO HAVE JDK INSTALLED in order for it to work with your device. I just looked at what you posted and it looks like youred missing JDK"...
If you havent done any of this yet the thats the problem. If everything I just typed seems confusing then you can try this which explains everything you need to do to set up adb a whole lot better than my attempt above lol buts its going to take some time to accomplish https://seo-michael.co.uk/how-to-setup-adb-on-os-x/
or
You can also install and configure adb a whole lot easier by issuing the following commands from within your mac terminal.... (This will install Brew on your Mac, if you arent familiar with what it is, Its a software distrobution platform. Sort of like git hub and linux software repos. When in doubt, do a little reading first. It'll solve all your problems....
-Install Brew - Copy and paste this command into a mac terminal and follow the prompts that show up.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
-Once that finishes, next use this command
brew update && brew cask install java
-Once that is complete enter this last command
brew install android-platform-tools
Those 3 commands will do 99 percent of the work. When its done just find the platform tools folder and go from there. Hope this helps.
Sass86oh said:
PS adb on Mac can be a bit tricky especially if this is the first time youre attempting to o install and use it. Unless you set the correct enviornment variables during the install process, you will oly be able to access adb from inside the folder that its stored in on your mac. Youll have to pull up your terminal and and direct it to the folder containing adb and fastboot. Its usually ina a folder called "platform-tools" Which can be found in the dictory in whch you installed the Android SDK or SDK Tools packages... Now that I think about it, you have to download adb from the SDK package I just mentioned. After doing so, youll find the platform tools folder and it should contain what you need. As long as java is correctly installed on your mac then everything should work once you issue the "adb devices" command in a terminal session thats points at the "platform-tools" folder. YOU ALSO HAVE TO HAVE JDK INSTALLED in order for it to work with your device. I just looked at what you posted and it looks like youred missing JDK"...
Click to expand...
Click to collapse
He says he already tried adb devices which didn't list anything. That tells me adb is configured correctly. Otherwise it should've given errors. Plus, he also said another Nexus 6P worked on the same mac.
adotkdotjh said:
He says he already tried adb devices which didn't list anything. That tells me adb is configured correctly. Otherwise it should've given errors. Plus, he also said another Nexus 6P worked on the same mac.
Click to expand...
Click to collapse
Yep
Sass86oh said:
I usually only get the key prompt for ADB authorzation when I connect my device and type "adb devices"..... If worse comes to worse, You can restore your phone to factory settings without wiping your sd card. Then you could test that option with compromising your data. Just flash each image from the archive yourself when restoring the firmware as opposed to using the flash-all scipt, or resetting the phone from settings... DO NOT flash the "userdata.img" included in the factory firmware archive or issue the command "fastboot format userdata" during the restore process and all of your files will be fine. This may be an option as long as fastboot is still functional on your device. Ive come across so many different devices in so many different conditions over the years, as long as the device could power on and the usb port was functional, fasboot has worked time and time again.
PS adb on Mac can be a bit tricky especially if this is the first time youre attempting to o install and use it. Unless you set the correct enviornment variables during the install process, you will oly be able to access adb from inside the folder that its stored in on your mac.
Click to expand...
Click to collapse
Thanks for the detailed steps but like adotkdotjh mentioned, I already have a working adb (and it worked fine with a different Nexus 6P on the same mac). How would 'fastboot' work if the computer does not even see my device under list of devices? I've never done any image flashing before so that would be quite an unfamiliar territory but I'd be willing to explore. Where would I get these image files and how do I issue the command to the device while it is not being recognized? Thanks
desimunda42 said:
Yep
Thanks for the detailed steps but like adotkdotjh mentioned, I already have a working adb (and it worked fine with a different Nexus 6P on the same mac). How would 'fastboot' work if the computer does not even see my device under list of devices? I've never done any image flashing before so that would be quite an unfamiliar territory but I'd be willing to explore. Where would I get these image files and how do I issue the command to the device while it is not being recognized? Thanks
Click to expand...
Click to collapse
Fastboot (also refered to as "download mode") is a tool used to essentially reprogram your device in the event that you are unable to enter into recovery mode in oreder to fix whatever issue your device is having. Android devices have 3 working modes, normal function, recovery mode, and fastboot. Number one is obvious, recovery allows you to completely reset your device without using a computer if every other measure youve tried hasn't worked. When you use this feature everything on your device is erased and your phone is completely restored to factory settings. Its convienet becuase not everyone is computer savvy and its to the point. But say you were updating (system update) your phone and accidently dropped it causing the battery to fall out and the device to shut off in the middle of the update process. What will most likely happen is the system partition will become corrupt, causing the phone to stick at the initial boot screen. Usually if that happens you can still access recovery mode and just reset but if for some reason that didnt work you would go to the manufacturers website and download the latest firmware for your device. You put the phone into fastboot mode by holding volume down and then pressing and holding the power button at the same time (while the phone is off).The process varies bydevice, If done correctly you will see on your screen a bunch of info along with Andy (the Android) chillin with his hatch open. You connect your phone to your computer and as long as your computer is set up correctly with adb and fastboot, you now have the abailty to reprogram (flash) your device using a series of commands that are issued from either the command line (windows) or terminal (linux/mac).
YOUR BOOTLOADER NEEDS TO BE UNLOCKED BEFORE CONTINUING. IF YOU DONT SEE A LITTLE LOCK AT THE BOTTOM OF YOUR DEVICE UNDER THE GOOGLE LOGO WHEN YOU FIRST TURN IT ON THEN YOU NEED TO GO TO SETTINGS, ABOUT DEVICE, FIND BUILD NUMBER AND TAP IT RAPIDLY UNTIL YOU SEE A MESSAGE POP UP SAYING YOU UNLOCKED DEVELOPER OPTIONS. GO BACK TO THE SETTINGS MENU AND SELEC DEVELOPER OPTIONS WHICH SHOULD NOW BE THERE AND INSIDE THERES AN OPTION CALLED "ALLOW OEM UNLOCKING" TURN IT ON. AND CONTINUE
Eextract the firmware archive you downloaded which will produce a folder containing 2 ".img files" files, another ".tar" archive, and some script files that you can use to make the process pretty much automated.
There are two of them, one for Windows (flash-all.bat) and one for Linux and Mac (flash-all.sh)....
Open the folder that was extracted from the firmware archive... Hold shift then right click a blank area in the folder. Select "open command prompt here" (Windows)
or
Type in terminal : cd ~/downloads/xxx where "xxx" is the name of the folder that was extracted but make sure that folder is moved to your "downloads" directory first
Then type the following commands:
IF YOU HAVENT UNLOCkED YOUR BOOTLOADER BEFORE THEN THIS IS WHERE YOU WILL NEED TO:
For Mac/Linux type: ./fastboot flashing unlock **Make sure you use the ./ or the command wont be recognized**
For Windows type: fastboot flashing unlock
Select yes on the phone when it asks if youre sure..... BAM, unlocked bootloader.
Your phone is completely free of restrections if you want to install custom firmware now. If not you can relock it after flashing the stock firmare by enterning fastboot mode again and typing
fastboot flashing lock or ./fastboot flashing lock (mac/linux).....
Now we can proceed with flashing the device...
For Windows: flash-all.bat and hit enter. The computer will do the rest.
Linux/Mac: ./flash-all.sh Make sure you use the ./ or the command wont be recognized.
If youre feeling brave you can do the entire process yourself by extracting the files in that second archive that was produced and flash each of them individually using a series of command in a specific order.
The 2nd extracted archive will give you a folder with five .img files
boot.img
cache.img
system.img
recovery.img
userdata.img ***** DO NOT FLASH THIS IMAGE. FORGET ITS EVEN THERE****
Take all five and move them to the original folder that was extracted. There are 2 other .img files that were extracted from the first archive also like I mentioned above, one that says "BOOTLOADER.xxx.xx.img" and one that says "RADIO.xxx.xxx.img"... Rename RADIO.xxx.xxx.img to | radio.img |and the other to| bootloader.img |ALL LOWER CASE keep them in that folder along with the other five. Now you should have 7 total image files in one folder. (Its smart to use the folder that your command prompt or terminal was opened in, if you decide to use a different folder then you have to direct each fastboot command to the folder where the .img file is located.
from the command line you flash each img individually with the following commands.....
(Mac/Linux need to include ./ before every fastboot command begins like this: ./fastboot or it wont work.
fastboot flash bootloader bootloader.img
fastboot reboot-bootloader (phone will reboot then go back into fastboot mode, dont worry should only take seconds)
fastboot flash radio radio.img
fastboot reboot-bootloader (reboots again)
fastboot flash boot boot.img
fastboot erase cache
fastboot flash cache cache.img
fastboot flash recovery recovery.img
fastboot flash system system.img
fastboot flash vendor vendor.img
fastboot format userdata (this command takes place of the "userdata.img" file I told you to forget about)
fastboot reboot
As long as you see action on the screen and a "complete" after every command then youre in business. If you get an error check your spelling. THE COMMAND LINE IS CASE SENSETIVE. You might type the correct words but if one letter is capital the command wont work. If theres an extra space between words then the command wont work so check everything. Safe rule: Everything should be in lower case letters with 1 space after every word.... THIS S*** MATTERS
Its not as hard as it seems if you arent familiar with the process, but its also not something to mess with unless youve done your homework. Read up on it, there are so many good posts and people in here so you'll be able to find everything you need without any issue.
Fastboot can also be used to install a custom recovery like TWRP which would then allow you to install custom firmware (roms) on your device as long as theres support for it. Nexus devices are built for that very reason! They tend to have a huge selection of development within the Android community. They come with Android as Google intended it to be! No extra BS.... And its wicked easy to unlock the bootloader. That is why they are, in my opinion, the best Android devices available. But someone who doesnt really care much for things like modding and installing custom firmware might see the Nexus as plain device which lacks the bells and whistles included in other devices. Which is ok! I personally love the simplicity of pure Android and the whole philosophy behind the Nexus Program. To each is own! If you need anything else send me a message!
Have not read it all on here lol install this on your Mac https://www.android.com/filetransfer/ and see if it sees you 6p make sure you plug in them change from charging to file transfer on the phone then exit out of the app and reboot that will tell you if your Mac sees your phone