I've had a look at other questions but can't seem to find an answer. I'm trying to pull all the files (especially /data) from my android phone but can't seem to due to permission issues.
I am only able to get into download mode and system recovery mode on the phone (a Samsung Galaxy s3) and nothing else (installed a wrong custom rom :( hense the very limited use ). I need to backup all the data before applying a factory reset.
I've tried:
adb root
adb cannot run as root in production builds
adb pull /data ~/Desktop/backupfolder
pull: building file list...
0 files pulled. 0 files skipped.
Also adb shell doesn't allow me to pull (it says device not found even though outside the shell the device is detected). So running su from adb shell is useless if the data can't be pulled. Moving the data doesnt help.
Please help! Apart from download mode and system recovery mode, the phone is dead so solutions requiring apps don't apply.
The most probable cause might be that your phone is not rooted, so you will not be able to remount the partition for read/write access.
There is a particular stack overflow page for remounting a rooted device into RW mode.
link
Remounting is basically reloading your file system so you may read or write into the file system like any other file systems.
You may need to root your phone (please note that rooting will void your warranty).
Rooting lets all user-installed applications run privileged commands typically unavailable to the devices in the stock configuration. Rooting is required for more advanced and potentially dangerous operations including modifying or deleting system files, etc.
In normal production builds root is disabled by default, so you need to install a third party rooting software to get access to this privileged mode.
The entire process of rooting is beyond explanation in this post, but you can check this post from XDA
You need to be very careful while rooting coz it may brickyour phone.
Similar XDA posts are available on google if you search with your exact device name.
I managed to fix the problem!
Downloaded and installed Kies, which also installs the appropriate Samsung drivers. Then ran a firmware installation from there (Tools > Firmware Upgrade and Initialization).
Make sure you have the model number and S/N handy (written on inside of phone).
Related
So as the titles suggests, I have a device whos bootloader is unlocked and adb has root access. Running android 7.0.
Custom recovery isnt an option as there is no TWRP for this android device so I am looking to both root the OS as well as flashing gapps and cant figure it out.
Does anyone have any suggestons on how I can install and update su and install gapps over adb shell?
Any help would be greatly appreciated.
You did not say what device you're using, but the following approach should be universal to all devices. Note that i do not take responsibility of what you do with your phone. Flashing wrong images can result in soft- or hard-bricks, so take care. But on the other hand, this method is rather popular and works for a lot of people, so i would suggest to try it out.
First of all, there were files which were called cf-auto-root files. With them you can easily root your phone.
Since the cf-auto-root provider has beeen superseded by firmware.mobi this method has become even easier. So if you visit https://desktop.firmware.mobi/, you can select your device, select the proper firmware and then configure a package which contains the firmware and the auto-root file. Now just donwload this file.
I could explain how you have to go on from this point, but the .zip archive contains literally everything you need. Just follow the steps inside the README.txt.
Once you got your phone rooted, there are several approaches to flash things like gapps without the need of a custom recovery. Just google for apps with such options, e.g. "Flashify" or "FlashFire". Just take the app which fits your needs best.
If you actually don't know where you can get flashable gapps archives, visit http://opengapps.org/.
Last tip: If you got your phone bricked, just try to flash your firmware agian via ODIN (without auto-root i would suggest), to restore everything to "default".
is there a way to do that? My old phone was rooted and I didn't have any problem getting access to data/data but I bought a Nexus 6 and I cant access to data/data from Android Device Monitor.
All the post I have seen are old and said that I need to root my phone. I know there are a lot of Tutorials on youtube I just dont want to brick my phone, Anyone knows a trusty post so I can root my Nexus 6?
Answer by #THelper
Accessing the files directly on your phone is difficult, but you may be able to copy them to your computer where you can do anything you want with it. Without rooting you have 2 options:
1.If the application is debuggable you can use the run-as command in adb shell
adb shell
run-as com.your.packagename
cp /data/data/com.your.packagename/
2.Alternatively you can use Android's backup function.
adb backup -noapk com.your.packagename
You will now be prompted to 'unlock your device and confirm the backup operation'. It's best NOT to provide a password, otherwise it becomes more difficult to read the data. Just click on 'backup my data'. The resulting 'backup.ab' file on your computer contains all application data in android backup format. Basically it's a compressed tar file. This page explains how you can use OpenSSL's zlib command to uncompress it. You can use the adb restore backup.db command to restore the backup.
I am reading a tutorial on the sideload command at link.
It contains the steps of rebooting into recovery mode and using adb sideload [file].zip.
My question is that what does sideload actually do with that zip file ? In the past I have compiled AOSP and flashed a device using
adb reboot-bootloader
adb fastboot flashall -w
Is sideload trying to achieve something similar to the above ?
Edit:
I think my confusion relating to sideload stems from my lack of understanding of how Android's memory is structured. I found two links.
First is a link that explains Android partitions : partitions
Second is a SO answer, that explains Android's memory: memory
Now my understanding so far is this :
Android has RAM and ROM. ROM is divided into several partitions, namely, /system, /data, /boot, /recovery, /cache, /misc and /sdcard.
Now the link relating to sideload states that this command installs a zip file.
What I don't understand still is that, is this zip file, going to replace the entire ROM in Android ? Namely, will it have to have the right partitions as in the list above ?
This also makes me confused about a similar command 'fastboot flashall'. I know when I run it, the terminal goes by saying its writing to several of the partitions. So my questions boil down to these :
1) Is sideload replacing entire ROM ?
2) Is the related command 'fastboot flashall' also replacing entire ROM ?
3) Are there ways to replace select partitions ?
Thanks.
Yes and no. adb reboot-bootloader is used to get yoi into fastboot mode ard sideload is used to apply updates to a system which can be (and is oftenly) used to overwrite a stock OS. I used sideload for exactly that, my fairphone also delivers a small utility to factory reset every partioin of it using adb and sideload (this is the Windows version from scroll down here). Consider chris stratton's comment. You can look into adb backup and adb restore to only deal with user data and apps. Click me tenderly, click me hard. Pay attention as to apps can opt out of this - explanation in this brilliant answer by Izzy.
Depends but more or less yes. fastboot flashall is typically used to flash the recovery partition only to boot from there and continue with sideload (see 1.).
There definitely are, but I'm not able to do it on my own. The referred utility does exactly that. It should be possible to figure out the exact commands or find a similar utility for your manufacturer. I misused mine to flash everything I needed for me. To do so, i just replaced the respcetive .img files such as boot.img
I have a Nexus 4. I accidently wiped system and tried to restore it unsuccessfully.
I did have adb before I wiped the system. Now I can only get into recovery mode. When I use Nexus root toolkit it recognizes the device only in bootloader but it can't recognize it as adb device. I thought maybe now that Android is not installed USB, debugging is disabled as default.
Do I have a way to enable it or do you have any other solution? I can't use the device. Do I have any other way to install Android without adb?
adb isn't required (adb is only one of the ways to do it. As long as you still have access to recovery mode, you're golden).
Just get the zipped image you want to install (a modded one, or the official one). You should be able to get the official one from google since it's a Nexus 4. Do not unzip it.
Connect your phone to your computer as a usb drive. Copy the zip file to the root of your internal sdcard on your phone.
Reboot your phone into recovery mode. Then navigate the menu on the phone with the sound rocker and the power key to tell it where to find the new location of the new image.
Then reboot normally. I'm writing this from memory. If you want more specific instructions, I can provide them if you want.
Looking for the command (or steps) to create a shell script on android that tells the device to reboot into recovery mode and automatically restore a backup located in the /sdcard/clockworkmod/backup/ folder. I know the reboot is:
reboot recovery
But I imagine there is something else I either need to add to that line or perhaps create a file somewhere that instructs cwm to automatically restore a backup and reboot.
Found my own answer... For the folks in the ether...
Install ROM Manager Premium (small $$).
Use Koush's test rom manage project (https://github.com/koush/TestRomManager) to connect to ROM Manager and essentially ask it to reboot the device into recovery and do a backup. The system is actually incredibly powerful in that you can do some kool stuff over the air. This is a good setup for internally managed devices... You can even run your own update.zip scipts...
Optionally you can add a couple of exec lines to click ok automatically to the ROM Managers popup "do you want to reboot now?".
Thats it. Lots of research, as usual a Frankenstein of source from a great world full of devs.
If you follow the comments on this file, you will manage to do what you want
https://android.googlesource.com/platform/bootable/recovery/+/fadc5ac81d6400ebdd041f7d4ea64021596d6b7d/recovery.c
Specifically, you will have to deal with the file
/cache/recovery/command
And include there the command you want to issue. Root access is needed to do so.
Alternatively, if your recovery admits it (CWM, TWRP) you can just use the recovery command through adb once you rebooted there.