Android adb backup couldn't connect issue - android

I am trying to create a backup of an android device using ADB.
However adb backup -all gives me this error: adb: unable to connect for backup
why am i getting this error?
I know that some device ask for permission to do that, it asks you whether you want to allow the pc to take a backup, but my device isn't.
I am developing android devices, i dont care about messing it up - so can you tell me how i can enable my device to ask for the permission, or even how i can fix this problem
I can use adb shell and it works fine, and so does adb pull/push however i want the backup file, so i really want adb backup to work.
Is there any other way to take an image of the entire android OS and the apps, and settings? (best is if you can point me into a direction where i can find a solution for the problem i said, but i am open to other ideas.)
Thanks!

It seems not all versions of Android support the backup-interface.

Related

Check if android phone is rooted from PC

I am trying to find a fast way to see if an android phone is rooted or not. I know you can use root checker app but due to numbers of phones it is far too slow to install and use.
I am looking for a way that I use. I know I have to turn ADB on, on the phone and plug it into my pc.
Is there a way to check this using command a line I can run in CMD?
I have android studio install so is there a way of running a script from this that will check to see if a phone has been rooted?
I know what due to number of way a phone can be rooted it not always 100% but I can live with that.
I know two ways you can check if you android is rooted.
Installing an "Root Checker" app from the Play Store.
Installing a Rooting software that check the android when is conected, try Kingo Root.

Connect to RS232 from Android - No permission dialog or shell command

Objective
I'm developing a custom app for internal use on a rooted android mini-pc.
The goal (between others... so...many...others...) is to be able to turn on and off a tv using the serial port embeeded on the tv.
I'm using an FTDI UART RS232 serial usb cable for it.
Status
The application is working right now, using an android library (serial-driver) i can communicate with the tv, but the problem is that the device asks for permissions every install (and sometimes, weirdly, again on the same device), so it needs to be improved.
Issue
Since the device doesn't have mouse or keyboard by default, when this happens someone has to click the buttons, and since the device is normally hidden behind the screen, it can be really annoying.
My two bits
This problem, i feel, can be solved by two methods, but i still haven't been able to make them work.
Since the device is rooted, i might be able to modify an unknown (to me) parameter that allows me to bypass the permission request. For this i have tried to make an intent filter for the usb device, and to rewrite the interface that controlls this behaviour, both without success. Is there a way to make this android version more lenient about permissions?
I use for other reasons SuperSU inside the app, so i can use the full width of the might shell power. Using this i've been trying to send commands manually to the device (/dev/bus/usb/00X/00Y), but this haven't worked. My theory is that it's beacuse of the permissions of the device path, but even doing an unhealthy chmod 777 i cannot have them working.
So, that's my problem right now. I hope someone here can help me.
Additional data
Running: Custom Android 4.4.2 (Cannot be changed)
Needs to be doable solely from within the apk (but it can use shell commands)
We don't have the manufacturer signature to install it as a system app
We can use only one app, so i cannot have another one to move this one to /sys/apps, and i don't know if an app can do that to itself.
using Busybox stty -F /dev/.../ returns "Operation not permitted"

ADB | Having troubles with device connection

I am working flashing a custom ROM on a new device. Through a bit of research, I've found that I am able to completely circumvent the need to port Clockworkmod by simply using UniFlash on my Windows based laptop. From there, I am left with needing to port the ROM I desire, Cyanogenmod 12, to my device.
I've come to learn that I do not need to build from source, rather I can tailor an existing recovery to fit my device. I am unsure if that is true, so that may need to be cleared up. I went ahead and installed ADB and found a porting guide on the Cyanogenmod Wiki. This is where I am running into problems. I do not seem to have ADB permissions for my device.
When attempting to grab my build.prop, I get this return:
user#mypc:~$ adb pull /system/build.prop
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
error: insufficient permissions for device
After realizing my computer may not see the device, I tried to see which were connected:
user#mypc:~$ adb devices
List of devices attached
???????????? no permissions
It seems I do not have any access to the device at all. USB Debugging is connected, it is a rooted device, and it is set show as a USB Storage. I'm sure if I can at least get this fixed, I should be able to find my way through the rest of the guide myself.
Thank you for any help I can receive!
EDIT 01-
So, I decided to do more digging, and I guess I needed to START the server as super user, and not just run commands in super user.
After running this command, I was able to use my others with permission:
user#mypc:~$ sudo adb start-server
Now, I am running into a problem in which my device is offline:
user#mypc:~$ adb pull /system/build.prop
error: device offline
After referring to this (set up device for development (?????? no permissions)) thread, I seem to get a new response:
user#mypc:~$ adb pull /system/build.prop
error: device not found
I feel it's safe to say I should remove 51-android.rules from my ~/rules.d/.
Edit 02:
It seems I have answered my own question with research. I guess I just needed to update to the newest version because Android 4.2+ requires bridge authorization to complete tasks, and my version did not know to do that! I was successfully able to pull my build.prop!
The reason is that when you connect the USB device it shows a popup asking if you want to allow your pc access the device. You have to accept that manually from the device.
Something like this
http://www.gihosoft.com/android-recovery/img/allow-usb-debugging.png

Device database access

I am running my android application in android device, and I want to see the Database of my application on device, how can I do this?
I know the way how can we do this in emulator but i want to know the way how can we do this in android device.
Are you looking to access it manually or programmatically?
If manually, you can look into using adb or a terminal/file explorer on the device.
adb pull path_to_sqlite_db
would get it onto your computer where you can inspect it however you want.

Setting up an Android device under Linux for development, without root

Hello StackOverflowers,
I am eager to try out some Android programs on my tablet in the early phase. However, I do not have root access to the Linux machine I am using (OpenSUSE 12.1). Due to this, I am having trouble to let the system find my device.
This tutorial http://developer.android.com/tools/device.html, as well as almost every post I can find online, do not mention ways to walk around the 51-android.rules setting without root. Some post even mention that, to find the device, the adb command should be run with root.
Does this mean I have no hope of on-device debugging? Thanks in advance!
I dont think you need root access for adb. Though for the device to be detected, AFAIK you need to add device details in rules.d .
If you have device and the computer on the same network, you could use adb over wifi. But to put the device in tcp mode , you need root access on phone or another computer where device can be detected.
Your device doesn't have to be rooted. After you add your device in 51-android.rules, make sure you restart adb server by using these commands:
adb kill-server
adb start-server
And one more thing, make sure you turn On Debugging Mode

Categories

Resources