Just wanted to create a quick thread for my fellow noobs. This is my first time using terminal and this is my first nexus device and I was able to unlock the bootloader, flash a recovery, flash the necessary files and flash a custom rom without any issues.. For the more experience guys, please take it easy on me if I put something incorrect Please make sure you have the Android SDK and adb/fastboot otherwise all of this is irrelevant. Also want to thank the community for all the help and giving me all this information as I was learning on the fly. Made the experience super easy and a lot of fun.
You can download the adb and fastboot here... Thanks @corbin052198 : http://forum.xda-developers.com/nexu...d-xda-t3226767
Disclaimer: I am not responsible for any damaged devices. These are simple commands and pretty hard to screw up so if you do I'm not responsible.
Here are the commands and what they do:
adb devices - shows adb devices (this is important, if it doesn't see your device then don't do anything else until is does)
adb reboot bootloader - reboots into bootloader
fastboot reboot-bootloader - reboots bootloader
fastboot flashing unlock - unlocks bootloader
fastboot flash recovery <filename>.img - flashes recovery (TWRP)
fastboot flash vendor vendor.img - use command to flash vendor image
fastboot flash boot boot.img - use command to flash boot image
fastboot flash system system.img- use command to flash system image
Note: If you are having issues with the commands try using "./" I didn't have to but you might. Ex: ./fastboot flash vendor vendor.img
PSA: 1) Make sure your terminal is pointed in the fastboot folder so you can type cd desktop then cd fastboot if that's where the folder is then you can type ls which will show what's in that folder to make sure you are in the right folder.
PSA: 2) If flashing Vendor, Boot and System files, I'd recommend doing it one by one and rebooting the bootloader after each one to be safe..
PSA: 3) A lot of PSA's, I know.. When flashing anything, instead of typing out vendor.img for example, you can just drag it from the folder and drop it into terminal.. Ex: fastboot flash vendor then drag the vendor.img from the fastboot folder..
Hope this helps..
dont all the commands need to be preceded with "./" (without quotes)
ie to flash vendor image w filename vendor.img
./fastboot flash vendor vendor.img
Sent from my Nexus 6P using Tapatalk
Nope not anymore. I actually got an error when typing the "./"
johnandbodhi said:
dont all the commands need to be preceded with "./" (without quotes)
ie to flash vendor image w filename vendor.img
./fastboot flash vendor vendor.img
Sent from my Nexus 6P using Tapatalk
Click to expand...
Click to collapse
this also helps
http://forum.xda-developers.com/nexus-6p/development/tool-nexus-tools-2-8-featured-xda-t3226767
Will add to thread. Thank you.. This is where I added adb
dwertz said:
this also helps
http://forum.xda-developers.com/nexus-6p/development/tool-nexus-tools-2-8-featured-xda-t3226767
Click to expand...
Click to collapse
Very simple to install to where you can use the commands ANYWHERE instead of having to CD to the folder..
Open a terminal
Make sure Java is installed "java -version" (Should say Java version "x.x.x")
Download the SDK from Google. (Don't worry about Android Studio, just the SDK)
Extract the folder and move it to ~/.android-sdk
In the terminal type "cd ~/.android-sdk/tools
In the terminal type "./android"
Install the Android SDK Tools, Android SDK Platform-Tools, Android SDK Build-tools, Android Support Library
Modify your shell (.bash_profile, .bashrc, .zshrc, ect...) to include (below the PATH variable): export PATH="/users/<username>/.android-sdk/platform-tools:$PATH"
Close your terminal and reopen it. Upon doing so, you should be able to use fastboot and adb in any folder you'd like.
Following these steps make it quite a bit easier to install factory images or sideload ROMs since you can use the fastboot/adb commands directly within the ROM or factory image folders. Let me know if you have any questions
Just FYI, the commands are the same across all platforms. The "./" would be if you are accessing the in the current directory, if you were using a portable version or didn't install things properly so they are in the path.
Dupe thread, we have all this info pinned in general.
http://forum.xda-developers.com/nexus-6p/general/guides-how-to-guides-beginners-t3206928
So you don't really need to put the "./"? I didn't use it at any point and had no trouble at all.
designgears said:
Just FYI, the commands are the same across all platforms. The "./" would be if you are accessing the in the current directory, if you were using a portable version or didn't install things properly so they are in the path.
Dupe thread, we have all this info pinned in general.
http://forum.xda-developers.com/nexus-6p/general/guides-how-to-guides-beginners-t3206928
Click to expand...
Click to collapse
XavierD8188 said:
So you don't really need to put the "./"? I didn't use it at any point and had no trouble at all.
Click to expand...
Click to collapse
I had to use ./ when typing commands to unlock my bootloader. The regular commands without ./ gave me errors.
Sent from my Nexus 6P using Tapatalk
It was the opposite for me. "./" gave me errors but when I just typed the commands without it, worked perfectly fine. Weird..
wwevoxnj said:
I had to use ./ when typing commands to unlock my bootloader. The regular commands without ./ gave me errors.
Sent from my Nexus 6P using Tapatalk
Click to expand...
Click to collapse
There are at least 2 other threads with this same information, therefore, I'm closing this one.
Related
Hi,
It take me a bit of time to find how to flash a kernel using fastboot on os X. Therefore I've decided to add a new post about that on XDA for those who want/need to use fastboot on mac os X.
Example given for a Sony Xperia ARC LT15i. This should work for any SE device but will need different vendor ID value for another Brand.
Installation
- Download and extract Android SDK (let's say on the Desktop for the rest of the explanation…)
- Add "Android SDK Platform-Tools" with android SDK Manager
- Download fastboot for mac here http://www.mediafire.com/?0nwuina1ydi
- extract it in android-sdk/platform-tools/
Configuration
Next you need to update the PATH for tools/ and platform-tools/ folder.
- Open Terminal app and type
Code:
nano ~/.bash_profile
- Add the following two lines and change the (username) with the name of your mac os X account name :
Code:
export PATH=${PATH}:/Users/(username)/Desktop/android-sdk/tools
export PATH=${PATH}:/Users/(username)/Desktop/android-sdk/platform-tools
- Save by typing Control+X and then Y
From now you can use fastboot command on your mac os X
The only thing to know is that you will need to use the "i" argument to specify the vendor id of the phone
Code:
./fastboot-mac -i 0xfce flash boot boot.img
Here is the official vendor IDs list http://developer.android.com/guide/developing/device.html#VendorIds but the SE one is not exactly the same and I don't know why
This help have been made using the following sources:
- http://blog.wapnet.nl/2011/05/setup-adb-and-fastboot-with-android-sdk-on-mac-osx/
- http://forum.xda-developers.com/showthread.php?t=1280516
Feel free to add specific vendor IDs
I've followed these instructions and entered the following command:
Code:
fastboot-mac -i 04E8 oem unlock
But I'm still met with the error...
Code:
-bash: fastboot-mac: command not found
What am I STILL doing wrong?? Any help is greatly appreciated!
as said you have not st the path correctly.. try that.. or try with running the command from the folder where you have the file fastboot-mac..
Sent from my HTC One V using Tapatalk 2
I tried the above and I got:
./fastboot-mac -i 0xfce flash boot boot.img
error: cannot load 'boot.img'
Any suggestions?
it doesnt work, waste of time...
It does work. If it isn't working for you its a user error or bad downloads. Instead of posting something like this where no one can help you since we don't know what the problem is, try posting what the results are when you type the commands and include the commands that you enter. THEN we could possibly help you.
Sent from my Inspire 4G
JellyTime R_29
@randomblame
Don't hesitate to say thanks
chmod
theandroidguy2012 said:
It does work. If it isn't working for you its a user error or bad downloads. Instead of posting something like this where no one can help you since we don't know what the problem is, try posting what the results are when you type the commands and include the commands that you enter. THEN we could possibly help you.
Sent from my Inspire 4G
JellyTime R_29
@randomblame
Don't hesitate to say thanks
Click to expand...
Click to collapse
i just tried this and it's worked:
Code:
chmod 777 fastboot-mac
./fastboot-mac command
make sure you are on current directory where fastboot-mac is located
it worked, thanks!
was doing fastboot reboot for like 5 mins.
You saved my day. SILLY MAC
Hi I am having nothing but troubles I don't suppose anyone could help? I just cannot seem to get fastboot working on my mac I tried installing andoir studio and the separate platform-tools folder. Nothing works. I tried your instructions and whenever I try any commands I always get command not found.
Tried this but my device is still not recognized in fastboot mode just says waiting for device even if I give vendor id also. I have kenzo
This is a guide to loading a custom rom onto your TELUS HOX+ device if you have no rom but have bootloader access.
I would recommend using the HTC One X+ All-In-One Toolkit V1.1 from hasoon2000.
It can be found here
You will need the HTC drivers installed and adb/fastboot to do this process. You can the newest adb/fastboot here
Using the HTC One X+ All-In-One Toolkit V1.1
Step 1 - Unlock your bootloader with the Toolkit
Step 2 - Get into the bootloader>fastboot
Step 3 - Flash the TWRP(ATT Model) recovery via the Toolkit
Step 4 - Reboot into recovery
Step 5 - Choose advanced tab in TWRP Recovery(should be bottom left)
Step 6 - Choose ADB Sideload
Step 7 - Pick a rom you wish to load. Because we are TELUS and have a hboot 1.32.0000 with no RUU or firmware update you can only choose 1 of 4 roms atm
1st rom that will work is [ROM][AT&T/Telus][12-1-12] QX Senseless v2.1 | Lightweight | OTA Updater | JB 4.1.1 here
2nd rom that will work is [ROM][ATT]InsertCoin 1.1.3 |JB & Sense 4+|STABLE & FAST|APM|%Battery|JellyBlue here
3rd rom that will work is [ROM] |ATT & TELUS| █ ELEGANCIA™ █ ◄| 2.3.1 |►| Stock & Colored | Sense & Senseless | here
4th rom that will work is [ROM][Dec 15] Blackout 1X+ v1.0 U.S AT&T [4.1.1][JB Sense 4+][Mods][Insecure Boot] here
Don't ask me why but I have flashed every rom and those were the only ones to actually boot. Might be because of our 1.15.661.11 base.
Step 8 - Once you have the rom, run adb sideload “rom”.zip from your command prompt on your pc.
The “rom” is whatever the name of the custom rom you downloaded. I put the rom in the directory of my adb to make things simple.
If you are running into trouble you might have to do some commands to help the pc see your device.
So run the adb kill-server command
then run the adb device command
if it sees the phone
then run the adb sideload command
You might have to alt ctrl del windows and kill adb.exe as well
Just make sure your ADB version is at least 1.0.31.
At this point you should be in the TWRP Recovery > Advanced Tab > ADB Sideload on your device and your "rom" that you uploaded via sideload should be installing on your device.
If you need to re-flash the rom, as long as you have completed a full boot if you go back into Recovery>Install>/sdcard, it will be labelled as Sideload.zip
Step 9 - Reboot into bootloader and flash the boot.img from the rom via fastboot flash boot boot.img from your command prompt on your pc. I also put my boot.img in the adb folder to make it easier when flashing anything.
*at this point it wouldn't hurt to do a fastboot erase cache* Optional
Step 10 - Once your rom boots you have to add TELUS APN
Settings>Mobile data>Access point names>Menu>New APN
Name: TELUS SP
APN: sp.telus.com
Proxy: Not set
Port: Not set
Username: Not set
Password: Not set
Server: Not set
MMSC: http://aliasredirect.net/proxy/mmsc
MMS Proxy: 74.49.0.18
MMS Port: 80
MMS Protocol: WAP 2.0
MCC: 302
MNC: 220
Authentication type: None
APN type: default,mms,hipri
APN enable/disable: APN enable
Bearer: Unspecified
http://androidforums.com/hero-support-troubleshooting/45005-mobile-network-apn-settings.html
Tethering APN (Only use the following 3 fields, leave all other fields Not set or default)
Name: TELUS ISP
APN: isp.telus.com
APN type: dun
https://www.telusmobility.com/en/ON/phones-and-devices/setupdata.shtml
This will allow you to have data on your phone.
If you want to revert back to stock...just click here and flash the RUU
This is just an initial write up. I will make changes as my thoughts get collected better
Thanks to:
Hasoon2000 for his awesome toolkits
mfpreach for input
Right on point. Wish I had had this when I originally flashed.
PS. Should add isp.telus.Com apn for tethering.
Sent from my HTC One X+ using xda app-developers app
mfpreach said:
Right on point. Wish I had had this when I originally flashed.
PS. Should add isp.telus.Com apn for tethering.
Sent from my HTC One X+ using xda app-developers app
Click to expand...
Click to collapse
Thanks for the tip! I added it. Not sure if I added it correctly or not. I'm unclear as to where...does it get its own APN and when you want to tether, you are required to switch them?
Cheers
Clonz said:
Thanks for the tip! I added it. Not sure if I added it correctly or not. I'm unclear as to where...does it get its own APN and when you want to tether, you are required to switch them?
Cheers
Click to expand...
Click to collapse
Make sure to change the APN type to "dun"
otherwise the rest of the settings leave default
Just add it, I'm fairly confident you don't have to switch it, when you set the apn type it knows.
If anyone is interested in "purchasing" the stock Ruu, I got $10 on it, need another $10. PM me and we'll sort it out (it's not me selling it FYI).
Clonz said:
At this point you should be in the TWRP Recovery > Advanced Tab > ADB Sideload on your device and your "rom" that you uploaded via sideload should be installing on your device
Click to expand...
Click to collapse
wrong, it doesn't install automagically, you need to install "sideload.zip" like any other rom from the install menu
Lloir said:
wrong, it doesn't install automagically, you need to install "sideload.zip" like any other rom from the install menu
Click to expand...
Click to collapse
Umm I would have to politely disagree Lloir...from my experience in doing this several times, as soon as the sideload file has finished uploading to the device, on all occasions, the aroma installer automatically starts and in the case of the QX Senseless it just installs.
You need to understand that my TUT is for people that don't have a rom on their phone. This means that there is no zip file(rom) on their /sdcard so they can't choose install .zip file nor can they mount the system or cache as they don't exist at this point.
Thank you for your input tho
Cheers!
I agree my aroma started automatically too. I did have to manually flash it for some reason though. If anyone needs to the rom will be named sideload.zip
Sent from my HTC One X+ using xda app-developers app
Awesome. Changed it on my phone and it works perfect! Tx
Also updated it
20 bucks sounds cheap although I have never bought one before. I would be willing to get in on that if it was legit
Clonz said:
Awesome. Changed it on my phone and it works perfect! Tx
Also updated it
20 bucks sounds cheap although I have never bought one before. I would be willing to get in on that if it was legit
Click to expand...
Click to collapse
I'm sure it is, that's what football quoted me, and he's the guy that releases all the RUUs.
I'll message him and let you know.
mfpreach said:
I'm sure it is, that's what football quoted me, and he's the guy that releases all the RUUs.
I'll message him and let you know.
Click to expand...
Click to collapse
Sounds awesome. Thanks
Hi thanks for the help. Sorry for the dumb question but i really dont know how to do this.
Can someone please explain step by step how to perform step 8
Step 8 - Run adb sideload “rom”.zip from your command prompt on your pc. You need HTC drivers installed and adb / fastboot Where “rom” is whatever the name of the rom you downloaded is. I put the rom in the directory of my adb to make things simple. If you are running into trouble you might have to do some commands to help the pc see your device.
So run the adb kill-server command
then run the adb device command
if it sees the phone
then run the adb sideload command You might have to alt ctrl del windows and kill adb.exe as well
Just make sure your ADB version is at least 1.0.31.
At this point you should be in the TWRP Recovery > Advanced Tab > ADB Sideload on your device and your "rom" that you uploaded via sideload should be installing on your device.
Im so lost!
rgdutriz said:
Hi thanks for the help. Sorry for the dumb question but i really dont know how to do this.
Can someone please explain step by step how to perform step 8
Step 8 - Run adb sideload “rom”.zip from your command prompt on your pc. You need HTC drivers installed and adb / fastboot Where “rom” is whatever the name of the rom you downloaded is. I put the rom in the directory of my adb to make things simple. If you are running into trouble you might have to do some commands to help the pc see your device.
So run the adb kill-server command
then run the adb device command
if it sees the phone
then run the adb sideload command You might have to alt ctrl del windows and kill adb.exe as well
Just make sure your ADB version is at least 1.0.31.
At this point you should be in the TWRP Recovery > Advanced Tab > ADB Sideload on your device and your "rom" that you uploaded via sideload should be installing on your device.
Im so lost!
Click to expand...
Click to collapse
OK I see where it could be confusing, maybe the OP can edit the instructions
In TWRP go to advanced and select 'adb sideload' YOU CAN then run the adb sideload command from the command prompt.
put the rom.zip (whatever you are using it will have a different name) in the adb folder where adb.exe is
Then run: adb sideload rom.zip (replace 'rom' with whatever the filename is)
It will run aroma automatically. If it still doesn't boot, go into TWRP and install the sideload.zip from the internal storage.
You must do this because there is no way to mount the phone like you can with samsung or other phones.
PS: I didn't bother with the adb kill server command.
Gl
mfpreach said:
OK I see where it could be confusing, maybe the OP can edit the instructions
In TWRP go to advanced and select 'adb sideload' YOU CAN then run the adb sideload command from the command prompt.
put the rom.zip (whatever you are using it will have a different name) in the adb folder where adb.exe is
Then run: adb sideload rom.zip
It will run aroma automatically. If it still doesn't boot, go into TWRP and install the sideload.zip from the internal storage.
You must do this because there is no way to mount the phone like you can with samsung or other phones.
PS: I didn't bother with the adb kill server command.
Gl
Click to expand...
Click to collapse
I will try to make it more clear...remember it was an initial draft still working on clearing up directions
mfpreach said:
OK I see where it could be confusing, maybe the OP can edit the instructions
In TWRP go to advanced and select 'adb sideload' YOU CAN then run the adb sideload command from the command prompt.
put the rom.zip (whatever you are using it will have a different name) in the adb folder where adb.exe is
Then run: adb sideload rom.zip (replace 'rom' with whatever the filename is)
It will run aroma automatically. If it still doesn't boot, go into TWRP and install the sideload.zip from the internal storage.
You must do this because there is no way to mount the phone like you can with samsung or other phones.
PS: I didn't bother with the adb kill server command.
Gl
Click to expand...
Click to collapse
no dice!
rgdutriz said:
no dice!
Click to expand...
Click to collapse
Try killing the server as the OP Suggested.
This is indicating that the phone isn't being detected by your computer.
Have you flashed the elegancia kernel yet? Do that before you install the rom.
rgdutriz said:
no dice!
Click to expand...
Click to collapse
try to end task adb.exe in your windows task manager. Once you have done that you can do an adb device...if it sees your phone then you should be able to continue with the upload.
Edit: You can also try trolling through this thread http://forum.xda-developers.com/showthread.php?t=1987885 there is a convo between me and another person doing the same thing but with more dialog it starts at post #818
Clonz said:
try to end task adb.exe in your windows task manager. Once you have done that you can do an adb device...if it sees your phone then you should be able to continue with the upload.
Click to expand...
Click to collapse
No device found. How do I do this "TWRP and install the sideload.zip from the internal storage". Also please dm your email I will send donate for your help
---------- Post added at 05:23 PM ---------- Previous post was at 05:17 PM ----------
mfpreach said:
Try killing the server as the OP Suggested.
This is indicating that the phone isn't being detected by your computer.
Have you flashed the elegancia kernel yet? Do that before you install the rom.
Click to expand...
Click to collapse
How do I flash the elegancia kernel? Also will donate to the cause dm email
ugh since im a n00b i have to wait 5 min between posts
rgdutriz said:
No device found. How do I do this "TWRP and install the sideload.zip from the internal storage". Also please dm your email I will send donate for your help
---------- Post added at 05:23 PM ---------- Previous post was at 05:17 PM ----------
How do I flash the elegancia kernel? Also will donate to the cause dm email
ugh since im a n00b i have to wait 5 min between posts
Click to expand...
Click to collapse
Take the boot.img out of the elegencia.zip and flash it via Hansoon's tool, his tool tells you where to put it.
OR
Put the boot.img in the fastboot folder and run:
fastboot flash boot boot.img
fastboot reboot
You can donate to me so I can buy the STock RUU for Telus for all of us!
mfpreach said:
Take the boot.img out of the elegencia.zip and flash it via Hansoon's tool, his tool tells you where to put it.
OR
Put the boot.img in the fastboot folder and run:
fastboot flash boot boot.img
fastboot reboot
You can donate to me so I can buy the STock RUU for Telus for all of us!
Click to expand...
Click to collapse
I would add the fastboot erase cache after you flash the boot.img just for good measure
Clonz: how many bars of LTE do you get on the reg? I'm usually 2, no higher than 3. I get blazing speeds though.
This version is Mac only sorry, will update for PC this week.
Directions:
1.) Download from https://www.dropbox.com/s/4zd9rz3akcr8zht/lollipop.zip?dl=0[1][1] to your desktop. (file size 124 mb), and extract it the zip.
2.) Open up terminal, and type navigate to the file via cd/Desktop/lollipop .That code only works if the extracted file is actually called lollipop and is in your desktop.
3.) Type sh runMe.sh into the terminal and just follow on screen instructions.
Short version of what it does: Used adb to unlock bootloader, Roots it, Copies over 5.0.1, Writes to cache, and reboots. Then optional install of TWRP recovery.
This code isn't specific to the G Watch, to make it work for your phone, just add two files...
Replace:
update.zip with your factory image of lolipop
LGGW-rootboot.img with temporary boot image for your device to give it root, can find this on forums like XDA TWRP (optional) custom recovery
Be sure to keep the file names the same, as that is what the script looks for! I'm too lazy now, but only 2 things need to be done to make it work for PC...
1.) Get the adb drivers and fastboot, and put it in the lollipop folder, make sure you keep the names the same as the ones in there now.
2.) On the script called runMe and called, everywhere it says ./fastboot or ./adb-mac, get rid of the ./ part, so it would just say fastboot or adbmac
works wirh 4.4W1?
solved, found ota to 4.4w.2
starbase64 said:
works wirh 4.4W1?
solved, found ota to 4.4w.2
Click to expand...
Click to collapse
Yea! It upgrades any version, be i t 4.4 or 4.4.1
Oh, the irony, using android devices on a mac . Can't wait for the windows version though, thanks for your work, man
This worked like a charm for me! I was up and running within 5 minutes -- with no previous ADB experience in my life. I recommend anyone with a mac available to use this if you want to avoid all of the manual work. Thanks again, pal.
Any progress on PC version?
I have been experimenting with flashing, etc. and somehow the lockscreen were corrupted and the pattern I was using was not longer valid. I had the fingerprint already setup so I could enter using the rear sensor, but having a corrupted lockscreen is annoying. THis method requires TWRP custom recovery. It is compatible with locked bootloaders and doesn't modify the stock boot or system. It is also compatible with all the AAXON 7 models.
If you have the stock ROM and need TWRP and ADB interface:
A. Setup ADB interface in your PC and device drivers. and connect your terminal to the PC.
B. Setup axon7tool in your computer. Enter into EDL mode by running the command "adb reboot edl" in the command prompt. The terminal will seen to be off.
C. Disable the antivirus and then backup your recovery image using axon7tool running "axon7tool -r recovery". Save the created file in a safe place.
D. Flash tenfar's signed TWRP as a new recovery using axon7tool. It will reboot to system again.
E. Open the command prompt and run:
Code:
adb devices
adb reboot recovery
1. In TWRP , and with the ADB interface properly installed run these the commands from your computer:
Code:
adb devices
adb shell mv /data/system/locksettings.db locksettings.db.old
adb reboot
Now the system will allow you to pass lockscreen without security. In that case you do not need to apply the rest of the steps. Should you continue experimenting issues with the lockscreen, then you should apply the full procedure. Just add the following 2 steps:
2. Open the command prompt and run:
Code:
adb devices
adb reboot recovery
3. When TWRP had fully loaded, run in the command prompt the following commands:
Code:
adb devices
adb shell mv /data/system/gatekeeper.pattern.key gatekeeper.pattern.key.old
adb shell mv /data/system/locksettings.db locksettings.db.old
adb shell mv /data/system/gatekeeper.password.key gatekeeper.password.key.old
adb shell mv /data/system/locksettings.db-shm locksettings.db-shm.old
adb shell mv /data/system/locksettings.db-wal locksettings.db-wal.old
adb reboot
If you want to restore the stock recovery, you just need to rename the recovery-backup.bin file created in step C back to recovery.bin and run the command "axon7tool -w recovery". after that you can enable your antivirus software again. axon7tool can't connect with some antivirus software. I will be editing this OP with links to the procedures required for each step. All of them are in this forums.
Enjoy
@Oki
To fix either " Wrong Pattern " , " Wrong Pin " users only need to delete " /data/system/locksettings.db " from either Terminal/File Explorer with root or TWRP File explorer then Reboot and you'll be good to go .
DrakenFX said:
@Oki
To fix either " Wrong Pattern " , " Wrong Pin " users only need to delete " /data/system/locksettings.db " from either Terminal/File Explorer with root or TWRP File explorer then Reboot and you'll be good to go .
Click to expand...
Click to collapse
Sure! but this guide is intended for people with the stock, unrooted, blocked bootloader who want to remain with a pure stock experience. Usually people without experience rooting devices. This is why I will edit the guide to add all the details to every step.
Could I do this with a pin as well? I restored a backup and it corrupted my password and I have to use the fingerprint on the back to get in.
twilighttony said:
Could I do this with a pin as well? I restored a backup and it corrupted my password and I have to use the fingerprint on the back to get in.
Click to expand...
Click to collapse
Yes, the procedure deletes everything. If you have problems just do the same also with:
gatekeeper.password.key
locksettings.db-shm
locksettings.db-wal
I have updated the OP just to describe the full procedure.
I had this problem earlier today of having the PIN corrupted, but I have it set to require the pin on the first boot.
I fixed it by removing all files ending in ".key" in /system. Not really sure how this compares to removing locksettings.db. Afterward, I put my password back using Google's device manager.
Of course, I am rooted with twrp, so this comes after setting that up.
Masterjuggler said:
I had this problem earlier today of having the PIN corrupted, but I have it set to require the pin on the first boot.
I fixed it by removing all files ending in ".key" in /system. Not really sure how this compares to removing locksettings.db. Afterward, I put my password back using Google's device manager.
Of course, I am rooted with twrp, so this comes after setting that up.
Click to expand...
Click to collapse
The problem of this method is that it only works if the bootloader is unlocked and the phone has the No-verify patch installed.
When you say "No-verify patch," are you talking about removing Google license verification from apps (via an app such as lucky-patcher for instance)? AFAIK that is on a per-app basis and wouldn't affect something like the lockscreen password.
So if the phone has those prerequisites (unlocked, No-verify, TWRP), is there a difference between removing the ".key" files and the locksettings.db? I am not entirely sure what the different files contain, and don't seem to be able to find this information through Google, though I may just not be searching the right set of keywords.
Masterjuggler said:
When you say "No-verify patch," are you talking about removing Google license verification from apps (via an app such as lucky-patcher for instance)? AFAIK that is on a per-app basis and wouldn't affect something like the lockscreen password.
So if the phone has those prerequisites (unlocked, No-verify, TWRP), is there a difference between removing the ".key" files and the locksettings.db? I am not entirely sure what the different files contain, and don't seem to be able to find this information through Google, though I may just not be searching the right set of keywords.
Click to expand...
Click to collapse
No-Verify is an additional security system implementend in the kernel. When No-Verify is active, it checks for the signature of the system partition. If the system was modified, then the system won't boot. This is why after unlocking the bootloader you have to apply No-Verify Patch or any package with the integrated patch such as SuperSU. As you can see, it has nothing to do with the app signature or the lockscreen at all.
The method presented in the OP is valid for most Android phones, and the only prerequisite is to have TWRP installed. It is safe and a lot more recommended than patching the system partition. Patching system or kernel should always be your last resort. usually deleting locksettings.db is enough, and it is a general method that works for almost any locking method.
On B25 and have followed all instructions. Seems this method no longer works :/
Hello everyone,
I recently had to flash a stock firmware file from Xiaomi (.tgz) and being primarily a Linux user I was quite disappointed by the fact that the company only provides a flashing tool for Windows.
Either way, I booted into Windows and flashed it. I had a look at the logs later and apparently their flash tool is just a front-end to fastboot, and looking at their firmware archives I noticed there were some .sh files in there, and guess what, they're scripts which do the exact same things their Windows scripts do! So I decided to try to use them to flash the firmware on Linux and, sure enough, after ~10 minutes the device was successfully flashed.
Here's what I did, as always I don't take responsibility for bricked devices, try this at your own risk:
1. unpack the archive
Code:
tar -xf <archive_name>.tgz
2. cd to the archive directory
3. grant run permissions
Code:
chmod +x flash_all.sh
(in my case I was interested in flash_all.sh, I think you can follow the exact same procedure with whichever script you want, though I haven't tested it)
4. get your device id
Code:
fastboot devices
you'll get something like this
Code:
List of devices attached
d82c2d3 fastboot
you're interested in the first column, so in my case d82c2d3
5. run the script
Code:
./flash_all -s <device_id>
at this point the flashing process should start and if everything went good your phone should reboot in a few minutes.
You might need to prepend the commands in point 4 and 5 with sudo.
Also, I don't know if every firmware archive has these .sh files, but it would seem logical. By the way, let me know if this is common knowledge and my googling just sucks as I couldn't find anything related to it...
Just tried it on my Mi 10 Pro and it doesnt work says device is locked just like it does if I try and flash using fastboot.
guglicap said:
Hello everyone,
I recently had to flash a stock firmware file from Xiaomi (.tgz) and being primarily a Linux user I was quite disappointed by the fact that the company only provides a flashing tool for Windows.
Click to expand...
Click to collapse
Thank you, it worked...