Related
Hi Folks,
i am a noob and have just started picking up the tricks of the trade.i have an unbranded htc desire. Was using the HiAPk rom till now. Then thought of flashing the INsertcoin 1.1.2. Created EXT4 for the same and recopied all data to my sdcard. Now when i try to flash any rom it just gets caught at the boot screen. Hi dont have a recovery image. But i do have a nandroid backup. Restoring the backup is not helping as well. The phone is s-off,rooted with clockword recovery 2.5.0.7. i do have access to recovery but, whatever i do, the phone gets stuck at the boot screen. Please assist. I guess this occured when i accidentally selected/deselected hboot/fastboot option? can that be a potential cause?
Try and go into recovery then wiping Data/Cache, then go to advanced -> wipe dalvik cache and reboot. If it doesnt work, reflash the rom and do the above steps again and reboot. See if it works
EddieN said:
Try and go into recovery then wiping Data/Cache, then go to advanced -> wipe dalvik cache and reboot. If it doesnt work, reflash the rom and do the above steps again and reboot. See if it works
Click to expand...
Click to collapse
Tried doing the above steps but still caught at the boot screen whenever i reboot. Though the rom got installed but, on rebooting the same boot screen staring at me
What version recovery do you have? Try updating it, although remember that having a nandroid backup from an older recovery wont restore if you are on a newer recovery. So maybe it isn't a good idea to update your recovery if you only have a nandroid from an older recovery.
BEFORE READING ON: What partitions are you using? It could be that the new ROM you want to flash doesn't fit in the current partitions you have flashed. Stock? CM7r2? Oxygen?
----------------------------------------------------------------------------
Try with Fasboot Commander v1.51 (http://forum.xda-developers.com/showthread.php?t=1193915).
Here are steps I used last night when I was in the same situation as you:
1.Once you download Fastboot Commander, make sure you have the latest java downloaded on your PC (java.sun.com).
2.Once you've done that, open up Fastboot Commander on your PC, then boot your phone using Vol Down + Power and choose "FASTBOOT".
3.Then, connect your phone to your PC using a USB cable and go to the "misc" tab in Fastboot Commander and click "Check connection", and if it's successful, then choose "print device info" so you see everything is OKAY.
4.Paste the "Device Info" here too so we can see what's up!
5. On the same "misc" tab in Fastboot Commander, tick the boxes in the "Erase partitions": System, Cache, Boot
6. Click "Erase Chosen Partitions"
7. Choose "BOOTLOADER" on your phone display, and when it's done, disconnect the USB cable.
8. Flash the new ROM as usual, while doing a full wipe right after you flashed it (still in recovery): Dalvik/Data/Cache
9. Reboot when done and hopefully it will work.
If it doesn't work, I think it will be that you are trying to install a ROM which supports a different partition table than what you have flashed, which is causing the bootloops because of the lack of space on the partitions needed.
Good luck
EddieN said:
What version recovery do you have? Try updating it, although remember that having a nandroid backup from an older recovery wont restore if you are on a newer recovery. So maybe it isn't a good idea to update your recovery if you only have a nandroid from an older recovery.
BEFORE READING ON: What partitions are you using? It could be that the new ROM you want to flash doesn't fit in the current partitions you have flashed. Stock? CM7r2? Oxygen?
----------------------------------------------------------------------------
Try with Fasboot Commander v1.51 (http://forum.xda-developers.com/showthread.php?t=1193915).
Here are steps I used last night when I was in the same situation as you:
1.Once you download Fastboot Commander, make sure you have the latest java downloaded on your PC (java.sun.com).
2.Once you've done that, open up Fastboot Commander on your PC, then boot your phone using Vol Down + Power and choose "FASTBOOT".
3.Then, connect your phone to your PC using a USB cable and go to the "misc" tab in Fastboot Commander and click "Check connection", and if it's successful, then choose "print device info" so you see everything is OKAY.
4.Paste the "Device Info" here too so we can see what's up!
5. On the same "misc" tab in Fastboot Commander, tick the boxes in the "Erase partitions": System, Cache, Boot
6. Click "Erase Chosen Partitions"
7. Choose "BOOTLOADER" on your phone display, and when it's done, disconnect the USB cable.
8. Flash the new ROM as usual, while doing a full wipe right after you flashed it (still in recovery): Dalvik/Data/Cache
9. Reboot when done and hopefully it will work.
If it doesn't work, I think it will be that you are trying to install a ROM which supports a different partition table than what you have flashed, which is causing the bootloops because of the lack of space on the partitions needed.
Good luck
Click to expand...
Click to collapse
Hi, was using a HiApk ROM till now which needs no partitions at all. Also i agree that it might be the case that the new rom which i want to flash is not supporting the partitions(no reasons why HiAPK shouldnt run coz had been running it without partitions for the past 2months). Before going ahead ,do u think i should i re-format my sdcard to FAT32 and delete the partitions..Just in case this doesnt work out i go ahead with the fastboot commaHer. Whatever you suggest is what i am going to do. Thanks.
Getshivang89 said:
Hi, was using a HiApk ROM till now which needs no partitions at all. Also i agree that it might be the case that the new rom which i want to flash is not supporting the partitions(no reasons why HiAPK shouldnt run coz had been running it without partitions for the past 2months). Before going ahead ,do u think i should i re-format my sdcard to FAT32 and delete the partitions..Just in case this doesnt work out i go ahead with the fastboot commaHer. Whatever you suggest is what i am going to do. Thanks.
Click to expand...
Click to collapse
Also the new ROM that i was trying to flash requires a 1gb ext2/3/4. So i did a 1 gb Ext4 partition. This one is the stable insertcoin 1.1.2
Getshivang89 said:
Hi, was using a HiApk ROM till now which needs no partitions at all. Also i agree that it might be the case that the new rom which i want to flash is not supporting the partitions(no reasons why HiAPK shouldnt run coz had been running it without partitions for the past 2months). Before going ahead ,do u think i should i re-format my sdcard to FAT32 and delete the partitions..Just in case this doesnt work out i go ahead with the fastboot commaHer. Whatever you suggest is what i am going to do. Thanks.
Click to expand...
Click to collapse
EDIT: Forgot to mention that in order to use Fastboot Commander you'll need the ADB drivers. Just install HTC Sync to get the drivers for it!
Since you say in the beginning that you are S-Off and have Recovery 2.5.0.7, the only things I can think of that you haven't done are this:
1. Insertcoin 1.1.2 (http://forum.xda-developers.com/showthread.php?t=1016940&highlight=insertcoin) says you need to be S-off (which you are), and have the latest recovery (5.0.1.0). So my first piece of advice would be to update your recovery to 5.0.1.0 from what you have now (2.5.0.7) but remember what I said about nandroid backups and recovery earlier on!!
2. Make sure you have a 1GB Ext2, Ext 3 or Ext4 partition on your SD-card. The way to partition your SD-card is here: http://forum.xda-developers.com/showpost.php?p=7279872&postcount=3
Insertcoin says it should work on the stock HBOOT which I'm assuming you have since you said you've never flashed another partition table on your phone.
So basically, update your recovery (best done with Fastboot Commander imo) and make sure the md5 sums match up. Once you've updated your recovery, make sure your SD card is ready, then wipe everything in recovery and reflash the rom, and wipe everything in recovery again before rebooting.
Again, remember that since you made your nandroid backup in CWM 2.5.0.7, it wont be able to restore in CWM 5.0.1.0 so basically once you update your recovery your nandroid from 2.5.0.7 will be useless.
EddieN said:
EDIT: Forgot to mention that in order to use Fastboot Commander you'll need the ADB drivers. Just install HTC Sync to get the drivers for it!
Since you say in the beginning that you are S-Off and have Recovery 2.5.0.7, the only things I can think of that you haven't done are this:
1. Insertcoin 1.1.2 (http://forum.xda-developers.com/showthread.php?t=1016940&highlight=insertcoin) says you need to be S-off (which you are), and have the latest recovery (5.0.1.0). So my first piece of advice would be to update your recovery to 5.0.1.0 from what you have now (2.5.0.7) but remember what I said about nandroid backups and recovery earlier on!!
2. Make sure you have a 1GB Ext2, Ext 3 or Ext4 partition on your SD-card. The way to partition your SD-card is here: http://forum.xda-developers.com/showpost.php?p=7279872&postcount=3
Insertcoin says it should work on the stock HBOOT which I'm assuming you have since you said you've never flashed another partition table on your phone.
So basically, update your recovery (best done with Fastboot Commander imo) and make sure the md5 sums match up. Once you've updated your recovery, make sure your SD card is ready, then wipe everything in recovery and reflash the rom, and wipe everything in recovery again before rebooting.
Again, remember that since you made your nandroid backup in CWM 2.5.0.7, it wont be able to restore in CWM 5.0.1.0 so basically once you update your recovery your nandroid from 2.5.0.7 will be useless.
Click to expand...
Click to collapse
Logs as asked:
Feedback, criticism, ideas, improvments, thanks and appreciations are welcomed on the forum-thread.
............................................................
Operating system: Windows.
Tools folder found.
Windows fastboot tools found.
The folder containing the IMG files was not found.
No Nandroid folder was not found - "Restore" button disabled.
STARTING PRINT OF DEVICE INFO.
-----------------------------------.
-----------------------------------.
PRINT OF DEVICE INFO FAILURE - PLEASE CHECK YOUR CONNECTION.
-----------------------------------.
STARTING PRINT OF DEVICE INFO.
-----------------------------------.
SPL/hboot version: 6.93.1002.
Radio version: 5.11.05.27.
Main software version: 2.29.405.5.
cid: htc__001.
cpld: none.
product: bravo.
mid: pb9920000.
security: off.
build-mode: ship.
-----------------------------------.
Print of device info SUCCESSFUL.
-----------------------------------.
STARTING ERASE OF PARTITION(S).
Erasing partition "boot" - PLEASE WAIT.
boot erased SUCCESSFULLY.
Erasing partition "system" - PLEASE WAIT.
system erased SUCCESSFULLY.
Erasing partition "cache" - PLEASE WAIT.
cache erased SUCCESSFULLY.
FINISHED ERASING PARTITION(S).
Getshivang89 said:
Logs as asked:
Feedback, criticism, ideas, improvments, thanks and appreciations are welcomed on the forum-thread.
............................................................
Operating system: Windows.
Tools folder found.
Windows fastboot tools found.
The folder containing the IMG files was not found.
No Nandroid folder was not found - "Restore" button disabled.
STARTING PRINT OF DEVICE INFO.
-----------------------------------.
-----------------------------------.
PRINT OF DEVICE INFO FAILURE - PLEASE CHECK YOUR CONNECTION.
-----------------------------------.
STARTING PRINT OF DEVICE INFO.
-----------------------------------.
SPL/hboot version: 6.93.1002.
Radio version: 5.11.05.27.
Main software version: 2.29.405.5.
cid: htc__001.
cpld: none.
product: bravo.
mid: pb9920000.
security: off.
build-mode: ship.
-----------------------------------.
Print of device info SUCCESSFUL.
-----------------------------------.
STARTING ERASE OF PARTITION(S).
Erasing partition "boot" - PLEASE WAIT.
boot erased SUCCESSFULLY.
Erasing partition "system" - PLEASE WAIT.
system erased SUCCESSFULLY.
Erasing partition "cache" - PLEASE WAIT.
cache erased SUCCESSFULLY.
FINISHED ERASING PARTITION(S).
Click to expand...
Click to collapse
Hey Eddie N,
Just one thing. Now just to get back to the ROM i was running till now, should i just flash HiAPK now after doing all those steps as u suggested? Once i get through with this i can go ahead to flash insertcoin. But , first priority now is to just run the phone out of the boot screen in HiAPK(as it requires no partitioning/no recovery issues).. Thanks for the invaluable help. I am gonna keep u posted
I'd do this now:
Nandroid back to your HiAPK, then get RomManager and in Rom Manager update your CWM from 2.5.0.7 to 5.0.1.0 (the EASIEST way). Do a nandroid backup right away through rom manager after installing the new recovery so you can always go back if something goes wrong!! Reboot to recovery and reflash insertcoin.
After doing that you should have what's needed to run insertcoin (S-Off, latest recovery, Stock hboot, 1gb ext2/3/4). Before you didn't have latest recovery and you changed SD-card but i assume you fixed your SD-card now
If nandroiding back doesn't work, reflash it from scratch. If THAT doesn't work I'm not quite sure how to help you further I'm new myself but managed to fix my bootloop last night with the method i gave you
EddieN said:
I'd do this now:
Nandroid back to your HiAPK, then get RomManager and in Rom Manager update your CWM from 2.5.0.7 to 5.0.1.0 (the EASIEST way). Do a nandroid backup right away through rom manager after installing the new recovery so you can always go back if something goes wrong!! Reboot to recovery and reflash insertcoin.
After doing that you should have what's needed to run insertcoin (S-Off, latest recovery, Stock hboot 130mb system, 1gb ext2/3/4). Before you didn't have latest recovery and you changed SD-card but i assume you fixed your SD-card now
Click to expand...
Click to collapse
You are the man!!!yes i changed my sd card now. MAybe my sd card has gone bad. No wonder i couldnt flash any rom..Now back to HiAPK. I am gonna setup my sdcard again using gparted. Dont rely think the partitioning tool i was using till now was wrking(perhaps damaged my sd card) Thanx a lot mate
Just checked.. The phone was loading up even without the sd card(the one suspected of having gone kaput). But, now when restart the phone with that sd card it gets stuck at the boot screen. Any reason why this can be happening?
Seriously.. there should be sticky saying that stuck at htc screen, or bootloop is not a brick.
Hello I'm new to the nexus line and recently upgraded form a SGS. my phone is Rooted, unlocked boot loader and running the most recent version of CWM 5.5.0.4. I'm running the GSM version of the Nexus.
My question is how do I flash the my first rom? When I boot into recovery and click install zip from SDcard i get "E: Can't mount /sdcard/" I am also unable to mound the data partition within. windows drivers are installed for both fastboot and adb so I can flash that way, i'm just wondering what the exact steps are and if that error mounting data is normal.
I also downloaded the most recent franco.Kernel as I want to run that, I know how to flash that with fastboot but wasnt' sure if that is how you would flash a rom with the nexus, on the SGS i used to use odin.
Thanks and sorry for the noobness.
How did you "unlock fastboot" and "root" and "install CWM"? Did you use one of the "Tool Kits"?
Do you have ROM Manager installed on your device?
yiannisthegreek said:
How did you "unlock fastboot" and "root" and "install CWM"? Did you use one of the "Tool Kits"?
Do you have ROM Manager installed on your device?
Click to expand...
Click to collapse
Sorry, Yes I have ROM Manager installed and its' paid for.
I unlocked my boot loader using fastboot oem unlock, I rooted by using an app because I couldn't mount the data partition in recovery so had to use some app some guy made that downloaded the su.zip from clockwork and flashed on it's own.
I installed CWM using fastboot.
fastboot flash recovery recovery.img
it's the dam data partition that i'm really having trouble with, i'm just wondering if this is normal, all the posts on the web say to flash a zip by choosing "choose zip from scard" but mine wont mount???
I should also mention that my entire device is encrypted.....that is whats causing it isn't it?
I'm not 100% sure but it could be that you flashed the wrong recovery.
According to this thread
http://forum.xda-developers.com/showthread.php?t=1357642
the recovery for the GSM version is 5.5.0.2 and not 0.4.
I would flash the correct recovery then try again.
You can not mount sdcard from CWM recovery (don't ask me why, I don't know.. maybe because it is not supported yet ..)
anyway, do like me, use CWM 5.5.0.2 and then try again toflash zip files .. It works for me
P4p3r1n0 said:
You can not mount sdcard from CWM recovery (don't ask me why, I don't know.. maybe because it is not supported yet ..)
anyway, do like me, use CWM 5.5.0.2 and then try again toflash zip files .. It works for me
Click to expand...
Click to collapse
He posted it on his Google+ account here:
https://plus.google.com/112476065271141473049/posts
I'm starting to think it's my encrypted phone, technically when I boot I have to decrypt the device before it boots into android.
I'm going to factory reset and see if that helps. I have a feeling that is what my problem is
OK so that was the problem, the data partition was encrypted (now that I think of this it makes sense that it wouldn't mount) anyways, for whatever reason a factory reset from android wouldn't work. I removed the "recovery-from-boot.p" file from my system folder originally so the CWM image would remain in tact.
anyways, I flashed the original recovery over the CWM recovery, preformed a factory wipe (which is the only way to decrypt your phone) then flashed CWM back on and now I can mount the data partition
what a pain in the ass, guess I wont be encrypting the phone any time soon, I wish there was an option to decrypt the drive and then get into recovery....wouldn't have this issue.
spectre85 said:
OK so that was the problem, the data partition was encrypted (now that I think of this it makes sense that it wouldn't mount) anyways, for whatever reason a factory reset from android wouldn't work. I removed the "recovery-from-boot.p" file from my system folder originally so the CWM image would remain in tact.
anyways, I flashed the original recovery over the CWM recovery, preformed a factory wipe (which is the only way to decrypt your phone) then flashed CWM back on and now I can mount the data partition
what a pain in the ass, guess I wont be encrypting the phone any time soon, I wish there was an option to decrypt the drive and then get into recovery....wouldn't have this issue.
Click to expand...
Click to collapse
It is possible now on 4.1.2 to decrypt the device. You must provide a password for dectypting (chane from unlock pin to passw).
Hi guys,
Long time reader, and great help to be found I hope!
I just bought a Z1C, followed successfully the full DRM backup, full root process and bootloader unlocked, from the guide posted : http://forum.xda-developers.com/showthread.php?t=2642081
I took a full backup of DRM keys and Nandroid.
I then went to load the Resurrection Remix ROM. I booted in to PhilZ recovery and did a full wipe and factory reset - "Ready for ROM". This completed successfully.
I then realized I forgot to copy the Resurrection ROM files onto my external SD and cancelled/exit out of PhilZ Recovery.
Now when I power up, all I get is SONY logo. I assume this is because the phone has no operating system due to the ROM being wiped and nothing being installed in it's place.
I can confirm I can get into Fastboot mode (Blue LED, but connecting USB and holding UP volume button) but nothing else!!!
If anyone has any ideas, I would really really appreciate it!
thanks in advance!
... ok, so I found a quick fix, sorry for the alarm. I just used ADB to flashboot a version of CWM6 and made it boot into recovery, copied the Resurrection ROM onto my external SD with a card-reader (seperate) then installed the ROM ... hooray! Now I can sleep.
Thanks to anyone who started reading...
For future reference, just using fastboot to install a boot partition with a recovery on it is sufficient to fix these kinds of issues.
fastboot boot path/to/boot.img
or
fastboot flash boot path/to/boot.img
And for the record, with most recoveries you can mount your SDcard on your computer via USB, in CWM it is available in the mounts menu as "Mount USB storage"
Rekoil said:
For future reference, just using fastboot to install a boot partition with a recovery on it is sufficient to fix these kinds of issues.
fastboot boot path/to/boot.img
or
fastboot flash boot path/to/boot.img
And for the record, with most recoveries you can mount your SDcard on your computer via USB, in CWM it is available in the mounts menu as "Mount USB storage"
Click to expand...
Click to collapse
Thanks for the tips. I'm a bit new to this thing ... I assume your commands above will create a separate partition for booting, but how do I get to that recovery screen? ... and I assume boot.img is a recovery boot file? Renamed from CWM?
My issue above was I couldn't load up anything (Sony logo appears, and nothing else, couldn't proceed to recovery screen by pressing UP volume) ... I only could connect to my computer in flash mode for Flashtools to read, and had to start the whole "root my phone" process again.
I am playing around with the stock Sony UK ROM, but I am keen to flash Aura's AURom or maybe another one ... is there a way that I can basically create a "rollback point" so that if I don't like the new ROM I can re-instate what I am playing with now? I really don't want to have to go through the whole root process again if I semi-brick again! Just want to do an easy "undo" ...
Many thanks for putting up with the noob-ness.
boot.img is an image of the kernel. Note that this command is only for unlocked bootloader.
Seems you are using dualrecovery (which resides inside /system) and since you wiped /system you couldn't get into recovery anymore. If you have unlocked bootloader you should use a custom kernel. You can use the one of [NUT] (same functionality as dualrecovery) or the one from Doomlord.
I really don't want to have to go through the whole root process again
Click to expand...
Click to collapse
You do realize that the root process with unlocked bootloader is as followed:
1. Flash custom kernel
2. Go to recovery and flash SuperSU zip
zxz0O0 said:
You do realize that the root process with unlocked bootloader is as followed:
1. Flash custom kernel
2. Go to recovery and flash SuperSU zip
Click to expand...
Click to collapse
Exactly, and if you have saved your TA partition already, then you can always unlock the bootloader, root, and then relock bootloader by flashing your TA partition back.
Awesome, thanks guys for all the help. I will give the AURom a go and hopefully succeed this time.
One last question, what is contained in the TA backup, and what is in a Nandroid backup? From reading, TA is just a set of keys and Nandroid is a Rom backup?
TA backup is a backup of the Trim Area partition, inside of this partition there are DRM keys. Nandroid backup is a backup of various partitions (/system, /data/, etc.) but not TA partition.
zxz0O0 said:
TA backup is a backup of the Trim Area partition, inside of this partition there are DRM keys. Nandroid backup is a backup of various partitions (/system, /data/, etc.) but not TA partition.
Click to expand...
Click to collapse
Super thanks guys, much appreciated
So far I've followed the directions from Heisenberg's guide:
fastboot flash bootloader C:\bullhead\images\bootloader-bullhead-bullhead-xx.xx.img
fastboot reboot-bootloader
fastboot flash radio C:\bullhead\images\radio-bullhead-bullhead-xx.xx.img
fastboot reboot-bootloader
fastboot flash boot C:\bullhead\images\boot.img
fastboot erase cache
fastboot flash cache C:\bullhead\images\cache.img
fastboot flash recovery C:\bullhead\images\recovery.img
fastboot flash system C:\bullhead\images\system.img
fastboot flash vendor C:\bullhead\images\vendor.img
then I flashed TWRP 3.0.0.0. Do I need to do anything else to make sure my phone doesn't encrypt itself on first boot?
You have to change fstab.bullhead on the ramdisk to disable forced encryption. If you flashed the SuperSU beta 2.6x zip it should automatically change that for you.
I just decrypted mine by doing that, along with some other magic unrelated to your situation.
That said, if you are worried you should backup the userdata partition beforehand so you can restore it easily if anything goes wrong.
alvinhochun said:
You have to change fstab.bullhead on the ramdisk to disable forced encryption. If you flashed the SuperSU beta 2.6x zip it should automatically change that for you.
I just decrypted mine by doing that, along with some other magic unrelated to your situation.
That said, if you are worried you should backup the userdata partition beforehand so you can restore it easily if anything goes wrong.
Click to expand...
Click to collapse
So let's say I used MHC19J and I didn't happen to flash SuperSU, so that fstab.bullhead wasn't changed and my previously unencrypted data was then encrypted and now when I boot into TWRP 3.0.0.0 it asks for a password I don't have... is there nothing I can do to make TWRP able to access my data now?
I made a backup before applying any changes, of course. But that was a nandroid, which TWRP puts on my /sdcard, which just got encrypted, so TWRP can't access it?
What's my best approach in my current state? I wouldn't mind restoring from the nandroid, and re-upgrading to MHC19J (making sure I flash SuperSU that time), if I could only get to the nandroid.
----EDIT (1 hour later)----
Somewhat fixed by flashing back my old system, vendor, cache, radio, boot. Then in TWRP I was able to restore from my nandroid.
However, it now appears I'm encrypted? In Settings --> Security --> "Encryption" says "Encrypt phone" "Encrypted". I'm certain I unencrypted way back when I unlocked my bootloader and first rooted.
Tom____ said:
<snip>
----EDIT (1 hour later)----
Somewhat fixed by flashing back my old system, vendor, cache, radio, boot. Then in TWRP I was able to restore from my nandroid.
However, it now appears I'm encrypted? In Settings --> Security --> "Encryption" says "Encrypt phone" "Encrypted". I'm certain I unencrypted way back when I unlocked my bootloader and first rooted.
Click to expand...
Click to collapse
Do you remember formatting userdata after you unlocked? If not then you were encrypted by default.
bobby janow said:
Do you remember formatting userdata after you unlocked? If not then you were encrypted by default.
Click to expand...
Click to collapse
Back when I first unlocked my bootloader I did, per Heisenberg's step 3 (this was back with TWRP 2.8.7.0). This time no, I didn't (I wanted to keep my data). I suppose I'll have to if I want to re-unencrypt. But then to keep my data I'll have to get my nandroid off my phone and then put it back after the format, which I'm not eager to do.
For now I'll just see how encrypted will work as I wait for this whole MMB29V vs. MHC19J and TWRP 3.0.0.0 accessing an encrypted data partition situation to become more clear.
For those following along, if I understand correctly, the problem was booting into system before having SuperSu modify my boot image to disable forceencrypt.
Update: The latest TWRP is already capable of decrypting data. This method is now unnecessary and depreciated. Use factory reset in TWRP menu instead
Disclaimer: This mod will wipe your data. I am not responsible for data loss after using this mod.
I tested on my device several times, it's working for me so internal storage is always preserved, but I cannot guarantee if anything is messed up on your side. Please read the post carefully before using this mod!
Always backup your important data before modifying your phone's software!
To compensate the mistake I have done in the modified SuperSU script (I fixed it eventually though ), I decided to release a mod I consider quite useful for most people.
I've used the 10 for quite some time, and I've been messing with it from day 1.
Since the encryption is required for the phone to have proper radio signal (more info here), we are forced to keep our devices encrypted.
And because HTC uses proprietary encryption method, TWRP is unable to decrypt our data partition, which causes the recovery unable to read anything from data.
This is actually quite a big problem. If you want to full wipe and clean flash your favorite custom rom, the "Factory Reset" option in TWRP is not available, so you are forced to wipe the whole data partition, which will cause all your personal files stored in internal storage to be removed.
If you're a flashaholic like I am, you are forced not to store anything important in the phone storage because it will be wiped every time trying to clean flash a rom.
To breakthrough this inconvenience, I created this flashable zip to accomplish something similar to the "Factory Reset" option in TWRP.
Requirement: You have to use the systemless root of SuperSU to use this mod. If you want to flash the wipe script with SuperSU, flash SuperSU first, then flash the wipe script.
Important: If you have chosen "Require PIN/password/pattern to start device" in the "Secure startup" page during the initial setup, you CANNOT use this mod!
If you have to enter your PIN/password/pattern before your device booted up, this means that you have secure startup enabled. You CANNOT use this mod!
If secure startup is enabled and you flash this zip, your encryption will be messed up and you will have to format the whole data partition eventually to make your phone working again.
After flashing the mod, your data will not be wiped immediately in recovery because we cannot do so. It will wipe the data AFTER you rebooted back to system. It will reboot again after the wipe is done. If you flashed SuperSU at the same time with this mod, you will experience 2 consecutive reboot loops. This is normal behavior, don't panic.
If devs are interested in including this zip into your rom, you can use it in the same way as SuperSU:
Code:
package_extract_dir("wipe", "/tmp/wipe");
run_program("/sbin/busybox", "unzip", "/tmp/wipe/wipe.zip", "META-INF/com/google/android/*", "-d", "/tmp/wipe");
run_program("/sbin/busybox", "sh", "/tmp/wipe/META-INF/com/google/android/update-binary", "dummy", "1", "/tmp/wipe/wipe.zip");
For those who are interested in what this zip actually do, here is a brief explanation:
If secure startup is disabled, data will be decrypted as soon as the device booted up. We can only access data after it is decrypted. So our only choice is to wipe data after the device has booted up.
I created a script to wipe all data except SuperSU app, su binary image, and your internal storage.
SuperSU will automatically run scripts inside the directory /su/su.d, so after putting the script into the folder, SuperSU will the wipe script at boot time.
The problem is: su.img is also located in /data, how can we push files into the image? Fortunately, our master Chainfire has thought of this problem. The image /cache/su.img will be merged with /data/su.img during boot. So I just need to place the script into /cache/su.img, then Chainfire's script will do all the rest of the work automatically. If you're interested in the merging process, take a look at launch_daemonsu.sh in the ramdisk of a SuperSU modified boot for more details.
Is this helpful in regards to initial routing and flashing a rom or only afterwards to flash a new one?
topjohnwu said:
Disclaimer: This mod will wipe your data. I am not responsible for data loss after using this mod.
I tested on my device several times, it's working for me so internal storage is always preserved, but I cannot guarantee if anything is messed up on your side. Please read the post carefully before using this mod!
Always backup your important data before modifying your phone's software!
To compensate the mistake I have done in the modified SuperSU script (I fixed it eventually though ), I decided to release a mod I consider quite useful for most people.
I've used the 10 for quite some time, and I've been messing with it from day 1.
Since the encryption is required for the phone to have proper radio signal (more info here), we are forced to keep our devices encrypted.
And because HTC uses proprietary encryption method, TWRP is unable to decrypt our data partition, which causes the recovery unable to read anything from data.
This is actually quite a big problem. If you want to full wipe and clean flash your favorite custom rom, the "Factory Reset" option in TWRP is not available, so you are forced to wipe the whole data partition, which will cause all your personal files stored in internal storage to be removed.
If you're a flashaholic like I am, you are forced not to store anything important in the phone storage because it will be wiped every time trying to clean flash a rom.
To breakthrough this inconvenience, I created this flashable zip to accomplish something similar to the "Factory Reset" option in TWRP.
Requirement: You have to use the systemless root of SuperSU to use this mod. If you want to flash the wipe script with SuperSU, flash SuperSU first, then flash the wipe script.
Important: If you have chosen "Require PIN/password/pattern to start device" in the "Secure startup" page during the initial setup, you CANNOT use this mod!
If you have to enter your PIN/password/pattern before your device booted up, this means that you have secure startup enabled. You CANNOT use this mod!
If secure startup is enabled and you flash this zip, your encryption will be messed up and you will have to format the whole data partition eventually to make your phone working again.
After flashing the mod, your data will not be wiped immediately in recovery because we cannot do so. It will wipe the data AFTER you rebooted back to system. It will reboot again after the wipe is done. If you flashed SuperSU at the same time with this mod, you will experience 2 consecutive reboot loops. This is normal behavior, don't panic.
If devs are interested in including this zip into your rom, you can use it in the same way as SuperSU:
Code:
package_extract_dir("wipe", "/tmp/wipe");
run_program("/sbin/busybox", "unzip", "/tmp/wipe/wipe.zip", "META-INF/com/google/android/*", "-d", "/tmp/wipe");
run_program("/sbin/busybox", "sh", "/tmp/wipe/META-INF/com/google/android/update-binary", "dummy", "1", "/tmp/wipe/wipe.zip");
For those who are interested in what this zip actually do, here is a brief explanation:
If secure startup is disabled, data will be decrypted as soon as the device booted up. We can only access data after it is decrypted. So our only choice is to wipe data after the device has booted up.
I created a script to wipe all data except SuperSU app, su binary image, and your internal storage.
SuperSU will automatically run scripts inside the directory /su/su.d, so after putting the script into the folder, SuperSU will the wipe script at boot time.
The problem is: su.img is also located in /data, how can we push files into the image? Fortunately, our master Chainfire has thought of this problem. The image /cache/su.img will be merged with /data/su.img during boot. So I just need to place the script into /cache/su.img, then Chainfire's script will do all the rest of the work automatically. If you're interested in the merging process, take a look at launch_daemonsu.sh in the ramdisk of a SuperSU modified boot for more details.
Click to expand...
Click to collapse
Is the systemless one the one you patched?
Sent from my LG-H830 using XDA-Developers mobile app
stonew5082 said:
Is this helpful in regards to initial routing and flashing a rom or only afterwards to flash a new one?
Click to expand...
Click to collapse
It functions the same as "Factory Reset" in TWRP, which means it will wipe all data, but your personal files stored in internal storage will remain on the device.
StickyEyez said:
Is the systemless one the one you patched?
Sent from my LG-H830 using XDA-Developers mobile app
Click to expand...
Click to collapse
Actually you can use the original version. But I suggest you to use my patched one, in case you accidentally wiped your whole data partition (this mod will not do this), you will stay encrypted, and your data signal will be fine
Hi topjohnwu
@ jollywhitefoot suggested you might be able to help to wipe userdata from download mode.
My phone will not get passed message "Your phones is encrypted" "TO DECRYPT YOUR PHONE. ENTER YOUR SCREEN LOCK PASSWORD" I had no screen lock password... i have different passwords to decrypt . Each time i put a password in it resest phone and does factory rest and then reboots straight into Bootloader again.
Phone has no recovery " Failed to boot into recovery mode" red writing on a black screen.
Phoned has OEM Relocked ....cant fastboot or unlock bootloader again
Please can you help
tailor999 said:
Hi topjohnwu
@ jollywhitefoot suggested you might be able to help to wipe userdata from download mode.
My phone will not get passed message "Your phones is encrypted" "TO DECRYPT YOUR PHONE. ENTER YOUR SCREEN LOCK PASSWORD" I had no screen lock password... i have different passwords to decrypt . Each time i put a password in it resest phone and does factory rest and then reboots straight into Bootloader again.
Phone has no recovery " Failed to boot into recovery mode" red writing on a black screen.
Phoned has OEM Relocked ....cant fastboot or unlock bootloader again
Please can you help
Click to expand...
Click to collapse
You can try to unlock your bootloader again.
If you cannot unlock it, then I regret to say that your phone might be doomed.
Never try to relock your phone if it's not in 100% stock condition and perfectly working.
topjohnwu said:
You can try to unlock your bootloader again.
If you cannot unlock it, then I regret to say that your phone might be doomed.
Never try to relock your phone if it's not in 100% stock condition and perfectly working.
Click to expand...
Click to collapse
I have tried unlocking boot loader again. The log shows oem needs to be unlocked.
When a RUU comes out, would that help recover the phone?
Sent from my ONE A2003 using XDA-Developers mobile app
tailor999 said:
Hi topjohnwu
@ jollywhitefoot suggested you might be able to help to wipe userdata from download mode.
My phone will not get passed message "Your phones is encrypted" "TO DECRYPT YOUR PHONE. ENTER YOUR SCREEN LOCK PASSWORD" I had no screen lock password... i have different passwords to decrypt . Each time i put a password in it resest phone and does factory rest and then reboots straight into Bootloader again.
Phone has no recovery " Failed to boot into recovery mode" red writing on a black screen.
Phoned has OEM Relocked ....cant fastboot or unlock bootloader again
Please can you help
Click to expand...
Click to collapse
Assuming you have a stock recovery image..
Boot to bootloader then recovery.
Long press power for a few seconds then tap volume up.
You can then factory reset in stock recovery
LeeDroid said:
Assuming you have a stock recovery image..
Boot to bootloader then recovery.
Long press power for a few seconds then tap volume up.
You can then factory reset in stock recovery
Click to expand...
Click to collapse
Oh dam it, just seen your post a bit late. Car phone warehouse has just collected my handset :silly: - im sure they'll send it back saying ive lost warranty :crying:
tailor999 said:
Oh dam it, just seen your post a bit late. Car phone warehouse has just collected my handset :silly: - im sure they'll send it back saying ive lost warranty :crying:
Click to expand...
Click to collapse
Oh dear....
topjohnwu said:
Requirement: You have to use the systemless root of SuperSU to use this mod. If you want to flash the wipe script with SuperSU, flash SuperSU first, then flash the wipe script.
Important: If you have chosen "Require PIN/password/pattern to start device" in the "Secure startup" page during the initial setup, you CANNOT use this mod!
If you have to enter your PIN/password/pattern before your device booted up, this means that you have secure startup enabled. You CANNOT use this mod!
If secure startup is enabled and you flash this zip, your encryption will be messed up and you will have to format the whole data partition eventually to make your phone working again.
Click to expand...
Click to collapse
the thing is i have selected no for secure boot but whenever i setup a fingerprint and boot then it gets enabled again even if i had disabled it...
any way around or am i missing on something.. currently on lee's rom
SacredDeviL666 said:
the thing is i have selected no for secure boot but whenever i setup a fingerprint and boot then it gets enabled again even if i had disabled it...
any way around or am i missing on something.. currently on lee's rom
Click to expand...
Click to collapse
you're talking about something different that he is. secure boot is a pin before you ever get the system loaded. you are talking about lockscreen pin/password, which, is mandatory if you use fingerprint scanner.
jollywhitefoot said:
you're talking about something different that he is. secure boot is a pin before you ever get the system loaded. you are talking about lockscreen pin/password, which, is mandatory if you use fingerprint scanner.
Click to expand...
Click to collapse
cool thank you...
I'm confused a bit. So every time I want to clean flash a rom, I can flash this script and it will wipe everything (system, data, cache etc.) except internal storage? Would dirty flashing a rom have any affect?
Ndaoud360 said:
I'm confused a bit. So every time I want to clean flash a rom, I can flash this script and it will wipe everything (system, data, cache etc.) except internal storage? Would dirty flashing a rom have any affect?
Click to expand...
Click to collapse
+1
Ndaoud360 said:
I'm confused a bit. So every time I want to clean flash a rom, I can flash this script and it will wipe everything (system, data, cache etc.) except internal storage? Would dirty flashing a rom have any affect?
Click to expand...
Click to collapse
It will only wipe data without internal storage.
You should flash this zip after you flash a rom.
It will wipe data after the device boots up.
topjohnwu said:
It will only wipe data without internal storage.
You should flash this zip after you flash a rom.
It will wipe data after the device boots up.
Click to expand...
Click to collapse
Ok so the process would be wipe system, cache, flash rom, flash data wipe script?
Ndaoud360 said:
Ok so the process would be wipe system, cache, flash rom, flash data wipe script?
Click to expand...
Click to collapse
Why would you wipe system this will be done by the rom installation, just flash the rom then flash the script & job done
LeeDroid said:
Why would you wipe system this will be done by the rom installation, just flash the rom then flash the script & job done
Click to expand...
Click to collapse
huh? Ever since I began rooting phones, I would wipe system, data and cache before a clean flash of a rom. I guess I never knew the rom does it for you. I thought the rom just over wrote the system possibly leaving remnants of the old system which could lead to issues which is why devs advise to full wipe when switching roms.
Ndaoud360 said:
huh? Ever since I began rooting phones, I would wipe system, data and cache before a clean flash of a rom. I guess I never knew the rom does it for you. I thought the rom just over wrote the system possibly leaving remnants of the old system which could lead to issues which is why devs advise to full wipe when switching roms.
Click to expand...
Click to collapse
Ah, a full wipe is only applicable to data buddy, if a rom dev doesn't wipe system before their installation, they need a good slap with a frozen kipper.
Cache is entirely optional