[TUTORIAL]ByPass Pattern - Galaxy S 4 General

Having protection and security on your Android device is one essential thing you should take into consideration, especially if there are people who tend to snoop around your device without your permission. The possibility of actually forgetting the pattern you’ve set to unlock your device is not that high, but it may happen. What’s worse, your friend may have messed around with your Android device and set a completely different unlock pattern, leaving you stumped when you try to unlock your device.
In situations like that, you could lose all hope and start bickering with the perpetrator (either your friend or yourself), not realizing that there is a way to go around that misfortune. Thanks to XDA Developers member m.sabra, an easy way to regain access to your locked device has been made for your perusal.
This guide will work on any Android device, rooted or not. It uses the Android Debug Bridge or ADB. If you are having a hard time recalling what ADB is or you don’t know what it is, check our article about how to install the Android SDK (Software Development Kit) and how to setup and use ADB (Android Debug Bridge).
In this guide, learn how to bypass the security pattern lock on your Android device.
Warning
The instructions in this guide reportedly work for both rooted and non-rooted devices. Root privileges, however, make this guide work in most cases. Several users have reported that the guide does not work in certain non-rooted devices.
The information in this guide is provided for instructional and educational purposes only. There is no guarantee that these instructions will work under your specific and unique circumstances.
Use these instructions at your own risk. We shall not hold any responsibility or liability for whatever happens to you or your device arising from your use of the info in this guide.
Read and understand the whole guide first before actually performing the instructions.
Requirements
Any Android device with USB Debugging enabled, preferably rooted; or, if not rooted, the device must be running a kernel that grants root access to the adb shell.
To enable USB Debugging on devices running Android 4.0 and up, go to Settings > Developer Options. Check the box beside the USB Debugging option.
For devices running on older versions of Android, go to Settings > Applications > Development. Check the box beside the USB Debugging option.
A computer with ADB installed
For help in setting up ADB on your computer, check our article about how to setup and use ADB (Android Debug Bridge)
Your device’s USB cable
Make sure your device’s battery is charged 75% or more to avoid interruptions during the process.
Backup all personal data on your phone to make sure you have a copy of your personal data (e.g., contacts, SMS, MMS, Internet settings, Wi-Fi passwords, and the like) in case the procedure in this guide erases such data.
For backup tips, check our guides on how to sync your data to the cloud and how to create local backups of your mobile data.
Instructions
Connect your device to your PC using the USB cable.
On your computer, open a terminal window (or command prompt on Windows-based machines).
Type in the following commands at the terminal or command prompt window. Press Enter after every line:
Code:
adb shell
The prompt should display a # rather than a $. Otherwise, enter su to switch to the root user.
Code:
cd /data/data/com.android.providers.settings/databases
sqlite3 settings.db
update system set value=0 where name='lock_pattern_autolock';
update system set value=0 where name='lockscreen.lockedoutpermanently';
.quit
exit
adb reboot
After your device has rebooted, enter the following commands at the terminal:
Code:
adb shell
The prompt should display a # rather than a $. Otherwise, enter su to switch to the root user.
Code:
rm /data/system/gesture.key
exit
adb reboot
Your device will reboot. After it reboots and asks for a security pattern, you can use any pattern and the device will still unlock.
Once you regain access to your device, make sure to change the system security settings to re-select another unlock pattern.
Congratulations! You have successfully bypassed the pattern unlock on your device. You don’t need to panic anymore because you now know that there is a way back into your phone after you’ve been locked out.
Click to expand...
Click to collapse
Credits
 @m.sabra

Another security bug highlighted and now shared with the world. Won't be using pattern unlock in future. ....
Sent from my GT-I9505 using Tapatalk 4 Beta

ardsar said:
Another security bug highlighted and now shared with the world. Won't be using pattern unlock in future. ....
Sent from my GT-I9505 using Tapatalk 4 Beta
Click to expand...
Click to collapse
I use pattern lock and I am rooted. But I make sure the USB de-bugging mode under Developer options is never ticked (I only turn it on specifically when required and then switch it off). My phone is also encrypted using the stock settings options. These 2 things will render the above technique useless and make your phone a much secure object.

Still it can be cracked even if you are not rooted and USB Debugging is turned off, by Aroma File Manager

Related

[GUIDE] How To S-Off; Permanent Root; Custom Recovery

How to Achieve Permanent Root and S-Off:​
To get permanent root, you need to S-Off. So lets start with that first. This process will NOT wipe your device. It also works for OS X users. This guide will work on software version 1.55.605.2 (which as of 04/19/2014 is the latest OTA) and below.
--- S-OFF Instructions ---​First, you'll need to download adb, enable its use and setup debugging.
adb is part of the android SDK. You can download it here (OS X users must scroll down and download the OS X version). It does not need to be installed, just unzip it into its own folder. You can also download a zip that contain only adb and fastboot.
once you have adb, you'll need to download the drive for your M8, which can be had from HTC's driver page:
http://www.htc.com/us/software/htc-sync-manager/.
Then install it. It will install the driver necessary for adb to work. After the installation is finished, uninstall HTC Sync immediately (do this regardless of whether or not you need it; you can reinstall it later if you still want it). This will leave the driver package installed, but remove HTC sync.
Now, back to the phone. Disable all security you have on, including PINs, Pattern Locks, passwords, etc. If you have an exchange forced security policy, you will need to disable the account. You can readd it later.
Enable access to developer options. Jump into the Settings. Then you’re going to scroll down to the bottom and tap on ‘About’, next tap on ‘Software Information’. Now you’ll need to tap on ‘More’, which will give you a new menu. Now just tap on the build number 9 times and you’ll enable Developer options.
Go into developer options menu and enable USB Debugging.
Next, go to Security page and enable "Unknown sources".
Now install weaksauce from here:
http://forum.xda-developers.com/showthread.php?t=2699089
If you followed the directions correctly, you should have SuperSU installed and root access. (You can use superuser as well).
Plug in your phone into your computer. Its best to use the factory cable provided with the phone. Use a USB 2.0 type port if possible (USB3.0 ports typically have a blue tab; I have personally used a USB 3.0 Device on Windows 8.1u to perform this without any problems, but your mileage may vary).
Your phone will ask if you if you trust your computer (RSA). Choose "Always Allow".
Ensure adb is working by opening a command prompt (terminal on OS X), navigate to the adt-bundle-[XXXXX]/sdk/platform-tools and typing "adb devices" without quotes. Your phone should show up. Ensure the working directory is the directory that adb is in. Otherwise, transferring firewater may fail. On Windows, you can shift-right-click inside the folder adb is in and click open command prompt to open a cmd in that directory.
Now go download firewater from here:
http://firewater-soff.com/instructions/ Make sure to use the weaksauce method (second method). Do NOT use the temproot method.
The firewater file should be called "firewater" without any quotes or extensions (like .bin). Ensure your browser did not partially download or corrupt it.** Make sure its in the same folder as adb. Then follow directions on the firewater site. Be aware the yes/no prompt is case sensitive, so make sure to answer it with an uppercase Y as in "Yes" not "yes". During the process, you will need to enable adb shell to get root. Make sure your phone screen is on so you can see the root request. Grant it and the S-Off process will continue. Otherwise, it will hang there and eventually time out. Sometimes, the process will fail and the phone will reboot. This is okay. Just restart the process. It can sometimes take multiple tries.
When completely successfully, you now have S-OFF. Your phone's bootloader is also unlocked in the process; you do NOT need to perform any additional steps to unlock the bootloader. However, you do not have permanent root. The root that weaksuace provides goes away on reboot and must be reapplied again on startup.
**The filesize seems to vary depending on what OS/browser is used to download it. It should be around 4,519,496 (on disk) in size. If you can't execute firewater, try redownloading it.
Getting permanent root:
-Flash a custom recovery and flash a zip with su.
-[Optional] Return to stock recovery This option is for people who don't want a custom recovery.
Be aware, once rooted and S-Off'ed, you do NOT need the kernel module that enables system write access*. All system changes will survive hard reboots (adb reboot).
-- Recovery Rooting: --​
Move the supersu zip onto your internal sdcard. It can be downloaded here:
http://forum.xda-developers.com/showthread.php?t=1538053
You can use Superuser as well. Its your preference, but this guide uses SuperSU.
Uninstall weaksauce. It's no longer needed.
Uninstall SuperSU. It will be reinstalled when you flash the supersu zip. If you have SuperSU Pro installed, you can leave that in place, as that app only holds a key.
From adb, type:
adb reboot bootloader
Flash a custom recovery. CWM and TWRP are available. Use the fastboot method. Follow the directions here:
TWRP - http://teamw.in/project/twrp2/226
CWM - http://forum.xda-developers.com/showthread.php?t=2708520
Reboot into Recovery
Flash the supersu zip you downloaded.
Reboot and you're done. You have s-off and permanent root.
You can delete the downloaded supersu zip off your internal sdcard; its not longer needed.
-- Manual Root --​Perform all steps noted in section "Recovery Rooting" above.
-Download the stock recovery:
http://forum.xda-developers.com/showthread.php?t=2723112
-Ensure the stock recovery img file is in the same folder as fastboot.
-Run the following command from command line: "fastboot flash recovery stockrecovery.img" without the quotes.
-Wait for the process to finish
-Reboot the phone. You now have the stock recovery along with root. With the stock recovery installed, you can now accept OTAs provided you haven't modified/deleted any stock system files. Any new OTAs you take will remove any files/folders you added to the system partition and will remove your root. However, with S-off, this can be undone. If you lost loot after taking an OTA, simply start from the beginning of the section "Recovery Rooting".
-- Common Tweaks --
All of these are optional and are NOT required. However, you may find some benefit to them.​-- Wifi Tether Enabled --​This is unnecessary if you are on a More Everything plan or are paying for hotspot/tethering. You can force enable the native tethering application:
http://forum.xda-developers.com/showthread.php?t=2708548
-- Device Wipe after ten attempts --​I really dislike this "feature". Here is how to disable it. This works regardless if you enabled the security or its mandated by an exchange policy.
I use Root Explorer to make this change, but you can use any text editor. Make sure to mount system as R/W. Root explorer can do this from within the app.
Edit this file:
/system/customize/ACC/default.xml
change this:
Code:
<item type="integer" name="devicepolicy_max_fail_passwords_for_wipe">10</item>
to this
Code:
<item type="integer" name="devicepolicy_max_fail_passwords_for_wipe">0</item>
Reboot and its disabled.
-- Power Saver Mode --​Enable "Power Saver" mode using these directions. It's disabled and hidden by default.
http://forum.xda-developers.com/showthread.php?t=2701909
-- *Unsecured Kernel --​By default, the stock kernel prevents write access to /system. S-off and root should allow you to makes changes to system. However, some people have reported difficulties using ROM toolbox and other mods (like changing boot animations). In some cases, these issues can be resolved by flashing an insecure kernel:
http://forum.xda-developers.com/showthread.php?t=2708686
-- HTC Sense Broswer --​The stock ROM now includes Chrome as the default browser and omits the Sense Browser. Users who prefer the Sense Browser can download it here:
http://forum.xda-developers.com/showthread.php?t=2708597
-- HTC Flashlight --​The stock HTC flashlight app.
http://forum.xda-developers.com/showthread.php?t=2697025
-- Disable HTC Sync Virtual CDROM --​This disables the virtual CD-ROM from mounting.
http://forum.xda-developers.com/showthread.php?t=2709386
-- Donations --​Don't forget to donate to the developers involved in getting you here. Donations for firecracker go to [email protected] (paypal). Donations for weaksuace go to [email protected] (paypal). If I missed anyone, let me know.
FAQ​Been getting some interesting PMs. Here is some of the popular questions.
Do I need a Java card for this?
No. You just need a PC/Mac, a USB 2.0 cable and the M8. Since a public S-off method is now available, that method is obsolete and its not recommended anymore.
Do I have to change or reset my CID?
No, that is only necessary for people who s-off'ed via a Javacard.
Do I need to do any of this if I S-off'ed via Javacard?
No, this method ends with the same result.
Can I reverse this and return to completely stock?
Yes, absolutely none of the stuff done here is permanent. You can unroot, relock the bootloader, and S-On as many times as you want. You can flash an HTC RUU to return to completely stock in one go. Note: Be careful with S-On'ing a device. If you S-On a device via a newer RUU and that RUU has no known exploits, you may not be able to S-Off again until an exploit is found.
Do I need to unlock my bootloader after this?
No, the firewater exploit will S-Off and unlock your bootloader.
Will this work on a Mac?
Yes, please read the directions more carefully.
Will this work on USB 3.0 ports as that is all I have?
Usually. On OS X, I've had success using a USB 3.0 port (since recent MBPs only include USB 3). On Windows, the answer seems to be maybe, depending on your OS. Your best bet would be to try on a Windows 8,8.1,8.1u1 machine as that OS includes native support for USB 3.0; that way you aren't relying on vendor specific driver support like on Win7 or below. I have personally done this exploit on USB3 on a Surface Pro.
Will this brick my phone?
There is always a chance, but I have honestly never heard of such a thing happening. Worst case is usually a full reset of the phone.
Will this wipe/format the external SDcard?
No.
How do I flash this via ODIN?
This has absolutely nothing to do with ODIN. That is for Samsung devices. You should not even have ODIN running when do any part of this guide.
How to I convert to a Google Play edition ROM?
Wait for a developer to make one. I will post a link here if/when that happens.
See here:
http://forum.xda-developers.com/showthread.php?t=2716306
Does this affect Google Wallet or ISIS?
Yes and no. Google wallet works just fine. ISIS will detect its rooted and refuse to work. You'll need to shield root from ISIS to use it. Directions on how to do that can be found via google.
Will this work on non-Verizon HTC M8's?
Yes, though you will need to use a different recovery.
Will this unlock my device for other carriers?
No....because your device is already unlocked in its stock form. AWS band rules force Verizon to keep all their LTE devices unlocked.
Will this jailbreak my device?
No. Wrong type of phone.
I can get red triangle exclamation mark with a black screen. How do I fix this?
You are in the stock recovery. Hold power and volume up and you will get a menu. You can choose reboot system now to get out of there.
appreciate the write up. ill check back here when i find a reason to unlock it
Has anyone done it yet? It's just sitting at "adb wait-for-device push firewater /data/local/tmp" for at least 5 minutes now.
sfreemanoh said:
Has anyone done it yet? It's just sitting at "adb wait-for-device push firewater /data/local/tmp" for at least 5 minutes now.
Click to expand...
Click to collapse
I have done everything mentioned in this guide. And it works just fine.
Make sure you are connected via USB2. Also make sure your phone is on and unlocked (as in, no security PIN, pattern, password etc.). Is USB debugging on?
When you type "adb devices" from command prompt, is your device listed?
Yeah, nvm, it's fine now. When I first connected it via debugging, I didn't hit the "Always allow" option on my phone, so after the adb reboot it wasn't allowed to reconnect. Just had to disable debugging and re-enable it, it's all set now.
sfreemanoh said:
Yeah, nvm, it's fine now. When I first connected it via debugging, I didn't hit the "Always allow" option on my phone, so after the adb reboot it wasn't allowed to reconnect. Just had to disable debugging and re-enable it, it's all set now.
Click to expand...
Click to collapse
Cool. I'll add that to the guide.
I have not had time to thank and will.
At work and going to hook it up when I get home this morning so I hope no one screws with you guys and gets it pulled.
Very much appreciate all the work they put into it.
Thank you very much for the dummy proof write up
These guys around here are getting to good.
Thank you thank you thank you.
Worked Perfect! Thank you guys!
thank you so much! now i can sleep at night knowing that verizon doesn't have control of my device anymore haha!!
Im happy to see that s-off was achieved and Im going to unlock my phone right now
but quick question, I'm new to this s-off stuff so I don't know how it works entirely.
But once we unlock the bootloader
is there any way to lock it again in case we need to send the phone to HTC?
sorry for the noob question but just a question that popped into mind.
So I don't quite understand. I am S-off with the Unofficial CMWR from InvisibleK and I flashed SuperSU zip v1.94. Do I need the system write access kernel module to write to system or no?
Great guide by the way. Thanks
I have been trying for the past hour, but I cannot get adb to connect. Am I missing a step?
I downloaded the htc synch, installed the drivers, uninstalled synch. I already had weaksauce root. I downloaded sdk, extracted the bundle. I downloaded firewater, moved it to the same folder with adb.
Everytime I try to run adb it just scrolls and then closes almost immediately. I thought it was my java at first. I updated that. The computer says I'm connected through HTC drivers. I'm debugged/unknown sources...
Running windows 8.1 64bit. I don't know what else to do at this point.
blacknet101 said:
Im happy to see that s-off was achieved and Im going to unlock my phone right now
but quick question, I'm new to this s-off stuff so I don't know how it works entirely.
But once we unlock the bootloader
is there any way to lock it again in case we need to send the phone to HTC?
sorry for the noob question but just a question that popped into mind.
Click to expand...
Click to collapse
Absolutely. Everything in this guide can be reversed. You can return everything back to stock via an RUU.
nicholi2789 said:
So I don't quite understand. I am S-off with the Unofficial CMWR from InvisibleK and I flashed SuperSU zip v1.94. Do I need the system write access kernel module to write to system or no?
Great guide by the way. Thanks
Click to expand...
Click to collapse
You do not. I have modified and added a few system files and they have persisted through several hard reboots.
MultiDev said:
Absolutely. Everything in this guide can be reversed. You can return everything back to stock via an RUU.
Click to expand...
Click to collapse
Hmmm! Thanks for the reply buddy! may i ask? Where can we find these RUU files? In case we need to go back to Stock?
JelloB said:
I have been trying for the past hour, but I cannot get adb to connect. Am I missing a step?
I downloaded the htc synch, installed the drivers, uninstalled synch. I already had weaksauce root. I downloaded sdk, extracted the bundle. I downloaded firewater, moved it to the same folder with adb.
Everytime I try to run adb it just scrolls and then closes almost immediately. I thought it was my java at first. I updated that. The computer says I'm connected through HTC drivers.
Running windows 8.1 64bit. I don't know what else to do at this point.
Click to expand...
Click to collapse
Java has nothing to do with adb. You don't need it installed to any of this guide.
You need to use adb from a shell. On, windows, you need to open a command prompt. Type "cmd" with the start screen open and hit enter. Then at the prompt, use the "cd" command to navigate to the correct directory where adb is located.
When i run the "adb wait-for-device push firewater /data/local/tmp" command it come back with "failed to copy 'firewater' to '\data\local\tmp': Read-only file system". I'm lost. I have root access and everything.
MultiDev said:
Java has nothing to do with adb. You don't need it installed to any of this guide.
You need to use adb from a shell. On, windows, you need to open a command prompt. Type "cmd" with the start screen open and hit enter. Then at the prompt, use the "cd" command to navigate to the correct directory where adb is located.
Click to expand...
Click to collapse
I knew I was missing something simple. It's been a while since I've used adb. Will try now...thanks.
trying to modify the default.xml to get rid of the 10 try's and wipe pattern lock and it doesn't appear I have access to read write from it still... trying with the ES note editor when going to the file with ES File Explorer. I've ran the wp_mod.ko as directed and I haven't rebooted.
I'm wondering if I'm missing something, or maybe there's a better way to do it via command line?
blacknet101 said:
Hmmm! Thanks for the reply buddy! may i ask? Where can we find these RUU files? In case we need to go back to Stock?
Click to expand...
Click to collapse
They are available from HTC. I'll have to find the exact links. Also, many android sites will host them too.
Slimfast35 said:
When i run the "adb wait-for-device push firewater /data/local/tmp" command it come back with "failed to copy 'firewater' to '\data\local\tmp': Read-only file system". I'm lost. I have root access and everything.
Click to expand...
Click to collapse
You need root access to write there, shell does not normally have access. Beaware that weaksauce takes a minute or two before after a restart before enabling root again. So wait till you have access again before trying it.
meest said:
trying to modify the default.xml to get rid of the 10 try's and wipe pattern lock and it doesn't appear I have access to read write from it still... trying with the ES note editor when going to the file with ES File Explorer. I've ran the wp_mod.ko as directed and I haven't rebooted.
I'm wondering if I'm missing something, or maybe there's a better way to do it via command line?
Click to expand...
Click to collapse
You do not need the kernal module actually; I have removed that from the guide. I haven't used ES Note before, but no matter what, you must mount system as R/W before you can change anything. Its by default R/O or Read Only. Root explorer has a button that auto mounts it and then you can make your edit.

[APP]MTK ADB, Use ADB directly on your device

MTK ADB gets you a privileged shell at the push of a button, allowing you to run commands directly on your MediaTek device. Some might wonder if rooting hasn't already solved this. Firstly, root access is persisted by modifying system files. When the real binary gets substituted by that of the root app's, if the device is rebooted, the init daemon running as root runs the binary giving the app root. What's wrong with this? If you have “purist” tendencies, you probably would want your phone as stock as possible, or at least with your permission. Sadly, not only binaries are dumped. Extra temp files, logs and helper binaries too, that manually removing them is like dancing on floor of pins and a prick means a brick. Not only that, consider yourself blocked from updates. If you're unfortunate enough, an update could result in bricking your phone as the files supposed to be present had been changed. This is more common than you think. MTK ADB makes no changes to your files whatsoever. Also, there's the matter of security/privacy. Root apps tend to always do something in the background. Either sneaking in a new app, or phoning home with your private data, or both. MTK ADB doesn't steal your data. The Internet permission is for Telnet, etc. On some devices, MTK ADB can get root access (depending on manufacturer) while all devices can get shell access. You just have to check which yours belongs.
IMPORTANT
•Refresh before (and after) clicking Start to check ADB status.
•Supports all ADB functionality. Just run "adb <command>" eg "adb pull" (without quotes).
•The minimalist terminal is for those who haven't any. Feel free to use your regular terminal (I use Terminal IDE) and keyboard (Hacker's Keyboard is really good). Just run "adb shell" on it.
•You can connect to your device using another phone, PC, or anything with a terminal and in the same network by running "adb connect IP_address".
•If you get a " device offline" error, disable and enable USB debugging. Next time connect to the network before running the app.
http://www.youtube.com/watch?v=_bt8BVaDCf0
http://slaycode.WordPress.com
Bump
Proof:
http://forum.xda-developers.com/gen...iled-error-t3191150/post62611445#post62611445
More Proof:
http://forum.xda-developers.com/fire-phone/general/root-fire-phone-supersu-t3105546/page10
Proof:
http://forum.xda-developers.com/gen...iled-error-t3191150/post62611445#post62611445
More Proof:
http://forum.xda-developers.com/fire-phone/general/root-fire-phone-supersu-t3105546/page10
When I open the app it opens but it doesn't work when I enter the commands and moreover the app when I try to start the adb it says unsupported device
Am using infinix hot 4 pro running NOUGAT xos 2.2
LordFME said:
MTK ADB gets you a privileged shell at the push of a button, allowing you to run commands directly on your MediaTek device. Some might wonder if rooting hasn't already solved this. Firstly, root access is persisted by modifying system files. When the real binary gets substituted by that of the root app's, if the device is rebooted, the init daemon running as root runs the binary giving the app root. What's wrong with this? If you have “purist” tendencies, you probably would want your phone as stock as possible, or at least with your permission. Sadly, not only binaries are dumped. Extra temp files, logs and helper binaries too, that manually removing them is like dancing on floor of pins and a prick means a brick. Not only that, consider yourself blocked from updates. If you're unfortunate enough, an update could result in bricking your phone as the files supposed to be present had been changed. This is more common than you think. MTK ADB makes no changes to your files whatsoever. Also, there's the matter of security/privacy. Root apps tend to always do something in the background. Either sneaking in a new app, or phoning home with your private data, or both. MTK ADB doesn't steal your data. The Internet permission is for Telnet, etc. On some devices, MTK ADB can get root access (depending on manufacturer) while all devices can get shell access. You just have to check which yours belongs.
IMPORTANT
•Refresh before (and after) clicking Start to check ADB status.
•Supports all ADB functionality. Just run "adb <command>" eg "adb pull" (without quotes).
•The minimalist terminal is for those who haven't any. Feel free to use your regular terminal (I use Terminal IDE) and keyboard (Hacker's Keyboard is really good). Just run "adb shell" on it.
•You can connect to your device using another phone, PC, or anything with a terminal and in the same network by running "adb connect IP_address".
•If you get a " device offline" error, disable and enable USB debugging. Next time connect to the network before running the app.
http://slaycode.WordPress.com
Click to expand...
Click to collapse
Are you familiar with an APK that utilizes mtk_bypass to directly flash firmware to device.
I'm looking for an APK that basically does what sp flash tool does because I don't have a computer.

How to enable usb debugging when the phone is locked.(pattern forgotten)

Hello,
I have Oneplus One 64 gb variant, yesterday my nephew somehow changed my phone's lock pattern and now my phone is locked. USB debugging was disabled at that time. I am not able to get into my phone through any means. I have lot of important data in my phone and don't want to hard reset my device. I found a solution online to get usb debugging on through adb , but I am a ultra noob and don't understand how that has to be done. please dumb it down so that I can save my precious data and unlock my phone when debugging gets enabled. Also I don't have any custom recovery installed on my phone.
This is what is mentioned in the solution.
"Instructions
1. You should try your pattern-cracking software (or whatsoever the genre it has) from inside the Stock Recovery to see whether it works with the former's environment (ADB shell available there or not).
2.Since I would never try step 1., I would do the following:
-For Jellybean 4.2.1:
1. Boot into Recovery and mount Data partition.
2. Open a shell on PC and type:
adb pull /data/property/persist.sys.usb.config ~/
Repace ~/ with home directory of your OS.
3. Open that file in a text editor and you would possibly see mtp written there. Change it to mtp,adb.
Note that sometimes Android doesn't understand the text file changes if the line terminator is "DOS Terminators" which Notepad would probably do on Windows (mine is Linux so no issue here).
In that case, I would suggest not using adb pull but doing:
adb shell
echo 'mtp,adb' > /data/property/persist.sys.usb.config
You may verify that the echo command overwrote the file by using:
adb pull /data/property/persist.sys.usb.config ~/
and seeing the file's content in some text editor.
4. Unmount Data and reboot into Android OS. USB Debugging would probably be enabled.
-For Lollipop 5.0:
JB 4.2.1 users can also follow this method if the previous one didn't work for them.
1. Boot into Recovery and mount Data partition.
2. Repeat step 2 and 3 used in JB 4.2.1 method.
3. We need to tweak some parameters in settings.db. Type:
adb pull /data/data/com.android.providers.settings/databases/settings.db ~/
4. Back it up at some other location too, and open the file in an SQLITE editor. I'm running Linux and DB Browser for SQLite works well. It's also available for Windows OS/OSX.
5. In the global table, change the value for:
adb_enabled to 1
development_settings_enabled to 1
6. Check that verifier_verify_adb_installs is set to 1 in the global table.
7. Check that as default, in the secure table:
adb_notify is 1
adb_port is -1
These checks in step 6 and 7 are not necessary but should be done so that troubleshooting becomes rather easy if the solution doesn't work for you.
8. Save the changes in settings.db and copy it back into Android by typing:
adb shell
rm /data/data/com.android.providers.settings/databases/settings.db
exit
adb push ~/settings.db /data/data/com.android.providers.settings/databases/
That delete (rm) command is not necessary since adb push should overwrite the file, but I executed it for my peace of mind.
8. Unmount Data and reboot into Android OS. ADB probably would be enabled.
source:- https://android.stackexchange.com/questions/112040/how-to-enable-usb-debugging-in-android-if-forgotten-pattern-for-screen-unlock"
Please help me understand this code and be a life saver.
Thanks in advance..
You are stuck, I'm afraid. You won't be able to run any script on stock recovery, but you can't flash a custom recovery without unlocking the bootloader which will wipe your data.
What's more, your phone should be encrypted (if it's running 6.0 or higher), which means you'll need to know the pattern to decrypt after a reboot.
If you can't figure out the pattern, there's nothing you can really do.
jisoo said:
You are stuck, I'm afraid. You won't be able to run any script on stock recovery, but you can't flash a custom recovery without unlocking the bootloader which will wipe your data.
What's more, your phone should be encrypted (if it's running 6.0 or higher), which means you'll need to know the pattern to decrypt after a reboot.
If you can't figure out the pattern, there's nothing you can really do.
Click to expand...
Click to collapse
Is there any way I can create backup of the data in these conditions?
Dush123 said:
Is there any way I can create backup of the data in these conditions?
Click to expand...
Click to collapse
Unfortunately for you in this case, there isn't.
From a general security perspective, if there was it would mean the pattern lock and encryption can be bypassed, which would be very bad.
jisoo said:
Unfortunately for you in this case, there isn't.
From a general security perspective, if there was it would mean the pattern lock and encryption can be bypassed, which would be very bad.
Click to expand...
Click to collapse
Ohk. Then it seems I don't have any option but to hard reset my device.
Thanks anyways
HI! Is there anything I can do for my pattern locked Moto E4 Plus? Details I've posted in this thread.
https://forum.xda-developers.com/showthread.php?t=2620456&page=13

[How-To]ADB not able to recognize device

I tried running the command - ADB devices, and it does not show my device, but when I run the command fastboot devices, then I can see my device.
I am using this to take a backup and remove the pattern from my phone as I forgot the pin here.
But most functionality is present with the ADB command.
A lot of posts have suggested checking if the USB Debugging option was on, and MTP is on, but since the phone is password locked, I am unable to check either of them.
Can you please help me out, as this phone has a lot of data that needs to be recovered?
Mija21 said:
I tried running the command - ADB devices, and it does not show my device, but when I run the command fastboot devices, then I can see my device.
I am using this to take a backup and remove the pattern from my phone as I forgot the pin here.
But most functionality is present with the ADB command.
A lot of posts have suggested checking if the USB Debugging option was on, and MTP is on, but since the phone is password locked, I am unable to check either of them.
Can you please help me out, as this phone has a lot of data that needs to be recovered?
Click to expand...
Click to collapse
I was able to get the ADB device detected by entering the recovery mode. Previously I was trying to run the command while in fastboot mode.
So I have now been able to get the ADB devices, but now I am getting device unauthorized, due to which I am unable to enter the shell.
Is there any way, where I can use ADB without clicking on the device for authorization.
Thank You in advance
If
Code:
adb devices
doesn't show your phone as connected then a connection couldn't get established. Point.
FYI: The major reason why you get "Unauthorized Error" is that you haven’t authorized your PC to recognize your device in ADB Mode. You probably haven't enabled the USB Debugging on your device and that is where you are getting the alphanumeric code. The "unauthorized message" is because you haven’t given your permissions to authorize this connection.
jwoegerbauer said:
If
Code:
adb devices
doesn't show your phone as connected then a connection couldn't get established. Point.
FYI: The major reason why you get "Unauthorized Error" is that you haven’t authorized your PC to recognize your device in ADB Mode. You probably haven't enabled the USB Debugging on your device and that is where you are getting the alphanumeric code. The "unauthorized message" is because you haven’t given your permissions to authorize this connection.
Click to expand...
Click to collapse
@jwoegerbauer That might be the case, but now there is no way to check and change or authorize as my device is locked and I do not remember the password. Is there any way I can bypass or get around this step.
Mija21 said:
@jwoegerbauer That might be the case, but now there is no way to check and change or authorize as my device is locked and I do not remember the password. Is there any way I can bypass or get around this step.
Click to expand...
Click to collapse
factory reset

Pixel 6 Pro full backup to different phone

So I had a pixel 6 pro and unfortunately my wife got mad and threw it against the wall a few times, causing the frame to bend and entire back glass to shatter. The front LCD didn't break, but glue came apart and it separated from the frame.
I had all my 2fa accounts on there, as well as very valuable data that I need to recover.
The phone still powers on, but there's nothing visible on the screen. A local repair shop advised we start by replacing the screen and then work on transferring everything out.
I have a replacement pixel 4a and want to be prepared for when my phone comes back online.
What's the best way to backup my 6 pro and restore on the 4a?
I need everything copied as a whole image, and restored on the 4a. I want to be able to boot up my 4a, open my authenticator app, and have all my accounts listed there.
Someone please tell me this is possible, and if so, please post instructions.
Thank you in advance.
I doubt 1:1 image cloning is possible because encryption is hardware-backed and therefore device-unique. it's not even possible to restore backup on origin device after factory reset since android apps can use keystore in TEE.
side note: you could connect HDMI multiport usb-c otg adapter to TV and mouse so you have access to phone at least
aIecxs said:
I doubt 1:1 image cloning is possible because encryption is hardware-backed and therefore device-unique. it's not even possible to restore backup on origin device after factory reset since android apps can use keystore in TEE.
side note: you could connect HDMI multiport usb-c otg adapter to TV and mouse so you have access to phone at least
Click to expand...
Click to collapse
The HDMI multiport didn't work. Nothing was displayed. I don't know if it's because my phone is badly damaged, or if the pixel 6 doesn't support HDMI out over USB C
I tried this one https://www.amazon.com/dp/B081VBSNRZ/ref=cm_sw_r_apan_i_5NF5RPBKZ97YW4KFW9AX
What are my other options?
the best option would be previously unlocked bootloader, so you can have full access. but you did not unlock bootloader so this is no option for you, because unlocking will factory reset device.
HDMI might require some setting or app installed on device. apps can installed remotely from PC google play with proper google play account. not sure how to start an app though, but guess app can autostart.
at least usb keyboard is working, you could try to navigate blind and enable usb-debugging, this would allow you to use scrcpy. maybe connect headphones or use talkback to get some kind of audio feedback.
of course both methods requires some information from another identical device and need to tested on fully functional pixel 6 pro before..
some (not) useful apps
https://forum.xda-developers.com/t/i-broke-my-screen-and-digitizer.4436261/#post-86791963
https://forum.xda-developers.com/t/broke-the-display-of-my-phone.4424413/#post-86676229
https://forum.xda-developers.com/t/...asily-manage-multiple-android-devices.2707556
Anyone else have suggestions?
AcuraKidd said:
Anyone else have suggestions?
Click to expand...
Click to collapse
This is not a full backup, but it might help you interactively recover some items without replacing the broken screen. Also, assuming this is something you're still looking to solve...
If you have adb debugging enabled, you can try to use https://github.com/Genymobile/scrcpy to interact with your phone over USB from a computer.
If you do not have adb debugging enabled, you can try to enable it via Recovery Mode. The steps to enable Recovery Mode below are from https://www.tenorshare.com/android/how-to-enable-usb-debugging-on-android-with-black-screen.html (I have not tried these steps).
Less:
To enable ADB without a screen:
1. Download the ADB toolkit for your computer and extract its contents to a folder.
ADB toolkit can be found at https://developer.android.com/studio/releases/platform-tools
ADB requires you have USB debugging enabled on your phone.
Since your phone has a black screen, reboot your phone into recovery mode to accomplish this.
Press the Volume Down and Power buttons at the same time to enter recovery mode.
2. Connect your phone to your computer, open a Command Prompt window in the ADB folder, and type the following command.
adb devices
3. You should see your device listed there.
Run the following commands one by one.
adb shell
mount data
mount system
4. Use the following command to pull the persist.sys.usb.config file from your phone to the PC.
adb pull /data/property/persist.sys.usb.config C:\Users\[your-username]\Desktop\
5. Access the persist.sys.usb.config file on your computer with a text editor and edit it to mtp,adb.
6. Run the following command to send the file back to your device.
adb push "C:\Users\[your-username]\Desktop/persist.sys.usb.config" /data/property
7. Download the build.prop file from your phone by using this command.
adb pull /system/build.prop C:\Users\[your-username]\Desktop\
8. Launch the build.prop file in a text editor like NotePad++ on your computer, and add the following code to it.
persist.service.adb.enable=1
persist.service.debuggable=1
persist.sys.usb.config=mtp,adb
9. Save the file and transfer the file back to your device using this command.
adb push "C:\Users\[your-username]\Desktop/build.prop" /system/
10. Reboot your device using the following command.
adb reboot
11. You are all set. Your phone will boot up with USB debugging enabled.

Categories

Resources