Adding magisk to latest version of lineage - Google Pixel 3 Guides, News, & Discussion

Without twrp, there's so much info about installing magisk, it's a bit much.
But, with lineage, it's quite easy. That's because lineage gives you the recovery image with ea new update. So just install the magisk apk, then use it to patch the recovery image file. Then flash that file to 'boot' and yer done.
Of course, when an 'update' occurs, there will be issues. Not sure yet what 'sequence' of things will be the least hassle, but because the latest recovery image is always available there should be a way that will be relatively easy.
cheers

Regarding OTA Lineage updates. It seems at one point preserving Magisk was done through the magisk manager; install the update but don't reboot, go back to manager and 'flash to non active slot' etc etc.
I think currently though the way to preserve it is with an addon.d shell script, which is also the way things like Gapps are preserved. It seems though the only way to get that script (99-Magisk.sh) installed is to take the magisk manager apk, rename the extension to zip, and use lineage recovery to adb sideload it.
I already had magisk working, but didn't have the 'preserve during OTA' script, so decided to do the adb sideload hoping it wouldn't mess up anything. Sure enough, worked as hoped for.
So, to get Magisk *and* the needed script, seems the best way is to 'adb sideload' the apk (renamed to zip).
cheers

To finish this bit of info, I tried the most recent (08/03) update, even though I didn't need anything in it per se... it worked fine, exactly as you'd want. All settings preserved, magisk (and modules) and gapps preserved... exactly like it was, but with the lineage update.
You can also, during the update, indicate you want the new recovery included, which I did. Very awesome really, I love Lineage
cheers

Related

How do I create TWRP-compatible OTA-updates for my custom ROM?

I want my ROM to receive OTA-updates, so instead of downloading and flashing a new version manually, users would get it updated for them automatically. All source codes are available for my device (Wileyfox Storm (kipper)), so building a custom kernel, recovery, TWRP, OS itself is trivial - generally you command brunch and everything just works™.
So I wonder - how do I enable OTA-updates for a ROM, while still keeping an option for users to use TWRP recovery? (yes, I got a place to host files & I generally understand how OTA works). I know that official TWRP app can queue zip files for installation in recovery mode, which is almost the same functionality I need for my OTA updates. Generally I'm looking for a way to make TWRP run a script located in /cache/recovery/command right after boot without offering any kind of user interaction. Can it be done with a TWRP, built from official sources or do I need to patch something to support that behavior?
So the question is how do I create OTA-updates that are compatible with official TWRP or how do I create a custom TWRP, that supports OTA-updates (whichever suits more for my task)?
Look up OpenDelta, its exactly what you're asking for I believe.
^^^Link please. im also looking same

Local root for the Amazfit watch (SuperSU 2.79)

Hello all, I got my Amazfit Pace a few days ago and the first thing that I wanted to do after flashing PACEified was get proper on-device root, as you know right now PACEified comes with adb root shell so we can modify the watch however we want from and adb shell but that means we're always dependent on another device for doing so, apps on the watch have no way of getting root access.
I am actually amazed that no one else even seemed to have any interest in achieving this as it was somewhat easy for me to figure it out and now I'm sharing it with y'all.
Requirements: being on a ROM that has adb root (ex: PACEified) or ability to boot the temproot kernel.
WARNING: If the stock kernel has dm-verity the temproot then install SuperSU method will lead to the device refusing to boot, I do not know whether it does or not.
Disclaimer: I am in no way responsible for any damage this can or will cause to your watch and/or phone, you are the only one responsible for your own actions.
Anyway here's the steps to getting SuperSU 2.79 fully working on your watch:
Download the attached zip file.
Copy the zip file to the watch.
Open a terminal/cmd/powershell in the folder where your adb binary is located.
Run the following commands in order:
Code:
adb root
Code:
adb remount
Code:
adb shell
Now you are running shell commands on the watch itself so do:
Code:
busybox unzip /sdcard/SuperSU-2.79-amazfit.zip
Code:
cd /sdcard/supersu/
Code:
sh root_amazfit.sh
Done, reboot and enjoy!
I hope this helps others as it did help me and I do hope I didn't make any mistake.
Credits:
Chainfire for SuperSU
Neuer_User for PACEified
KevinX8 for the SuperSU 2.79 zip for Android Wear (I used that one cause it already is setup to allow all by default)
Everyone else that I can't remember right now
List of useful root apps for the Amazfit:
MiXplorer-useful file manager with addons and root file management options: https://forum.xda-developers.com/showthread.php?t=1523691
Kernel Adiutor 4 Wear-very popular kernel options management app, won't give too many options since the stock kernel is actually quite limited but still allows tweaking a few things like changing the schedulers and their options, enabling init.d and other such stuff: https://forum.xda-developers.com/android-wear/development/app-kernel-audiutor-4-wear-t3126122 (I only tested this version but the latest normal Kernel Adiutor version might also work perfectly since the interface seems pretty friendly with low resolutions)
Advanced Settings for Watch-provides a plethora of options like Bluetooth and WiFi settings management, reboot menu and most importantly PACKAGE MANAGEMENT and by that I mean it doesn't just have the normal app settings menu that allows you to clear data/cache, force stop or disable/uninstall apps but ALSO INCLUDES A PACKAGE INSTALLER for installing apks straight on the watch: https://play.google.com/store/apps/details?id=com.sssemil.advancedsettings&hl=en (get the wear apk from inside the main apk, it is located in /res/raw just open the phone apk as an archive also WARNING: many menus/options make it crash cause this is not Android Wear)
Another one.
Wich are the benefits of doing that?
jmpcarceles said:
Wich are the benefits of doing that?
Click to expand...
Click to collapse
Same as on any other rooted Android device.
A few apps I have on the watch that use root are:
MiXplorer-file manager
Kernel Adiutor-can improve battery life/performance by messing around with it a bit
Root Essentials (the wear part sent from inside the phone apk)-it's great for uninstalling apps and such
Hello. Stock ROMs can boot "temproot kernel"? Could you please like to where it's explained? Thanks.
Ranomez said:
Same as on any other rooted Android device.
A few apps I have on the watch that use root are:
MiXplorer-file manager
Kernel Adiutor-can improve battery life/performance by messing around with it a bit
Root Essentials (the wear part sent from inside the phone apk)-it's great for uninstalling apps and such
Click to expand...
Click to collapse
Nice.
MiXplorer is my mobile favourite Android explorer.
I don't know the other apps, i must learn about it.
Any suggestions about them, Kernel auditor seems very interesting. I have very much problems with my Amazfit battery, last month suddenly i don't get more than 2 days of autonomy
Thx.
lfom said:
Hello. Stock ROMs can boot "temproot kernel"? Could you please like to where it's explained? Thanks.
Click to expand...
Click to collapse
Stock ROM can boot temproot kernel only if old enough version to not have the bootloader locked OR you unlocked the bootloader after, to get the temproot kernel go to the PACEified thread and read the install instructions, it has you booting the temproot kernel on order to flash it and it might be possible to just boot it, root and reboot but I am not entirely sure, if the Amazfit has dm-verity it will refuse to boot after altering the system, I actually didn't think about that when I wrote this guide cause it was 5AM so would recommend flashing a custom ROM.
@Neuer_User does the Amazfit have dm-verity?
Also would you consider adding SuperSU to PACEified in the future?
Double post cause mobile XDA is messed up, delete.
jmpcarceles said:
Nice.
MiXplorer is my mobile favourite Android explorer.
I don't know the other apps, i must learn about it.
Any suggestions about them, Kernel auditor seems very interesting. I have very much problems with my Amazfit battery, last month suddenly i don't get more than 2 days of autonomy
Thx.
Click to expand...
Click to collapse
To be honest MiXplorer just about works but isn't really 100% usable cause things don't fit on screen, looking for a better root file explorer for the watch.
The stock kernel doesn't really allow you to control much cause the stock kernel doesn't seem to have too many features but can still change governor and a few other stuff and if nothing else it can enable init.d if you don't already have it enabled, I use the Kernel Adiutor 4 Wear version but TBH I think the normal one should be just as usable.
For your battery problem you could try deleting some unneeded apps like the Mi Home or the Chinese radio one (if on Chinese ROM/PACEified) and maybe Greenify will also work but wouldn't really put my bets on it, perhaps try using some battery saving scripts?
Right now I'm looking for an apk installer...I have a solution already but it's probably the worst one possible: a init.d script that checks if there are apps in a folder on the internal storage then installs all of them and deletes the apk files but that means you need to reboot in order to install apps, could make crond run the script every hour or so but that would also not be too convenient so either a script runner or a apk installer would be best.
BTW after uninstalling apps from the watch using a root app you need to crash the launcher or it will still show the icons for the uninstalled apps.
Also I'm working on improving the script to add safety checks (if someone tries to run it without the other files in the same folder right now it would most certainly end up in a mighty bootloop, fortunately a bootloop with adb access so easy to fix but still not great, I made that script in like 5-10 min after I manually did it on my own watch) and add more features like installing a newer busybox version and linking missing applets (unzip for example).
Updated 2nd post with a few useful apps, one of them finally giving us the power to install apps straight on the device, will publish the new version of my script in a few days, have been working on adding A LOT of new features and now I kinda need to concentrate on the project for my Android class for a bit, sorry for the delay.
Ranomez said:
Updated 2nd post with a few useful apps, one of them finally giving us the power to install apps straight on the device, will publish the new version of my script in a few days, have been working on adding A LOT of new features and now I kinda need to concentrate on the project for my Android class for a bit, sorry for the delay.
Click to expand...
Click to collapse
Hi Ranomez,
When do you plan to publish the new script for local root?
Thx in advance.
Merry Xmas.
jmpcarceles said:
Hi Ranomez,
When do you plan to publish the new script for local root?
Thx in advance.
Merry Xmas.
Click to expand...
Click to collapse
Most probably next week, haven't really had time to work on it with the last week of college before the holidays and the fact that I bought Xenoblade Chronicles 2 on launch day and it's been eating most of my free hours, lol, sorry for the delay, anyways the current script still works for simply rooting but will give a no such file or directory error if init.d isn't already enabled, just ignore that.
Thank you @Ranomez
I've just tried your local root using the temproot kernel on the latest stock rom, and it worked great. So, I can say my pace doesn't have dm-verity enabled?
btw, SU was added to Stockfied, Pacefied and Stratosfied, just needs to be enabled.

[Q] Enable Camera2 APi on MTK variant? (tried editing build.prop but doesn't work)

Hello guys,
Been lurking here for ages and already benefited tons from the help posted here. However, this is one issue that I can't seem to figure out.
I have the MTK variant of the RN4 and I'm trying to enable the Camera2 API so that I can take RAW pictures, use Google HDR+ etc.
I am rooted on MIUI 9 (though as it's MTK, it is still Android 6.0) and I edited the build.prop file using ES Explorer (I added the persist.camera.HAL3.enabled=1 line). I've rebooted the device, used checker apps and Lightroom to check if there's RAW support, but without luck.
Do you guys have any other ideas as to how I can enable Camera2 API support?
I don't have bootloops, I don't have any issues other than the fact that there's no Camera2 API support. Restarting the device does not erase my mods to the build.prop file.
Any help is appreciated!
Forget about it since GCam is supposed to work on Snapdragon devices only.
Kavute said:
Forget about it since GCam is supposed to work on Snapdragon devices only.
Click to expand...
Click to collapse
I wouldn't mind using other apps such as Lightroom if I can get RAW to work. Any ideas as to whether that's possible?
I've had a similar problem before, but MIUI would revert my changes to the build.prop. I solved it by using a systemless root via Magisk.
What I did:
1. Unroot your phone
2. Flash Magisk using TWRP (link to Magisk thread).
3. Download the "camera2api-enabler.zip" from this thread
4. Add the zip (Module) using the Magisk Manager app that comes installed after you flash Magisk
5. Reboot, and you should see the camera2api enabled.
If you do run into a boot loop after installing Magisk, you may need to flash the LazyFlasher zip file after Step 2.
yohyah said:
I've had a similar problem before, but MIUI would revert my changes to the build.prop. I solved it by using a systemless root via Magisk.
What I did:
1. Unroot your phone
2. Flash Magisk using TWRP (link to Magisk thread).
3. Download the "camera2api-enabler.zip" from this thread
4. Add the zip (Module) using the Magisk Manager app that comes installed after you flash Magisk
5. Reboot, and you should see the camera2api enabled.
If you do run into a boot loop after installing Magisk, you may need to flash the LazyFlasher zip file after Step 2.
Click to expand...
Click to collapse
Thank you! I'll look into Magisk. I have to admit that I'm tempted if only to get this and Super Mario Run working.
But I do like having sys root access, I've just fixed the Cell Standby battery drain with an edit to the build.prop file, as MIUI 9 doesn't have the option to disable VoLTE.
So I'll give it a thought.
Thank you! and if anyone has any other tips, preferably something that doesn't alter my setup too much, it'd be ace.
rottensong said:
Thank you! I'll look into Magisk. I have to admit that I'm tempted if only to get this and Super Mario Run working.
But I do like having sys root access, I've just fixed the Cell Standby battery drain with an edit to the build.prop file, as MIUI 9 doesn't have the option to disable VoLTE.
So I'll give it a thought.
Thank you! and if anyone has any other tips, preferably something that doesn't alter my setup too much, it'd be ace.
Click to expand...
Click to collapse
Hi!
If it isn't work, you should try out this:
Go in Engineer mode https://forum.xda-developers.com/showthread.php?t=2313812 or download the Engineer mod apk from play store. (It's working just on stock ROM)
Swipe left to Hardware testing, and there will be the Camera option.
I think, after you find this, you can get through the settings (where will be a raw capture option)

[GUIDE] Flash GSI on Samsung M30

Hi All,
Today I successfully flashed the PHH GSI on my Samsung M305F. Sharing the guide on how to?..
Prerequisites:
1. Android 10 May Security Patch (June release). Get it here. Be on stock firmware, non rooted.
2. PHH/Havoc or any GSI you wish to flash. I suggest PHH one as it is regularly updated and has inbuilt FLOSS/FOSS apps build too, other than Vanila, GApps build too. Choose the GSI from the list here.
Boot with AB only. Seems this was due to some ROM compatibility issue and the FW of Samsung that time. Any Treble based ROM, based on our partition structure works now.
3. PHH Magisk (this is a modified Magisk for GSI images, and should work on any GSI). Please do not use any other Magisk or SuperSU for initial flash, else you will not boot. Trust me, I tried several time, and does not boot. Get the PHH Magisk here or here.
4. DM-Verity file. Download from here, here or check here for further reading.
5. TWRP for Android 10 for Samsung M30. Get it here or here.
6. USB-OTG. See #6 below for reason.
Instructions:
1. Flash Stock ROM from #1 above.
2. Ensure that you are connected to internet/mobile data so that OEM unlock option is visible. If not connected to Internet, OEM unlock will not show, as it needs to check over Samsung servers on start.
3. Wait for 15 minutes for KG state to check servers (this time frame can be less or more depending on your internet connection). Mine was 3-4 minutes. This is important for the next steps.
4. Reboot to download mode and flash the TWRP from ODIN, by selecting it in AP (auto-reboot should be unchecked). The full steps are available in the XDA post linked in #5 above.
5. Reboot to TWRP, and format data (not wipe). Reboot to TWRP again. This step is important for recovery to not get overridden by the stock recovery.
6. MTP on recovery and upon boot somehow still does not work on Linux or Windows, so copy your relevant files on USB-OTG. Akhil and Sahil are working on the recovery part of it. For normal system, that is an issue with all GSI's somehow.
7. Wipe /data, /cache and /internal storage, and then mount /data and /usb-otg.
8. Ensure /system and /vendor are not mounted, and only /data and /usb-otg are mounted. You can copy the files over from OTG to internal sd card, or directly work from OTG itself. Up to you.
9. Do not wipe anything else, and just flash as follows:
a. Flash the GSI Image (.img) file in /system partition from recovery.
b. Flash the Magisk PHH file given in the link above.
c. Flash the DM-Verity file from the link above.
10. Wipe dalvik/cache. Reboot to system.
Boot time should not be much, if you follow the steps properly. Mine took 3-4 minutes.
Post boot:
1. Inbuilt SuperSU will give binary error/update prompt. Not needed, and ignore it.
2. Once you have setup Magisk, you can then upgrade both manager and magisk itself. It will not bootloop. But for initial flashing use the Magisk given in the link, and no other, else you will bootloop.
3. MTP does not work. VoLTE, I am yet to check, so if someone can confirm that, it will be good.
4. USB-OTG works. So, you will have to use it for any file copying etc. Please format USB-OTG once from the phone, as it will otherwise give USB Error and your time would be wasted. So format from mobile first and then copy anything to USB.
5. I did not find any bugs till now. Not sure, if any present or not, as I booted today only, after 8 failed weeks.
VoLTE Fix: https://github.com/KhushrajRathod/VoLTE-Fix/
Credits:
1. Sahil_Sonar and Akhil99 for the working TWRP (finally)
2. MiyamuraNEET for helping me with flashing GSI, and giving me the link for correct DM-Verity. No other DM-Verity works.
3. phhusson for making a working GSI (especially FOSS/FLOSS one).
4. Samsung for making a BLOAT FILLED OS.
5. turbolukex5 for PHH Magisk.
6. vdbhb59 (of-course me) for not giving up, and for keeping on trying for the last 8-9 weeks..
Let me know if anything is missed..
Thanks for your guide. I appreciate your persistence.
We must try relentlessly to get working stuff!
Incredible work testing GSI's, I might flash myself to test out
Snapshots!
Attaching few snapshots for the build and successful flash.
Akhil99 said:
Thanks for your guide. I appreciate your persistence.
We must try relentlessly to get working stuff!
Incredible work testing GSI's, I might flash myself to test out
Click to expand...
Click to collapse
Thanks mate. This guide should work on M30 all variants, ideally.
I will post once PHH gives an update and see how it goes with Dirty Flash or if I need to flash it again. Hopefully dirty flash should work.
vdbhb59 said:
Thanks mate. This guide should work on M30 all variants, ideally.
I will post once PHH gives an update and see how it goes with Dirty Flash or if I need to flash it again. Hopefully dirty flash should work.
Click to expand...
Click to collapse
Which gsi did you flash? I will flash the same for first boot for safety...
And also make a telegram group for samsung m30, so others can post their problems.
nareshfree said:
Which gsi did you flash? I will flash the same for first boot for safety...
And also make a telegram group for samsung m30, so others can post their problems.
Click to expand...
Click to collapse
I flashed the GSI by PHH (phhusson), the FLOSS one.
https://github.com/phhusson/treble_experimentations/releases
There are few groups on TG. I am no longer on TG (left a week/2 ago). I am available here for anything.
System partition or System image?
veekay said:
System partition or System image?
Click to expand...
Click to collapse
Flash as /system image.. By system partition I meant the /system portion of the OS.
Any chance you would be able to take a screenshot of the partition list that is shown after you select the image? I am trying to do this on another Samsung device and am wondering if the issue comes down to the TWRP options shown as I don't have just System - only System Image
veekay said:
Any chance you would be able to take a screenshot of the partition list that is shown after you select the image? I am trying to do this on another Samsung device and am wondering if the issue comes down to the TWRP options shown as I don't have just System - only System Image
Click to expand...
Click to collapse
It is the system image. Dont have Samsung turned on or fully setup to give snap.
There you go.. /system image..
One suggestion. Even with GSI do not try to flash any experimental zips from say Android 9 on Android 10. I just landed on bootloop and had to reflash system Magisk and DM again.
I switched to Havoc. Much more stable and has loads of features..
Couple of Havoc snaps..
vdbhb59 said:
Couple of Havoc snaps..
Click to expand...
Click to collapse
How is your use at hovac ?? Is the lock screen working?
Can you make and receive calls normally?
MiyamuraNEET said:
How is your use at hovac ?? Is the lock screen working?
Can you make and receive calls normally?
Click to expand...
Click to collapse
Nope for both. Calls only on 2G, not even 3G. Audio on speakers is not working. SMS on LTE does not work, but works only on 3G or 2G.
If anything is moved manually to /priv-app or /etc it bootloops on the next reboot.
vdbhb59 said:
Nope for both. Calls only on 2G, not even 3G. Audio on speakers is not working. SMS on LTE does not work, but works only on 3G or 2G.
If anything is moved manually to /priv-app or /etc it bootloops on the next reboot.
Click to expand...
Click to collapse
This is a matter of time soon customs will appear!
MiyamuraNEET said:
This is a matter of time soon customs will appear!
Click to expand...
Click to collapse
True. Just waiting for it. Will see if I can get to help Akhil, Sahil and Aditya.
Flashing the GAPPS build works only until one reboot after which the phone goes into boot loop. also, VOLTE does not work.
thvardhan said:
Flashing the GAPPS build works only until one reboot after which the phone goes into boot loop. also, VOLTE does not work.
Click to expand...
Click to collapse
I do not use gaaps, so not sure, but it does stick around on several reboots as well. Only time it will go to bootloop if you try to manually place any file within "/system/app" and "/system/priv-app" folders. Somehow, it ticks boot and does not start beyond Android logo.
could you please tell which phh to download exactly
vdbhb59 said:
Hi All,
Today I successfully flashed the PHH GSI on my Samsung M305F. Sharing the guide on how to?..
Prerequisites:
1. Android 10 May Security Patch (June release). Get it here. Be on stock firmware, non rooted.
2. PHH/Havoc or any GSI you wish to flash. I suggest PHH one as it is regularly updated and has inbuilt FLOSS/FOSS apps build too, other than Vanila, GApps build too. Choose the GSI from the list here. Boot with AB only.
3. PHH Magisk (this is a modified Magisk for GSI images, and should work on any GSI). Please do not use any other Magisk or SuperSU for initial flash, else you will not boot. Trust me, I tried several time, and does not boot. Get the PHH Magisk here or here.
4. DM-Verity file. Download from here, here or check here for further reading.
5. TWRP for Android 10 for Samsung M30. Get it here or here.
6. USB-OTG. See #6 below for reason.
Instructions:
1. Flash Stock ROM from #1 above.
2. Ensure that you are connected to internet/mobile data so that OEM unlock option is visible. If not connected to Internet, OEM unlock will not show, as it needs to check over Samsung servers on start.
3. Wait for 15 minutes for KG state to check servers (this time frame can be less or more depending on your internet connection). Mine was 3-4 minutes. This is important for the next steps.
4. Reboot to download mode and flash the TWRP from ODIN, by selecting it in AP (auto-reboot should be unchecked). The full steps are available in the XDA post linked in #5 above.
5. Reboot to TWRP, and format data (not wipe). Reboot to TWRP again. This step is important for recovery to not get overridden by the stock recovery.
6. MTP on recovery and upon boot somehow still does not work on Linux or Windows, so copy your relevant files on USB-OTG. Akhil and Sahil are working on the recovery part of it. For normal system, that is an issue with all GSI's somehow.
7. Wipe /data, /cache and /internal storage, and then mount /data and /usb-otg.
8. Ensure /system and /vendor are not mounted, and only /data and /usb-otg are mounted. You can copy the files over from OTG to internal sd card, or directly work from OTG itself. Up to you.
9. Do not wipe anything else, and just flash as follows:
a. Flash the GSI Image (.img) file in /system partition from recovery.
b. Flash the Magisk PHH file given in the link above.
c. Flash the DM-Verity file from the link above.
10. Wipe dalvik/cache. Reboot to system.
Boot time should not be much, if you follow the steps properly. Mine took 3-4 minutes.
Post boot:
1. Inbuilt SuperSU will give binary error/update prompt. Not needed, and ignore it.
2. Once you have setup Magisk, you can then upgrade both manager and magisk itself. It will not bootloop. But for initial flashing use the Magisk given in the link, and no other, else you will bootloop.
3. MTP does not work. VoLTE, I am yet to check, so if someone can confirm that, it will be good.
4. USB-OTG works. So, you will have to use it for any file copying etc. Please format USB-OTG once from the phone, as it will otherwise give USB Error and your time would be wasted. So format from mobile first and then copy anything to USB.
5. I did not find any bugs till now. Not sure, if any present or not, as I booted today only, after 8 failed weeks.
VoLTE Fix: https://github.com/KhushrajRathod/VoLTE-Fix/
Credits:
1. Sahil_Sonar and Akhil99 for the working TWRP (finally)
2. MiyamuraNEET for helping me with flashing GSI, and giving me the link for correct DM-Verity. No other DM-Verity works.
3. phhusson for making a working GSI (especially FOSS/FLOSS one).
4. Samsung for making a BLOAT FILLED OS.
5. turbolukex5 for PHH Magisk.
6. vdbhb59 (of-course me) for not giving up, and for keeping on trying for the last 8-9 weeks..
Let me know if anything is missed..
Click to expand...
Click to collapse
It would be very kind of you if yould could tell me exactly which phh to download from github?
---------- Post added at 09:34 AM ---------- Previous post was at 08:46 AM ----------
vdbhb59 said:
Hi All,
Today I successfully flashed the PHH GSI on my Samsung M305F. Sharing the guide on how to?..
Prerequisites:
1. Android 10 May Security Patch (June release). Get it here. Be on stock firmware, non rooted.
2. PHH/Havoc or any GSI you wish to flash. I suggest PHH one as it is regularly updated and has inbuilt FLOSS/FOSS apps build too, other than Vanila, GApps build too. Choose the GSI from the list here. Boot with AB only.
3. PHH Magisk (this is a modified Magisk for GSI images, and should work on any GSI). Please do not use any other Magisk or SuperSU for initial flash, else you will not boot. Trust me, I tried several time, and does not boot. Get the PHH Magisk here or here.
4. DM-Verity file. Download from here, here or check here for further reading.
5. TWRP for Android 10 for Samsung M30. Get it here or here.
6. USB-OTG. See #6 below for reason.
Instructions:
1. Flash Stock ROM from #1 above.
2. Ensure that you are connected to internet/mobile data so that OEM unlock option is visible. If not connected to Internet, OEM unlock will not show, as it needs to check over Samsung servers on start.
3. Wait for 15 minutes for KG state to check servers (this time frame can be less or more depending on your internet connection). Mine was 3-4 minutes. This is important for the next steps.
4. Reboot to download mode and flash the TWRP from ODIN, by selecting it in AP (auto-reboot should be unchecked). The full steps are available in the XDA post linked in #5 above.
5. Reboot to TWRP, and format data (not wipe). Reboot to TWRP again. This step is important for recovery to not get overridden by the stock recovery.
6. MTP on recovery and upon boot somehow still does not work on Linux or Windows, so copy your relevant files on USB-OTG. Akhil and Sahil are working on the recovery part of it. For normal system, that is an issue with all GSI's somehow.
7. Wipe /data, /cache and /internal storage, and then mount /data and /usb-otg.
8. Ensure /system and /vendor are not mounted, and only /data and /usb-otg are mounted. You can copy the files over from OTG to internal sd card, or directly work from OTG itself. Up to you.
9. Do not wipe anything else, and just flash as follows:
a. Flash the GSI Image (.img) file in /system partition from recovery.
b. Flash the Magisk PHH file given in the link above.
c. Flash the DM-Verity file from the link above.
10. Wipe dalvik/cache. Reboot to system.
Boot time should not be much, if you follow the steps properly. Mine took 3-4 minutes.
Post boot:
1. Inbuilt SuperSU will give binary error/update prompt. Not needed, and ignore it.
2. Once you have setup Magisk, you can then upgrade both manager and magisk itself. It will not bootloop. But for initial flashing use the Magisk given in the link, and no other, else you will bootloop.
3. MTP does not work. VoLTE, I am yet to check, so if someone can confirm that, it will be good.
4. USB-OTG works. So, you will have to use it for any file copying etc. Please format USB-OTG once from the phone, as it will otherwise give USB Error and your time would be wasted. So format from mobile first and then copy anything to USB.
5. I did not find any bugs till now. Not sure, if any present or not, as I booted today only, after 8 failed weeks.
VoLTE Fix: https://github.com/KhushrajRathod/VoLTE-Fix/
Credits:
1. Sahil_Sonar and Akhil99 for the working TWRP (finally)
2. MiyamuraNEET for helping me with flashing GSI, and giving me the link for correct DM-Verity. No other DM-Verity works.
3. phhusson for making a working GSI (especially FOSS/FLOSS one).
4. Samsung for making a BLOAT FILLED OS.
5. turbolukex5 for PHH Magisk.
6. vdbhb59 (of-course me) for not giving up, and for keeping on trying for the last 8-9 weeks..
Let me know if anything is missed..
Click to expand...
Click to collapse
when I am installing twrp and then formating data and the rebooting to system it is causing bootloop.Please help

General GSI's

So I know this device hasn't really seen much in the way of development yet. But I was hoping to get a thread started on GSI's. If anyone does happen to get a GSI flashed that works for them even if buggy.
Please post here which GSI you were able to boot and bugs as you find them.
@AndyYan listed a root method here:
AndyYan said:
Just a quick heads-up.
unlock token - OnePlus (United States)
www.oneplus.com
By the way, to root without readily available stock firmware, first unlock bootloader, then boot a pre-rooted GSI with DSU Sideloader, pull stock boot partition from there, and finally patch/flash it. This applies to the Open variant as well.
Click to expand...
Click to collapse
as AndyYan mentioned, DSU sideloader is a great tool for testing GSI's without permanently flashing them.
here is a list of GSI's that may or may not work on the device, i have tested some and you may want to as well.
Generic System Image (GSI) list
Notes about tinkering with Android Project Treble. Contribute to phhusson/treble_experimentations development by creating an account on GitHub.
github.com
Already did, even made an overlay. Why else you think I'd be hanging around this forum?
However, quote me in your other thread...
AndyYan said:
...having tried GSIs on both, I felt N20 was weirdly stuttery/unresponsive for its specs.
Click to expand...
Click to collapse
OPlus did a bad job with its kernel/vendor, and GSI on N20 is actually slower than N200 (slightly lower-specced, and has a 90Hz display to tow). I even bought another SD695 device (from Moto) just to see if it's SD695 itself that's awful, but nope, Moto's handled GSIs swiftly even on 120Hz.
AndyYan said:
Already did, even made an overlay. Why else you think I'd be hanging around this forum?
However, quote me in your other thread...
OPlus did a bad job with its kernel/vendor, and GSI on N20 is actually slower than N200 (slightly lower-specced, and has a 90Hz display to tow). I even bought another SD695 device (from Moto) just to see if it's.......
Click to expand...
Click to collapse
Could you be more specific as for which GSI's you were able to boot? To be honest this whole treble, GSI stuff is new to me. Can we now simply flash any GSI without worrying about bricking the device? After this morning's mistake I don't want to rush into anything. I would like to flash a prerooted GSI as you mentioned in another thread but I don't want to flash something that I'm gonna have to spend a lot of time trying to repair something when I could avoid breaking it in the first place lol.
Seems like by the time I really start to understand a device, it's time to upgrade and more has changed in the mobile worlf than I have the time/capacity to get familiar with.
I need to get root on my broken device to attempt to repair it
To your worries of messing up, I answer DSU Sideloader (again, already did), which is a way to temporarily boot GSIs; pretty self-explanatory otherwise.
But if you can't boot right now, I'm afraid your #1 priority is to get it flashed back to stock reliably. My advice is don't rely on backups/dumps from others unless you know exactly which build you have (e.g. you noted down the stock "OTA number" - in which case even I can help you). Either get the customer service to do a remote session or just send it in.
PsYk0n4uT said:
Upon Searching the forums for the N10, it's unadvisable to flash a magisk patched boot.img as it breaks radios. I can attest to this as well as I did the same this morning along with a few other members.
Click to expand...
Click to collapse
I feel you just flashed some mismatching (variant/version) image...
It boots, just no radios. As for DSU, guess I just need to do some more reading. Sorry if some of this seems obvious to you, I just seem to spend so much time pouring through so much information that some of it gets to be confusing, especially when I'm researching for school at the same time. I'm working on IT certs and I think maybe the years of scouring the net and these forums too for the many other devices has left my memory a mess, wish I could remember everything I've read but my ADHD kicks in midway through anything I set out to do and I go down rabbit holes that come out somewhere far from where I started. Hopefully you guys will remain patient with my questions. Im trying to learn and mistakes seem to be the way I have always learned. Break something and fix it. Lol. But I do have the drive to do whatever it takes to fix what I break. Curiosity has always been my friend.
And as for the mismatching image, my first intuition was the same. I doubt i won't be able to fix it eventually. For now it's a project that gives me more motivation to learn.
As discussed separately you've already fixed the device and got up to rooted stock. You can now proceed to try out DSU Sideloader. The app itself isn't complicated, and the GitHub page has a readme too.
Thanks. Yeah I'm not sure. I guess something was different or wrong with the boot image I flashed. Another thread on the N10 mentioned that the magisk patched boot images broke wifi and Bluetooth for some reason. But I'm not having any issues so far with the magisk patched image of what I can confidently say is the right boot image
DSU Sideloader has been an awesome tool for sideloading and testing GSI's most GSI's work if not buggy but i have actually noticed performance Improvemtn in some. i particularly like crdroid even though the launcher crashes
Would love to get Kali ported. Too many issues with permissions on stock ROM
AndyYan said:
As discussed separately you've already fixed the device and got up to rooted stock. You can now proceed to try out DSU Sideloader. The app itself isn't complicated, and the GitHub page has a readme too.
Click to expand...
Click to collapse
If you got DSU to work on the N20 what settings did you use and which GSI? I've tried PHH, Lineage 19.1 and PixelplusUI...left the userdata to 2GB and every time I'm given the option to "restart" to boot into it, it just reboots the phone.
famewolf said:
If you got DSU to work on the N20 what settings did you use and which GSI? I've tried PHH, Lineage 19.1 and PixelplusUI...left the userdata to 2GB and every time I'm given the option to "restart" to boot into it, it just reboots the phone.
Click to expand...
Click to collapse
use dsu sideloader not the built-in one. see the dsu sideloader github page for instructions. ive actually flashed pixel experience so i know that one works. i used crdroid in dsu sideloader...... someone else mentioned they used lineage. for unrooted devices ...
DSU Sideloader by VegaBobo:
GitHub - VegaBobo/DSU-Sideloader: A simple app made to help users easily install GSIs via DSU's Android feature.
A simple app made to help users easily install GSIs via DSU's Android feature. - GitHub - VegaBobo/DSU-Sideloader: A simple app made to help users easily install GSIs via DSU's Android feat...
github.com
​
PsYk0n4uT said:
use dsu sideloader not the built-in one. see the dsu sideloader github page for instructions. ive actually flashed pixel experience so i know that one works. i used crdroid in dsu sideloader...... someone else mentioned they used lineage. for unrooted devices ...
DSU Sideloader by VegaBobo:
GitHub - VegaBobo/DSU-Sideloader: A simple app made to help users easily install GSIs via DSU's Android feature.
A simple app made to help users easily install GSIs via DSU's Android feature. - GitHub - VegaBobo/DSU-Sideloader: A simple app made to help users easily install GSIs via DSU's Android feat...
github.com
​
Click to expand...
Click to collapse
That's the one I installed. V1.03 on the github. adb pushed the GSI's to sdcard and then did the install do a directory called "dsu" on internal storage. Left everything default...got through install including running the adb command but when time to restart it showed the metro logo and then just rebooted. Thought I might not be giving enough userdata or something.
famewolf said:
That's the one I installed. V1.03 on the github. adb pushed the GSI's to sdcard and then did the install do a directory called "dsu" on internal storage. Left everything default...got through install including running the adb command but when time to restart it showed the metro logo and then just rebooted. Thought I might not be giving enough userdata or something.
Click to expand...
Click to collapse
did u restart through the notifications?
and do the adb command it asks u to do if your not rooted?
i just downloaded the gsi's on-device and used from internal storage but i dont think that should make a difference. and as for userdata thats up to you. if im gonna be in a gsi for a while. and especially if you wanna pull your backups your gonna need around 20gb of userdata to hold those backups unless you plan on dd'ing them to external storage in shell or something. actually i set my default userdata to 32gb in settings so i dont have to remember to do that. but usually if im testing in a GSI i plan on being in there for a while and dont want to end up wanting/needing the space and then not having it. you dont have to do 32gb but your gonna need 15gb or so for backups if you pull a full system backup, which i HIGHLY recommend and you may as well do it while your getting the boot image and do it all at once. i made a post on DSU sideloader. maybe this is good info for that thread.
also can you tell us what security patch your on and if you GN2200 or CPH2459
PsYk0n4uT said:
did u restart through the notifications?
and do the adb command it asks u to do if your not rooted?
i just downloaded the gsi's on-device and used from internal storage but i dont think that should make a difference. and as for userdata thats up to you. if im gonna be in a gsi for a while. and especially if you wanna pull your backups your gonna need around 20gb of userdata to hold those backups unless you plan on dd'ing them to external storage in shell or something. actually i set my default userdata to 32gb in settings so i dont have to remember to do that. but usually if im testing in a GSI i plan on being in there for a while and dont want to end up wanting/needing the space and then not having it. you dont have to do 32gb but your gonna need 15gb or so for backups if you pull a full system backup, which i HIGHLY recommend and you may as well do it while your getting the boot image and do it all at once. i made a post on DSU sideloader. maybe this is good info for that thread.
also can you tell us what security patch your on and if you GN2200 or CPH2459
Click to expand...
Click to collapse
I did restart through the notification and yes I did the adb command for non root. I left it as 2gb strictly because I was testing. Once I had one up and running I planned to up the space for a backup. It's currently on the may security update and I have not given it access to wifi or sim to prevent updates till I could take a backup. (well they didn't INCLUDE a sim card with my order and I'm still waiting on a replacement. Trying to use the metro sim from my n200 order did NOT work so guess it's locked to that phone). When you mention Pixel Experience do you mean this one? https://forum.xda-developers.com/t/gsi-unofficial-12-pixel-experience.4354695/
This pixel experience GSI failed to even install after running the adb command with userdata set to 32GB. Space shouldn't be an issue given it's freshly setup with ONLY DSU sideloader added via adb install. I'd like to know what you are doing different to make DSU sideloader work. I'll try moving the image to the internal storage instead of external sdcard.
I factory reset the n20...did offline setup, added dsu sideloader and the lineage GSI and followed the instructions only to have it just say "install failed" now...I give up for now. Has anyone still on MAY firmware had DSU work for them? Perhaps I HAVE to let it update. Is August firmware still A11?

Categories

Resources