Looking to install Magisk (root) you're phone? <unlocked bootloader, TWRP>: Android - Magisk

I've always been a fan of rooting my Android phones...
For theming purposes and to install Magisk...
I had just gotten a Moto G Fast...but when I went to flash Magisk 21.4
I realized that all of my data was encrypted and that wasn't going to be
possible...
No big deal I thought I can just wipe/format data... For whatever reason
that didn't work and my data was still encrypted... So I left it alone
for a few days... I thought what the heck why not? I took my micro sd
Card from another phone I have and put it in my Moto G and wasn't long
before I realized that my micro sd was not encrypted and I was able to
Flash Magisk, V4A... And all the other files I wanted to...
I love Pixel phones but since they don't have an sd card slot.. I might be
Staying away from them until that changes

spiral777 said:
I've always been a fan of rooting my Android phones...
For theming purposes and to install Magisk...
I had just gotten a Moto G Fast...but when I went to flash Magisk 21.4
I realized that all of my data was encrypted and that wasn't going to be
possible...
No big deal I thought I can just wipe/format data... For whatever reason
that didn't work and my data was still encrypted... So I left it alone
for a few days... I thought what the heck why not? I took my micro sd
Card from another phone I have and put it in my Moto G and wasn't long
before I realized that my micro sd was not encrypted and I was able to
Flash Magisk, V4A... And all the other files I wanted to...
I love Pixel phones but since they don't have an sd card slot.. I might be
Staying away from them until that changes
Click to expand...
Click to collapse
when u have twrp u can flash the magisk with adb sideload

howdeedodat said:
when u have twrp u can flash the magisk with adb sideload
Click to expand...
Click to collapse
Thnx I never really understood what that was for until now, thank you

Related

Encryption (impact on unlock/rooted?)

Dev edition. Unlocked and rooted with TWRP.
Put the 4.4.2 exchange apk's in /system then found out my company requires full device encryption on phones without an SD card.
I want to stay stock. Only reason I rooted was to get the new exchange apks.
If I encrypt everything will I still be able to:
-Use adb to go back to stock recovery
-use root explorer to restore the stock system apps
-take an OTA while maintaining unlock and root?
Sorry for the dumb questions. Every phone I've used had an SD card and I never had to deal with this.
Sent from my XT1060 using Tapatalk
Prior to posting this I read about 50 google results and learned that Google sucks.
So I'm slowly figuring out these answers as I go since no one else knows.
First I unlocked and rooted my device using this guide:
http://www.elementalxdesigns.com/ec...our-Moto-X-Developer-Edition-and-install-TWRP
Immediately after installing TWRP reboot into recovery and then tell TWRP to reboot. It will ask if you want to root, say yes. Install Super su from play store.
Next I used root explorer to get the 4.4.2 exchange and exchange services into /system/app then disabled the old ones in the normal settings/apps menu.
Then I set up my phone and configured my work exchange account and let it encrypt my device.
Here is what I have discovered:
- TWRP still can be booted into, but it can't see the /data partition. So you cant make a full nandroid or flash any files you saved to your phone.
- You can still use adb to flash TWRP or the stock recovery
Unknown:
-If I wasn't already rooted would TWRP have been able to root the device after unlocking and flashing TWRP earlier? It can't see the data partition, does it need to?
I don't have time right now to "start fresh" and see, but when I do I will update this thread.
I wish I could be of assistance, but I would love for you to keep us posted. I thought about encrypting my phones many times but I didn't know if/what that would prevent me from doing.
MotoX Developer Edition, Bootloader Unlocked, Rooted, Stock with tweaks!
You don't need to install a custom recovery to root. I have a Verizon Moto X which I used the "SlapMyMoto" method. After rooting I was able to encrypt the phone just fine without any issues to my root. I don't have an unlocked bootloader (don't see a point personally, since I don't plan to install another ROM).
If you intent to install another ROM then you'll want to not have the phone encrypted unless TWRP can access encrypted files on your device.
If you don't want to install a custom ROM then I recommend using the SlapMyMoto method, which works very well though it is a bit cumbersome to get done, once it is done you shouldn't need to redo it unless you accept an OTA.
The basic process is to root it using methods for 4.2 (you have to restore to 4.2 prior to rooting), then disable write protection using the appropriate tool, I think it is calle MotoWPNoNo or something along those lines. After that, accept the OTA to 4.4 and run SlapMyMoto to get root back.
Thanks titan. I think my biggest question right now is "can you root a phone that is already encrypted?"
I know I can unlock (dev edition) and install TWRP (abd) but can I root if TWRP can't see the /data partition meaning I can't flash the supersu zip.
If you root *then * encrypt it works fine. But since un-encrypting requires a wipe it would be nice to avoid having to go though that.
Sent from my XT1060 using Tapatalk
Restola said:
Thanks titan. I think my biggest question right now is "can you root a phone that is already encrypted?"
I know I can unlock (dev edition) and install TWRP (abd) but can I root if TWRP can't see the /data partition meaning I can't flash the supersu zip.
If you root *then * encrypt it works fine. But since un-encrypting requires a wipe it would be nice to avoid having to go though that.
Sent from my XT1060 using Tapatalk
Click to expand...
Click to collapse
Well, you don't actually need to see the /data partition to flash, if you have the ZIp somewhere else, or use ADB + TWRP (I think you can do that? I know you can with CWM). When you encrypt the OS isn't encrypted so /system isn't touched. The short answer is, yes, you can. TWRP should be able to read the encryption - in fact it should ask you for a password to decrypt when you boot into recovery.
I would still recommend using SlapMyMoto as it leave stock recovery in place, the reason this is good is because TWRP won't respond to an automatic wipe request from Android Device Manager or similar service. If you leave the stock recovery in place then you can still remote-wipe the device if you need to.
If you've already got TWRP in place it is simple... Does TWRP ask you to decrypt the phone before it goes in? If it does, can you see your internal SD Card and select a ZIP from it? If those are YES then, it'll work fine. TWRP can see the entire phone and thus you can install a zip without problem. If i can't, you'll need to get more creative, but I still would suggest seeing you can use ADB while you're booted into TWRP to push the SuperSU ZIP to the device to flash.
Here is a link from last year from Stack Exchange about TWRP and an encrypted device. I know that when I had my S3 running CyanogenMod TWRP would decrypt it just fine.
https://android.stackexchange.com/q...custom-recovery-work-with-an-encrypted-device
Should you need to do it, here is the link for using ADB with TWRP... (it is called Sideloading, forgot that)
http://teamw.in/ADBSideload
Thanks the side loading may be what I'm looking for If I ever go back to square one and want to root while encrypted. TWRP didn't ask to decrypt so no luck there.
Sent from my XT1060 using Tapatalk
Did you ever get this working? I just put TWRP on my MotoX DE, and I encrypted my phone (Exchange requirement). Anyway to have TWRP decrypt so i can sideload or root?

[Q] Root and Encryption? (Bootloader locked, Rooted, Firmware 23.0.1.A.5.77)

Hello everyone
I have now finally been able to root my beautiful Sony Xperia Z3 Compact. The bootloader is still locked. I did downgrade the Firmware in order to root the phone. Afterwards I made a backup of the DRM Keys via TA Backup. Additionally I updated the Firmware to 23.0.1.A.5.77. As the bootloader is still locked I did not install any kind of custom ROM and I am yet not planning to do so. The Sony ROM will probably do a good job. (My old phone is a Sony Xperia P which is now running with Root Sony's ROM since 3 years at least)
I am running on KitKat 4.4 and also not planning to change. I have a 64GB SD card in my phone as well.
Now my question:
Can I still use the encryption function or will this interfere or make problems because I have root (Bootloop)?
I am not planning to encrypt the SD card because I do not need encryption on the SD card but encryption for the Android System would be nice.
Thanks for your help guys :good:
Best wishes,
Dicey
No idea guys? Did no one ever try this before?
dicey said:
No idea guys? Did no one ever try this before?
Click to expand...
Click to collapse
I'd like to know this as well.
I tried this today. Left it encrypting and when I came back it said encryption had been interrupted and it then did a factory reset, after which I was unable to enter custom recovery.. As I had chosen to encrypt the SD I was left with an empty SD card too.
Somehow I kept root so I was able to install XZDualRecovery again and then restore from nandroid backup.
There's a thread on androidforums where Samsung owners have reported success with temporarily disabling SuperSU while running the encryption.
luuuis said:
There's a thread on androidforums where Samsung owners have reported success with temporarily disabling SuperSU while running the encryption.
Click to expand...
Click to collapse
Anyone tried this method or found another way to achieve root + encryption? It's the only thing keeping me from rooting again.

Dirty ROOT solution - for unlocked BL

Abandoned
This rooting method is deprecated. Use TWRP for Z5C instead.
Old post:
I have rooted my Z5 Compact and figured you might want a short how-to.
Disclaimer
I am well aware that this is not the nicest method of rooting, but I got the phone a few hours ago and haven't got the time to put together a better way.
Credits
@Tommy-Geenexus for Zombie kernel
@AndroPlus for Z5 recovery and guidance :good:
@Chainfire for SuperSU
Guide
First, you need to unlock you bootloader (I know, I know, now stop weeping :crying::crying::crying
A rooted device does not boot using default kernel, so you need to install an insecure kernel.
I am using a repacked Zombie b1 kernel, with a small modification (wrong owner on all files in ramdisk).
All credits fly out to @Tommy-Geenexus : [Kernel][Sony5.x][Z5C]Zombie[13.10.15]
Flash using:
Code:
fastboot flash boot zombie_b1_fixed.img
Reboot your phone using:
Code:
fastboot reboot
And verify that it works as expected.
Now, reboot your phone to bootloader again (see info how to at the end of post).
Then issue:
Code:
fastboot boot recovery.img
This recovery is partly broken, but it works well enough to install root.
Thanks to @AndroPlus for TWRP code.
The phone will boot to a black screen, but you can connect to it using ADB.
You need to manually mount the system and userdata partition by issuing:
Code:
adb shell mount /dev/block/platform/soc.0/by-name/system /system
adb shell mount /dev/block/platform/soc.0/by-name/userdata /data
If you get this error:
mount: mounting /dev/block/platform/soc.0/by-name/system on /system failed: No such file or directory
You probably just need to wait a while and try again.
You can also try this command (and then re-enter the mount commands above):
Code:
adb shell mount
adb shell cat /proc/partitions
If you got /system and /data to mount, you can now push SuperSU to the phone and install it:
Code:
adb push UPDATE-SuperSU-v2.46.zip /data/media/0/
adb shell twrp install /data/media/0/UPDATE-SuperSU-v2.46.zip
adb shell rm /data/media/0/UPDATE-SuperSU-v2.46.zip
If it all works, just reboot and enjoy root:
Code:
adb reboot
Files
zombie_b1_fixed.img
recovery.img
Extra info
Boot to bootloader by adb command:
Code:
adb reboot bootloader
or by turning off the phone, and then hold down VOL UP while plugging in the USB cable.
Thanks!!!!! I will try this as soon as I go home! will update you
---------- Post added at 02:30 PM ---------- Previous post was at 02:26 PM ----------
what model do you have by the way? mine is E5823
Thanks
you are the greatest!!! THANKS SO MUCH!!!!!!!!!!!!!!!! it works on my model. dirty or not, as long as it works
UPDATE: OMG, after finally getting all my apps on, i was happy to put my SD card and sim in.
IT WOULD NOT TURN ON. it kept rebooting and the indicator flashed a few times.
after isolating the problem, it does this when the SD card is in. Sim card is fine..
- So I can use the phone without SD card, but as soon as i plug it in, it reboots.
- I've tried the SD card in my old phone and it works fine.
- i've also used a new SD card in it and it's rebooting.
Do you think this is hardware error? is there something in the above scripts that could've affected it?
The truth is i never tried it before i rooted it.. so i'm not sure if it's due to rooting..
Please help me!
kevinwu128 said:
what model do you have by the way? mine is E5823
Click to expand...
Click to collapse
I've got the same model.
kevinwu128 said:
UPDATE: OMG, after finally getting all my apps on, i was happy to put my SD card and sim in.
IT WOULD NOT TURN ON. it kept rebooting and the indicator flashed a few times.
after isolating the problem, it does this when the SD card is in. Sim card is fine..
- So I can use the phone without SD card, but as soon as i plug it in, it reboots.
- I've tried the SD card in my old phone and it works fine.
- i've also used a new SD card in it and it's rebooting.
Do you think this is hardware error? is there something in the above scripts that could've affected it?
The truth is i never tried it before i rooted it.. so i'm not sure if it's due to rooting..
Please help me!
Click to expand...
Click to collapse
That sounds really ominous
I got the phone yesterday and have not yet tried it with SIM or SD card, so I can't really tell you if it is due to the rooting.
The recovery commands or the root should not cause the SD to stop working. The custom kernel could possibly do it, but I doubt it. However, until I (or someone else) test a SD card while on root, I can't really say for sure.
Sorry
Can you please test when you get a chance? I've unroot using super su and have done a factory reset. Same result.
I've also put in a request for warranty... Great work though. Thanks for posting this!
kevinwu128 said:
Can you please test when you get a chance? I've unroot using super su and have done a factory reset. Same result.
I've also put in a request for warranty... Great work though. Thanks for posting this!
Click to expand...
Click to collapse
Sure, I will test within a few hours. :fingers-crossed:
kevinwu128 said:
Can you please test when you get a chance? I've unroot using super su and have done a factory reset. Same result.
I've also put in a request for warranty... Great work though. Thanks for posting this!
Click to expand...
Click to collapse
My SanDisk Ultra 64GB is working just fine. No SIM card in the phone, though.
Note that I have upgraded to 32.0.A.5.32.
nilezon said:
My SanDisk Ultra 64GB is working just fine. No SIM card in the phone, though.
Note that I have upgraded to 32.0.A.5.32.
Click to expand...
Click to collapse
Nice! Then i will root tomorrow and see if everything works for me. Have to unlock bootloader so i don't have time to do it tonight.
Awesome work nilezon
nilezon said:
My SanDisk Ultra 64GB is working just fine. No SIM card in the phone, though.
Note that I have upgraded to 32.0.A.5.32.
Click to expand...
Click to collapse
Works fine for me too here.
You guys noticed a change in the official camera app ? Does it still behaves the same and post process automatically images ?
exploreresp said:
You guys noticed a change in the official camera app ? Does it still behaves the same and post process automatically images ?
Click to expand...
Click to collapse
Yeah, I'd like to know this as well. On the Z3c, Unlocking the bootloader lead to really ****ty images. Is this still the case? I don't care much about DRM, but the camera has to perform.
Is there anywhere that I can find a rundown on what I'll actually lose by unlocking the bootloader? I don't particularly care if the camera loses a little quality, and it seems like I probably don't care about any of the DRM stuff, either, but I would like to be sure.
I'm a little unclear on the losing of the DRM (if it is actually lost). Does this occur when you unlock or root?
(I realize you need to unlock in order to root).
eng3 said:
I'm a little unclear on the losing of the DRM (if it is actually lost). Does this occur when you unlock or root?
(I realize you need to unlock in order to root).
Click to expand...
Click to collapse
It happened on unlock and it can't be reverted. DRM keys are unique for each xperia so flashing another TA partition from another xperia will brick your device.....
Hi, I read about the new TWRP method, but after flashing TWRP, what should I do for get root? Just flash SuperSU zip from Chainfire's site?
farfetch said:
Hi, I read about the new TWRP method, but after flashing TWRP, what should I do for get root? Just flash SuperSU zip from Chainfire's site?
Click to expand...
Click to collapse
Exactly right, sir :good:
Hey,
ist there any way to Backup the DRM and Restore it after root?
THX
vincent-v said:
Hey,
ist there any way to Backup the DRM and Restore it after root?
THX
Click to expand...
Click to collapse
Not currently.
Never, ever unlocked your z5 compact bootloader
tania247260 said:
Never, ever unlocked your z5 compact bootloader
Click to expand...
Click to collapse
Is this... a warning? Or have you yourself never unlocked your bootloader?

Encrypting the SD card, doesn't secure the data

I'm using the SM-T710 variant.
When I've encrypted the SD (Transend 32GB) card, I get confirmation it's been encrypted. I see the progress bar etc as it encrypts the files on the card.
But, if I put the card in a card reader and connect it to my PC, all the files on the card are visible and editable.
If I put the card in my Note 4, it thinks the card is encrypted.
The tablet is rooted stock ROM 6.01 MM, with Xposed and other Mods installed.
But, even disabling them and rebooting doesn't help.
Is there a fix, without wiping the tablet and trying again?
Thank you
Hi has anyone found a solution to the issue of SD card encryption? I've been trying to resolve this all weekend. Used multiple cards and tried formatting them, charging tablet to 100% and doing encryption. All claim to have worked but I can read the card and all files when I put in a SD card reader and connect to PC. Will probably return the tablet and pick up an iPad if this is an issue that cannot be resolved..
chanukya said:
Hi has anyone found a solution to the issue of SD card encryption? I've been trying to resolve this all weekend. Used multiple cards and tried formatting them, charging tablet to 100% and doing encryption. All claim to have worked but I can read the card and all files when I put in a SD card reader and connect to PC. Will probably return the tablet and pick up an iPad if this is an issue that cannot be resolved..
Click to expand...
Click to collapse
Do you have twrp installed?
ashyx said:
Do you have twrp installed?
Click to expand...
Click to collapse
No, tablet is not rooted
chanukya said:
No, tablet is not rooted
Click to expand...
Click to collapse
I didn't say root. I asked if you had twrp installed? I guess that means neither?
Have you tripped knox?
ashyx said:
I didn't say root. I asked if you had twrp installed? I guess that means neither?
Have you tripped knox?
Click to expand...
Click to collapse
Hi, no modifications at all. No twrp or root, Knox not tripped
chanukya said:
Hi, no modifications at all. No twrp or root, Knox not tripped
Click to expand...
Click to collapse
Then there's not much to suggest except to format the sd card and factory reset.
I had to do this to get internal encryption working on 2 other devices.
Even though it seemed successful it wasn't until I did the above.

Anyway to have Root AND device encryption?

Title says it all. Is there any known way to have root and device encryption still possible?
Thanks a lot.
plop12345 said:
Title says it all. Is there any known way to have root and device encryption still possible?
Thanks a lot.
Click to expand...
Click to collapse
Not currently. Unless you can trick the device into thinking it's fully charged and plugged in at the same time??
Jammol said:
Not currently. Unless you can trick the device into thinking it's fully charged and plugged in at the same time??
Click to expand...
Click to collapse
I never thought of this question, but good question. So root trips knox to stop encryption? Kinda lame if so.
Jammol said:
Not currently. Unless you can trick the device into thinking it's fully charged and plugged in at the same time??
Click to expand...
Click to collapse
Got it working with the stock ROM in the mean time. Just don't use TWRP to flash Magisk. Keep the stock recovery, Use Magisk Manager to patch boot.img (check tar format in settings) , then flash back via Odin, boot and factory reset. Done.
No luck with any custom ROM yet. Desperately looking for help. Would also pay quite a bit to have someone skilled looking into this. I don't want to keep the Korean ROM of my N950N
Nick216ohio said:
I never thought of this question, but good question. So root trips knox to stop encryption? Kinda lame if so.
Click to expand...
Click to collapse
No, flashing with TWRP requires to format data. That step loses encryption.
For some reason it's then impossible with Magisk or pph root to just reencrypt the phone from a custom ROM. It dies with invalid encryption and looses all your data when you try.
It's a bit different with SuperSU. Here it thinks encryption went well and tries to mount it on next boot, but then fails.
From my current knowledge it seems it needs stock recovery to recreate an encrypted data partition that actually works. That's the bit I'm stuck now...
plop12345 said:
No, flashing with TWRP requires to format data. That step loses encryption.
For some reason it's then impossible with Magisk or pph root to just reencrypt the phone from a custom ROM. It dies with invalid encryption and looses all your data when you try.
It's a bit different with SuperSU. Here it thinks encryption went well and tries to mount it on next boot, but then fails.
From my current knowledge it seems it needs stock recovery to recreate an encrypted data partition that actually works. That's the bit I'm stuck now...
Click to expand...
Click to collapse
On the Snap version, using SamFail gets rid of encryption. There's no way to encrypt for us with root because of the 80% short coming.
Jammol said:
On the Snap version, using SamFail gets rid of encryption. There's no way to encrypt for us with root because of the 80% short coming.
Click to expand...
Click to collapse
Ah crap, didn't even think of that issue
Anyway, at least to me a phone without reliable encryption is not usable as daily driver. I wonder why this gets so little attention. I spend some days now trying to resolve this, but there is not much information out there or I'm not capable to dig it up.
I couldn't even find a clear statement, what it actually is that prevents TWRP to mount encrypted /data on modern Samsung phones.
I known they do their own SOC based hardware encryption, but what is it that TWRP can't get? Does the trusted zone not release the key if a custom binary boots? I really like to understand a bit more on how this actually works.
Thanks
Figured it out: https://forum.xda-developers.com/galaxy-note-8/how-to/guide-how-to-root-device-encryption-t3742493

Categories

Resources