Hi There, sorry long post
As many others I have problems with encryption in combination with custom roms. Searched several threads but are stuck now
What I did:
several months ago: Installed various CM Lollipop based rom's, could not get encryption to work.
several moths ago: Backed out installing CM11 (kitkat) and encryption worked fine but cm11 is kinda old now..
So tried the last few days going to Lollipop again:
Wiped phone from stock recovery. Installed a stock ROM for my N9005. Rooted and TWRP 2.8.7 again. Formatted /data so no residues from the previous encryption should be in the /data.
Thought/hoped a Touchwiz based rom would give me better results so I installed the Norma V15 based tom (Note5 port). Installed and works fine without encryption. When trying to encrypt the phone reboots and nothing happens (I still see encrypt phone in the menu's and my company e-mail package still complains my phone is not encrypted).
I'm a bit of a noob in the logcat area but with the liveboot app I saved the boot messages after selecting to encrypt my note 3:
12-27 19:18:46.797 W/Cryptfs ( 286): Bad magic for real block device /dev/block/platform/msm_sdcc.1/by-name/userdata
<6>[ 6.581522] max77803_get_vbus_state: VBUS is invalid. CHGIN < CHGIN_UVLO
12-27 19:18:46.797 W/Cryptfs ( 286): Cannot get crypt footer and key
From other pages I found that there should be some room after the /data partition to store the encryption key. I hoped that by installing the stock Rom this would be corrected. Investigated further:
Found this page: http://forum.xda-developers.com/showthread.php?t=2469031&page=2
Uninstalled supersu. After that I could encrypt my phone. It rebooted and the encryption took about three minutes. Looked fine so far!
After encryption the phone rebooted as expected.
Right after prompting to enter the password a pop-up appears "Unfortunately, System UI has stopped". Ticking OK and I get just the background screen and I can't enter my password again! The Android UI never starts, the message keeps coming back.
It seems to me that the start of the UI can't complete because the password is not entered and I can't enter the password! Catch 22!
Any suggestions to proceed?
Is this a encryption problem now or somekind of system UI problem or is this Norma rom related?
(already tried system reset and format /data from TWRP).
Can go back through the stock rom route but end up again with an unencrypted phone (work e-mail needs an encrypted phone).
Thanks for helping!
Hello all,
I have a Galaxy S5 G900T and have a fresh install of the latest Android 6.0 (2016-02-09) nightly. It is working perfectly but I am trying to encrypt the phone and it is not working. This worked previously on Android 5.1. When I go to Settings > Security Encrypt phone, it doesn't ask for any kind of password, I press Encrypt Phone and it immediately reboots, briefly shows the green android logo as if it's going to encrypt then shows the Cyanogenmod boot animation. I have left it on this for approximately 45 minutes before I unplugged the phone and removed the battery, then powered it back on to a normal startup. I again tried the same thing after setting a lock screen with exactly the same results.
So this apparently has something to do with Supersu and systemless root (guessing) as I did a factory reset and reinstalled the OS without installing Supersu and this time encryption worked. But now I am having trouble changing the encryption password.
I have tried the "vdc cryptfs changepw password default_password newpwd" from an adb shell method but it seems to do nothing.
I can set a password via lockscreen, but I'd like to have my boot encryption password decoupled from my lockscreen password. Does anyone have this working?
Ok I figured it out. After running "vdc cryptfs changepw password default_password newpwd" you must run "vdc cryptfs verifypw newpwd". All is working now, hopefully this helps someone else out
Interesting find, I can indeed confirm this as I've been experiencing the same issue with my GS4A SGH-i537. I can encrypt fine with a fresh OS, but post root SuperSU install, it hangs at the boot screen immediately after a brief screen of the android robot.
So turns out everything isn't working as it should after all. It is not recognizing the encryption password now. I'm going to post a new topic though as this issue isn't really the same as the original here
I am running BPB1 on my s5 and enabled encryption. The phone showed an Android looking character, and then restarted or went black...I noticed for the past 90 minutes the screen was black and the blue LED kept blinking.
I held the Vol Up, Vol Down, power, and home buttons together. It rebooted into trying recovery...then retarted...waited on the Verizon Logo for 5 minutes, then came up with the Setup Wizard.
WTF?
At a loss as to what I should do? Get back into SS and restore a backup?
If you enabled it, the disabled, it probably wiped everything because that's what it's designed to do. If enabling it caused it to factory reset like that, I'd restore a backup if you have one.
Sent from my SM-G900V using XDA-Developers mobile app
I created another thread, but basically if you have a rooted phone you have to open a terminal and do
su
pkill -KILL daemonsu
Prior to enabling encryption. I did this and it worked. I then tried it on the SD card, and it worked. Then, last night, tried to decrypt it..and that is where **** hit the fan. Granted, I didn't run those terminal commands again, because my 'user' in the terminal command appeared to be what I got the first time I ran pkill -KILL, which went from [email protected] to something like [email protected] But basically the phone appeared to have stalled during the decryption process. Once I got back in SS, my files appeared to still be on my SD card, so I tried to recover a backup....what I didn't realize is despite the file list being on the SD card, every single file was corrupt due to the messed up decryption.
So right now, I am very hesistant to do encryption again in case I ever need to decrypt in the future. I guess I don't see any logical reason to decrypt one day, unless I intend to sell the phone...but a factory reset would accomplish that.
This was what happened to me yesterday.
Sorry to digress... My phone was encrypted but not rooted. I have the encryption password. Any chance to get the data back from the phone?
Thanks.
J
poppers162 said:
If you enabled it, the disabled, it probably wiped everything because that's what it's designed to do. If enabling it caused it to factory reset like that, I'd restore a backup if you have one.
Sent from my SM-G900V using XDA-Developers mobile app
Click to expand...
Click to collapse
I have a samsung s8 950f. I put havoc-3.9 on it and everything was great. But then I decided to encrypt the date section. I already carried out such an operation on another samsung (9505) and then everything ended in an hour quite well. Now, after the start of encryption, the screen turned off, the phone did not react in any way,despite the connected charging, the indicator did not light up, and so on. I waited like this for more than three hours and then decided to restart my phone. After rebooting, the phone demanded a pattern for decryption (what was needed), but then the interface constantly crashed (problems). It doesn't matter, I thought and did a full reset.After that, the phone refused to start at all, showing the inscription "custom binary blocked by oem lock". Google suggested that a complete flashing with the original firmware is needed. Since I'm using ubuntu, I flashed it using heimdall. Everything went well and I again saw the original samsung firmware. But I need havoc so I installed TWRP again. But now this recovery does not see the date section. I can install havoc, but it does not start because it requires formatting the date, it turns out a vicious circle. What should I do, I don't like the official samsung software.
The problem was solved this way: installing twrp, flashing havoc, installing recovery from samsung, clearing the date, and again installing twrp. After these manipulations, I got what it was before encryption.
Hello, guys and gals!
I think that I may have messed my only phone up too much. My phone is a Samsung Galaxy Grand 2 Duos SM-G7102 ms013g that was bought around 2014.
Some background info (very long, if you don't want to waste your time reading all this, skip all the grey parts until you reach "The Problem"):
It was originally owned by my mother. It all started when my local carrier decided back in around 2015 or 2016 that my Windows Mobile phone that was running Windows Mobile 6.0 until it hard bricked itself that their network is no longer compatible, I waited patiently until my mother had been gifted a completely new phone in 2019. This resulted in my mother giving me her old phone with my SIM card in.
In late 2020, I started using my phone for hanging out with my friends, but I also started charging it with the power brick that I have until I finished all my conversations each day. It was performant at the time.
When I started using Instagram, I realized that I couldn't post pictures, so I started investigating the app info and found that it's running a version which was released in 2018. The newer updates required running Android Lollipop or greater, so I installed custom ROMs that allowed me to run the latest version of Android. The last ROM that I flashed was Resurrection Remix Nougat.
Because I bought a Samsung Galaxy Tab S8 that came with Android 12 back in June 2021, I decided to update my phone to LineageOS 19.1 with Android 12L obtained from this thread: https://forum.xda-developers.com/t/rom-unofficial-ms013g-12-lineageos-19-1-stable.4516799/ on November 2022. Everything went fine until 2023 started.
The Problem
-----------
My phone was running Android 12 in a semi-stable fashion, with the following issues discovered:
- Taking very long to boot up because it was showing the Samsung logo for around 2-3 minutes
- Some of the UI is not running at 60 FPS, especially when scrolling down the notification bar
Now, it was suffering from a major problem, which made me have to update the time and the date each time my phone booted up. Upon reboot or a cold boot, the phone would reset its time and date to a date and time that I've installed Android 12 on back then. This resulted in my phone not connecting to WiFi until I set the date and the time back to today's date.
Thinking that it's from LineageOS 19.0, I proceeded to download LineageOS 18 Android 11 Go (https://forum.xda-developers.com/t/rom-android-11-go-ms013g-lineageos-18-1.4512867/) and TWRP 3.7.0-9 (https://forum.xda-developers.com/t/recovery-ms013g-twrp-3-7-0_9-0-for-ms013g.4514667/), fully understanding the warnings that may have come with both the threads. Then, I rebooted my device to recovery.
First, I ran a backup of my device, but I saw that everytime I make a complete backup off TWRP, the compressed size was actually bigger than the total size by around 40 MB. When that finished, I proceeded to install TWRP to the recovery partition by clicking on the Install Image button and selecting the TWRP image. I then rebooted into recovery again and saw that it's running the updated version.
I proceeded to wipe the device completely (dalvik, system, cache, data) except the external SD card that was holding the ROM files, which went fine. I then went ahead to install the Go version of the ROM as per the thread's direction that tols me not to flash Gapps as MicroG was already included, which made the ROM lighter.
When that finished, I rebooted the phone to find that it successfully booted to Android 11, with the setup wizard showing up. It even detected my SIM card that was inserted to my phone. All went fine until I tried to access the Aurora Store, and saw that it couldn't find any application, resulting in the store only showing "No available apps" or something like that.
Next, I proceeded to download the Windscribe VPN, and saw that while the browser was loading sites fast, the download was very slow. It said that it's going to take one hour, which I wasn't going to wait for because it was too late. All that despite having an 8 Mbps connection supported by the fiber optic and not the copper ADSL wires.
As a result, I thought that maybe it was the system, so I rebooted Android.
The date and the time reset again back to when I first installed Android 12 (November 2022), but now it showed me a completely new issue. I wasn't prompted for the SIM unlock code as it used to prompt me for each time I reboot. Even worse, when I opened my phone, it no longer detected my SIM card!
When I checked the system information, I saw that the IMEI numbers went to Unknown for both my SIM card slots. My SIM card was placed on the first SIM slot. I decided that enough was enough and rebooted my phone to the TWRP recovery.
I wiped everything again (dalvik, system, cache, data) and tried to restore the phone from backup, but at the end of restoring the system, the recovery turned itself off, flashed the black screen for a millisecond, then went back to the main home screen for the recovery. I tried again, but it's the same.
So, I decided to re-install the whole Android 12 ROM from scratch, but instead of installing Gapps, I installed MicroG. I then rebooted the phone to see that instead of booting up, it's now stuck in a reboot loop.
The Samsung logo showed up for around 2 minutes and then the LineageOS boot animation showed up. After another 2 minutes, I saw that the backlights turned on. However, it kept on instead of turning off. As a result, my phone kept trying to boot until the screen went darker and the backlight turned off. After few seconds, the phone rebooted and it kept doing this cycle.
I rebooted the phone to the recovery, thinking that it might have been a compatibility issue with the recovery that I've installed, to wipe everything again. I restored the earlier working recovery, and installed Android 12 and MicroG. I rebooted, but the problem still persisted.
I rebooted the phone again to the recovery, and, this time, I reinstalled Android 12 with the Gapps package made for Android 12L. I rebooted the phone to finally see the setup wizard, but when I clicked on Start, the "Factory data reset" popup appeared with "Rebooting" underneath it. This caused my phone to reboot continuously.
I rebooted the phone to recovery to reinstall the latest recovery available for my phone. I think I may have killed my phone's software while trying to restore the Android 12 software. The time was too late, so I left my phone in the recovery mode at 100% battery charge.
I did the factory reset, but when I rebooted the phone, the "Factory data reset" popup still didn't go away. This time, when I rebooted to recovery, it showed 4% battery.
Below shots in the attachments are trying to describe what I'm seeing in my phone, the /system partition, and the /system_root partition before and after wipes as I thought that the /system_root might be the cause.
https://imgur.com/OEHsRgh
https://imgur.com/1yoGdLt
https://imgur.com/eihrtwW
https://imgur.com/J7YWkct
https://imgur.com/tafl3CY
I currently restored the recovery partition to go back to the older TWRP that didn't have /system_root.
I can't afford to buy another phone, even the mid-range ones like the Samsung Galaxy A53 or the upcoming A54, because the prices in our country recently had a huge inflation. Also, this is my only phone because my last phone, Windows Mobile, hard bricked itself.
Despite my 10 years experience with dealing with Android tablets and phones, this is my first time experiencing a problem that I can't seem to fix. I'm at a loss as to what to do now, so any kind of help would be appreciated.
Also, what caused my phone to behave like this? Should I start over by flashing the latest stock Samsung firmware from Odin?
I finally managed to get out of the "Factory data reset" loop! Here's how.
When I had a chance to discover why this factory reset loop is occurring, I proceeded to reinstall the entire system with Android 12 LineageOS 19.1 using the older TWRP 3.2.3 recovery. I also restored the data partition from the backup that I made before installing LineageOS 18.1 Go. However, it didn't fix the problem, which is strange, considering that the data partition in the backup was supposed to be pristine.
I went ahead to spin up the terminal from within the TWRP recovery to find any possible variables in default.prop that caused this to happen, but I found nothing. Then, I looked at the hexdump of a fota partition (/dev/block/bootdevices/by-name/fota) and wrapped its output using the "more" command, and saw something I've never seen before. It said something along the lines of "prepareUserData failed for system user" and "recovery".
Confused, I went as far as to open the source code of Android as found in this link (https://cs.android.com/android/platform/superproject/+/master:frameworks/base/services/core/java/com/android/server/pm/UserDataPreparer.java;l=128?q="userdata failed"&ss=android/platform/superproject) and saw something about user data preparation, so I went to turning on the USB debugging using TWRP because Android won't let me in because of the "Factory data reset" loop by appending the following properties to the build.prop file:
Code:
persist.service.adb.enable=1
persist.service.debuggable=1
My file already had the "persist.sys.usb.config=adb" line.
Upon rebooting to Android, I turned my old PC on and plugged my phone in to my PC. Then, I installed ADB using "sudo apt install adb" and executed the "adb devices" command to find that it found a device with "no permissions", so I added my device to my udev configuration. When I plugged my phone back in, I tested the command again, and saw "device".
I went ahead to test running Android again, and upon encountering the "Factory data reset" problem, I immediately took a snapshot of the Logcat of my device from my computer. When my phone rebooted to the recovery, I opened the text editor on my computer to look for potential problems. As I scrolled down, I saw the following:
Code:
11-09 09:56:17.500 245 257 E cutils : Failed to chmod(/data/media/0, 1528): Permission denied
11-09 09:56:17.500 245 257 E vold : Failed to prepare /data/media/0: Permission denied
Weird!
My phone was still in the recovery mode at the time. I rolled up my terminal emulator from my phone and checked the permission of the affected folder using "ls /data/media -l" and saw something that is beyond imagination. The user and group permissions for the "0" folder was set to "root"! I wrote the "chown -R media_rw:media_rw /data/media/" command thinking that it'll fix the factory reset loop. Upon rebooting, same issue occurred!
Thinking that I may have missed something, I proceeded to look for possible solutions to this debacle, until I found a viable solution. I captured the Logcat, looked for the error, and found this:
Code:
11-09 09:56:18.189 245 257 E cutils : Failed to chmod(/data/media/0, 1528): Permission denied
11-09 09:56:18.186 257 257 W Binder:245_3: type=1400 audit(0.0:112): avc: denied { setattr } for name="0" dev="mmcblk0p25" ino=129282 scontext=u:r:vold:s0 tcontext=u:object_r:rootfs:s0 tclass=dir permissive=0
11-09 09:56:18.189 245 257 E vold : Failed to prepare /data/media/0: Permission denied
11-09 09:56:18.186 257 257 W Binder:245_3: type=1300 audit(0.0:112): arch=40000028 syscall=333 per=800008 success=no exit=-13 a0=ffffff9c a1=b24c88e0 a2=5f8 a3=0 items=1 ppid=1 ppcomm=init auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 exe="/system/bin/vold" subj=u:r:vold:s0 key=(null)
In my phone, I opened the terminal, and wrote the following commands:
Code:
chown -R media_rw:media_rw /data/media/
find /data/media/ -type d -exec chmod 775 {} ';'
find /data/media/ -type f -exec chmod 664 {} ';'
restorecon -FR /data/media/
When I rebooted my phone, the "Factory reset" issue went away! My SIM is now seen by my phone! The only thing now is that I'll have to set all my applications up, as even Windscribe, Instagram, and all apps are now prompting me to provide login details or configure them. The phone still works smoothly, but still suffers from the date and the time problem.
I prefer to have the date and time problem fixed. Any advice?