adb pull fail with ...
 
Notifications
Clear all

adb pull fail with root access

8 Posts
5 Users
0 Likes
7,977 Views
 indi
(@indi)
Posts: 51
Trusted Member
Topic starter
 

Hi,

I have rooted HTC device. when i try the command adb pull /data data it does not copy any file, either not give error - "0 file pull, 0 file skipped"

What could be the reason for this?

When google I read ro.secure build property has to be 0. If so how to set this.

I have value 1 for ro.secure and adb shell setprop doesn't work.

Any idea how to pull /data.

Thanks
indi

 
Posted : 03/07/2014 11:44 pm
Bendroid
(@bendroid)
Posts: 35
Eminent Member
 

Hi,

what does it say when you type

adb devices

Do you get serial number of device?
If not did you install correct ADB drivers?
If yes you might need to flash an insecure kernel.

Ben

 
Posted : 04/07/2014 4:10 am
 indi
(@indi)
Posts: 51
Trusted Member
Topic starter
 

Hi,

adb devices -
Do you get serial number of device? - Yes it identify my device and print serial no

If not did you install correct ADB drivers? I am working on Ubuntu VM

If yes you might need to flash an insecure kernel.
How to set ro.secure to 0. Will setting this property make this work. But I could pull build.prop from /System

indi

 
Posted : 04/07/2014 7:47 am
Bendroid
(@bendroid)
Posts: 35
Eminent Member
 

No, changing a value in build.prop isn't sufficient, need to flash an insecure kernel.
But stop - if you're able to pull from /system/ you should also be able to push files.
Try different locations, try sd root /sdcard/ and some folders like //sdcard/download/ and so on, also try external card if any.

 
Posted : 05/07/2014 8:54 pm
 indi
(@indi)
Posts: 51
Trusted Member
Topic starter
 

Hi

I can pull several location where adbd root not required. Can't I make kernel insecure using /default.prop modification.

ro.secure=0
ro.debuggable=1

I just gave a try using abd insecure apk by chainfire on XDA. It make me able to pull /data. But still I want to know my above suggestion?

Many Thanks

 
Posted : 06/07/2014 8:59 am
(@bobster100)
Posts: 11
Active Member
 

Just in case anyone else gets problems with this….Ive spent the last day and a half trying to resolve this issue, and have the following information about it.

I believe these is an issue with permissions on the folders / files when attempting to access the /data/data folder.

http//stackoverflow.com/questions/20891597/copy-db-file-with-adb-pull-results-in-permission-denied-error

Above is one of the forum answers. From a forensics perspective, (and those with more experience please join in…)

One of the answers is
1) Access the rooted file system using the adb shell command
2) Type "su" at the command prompt to get root access (assuming the device has been rooted)
3) Access the /data/data folder
4) Use the linux command "chmod 777" on the /data/data directory to make all the folders and files in that location as accessible. However, this means that other apps can also access the data. (Im not saying it will, but it might.) In a live device I don't believe that is a very good idea!!! (I have done this myself, then reverted the folders to a "chmod 751" afterwards, but it was a bit risky. Also, although all the folders in the /data/data location appear to have the same permissions, but I didn't check to see if there were any hidden files that were in that location that may have had a different permission setup. As a last, I don;t know if changing the permissions on a folder changes any date/time attributes of it. )
5) Use the "adb pull" command in a separate command line to pull the files from the /data/data area
6) Revert the file permissions on the /data/data folder using the "chmod" command

The other answer is

1) access the rooted file system using the adb shell command
2) Type "su" to get root access
3) Use the "cp -r -p" command to copy all the stuff from the /data/data to the /sdcard location. (The -p switch on the cp command should preserve the date and timestamps.)
4) Open a separate window and use the adb pull /sdcard/data your_location from the windows command line to then pull that specific data.
5) Remove the /sdcard/data folder from the /sdcard location.

I personally tried copying all the info in the /data to the /sdcard; as you can guess, not enough room! (not the /data/data, when there was enough room) And then there were some other issues…for another day

Hope this helps someone.

 
Posted : 02/05/2017 10:08 pm
(@arcaine2)
Posts: 235
Estimable Member
 

There's a nice plugin for Total Commander that supports ADB protocol and can work with root accesss. For the future use, quite handy 😉

 
Posted : 03/05/2017 1:29 am
SamBrown
(@sambrown)
Posts: 97
Trusted Member
 

Quite an old thread! Of course if you want to access /data, you'll need root access to the device. Normal access via adb shell doesn't work.
Once I'm in and have root access via su, I'd just dump it with dd

dd if=/dev/block/mmcblk0 of=/destination/dump.bin

"destination" is usually a SD card or a USB Stick via USB-OTG cable. Just do ls on / and try to figure out where the destination is mounted.
For newer devices you might use "sda" instead of "mmcblk0".

 
Posted : 05/05/2017 6:31 pm
Share: