[Guide] Enable mobile data\WiFi to login to gmail account after getting locked out - Android Software/Hacking General [Developers Only]

Okay, So just today my girlfriends room mate at uni decided it would be funny to lock her out of her Galaxy S II
I Tried every available method to me to try and get it unlocked but it wouldn't work.
After some time of scratching my head at this, I found the answer
These are the steps you have to follow in order to make this work
1.Make sure USB Debugging is on [Sorry to those of you who haven't got it turned on :\]
2. Make a folder called adb anywhere you like and place the files in the zip called adb (needs to be extracted) you can use WinRAR, 7zip
etc) attached to the bottom of this post.
3. Attach your phone to your PC and make sure all drivers are installed
4. Open up a command window (this can be done by pressing the start button on your keyboard and r together, then typing cmd) and navigate to the adb folder you created. The command : cd C;\Users\%userprofile%\%yourdirectory%\adb (replace userprofile with your username and yourdirectory with the directory you chose to place adb, don't forget to remove %!!)
5.Now type this command exactly and when done hit enter: adb pull /data/data/com.android.providers.settings/databases/settings.db
6.Don't close Command, but go to the folder where you extracted adb, there should be a new file there called settings.db
7. What I did was transferred the file to my Galaxy S3, and I used an SQlite editor
8.Using an SQlite Editior, go to the tab that says files and scroll down to your sdcard or external sdcard wherever you put it, open the settings.db.
9. There are 6 Options; android_metadata, bluetooth_devices, bookmarks, secure, sqlite_sequence, system. Go to the option that says secure and navigate down to mobile_data or wifi_on.
10. These options either have a 1 or a 0 under the value column, 0 for being off, 1 for being on. Let's assume both are 0. Now if you don't have mobile data, leave this at 0, if you do have it change it to 1, the same with wifi change it to one and you should save the changes you make when you exit.
11. Plug the device back to your computer and copy the new settings.db to the adb folder and overwrite any existing files.
12. Use the command and once done hit enter: adb push ./"settings.db" /data/data/com.android.providers.settings/databases
You should get an immediate response if not just reboot and then your data or wifi should be on and you are able to login to your gmail without a problem
Hope this helps anyone who gets stuck like this

Related

[Q] How to root Nexus S 9023 on version 2.3.6 with stock rom

Hi,
Is there any method to keep using stock Rom with root and do not wipe the data?
Thanks
Root nexus s rom 2.3.6
Ehi!
I'm also looking for that!!
I just got the nexus S whit the 2.3.6 rom and I want to root it, but I haven't find any answer online
someone can help us??
thanks!
http://forum.xda-developers.com/showthread.php?t=1007782 read this topic page1 and page 49 very important...
please click thanks button
- -
easiest way
just install from recovery this file
if i didn't upload wrong file...
does not work for me, signature verification failed...
here is the link for your question:
http://forum.xda-developers.com/showthread.php?t=935819
the link does not work for 2.3.6 as google fixed the issue on fasboot boot...
---------- Post added at 04:09 PM ---------- Previous post was at 04:01 PM ----------
Damned what a crap...
Has been two days looking around to find a solution, and seems not possible for the 2.3.6...
What a shame google to pretend having open source system and having no way to unlock your device without loosing your data as
- The data is wiped as you unlock the device.
- To fu**ing backup the data you need to have a fu**ing unlocked device.
WTF, I just got it in my ass..
If someone at last know a way....
New Part 2 - Does NOT wipe everything - Keeps a locked bootloader
1. Make sure Part 1 is completed.
2. Make sure you have downloaded the Clockwork Recovery file and the Superuser file.
3. Move the Clockwork Recovery file to your tools folder within the Android SDK folder, and rename it to recovery.img (for simplicity).
4. Connect your Nexus S via USB to your computer and mount it as USB storage. Copy across the Superuser file to the top level of your sdcard. (So the first window you see, not in any other folders. The sdcard is just where all the files are stored, don't worry about it too much for now).
5. We now need to install PDAnet on our PC so that Windows can see our Nexus S when we are using the Command Prompt. Install PDAnet from here, select Samsung when asked about the Manufacturer, allow the driver to be installed (because the driver is unverified, don't worry about this!). Follow along with any other instructions. You should be set now.
6. With the latest SDK version, some tools have been relocated to another directory, so we need to make a copy and move them back. Navigate to the directory where you unzipped the Android SDK file in part 1. Inside it, go to the platform-tools folder, and copy both AdbWinApi.dll and AdbWinUsbApi.dll. Go back to the main Android SDK directory and find the tools folder. Paste these two files in there, and we are all ready to use 'fastboot boot' (the boot image command) now.
7. Open a command prompt window (Start > Run > cmd.exe).
8. Change to the tools directory within your Android SDK folder by using the following command (without the quotes and replacing *YOUR SDK* with the path to your Android SDK folder) 'cd c:\*YOUR SDK*\tools'.
9. Make sure your Nexus S is still in the Bootloader Interface (refer to step 9, part 1 of it isn't).
10. We now need to use the 'fastboot boot' command to load Clockwork Recovery onto our Nexus S. In the command prompt, type in the following (but without the quotes, as always) 'fastboot boot recovery.img'
11. Once you are in Clockwork Recovery (it may take a couple of tries, don't panic, just redownload Clockwork Recovery, and complete steps 3 and 10, part 2) it should look something like this:
12. Using the Volume buttons and Power button, select install zip from sdcard.
13. Select choose zip from sdcard.
14. Select the su-version#-signed.zip file you downloaded earlier and apply it.
15. Select yes (there are lots of nos).
16. Confirm it says something like this: install from sdcard complete
17. Select Go Back.
18. Select Reboot.
19. Done! You should still have all your data present on your phone, and have root access!
all credits goes to Jonathon Grigg
plipness said:
New Part 2 - Does NOT wipe everything - Keeps a locked bootloader
1. Make sure Part 1 is completed.
2. Make sure you have downloaded the Clockwork Recovery file and the Superuser file.
3. Move the Clockwork Recovery file to your tools folder within the Android SDK folder, and rename it to recovery.img (for simplicity).
4. Connect your Nexus S via USB to your computer and mount it as USB storage. Copy across the Superuser file to the top level of your sdcard. (So the first window you see, not in any other folders. The sdcard is just where all the files are stored, don't worry about it too much for now).
5. We now need to install PDAnet on our PC so that Windows can see our Nexus S when we are using the Command Prompt. Install PDAnet from here, select Samsung when asked about the Manufacturer, allow the driver to be installed (because the driver is unverified, don't worry about this!). Follow along with any other instructions. You should be set now.
6. With the latest SDK version, some tools have been relocated to another directory, so we need to make a copy and move them back. Navigate to the directory where you unzipped the Android SDK file in part 1. Inside it, go to the platform-tools folder, and copy both AdbWinApi.dll and AdbWinUsbApi.dll. Go back to the main Android SDK directory and find the tools folder. Paste these two files in there, and we are all ready to use 'fastboot boot' (the boot image command) now.
7. Open a command prompt window (Start > Run > cmd.exe).
8. Change to the tools directory within your Android SDK folder by using the following command (without the quotes and replacing *YOUR SDK* with the path to your Android SDK folder) 'cd c:\*YOUR SDK*\tools'.
9. Make sure your Nexus S is still in the Bootloader Interface (refer to step 9, part 1 of it isn't).
10. We now need to use the 'fastboot boot' command to load Clockwork Recovery onto our Nexus S. In the command prompt, type in the following (but without the quotes, as always) 'fastboot boot recovery.img'
11. Once you are in Clockwork Recovery (it may take a couple of tries, don't panic, just redownload Clockwork Recovery, and complete steps 3 and 10, part 2) it should look something like this:
12. Using the Volume buttons and Power button, select install zip from sdcard.
13. Select choose zip from sdcard.
14. Select the su-version#-signed.zip file you downloaded earlier and apply it.
15. Select yes (there are lots of nos).
16. Confirm it says something like this: install from sdcard complete
17. Select Go Back.
18. Select Reboot.
19. Done! You should still have all your data present on your phone, and have root access!
all credits goes to Jonathon Grigg
Click to expand...
Click to collapse
As said before, does not work anymore for 2.3.6 as google has fixed this exploit...

[GUIDE] ADB Installation and how to get a logcat dump

If like me you're a complete newb, this may come in help to you - I spent a while looking around to find out exactly how I could get a logcat output, so maybe this will help speed up your progress.
1. http://developer.android.com/sdk/index.html
download and install the sdk
it may ask you to install the java sdk as well, do so
2. the SDK manager should start up automagically, if not, go through the start menu and fire it up, then select android 2.3.3 (API10) and google usb driver packages
install those packages
3. go to control panel>system>advanced system settings>environment variables and find the term 'path' under system variables and edit it
add the full path to your sdb directory (IE:
;C:\Program Files\Android\android-sdk\platform-tools;C:\Program Files\Android\android-sdk\tools)
to the end of the string in the box - it MUST be seperated from the rest of the text with a semi-colon
4. restart the computer after ok'ing your changes
5. connect the phone to the pc with the usb cable, with usb debugging enabled, but phone switched OFF
6. go to start menu on pc and type cmd in the search box, hit enter
7. type adb logcat > logfile.txt
This will output the results directly into a text file in your working directory (usually your user folder) but does not show anything in the cmd window, be sure you leave the phone attached lond enought to gather the required data before unplugging and rebooting.
Cheers to the two following posters after mine for their tips!
try
adb logcat > logfile.txt
this should create a textfile of the log in the present working directory.
Change system variable
I've seen a text file in:
C:\Program Files\Android\android-sdk\tools
that adb has moved to a different location. Here's the new location:
C:\Program Files\Android\android-sdk\platform-tools
It works for me
I wanted to debug the boot proces but it says: Waiting for device
quite right, I had a copy paste malfunction
Added output .txt command also

How to fix a soft bricked device from a flash that failed due to missing files

This guide is meant to less techie people, and written in detail. Please don't mind me if I overexplain. If you have any questions, feel free to comment them.
Also, I am not responsible for anything you do to your phone; you assume your responsibility for anything you do because of this guide.
Scenario:
So, lets say that you tried to flash an zip file on your android using sideload, but the zip required another file to be in the same directory as it, in order to work.
After flashing the zip and getting an error, your phone may not get pass the logo of the brand and be soft bricked.
Also, you formatted your external sd as internal, and cant access your usual location with files in the recovery.
In this case, don't worry, as I'm here to help you unbrick your phone without reinstalling the rom.
Things you will need:
your phone
a computer connected to your phone with an usb cable
the proper drivers for your phone
a custom recovery like cwm or twrp installed on your phone
probably root, although I'm not sure
and finally the adb (android development bridge) utility
Where to get a custom recovery?
- https://www.xda-developers.com/how-to-install-clockworkmod/
or search on xda under at your device's forum
Where to download adb from?
- https://forum.xda-developers.com/showthread.php?t=2588979 (this one comes with the drivers)
- https://dl.google.com/android/repository/platform-tools-latest-windows.zip (just the adb files)
So lets get started:
First, get your phone into Recovery mode (on samsung hold power button volume up and home button), and connect it to your pc with a usb cable.
Open ADB by shift + right clicking the folder platform-tools in witch it is located. Click on "Open Command Prompt window here" or "Open Powershell window here" (depends on your windows settings).
You need to find a location on your phone that is accessible through the flash zip menu from your recovery. (from sdcard / from sdcard1 or whatever your external sd is called)
In my case, i could get to see folder 0 and obb from "flash zip from sdcard".
To find a suitable folder:
In the window, type
Code:
adb.exe shell
if you opened cmd, or
Code:
./adb.exe shell
if you opened powershell.
This will open a terminal that will run commands on your phone.
(Now you can type commands in the cmd window that will be run on your phone.)
Type in
Code:
cd /sdcard/0
to go to the main sd card location that is accessible in recovery when you go to flash a zip from there. (if you can get to another folder where you could a flash a zip from, change the location to that place)
You can use here the command
Code:
ls
to view objects in the folder you are in.
After you are done, type
Code:
exit
to exit.
To solve the soft-brick, you need to reflash the zip, but with the files it needed in the same directory.
Type in the ADB window
Code:
./adb.exe push "location of the file you are sending" "location of the folder you are sending to (eg. /sdcard/0)"
if you are in powershell, or without the ./ if you are in cmd.
Use this until you have sent all the files needed for a successful flash.
Then just use the "flash zip" utility from your recovery with the location you have sent the files to, on your phone, to complete the flash, and solve the half-brick.
Restart your phone and you should be good to go.
Thanks to the following threads, that helped me put this together, and solve this problem on my phone:
https://forum.xda-developers.com/showthread.php?t=1927198
https://forum.xda-developers.com/showthread.php?t=2588979​

GUIDE: [WAYNE][MIUI] How to enable Camera2API without root

A few things before:
This process worked to me and can work to you, however, I can not give any garantee of how you will understand it, so, if you follow these steps, do it at your own risk.
-----------------------------------------------------------------
Before getting into this, you must have USB debugging enabled, an unlocked bootloader, a converted MI A2 to MI 6X, TWRP recovery installed.
This guide includes a fix to "Can't connect to camera" bug.
-----------------------------------------------------------------
Requirements:
TWRP Wayne
ADB
Your phone must be in MIUI
USB Debugging, unlocked bootloader enabled in Developer options
Platform-tools
Compatible USB Cable
----------------------------------------------------
Install Platform-tools
Place TWRP boot image in adb folder
Inside ADB Folder, hold "Shift" key in your keyboard and click right button in your mouse and select "Open Command prompt here" or whatever it shows in your language.
In Command Prompt, type
Code:
fastboot devices
and Enter - you shall see your device's ID
In Command Prompt, type
Code:
fastboot boot twrp-[version here]-wayne.img
and Enter, your phone your restart and load TWRP Recovery.
Go to Advanced > Terminal and type:
Code:
setprop persist.camera.HAL3.enabled 1
Go to Mount and check "Data" and "System"
Go to Advanced > File Manager
In File Manager go to /system/etc/device_features
In "device_features", select "wayne.xml" and rename it to "whyred.xml"
Back to /system in "Up A Level", select build.prop > Copy File > navigate to /sdcard/Download and touch the folder icon (down right) and Swipe to confirm, then, reboot system.
In your computer's file manager, open the MI 6X and navigate to Download, copy the file build.prop to a computer's folder and open it with an advanced text editor (I recommend Notepad++).
(for security purposes, backup the original build.prop file in your computer and in your phone, just in case)
Find the line "ro.product.device=wayne" edit it to "ro.product.device=whyred" and save.
Copy build.prop back to phone's Download folder (you should replace it)
Restart phone in Fastboot mode and boot with TWRP again (steps 2, 3, 4).
Go to Mount and check "Data" and "System"
In File Manager go to /sdcard/Download, select build.prop > Copy File > Up A Level (twice) > /system, tap the folder in right down and Swipe to confirm.
In File Manager, in /system, select build.prop > chmod > Permission, change 0000 to 644, confirm
Back and reboot to system.
Voilà! You're now with Camera2API enable and with no root.
Enjoy Google CAM
This tutorial is based in akshayakakat guide, Andres Videla guide and it is a modified version of ARNOB XENON guide.
Thanks for your work, guys!
It doesn't work on my Redmi 6X with Xiaomi.eu rom.
APK file
Do you have Gcam apk file? Share with me.
Thanks it helped...

Add Right click Context Menu for ADB File Transfer | Transfer files faster and as easy as mtp mode

Use ADB Push to copy files to device by a simple right click on windows
(No CMD commands needed)​
You can simply right click any file on your Computer to send to your phone via adb push commands(without needing to type commands)
This makes file transfers significantly faster -especially when you have a large number of small files. MTP is a pain to use. This helps me transfer 100 gb of files in less than 40minutes whereas mtp transfer will take over 4 hours.
1. Install ADB Platform Tools for windows from official website
2. Extract the platform tools to 'C:\' such that your adb directory becomes "C:\platform-tools"
3. Copy the following code and paste it into a new .txt file created on your Computer.
Save it and change extension to .reg. Double click the file to install the registry entry.
3. Create a folder named 'ADBPush' in base directory of your internal storage on your phone - using a file manager. Create a folder named 'ADBPush' in root of your hard drive,i.e, C:\
4. Enable developer options and enable usb debugging on your mobile, accept the request for usb debugging access seen on your phone when you try to run adb command for the first time.
5. You can do this through wireless adb as well but first, you must use the command 'adb connect 192.168.xxx' to connect adb wirelessly first. Replace ip address with your phones current ip adresss.
Code:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\ADB Push to Phone]
[HKEY_CLASSES_ROOT\*\shell\ADB Push to Phone\command]
@="\"C:\\Windows\\System32\\cmd.exe\" /k C:\\platform-tools\\adb.exe push \"%1\" /sdcard/ADBPush/"
[HKEY_CLASSES_ROOT\Folder\shell\ADB Push to Phone]
[HKEY_CLASSES_ROOT\Folder\shell\ADB Push to Phone\command]
@="\"C:\\Windows\\System32\\cmd.exe\" /k C:\\platform-tools\\adb.exe push \"%1\" /sdcard/ADBPush/"
Done!
Now you can simply right click context menu to push files using adb - as simple as copy paste
I couldnt get it to work with adb pull as worng directory path if used. Anyone got ideas for getting adb pull working by above method?

Categories

Resources