[Guide] how to unlock after accedently re-locking an S-Off device - One (M7) General

Disclaimer
The software in this thread is not HTC official software, there for it can kill your phone, if not, indirectly can kill you if you are caring much about your phone. I don't take any responsibility for a bricked phone, neighter for indirectly being the cause of suicide because of bricking your phone, or exploding devices.
Click to expand...
Click to collapse
In this thread i'll use utilities from:
Firewater S-Off
Firmware packages from Mike1986
scotty1223's way of unlocking the phone
Since 4.19 & 5.11 firmware is patched against temproot you'll need to flash the 3.62.401.1 firmware.
You can download this here: HTC Firmware's from Mike1986
Flash the firmware this way:
Code:
adb reboot-bootloader
fastboot oem rebootRUU
fastboot flash zip 3.62.401.1.zip
fastboot flash zip 3.62.401.1.zip <--important!!!!
fastboot reboot
Yes do the 'fastboot flash zip 3.62.401.1.zip' twice!!
Download temproot from Firewater S-off and use it this way:
Code:
adb reboot <--important!!!!
adb wait-for-device push temproot /data/local/tmp
adb shell
chmod 755 /data/local/tmp/temproot
/data/local/tmp/temproot
DO NOT CLOSE THE SHELL AFTER OBTAINING TEMPROOT!
Now you have temproot you will be able to unlock your device in adb shell.
To unlock your device again type this in the shell:
Code:
echo -ne "HTCU" | dd of=/dev/block/mmcblk0p3 bs=1 seek=33796
(i would very strongly recomend you copy/paste this)
exit
(exit a second time if you need to to get back to a normal > prompt)
adb reboot bootloader
verify you are now unlocked
Now you can flash back your nice new firmware you were using before.

Why all this way ??
U can simply flash custom recovery in ruu mode because u have s-off
Then unlocking ur device from recocery and u have 2 ways :
1. Using adb method as above
2. Using flashable zip to lock, unlock, remove tamper flag and so on
And even u don't need to unlock the bootloader to flash roms inside the recovery
U can flash roms and kernels directly after flashing the custom recovery in ruu mode
Sent from my HTC One using Tapatalk

mido.fayad said:
Why all this way ??
U can simply flash custom recovery in ruu mode because u have s-off
Then unlocking ur device from recocery and u have 2 ways :
1. Using adb method as above
2. Using flashable zip to lock, unlock, remove tamper flag and so on
And even u don't need to unlock the bootloader to flash roms inside the recovery
U can flash roms and kernels directly after flashing the custom recovery in ruu mode
Sent from my HTC One using Tapatalk
Click to expand...
Click to collapse
1. Because there are people that can not flash recoveries while they are s-off... idk why...
2. Because this works all times.

M3nti0n said:
1. Because there are people that can not flash recoveries while they are s-off... idk why...
2. Because this works all times.
Click to expand...
Click to collapse
You can't "fastboot flash recovery <name of recovery>.img" with a locked bootloader, but you can use masked firmware package.
This is my solution to that problem:
Since you are S-Off, use a custom recovery masked in a firwmare package: you can use of these "firmware" packages (m7_u/ul only):
http://www.androidfilehost.com/?w=files&flid=13085
in bootloader/FASTBOOT USB:
fastboot oem rebootRUU
fastboot flash zip fw_m7ul_TWRP_2.6.3.3_1.26.401.33.zip
fastboot reboot-bootloader
-> enter RECOVERY (should be TWRP or CWM now)
and use @scotty1223's commands in custom recovery http://forum.xda-developers.com/showthread.php?t=2475914 to unlock bootloader
Code:
C:\ADB3>[B][COLOR="Blue"]adb devices[/COLOR][/B]
List of devices attached
HT34xxxxxxxx recovery [I]<- you need to be in custom recovery to
ensure [B]root[/B] privileges
i.e. an adb shell with [B]#[/B] as opposed to [B]$[/B][/I]
C:\ADB3>[B][COLOR="Blue"]adb shell[/COLOR][/B]
[SIZE="1"][I][U]Note[/U]
CWM shell prompt usually looks like [B]~#[/B]
TWRP shell prompt usually looks like [B]~ # ←[6n[/B]
it doesn't matter, you just type (or even better copy/paste) the commands in bold blue
[/I][/SIZE]
[I][SIZE="1"]Setting UNLOCKED[/SIZE][/I]
~ # [B][COLOR="Blue"]echo -ne "HTCU" | dd of=/dev/block/mmcblk0p3 bs=1 seek=33796[/COLOR][/B]
echo -ne "HTCU" | dd of=/dev/block/mmcblk0p3 bs=1 seek=33796
4+0 records in
4+0 records out
4 bytes (4B) copied, 0.007691 seconds, 520B/s
~ # [B][COLOR="Blue"]exit[/COLOR][/B]
exit
C:\ADB3>[B][COLOR="Blue"]adb reboot bootloader[/COLOR][/B]
^^ if this doesn't work in your particular version, just select reboot to bootloader in TWRP.
ps: your version-main will now say 1.26.401.33 (reflecting the recovery version 2.6.3.3); it didn't actually change, but version-main always shows the last thing flashed in ruu mode.
.

nkk71 said:
You can't "fastboot flash recovery <name of recovery>.img" with a locked bootloader, but you can use masked firmware package.
This is my solution to that problem:
Since you are S-Off, use a custom recovery masked in a firwmare package: you can use of these "firmware" packages (m7_u/ul only):
http://www.androidfilehost.com/?w=files&flid=13085
in bootloader/FASTBOOT USB:
fastboot oem rebootRUU
fastboot flash zip fw_m7ul_TWRP_2.6.3.3_1.26.401.33.zip
fastboot reboot-bootloader
-> enter RECOVERY (should be TWRP or CWM now)
and use @scotty1223's commands in custom recovery http://forum.xda-developers.com/showthread.php?t=2475914 to unlock bootloader
Code:
C:\ADB3>[B][COLOR="Blue"]adb devices[/COLOR][/B]
List of devices attached
HT34xxxxxxxx recovery [I]<- you need to be in custom recovery to
ensure [B]root[/B] privileges
i.e. an adb shell with [B]#[/B] as opposed to [B]$[/B][/I]
C:\ADB3>[B][COLOR="Blue"]adb shell[/COLOR][/B]
[SIZE="1"][I][U]Note[/U]
CWM shell prompt usually looks like [B]~#[/B]
TWRP shell prompt usually looks like [B]~ # ←[6n[/B]
it doesn't matter, you just type (or even better copy/paste) the commands in bold blue
[/I][/SIZE]
[I][SIZE="1"]Setting UNLOCKED[/SIZE][/I]
~ # [B][COLOR="Blue"]echo -ne "HTCU" | dd of=/dev/block/mmcblk0p3 bs=1 seek=33796[/COLOR][/B]
echo -ne "HTCU" | dd of=/dev/block/mmcblk0p3 bs=1 seek=33796
4+0 records in
4+0 records out
4 bytes (4B) copied, 0.007691 seconds, 520B/s
~ # [B][COLOR="Blue"]exit[/COLOR][/B]
exit
C:\ADB3>[B][COLOR="Blue"]adb reboot bootloader[/COLOR][/B]
^^ if this doesn't work in your particular version, just select reboot to bootloader in TWRP.
ps: your version-main will now say 1.26.401.33 (reflecting the recovery version 2.6.3.3); it didn't actually change, but version-main always shows the last thing flashed in ruu mode.
.
Click to expand...
Click to collapse
about the version-main issue ..
it's not reflecting recovery version but actulally it's because u flashed it in masked firmware which contains 1.26.401.33 as main version in android-info.txt
so u can simply edit it to ur main version if u care about it or use masked firmware from ur latest firmware which contains this line by default

mido.fayad said:
about the version-main issue ..
it's not reflecting recovery version but actulally it's because u flashed it in masked firmware which contains 1.26.401.33 as main version in android-info.txt
Click to expand...
Click to collapse
Sorry, I should have been more clear, that was my standard copy/paste for that situation (relocked with S-off), and the version-main in my packages do reflect to some extent the recovery version:
Code:
fw_m7ul_CWM_6.0.4.5_1.60.401.45.zip
|| ||
vv vv
6.0.4.5
fw_m7ul_TWRP_2.6.3.4_1.26.401.34.zip
|| ||
vv vv
2.6.3.4
and yes, you can edit the android-info.txt to your current version, but I'm not going to encourage new users to start messing with firmware packages.

Related

How to flash RA's recovery image to MyHero?

Hello
I searched for this and couldn't find working instructions for recovering RA's recovery image (Or CM's) to MyHero v1.1.3.
I'm on an HTC branded 32A.
Thanks
boot in fastboot (power on and back)
Fastboot boot recovery-RAv1.2.1H.img (i type fastboot boot then drag and drop recovery file)
Make sure it boots up if it does then enter fastboot again
fastboot flash recovery recovery-RAv1.2.1H.img
Failing that use this
Thanks for your reply. It didnt work though
it says:
FAILED (remote: signature verify fail)
In RA's thread, i followed the instructions but on the second command it says:
rm: cannot remove /system/recovery.img : Nos such file or directory.
I think that the recovery image is somewhere else?
And in RA's thread it says that I must have an SPL that allows me to flash recovery images.
I have SPL 1.33.0009
If that doesnt allow me to flash recovery, what shall I do to update SPL?? Although I dont want to, i've seen a lot of ppl brick their phones for updating the SPL
Thanks
adb remount
adb push recovery.img /sdcard
adb shell
#flash_image recovery /sdcard/recovery.img
kchau said:
adb remount
adb push recovery.img /sdcard
adb shell
#flash_image recovery /sdcard/recovery.img
Click to expand...
Click to collapse
Thanks so much kchau, works perfectly!!

[Q] Custom recoveries don't work

For some reason, none of the custom recoveries I install to my phone are working. I am rooted and running a custom Froyo ROM. What happens is that once I am in recovery and I select any option, when I get down to the actual setting that let me does anything (the actionable menu items), then the phone reboots and loads normally. I therefore cannot load any ROMs and/or change my Radio and/or SPL. My phone has the following info:
hboot - 1.76.0009
cpld - 12
radio - 6.35.08.29
What could be the issue? Please help. I've spent days trying to get this to work
It seems that your recovery partition is corrupted.
Try to flash the stock ruu to reset the phone, and then start the root process all over again.
Thanks. I'm having issues creating the goldcard, but that was my very intention. Is there no other way to repair the recovery partition? What could cause it to do that?
I'm also having issues getting my phone to sync with HTC Sync. The damn thing just won't
Hmm... you can maybe fix by flashing misc partition first.. then recovery..
How do I do that?
Run these commands:
Code:
fastboot getvar version-main
fastboot getvar cid
Then i will upload a misc.img special for you..
mumilover said:
Run these commands:
Code:
fastboot getvar version-main
fastboot getvar cid
Then i will upload a misc.img special for you..
Click to expand...
Click to collapse
Thank you so much. I still am not able to even do this though I tried this in Fastboot with USB attached but it says not found. I can't get into ADB SHELL because if I do ADB DEVICES, then nothing comes up. It only works when I am in Windows and connect the phone via USB. I'm starting to think there's no way out of this
Oh wait, I got it to work
fastboot getvar version-main returns version-main: 3.05.421.3
fastboot getvar cid returns HTC__016D`☻└
It looks like a smiley face with the letter 'L' but the 'L' is up and to the right of the smiley face (almost like it's exponential).
Sorry for the delay... just finished defending my bachelor... been very busy!
Here you go... one special made misc.img
https://rapidshare.com/files/3128536171/miscMod.img
Flash it using flash_image, e.g.
Code:
adb shell
su
flash_image misc /sdcard/miscMod.img
flash_image recovery /sdcard/rec.img
reboot recovery
NB: i made a special thing for you..now your system version i 1.00.401.5... you can flash any sappimg you want... just in case :0)
mumilover said:
Sorry for the delay... just finished defending my bachelor... been very busy!
Here you go... one special made misc.img
https://rapidshare.com/files/3128536171/miscMod.img
Flash it using flash_image, e.g.
Code:
adb shell
su
flash_image misc /sdcard/miscMod.img
flash_image recovery /sdcard/rec.img
reboot recovery
NB: i made a special thing for you..now your system version i 1.00.401.5... you can flash any sappimg you want... just in case :0)
Click to expand...
Click to collapse
Thank you very much. I really appreciate it

Error on Android 5.0.2 OTA Update

Well i'm trying to update my Nexus 7 2012 to Android 5.0.2, after receiving the OTA update but keep getting an error.
I rooted my Nexus 7, and been thinking that's the problem, since it restarts to install the OTA update but goes to Recovery mode, and when i try to manually install the file get the following error :
https://www.dropbox.com/s/dqjc2ztzfbkvnuy/IMAG0897.jpg?dl=0
Any tips or solution for the problem?
Thanks in advance
Go here and flash the full image: https://developers.google.com/android/nexus/images
Skeetch79 said:
Go here and flash the full image: https://developers.google.com/android/nexus/images
Click to expand...
Click to collapse
Didn't want to do that, because means i'm going to loose everything
lmcmil said:
Didn't want to do that, because means i'm going to loose everything
Click to expand...
Click to collapse
Thought you would say that! .
You can always:
- download the image for your device from the google nexus website I gave you
- unzip the tgz file
- Find the resulting tar file and unzip it
- you will now have a folder
- inside the folder will be a bootloader-grouper-4.23.img file, image-nakasi-lrx22g.zip file, flash-all.bat file and two .sh files
- unzip the zip file to the same directory as the bootloader-grouper-4.23.img file
- reboot your nexus into bootloader mode
- plug the nexus into your PC
- open a command prompt in the same directory as the image, sh and bat files (on windows 7 hold the shift key and right click on an empty space within the folder and choose open command window here)
- in the command window type fastboot devices, make sure device is recognized
- if not, set up your pc for adb and fastboot, if so, continue
- type in the command prompt:
fastboot erase boot <hit enter>
fastboot erase cache <hit enter>
fastboot erase recovery <hit enter>
fastboot erase system <hit enter>
fastboot flash bootloader bootloader-grouper-4.23.img <hit enter>
fastboot reboot-bootloader <hit enter>
fastboot flash boot boot.img <hit enter>
fastboot flash recovery recovery.img <hit enter>
fastboot flash system system.img <hit enter>
fastboot reboot <hit enter>
This will preserve your app and data settings.
If you had custom recovery installed just reboot into fastboot and flash the recovery of your choice. example: fastboot flash recovery ,recovery image name>
If you want to reroot, download a superuser zip file to your device, reboot back into your custom recovery and then install the SuperUser zip of your choice (i.e. chainfire's SuperSu)
Hopefully this is straightforward and self explanatory
Thanks for the tip and explanation Skeetch79, will try to do like you wrote.
lmcmil said:
Thanks for the tip and explanation Skeetch79, will try to do like you wrote.
Click to expand...
Click to collapse
Np. Keep me posted
Sent from my XT1096 using Tapatalk
Skeetch79 said:
Thought you would say that! .
You can always:
- download the image for your device from the google nexus website I gave you
- unzip the tgz file
- Find the resulting tar file and unzip it
- you will now have a folder
- inside the folder will be a bootloader-grouper-4.23.img file, image-nakasi-lrx22g.zip file, flash-all.bat file and two .sh files
- unzip the zip file to the same directory as the bootloader-grouper-4.23.img file
- reboot your nexus into bootloader mode
- plug the nexus into your PC
- open a command prompt in the same directory as the image, sh and bat files (on windows 7 hold the shift key and right click on an empty space within the folder and choose open command window here)
- in the command window type fastboot devices, make sure device is recognized
- if not, set up your pc for adb and fastboot, if so, continue
- type in the command prompt:
fastboot erase boot <hit enter>
fastboot erase cache <hit enter>
fastboot erase recovery <hit enter>
fastboot erase system <hit enter>
fastboot flash bootloader bootloader-grouper-4.23.img <hit enter>
fastboot reboot-bootloader <hit enter>
fastboot flash boot boot.img <hit enter>
fastboot flash recovery recovery.img <hit enter>
fastboot flash system system.img <hit enter>
fastboot reboot <hit enter>
This will preserve your app and data settings.
If you had custom recovery installed just reboot into fastboot and flash the recovery of your choice. example: fastboot flash recovery ,recovery image name>
If you want to reroot, download a superuser zip file to your device, reboot back into your custom recovery and then install the SuperUser zip of your choice (i.e. chainfire's SuperSu)
Hopefully this is straightforward and self explanatory
Click to expand...
Click to collapse
This method works great! I was in the same boat. I analyzed the updater script and then analyzed the ro.build.fingerprint from my system, and it doesn't contain the weird one that it errors out on. I debated just removing the build prop check and repackaging it as an update, but decided against it.
@lmcmil - per chance, did you flash a different kernel and/or switch to F2FS before this happened? If so, that might correlate to mine, since I did do that....
Either way, I'm gonna run stock again for a while and see how it feels.
EDIT:
I think these lines:
Code:
mount("ext4", "EMMC", "/dev/block/platform/sdhci-tegra.3/by-name/APP", "/system", "max_batch_time=0,commit=1,data=ordered,barrier=1,errors=panic,nodelalloc");
getprop("ro.build.fingerprint") == "google/nakasi/grouper:5.0/LRX21P/1570855:user/release-keys" ||
getprop("ro.build.fingerprint") == "google/nakasi/grouper:5.0.2/LRX22G/1649326:user/release-keys" ||
abort("Package expects build fingerprint of google/nakasi/grouper:5.0/LRX21P/1570855:user/release-keys or google/nakasi/grouper:5.0.2/LRX22G/1649326:user/release-keys; this device has " + getprop("ro.build.fingerprint") + ".");
are what causes it to explode. First, it tries to mount ext4 instead of F2FS, which makes sense, but would cause the system partition to be unreadable if you converted it to F2FS. That COULD explain the odd "deestroy" build prop it thinks it got when it pulled ro.build.fingerprint, since when my system was fully booted mine matched the stock LRX21P using getprop from adb.
toastido i tryied to load the OTA using the Nexus Root Toolkit and the error i got was regarding missing calculator, wich i removed after installing "Calculator ++" app
Still haven't had time to try this method, i'm working this weekend so only next week i can give it a try and post the result.
Skeetch79 said:
Thought you would say that! .
You can always:
- download the image for your device from the google nexus website I gave you
- unzip the tgz file
- Find the resulting tar file and unzip it
- you will now have a folder
- inside the folder will be a bootloader-grouper-4.23.img file, image-nakasi-lrx22g.zip file, flash-all.bat file and two .sh files
- unzip the zip file to the same directory as the bootloader-grouper-4.23.img file
- reboot your nexus into bootloader mode
- plug the nexus into your PC
- open a command prompt in the same directory as the image, sh and bat files (on windows 7 hold the shift key and right click on an empty space within the folder and choose open command window here)
- in the command window type fastboot devices, make sure device is recognized
- if not, set up your pc for adb and fastboot, if so, continue
- type in the command prompt:
fastboot erase boot <hit enter>
fastboot erase cache <hit enter>
fastboot erase recovery <hit enter>
fastboot erase system <hit enter>
fastboot flash bootloader bootloader-grouper-4.23.img <hit enter>
fastboot reboot-bootloader <hit enter>
fastboot flash boot boot.img <hit enter>
fastboot flash recovery recovery.img <hit enter>
fastboot flash system system.img <hit enter>
fastboot reboot <hit enter>
This will preserve your app and data settings.
If you had custom recovery installed just reboot into fastboot and flash the recovery of your choice. example: fastboot flash recovery ,recovery image name>
If you want to reroot, download a superuser zip file to your device, reboot back into your custom recovery and then install the SuperUser zip of your choice (i.e. chainfire's SuperSu)
Hopefully this is straightforward and self explanatory
Click to expand...
Click to collapse
Good Man !!!
Thanks Very Much for that one,
I got stuck on the boot after performing the advised but a quick Cache Wipe sorted that out.
Once again Much Obliged !!!
Yeah forgot to mention the above. if you are stuck in a boot loop: shut down. reboot to recovery. wipe cache and dalvic. Reboot. Profit.
Sent from my XT1096 using Tapatalk
Skeetch79 said:
Thought you would say that! .
You can always:
- download the image for your device from the google nexus website I gave you
- unzip the tgz file
- Find the resulting tar file and unzip it
- you will now have a folder
- inside the folder will be a bootloader-grouper-4.23.img file, image-nakasi-lrx22g.zip file, flash-all.bat file and two .sh files
- unzip the zip file to the same directory as the bootloader-grouper-4.23.img file
- reboot your nexus into bootloader mode
- plug the nexus into your PC
- open a command prompt in the same directory as the image, sh and bat files (on windows 7 hold the shift key and right click on an empty space within the folder and choose open command window here)
- in the command window type fastboot devices, make sure device is recognized
- if not, set up your pc for adb and fastboot, if so, continue
- type in the command prompt:
fastboot erase boot <hit enter>
fastboot erase cache <hit enter>
fastboot erase recovery <hit enter>
fastboot erase system <hit enter>
fastboot flash bootloader bootloader-grouper-4.23.img <hit enter>
fastboot reboot-bootloader <hit enter>
fastboot flash boot boot.img <hit enter>
fastboot flash recovery recovery.img <hit enter>
fastboot flash system system.img <hit enter>
fastboot reboot <hit enter>
This will preserve your app and data settings.
If you had custom recovery installed just reboot into fastboot and flash the recovery of your choice. example: fastboot flash recovery ,recovery image name>
If you want to reroot, download a superuser zip file to your device, reboot back into your custom recovery and then install the SuperUser zip of your choice (i.e. chainfire's SuperSu)
Hopefully this is straightforward and self explanatory
Click to expand...
Click to collapse
Does this also work if I want to go back to Kitkat? I am asking, because I've tried the following:
Code:
@echo off
echo. listing devices:
fastboot devices
echo. To continue press Enter
pause
fastboot erase boot
fastboot erase cache
fastboot erase recovery
fastboot erase system
REM adopt the following line according to the bootloader image filename
fastboot flash bootloader bootloader-flo-flo-04.02.img
fastboot reboot-bootloader
fastboot flash boot boot.img
fastboot flash cache cache.img
fastboot flash recovery recovery.img
fastboot flash system system.img
fastboot reboot
And no matter, if I do a wipe cache afterwards or not, I end up in a boot-loop.
Do you know a way to keep apps and settings while going back to Kitkat?
nieroster
lmcmil said:
toastido i tryied to load the OTA using the Nexus Root Toolkit and the error i got was regarding missing calculator, wich i removed after installing "Calculator ++" app
Still haven't had time to try this method, i'm working this weekend so only next week i can give it a try and post the result.
Click to expand...
Click to collapse
lmcmil said:
Well i'm trying to update my Nexus 7 2012 to Android 5.0.2, after receiving the OTA update but keep getting an error.
I rooted my Nexus 7, and been thinking that's the problem, since it restarts to install the OTA update but goes to Recovery mode, and when i try to manually install the file get the following error :
https://www.dropbox.com/s/dqjc2ztzfbkvnuy/IMAG0897.jpg?dl=0
Any tips or solution for the problem?
Thanks in advance
Click to expand...
Click to collapse
TWRP is incompatible with 5.x OTA: it uses its own moronic default.prop instead of importing the device build.prop (or something like that) . It needs to be fixed.
You have to bother flashing the full image (minus the wiping eventually) and reinstall root & TWRP with every update, just like the rest of us
Got an Failed error at fastboot flash bootloader bootloader-grouper-4.23.img <hit enter>.
So now i don't have a valid bootloader and also can't enter recovery because it was erased at fastboot erase recovery <hit enter> step
And also typing fastboot devices my Nexus 7 isn't detected, what can i do now?
lmcmil said:
Got an Failed error at fastboot flash bootloader bootloader-grouper-4.23.img <hit enter>.
So now i don't have a valid bootloader and also can't enter recovery because it was erased at fastboot erase recovery <hit enter> step
And also typing fastboot devices my Nexus 7 isn't detected, what can i do now?
Click to expand...
Click to collapse
Well decided to use the Nexus Root Kit and flash the full image LRX22G, doing it now.
Will post how it went.
lmcmil said:
Got an Failed error at fastboot flash bootloader bootloader-grouper-4.23.img <hit enter>.
So now i don't have a valid bootloader and also can't enter recovery because it was erased at fastboot erase recovery <hit enter> step
And also typing fastboot devices my Nexus 7 isn't detected, what can i do now?
Click to expand...
Click to collapse
I had the 2012 Nexus 7 WiFi before I picked up the 2013 model. I had the same issue with that bootloader. Seems to be a common issue. Here are articles discussing the issue and fixes.
http://android.stackexchange.com/qu...t-flash-bootloader-failed-remote-invalidstate
https://code.google.com/p/android/issues/detail?id=62198&
http://forum.xda-developers.com/showthread.php?t=2573015
I remember flashing a modified bootloader to resolve the issue, since as you can see the bootloader packaged with the images is borked.
EDIT: try flashing the appropriate bootloader from this thread: http://forum.xda-developers.com/showthread.php?t=2417097
lmcmil said:
Well decided to use the Nexus Root Kit and flash the full image LRX22G, doing it now.
Will post how it went.
Click to expand...
Click to collapse
So my Nexus 7 is now running with 5.0.2, and did not loose any apps since i chose the "No wipe mode"
Going to root it again, and install latest TWRP Recovery
lmcmil said:
So my Nexus 7 is now running with 5.0.2, and did not loose any apps since i chose the "No wipe mode"
Going to root it again, and install latest TWRP Recovery
Click to expand...
Click to collapse
So i have now a Nexus 7 running 5.0.2, already rooted again and with TWRP 2.8.4.1.
Thanks a lot!
Skeetch79 said:
Thought you would say that! .
You can always:
- download the image for your device from the google nexus website I gave you
- unzip the tgz file
- ...
This will preserve your app and data settings.
If you had custom recovery installed just reboot into fastboot and flash the recovery of your choice. example: fastboot flash recovery ,recovery image name>
If you want to reroot, download a superuser zip file to your device, reboot back into your custom recovery and then install the SuperUser zip of your choice (i.e. chainfire's SuperSu)
Hopefully this is straightforward and self explanatory
Click to expand...
Click to collapse
Thanks for the great tutorial! Used it yesterday on my rooted Nexus 7 to upgrade to 5.0.2, worked like a breeze! :good:
Afterwards I used WugFresh's Nexus Root Toolkit to regain root.
Skeetch79 said:
Thought you would say that! .
You can always:
- download the image for your device from the google nexus website I gave you
- unzip the tgz file
- Find the resulting tar file and unzip it
- you will now have a folder
- inside the folder will be a bootloader-grouper-4.23.img file, image-nakasi-lrx22g.zip file, flash-all.bat file and two .sh files
- unzip the zip file to the same directory as the bootloader-grouper-4.23.img file
- reboot your nexus into bootloader mode
- plug the nexus into your PC
- open a command prompt in the same directory as the image, sh and bat files (on windows 7 hold the shift key and right click on an empty space within the folder and choose open command window here)
- in the command window type fastboot devices, make sure device is recognized
- if not, set up your pc for adb and fastboot, if so, continue
- type in the command prompt:
fastboot erase boot <hit enter>
fastboot erase cache <hit enter>
fastboot erase recovery <hit enter>
fastboot erase system <hit enter>
fastboot flash bootloader bootloader-grouper-4.23.img <hit enter>
fastboot reboot-bootloader <hit enter>
fastboot flash boot boot.img <hit enter>
fastboot flash recovery recovery.img <hit enter>
fastboot flash system system.img <hit enter>
fastboot reboot <hit enter>
This will preserve your app and data settings.
If you had custom recovery installed just reboot into fastboot and flash the recovery of your choice. example: fastboot flash recovery ,recovery image name>
If you want to reroot, download a superuser zip file to your device, reboot back into your custom recovery and then install the SuperUser zip of your choice (i.e. chainfire's SuperSu)
Hopefully this is straightforward and self explanatory
Click to expand...
Click to collapse
I followed this tutorial yesterday and everything went great I now have 5.0.2 working on my Nexus 7 2013, with no problems I can detect at the moment. Thank you, because I was just frustrated I saw the OTA notification without being able to do anything.
Cheers.
I try it too 5.0.2 ota update and nothing still on 4.4.4 I guess on Lollypops for me

Bootloader-Relock LG G4 (H815) No Wipe, No Backups, All Versions

Relock LG G4 Bootloader easily
First of all, I'm new here. So please tell me if I broke any rules or if I made any english mistakes.
Warning:
This guide will show you how to easily Re-Lock your Bootloader. Your Bootloader is then Locked! So, it's not really clever to lock the Bootloader when a Non-Stock-Rom is installed...
Requirements:
- LG G4 (H815) [This probably works with other LG's too]
- TWRP-Recovery installed or temporary booted using "fastboot boot"
- Stock-Android installed (Any Version)
- Flashable Bootloader/Boot Zip's for your Android-Version
For Android 6.0 you can get them here: https://forum.xda-developers.com/g4/development/stock-h815-20g-images-kdz-flashable-t3450503
How to Relock:
Step 1: Boot into TWRP
Step 2: Copy the Zip-Files to internal storage
Step 3: Go to Advanced/Terminal
Step 4: Perform this command:
Code:
dd if=/dev/zero of=/dev/block//bootdevice/by-name/misc
Your bootloader is Non-Functional now... Don't reboot until the next steps are completed!
Step 5: Flash both Zip-Files using TWRP
Step 6: Reboot
You now have a G4 with stock ROM and locked bootloader. If you wish to uninstall TWRP (Its no longer working) just Flash a Stock kdz-File using LGUP
Hope I was able to help someone...
Reserved
in dd command are 2x //, is the corect command ? or just one / ?
dd if=/dev/zero of=/dev/block//bootdevice/by-name/misc
to
dd if=/dev/zero of=/dev/block/bootdevice/by-name/misc
for me misc is /dev/block/mmcblk0p22
ghepardus said:
in dd command are 2x //, is the corect command ? or just one / ?
dd if=/dev/zero of=/dev/block//bootdevice/by-name/misc
to
dd if=/dev/zero of=/dev/block/bootdevice/by-name/misc
for me misc is /dev/block/mmcblk0p22
Click to expand...
Click to collapse
The command is correct... If you perform it, it will make the bootloader crash. If you flash a clean bootloader now ur device is locked again.
Mathias
MathiasR33 said:
Relock LG G4 Bootloader easily
I ...
Click to expand...
Click to collapse
... Thx for your thread even if it is known that the unlock state is handled by misc partition but it's good to have an own thread for it now. Latest TWRP beta can save the unlock state since a while.
Just wanted to add: if you made a misc backup before unlock you can just restore your backup. You can even flash a misc of an extracted kdz.
And another thing: if you zero out it like described you may loose your WiFi Mac and you can loose your imei. So before using this it's better to backup your current unlocked misc e.g. with the latest TWRP beta (select BL unlock state).
Backup before unlock is possible with SALT DLM backup ( https://tinyurl.com/dlbackup )
Sent from my LG-H815 using XDA Labs
MathiasR33 said:
Relock LG G4 Bootloader easily
First of all, I'm new here. So please tell me if I broke any rules or if I made any english mistakes.
Warning:
This guide will show you how to easily Re-Lock your Bootloader. Your Bootloader is then Locked! So, it's not really clever to lock the Bootloader when a Non-Stock-Rom is installed...
Requirements:
- LG G4 (H815) [This probably works with other LG's too]
- TWRP-Recovery installed or temporary booted using "fastboot boot"
- Stock-Android installed (Any Version)
- Flashable Bootloader/Boot Zip's for your Android-Version
For Android 6.0 you can get them here: https://forum.xda-developers.com/g4/development/stock-h815-20g-images-kdz-flashable-t3450503
How to Relock:
Step 1: Boot into TWRP
Step 2: Copy the Zip-Files to internal storage
Step 3: Go to Advanced/Terminal
Step 4: Perform this command:
Code:
dd if=/dev/zero of=/dev/block//bootdevice/by-name/misc
Your bootloader is Non-Functional now... Don't reboot until the next steps are completed!
Step 5: Flash both Zip-Files using TWRP
Step 6: Reboot
You now have a G4 with stock ROM and locked bootloader. If you wish to uninstall TWRP (Its no longer working) just Flash a Stock kdz-File using LGUP
Hope I was able to help someone...
Click to expand...
Click to collapse
you said temporary booted using "fastboot boot", which is the method with just fastboot? and second thing the command :
Code:
dd if=/dev/zero of=/dev/block//bootdevice/by-name/misc
need any substitution?
freno25 said:
you said temporary booted using "fastboot boot", which is the method with just fastboot? and second thing the command :
Code:
dd if=/dev/zero of=/dev/block//bootdevice/by-name/misc
need any substitution?
Click to expand...
Click to collapse
u can now re-lock your device with fastboot
important: you device must be FULLY STOCK BEFORE you lock it again! That means no TWRP, no custom ROM etc! otherwise you will brick the device
if you still want to use that method mentioned here:
Make a backup with SALT (basic mode is enough)
boot into fastboot:
Code:
[B]fastboot erase misc[/B]
is doing the same then the above mentioned way.
the misc partition contains also your IMEI, your MAC (wifi) and Bluetooth address. Those SHOULD be re-generated once you boot Android again but if not you will have the backup you created with SALT before.
.
steadfasterX said:
u can now re-lock your device with fastboot
important: you device must be FULLY STOCK BEFORE you lock it again! That means no TWRP, no custom ROM etc! otherwise you will brick the device
if you still want to use that method mentioned here:
Make a backup with SALT (basic mode is enough)
boot into fastboot:
Code:
[B]fastboot erase misc[/B]
is doing the same then the above mentioned way.
the misc partition contains also your IMEI, your MAC (wifi) and Bluetooth address. Those SHOULD be re-generated once you boot Android again but if not you will have the backup you created with SALT before.
.
Click to expand...
Click to collapse
wow perfect you was very clear, and OMG I didn't saw your projects man, you rock! another and last questions(after the cmd "fastboot erase misc" I should use the cmd mentioned in your first link? so "fastboot oem lock" (because i tried this cmd with fastboot and my phone is recognized I checked with "fastboot devices" but my try failed maybe I miss something? I unlocked bootloader 1 year ago now I want to relock it so I refurbished the stock kdz with lgup and try the cmd but the console said to me FAIL (unknown command remote) somethings like that)? otherwise What I should do? just flash bootloader and boot zips?
EDIT:
What I've done:
-Refurbished with LGUP last version of KDZ STOCK of my country
-Now I have my device STOCK but with bootloader to relock
-I downloaded your os
-I downloaded the zip bootloader and boot of my KDZ from this site
-I made a backup basic with your software SALT (just in case)
-I have just to erase misc part (don't reboot before I haven't done last flash for rebuild misc partition)
-But my last doubt is which cmd I have to do with SALT for reflash the two zip and if this zip containg the misc partition (because inside I did found misc bin or img)
freno25 said:
wow perfect you was very clear, and OMG I didn't saw your projects man, you rock! another and last questions(after the cmd "fastboot erase misc" I should use the cmd mentioned in your first link? so "fastboot oem lock" (because i tried this cmd with fastboot and my phone is recognized I checked with "fastboot devices" but my try failed maybe I miss something? I unlocked bootloader 1 year ago now I want to relock it so I refurbished the stock kdz with lgup and try the cmd but the console said to me FAIL (unknown command remote) somethings like that)? otherwise What I should do? just flash bootloader and boot zips?
EDIT:
What I've done:
-Refurbished with LGUP last version of KDZ STOCK of my country
-Now I have my device STOCK but with bootloader to relock
-I downloaded your os
-I downloaded the zip bootloader and boot of my KDZ from this site
-I made a backup basic with your software SALT (just in case)
-I have just to erase misc part (don't reboot before I haven't done last flash for rebuild misc partition)
-But my last doubt is which cmd I have to do with SALT for reflash the two zip and if this zip containg the misc partition (because inside I did found misc bin or img)
Click to expand...
Click to collapse
I meant that you can also go the new way which is less risky by flashing the nougat bootloader in my mentioned link. Then you don't need to erase anything.
So I can just flash the v29a bootloader over my v20g or I should flash the entire stock with lgup?
freno25 said:
So I can just flash the v29a bootloader over my v20g or I should flash the entire stock with lgup?
Click to expand...
Click to collapse
Flash the TOT available is the easiest way.
Sent from my LG-H815 using XDA Labs
Hello,
thanks for the tuto.
With this method, will the message on the top left corner "bootloader unlocked" no longer appear?
steadfasterX said:
Backup before unlock is possible with SALT DLM backup ( https://tinyurl.com/dlbackup )
Click to expand...
Click to collapse
how do I restore the backup created with salt? Unfortunately my IMEI & MAC won't restore >.<
Koile said:
how do I restore the backup created with salt? Unfortunately my IMEI & MAC won't restore >.<
Click to expand...
Click to collapse
manually with fastboot or in TWRP. Both require an unlocked device though.
SALT will allow restore in a future release in download mode too.
Sent from my LG-H815 using XDA Labs
steadfasterX said:
manually with fastboot or in TWRP. Both require an unlocked device though.
Click to expand...
Click to collapse
bootloader is unlocked again, but TWRP won't show the bin-files created and fastboot just returns:
Code:
> .\fastboot flash misc E:\salt_backup\misc.bin
target reported max download size of 536870912 bytes
sending 'misc' (16384 KB)...
OKAY [ 0.375s]
writing 'misc'...
FAILED (remote: cannot flash this partition in unlocked state)
finished. total time: 0.406s
Can I restore a stock image i backed up with with twrp and go from there or will I need to reflash a tot/kdz and reflash twrp first?
steadfasterX said:
u can now re-lock your device with fastboot
important: you device must be FULLY STOCK BEFORE you lock it again! That means no TWRP, no custom ROM etc! otherwise you will brick the device
if you still want to use that method mentioned here:
Make a backup with SALT (basic mode is enough)
boot into fastboot:
Code:
[B]fastboot erase misc[/B]
is doing the same then the above mentioned way.
the misc partition contains also your IMEI, your MAC (wifi) and Bluetooth address. Those SHOULD be re-generated once you boot Android again but if not you will have the backup you created with SALT before.
.
Click to expand...
Click to collapse
C:\Windows\system32>fastboot erase misc
erasing 'misc'...
FAILED (remote: cannot erase this partition in unlocked state)
finished. total time: 0.031s
Koile said:
bootloader is unlocked again, but TWRP won't show the bin-files created and fastboot just returns:
Code:
> .\fastboot flash misc E:\salt_backup\misc.bin
target reported max download size of 536870912 bytes
sending 'misc' (16384 KB)...
OKAY [ 0.375s]
writing 'misc'...
FAILED (remote: cannot flash this partition in unlocked state)
finished. total time: 0.406s
Click to expand...
Click to collapse
in twrp:
Code:
adb push misc.bin /tmp/
adb shell
dd if=/tmp/misc.bin of=/dev/block/bootdevice/by-name/misc
sync
Spaceboy60 said:
Can I restore a stock image i backed up with with twrp and go from there or will I need to reflash a tot/kdz and reflash twrp first?
Click to expand...
Click to collapse
really reflashing a kdz is your best option. everything must be stock (no twrp or other mods are in place) so flashing a kdz ensures you are good.
Spaceboy60 said:
C:\Windows\system32>fastboot erase misc
erasing 'misc'...
FAILED (remote: cannot erase this partition in unlocked state)
finished. total time: 0.031s
Click to expand...
Click to collapse
that happens when you are on v29a.
on v29a its just a fastboot cmd to lock again: https://forum.xda-developers.com/g4/general/managed-to-relock-bootloader-t3660282
keep in mind that your phone is better pure stock before doing this and it will 100% brick your phone when you have UsU'd your device.
.
steadfasterX said:
u can now re-lock your device with fastboot
important: you device must be FULLY STOCK BEFORE you lock it again! That means no TWRP, no custom ROM etc! otherwise you will brick the device
if you still want to use that method mentioned here:
Make a backup with SALT (basic mode is enough)
boot into fastboot:
Code:
[B]fastboot erase misc[/B]
is doing the same then the above mentioned way.
the misc partition contains also your IMEI, your MAC (wifi) and Bluetooth address. Those SHOULD be re-generated once you boot Android again but if not you will have the backup you created with SALT before.
.
Click to expand...
Click to collapse
steadfasterX said:
in twrp:
Code:
adb push misc.bin /tmp/
adb shell
dd if=/tmp/misc.bin of=/dev/block/bootdevice/by-name/misc
sync
really reflashing a kdz is your best option. everything must be stock (no twrp or other mods are in place) so flashing a kdz ensures you are good.
that happens when you are on v29a.
on v29a its just a fastboot cmd to lock again: https://forum.xda-developers.com/g4/general/managed-to-relock-bootloader-t3660282
keep in mind that your phone is better pure stock before doing this and it will 100% brick your phone when you have UsU'd your device.
.
Click to expand...
Click to collapse
I'm on marshmallow, not 29a
EDIT:reflashed back to stock, but command fastboot erase misc still comes up with an error about not being able to flash in an unlocked state.
MathiasR33 said:
Relock LG G4 Bootloader easily
First of all, I'm new here. So please tell me if I broke any rules or if I made any english mistakes.
Warning:
This guide will show you how to easily Re-Lock your Bootloader. Your Bootloader is then Locked! So, it's not really clever to lock the Bootloader when a Non-Stock-Rom is installed...
Requirements:
- LG G4 (H815) [This probably works with other LG's too]
- TWRP-Recovery installed or temporary booted using "fastboot boot"
- Stock-Android installed (Any Version)
- Flashable Bootloader/Boot Zip's for your Android-Version
For Android 6.0 you can get them here: https://forum.xda-developers.com/g4/development/stock-h815-20g-images-kdz-flashable-t3450503
How to Relock:
Step 1: Boot into TWRP
Step 2: Copy the Zip-Files to internal storage
Step 3: Go to Advanced/Terminal
Step 4: Perform this command:
Code:
dd if=/dev/zero of=/dev/block//bootdevice/by-name/misc
Your bootloader is Non-Functional now... Don't reboot until the next steps are completed!
Step 5: Flash both Zip-Files using TWRP
Step 6: Reboot
You now have a G4 with stock ROM and locked bootloader. If you wish to uninstall TWRP (Its no longer working) just Flash a Stock kdz-File using LGUP
Hope I was able to help someone...
Click to expand...
Click to collapse
Hello, dear MathiasR33
I am asking you with a very polite request for technical support. I upgraded after OTA Wi-Fi to the latest version of Android MarshMallow 6.0.
Please help me in the next steps.
The fastboot devices command does not work for me.
I post a screen showing the version of my Firmeware in the LGUP.
And Screen from the CMD console saying that the fastboot devices command does not work.
Please, help me, I am waiting for your answer.

[HELP] ADB "Waiting for device"

Hi,
I was on Resurection Rom 7.1.2, but decided to go back to stock today.
I am after wiping caches, data and system from my phone, so I can only access bootloader and twrp.
I have installed mini adb on Win10, and also Clockworm UniversalAdbDriver but none of them seems to work for me. My phone is not visible in devices manager or in adb commands. I can only see "Waiting for device" , adb devices returns nothing.
I am stuck without the phone
Any advice would be most welcome.
Thanks!
Do you have the Motorola usb drivers installed on your PC?
pablo102 said:
Hi,
I was on Resurection Rom 7.1.2, but decided to go back to stock today.
I am after wiping caches, data and system from my phone, so I can only access bootloader and twrp.
I have installed mini adb on Win10, and also Clockworm UniversalAdbDriver but none of them seems to work for me. My phone is not visible in devices manager or in adb commands. I can only see "Waiting for device" , adb devices returns nothing.
I am stuck without the phone
Any advice would be most welcome.
Thanks!
Click to expand...
Click to collapse
ADB isn't available in the bootloader, you have to use fastboot. Try running "fastboot devices"while connected to your PC and in bootloader mode.
Sent from my Moto G (5) Plus using Tapatalk
riggerman0421 said:
ADB isn't available in the bootloader, you have to use fastboot. Try running "fastboot devices"while connected to your PC and in bootloader mode.
Sent from my Moto G (5) Plus using Tapatalk
Click to expand...
Click to collapse
Tried that, but Moto is not seen by Windows. I had Motorola Device Manager but it did not help.
Actually, in Windows Device Manager, in hidden devices, I can see Mot Composite ADB Interface.
Can I use other's phone sd card and install from there? Do I need to mount it in twrp?
Make sure you only have one instance of ADB/Fastboot installed. If Motorola Device Manager installed the drivers correctly, [I had to use Motorola Mobile Drivers Installation 6.4.0 gui.] then tey
Code:
fastboot devices
Also be sure USB debugging is on in developers option on your phone.
I have found the problem in in cable/usb socket. It's fine for charging, but somehow the cable needs to be pushed more into the port for windows to see the device.
Enjoining Android again
Thanks for all support!
PS C:\> cd adb
PS C:\adb> fastboot devices
ZY224LGV2S fastboot
PS C:\adb> fastboot recovery twrp-3.3.1-0-potter
usage: fastboot [ <option> ] <command>
commands:
update <filename> reflash device from update.zip
flashall flash boot, system, vendor and if found,
recovery
flash <partition> [ <filename> ] write a file to a flash partition
flashing lock locks the device. Prevents flashing partitions
flashing unlock unlocks the device. Allows user to flash any partition except the ones that are related to bootloader
flashing lock_critical Prevents flashing bootloader related partitions
flashing unlock_critical Enables flashing bootloader related partitions
flashing get_unlock_ability Queries bootloader to see if the device is unlocked
erase <partition> erase a flash partition
format[:[<fs type>][:[<size>]] <partition> format a flash partition.
Can override the fs type and/or
size the bootloader reports.
getvar <variable> display a bootloader variable
boot <kernel> [ <ramdisk> ] download and boot kernel
flash:raw boot <kernel> [ <ramdisk> ] create bootimage and flash it
devices list all connected devices
continue continue with autoboot
reboot [bootloader] reboot device, optionally into bootloader
reboot-bootloader reboot device into bootloader
help show this help message
options:
-w erase userdata and cache (and format
if supported by partition type)
-u do not first erase partition before
formatting
-s <specific device> specify device serial number
or path to device port
-l with "devices", lists device paths
-p <product> specify product name
-c <cmdline> override kernel commandline
-i <vendor id> specify a custom USB vendor id
-b <base_addr> specify a custom kernel base address.
default: 0x10000000
-n <page size> specify the nand page size.
default: 2048
-S <size>[K|M|G] automatically sparse files greater
than size. 0 to disable
PS C:\adb>
what to do now
bambamishere said:
PS C:\> cd adb
PS C:\adb> fastboot devices
ZY224LGV2S fastboot
PS C:\adb> fastboot recovery twrp-3.3.1-0-potter
usage: fastboot [ <option> ] <command>
commands:
update <filename> reflash device from update.zip
flashall flash boot, system, vendor and if found,
recovery
flash <partition> [ <filename> ] write a file to a flash partition
flashing lock locks the device. Prevents flashing partitions
flashing unlock unlocks the device. Allows user to flash any partition except the ones that are related to bootloader
flashing lock_critical Prevents flashing bootloader related partitions
flashing unlock_critical Enables flashing bootloader related partitions
flashing get_unlock_ability Queries bootloader to see if the device is unlocked
erase <partition> erase a flash partition
format[:[<fs type>][:[<size>]] <partition> format a flash partition.
Can override the fs type and/or
size the bootloader reports.
getvar <variable> display a bootloader variable
boot <kernel> [ <ramdisk> ] download and boot kernel
flash:raw boot <kernel> [ <ramdisk> ] create bootimage and flash it
devices list all connected devices
continue continue with autoboot
reboot [bootloader] reboot device, optionally into bootloader
reboot-bootloader reboot device into bootloader
help show this help message
options:
-w erase userdata and cache (and format
if supported by partition type)
-u do not first erase partition before
formatting
-s <specific device> specify device serial number
or path to device port
-l with "devices", lists device paths
-p <product> specify product name
-c <cmdline> override kernel commandline
-i <vendor id> specify a custom USB vendor id
-b <base_addr> specify a custom kernel base address.
default: 0x10000000
-n <page size> specify the nand page size.
default: 2048
-S <size>[K|M|G] automatically sparse files greater
than size. 0 to disable
PS C:\adb>
what to do now
Click to expand...
Click to collapse
What are you trying to do would be my first question?
Wolfcity said:
What are you trying to do would be my first question?
Click to expand...
Click to collapse
Seems trying to flash the recovery, but using wrong the command. It must be fastboot flash recovery twrp.img
riyan65 said:
Seems trying to flash the recovery, but using wrong the command. It must be fastboot flash recovery twrp.img
Click to expand...
Click to collapse
Seems to me like all this happens in ADB mode which has to be (as you mentioned) in fastboot mode.
So @bambamishere:
Bring the device to fastboot (not ADB) mode, type
Code:
fastboot devices
(you should receive a serial number then)
Then type
Code:
fastboot flash recovery "name of recovery.img"
where "name of recovery.img" stands for the real name like twrp.img or however it's named.
Make sure that the image is in your ADB & fastboot folder on your PC.

Categories

Resources