Pictures lost during transfer to SD Card - Android Q&A, Help & Troubleshooting

Hello everyone. I know other members have asked if it is possible to retrieve accidentally deleted pictures but I'm not sure if it will still be possible with my circumstances. I was running out of space on my phone so I decided to try to move a large amount of pictures from my internal memory to my sd card on my phone using my computer. Unfortunately like a dope I tried to cut and paste instead of copying the files. Needles to say I cut the files and then during the paste something went wrong and it was unsuccessful. Now the pics are not showing up on my internal storage any longer. Since I was using my computer to do the transfer will it still be possible to recover the pictures?
Ive already tried using fonepaw, diskdigger, digdeep, and jihosoft without any success. Most programs try to root the phone and are unsuccessful. One click root told me they could root the phone but they recommended I not do that because it will wipe data off the phone. They tried backing up the data first with a program called sunshine but that was unsuccessful.
So my main question is, am I just wasting my time or is there a good chance I can still recover the pictures? Thanks in advance.

I
cc1284 said:
Hello everyone. I know other members have asked if it is possible to retrieve accidentally deleted pictures but I'm not sure if it will still be possible with my circumstances. I was running out of space on my phone so I decided to try to move a large amount of pictures from my internal memory to my sd card on my phone using my computer. Unfortunately like a dope I tried to cut and paste instead of copying the files. Needles to say I cut the files and then during the paste something went wrong and it was unsuccessful. Now the pics are not showing up on my internal storage any longer. Since I was using my computer to do the transfer will it still be possible to recover the pictures?
Ive already tried using fonepaw, diskdigger, digdeep, and jihosoft without any success. Most programs try to root the phone and are unsuccessful. One click root told me they could root the phone but they recommended I not do that because it will wipe data off the phone. They tried backing up the data first with a program called sunshine but that was unsuccessful.
So my main question is, am I just wasting my time or is there a good chance I can still recover the pictures? Thanks in advance.
Click to expand...
Click to collapse
Use adb to backup your data, you may then root your phone.
FOR TAKING BACKUP:
Install Kaush universal adb driver and adb setup on your pc.
You can get adb command line tools from android.com and the driver from kaushikdatta.com
Install the driver first, once completed, begin adb installation.
Press n when adb setup asks you to install drivers.
Once adb installation completes, open command prompt as administrator.
Open file explorer and navigate to C:\adb
Enable USB debugging on your phone and connect it to pc using USB cable.
Press Shift+right click and select "Open command window here".
Type " adb devices " and press enter.
If it shows some device to be connected, only then proceed further.
Type "adb backup -apk -shared -all -f backup.ab" and press enter.
Your phone will ask for your approval.
Wait until the process completes.
FOR RESTORATION OF BACKUP:
Open the adb command window as stated above and type "adb restore backup.ab"

Related

Update USB Drivers?

I recently rooted my Eris and I'm unable to flash a custom recovery because I can't get the USB drivers to update with those found in the SDK files. When I try to update the drivers Windows tells me that I have the most up to date drivers installed. It's because of this I cannot see my phone in the command prompt and can't get the custom recovery to work.
Has anyone tried putting the recovery files on their SD and using a terminal emulator?
Any ideas on updating the USB drivers?
If I flashed a custom Rom (as risky as that is without a recovery) could I then use nandroid or some other recovery? Or would I still need to use SDK?
joshw0000 said:
I recently rooted my Eris and I'm unable to flash a custom recovery because I can't get the USB drivers to update with those found in the SDK files. When I try to update the drivers Windows tells me that I have the most up to date drivers installed. It's because of this I cannot see my phone in the command prompt and can't get the custom recovery to work.
Has anyone tried putting the recovery files on their SD and using a terminal emulator?
Any ideas on updating the USB drivers?
If I flashed a custom Rom (as risky as that is without a recovery) could I then use nandroid or some other recovery? Or would I still need to use SDK?
Click to expand...
Click to collapse
download htc sync that should fix ur problem , it did for me
Yes HTC sync updated mine as soon as your phone is acknowledged by HTC sync it should update your usb drivers
FYI HTC sync did NOT work for me on Windows 7. I had to do some pretty annoying stuff to stop windows from installing the regular drivers automatically. If HTC sync doesn't work I can try to help.
If HTC Sync doesn't help, try the following steps.
1. Unplug your Eris from the PC
2. Open Device Manager and delete the Android device
3. Reboot your PC
4. Once in Windows, connect your Eris
5. The drivers should load automatically, if not point it to the SDK drivers folder
Good luck!
Any more ideas
First I tried downloading HTC Sync on my laptop (running Vista) and that didn't do it. Then I deleted the drivers and tried to manually download them back with the ones in the USB folder of SDK and still it wouldn't work.
So I started over and downloaded SDK and Java to my pc (Windows 7) and tried to update the drivers with the ones found in SDK and it wouldn't let me. So I deleted the drivers, unplugged my phone, and plugged it back up. Before I could attempt to direct it to download the intended USB drivers, Windows 7 had already updated with the drivers of it's choice. I can't win for losing.
If you don't mind using one of those "Live" Linux CDs, you could install the recovery using fastboot.
No need to install anything on the PC, and no drivers are needed for Linux, no SDK, no Java, no adb; just make sure to run fastboot as root.
The downloads of fastboot and the Amon_RA recovery are small, so they will easily fit in /tmp.
bftb0
I've never used Linux but I'm willing to try. Please tell me more. Are there "how tos" for this?
When you have your phone plugges in do you have it set to "charge" or "sync"? I know all the how to's say yo have it set to charge only but the inly way my computer ever finds my phone is if it us set to sync.
-------------------------------------
Sent via the XDA Tapatalk App
I set it to charge. I was finally able to install the correct driver. I selected a Google driver from the list it gave me (which my computer did not like) then went back and updated the drivers with those found in the tools usb folder of SDK. IT FINALLY LET ME!
Now I have a new problem. I'm using the command prompt and trying to create a custom recovery. I set it to the tools directory in SDK (where the flash and recovery images are) and I'm entering the commands exactly like the "how to" instructions have them. I keep getting "adb: not found" errors.
Can anyone tell me what I'm doing wrong?
joshw0000 said:
I've never used Linux but I'm willing to try. Please tell me more. Are there "how tos" for this?
Click to expand...
Click to collapse
Well, in the long run it is probably a good idea to resolve the driver install problems you are having on your PC, because it is very useful to have "adb" around, even if you are already rooted and have the ROM of your choice installed.
But, if you would like to do this, here's an outline below. Note that the point of the "Live" CDs is that you are not installing Linux on your machine, you are just booting it directly from the CD - the OS and hard drive on your PC are untouched.
1) Download an ".iso" file from your favorite Linux distro [ 3 ] for their "live" CD. (BIG download, usually 600+ MB)
2) Burn the .iso file to a CD as a bootable CD. (Most decent CD/DVD burner programs know what an .ISO file is, but might refer to them as a disk image).
3) Boot your PC off it! (You might need to hit a key on your PC right after you power it on to go into a boot menu, or the BIOS setup to change the boot order so your PC will try to boot from the CD/DVD before it tries the hard drive).
4) Copy the fastboot [ 1 ] executable for Linux and the Amon_RA recovery image [ 2 ] to /tmp "somehow" - you could just download it using the Linux browser if your network come up automatically (wired ethernet), or you could put them onto a USB key beforehand, and plug that in after Linux has booted; it should mount automatically.
5) Then, open up a terminal window and become root. (Type either "su" or "sudo /bin/bash" - depends on the Linux distro)
6) Attach your (well-charged) phone to the phone via USB, and power it up in fastboot mode (Send+End simultaneously)
cd /tmp
chmod 755 fastboot
md5sum recovery.img (check file sig)
./fastboot devices (check to see you are connected)
./fastboot flash recovery recovery.img
Obviously, if you need to look something up on the internet, it is useful to be networked, so you can use a web browser. The Linux boot will try to autoconfigure network interfaces automatically, but this is going to be most straightforward with a wired connection (Ethernet). Alternatively, if you have another PC or laptop nearby, you could use that.
Good luck.
Edits:
[ 1 ] Find Linux version of fastboot from HTC midway down this page - md5sum 9851bb6ad29cd4b60c9ba9d011ba9efd
[ 2 ] Amon_RA's recovery is located on this XDA page - md5sum e3932991f097993602af3c7a4b61a4f8
[ 3 ] Ubuntu's Current (x32) CD for v10.04 this page
NOTE: This CD is both a "Live" CD and an Install CD. You DO NOT WANT TO INSTALL ANYTHING; you are using the "Live" CD function - see the "show me how" link under Item #3 ("Try It!") on the above linked page
[ 4 ] Various OpenSuSe 11.2 Live CDs
Thanks for the info. I was able to get my drivers installed and run a nandroid recovery. Then I think I bricked my phone:
I just ran a nandroid backup for my Eris which was at stock 2.1 w/ root. I first partitioned the sd to swap - 3072 MB, ext2 swap 3072 MB, and fat32 - remainder. Realizing this was stupid, I went back and changed the partition to swap - 0, ext2 - 512 MB, fat32 - remainder 7680 MB or 7.5 GB. I moved ext2 to ext3 and booted the phone. All my sd was cleared so I copied everything back on (I saved all sd contents to my computer prior to this). I went back to recovery and flashed Eris Lightning 3.02. Everything went successful and when it rebooted, I saw the droid guys, then the "quietly brilliant", then "Verizon" screens. It then began running the "quietly brilliant" and "verizon" screens over and over. I pulled the battery and powered up again but it's still running those two screens over and over. I booted into recovery and attached my phone to the computer. I opened command prompt, entered " sd C:\android-sdk-windows\tools" and then entered "adb devices". It reads "List of devices attached" but there are none. I attempted to add the driver back to my device but when I go to device manager and click "update driver" and point it to the tools directory in SDK, it says that "Windows could not find driver software for your device".
If I can't communicate with my phone via usb and it wont boot, how can I get it to recover?
Any suggestions would help, I'm scratching my head here. I really don't want to have to buy another phone.
joshw0000 said:
Thanks for the info. I was able to get my drivers installed and run a nandroid recovery. Then I think I bricked my phone:
I just ran a nandroid backup for my Eris which was at stock 2.1 w/ root. I first partitioned the sd to swap - 3072 MB, ext2 swap 3072 MB, and fat32 - remainder. Realizing this was stupid, I went back and changed the partition to swap - 0, ext2 - 512 MB, fat32 - remainder 7680 MB or 7.5 GB. I moved ext2 to ext3 and booted the phone. All my sd was cleared so I copied everything back on (I saved all sd contents to my computer prior to this). I went back to recovery and flashed Eris Lightning 3.02. Everything went successful and when it rebooted, I saw the droid guys, then the "quietly brilliant", then "Verizon" screens. It then began running the "quietly brilliant" and "verizon" screens over and over. I pulled the battery and powered up again but it's still running those two screens over and over. I booted into recovery and attached my phone to the computer. I opened command prompt, entered " sd C:\android-sdk-windows\tools" and then entered "adb devices". It reads "List of devices attached" but there are none. I attempted to add the driver back to my device but when I go to device manager and click "update driver" and point it to the tools directory in SDK, it says that "Windows could not find driver software for your device".
If I can't communicate with my phone via usb and it wont boot, how can I get it to recover?
Any suggestions would help, I'm scratching my head here. I really don't want to have to buy another phone.
Click to expand...
Click to collapse
First, relax and take a deep breath; everything's going to be fine.
In the recovery main menu, there is an Item called something like "MS-USB toggle" or something like that. It does not use the adb driver, it uses a standard "Mass Storage Device" USB driver already on the PC. The purpose of this function is to make the SD Card mount on the PC when the Amon_RA recovery is running.
Try that - it should work.
Then, download a conservative ROM such as Ivanmmj's Official 1.0 alpha, or Jcase's "Plain Jane", and copy it to your SD card.
After you have done that, make sure to check the MD5 sum of that .zip file on the SD card. (You should be doing this already).
Then, cleanly dismount the USB drive from the PC with the "Safely Remove Hardware" thingamabob, and toggle "off" the MS-USB toggle on the phone. Return to the main menu, wipe /data, and then flash the "conservative" ROM.
Then boot the conservative ROM just to verify everything is OK.
Next, Backup anything from the SD card that you don't already have (this step might be optional), and boot into recovery, and unpartition your SD card so that the only thing that is there is the VFAT partition.
For the moment, I'll give you some advice: f*ck A2SD. You need to gain some familarity with how the various versions of a2sd work before you start using it..
Very likely you were just stuck in a boot loop created by the re-partitioning you performed after initial configuration of a ROM that uses a2sd. Frankly, it is easy to create conditions for this, especially if you switch between ROMs that use different versions of a2sd, and/or don't understand that certain versions are not correctly backed up with Nandroid at the moment (e.g CLB).
bftb0
Go in to the start menu of your computer or laptop right click on computer and go down to properties and open it up look to the right and you will see something that says advanced system settings click that and it will open up another window for system properties.. Okay look at the bottom of that small window you will see something that says environmental variables, click that. Now you want to scroll through the system variables and find the one that says "path" you want to change that to you ";C:\android-sdk-windows\tools" and save it.. That is where your adb file or app is in your sdk tools folder, so when you open up a command prompt type in adb devices it may say something about killing daemon starting successful.. Don't worry just type it in again you should get your phones serial number thats when you know your good and you can start talking to your phone.. You can try a simple command like adb reboot and it will reboot your phone.. All else fails and you do this and your phone is responding but you can get anything to run in the command prompt type with 1 space cd then another space and then copy and paste "C:\android-sdk-windows\tools" that.. So it will look something like this
cd C:\android-sdk-windows\tools.. That should def do the trick.. Or absolute worst case scenario and you want to make it real easy and not have the fun of doing all the hard but fun work just use the "all in one root script" it will root your phone and it will also install "amon RA recoveryv1.6.2"... Hope this helps you out. LoL I know its long but yo dude I went through the same hell and I finally got everything where I want it!!!!!! Also make sure your HBOOT is under 1.49, if you have 1.49 you cant root... For example 1.46 your good...
Go in to the start menu of your computer or laptop right click on computer and go down to properties and open it up look to the right and you will see something that says advanced system settings click that and it will open up another window for system properties.. Okay look at the bottom of that small window you will see something that says environmental variables, click that. Now you want to scroll through the system variables and find the one that says "path" you want to change that to you ";C:\android-sdk-windows\tools" and save it.. That is where your adb file or app is in your sdk tools folder, so when you open up a command prompt type in adb devices it may say something about killing daemon starting successful.. Don't worry just type it in again you should get your phones serial number thats when you know your good and you can start talking to your phone.. You can try a simple command like adb reboot and it will reboot your phone.. All else fails and you do this and your phone is responding but you can get anything to run in the command prompt type with 1 space cd then another space and then copy and paste "C:\android-sdk-windows\tools" that.. So it will look something like this
cd C:\android-sdk-windows\tools.. That should def do the trick.. Or absolute worst case scenario and you want to make it real easy and not have the fun of doing all the hard but fun work just use the "all in one root script" it will root your phone and it will also install "amon RA recoveryv1.6.2"... Hope this helps you out. LoL I know its long but yo dude I went through the same hell and I finally got everything where I want it!!!!!! Also make sure your HBOOT is under 1.49, if you have 1.49 you cant root... For example 1.46 your good...

[Q] Access USB via ADB

Hey guys,
is it possible to access the internal storage via adb, without having a display?
My Galaxy SII Display is broken, but the rest should work.
usually i have to lock in with the security points that have to be connected (i dont know how that is called in english),
to allow access via usb.
now that the display does not work, i can not go that way.
so is it possible to access the internal storage via adb?
or do you have another way for me to get my data back?
i am not going to buy a new galaxy s2 and replacing the motherboard,
because its not worth it.
i have cm10.1 installed with dorimanx kernel, and root is allowed for adb and apps.
i never used adb, so i dont know how to start my search.
i also have the problem that i dont know how to look for that thing,
because im not english.
it would be nice if you can give me a start,
or another way to access the internal storage.
i also thougt about accessing via recovery.
i think i can go into recovery, and by pressing volume and power keys,
i can naviagte to mount data.
but im not sure about the steps,
so if anyone have a dorimanx 7.xx kernel,
can you please write the steps down for me?
thank you.
Grandtheftman said:
Hey guys,
is it possible to access the internal storage via adb, without having a display?
My Galaxy SII Display is broken, but the rest should work.
usually i have to lock in with the security points that have to be connected (i dont know how that is called in english),
to allow access via usb.
now that the display does not work, i can not go that way.
so is it possible to access the internal storage via adb?
or do you have another way for me to get my data back?
i am not going to buy a new galaxy s2 and replacing the motherboard,
because its not worth it.
i have cm10.1 installed with dorimanx kernel, and root is allowed for adb and apps.
i never used adb, so i dont know how to start my search.
i also have the problem that i dont know how to look for that thing,
because im not english.
it would be nice if you can give me a start,
or another way to access the internal storage.
i also thougt about accessing via recovery.
i think i can go into recovery, and by pressing volume and power keys,
i can naviagte to mount data.
but im not sure about the steps,
so if anyone have a dorimanx 7.xx kernel,
can you please write the steps down for me?
thank you.
Click to expand...
Click to collapse
if you can mount in recovery then mount everything in recovery,connect your device to PC and the open command prompt and navaigate to folder where you have set up android sdk.
now do the following
1) adb shell
2) now type ls -it'll list all folder and files.
3) now navigate to your sd-card (can't tell exact name for internal sd card) by typing cd <directory name>
4) you can list all files by using ls command.
5) Once you find the exact directory name of sd card and files to be recovered then type exit
6) now type adb pull /path/to/your/folder/filename.File will be saved in working directory...
i don't have s2,just helping you with some common adb stuffs.
btw you can use adb file managers which provides GUI.Like this one http://forum.xda-developers.com/showthread.php?t=1821601
adb
Connect the phone to system, Open terminal and do adb remount then adb shell.
Now do ls, you will be able to see all the folder and everything. Go to Sd-card folder and there you should have all your data.
There is and app ADBExplorer. I have never used this tool, but you can check it is GUI.
Thanks,
The ADBFileexplorer worked very well for me.
Just booted in recovery and started the explorer.jar in the adb folder.
Thank you for the tips.
This can be closed now

[RESOLVED] Screen Broken - Data Recovery?

I've got a droid razr; rooted, stock rom
I broke the screen accidentally and now the screen isn't showing anything and touch isn't working.
I'd like to recover all the data off my device, but since it's locked, it won't budge. Drives won't mount when I plug it into my PC.
I've got a previous backup which is a little older, but i'm interested in backing up the actual databases (texts, call logs, etc) and system data too, along with my images and personal data.
Is there any way I can perform a whole backup while the system is locked like this?
I've already searched the forum for previous threads with similar issues, but I couldn't find one with a viable solution.
Any help is appreciated, thanks in advance.
Partial Update
Hey all-
I've partially solved my problem.
I was able to get ADB working miraculously. I downloaded the Motorola Device Manager and installed it, also downloaded the Android SDK/Java SDK;
Using the sdk manager i installed the google usb drivers (im not sure it helped any way, but just in case)
after that I ran through the process of adb
Code:
adb kill-server
adb start-server
**plug in device**
adb wait-for-device
adb get-serialno
From there I was able to use "adb shell" and navigate around the file system; used su, went to /data/system/ and did "mv gesture.key gesture.key.bak"
I then restarted my phone and did a repeat of wait-for-device, and get-serialno just to verify the phone was connecting properly.
I then browsed to my computer and amazingly, the drives mounted, my sdcard, and sdcard-ext as removable drives and I was able to view the contents.
-------
So now, I'm stuck here with a device that's NOT locked, I can view my files, and I can navigate the file system.
My end goal is to be able to copy everything from /data/ to /etc/ /system/ /root/ /sdcard*/ /vendor/ /xbin/ and any other system file that's not available through the mounted drives.
I'll keep this thread updated, and if anybody has any help or clue on how I'd do this, it'd be greatly appreciated.
So far I've tried variations on "adb pull" using / as a root dir; trying to find a way to use the shell to invoke scp, ssh, or some other file transfer, but I get no network connection. While in the adb shell and doing any file operations, I get an error stating that it's a read-only file system as well.
Fixed
I just wanted to let you all know that I've resolved my problem.
Let me state the issue again.
- Screen and touch broke.
- Device locked with pattern
- Rooted
- ICS - Stock Verizon ROM
- USB Mode was UMC, not PTP/MTP
- USB Debugging enabled
I used ADB to delete /data/system/gesture.key and rebooted, effectively removing the device lock, and allowing drives & data on my SD cards to show up in explorer after a reboot of the phone.
After futzing around for a bit, I realized the phone was tied to my Google account, and I remotely installed "Droid VNC Server" (app name org.onaips.vnc)
From there I found a way to activate the VNC server through the ADB command line
Source: android.stackexchange.com/a/31957
Code:
Application located in
/data/data/org.onaips.vnc/files
With a root shell, run this
chmod 766 /data/data/org.onaips.vnc/files/androidvncserver
Then you can execute the vnc server from the command line
/data/data/org.onaips.vnc/files/androidvncserver
Run this to forward the port
adb.exe forward tcp:5901 tcp:5901
On your VNC client, connect to localhost:5901
From there I was able to get access to my home screen and pulled the notification drop down and changed from USB Mass Storage to Camera/Media Mode
Rebooted the phone, started the vnc server again, connected to it and moved some files around to my SD Card
In another adb shell as root, I was able to copy files from /data/data/ (or anywhere else I wanted) and write them to anywhere on /sdcard-ext/
From there in another command shell, I ran adb pull /sdcard-ext/datafolderfile
=========================================================================
I believe this to be the overall gist of things, though I ran into hiccups along the way, while I was messing around, I changed some permissions which caused my su executable to break and only be allowed to run shortly after booting the phone; and also because of the broken screen, something would cause the phone to reboot every so often, breaking my connections, backups, file transfers, and etc
There's also a cool option in adb
Run
"adb backup" and it'll give you all the switches, you'll have to confirm the backup on your phone, so be sure to be running VNC and confirm it, but adb backup should be able to grab everything you need. Like I said it didn't work for me because my phone would reboot;
I hope everybody that sees this can benefit from it
Annafunny said:
So did you extract your data from your Razr with adb finally?
Click to expand...
Click to collapse
This thread is really old (4 years)... and the answer was provided.
To avoid further issues, closed.

[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

Unable to connect with adb

Hi
Just got my A3. I'm unable to connect with adb to restore my backup. I enabled Dev options and USB debugging and when plugged into USB I get P notification icon and USB debugging connected message in notification. However
adb devices
shows nothing is connected. I notice there is no pop up asking if I want to authorize this computer which is iirc normally what happens.
adb can see my blu g6 phone so that's working. When I connect the A3 as a storage device, with no USB debugging, I can transfer files ok, so USB is working. I have a fresh Android studio install which should have the right sdk. I tried
adb connect <ipaddress>
and got "no connection could be made because target machine actively refused it" I did not refuse, because nothing popped up.
Have rebooted both phone and PC (windows 7)
Any idea what's going on? Thanks
Sent from my G6 using Tapatalk
Follow up: okay I figured out I need to install adb driver because A3 shows up in yellow in device manager. But I can't find a driver that works. I googled xiaomi A3 adb driver and downloaded like five of them from different sites and none worked. When I point windows to the folder where I extracted the driver it says could not find driver for your device.
I'm going nuts. Can someone point to a working driver for Windows 7?
Sent from my G6 using Tapatalk
These always worked for me. If they are not automatically installed for the device, follow the instructions in the video.
https://forum.xda-developers.com/showthread.php?t=2588979
Thanks. I figured out where I went wrong.
Instead of using the "browser file on my computer" and point it to where the driver is, I have to choose "let me select from a list" then "all devices", then select the Android composite adb driver. At least this works on Windows 7.
---
So I restored my back up, I got the pop up to confirm restore my data, and it seemed to run through the restore and took a while, but nothing changed. None of my app data was restored. All apps are still in newly installed state.
It did restore the data in SD storage, so my download folder etc got restored, which I could've done just copying to and from my PC.
What I really want is all the app data restored so I don't have to log back into all the different services and do all the settings again.
I did the back up with
adb backup -all -apk -shared -f allbackup.ab
Shouldn't that have worked?
Sent from my G6 using Tapatalk
From what I remember adb restore does not install *.apk back. It only writes back system and data files. So if you wanna all the app data restored - reinstall all apps manually before and then do adb restore.
On Windows you can sort of semi-automate that process in command prompt:
for %f in (C:\<your pak folder location>\*.apk) do adb install "%f"
Make sure though apk don't have spaces in their names or adb will complain.
qwertysmerty said:
From what I remember adb restore does not install *.apk back. It only writes back system and data files. So if you wanna all the app data restored - reinstall all apps manually before and then do adb restore.
On Windows you can sort of semi-automate that process in command prompt:
for %f in (C:\<your pak folder location>\*.apk) do adb install "%f"
Make sure though apk don't have spaces in their names or adb will complain.
Click to expand...
Click to collapse
I looked at adb logcat and there were a bunch of errors. Looks like it did try to restore app data but failed. Google back up already installed the apks back (except for the ones I side loaded) so that wasn't the problem. It's the app data (settings, etc) that I was hoping to get back
Oh well I just spent an hour setting my apps up again. I hear Google has already deprecated adb backup. Android needs a good non root desktop back up solution, not the cloud backup where you're at the mercy of Google and the individual apps to decide what get backed up.

Categories

Resources