[Q] USB MTP - Not all files - Asus Eee Pad Transformer Prime

Dear all,
Strange potential issue with my ASUS Prime...
When I connect it to my PC with MTP, I'm not seeing all the files. E.g. I have a folder which contains about 15 media files and on my Windows 7 machine I only see 3 of them..
Is there another way to access the internal storage over USB ? I would like to use a Linux system to copy large amount of files..
Thanks

I already found that I can see the "missing" files by first executing a rescan.
There is an app for this SDrescan in Android Market
So still asking if we can do anything to get the old USB storage back ?

DirtyWizard said:
Is there another way to access the internal storage over USB ? I would like to use a Linux system to copy large amount of files..
Click to expand...
Click to collapse
This USB storage thing IS a problem on Linux sytems with the Prime, right now. I tried everything to get it to work one day ... before finally realizing that I was wasting my time.
To copy files, you could use ADB, but that is really slow for large amounts of copying, and you do have to install the Google SDK on your machine (which isn't a bad thing, but takes time.)
3 other solutions (1 & 2 are a 2-step copy process ... and only #1 is a USB method):
1) Instead of MTP, you can use the photo option (PTP, I believe) ... it's the choice right next to MTP in your settings. Unfortunately, with this method, you can only copy to your photo folder, so from there you would need to move your files to your final destination folder. PTP did allow me to see and move any type of files.
2) Copy your files to a microSD and plug them into your Prime's microSD and copy from there. (I know this is an obvious solution, but for completeness, I included it!)
3) AirDroid -- I've used this, and it works well ... probably quite slow for large amounts of copying.
Not the greatest solutions, but they will get you by...

One thing that i discovered that let me see all my files and be able to copy them to my TFP without issues is adding the UDEV rules. wiki.cyanogenmod.com/wiki/Udev gives you a good walkthrough on how to do that, just do the all models part and change the vendor id and everything should work for you. I verified this with LinuxMint and LMDE

Related

[Q] Galaxy Tab and File System Questions

I am trying to help someone debug some software on one of these tablets and i am running into an issue with the file system.
This program has a PC component along with an App on the device.
The PC program uses adb to push the db and image files to the device.
On my phone when I plug it in to the usb port I just tell it to Charge only and everything works peach keen.
But I am finding with a lot of tablets there is no option to just let the device be pluged in and it will auto mount the "sdcard" file space for copying files over.
From the screen shots I have gotten it seems like the system is making a Sym Link to the drive space on the tablet.
As in it isn't showing up as a removable drive like my phone does when you mount the sdcard, but it looks to be under computer\GT-p7500\Tablet\
and the typical trick of clicking on the address bar to get an absolute address return no drive letter.
It is a stock unrooted device, and what I am looking for is if there is a way to keep it from mounting the "sdcard" or how it is mounting it with in the windows file system.
It has been slow going as the guy I am trying to help is in the Netherlands and I am in the states so there is a bit of lag on correspondence
Thanks for any help you can pass my way
-Robert
Please use the Q&A Forum for questions Thanks
Moving to Q&A

MTP not working

I don't know what i'm doing wrong, but I can't seem to transfer files to my device for any extended period. I don't know what does it, but at some point, the connection always fails. Windows says the device isn't responding and closes the explorer window or stops copying files, but the device itself says everything is fine.
What am I doing wrong?
You may just need to download some Windows drivers:
http://support.asus.com/download.aspx?SLanguage=en&m=Eee%20Pad%20Transformer%20Prime%20TF201&p=20&s=16&os=32&hashedid=n/a
All you really need is the small USB driver (8 MB). I think that the Global button would be the easiest download. There is also the PC Suite, that includes the USB driver, but not sure you want all of the extra stuff included in that.
tedr108 said:
You may just need to download some Windows drivers:
http://support.asus.com/download.aspx?SLanguage=en&m=Eee%20Pad%20Transformer%20Prime%20TF201&p=20&s=16&os=32&hashedid=n/a
All you really need is the small USB driver (8 MB). I think that the Global button would be the easiest download. There is also the PC Suite, that includes the USB driver, but not sure you want all of the extra stuff included in that.
Click to expand...
Click to collapse
It's installed, but the problem is still presenting.
Well, what are some of the details? What type of files are you transferring? What folder are you copying them into?
Try creating a new folder on your Prime and copying into that folder to see if it makes any difference. Some users have been experiencing issues with the Music and Movie folders. If that is the case for you, try copying into the different folder. If that works, you'll probably just want to delete the old (bad) folder and rename the new one to the old name. Make sure you copy any items out of the old folder before deleting it.
tedr108 said:
Well, what are some of the details? What type of files are you transferring? What folder are you copying them into?
Try creating a new folder on your Prime and copying into that folder to see if it makes any difference. Some users have been experiencing issues with the Music and Movie folders. If that is the case for you, try copying into the different folder. If that works, you'll probably just want to delete the old (bad) folder and rename the new one to the old name. Make sure you copy any items out of the old folder before deleting it.
Click to expand...
Click to collapse
No, that doesn't help either. Any kind of file. ebooks, movies, sideloaded apps, it seems to be completely random, just sometime, out of nowhere, "File cannot be copied, device is not responding, skip or quit?" and sometimes if it's multiple files and I skip the one that DIDN'T work, it keeps going like nothing's wrong.
I did neglect to ask you what version of Windows you are using. But, I'm really not sure there is anything that can be done anyway. I assume you have MTP checked on your Prime settings or you would not even be able to see the Prime on your Windows machine. Anyway, I'm at a loss at this point.
Do you want a workaround that will work with a wi-fi connection?
1) Download Airdroid from the Market to your Prime -- it's free.
2) Run Airdroid on your Prime.
3) You will be given an http address like http://192.168.1.1:8888 and a password.
4) Enter the http address into your internet browser on your PC and enter the password when asked.
5) Click on the Files icon on the web page that shows up on your PC.
6) You will see your Prime's file structure on the left side of the page -- click on the folder that you want to move the files to.
7) Then click on the Import button ... upper right.
8) An new window will appear for importing. Click the Select Files button and any file you select in the browse window will appear in the list and automatically be sent to your Prime.
This is just one of the many things that Airdroid can do.
I have done this many times and find it quite easy and reasonably fast -- not as fast as your wired connection would have been, but at least you can do this.
Yes Your only options at this point is a slow wifi transfer or buy an sdcard to copy files to then transfer in the device it self. This seems very acceptable to some people.
MTP is garbage and has never worked well for me either.
I think this is an android hc/ics problem though.
Maybe once/if we start getting costum roms we will see a usb mass storage option. We will just have to wait for the unlock tool.
Might these filenames contain special characters?
Also, the MTP driver seems to have a hiccup sometimes, check your device manager (Win+R "dvcmgmt.msc"). If there's a little warning at the MTP device, mark it and hit delete or open it and hit Driver Details/Update driver.
Sometimes the queueing of files is also out of sync with the actual transfer to the device. I've had it happen that I wanted to copy a bunch of files, and the device must have reported "tranfer complete" on the first file while it was actually still busy, resulting in a "device busy" error on the next file. When I copied the next file by itself, it worked fine.
MTP is slower than regular USB mass storage because it is designed for hot (un-)plugging, so no delayed writes.
Conect your TFP to your PC once with USB debugging checked and once without being checked. See if drivers DL or update.... Check devise manager to see if drivers are installed if yes reboot computer... Some PCs will not recognize devices without rebooting. Next try a different USB hub and repeat something will work
Sent from my SPH-D710 using xda premium
Ciddy said:
Might these filenames contain special characters?
Also, the MTP driver seems to have a hiccup sometimes, check your device manager (Win+R "dvcmgmt.msc"). If there's a little warning at the MTP device, mark it and hit delete or open it and hit Driver Details/Update driver.
Sometimes the queueing of files is also out of sync with the actual transfer to the device. I've had it happen that I wanted to copy a bunch of files, and the device must have reported "tranfer complete" on the first file while it was actually still busy, resulting in a "device busy" error on the next file. When I copied the next file by itself, it worked fine.
MTP is slower than regular USB mass storage because it is designed for hot (un-)plugging, so no delayed writes.
Click to expand...
Click to collapse
I've noticed that when you change the file name sometimes it works. On my galaxy nexus I have the same problem. But I would transfer files it wouldn't work and then I change the file name and it would work
Lots of good suggestions here that you can try...
However, one more possible work-around that worked for my Ubuntu machine (where MTP is not working, either), in case nothing else works:
I switched to PTP (camera) on my TFP. I could copy just fine. However, this means two steps (a copy then move), because with PTP, I can only copy to the DCIM or Pictures folder.
Well PTP is faster. But it still tells me my camera wont play the file...
tedr108 said:
Lots of good suggestions here that you can try...
However, one more possible work-around that worked for my Ubuntu machine (where MTP is not working, either), in case nothing else works:
I switched to PTP (camera) on my TFP. I could copy just fine. However, this means two steps (a copy then move), because with PTP, I can only copy to the DCIM or Pictures folder.
Click to expand...
Click to collapse
Thanks for that idea. I was going to try that when I got some time but wasn't sure how it would handle it. I can handle just having to movie it to a diff folder once I get it on the prime.
Like the other poster said, can't wait to get a custom rom on this thing.
I ran into this annoying problem yesterday too. At first I thought it was an issue with the drivers on my Windows 7 box, so I went over to my Debian box and installed MTPFS, but no dice. The exact same thing happens - the computer is able to initialize the connection at first, and if you're quick enough you might even be able to copy/delete/move something, but after maybe 30 seconds or so the connection fails - transfers stop, renaming hangs etc. This was the exact same thing that happened on Windows 7 and so I must conclude it must be the TFP itself having issues with MTP. Running ICS IML74K.
MTP works but the date of all files and folders is wrong
tedr108 said:
Lots of good suggestions here that you can try...
However, one more possible work-around that worked for my Ubuntu machine (where MTP is not working, either), in case nothing else works:
I switched to PTP (camera) on my TFP. I could copy just fine. However, this means two steps (a copy then move), because with PTP, I can only copy to the DCIM or Pictures folder.
Click to expand...
Click to collapse
MTP works for me (Ubuntu 11.10). But I have found out, that once the internal storage is mounted in Ubuntu, the date of all files and folders are set to 1970-01-01.
Actually before, short after I had activated the Prime, I realised that the date was also wrong. I'm not sure now, but probably the same 1970-01-01. Then I adjusted the date and the upgrade to ICS went flawlessly.
Now I start thinking that this wrong date could be one of the reasons for many problems in TF Prime.
Does anybody have the same problem and know a solution?
I read in another forum when i was trying to get mtp to work on my nexus s that if you install media player 10 it can solve the issue of mtp not working in windows xp. Not sure if this applies to windows 7 though as i thought windows 7 was supposed to be able to use mtp out of the box.
-RioT- said:
Yes Your only options at this point is a slow wifi transfer or buy an sdcard to copy files to then transfer in the device it self. This seems very acceptable to some people.
MTP is garbage and has never worked well for me either.
Click to expand...
Click to collapse
On my Galaxy S2 MTP works like a charm, so it's not MTP in general. Maybe it's a bad USB cable, connector probs or Windows acts up.
It's May, and MTP is still garbage.

[Q] Help needed : no more access to internal storage

I'm no more able to access my personal data/folders located on /mnt/sdcard/
I only see 2 (empty) folders "external_sd" and "usbStorage".
But I'm quite sure my personal data is still there, but it doesn't show up because access rights are gone ?
- All the apps I previously installed (partially on internal storage) are still working
- When I take a picture with the camera : no picture is stored on the device ! And no more former picture can be viewed
- When I check the storage parameters, I get 12 Gb USB storage free / 12 Gb total
- Access from my PC : same result, only "external_sd" and "usbStorage" are visible
My phone is rooted
I really would like to recover my photos / videos, so please don't say "reinstall everything" unless being sure that the usb storage won't be erased.
Anyone able to help ? I would really appreciate, thanks in advance
batzman said:
I'm no more able to access my personal data/folders located on /mnt/sdcard/
I only see 2 (empty) folders "external_sd" and "usbStorage".
But I'm quite sure my personal data is still there, but it doesn't show up because access rights are gone ?
- All the apps I previously installed (partially on internal storage) are still working
- When I take a picture with the camera : no picture is stored on the device ! And no more former picture can be viewed
- When I check the storage parameters, I get 12 Gb USB storage free / 12 Gb total
- Access from my PC : same result, only "external_sd" and "usbStorage" are visible
My phone is rooted
I really would like to recover my photos / videos, so please don't say "reinstall everything" unless being sure that the usb storage won't be erased.
Anyone able to help ? I would really appreciate, thanks in advance
Click to expand...
Click to collapse
Hi,
1. Whenever you ask for help please provide some basic (important) information;
- what step/steps you performed before your issue appeared?
- what's your current rom/kernel?
2. If you are on a stock or stock based JB rom, what do you see when you go to /storage/sdcard0 with a file explorer? If not (you are on AOSP/AOKP rom) you may need to find "/emmc" folder for your internal SD card.
3. USB storage is what is seen on your phone from your PC (while connected via USB port). Go to a custom recovery (if you have one) then "Mounts and storage > mount USB storage", connect your phone to pc via USB cable and report what you see. If you didn't install Samsung KIES app before you may need to install Samsung USB drivers
Try ur memory card with another device, may be its corrupt
Go to cwm select mounts and storage and choose mount/sd card
Reboot
You can try moborobo pc suite to connect to ur pc
Hit thanks if i helped
Sent from my GT-S7500
Hi,
thanks for your advices.
Let me first give you some more information as requested by Many40 :
My original device : [SHW-M250K] (the korean SGS2)
I installed Official XXLQ5 Android 4.0.4 ICS Firmware 5 months ago, so I got a GT-I9100 with a 4.0.4 version of Android. Notice no problem since.
Kernel version : 3.0.15-I9100XXLQ5-CL753921
1. I didn't perform special steps before the issue appeard. I noticed the problem fortuitously 2 days ago. The only thing that could be linked to this issue is when I tried (the day before issue) to install Copilot on my device, while having Swiftkey already installed. This made some kind of mess, I had to kill the Copilot application and swiftkey was no more working at all. Some posts on the web explain that Copilot and Swiftkey are not compatible...
2. I cannot see any /storage/sdcard0 folder on my phone (neither when connected to my pc)
3. I don't have any custom recovery, I don't really know what it consists of. Could you please provide some details ?
@[email protected] : the problem is not an external sd card, but the internal storage.
I will have a look at moborobo, let's see if it helps.
Thanks and looking forward reading from you
Try restore factory settings
Do make a backup
It may help u
Hit thanks if i helped u
Sent from my GT-S7500
I restored factory settings, but there's nothing new :
- no personal file/folder visible in internal usb storage
- unable to store a photo taken with the camera (photo library keeps empty)
Any other suggestion ?
thanks
It may be a virus or your files are hidden
Try moborobo pc suite
Sent from my GT-S7500
Hi [email protected],
we are progressing a little bit !
I installed moborobo and the file manager shows me now all folders on the usb storage (my personal folders and system folders like e.g. DCIM/Camera). This shows that the folders were hidden.
But each folder is still empty (contain no file at all), so it seems the files are still hidden. Is there any moborobo/other feature allowing to have them visible ?
I also tried to take a photo : now it works, and the photo is stored under "DCIM/Camera"
thanks
In my files in ur phone go to settings and select option then select show hidden files
If this does not help u tell me if u are able to connect through mass storage
Sent from my GT-S7500
Showing hidden files does not help.
And yes I'm able to connect through mass storage (using "Set USB cable connection mode" and "Connect storage to PC")
It gives me 2 drives : E and I
E: shows nothing ("please insert disk in removable drive E")
I: displays the folders as they are visible in Root Explorer on my device
I tried to change the access rights on I: with following instruction in cmd :
attrib -S -H /S /D *
But didn't help...
Install mobile drives from moborobo pc suite
Then in folder options in ur pc select show hidden files
Then open cmd and type
attrib -h -r -s /s /d g:\*.*
Replace g with drive letter
This should fix your problem:thumbup:
Sent from my GT-S7500
[email protected] said:
Install mobile drives from moborobo pc suite
Click to expand...
Click to collapse
Sorry but I'm unable to find anything about installing "mobile drives" from moborobo... could you please give me some hints ?
Am I supposed to find this from the moborobo "Apps" tab ? (under "Applications")
Enable usb debugging in ur mobile then connect it, moborobo will automatically install drivers
Sent from my GT-S7500
When I enable usb debugging in my mobile and connect it, I get a kind of mapped drive named "GT-I9000", but with no drive letter (see attached screenshot)
And no way to access it from cmd, as it is not really considered as a drive.
And launching Moborobo does not add any additional drive... Did I miss something ?
"Run "regedit"and select the "HKEY_LOCAL_MACHINE/SYSTEM/MountedDevices" folder. See all the "Dos Devices" listed? You'll have one entry for each physically mounted drive (HDD or Disc) plus you'll have one show up for each USB drive you attempt to insert. Double click each device listed and seeifyou seetextsaying something like"U.S.B.S.T.O.R...". Once you find that device, right click it and select "Rename". Now change the drive letter to something unused... like Q: or something. Close regedit, disconnect the USB device and reconnect
Sent from my GT-S7500
Sorry for my late reply, I was away for some weeks.
I was able tu run the attrib command on the internal usb storage drive, but got no more lost file/folders... I assume the file and folders are definitively lost
I even tried a recovery tool mith no more success.
Thanks anyway for your help, and for the time you spend providing me your advice.

[Q] Mobile to pc connectivity problem

Hey guys.
I have Samsung galaxy ace 5839i (stock for 5830i) and I am using it for a few years, but this problem came for the first time.
Always, when I try to connect my mobile to pc using cable, it just won't connect, it won't even show me the notification of connecting.
Before this problem, I connected it to fedora linux and it was succesful, but now? It won't show me that USB sign even in windows.
Any help?
Thanks in advance
@LiQuDiAk, basically s5839i and s5830 i are identical in many areas ,, few questions though,, did you root your device or you are on android 2.3.6 stock version / kernel 2.6.35.7 ?
when you are in your windows device manager ( while you are connected , do you see any exclamation / question marks in front of the corresponding driver), you can always uninstall your old driver, reboot , then try compiled driver in attachment , and reboot to take proper effect in your registry (tested on win xp/7 -32bit) . Also check your device settings>Application>Development > USB Debugging and make sure the option is checked. now lets check your debugging mode through ADB command and see if your device is being recognized. download platform zip attachment, unzip it and put the folder someplace like your desktop. Now open your command prompt (cmd) through whatever means you are comfortable and change directory (cd) to the unzip folder or simply open your folder and drag/drop adb.exe into your CMD to be in the right place very fast. Then type "adb devices" without quotation marks and report for more troubleshooting .Assuming your Samsung cable is not faulty of course.
@ehsanotaku Yes i did root my phone on pheonix fire rom. No i do not see any. And debugging is checked, that was my first guess why it was causing this. I was checking, whether my device is recognized in linux (only available OS in present) and it was NOT, but the cable is not faulty, because it was charging my phone... but i will do recognize process on windows, hope it will get better. But thanks so far!
so, the driver didnt help, but the adb devices got me something long which i do not completely understand (i am a girl and not IT) so...
LiQuDiAk said:
so, the driver didnt help, but the adb devices got me something long which i do not completely understand (i am a girl and not IT) so...
Click to expand...
Click to collapse
off topic though, gender discrimination is prejudice,, sorry if you are offended . Learning from each other despite your gender,does not undermine your knowledge EVER mate You might find it hard to believe, but I am quite novice in android stuff myself ( learning a great deal from some female members though ).
Back to topic at hand now,,,So let Perfectly Clear take away the time-consuming tasks and fix some stuff ..1. so you can not access your sdcard's content from either systems,, even if you try some live bootable Ubuntu disk/flash into your system and boot it up,, you can't access the mount drive content , right?
2. screenshot of your device manger while you are connected always help mate
3. those long streams of numbers and words is supposed to be your device name , it means your device is communicating with your pc ( /sdcard/ should not be corrupted). You can push (copy ) some vital files to your device with following command :
again same path >> put some file into your desktop (drag/drop to cmd)
i.e: "adb push C:\Users\ehsanotaku\Desktop\test.txt /sdcard/"
back to your device and check root of your files with whatever file explorer you got to approve the theory
4. forgot to ask , just to be on the safe side your device is not in boot loop process, stuck on samsung splash screen or something like that, right?
okay, thanks!
1. I cannot access it trough USB to mobile way, but from SD card adapter, yeah I can (it is just the weird feeling, when you always have to put out your sd and do it that way, i would like to sort this out)
2. http://s1.postimg.org/nkta50u3x/Untitleddas.png I suppose the unknown device is my phone.
3. Just a question, my phone is not connected, i cannot access it and this doesn't help
4. Nope, it is working, i can access everything, just this connecting problem i have. anything else is running smoothly.
Let's say any of this will work, do you think flashing a stock rom will help? I am not sure, if this is problem of rom or not, so...
And maybe i wasn't clear (my bad if not) but when i plug the cable in my device and pc, pc will make this sound of new device found, but it wont show me anything, so my phone. It will charge, but it wont connect, it is behaving like it is on a charger and not connected to the phone.
@LiQuDiAk, Hasty actions are done in a hurry, sometimes without the necessary care or thought. Now let's not leap to any conclusion about your Android custom Rom and flashing back to stock. lets focus on your first most obvious problems,which is driver related.
You didn't declare your flavor of windows: i.e: Windows x86 based-PC;professional 7
Not so sure of your OS Name/Version and System Type, search "system information" in your search box.
Your task manger depicted ACPI x64 ( 64-bit system, no wonder previous 32-bit compatible didn't work out for you ).
Symptoms observed so far:
1. USB cable only charges ( remember your USB cable data line might be the culprit. Just in case of only charging,checking with another set recommended. Your USB port might be problem, some dirt or faulty data line, checking with another USP port doesn't heart though.
2. Windows recognizes something more (like in your case, struggling to find proper corresponding driver), but cannot see it as a Samsung android device (cannot allocate the installed USB drivers to the device).
-If you got Kies (Samsung proprietary software) installed on your PC, delete it with a descent uninstaller program such as CCleaner free version .Kies might cause driver conflict , use it as only last resort , if all drivers failed to communicate with s5830i device.
-Also Uninstall your previous given driver same way, now restart , back to system and grab set of universal Samsung Drivers from attachment .
3.Can't see your "USB connected" in Android notification bar, so you cant click on it and mount your storage data part while you are connected to your PC.
-Normally, when you plug in your Android device, Windows will recognize it as an MTP (Media Transfer Protocol) device and quietly mount it.
However, if you’ve ever attempted to unlock your device such as to install a new ROM or root it, then such miss behaviors might be expected occasionally .
Before i go for more troubleshooting , please provide a full screenshot from your "About Phone" page in your settings . I am quite curious about this phoenix Rom you have mentioned though . I am quite familiar with at least dozen of discontinued/ported projects, but never heard of such ported Rom from other models into s5830i .
Couple of solutions :
Navigate to your settings,Storage and touch the upper-right corner for the “USB computer connection” options, if you have this part available.
make sure “Media device (MTP)” is selected. ( if you have USB Utilities section or whatever added section in your custom settings go there . Selecting that will do the trick. If it does not, then you likely have a driver problem.
Open your device manager, Right click on your unrecognized device in question,choose update driver software, choose Browse my computer,find it through given x64 drivers in your package ,Restart. ( After a successful installation, restart your PC, you must have something like the picture in attachment ) .
Problem was not resolved, Uncheck your debugging option,power off your phone. Now hold Volume(+) + Home + Power for a couple of seconds simultaneously to get to your Samsung Recovery or your Clockwork Recovery, choose Reboot( might be some process/service in your background, which interfere with your Auto USB connected feature of your device. See if the problem is being resolved .
Problems have been persisting, we might need to format your SD card, but before that, insert it into your card reader, in your file explorer window choose Tools>Folder options>select view tab> tick your select hidden file.folders. Now copy all of your SD card's contents into some folder, safe inside your PC.
We can format your card through your clockwork mod recovery console, or some partition tools such as free mini partition wizard,,
problem still persist? let me know
Hey
After some rest with this, my mobile got it solved (dunno why, just once tried to do it and it works.)
So, thank you very much with your answers!!!!
And about that screenshots, I will PM you
But, really, thanks a lot, mate!!!!

[SOLVED] ADB 'unauthorized', no RSA prompt, and no 'Revoke USB debugging' option

After fighting with this for nearly a month and reading dozens of threads on xda, stack-overflow, etc... I finally figured out this issue, so I'm putting it here in hopes it saves someone else the frustration.
The issue presented itself on my HTC One (M8) running the ViperOne 6.1.0 ROM.
I'm putting this thread in the general section though since I've seen many people with very similar, if not the same issues on a wide variety of devices.
I believe the root cause of my particular issue may be the way HTC sets their devices to simply allow all debugging without authorization if the phones are s-off.
Mine is still s-on, but I have another M8 that's s-off with the exact same ROM as well as an s-off M9, and both of them go straight into debugging, no questions asked, no prompt.
I'm wondering if maybe the ROM was developed using a developer version of the phone and is just missing the prompt, or something similar, but this is just conjecture.
The basic problem was that, when I tried to connect ADB, it showed the phone as "unauthorized" and no matter what I did, the prompt would not come up on the phone to allow debugging.
Also of note, I was missing the "Revoke USB debugging authorizations" menu item entirely (I could search for it, but it wasn't actually there in the menu)
I tried many different combinations of changing drivers, USB modes, enabling/disabling debugging, different machines, deleting the public and private keys for ADB on the computer, etc... all to no avail.
Finally, after much research and testing, I found this comment on stack-overflow and figured out how to manually authorize keys.
Note: This will require root, a custom recovery, or some way of writing the the system partition (I used TWRP at first, then TerminalEmulator later)
The key was to understand what clicking the dialog to 'always allow' a machine actually does.
When you click to always allow, android appends the public key from ADB on the computer into a specific file on the phone.
Since my phone wouldn't connect in the first place though, I didn't have that file or understand the format, etc...
The file is called adb_keys, it is a file (not folder) which is located at: /data/misc/adb/
The format of this file is one public key per line.
Thus, there are a couple of ways to go about manually authorizing a machine for debugging.
First, manually building the adb_keys file. (This is what I did at first)
Second, copying an existing adb_keys file from another device (Which doesn't need root)
For manually building the adb_keys file, the first step is to find the public key on the computer.
For me (Windows 10) it was located at C:\Users\<my profile>\.android\adbkey.pub
For Linux and OSX, I believe it is at: ~/.android/adbkey.pub
If you only need to authorize one computer:
Simply copy the adbkey.pub onto the device location: /data/misc/adb/ and rename it from adbkey.pub to adb_keys
chmod 0644 and then reboot.
Now, the phone should accept debugging from the computer just as though you clicked the dialog.
If you need to authorize several computers...
As mentioned, the /data/misc/adb/adb_keys file is actually a list of all the keys which have debugging permissions, one key per line.
First, collect the adbkey.pub files from each computer you want to authorize.
Then, using a text editor which supports linux style line breaks (Notepad++ if on windows) simply create your own adb_keys file by appending the contents of each adbkey.pub file, putting a line break between each key
Now save the adb_keys file you just created, and put it on the phone's /data/misc/adb/ folder using whatever method you prefer, and chmod 0644
If you need to revoke debugging permissions, (like the menu option, if the menu option is missing)
Simply delete /data/misc/adb/adb_keys
And finally,
If you have access to another device (does not have to be rooted) and want to replicate its debugging permissions
Plug the 'donor' device into the computer first, then issue:
adb pull /data/misc/adb/adb_keys c:\temp\adb_keys
(Or replace "C:\temp\adb_keys" with whatever file path works for you)
Then, copy the file to the 'target' device in the same location (/data/misc/adb/adb_keys) and chmod 0644
I've tested all of these methods and they worked well.
In the end, I used the last method since my tablet had all the debugging permissions I wanted on my phone.
Thanks,I have the same issue with the same rom. I tried your solution and it worked.
Hi, I ran into this issue with my Moto G5 plus. The only difference is that I'm not missing the Revoke Auth option, even though using it does nothing for me, and I still fail to get the Authorization popup when connecting via USB/using ADB.
I tried the above method of copying the adbkey.pub file to my device directory, renaming, etc. I am doing something wrong and would like a hint.
I copied the adb_keys via Windows Explorer to my devices root directory. There was a /data/ directory, but only Titanium Backup had a subdirectory within, so I created .../misc/adb/, and placed the adb_keys file there.
I rebooted to the TWRP recovery Terminal, and navigated to the /data/misc/adb directory. I ran chmod, and the system could not find the file specified. Listing directory contents also showed the directory to be empty (yet when viewed in Explorer or LineageOS, it's visible).
Did I place the keys file in the wrong place?
Copying via windows explorer does not place it in the device root.
Inception
I was trying to Copy one donor device's Adb key file to my broken android phone to mirror it on my PC, Following the guide of another post, and somehow i stumbled across this post, after failing to copy from Donor device. Now i managed to copy the adb_key from Donor device but LOL my broken Android device is Unauthorized. What should i do? IS THERE ANY SOLUTION?
misuvi said:
I was trying to Copy one donor device's Adb key file to my broken android phone to mirror it on my PC, Following the guide of another post, and somehow i stumbled across this post, after failing to copy from Donor device. Now i managed to copy the adb_key from Donor device but LOL my broken Android device is Unauthorized. What should i do? IS THERE ANY SOLUTION?
Click to expand...
Click to collapse
Do you have any way of writing to the /data/misc/adb/adb_keys file on the broken device?
I think i just did!
NFSP G35 said:
Do you have any way of writing to the /data/misc/adb/adb_keys file on the broken device?
Click to expand...
Click to collapse
I rebooted into recovery mode, copied, but still the mirroring application is not working, still prompting for allowing USB debugging. Now i connected the donor device on That mirroring application and Saved the RSA of Mirroring application, and going once again. Wish me good luck
misuvi said:
I rebooted into recovery mode, copied, but still the mirroring application is not working, still prompting for allowing USB debugging. Now i connected the donor device on That mirroring application and Saved the RSA of Mirroring application, and going once again. Wish me good luck
Click to expand...
Click to collapse
Well, don't forget to post back if it worked :good:
Guess I did i good job
NFSP G35 said:
Well, don't forget to post back if it worked :good:
Click to expand...
Click to collapse
Well it didn't work since the Adb server of Cmd and mirroring application were different, so i searched for another application which has same server as Cmd, and luckily i found a great software by Genymobile, named scrcpy, from github, just one click on scrcpy-noconsole and boom? Thanks for all the help.
misuvi said:
Well it didn't work since the Adb server of Cmd and mirroring application were different, so i searched for another application which has same server as Cmd, and luckily i found a great software by Genymobile, named scrcpy, from github, just one click on scrcpy-noconsole and boom Thanks for all the help.
Click to expand...
Click to collapse
Cool, glad to help.
For a while, I looked for ways to get around this from a different angle (for example, making the keys match on the ADB server side) but I ran into some issues and ended up getting what I needed via the steps in the OP.
Glad you got it working though!
"And finally,"...you should have led with that
I cannot thank you enough! Other proposed solutions to this hellish problem made my head hurt. This was beautifully simple - copy file from the working device onto non-working, change permissions and BOOM! It works.
Thanks again, you're awesome!
Happy to help!
Oh my god, it's not a folder! Thank you so much! I was about to give up, this was driving me totally crazy. Everywhere on the internet they just keep repeating the same advice that did nothing, I actually created that as a folder and no wonder it wasn't working.
I still can't believe it's working now, ahhh...
can't believe in my eyes. work perfect for me. thanks you so much!!
I am trying to use the 'copy keys file from another device' method.
I've copied the adb_keys file to my PC.
Now, how do I copy that file from the PC to the data folder?
adb won't allow it as it's not authorised, what am I missing?
Thank you in advance for your help!
Bungle2000 said:
I am trying to use the 'copy keys file from another device' method.
I've copied the adb_keys file to my PC.
Now, how do I copy that file from the PC to the data folder?
adb won't allow it as it's not authorised, what am I missing?
Thank you in advance for your help!
Click to expand...
Click to collapse
You can't copy to the device through ADB until you get ADB authorized... that's the whole point... you have to use some other method to get the file there.
I used TWRP custom recovery to copy the file from an external SD card the folder.
If you don't have an external SD card, use USB MTP/PTP, Mass Storage, a USB OTG adapter and thumb drive... if you desperate, zip the file and email it to yourself... pretty much endless methods of actually getting the file onto the phone somehow.
But you'll need root (or a custom recovery) to copy the file from wherever it is on the device to the correct location (/data/misc/adb/adb_keys)
You could potentially use several methods, for example you could use terminal emulator or a root file explorer to get the file to the correct folder.
NFSP G35 said:
You can't copy to the device through ADB until you get ADB authorized... that's the whole point... you have to use some other method to get the file there.
I used TWRP custom recovery to copy the file from an external SD card the folder.
If you don't have an external SD card, use USB MTP/PTP, Mass Storage, a USB OTG adapter and thumb drive... if you desperate, zip the file and email it to yourself... pretty much endless methods of actually getting the file onto the phone somehow.
But you'll need root (or a custom recovery) to copy the file from wherever it is on the device to the correct location (/data/misc/adb/adb_keys)
You could potentially use several methods, for example you could use terminal emulator or a root file explorer to get the file to the correct folder.
Click to expand...
Click to collapse
Hey NFSP G35, thank you for the reply!
I figured there was something I was missing, I just don't know the steps to do it right.
I have a Moto X Play that has a broken screen, so no display, and does not accept touch input.
It powers on and is working as it was before the screen broke as far as I can tell, so I'm trying to connect it up to the PC to get all the data off it.
However, before it broke, something happened with the software that meant Google Play disappeared.
The device is stock Motorola device, so not rooted, no TWRP etc. USB debugging is enabled but not authorised.
What would you recommend is the best way to get the adb_keys onto the phone given the issues above?
Your help is greatly appreciated!
Sorry, given your circumstances, it's likely impossible or very difficult
?? Thanks, it worked perfectly on Samsung J6 run Evolution X 4.0
Thank you it's working

Categories

Resources