Custom Rom flashed through Stock Recovery - Samsung Galaxy J7 Questions & Answers

I was working on a J727P. I had just flashed the factory binary combination file. I had a custom rom for lineage on a external sdcard for this device. I rebooted to the stock recovery from the factory binary system. I scrolled down to the update from sdcard and selected the custom rom. To my surprise it began to flash the zip, it actually completed the flash and upon reboot loaded the custom rom. No root was flashed, No ENG files of anykind either. If the combination file selinux is permissive whats to stop flashing of custom rom on any device that doesnt have a custom recovery? it didnt cause any dmverity fail , or oem signature fails.

deshaney said:
I was working on a J727P. I had just flashed the factory binary combination file. I had a custom rom for lineage on a external sdcard for this device. I rebooted to the stock recovery from the factory binary system. I scrolled down to the update from sdcard and selected the custom rom. To my surprise it began to flash the zip, it actually completed the flash and upon reboot loaded the custom rom. No root was flashed, No ENG files of anykind either. If the combination file selinux is permissive whats to stop flashing of custom rom on any device that doesnt have a custom recovery? it didnt cause any dmverity fail , or oem signature fails.
Click to expand...
Click to collapse
That's because the Lineage build for the J727p spoofs the OTA signature check. Nothing stops it. I believe it's just time consuming to implement. You'll get a really good idea what's going on if you compare the scripts in the Perx's Lineage build to an OTA. If you need or want to dig around in a fota.zip, the password is fotatest1234.

Awesome. Thanks for that insight.

Related

[Q] How to undo the kernel patch from CFAR's initial method?

I put LRX21O on my N5 by sideloading the factory image (incl the fresh cache and userdata images). Worked fine!
I used ChainFire's first(?) Lollipop Autoroot package. I don't see a version in there, but all its files are dated 11/14. As I understand it, that method needed to patch the kernel to keep root.
His new package (as of 11/25) uses another method, allowing the kernel to remain stock. I did not run the new CFAR, but I let SuperSU update from the market and update the SU binary ("normal" method, not booting into recovery).
My questions:
Did that also undo the kernel patching from the earlier root retention method?
If not, how do I go back to the stock kernel without losing any data?
Thanks! Hope these aren't dumb-ass questions.
Well as far as I know Cf auto root just booted into another customised kernel by chainfire and then rooted the system. It didn't flash a new kernel. Maybe he changed the ramdisk. Not sure about that. But since nothing got flashed I doubt he changed even that.
On how to flash stock kernel just use flashify to flash the img or do it using fastboot.
Code:
fastboot flash boot boot.img
My understanding is that the ramdisk was changed, so that means the boot partition has been edited.
I just did a fastboot flash of the image:
Code:
fastboot flash boot boot.img
If you're really concerned, you can also flash system and re-root using the newer SuperSU ZIP. Flashing boot or system doesn't wipe data. I didn't bother with re-flashing system. No ill effects as far as I can tell.
Code:
fastboot flash system system.img
I've just flashed boot and system.
Then I had to reflash twrp.
Finally SuperSU. All working fine

Flashing an OTA with FlashFire while also having MultiROM installed can break things

At least, I think this is what happened and I'm not willing to try again to test it. It could have been the custom kernel I installed with MultiROM (it does say that having a custom kernel when flashing can cause it to fail). Like an idiot, I didn't make a backup before letting FlashFire do it's thing. I fixed it by dirty flashing OTA 4.0 from MidgetMob's Stock Recovery Image and OTA Library and letting TWRP inject MultiROM. I do not recommend dirty flashing to fix things, I'm just saying what I did.
What I should have done:
Made backups with TWRP and Titanium
Downloaded the ROM as a ZIP from MidgetMob's library
Flashed it with TWRP. Please correct me if I'm wrong but I believe dirty flashing would have been ok since it's flashing an Android update and not a seprate ROM
Flashed the latest SuperSU ZIP (again from MidgetMob's library)
Let TWRP inject MultiROM
Boot, do not let TWRP reroot your device, you already flashed SuperSU and SuperSU says specifically to not have TWRP root your device
It might boot loop once or twice, just let it do it's thing and it will boot

TWRP Flashing Custom Roms Zip Files Error

Hello XDA Developers
I have been trying to flash a custom rom on my Google Pixel which is running Android Oreo and I have gotten as far as unlocking the bootloader and installing TWRP. How ever when I attempt to flash any zip file it just says error installing zip and I have no idea what's going on. TWRP sometimes even has trouble mounting the proper partitions so it's a bit of a hit and miss. Id really like to install a custom ROM. I thought maybe it was a bad zip file but I have tried several different ROMs and they all throw up the same error.
Update: Okay I have figured out that installing newer versions of TWRP doesn't work with some of the ROMs and it's better to use the older versions but you have to figure out which one that is if they don't tell you. I was able to successfully install a custom ROM.
Dunno if this advice is any good but don't set a pin code or password on the phone leave it unlocked it's easier for TWRP to read the partitions that way.

Full steps on how to take OTA updates when rooted with Magisk, TWRP & Custom Kernel?

Full steps on how to take OTA updates when rooted with Magisk, TWRP & Custom Kernel?
I tried to take the 5.1.6 OTA by using these steps: https://github.com/topjohnwu/Magisk/blob/master/docs/tips.md but it didn't work properly.
Could someone give me a list of the full steps that will keep Magisk, TWRP and Blu Spark Kernel installed? When I did the steps above it kept Magisk after rebooting, but didn't keep the custom kernel, so I rebooted to recovery to reinstall the kernel. However it was replaced with OxygenOS Recovery and it automatically wiped my device.
There is no way for you to take OTA with twrp and kernel persisted.
You need to understand how update works. Apparently, the update replaces your boot partition and your kernel is exactly implemented in the boot partition.
The changes will get overwritten. Thus, you will need to reinstall the kernel by yourself.
And as what I just mentioned, there is no specific recovery partition on A/B partitioning method. When boot partition get overwritten, the twrp will also be replaced by the stock recovery.

OB10 to custom roms

Hi there, can someone enlighten me how yo flash custom roms?my device already unlocked bootloader and i know how to flash cuz i play with xiaomi mi5, sams galaxy3 , sony x8.
For now i dont have a twrp. Im going twrp by fastboot before this.
Im really sure that i already go through all of the post. But seems from OB10 is really complicated.
1.ready fastboot twrp, bluspark twrp,roms, gapps and magisk( if necessary) and custom kernel
2.fastboot twrp by cmd or else
3.wipe what here? Or just factory reset and leave internal storage?
*Here i confused, do i need to wipe for both slot. Im still new to a/b partition. And do i need to do that for both slot to flash as steps 4-10 as below?
4.flash roms then bluspark twrp
5.reboot to recovery
6.flash gapps,magisk? Then twrp back?
7.reboot to twrp
8.flash custom kernel then twrp again?
9.reboot system
10. End right?
Please help me here. I cant find the real and proper steps. The only way i found is from OB7 to custom roms as they share same security patch.
Thanks for any help.
1. Flash any strock rom.zip partition A.
2. After that recovery.zip
3. Reboot back to recovery
4. Confirm you are in another slot B
5. Flash stock rom.zip. Which slot first is not important.
6. After that flash recovery.zip and then reboot.
After that you can install whatever you want.
That what I do if im switching roms and trying new stuff.
Working everytime.
Until OB7 and stable 9.0.2 I used fasboot roms, flashed via AIO tool, but new fastboot roms working different and I got laggy video and audio.
Okeh thats clear for both slot. But for OB10 to any customs rom is it needed to flash OB7?
What do you mean by stock rom?bete rom or stable rom?
slayerliar said:
Okeh thats clear for both slot. But for OB10 to any customs rom is it needed to flash OB7?
What do you mean by stock rom?bete rom or stable rom?
Click to expand...
Click to collapse
Stock any offical rom for OP6
9.0.2 or 9.0.3 or any OB3,4,5,6,7,8,9,10
If you want custom rom, look instructions, there is mentioned what is base rom. That you need flash.
If there is custom rom based OB7 then you need flash OB7(probably working lower builds also)
Thank brotha. I think they need to state which firmware do we need to start from. Otherwise it will be like me that confusing as they will patch up more and more security.
slayerliar said:
Thank brotha. I think they need to state which firmware do we need to start from. Otherwise it will be like me that confusing as they will patch up more and more security.
Click to expand...
Click to collapse
Pie ROM, pie firmware. (Except pre release betas)
Oreo ROM, Oreo firmware.
ROM - always flash latest firmware of the OS you want pie or Oreo (I always go for latest and don't have any issues . Tho I'm back to oos ,debloated now.)
Twrp - Always after ROMs, before roboot.
Gapps - after twrp and reboot, to make sure it installs to the right slot, that's why you install twrp and then reboot.. this will change your slot from A to B or from B to A. Manual switch is never necessary
Flashing gapps flashes to the slot you are in right now, so flashing before the first reboot (after twrp flash) Will get it to the wrong slot.
Magisk - if you want root. After all.
After all this you can, if you want, flash decrypt ..if you don't need your device to be encrypted,this Will give you more to think of tho.. let's just not go into this now.
i understand the process, but get confused at which file to specifically flash twice when they say
"latest firmware of the OS". So lets say the custom ROM i want to flash needs a PIE firmware 9.0.2 or higher,
what file am i supposed to flash?
9.0.2-PIE-OnePlus6Oxygen_22_OTA_027_all_1810260000_d46787d2c9-FASTBOOT.zip
or
OnePlus6Oxygen_22_OTA_027_all_1810260000_d46787d2c9.zip

Categories

Resources