Related
Update:
Solved.
EMUI8 using split sepolicy, there isn't sepolicy in ramdisk.img, you get get sepolicy from vendor.img /etc/selinux/precompiled_sepolicy and rename it to sepolicy.
when patching sepolicy using supolicy, add --sdk=26 or it won't work.
Code:
adb shell
su
supolicy --file /sdcard/sepolicy/sepolicy /sdcard/sepolicy/sepolicy_out --sdk=26
My model is Honor V10(EMUI8.0 with Oreo8.0)
Since there is not a custom recovery , so i have to make a boot.img with supersu inside to root.
But I came up with two problems:
1. i found no article about how to patch init manually, so i have to get the init from mate 10's root boot.img, but i'd like to learn how to patch the init manually
2. i patch the sepolicy , but it seems not work
the stock vendor.img/etc/selinux/precompiled_sepolicy is here
my patched sepolicy is here.
I will describe all my detail modifications below, please someone point out where i did wrong. Thanks thanks a lot:good::good::good:
This is my stock boot.img, i get it from the official full-ota update files
This is my modified boot.img
All i modified is listed below:
1. Unzip the update.zip
2. Unpack it with Huawei Update Extrator
3. Extract ramdisk.img, vendor.img, recovery_ramdis.img
4. Unpack ramdisk with bootimg.exe
5. replace init
6. copy res/.su dir
7. copy /sbin/fbe_bypass.sh /sbin/launch_daemonsu.sh /sbin/tar
All the files above i get from @mankindtw 's mate 10 's root boot.img)
8. patch sepolicy which i get from vendor.img /etc/selinux/precompiled_sepolicy and recovery_ramdis.img
on a rooted phone (supersu 2.82 sr5) and patch sepolicy follow this guide
9. rename the patched sepolicy to sepolicy and put into initrd(this is bootimg.exe's unpack dir)
10. modify the cpiolist.txt file, add the added dirs and files
11. repack the bootimg with a name boot-root-b122.img
12. fastboot flash ramdisk boot-root-b122.img
But it does not work, i can't get root.
I've tried to replace other's sepolicy , and it can get root right, but have some other issues( Looking at the screen, it will keep turning on does not work)
So anybody can point what should i do ?
How to patch the stock sepolicy right?
How to patch init manually?
Is there any other mistakes i've taken?
You can take a look at this boot image. Its taken from a KangVip P10 Oreo Rom. He patch his kernel too for rooting.
Maybe it helps.
https://www.androidfilehost.com/?fid=745849072291699627
If there's anyone out there with some experience of rooting, and your reading and wanting to know if it's possible to update to the very latest Android 9 Pie on the Samsung Galaxy Active Tab2 (SM T395).
https://www.sammobile.com/samsung/g...are/SM-T395/BTU/download/T395XXU4CSF1/275287/
Well I can confirm it's possible as I have just done it. :good:
Make sure OEM unlock is on > developers page
Make sure USB debugging is on
Make sure FRP lock is off i.e no google accounts attached to device
Install Magisk apk on your device and patch the boot.img ( remove the boot.img from the boot.img.LZ4 file from the stock AP)
Software needed to remove the boot.img file from the LZ4 file - https://glamourrom.eu/how-to/extract-lz4-image/
Convert the patched boot.img into a recognisable MD5.tar file
Software needed to make MD5.tar file - http://www.droidthunder.com/convert-img-to-tar-md5/
Then reflash the patched boot.img using Odin on PC.
You DO NOT NEED TO RE COMPRESS TO LZ4 file !
Your device will show a verification reset page, all data on your device will be reformatted. :crying:
Nice quick and easy method for those of you who know what your doing
If you don't know what your doing, then don't try.
Happy rooting :good:
Hi tsam19,
Thank you for your guide.
With extracting the lz4 image, do you extract it to boot.img or boot.img.ext4?
When I try to reflash the patched boot.img it freezes on boot.img. any ideas?
[UPDATE/KEEP ROOT GUIDE] OCT 2020 (RP1A.201005.004) "FLAME" Magisk/Stock Boot Images
IF YOU ARE STILL ON AUGUST (ANDROID 10/Q) BUILD, PLEASE FOLLOW THE SEPTEMBER GUIDE (click here) FIRST! AND READ ALL WARNINGS AND ADDITIONAL INFO IN FIRST 2 POSTS!
PLEASE NOTE: I STILL HAVE NOT UPDATED TO ANDROID 11 YET, SO PLEASE FLASH AT YOUR OWN RISK AS ASSISTANCE FROM ME WILL BE VERY LIMITED. PLEASE BE KIND TO ONE ANOTHER AND HELP EACH OTHER OUT!
PLEASE DROP A THANKS IF YOU STILL FIND THESE GUIDES HELPFUL! :good:
IMPORTANT!! THESE FILES / THIS THREAD IS FOR PIXEL 4 "FLAME" ONLY, NOT PIXEL 4 XL "CORAL"!!
**IT IS HIGHLY RECOMMENDED TO PATCH THE STOCK BOOT IMAGE YOURSELF, FROM YOUR OWN DEVICE, USING MAGISK MANAGER. WHILE THERE'S A GOOD CHANCE THE FILE I PROVIDED BELOW WILL BE IDENTICAL (USE A FILE HASH CHECKSUM TOOL IF YOU'RE CURIOUS), THERE IS ALSO A CHANCE THEY MAY HAVE SMALL, BUT SIGNIFICANT, VARIANCES**
Thanks for the info and link, @wrongway213
Link to @topjohnwu's post: https://twitter.com/topjohnwu/status/1272136975022084097?s=19
ALL FILES BELOW ARE FOR "RP1A.201005.004, Oct 2020"!
Magisk Canary v21.0 Patched Boot Image: https://www.androidfilehost.com/?fid=10763459528675562385
Factory Untouched Boot Image: https://www.androidfilehost.com/?fid=10763459528675562112
Factory Untouched DTBO Image: https://www.androidfilehost.com/?fid=10763459528675562113
[SAFETYNET INFO]: Again, I'm not updating myself yet, so I'm not sure about this. I will update this info as others report back. On Android 10, using the MagiskHide Props Config module (or an alternate module created by Displax, though I prefer Didgeridoohan's module) and choosing option 2 - Force BASIC key attestation would force BASIC HW attestation and allow SafetyNet to pass again. This works perfectly for me, and I even run additional mods including EdXposed. I'm not sure if this works on Android 11, and I won't be able to confirm myself for a while. If anybody tries it, please let me know and I'll update this section. The module and info on using it can be found here: https://forum.xda-developers.com/ap...just search for it in the Magisk Manager app.
EASY UPDATE / SEAMLESS KEEP-ROOT UPDATE PROCESS (using a PC - a very intuitive, effective, and relatively safe method).
** You can only follow this guide verbatim if coming EXACTLY from build "11.0.0 (RP1A.200720.009, Sep 2020)". But the general idea is the same for other builds, you just need the correct files for your device.
flame-rp1a.200720.009-factory-dtbo.img: https://www.androidfilehost.com/?fid=10763459528675562111
flame-rp1a.200720.009-factory-boot.img: https://www.androidfilehost.com/?fid=10763459528675562110
September 2020 sideload OTA zip: https://dl.google.com/dl/android/aosp/flame-ota-rp1a.201005.004-9e17c7b4.zip
DO NOT BOOT BACK INTO O/S UNTIL ALL STEPS ARE COMPLETED - THIS ENSURES EVERYTHING BOOTS BACK UP WITH MAGISK / EDXPOSED ALL RUNNING PROPERLY RIGHT AWAY
1. boot into bootloader
----------------
** I was on custom kernel, so I needed to flash BOTH the stock boot and dtbo images
2. fastboot flash boot flame-rp1a.200720.009-factory-boot.img
3. fastboot flash dtbo flame-rp1a.200720.009-factory-dtbo.img
......* these steps to restore stock recovery; dtbo.img also necessary for some kernel installations.
......* won't hurt to flash both anyway, so if you're unsure, go ahead and do both.
-----------------
4. use volume keys to change selection to boot to Recovery Mode
......- when you reach the android symbol with No Command, hold power button, tap volume up, in case you've forgotten
5. choose option "Apply update from ADB"
6. adb sideload flame-ota-rp1a.201005.004-9e17c7b4.zip
7. Once the OTA sideload is done, Reboot to bootloader (you'll also notice it's now on the other slot after OTA flashed)
8. fastboot flash boot flame-rp1a.201005.004-magisk_patched-21.0.img
9. done, start the phone
(Optional - Flash custom kernel. If you had a custom kernel, you need to re-flash it)
This is a 100% seamless update that requires no additional / re-setup of any of my Magisk or EdXposed setups. All of the factory files can be found here https://developers.google.com/android/images. boot.img and dtbo.img are in their corresponding full Factory Image zips, and the ota zip is under Full OTA Images.
-------------------
Issues after updating?
If you end up unable to boot or bootlooping afterwards, you most likely have an old Magisk module that isn't playing nice with the new build. There are 2 main things you can do:
1. Flash the new factory untouched boot image. You will of course lose root, and all modules will be disabled. However, it should at least get you able to boot back up quickly and have a working phone if you're in a bind.
2. I would recommend checking Tulsadiver's thread: https://forum.xda-developers.com/pixel-4/how-to/magisk-modules-disabler-booting-magisk-t3991739
Instead of reverting to stock boot image, fastboot boot (NOT FLASH) Tulsadiver's boot image. This will boot your phone in Magisk Core-Only Mode, with all modules disabled but root retained. From here you can open Magisk Manager and disable suspect modules. Before rebooting, go to Magisk Manager's settings and disable Magisk Core-Only Mode. Once you disable the incompatible module, the phone should boot back up.
- See this post (or thread) for more tips / context / an example: https://forum.xda-developers.com/showpost.php?p=82509691&postcount=16
just want to report happily that i waas able to update to october with no problems using your guide. followed your september guide yesterday and then october today. no problems at all, buttery smooth mate! thanx..!
The instructions are great as a reminder,
I only work on the console every month or two and without the bullet points I wouldn't always be able to finish the update so quickly.
Thank you very much ?
So.. I've rooted and taken OTA's and rerooted dozens of times.. But I finally got around to factory resetting now stable is here. On OCT build, i flash the patched boot img and upon rebooting, Magisk shows I'm still not rooted. Any advice?
Update: Flashed canary debug apk. patched stock boot img, and flashed. now rooted. wierd
What about if I'm not rooted and on the October update for Android 11? I've tried a couple different times to root and I always get a fail when I try to flash the patched boot image.
Hey,
here is a quick guide:
=== you need these websites ===
https://developers.google.com/android/images
https://developers.google.com/android/ota
https://github.com/topjohnwu/magisk_files/tree/canary
step by step
1. download https://github.com/topjohnwu/magisk_files/archive/canary.zip
that's Magisk
2. copy app-debug.apk on your Pixel 4 (XL) and install the app
3. Open an Image (NOT OTA!) with 7-zip, there is another big zip-file inside, extract boot.img and dtbo.img
4. Copy boot.img on your Phone, download-folder, just like Magisk.apk
5. Open Magisk and Patch boot.img -> magisk-patched.img
6. Copy magisk-patched.img on your PC
7. now simply proceed as described in the instructions above.
Nothing can go wrong with these self-patched files
i5lee8bit said:
8. fastboot flash boot flame-rp1a.201005.004-magisk_patched-21.0.img
Click to expand...
Click to collapse
Hey guys, novice rooter here:
Can someone explain this step to me? Where do I get this file from if im on the beta version of Magisk?
Fwaiiiz said:
Hey guys, novice rooter here:
Can someone explain this step to me? Where do I get this file from if im on the beta version of Magisk?
Click to expand...
Click to collapse
load canary magisk apk: https://github.com/topjohnwu/magisk_files/blob/canary/app-debug.apk and install, then update magisk in the app
go to: https://developers.google.com/android/images
read
and download factory image for your pixel phone - 11.0.0 (RP1A.201105.002, Nov 2020) is last image for flame https://dl.google.com/dl/android/aosp/flame-rp1a.201105.002-factory-351561c6.zip
unzip the image, and you get another zip file: image-flame-rp1a.201105.002.zip
unzip image-flame-rp1a.201105.002.zip and you get a file named boot.img
copy boot image to your phone
patch boot image with magisk - you have made the magisk patch yourself ? now copy the magisk-patched.img from your phone to your pc, that's the file you ask for, but for the November Update
I hope you can now Update all you want
Here are all the boot.img and recovery.img of OxygenOS 11.0.0. Since TWRP isn't ready yet, I guess a lot of people need it if they didn't keep their root permissions.
As I only have a EU device I can only provide a patched boot.img for that device. But with the original .img files it should be easy to patch and flash it yourself. To make it clear: boot.img and recovery.img are stock unless said otherwise. They've just been extracted from the payload.bin inside the respective OOS update zip file.
OOS 11.0.0 EU:
boot.img
boot.img (Magisk v22 patched)
recovery.img
OOS 11.0.0 GLOBAL:
boot.img
recovery.img
OOS 11.0.0 INDIA:
boot.img
recovery.img
Please note: I'm not responsible for anything you do to your device. You use these files at your own risk. I will not provide any further .img files nor ask me for patched files. Any contribution with patched boot.img files is welcome of course. Also note although I'm a moderator, this thread is neither official nor in any way more or less trustworthy than any other contribution by other awesome members!
Would I be able to keep my phone rooted with this after updating?
This is very useful
thanks
jman12311 said:
Would I be able to keep my phone rooted with this after updating?
Click to expand...
Click to collapse
No, unless you use the Magisk patched EU version. Otherwise always install the update, then use the Magisk Manager to patch the inactive slot and then (only then!) reboot. Then you'll keep root.
Otherwise use the stock boot.img and patch with Magisk Manager. Then flash the patched image via fastboot. There are plenty of tutorials on XDA
Hi i installed the update already but didn't reboot what is the solution to keep root ?
Janusk22 said:
Hi i installed the update already but didn't reboot what is the solution to keep root ?
Click to expand...
Click to collapse
1. Install Magisk manager app
2. Open the app and choose "Install to inactive slot (After OTA)"
3. Reboot!
already now i have a magisk module who is making bootloop i already have access to adb via recovery how to remove it
Janusk22 said:
already now i have a magisk module who is making bootloop i already have access to adb via recovery how to remove it
Click to expand...
Click to collapse
Use USB debugging and a PC with the code:
Code:
adb wait-for-device shell magisk --remove-modules
If USB debugging isn't enabled, flash the stock boot.img (without root), boot it, enable ADB debugging and allow the connection to the PC. Then flash the patched boot.img and execute the command above
That is assuming you have a OnePlus 7T Pro which doesn't have a decryptable recovery. Otherwise you can simply flash the Magisk uninstaller
But i have a error I think that i cannot write in system
I have always : cannot be accessible
Thanks i just had to run the command when i rebooted
Is just me or GPS takes more time to "fix" satellites?
FSadino said:
Is just me or GPS takes more time to "fix" satellites?
Click to expand...
Click to collapse
Not longer than usual. But I often had GPS fix issues with my 7T Pro where it takes 5-10 minutes despite using A-GPS.
Macusercom said:
Not longer than usual. But I often had GPS fix issues with my 7T Pro where it takes 5-10 minutes despite using A-GPS.
Click to expand...
Click to collapse
I calibrated the A-Gps again, let's see if that was it. Thank you
Hi I was wondering if you could possibly share the android 11 update file I have a Oneplus 7T Pro HD1910 currently on OOS 10.1.14 It would be awesome if you can PM me. I've tried downloading from Oygen Updater it fails at 98% also on XDA forum the download fails. I'd really appreciate it. Thanks
Macusercom said:
As I only have a EU device I can only provide a patched boot.img for that device. But with the original .img files it should be easy to patch and flash it yourself. To make it clear: boot.img and recovery.img are stock unless said otherwise. They've just been extracted from the payload.bin inside the respective OOS update zip file.
Click to expand...
Click to collapse
Hey, could you please share the payload.bin extract procedure?
Ia possible to use this files to back to stock rom from lineageos 18.1? If yes, can someone help me and give me the procedure how to do this?
For all the "EU" and "global" files, I get "fastboot: error: boot partition is smaller than boot image". The Magisk version can be installed, but then I get a Qualcomm crash screen when I try to actually start it.
Obligatory first post on the forums here so hopefully this is the right place!
I have been lurking on the forums for the past month or so and have been working on building a custom kernel from source for the SM-G780F/DSC(Exynos) edition. I've built some kernels from source before so I have some experience there, but actually getting the kernel to flash and run on the device is a different story. I have built the kernel with the modifications that I wanted, fixed some flashing issues I was running into, finally got the boot.img to flash succefully to the device, rebooted the device and the phone just hangs at the Samsung logo. (See "Image from iOS.png").
Here is the steps that I did:
Unlock Bootloader on the device.USB Debugging on, OEM Unlocking enabled in dev settings/ OEM Lock: OFF(U) in DL mode.
Checked to make sure KG State is not Prenormal, it is in checking state.
Device is currently running stock G780FXXS7CUI5, so I download this version source from https://opensource.samsung.com/uploadSearch?searchValue=SM-G780F
Extract Kernel.tar.gz, update toolchain paths in the Makefile/build_kernel.sh, and I make some modifications to the defconfig file.
Code:
./build_kernel.sh
; Fix compiler errors/warnings as they appear. Rinse and repeat until the kernel is built.
Now that the kernel is built I pull the stock ROM that this device is currently running from Sammobile. https://www.sammobile.com/samsung/g.../SM-G780F/MID/download/G780FXXS7CUI5/1583411/
Extract the AP directory from the Sammobile ROM download.
Extract the boot.img.lz4 from the AP directory so I now have the uncompressed boot.img.
Copy over the the stock boot.img to my AIK directory. (AIK-Kinux-V3.8)
Code:
./unpackimg.sh boot.img
, cd into split_img, rm the stock boot.img-kernel
Move my custom kernel image to the AIK directory,
Code:
mv kernel_source/out/arch/arm64/boot/Image /AIK-Linux/split_img/boot.img-kernel
Run AIK repackimage.sh
Now I have a SM-G780G(Snapdragon edition) S20_FE with Magisk installed. So I copy over my image-new.img to this device and patch the image-new.img with Magisk
Move back the patched image to my linux enviroment. Rename my patched image boot.img.
Compress my boot img with
Code:
lz4 -B6 --content-size boot.img boot.img.lz4
.
Replace the stock boot.img.lz4 in my AP directory with my modded boot.img.lz4
Pull down a clean vbmeta.img from https://dl.google.com/developers/android/qt/images/gsi/vbmeta.img
Compress this image as well
Code:
lz4 -B6 --content-size vbmeta.img vbmeta.img.lz4
Replace the stock vbmeta.img.lz4 in the AP directory with my clean vbmeta.img.lz4 in the
So the contents of the AP directory currently is
Code:
22556009 Apr 7 12:57 boot.img.lz4
1155 Sep 23 2021 dqmdbg.img.lz4
219753 Sep 23 2021 dtbo.img.lz4
4096 Sep 23 2021 meta-data
1148 Sep 23 2021 metadata.img.lz4
2773 Sep 23 2021 misc.bin.lz4
35115127 Sep 23 2021 recovery.img.lz4
5457239441 Sep 23 2021 super.img.lz4
822394050 Sep 23 2021 userdata.img.lz4
2375 Apr 7 12:57 vbmeta.img.lz4
2812 Sep 23 2021 vbmeta_samsung.img.lz4
tarball all these files with
Code:
tar -cvf Modded_AP.tar *
Spin up latest version of ODIN
Place Custom AP into AP slot, Stock BL into BL slot, Stock CP into CP slot, and Stock HOME_CSC into CSC slot
Start Flashing.
Flashing is successful.
Device reboots, and hangs at the Samsung Galaxy S20FE Screen with the warning "I am not running samsungs official software."
A couple of questions I am asking myself is the stock vbmeta_samsung.img.lz4 necessary, as well as some of the other stock files? Is patching my boot.img with Magisk running on a different
device giving me issues? Am i missing a step somewhere or is there still extra steps I need to take to get a modded kernel running on this device. Any help would be greatly appreciated or if I need to provide any more insight please let me know! Thanks again!
you'd be extremely welcome in our little group
S20 FE Modding
Exynos AOSP: https://t.me/S20FE_Exy TurboUI: https://t.me/projectxs20fe Prime Kernel Snap: https:/t.mes20fesnapdragon Prime Kernel Exynos: https://t.me+vpzEK9kPMc41MmY9 Bandido Kernel https://t.me/bandidokernel Klimbo Kernel https://t.me/klimbokernel
t.me
there's also a kernel dev there from time to time who has built kernels for all versions FE completely blind, i.e. without being able to flash them himself. maybe we can get you two talking.
it sounds like you've added two kernels to your AP archive. as I understand it once you've built your kernel, compressed it to .lz4 you can just archive it inside a tar file and flash that alone (as long as it matches your firmware).
Hi there Buddy, so answering your questions- we dont need vbmeta everytime, we only use it once to flash twrp after which flashing vbmeta not necessary. Now yes patching boot.img with other device other than the one you are running causes problems here and device doesnt like to boot. As per the last kernel dev he just used our stock boot.img and compiled his changes. And we flash hi kernel like normal flash.
S20 FE Modding
Exynos AOSP: https://t.me/S20FE_Exy TurboUI: https://t.me/projectxs20fe Prime Kernel Snap: https:/t.mes20fesnapdragon Prime Kernel Exynos: https://t.me+vpzEK9kPMc41MmY9 Bandido Kernel https://t.me/bandidokernel Klimbo Kernel https://t.me/klimbokernel
t.me
You can even join this group, there are many people willing to help others.
Also i have been developing stock based roms for all the variants, so would be happy to test them once they get stable enough to boot.
Thanks for the responses everyone! I'll take my follow up questions to the group!
Hi. There are some kernel changes that is needed to be applied in order to successfully boot the custom kernel. I suggest you post the kernel source so I can review it. You don't need to place everything inside the AP. You can just archive the boot.img.lz4 as tar.
Also, a lot of your steps can be simplified by making a twrp-flashable zip instead. You can use my template here:
android_kernel_samsung_s20fe/AnyKernel3 at exynos · pascua28/android_kernel_samsung_s20fe
Custom kernel for Samsung S20 FE (Snapdragon and Exynos variants) - android_kernel_samsung_s20fe/AnyKernel3 at exynos · pascua28/android_kernel_samsung_s20fe
github.com
Just move the arch/arm64/boot/Image as zImage and you can zip the AnyKernel3 folder and there you have a twrp-flashable zip. It's a lot more convenient this way as people do not need to carry around their computers whenever they need to flash custom stuffs plus, it's more universal this way as they don't have to have a matching firmware version; it will just use the existing boot image, unpack it, replace the kernel, repack and then flash it back to the device.
If you have any questions, feel free to contact me on telegram (pascua14). I hope you succeed
Regards