How to install Nexus 4 driver on Linux Ubuntu 16.04? - Nexus 4 Q&A, Help & Troubleshooting

Hello, I have a Nexus 4 and I followed the instructions for installing CyanogenMod found on its web site.
All went well...I copied the CM.zip file on to the Nexus 4 and booted the device into CyanogenMod Recovery Mode. I then accidentally wiped the devices partitions - and the CM install .zip at the same time.
I have been trying to transfer the CM.zip using ADB but the Nexus 4 does not show up when I look for it in a terminal on my PC, i.e.,:
sudo adb devices
List of devices attached
[nothing is listed]
I use Linux Ubuntu 16.04 LTS on my laptop and don't easily have access to any other PC.
The problem seems to be that I need to install the correct drivers for the Nexus 4 so that the PC's OS can talk to the device. I would be very grateful if someone can explain where to get the drivers and how to install them?
Any help with this would be very much appreciated?
Thanks, Mike

Related

[Q] Hauwei Ascend M860 Why do you hate me?

Ok,
So Ive been scouring the net to find out if there is anyway I can get my device to be recognized. So far I've tried:
Windows 7 Ultimate 64bit, phone goes into storage mode and loads the drivers. although the drivers are not signed so windows refuses to load them, nice microsoft.
Ubuntu 10.04 64bit, ok i've installed usb_modeswitch and setup a bunch of udev rules (attached) and I can get the device to be detected but not recognized ie if I execute
Code:
adb devices
I get
Code:
List of devices attached
???????????? device
if I try
Code:
adb shell
I get dropped right into the user shell on the device. *Nice* score one for linux, but this doesn't do me much good because if I try to bring up the dalvik monitor it refuses to recognize the device grrr bad linux
I've attached my udev rules and a listing from when I tried to start the dalvik monitor, if anybody has some idea how I can get either windows to load the provided drivers or ubuntu to recognize the device I would be eternally greatfull
Thanks
Tired and wear from trudging around the net all day
Ben

Nexus 7 deleted ROM from storage

Hello,
i wanted to flash the slimbean rom on my nexus 7 3g but was stupid enough to format the whole storage, so that nothing is left on it.
i tried to connect the device to my pc by mounting it, but it seems not to work, because nothing happens.
well, i found out that i can install the rom from sideload. and after googling it, i managed to find out that i have to install the nexus 7 adb drivers through android sdk, which i did.
to test it, i opened the cmd and typed in "dir", but there was no android-sdk listed. what did i do wrong?
my cmd does not understand the command "adb sideload", although the adb drivers are listed in the device manager...
please help me, i need my nexus 7 tomorrow...
thanks in advance!!

Need help rooting on ubuntu

Hi, I've been having all sorts of problems trying to root/unlock with my windows7 PC. Another xda user even remoted into my computer and was unable to install the correct drivers.
I was able to unlock using a 13 year old xp PC, but when trying to unlock, the computer would freeze up every time.
Anyway, I've set up a dual boot system on my PC with win7 and unbuntu. I was hoping someone would be able to point me in the right direction to show me how to install the correct drivers in unbuntu (I'm a complete noob at it). Thanks in advance.
Sent from my Nexus 4 using xda app-developers app
Austin Ag06 said:
Hi, I've been having all sorts of problems trying to root/unlock with my windows7 PC. Another xda user even remoted into my computer and was unable to install the correct drivers.
I was able to unlock using a 13 year old xp PC, but when trying to unlock, the computer would freeze up every time.
Anyway, I've set up a dual boot system on my PC with win7 and unbuntu. I was hoping someone would be able to point me in the right direction to show me how to install the correct drivers in unbuntu (I'm a complete noob at it). Thanks in advance.
Sent from my Nexus 4 using xda app-developers app
Click to expand...
Click to collapse
Do you have the android sdk installed? If you have no idea what that is then it is a no. If you don't then you will need to install it first.
Root
I upladed a package for you that that will automate the install process. You will have to put in the password you use to login and at one point.
To run the package, unzip the attachment to you desktop and open a terminal.
run:
Code:
cd ~/Desktop/root/
chmod a+x install_sdk.sh
chmod a+x root_nexus4.sh
./install_sdk.sh
You will have to choose which packages to install for the android sdk. A screen will popup in the middle of the install and give you options to select the packages. Check to "Tools" folder and continue. This link might help.
When this is finished run
Code:
./root_nexus4.sh
Thanks for the replies. I don't have the SDK installed. Do I need it to install the required drivers?
Sent from my Nexus 4 using xda app-developers app
Austin Ag06 said:
Thanks for the replies. I don't have the SDK installed. Do I need it to install the required drivers?
Sent from my Nexus 4 using xda app-developers app
Click to expand...
Click to collapse
There are no drivers to install like windows.
Post #62 in the thread below is a walk through for getting everything setup on Ubuntu 12.10
http://forum.xda-developers.com/showthread.php?p=19446284
Note: The java files have changed to version 7 so the commands in the walkthrough need to be changed to reflect this. ADB does not work without java installed. You also have to manually enter the Nexus 4 into the list of devices which is covered under the editing udev section of the post.
If your not familiar with Linux this isn't easy to get setup, Linux isn't windows that's for sure. You might be better served trying to use one of the toolkits to root your phone. I've used mskips toolkit without any problems.
http://forum.xda-developers.com/showthread.php?t=1995688
---------- Post added at 10:25 AM ---------- Previous post was at 09:59 AM ----------
Austin Ag06 said:
Hi, I've been having all sorts of problems trying to root/unlock with my windows7 PC. Another xda user even remoted into my computer and was unable to install the correct drivers.
I was able to unlock using a 13 year old xp PC, but when trying to unlock, the computer would freeze up every time.
Anyway, I've set up a dual boot system on my PC with win7 and unbuntu. I was hoping someone would be able to point me in the right direction to show me how to install the correct drivers in unbuntu (I'm a complete noob at it). Thanks in advance.
Sent from my Nexus 4 using xda app-developers app
Click to expand...
Click to collapse
Do you have java installed properly in windows 7 and did you use the sdk manager to download and install the proper packages including the drivers?
http://developer.android.com/sdk/win-usb.html
Austin Ag06 said:
Thanks for the replies. I don't have the SDK installed. Do I need it to install the required drivers?
Sent from my Nexus 4 using xda app-developers app
Click to expand...
Click to collapse
In Ubuntu you do not need drivers. I attached a file that will automate the sdk install process. However, I did not include a java jdk installation. You will need that installed on ubuntu in order for the sdk to work. In the SDK there is a tool called "adb", and another called "fastboot". These two tools are what you will use to root your phone using ubuntu. If you absolutely need help installing the java jdk then let me know. Otherwise a google search "install java jdk ubuntu 12.04" should lead you to some good guides. NOTE: I am assuming you are using Ubuntu 12.04. Check which version you actually have.
Thanks for the links. I'll do some reading and try to get this set up tonight.
Austin Ag06 said:
Thanks for the links. I'll do some reading and try to get this set up tonight.
Click to expand...
Click to collapse
I just built an Ubuntu 12.10 box a couple weeks ago and followed the instructions in the link and it worked with no problems. Hardest part is setting up java as I had the instructions up on my windows pc and couldn't cut and paste the commands, the syntax has to be 100% correct or the command won't run and it was hard to judge where I needed to use spaces or not. This is the one thing I hate about Linux and that's having no executables to easily install things like java like there are in windows.

won't show up in ADB... it just won't...

I've tried every driver known to man. I've tried the official Google drivers, I've tried the naked drivers, I've tried the ones that come with PDANet.
I've tried rebooting, uninstalling all other drivers, etc. I tried on my Windows 7 desktop, I tried on my Windows 8 laptop after disabling driver enforcement.
Every single time, the ADB driver installs fine, but adb itself sees no devices. I develop, I have many other Android devices (I am moving from a One XL) and they all just need one quick install and are detected. I have the same issue with my Nexus S - getting it consistently recognised on ADB is near impossible.
What am I doing wrong? I've waited three months for this thing and I want to set it up.
'USB Debugging' enabled?
Of course. It will install drivers for the ADB device, it just won't be detected by adb.exe.
I tried the 'switch to Photo MTP' mode trick too. I am having no issues with adb to a One XL, One V, Defy, Aurora II or U8800. This is really bizarre.
Do you have java jdk installed correctly?
http://www.oracle.com/technetwork/java/javase/downloads/index.html
I wasn't aware java was relevant to adb at all (and I don't think it is) but yeah I have the JDK installed and it works fine for my app dev.
I had the same issue. Drivers installed correctly (and worked on other phones) but not the N4.
In the end i used an Ubuntu Virtual machine, attached the phone, followed a guide on XDA for getting ADB drivers in linux, and it worked straight away.
Days of trying in windows, and done in 5 minutes through linux.
Yep, I too went the virtual machine route.
Ridiculous. The only two developer devices I've owned (Nexus S and Nexus 4) and they've both been impossible to get the adb drivers going...
Passa91 said:
I wasn't aware java was relevant to adb at all (and I don't think it is) but yeah I have the JDK installed and it works fine for my app dev.
Click to expand...
Click to collapse
Yes you have to have installed the java jdk to run adb, it doesn't work without it. Java jdk is supposed to be setup first before you install the sdk so that it finds it. One issue why people can't get adb working is that the path environment variables are not set up and need to be manually entered.
Example of setting your windows path environment variables for jdk version 6 windows 32 bit on Windows Vista.
right-click on My Computer, and select Properties
under the Advanced tab, hit the Environment Variables button
in the dialog that comes up, under System Variables double-click on Path
Add ;C:\Program Files (x86)\Java\jdk1.6.0_18\bin to the Path variable (or wherever the jdk was installed)
Add ;C:\android\android-sdk-windows\platform-tools to the Path variable (or wherever you installed the sdk)
Passa91 said:
I've tried every driver known to man. I've tried the official Google drivers, I've tried the naked drivers, I've tried the ones that come with PDANet.
I've tried rebooting, uninstalling all other drivers, etc. I tried on my Windows 7 desktop, I tried on my Windows 8 laptop after disabling driver enforcement.
Every single time, the ADB driver installs fine, but adb itself sees no devices. I develop, I have many other Android devices (I am moving from a One XL) and they all just need one quick install and are detected. I have the same issue with my Nexus S - getting it consistently recognised on ADB is near impossible.
What am I doing wrong? I've waited three months for this thing and I want to set it up.
Click to expand...
Click to collapse
I posted a solution some time a go find it in my posts
Sent from my Nexus 4 using xda premium
davehunt83 said:
I had the same issue. Drivers installed correctly (and worked on other phones) but not the N4.
In the end i used an Ubuntu Virtual machine, attached the phone, followed a guide on XDA for getting ADB drivers in linux, and it worked straight away.
Days of trying in windows, and done in 5 minutes through linux.
Click to expand...
Click to collapse
The linux guides include editing the udev rules so that you manually enter the Nexus 4 into the list of devices in order to get adb to recognize the phone. Could be the same issue with windows. I only have the sdk installed on a Linux box and haven't used it on windows since I installed it on a Vista box a few years ago but I would imagine windows would have the same problem recognizing the phone.
Linux Install Instructions
http://rootzwiki.com/topic/20770-gu...-adb-and-fastboot-in-linux-ubuntu-and-mint12/
Passa91 said:
I've tried every driver known to man. I've tried the official Google drivers, I've tried the naked drivers, I've tried the ones that come with PDANet.
I've tried rebooting, uninstalling all other drivers, etc. I tried on my Windows 7 desktop, I tried on my Windows 8 laptop after disabling driver enforcement.
Every single time, the ADB driver installs fine, but adb itself sees no devices. I develop, I have many other Android devices (I am moving from a One XL) and they all just need one quick install and are detected. I have the same issue with my Nexus S - getting it consistently recognised on ADB is near impossible.
What am I doing wrong? I've waited three months for this thing and I want to set it up.
Click to expand...
Click to collapse
I used the Universal_Naked_Driver_0.72. It worked for me. I did not install Java.
http://dl.dropbox.com/u/18573149/Universal_Naked_Driver_0.72.zip
RacerXO said:
I used the Universal_Naked_Driver_0.72. It worked for me. I did not install Java.
http://dl.dropbox.com/u/18573149/Universal_Naked_Driver_0.72.zip
Click to expand...
Click to collapse
You shouldn't even be able to install the sdk properly without having java jdk installed first as the windows installer checks to see if its there.
http://developer.android.com/sdk/installing/index.html
Edit: and by installer I meant SDK Manager, what you use to download and install the android usb drivers. I suppose you can get past the java limitation by just downloading the sdk and copying the needed files into the c directory then using 3rd party drivers but java jdk is what controls the phone once its connected so I don't know how you are getting it to work.
Edit 2: I guess I was wrong in part, I installed the sdk without java jdk on a windows xp box, used the universal drivers linked to above, and it recognized my phone in adb devices and I was able to reboot it. But I can't use sdk manager as it requires java jdk to be installed.
had the same issue... you must be using a usb port on the front/side of the computer
use one of the usb ports on the back, and you should be just fine.
This happens to me too. On all windows computers I have used for ADB and all phones it will work the first few times, and then it won't work no matter what. I can usually get fastboot to work reliably but that is it.
Sent from my Nexus 4 using Tapatalk 2

[Q] Can't install apks despite my device is NOT adb offline.

Ok I've been following every step some posts follow in order to upgrade every Android SDK component to the last version (adb, sdk manager, avd manager, usb driver, web driver and ALMOST EVERYTHING fetched in the sdk manager). I have my Nexus 4 on stock 4.2.2 (JDQ39) working like a charm with its USB driver with my PC, the debugging is on, also the unknown sources option (if any), the phone is properly linked with the "adb fingerprint protection" thing (can't remember the correct name), and last I can see my Nexus 4 detected on adb devices command AND STILL I can't install a sole apk, in this case I'm using Android Commander 0.7.9.11 and nothing, I've tried with Droid Explorer or even Moborobo and nothing.
However in my cousin's laptop I can successfully install apps.
I thought it must be something wrong or corrupted with my OS, so I reinstalled Windows 8 (x64) and take care about all the drivers and everything mentioned above and still... I get the same, so I'm running desperate here.
Maybe it's something simple, I just need someone to help me.
Sorry if I writed so much... I only did it to avoid Android's ABC related questions.
Thanks in advance for your time.
Best regards.
Does "adb install path/to/app.apk" work?
chromium96 said:
Does "adb install path/to/app.apk" work?
Click to expand...
Click to collapse
When I do it I get this:
Code:
C:\sdk\platform-tools>adb install C:\mxvideoplayer.apk
2752 KB/s (6930955 bytes in 2.458s)
pkg: /data/local/tmp/mxvideoplayer.apk
Failure [INSTALL_FAILED_SHARED_USER_INCOMPATIBLE]

Categories

Resources