ADB lock screen with broken screen ( Pattern) - android

My phone ( android 5.0.2) have a pattern for password and broken screen,NO ROOTED.
I try this software (http://forum.xda-developers.com/showthread.php?t=2786395)for control my phone but I can't unlock my android device.
Can you give a solution for delete lock screen (I have tried this -> adb shell rm /data/system/gesture.key but I don't have permission)/others tools or others solutions?

You can remove any lock or pattern by deleting a file *.key located in /data/system.
You will need a shell and a rooted phone.
Otherwise, you could install a clockworkmod recovery that comes with an adb shell and use it to get full access to the file system.
Hope this helps.

if you aren't a root, you can not access the key file. So you can not change key or delete it. You must be root for deleting key file or changing the key file. Sorry.

You can only install a custom recovery if your bootloader is unlocked. On Nexus devices this wipes the device, I don't know about other devices. Many are not even capable of being unlocked.
So the solution to install a custom recovery to get write access to the system partition is not likely to work unless you've previously unlocked your bootloader.

Related

Install application update without uninstalling it

So I have a parasite application installed on the phone that blocks the device from booting to bootloader and bunch of other stuff. It is also set as a device administartor thus it can't be uninstalled (deactivate administartor rights is also impossible). So to fix this problem I decompiled the APK of this app and changed the code so I can deactivate the admin rights. Unfortunately recompiled APK can not be installed over the existing application.
Adb error:
INSTALL_FAILED_UPDATE_INCOMPATIBLE
So is there a way to force install the app without uninstalling it? Or if my approach is wrong can you advice me on how to get rid of this annoying app.
Unfortunately recompiled APK can not be installed over the existing application.
No, because you have no access to former key that was used to sign the installed the parasite APK package.
If your device is rooted then you can try to boot to recovery like TWRP and carefully mess with system partition removing/editing files to prevent this particular app from starting (should suffice to simply remove its folder).
it blocks the device from booting to bootloader
How it does so? Most devices offer certain key combination (i.e. hold volume up + power) to boot in other modes, so unless you got it on very low level you can try that way.
So to fix this problem I decompiled the APK
If possible, I'd first backup my data (if there's any you want to backup) and simply factory reset the device. May save you some time.
EDIT
Idk how exactly it blocks the bootloader but it does (holding power, home, volume down just restarts the device)
You can always try to reboot to recovery/bootloader using adb:
adb reboot [bootloader|recovery]
- reboots the device, optionally into the bootloader or recovery program.

Backup android to ubuntu from recovery mode

I have - stupidly enough - updated my android phone to the newest 5.0 Lollipop. The update went bad and many hours later the phone is still unresponsive. I can only enter in a recovery mode. I have seen in forums that many other users had the same problem and it turns out that the only way out is factory reset of the phone. This means total loss of phone data. As I have no backups (as far as I am concerned) I was wondering if there is a simple way to transfer the data from phone to computer (Ubuntu) while phone being in recovery mode.
This is what I tried already:
started the phone in recovery mode
selected the 'apply update from ADB' (as this is apparently the only way computer sees the phone through $ adb devices)
I type
$ adb devices
List of devices attached
02452a1acc14c9d4 sideload
and then
$ adb backup -apk -shared -all
adb: unable to connect for backup
My phone was not rooted, but I am pretty sure the USB debugging was activated. Any ideas? Is it possible at all to backup phone in recovery mode?
Thanks in advance.
Helps to know what phone you have. You could look for the key sequence needed to boot into recovery mode. I'd look into flashing Clockwork Mod recovery which can mount the phone over USB while in recovery. There you could copy a new ROM zip to flash over the messed up Lollipop rom.
All you have to do is format /system and install a known working ROM. Also, Clockwork mod recovery can make a nandroid backup which can be looked at using Titanium Backup so you can extract your data that way.

Can't pull files using adb

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).

How to enable adb after wiping system and installing new kernel?

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.

Android Shell Command (or in adb) to automatically reboot and restore backup using cwm recovery

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.

Categories

Resources