Creating preroot - Xperia Z3 Compact Q&A, Help & Troubleshooting

On .200 right now, trying to get to .232.
Using prfcreator, do I include "kernel", "fotakernel", "modem", "ltalabel", "sign zip"?
If it makes any difference, I want to keep my data, not format. Let me know, the rest I can do!

Include everything. That way you don't have to flash the kernel (with system excluded) later.
If you don't include the kernel, it's recommended to flash it afterwards with flashtool (check "system" under exclude).
I personally leave the zip unsigned, as it takes longer to create the pre-rooted fw if signed.
Also, someone here recently reported some problems with flashing when zip was signed (link)

Related

[07.09.2012][CF-Root 5.6] K**,LA-1346,LB1,LC1,LP-1YF89,LQ-23,LR-GIKQ - su+bb+CWM5

This rooted kernel is for the "rooting beginners" and those who want to keep as close to stock as possible. CF-Root takes the kernel from an original Samsung firmware, and just adds root, busybox, and ClockWorkMod recovery
THIS IS NOT A ROM - it is only a modified kernel. You need to have the relevant firmware already on your device. You do NOT need to wipe anything for this patch. You DO need to read the instructions. PLEASE READ THE ENTIRE FIRST FEW POSTS!
Donate
There have now been nearly 1.000.000 downloads of CF-Root for various devices (see for example Galaxy S1, Galaxy Tab 7", and Galaxy S2), and many more if you include ROMs, kernels, etc that use it. Don't be a leech, buy me a beer (and use the "Thanks" button!). Imagine if every CF-Root user had donated me $1...
Main features
- The kernel is fully stock and taken from the original firmware, with just the following added:
- Root
- Busybox v1.19.2-cm71
- ClockWorkMod Recovery 5
- CWM Manager (see below for more detail)
- Custom boot / init scripts
- Custom boot animations
v5.3 and newer
- SuperSU (replaces Superuser)
- "Fake-secure" (ro.secure=1, but ADB is patched to run as ro.secure=0)
v5.5 and newer
- CWM updated to v5.5
v5.6 and newer
- Possible brickbug fix
Installation instructions
Please see the next post !
Other kernels
Replacing CF-Root with other kernels and vice-versa sometimes works, sometimes it doesn't. I don't have a list.
When going from CF-Root to another kernel, root will usually stay, while CWM will be lost (unless the other kernel also includes it), but there should not be issues. The CWM Manager app may remain, but probably won't do anything useful.
ClockworkMod
CF-Root includes a custom version of CWM5. I always make custom versions, as the originals often do not take some Samsung specific things into account.
CF-Root/CWM5 is NOT compatible with ROM Manager! Manage/perform your backup/restores from CWM directly or using the CWM Manager application included with CF-Root
- Booting into recovery will immediately give you CWM. The standard recovery will only be started if a Samsung package is detected.
- ADB is functional in recovery, however it may take up to a minute for it to start up after booting into recovery.
CWM Manager
Because of incompatibilities with ROM Manager, I wrote and included "CWM Manager". This is a new app (as of March 30, 2011). You can find it under Applications -> CWM. It is much faster to use than manually booting into CWM and selecting these options.
Features:
- Boot to ClockWorkMod Recovery
- Boot to Download mode
- Reboot normally
- Backup firmware
- Restore backups (including partition selection)
- Delete backups
- Install APKs
- Flash CWM3/4/5 update.zip's
- Flash kernels (zImage, zImage in TAR, zImage in ZIP, zImage in TAR in ZIP)
--- without changing warning triangle status or increasing flash counter
- Flash complete firmwares (seperate files as well as .tar and .tar.md5 archives, dump files in /sdcard/external_sd/firmware folder)
--- without changing warning triangle status or increasing flash counter
--- can pre-root new firmwares during flash
Note: If you flash a different kernel, CWM Manager may remain installed. However, functions may not work, because they need kernel compatibility !
Custom boot / init scripts
CF-Root will execute the following scripts if present, in the order listed:
- /system/etc/init.d/* (there can be many files here, no extensions! use #!)
- /system/bin/customboot.sh (busybox sh)
- /system/xbin/customboot.sh (busybox sh)
- /data/local/customboot.sh (busybox sh)
Please make sure you chown / chmod the scripts correctly so they can be executed. Pretty much root:root / 755.
Custom boot animations and binaries
CF-Root also supports custom boot animations:
- /system/media/bootanimation.zip
- /data/local/bootanimation.zip
And custom boot binaries:
- /data/local/bootanimation.bin
Installing busybox over the included version
It is possible to install a custom busybox over CF-Root v3.0 and newer. However, this is not without risk. CF-Root makes heavy use of scripting, and many CF-Root scripts rely on the internal busybox version. If you do install a seperate busybox version (always use "stericson" installer!), install it to /system/xbin. Installing it to /system/bin will mess things up for sure. Even if you do that part right, it may still break CF-Root, so make sure to make a backup before trying.
How ?
I wrote my own toolchain to ease patching of initramfs, and that is what all this is based on. It is now used to make CF-Root for many devices!
Help! Which file do I use ?
Listen closely, for I will say zis only once!
Go to Settings -> About phone -> Kernel Version. Note the string present there:
2.6.35.7-N7000XXKJ4-CL641703
What matters most (KJ4) in this case, is in bold. Try to find the matching file under downloads:
CF-Root-SGN_XX_XEN_KJ4-v5.0-CWM4.zip
The XX and XEN identifiers are not that important. Usually a "KJ4" kernel is a "KJ4" kernel, and that is that. Sometimes (pretty rare) it happens there will be multiple different kernels with the same name in different firmwares, that are actually different. If this happens, they are usually only very minor changes and you should expect them to still be fully compatible. I include the "XX" and "XEN" identifiers so the very advanced users can deduce from which full firmware I have taken the kernel file.
Don't worry too much, just find the matching download and use it. What if there is no matching download ? You can ask me to make one, but I can tell you right now, I very very rarely make CF-Root's for kernels on request, unless it is the very latest kernel that has been released by Samsung. In the latter case, be sure to let me know. If there's no match and I'm not making one, try finding the closest match. You should treat "KJ4" as a number, but instead of 1-9, we have 1-9, A-Z (where A would be 10, and Z would be 35). "KJ3" is really close to "KJ4", "KF1" is not close to "KG4" at all. I hope that makes sense.
@Developers: I have noticed that doing a NANDROID RESTORE while connected to your computer AND Eclipse is running may cause the restore to fail. Eclipse automatically starts logcatting in the background, which will prevent /system from being properly restored.
Download
These are general-purpose downloads. See the posts following this one for the kernels.
Installation intructions
The Samsung Galaxy Note keeps track of the kind of kernel you are running (stock or custom) and how often you have flashed kernels. This is probably for warranty purposes. There is currently no known way to reset this counter on the SGN.
So, what we want to do is get root, busybox, and CWM, all without getting that ugly yellow triangle or updating the flash counter on our device. Luckily, CF-Root allows for all these things. The new CWM Manager even allows you to flash new firmwares and apply root to them while flashing.
We need to get rid of ODIN pretty much completely, and we can! The difficult part is getting root the first time, after that, it should be happy camping forever.
--- Chapter 1: Initial application of root ---
DO NOT USE ODIN TO FLASH THE KERNEL !
This is the annoying part. There are three different methods:
1.1. If you are already rooted
- Download the attached "InitialRootFlasher.zip" and extract it somewhere
- Download one of the CF-Root kernels, and extract it (repeat) until you end up with a zImage file
- Place the zImage file from the CF-Root kernel in the zImage folder from InitialRootFlasher
- Start "already-rooted.bat" and follow the instructions
For those needing to do this manually (Linux boxes and such), this is the important command. Place the zImage file on your phone (example: /data/local/zImage) and execute this command in a rooted shell:
dd if=/data/local/zImage of=/dev/block/mmcblk0p5 bs=4096
1.2. If you are not rooted yet: Using the zergRush exploit This method no longer works on KL* and newer firmwares!
(while it still works on our firmwares, this exploit will probably be fixed soon! Known to work on KJ1 and KJ4 firmwares)
- Download the attached "InitialRootFlasher.zip" and extract it somewhere
- Download one of the CF-Root kernels, and extract it (repeat) until you end up with a zImage file
- Place the zImage file from the CF-Root kernel in the zImage folder from InitialRootFlasher
- Start "not-rooted-yet.bat" and follow the instructions
1.3. If you are not rooted yet: Flash a modified FACTORYFS
I am providing this method just this once, for the KJ1 firmware. This is the /system part of the KJ1 firmware, modified so at first boot it will flash the KJ1 CF-Root and reboot, without getting you the yellow triangle or increasing the flash counter.
Using a newer firmware? Do this operation first, then flash the newer firmware back using CWM Manager. This is explained in Chapter 3 below.
Download: http://www.multiupload.com/YB9EL8D8O3
- Optional: flash the full KJ1 firmware first
- Unzip the file, you should get "SGN_XX_OXA_KJ1_FACTORYFS.tar"
- Make sure your SGN is NOT connected to your computer
- Reboot your SGN into "download mode" (see below)
- Start ODIN
- Click the PDA button, and select the "SGN_XX_OXA_KJ1_FACTORYFS.tar" file
- Connect the SGN to your computer
- Make sure "repartition" is NOT checked
- Click the START button
- Wait for the phone to reboot TWICE
- Done
If you do not know how to get into download mode:
- Turn off the device
- Count to 10
- Hold the "home" (the big physical button in the middle) and "volume down" buttons
- Press and release the power button (keep holding "home" and "volume down" !) to turn the device on
- You should get a download mode screen
- If it tells you to press a button to continue, do so
--- Chapter 2: Getting rid of ODIN ---
This is easy. Find ODIN, and delete it. In the future you should only need it to flash bootloaders, which probably will only really be needed one time: when upgrading from Gingerbread to Ice Cream Sandwich.
--- Chapter 3: Upgrading your firmware ---
My CWM Manager application has a full-fledged firmware flasher built in. Using the flasher from CWM Manager does NOT give you the yellow triangle or increase the flash counter.
3.1. Flashing a new kernel
This is easy. CWM Manager can flash zImage files (on any rooted kernel), zImage files inside a .tar file (only on a CF-Root kernel), and zImage files inside a .tar.zip (only on a CF-Root kernel). Note that zImage must be the ONLY file in an archive, if is is inside a tar or zipped tar.
- Put the zImage (or tar, or zip) file on your SD card
- Open the CWM Manager app
- Select "Flash kernel"
- Select the file you just put on your device
- CWM Manager will flash the kernel and reboot
If you flash a non-CF-Root kernel, you will lose a lot of functionality from CWM Manager. However, the app will (likely) still allow you to flash kernels.
3.2. Flashing a new firmware
Important: This works ONLY on a CF-Root kernel !
CWM Manager has the ability to flash firmware parts either from separate files (zImage, factoryfs.img, etc) or from .tar / .tar.md5 files that they usually come packaged in.
- Download the firmware you want to flash
- If you have a ZIP or RAR file, extract it until you have seperate files, or .tar / .tar.md5 files
- Create a folder named 'firmware' on your external SD card
- Copy the files you want to flash to this folder ( /sdcard/external_sd/firmware ). factoryfs ("system") is mandatory part at the moment.
- TIP: If you are flashing a new firmware that already has a CF-Root kernel available, put it in the 'firmware' folder as well in zImage or .tar form (NOT .zip). Select it when asked which kernel to use, then use the "Flash normally" option later on.
- Open the CWM Manager app
- Select "Flash stock firmware"
- At this point, CWM Manager will tell you about the firmware parts it has found, and which ones it will flash. It will also give you warnings about bootloaders and PIT files if those were found. If some firmware parts are present multiple times, it will ask you which file to use as source.
- If what you are flashing includes both kernel and system parts, CWM Manager will warn you about this as you are about to lose root. It will provide you with three options:
1: Keep CF-Root kernel
Keeps the current CF-Root kernel, only flash the other parts. You will not lose root or CWM Recovery. You can flash a newer CF-Root kernel later (or maybe you have already done so), see 3.1 above.
2: Pre-root system
Flashes both kernel and system parts, but roots system during the flash. You will lose CWM Recovery, but you will keep root (if all goes well). The CWM Manager application will also remain, and allow you to flash the correct CF-Root kernel at a different time (if you have not done so before), see 3.1 above.
3: Flash normally
Doesn't do anything specific. If the kernel you are flashing is not a CF-Root (or similar) kernel, you will lose root, and CWM Recovery.
- CWM Manager will reboot into CWM Recovery, and will flash the firmware, rebooting afterwards.
--- reserving another post ---
Downloads
See the second post of the thread for flashing instructions. If you're thinking about using ODIN to do it, you should probably read that post.
CF-Root-SGN_XX_OXA_KJ1-v5.0-CWM5.zip
CF-Root-SGN_XX_XEN_KJ4-v5.0-CWM5.zip
CF-Root-SGN_ZS_MUL_KJ6-v5.0-CWM5.zip
CF-Root-SGN_ZS_MUL_KK1-v5.0-CWM5.zip
CF-Root-SGN_XX_DBT_KK9-v5.0-CWM5.zip
CF-Root-SGN_XX_AUT_KKA-v5.0-CWM5.zip
CF-Root-SGN_XX_ODD_KL3-v5.0-CWM5.zip
Downloads
See the second post of the thread for flashing instructions. If you're thinking about using ODIN to do it, you should probably read that post.
CF-Root-SGN_DX_XSP_KL1-v5.0-CWM5.zip
CF-Root-SGN_XX_DBT_KL7-v5.0-CWM5.zip
CF-Root-SGN_XX_OXA_KL8-v5.0-CWM5.zip
CF-Root-SGN_XX_OXA_LA1-v5.0-CWM5.zip
CF-Root-SGN_XX_OXA_LA3-v5.0-CWM5.zip
CF-Root-SGN_XX_OXA_LA4-v5.0-CWM5.zip
CF-Root-SGN_XX_SER_LA6-v5.0-CWM5.zip
CF-Root-SGN_XX_OXA_LB1-v5.0-CWM5.zip
CF-Root-SGN_XX_OXA_LC1-v5.3-CWM5.zip
ALL THE KERNELS IN THIS POST ARE OUTDATED AND/OR DANGEROUS, GO TO THE NEXT POST !
CF-Root-I9220_ZC_OZH_LP1-v5.2-CWM5.zip
CF-Root-SGN_XX_OXA_LPY-v5.3-CWM5.zip *read before flashing LPY: http://forum.xda-developers.com/showpost.php?p=25966147&postcount=1322* *old*
CF-Root-SGN_ZS_OZS_LPF-v5.3-CWM5.zip *old*
CF-Root v5.5:
CF-Root-SGN_XX_OXA_LPY-v5.5-CWM5.zip
CF-Root-SGN_ZS_OZS_LPF-v5.5-CWM5.zip
CF-Root-SGN_DD_ODD_LP8-v5.5-CWM5.zip
CF-Root-SGN_DX_OLB_LP9-v5.5-CWM5.zip
Be warned that *all* of the above kernels may be suffering from the superbrick bug ( http://forum.xda-developers.com/showpost.php?p=25966147&postcount=1322 ) !
PLEASE READ THIS POST BEFORE FLASHING !
CF-Root-SGN_XX_OXA_LPY-v5.6-CWM5.zip
CF-Root-SGN_ZS_OZS_LPF-v5.6-CWM5.zip
CF-Root-SGN_DD_ODD_LP8-v5.6-CWM5.zip
CF-Root-SGN_DX_OLB_LP9-v5.6-CWM5.zip
CF-Root-SGN_XX_XEU_LQ2-v5.6-CWM5.zip
CF-Root-SGN_XX_SEB_LQ3-v5.6-CWM5.zip
CF-Root-SGN_XX_DBT_LRG-v5.6-CWM5.zip
CF-Root-SGN_XX_OXX_LRI-v5.6-CWM5.zip
CF-Root-SGN_XX_DBT_LRK-v5.6-CWM5.zip
CF-Root-SGN_XX_DBT_LRQ-v5.6-CWM5.zip
Love u man.....
My note is so dull without ur magic sprinkle....
Cant say how much I can thank you.
A little donation your way.
xxxxxxxxxx894473X
Will buy a note! Thz Chainfire
Sent from my GT-I9100 using xda premium
I'm also glad to see you on this device too. Thanks man!
sent from my Galaxy Note via T*patalk
zomg yay! can't wait
nice to see you here.. short question regardin binary counter, usb jig didnt work, is there a way to flash your kernel whitout affect the binary counter?
Chainfire said:
Should be ready later tonight or early tomorrow. I need the thread URL
(could have posted it days ago, but I'm still fixing minor issues with CWM5)
Usual CF-Root features apply. Root, busybox, CWM, custom bootanimations, custom boot scripts, CWM Manager(tm), etc.
Click to expand...
Click to collapse
fantastic chain
m_adnan said:
nice to see you here.. short question regardin binary counter, usb jig didnt work, is there a way to flash your kernel whitout affect the binary counter?
Click to expand...
Click to collapse
Yes, stay tuned for more info!
Great news! !!!
Sent from my GT-N7000 using XDA App
amazing man!! thanks!!
small donation to you: 81Y69202241504401
Chainfire said:
Yes, stay tuned for more info!
Click to expand...
Click to collapse
I always know when I've bought the right device when I see you pop up the same forum
Sent from my GT-N7000 using Tapatalk
Great news, .
magic Chain !!!
Can't wait for this. Any idea what file system the Note uses?
Sent from my GT-I9000 using xda premium

[Q] Auto flash

Is it possible to create an update.zip which can apply a list of update.zip files?
I would like to create a flashable .zip which can :
wipe cache & dalvik-cache
flash /sdcard/update.zip <-- my lastest nightly
switch permission (optionnal)
flash /sdcard/font.zip <-- my font
flash /sdcard/remove.zip <-- remove unused apps
flash /sdcard/kernel.zip <-- my kernel
As i flashed my N1 every night i would like to apply only one update instead of 4 or more updates.
I don't know if i can simply use @Temasek RemoveUnusedApps.zip script and modify it.
Thanks.
F.
Temasek is the only script king I know, but I was thinking of some reworkings in case you can't actually flash an update.zip within another one. I would think the file would have to be included inside the original zip (which would just be a pain to do for every nightly), so the easiest thing to do might be to do two separate zips. One to flash your update.zip for the nightly. Then incorporate everything from those other update.zip's into one script to do them all at once.
So it would be
Flash nightly update.zip
Flash other zip which would
remove apps
change font
clear dalvik and cache (really doesn't matter when this is performed since flashing the update doesn't affect the cache or dalvik directly)
flash kernel (assuming you don't change it very often)
You can't do it using update.zip script. Each update.zip is separate and they can't be joined.
You can attempt 2 things:
1) Create a single update.zip for all your modifications, and flash only 2 update.zips.
2) Create a recovery script and execute it. You'll need to prepare it in the OS and execute "reboot recovery". Pretty much the way ROM Manager does it.

[MM] [Flashable] Patcher to provide root access without /system modification

This patcher is now outdated. Use the new SuperSU instead. http://forum.xda-developers.com/showpost.php?p=64161125&postcount=3
This zip is a systemless version. That means that you'll get root and be able to use it normally, but your system partition will not be modified, like in normal root methods. Only for Marshmallow.
Keep reading for disadvantages and advantages
Chainfire had released a newer version of his SuperSU that doesn't need to modify the system partition to provide root access. This method doesn't have much of a practical application right now, but it allows you to flash OTA updates without having to unroot or flash the stock system partition.
HOW TO USE:
If you have rooted before, flash the system partition (or reinstall the ROM) before flashing this zip.
Download the attached zip, and flash it from a recovery (I tested it with TWRP).
Download SuperSU 2.56 from here: http://forum.xda-developers.com/showpost.php?p=63197935&postcount=2 (Just download the apk)
Reboot to TWRP. If it asks you whether you want system to be mounted as r/w, and if you want to take OTAs later, choose to keep system read-only (this will replace TWRP with stock recovery on reboot).
Flash SuperSU-v2.56-20151030013730.zip
Reboot
TWRP will say that you are not rooted, just ignore that. Do not tell it to root it.
This will work with all Marshmallow kernels, even the stock kernel.
Drawback : A factory data reset will remove superuser privileges. If that happens, simply flash SuperSU-v2.56-20151030013730.zip again.
TO RECEIVE OTA UPDATES :
Just make sure not to do anything that modifies /system. For example, no build.prop changes, and no system app removal. Or even if you do these, make sure to undo these changes before flashing an OTA. You can flash OTAs without unrooting now.
Flash the stock boot.img for your current Android version before flashing OTAs.
BUGS :
I didn't find any, yet, but Chainfire wrote the following on his thread:
Apps with hardcoded paths to su (seriously?) will bork
Factory reset unroots
Factory reset wipes pin
...
Bugs... Bugs everywhere!
ADDITIONAL INFO :
This zip will replace sepolicy as mentioned on Chainfire's thread (thanks to @metaspook for the patched sepolicy, which I extracted from his zip), so you'll be able to get root access even on SELinux enforcing kernels (only the stock MM kernels right now). Also, you can flash any other kernel (as long as it comes in a zip format, not as an img) before or after flashing this, and you'll still have root access.
out386 said:
Chainfire had released a newer version of his SuperSU that doesn't need to modify the system partition to provide root access. This method doesn't have much of a practical application right now, but it allows you to flash OTA updates without having to unroot or flash the stock system partition.
HOW TO USE:
Download the attached zip, and flash it from a recovery (I tested it with TWRP).
Download SuperSU 2.56 (or newer, if it supports systemless mode) from here: http://forum.xda-developers.com/showpost.php?p=63197935&postcount=2 (Just download the apk)
Flash SuperSU-v2.56-20151030013730.zip
Reboot
This will work with all Marshmallow kernels, even the stock kernel.
Drawback : A factory data reset will remove superuser privileges. If that happens, simply flash SuperSU-v2.56-20151030013730.zip again.
TO RECEIVE OTA UPDATES :
Just make sure not to do anything that modifies /system. For example, no build.prop changes, and no system app removal. Or even if you do these, make sure to undo these changes before flashing an OTA. You can flash OTAs without unrooting now.
Flash the stock boot.img for your current Android version before flashing OTAs.
BUGS :
I didn't find any, yet, but Chainfire wrote the following on his thread:
Apps with hardcoded paths to su (seriously?) will bork
Factory reset unroots
Factory reset wipes pin
...
Bugs... Bugs everywhere!
ADDITIONAL INFO :
This zip will replace sepolicy as mentioned on Chainfire's thread (thanks to @metaspook for the patched sepolicy, which I extracted from his zip), so you'll be able to get root access even on SELinux enforcing kernels (only the stock MM kernels right now). Also, you can flash any other kernel (as long as it comes in a zip format, not as an img) before or after flashing this, and you'll still have root access.
Click to expand...
Click to collapse
Well done bro!
I'm just waiting for this
Help regarding installation
I am using MicroMax Android One with Marshmallow
Currently, I've not tired the phone.
When I open recovery, I see some options like Apply update from SD card, mount, cache wipe, factory reset, etc.
So which option should I use to flash the zip file.
out386 said:
Chainfire had released a newer version of his SuperSU that doesn't need to modify the system partition to provide root access. This method doesn't have much of a practical application right now, but it allows you to flash OTA updates without having to unroot or flash the stock system partition.
HOW TO USE:
Download the attached zip, and flash it from a recovery (I tested it with TWRP).
Download SuperSU 2.56 (or newer, if it supports systemless mode) from here: http://forum.xda-developers.com/showpost.php?p=63197935&postcount=2 (Just download the apk)
Flash SuperSU-v2.56-20151030013730.zip
Reboot
This will work with all Marshmallow kernels, even the stock kernel.
Drawback : A factory data reset will remove superuser privileges. If that happens, simply flash SuperSU-v2.56-20151030013730.zip again.
TO RECEIVE OTA UPDATES :
Just make sure not to do anything that modifies /system. For example, no build.prop changes, and no system app removal. Or even if you do these, make sure to undo these changes before flashing an OTA. You can flash OTAs without unrooting now.
Flash the stock boot.img for your current Android version before flashing OTAs.
BUGS :
I didn't find any, yet, but Chainfire wrote the following on his thread:
Apps with hardcoded paths to su (seriously?) will bork
Factory reset unroots
Factory reset wipes pin
...
Bugs... Bugs everywhere!
ADDITIONAL INFO :
This zip will replace sepolicy as mentioned on Chainfire's thread (thanks to @metaspook for the patched sepolicy, which I extracted from his zip), so you'll be able to get root access even on SELinux enforcing kernels (only the stock MM kernels right now). Also, you can flash any other kernel (as long as it comes in a zip format, not as an img) before or after flashing this, and you'll still have root access.
Click to expand...
Click to collapse
Good work n thanks for mention bt can't understand why u created a patcher again where I'v already created one!
Its ok, good job.
Good.... Thanks for posting
metaspook said:
Good work n thanks for mention bt can't understand why u created a patcher again where I'v already created one!
Its ok, good job.
Click to expand...
Click to collapse
Yes, well, I would never have reposted the same thing, so, I'm sorry if it seemed like that.
This one uses Chainfire's new systemless root method. Unlike other root methods that need modifications to /system, this method uses modifications to the boot image to set up and run the su daemon from a loop device on the /data partition and achieve root. Right now, that doesn't have much of an advantage except to make flashing OTAs easier. Chainfire made it because future devices might need it. I made the patch because someone on FB asked about it.
<accidental double post, sorry. Can't delete>
kalpitandroid said:
I am using MicroMax Android One with Marshmallow
Currently, I've not tired the phone.
When I open recovery, I see some options like Apply update from SD card, mount, cache wipe, factory reset, etc.
So which option should I use to flash the zip file.
Click to expand...
Click to collapse
You need to install a custom recovery first. Go to the Android One (First generation) General forums on this site. You'll find a how-to at the very top of the list of threads. Once you have a custom recovery, flash this using the "install zip" option.
out386 said:
Yes, well, I would never have reposted the same thing, so, I'm sorry if it seemed like that.
This one uses Chainfire's new systemless root method. Unlike other root methods that need modifications to /system, this method uses modifications to the boot image to set up and run the su daemon from a loop device on the /data partition and achieve root. Right now, that doesn't have much of an advantage except to make flashing OTAs easier. Chainfire made it because future devices might need it. I made the patch because someone on FB asked about it.
Click to expand...
Click to collapse
Hmm... gotcha now.. Good work!
If u ever need any help just pm.
Thank you...
out386 said:
<accidental double post, sorry. Can't delete>
Click to expand...
Click to collapse

[GUIDE] How to Restore Stock Kernel from ROM

I posted the original version of this guide in the Pixel Experience forum because I needed a way to recover the stock Oniichan kernel from the PE ROM after I had flashed other kernels over it, without first backing up my boot partition. This is because the latest Oniichan kernel isn’t posted online, unlike Genom, Predator, etc. This solution uses OrangeFox and can be applied to any ROM with minor modification.
The ROM file that you flashed to your phone should include a boot image file called boot.img which contains the kernel. So, we simply extract boot.img from the ROM and flash this image to the Android boot partition. This will replace the new kernel with the stock kernel from our ROM, after which we re-flash Magisk if we need root (no need to re-flash modules), and we should be back to stock. Here are the steps to restore your stock kernel:
1. Retrieve a copy of your current ROM zip file
2. Expand zip file and extract boot.img
3. Save boot.img to phone storage (e.g., SD card)
4. Reboot phone into OrangeFox recovery
5. Do OrangeFox backup of boot partition (e.g., to SD card)
6. Select the boot.img file and attempt to flash it normally
7. From choice of target partitions select “Boot”
8. Swipe right to install image as instructed
9. Flash should complete in 10-15 seconds
10. Re-flash Magisk to restore root if needed (no need to re-flash modules)
11. Reboot phone to system
12. In settings check kernel version to verify desired kernel was restored
FYI, you can use this method to extract the kernel from any ROM and flash it to your phone, but you should first verify that the new kernel is compatible with your current ROM before you flash it. Please let me know if you have any questions. Good luck!
thx
Thanks
mirdem said:
Thanks
Click to expand...
Click to collapse
You're welcome.
I just flashed Pixel and NGK (both latest) today. By flashing the boot.img does it remove all of my data? Or It'll flash only for the kernel itself?

Difference: Get Magisk through custom recovery vs patched firmware?

Any difference?
It depends on the device.
For devices where flashing individual partitions can be done directly via bootloader, patching the boot image is generally preferred. However, some devices don't allow this, such as Samsung, so you have 3 options, which may or may not work well:
Extract the boot image from the AP.tar and repack it, then flash in Odin (easy to get wrong)
Patch the AP.tar in Magisk (difficult because this is the "main" firmware package and is quite large)
Flash a custom recovery if one is available, then flash Magisk in recovery (seems to work pretty well)
V0latyle said:
It depends on the device.
For devices where flashing individual partitions can be done directly via bootloader, patching the boot image is generally preferred. However, some devices don't allow this, such as Samsung, so you have 3 options, which may or may not work well:
Extract the boot image from the AP.tar and repack it, then flash in Odin (easy to get wrong)
Patch the AP.tar in Magisk (difficult because this is the "main" firmware package and is quite large)
Flash a custom recovery if one is available, then flash Magisk in recovery (seems to work pretty well)
Click to expand...
Click to collapse
I did number 2. How is it difficult? How is 1 more dangerous than 2?
Arealhooman said:
I did number 2. How is it difficult? How is 1 more dangerous than 2?
Click to expand...
Click to collapse
It's difficult because it's a large file, and since Magisk doesn't run on PC, there's no easy and quick way to patch it.
I never said 1 is dangerous, just easy to get wrong. Samsung repackages their images as lz4 files, so while you can extract boot.img.lz4 from the AP.tar using 7Zip, extracting boot.img from the lz4 file is another story. I tried using a 7zip plugin; it didn't work for me. Then, once you've patched it, you have to figure out how to flash it to the device. If you want to use Odin, you have to repackage the file. You can use TWRP to install images, but at that point you might as well just install Magisk via TWRP and skip the whole process.
V0latyle said:
It's difficult because it's a large file, and since Magisk doesn't run on PC, there's no easy and quick way to patch it.
I never said 1 is dangerous, just easy to get wrong. Samsung repackages their images as lz4 files, so while you can extract boot.img.lz4 from the AP.tar using 7Zip, extracting boot.img from the lz4 file is another story. I tried using a 7zip plugin; it didn't work for me. Then, once you've patched it, you have to figure out how to flash it to the device. If you want to use Odin, you have to repackage the file. You can use TWRP to install images, but at that point you might as well just install Magisk via TWRP and skip the whole process.
Click to expand...
Click to collapse
I did it the Al way becasue I don’t have twrp for my device. I used Adb push and pull for magisk. Btw after I rooted my device is expired int little problems (eg. When swiping out apps, the one on the top doesn’t move down, my device restarts upon connecting wifi). Do you think I’m okay like I am or I should redo?
Arealhooman said:
I did it the Al way becasue I don’t have twrp for my device. I used Adb push and pull for magisk. Btw after I rooted my device is expired int little problems (eg. When swiping out apps, the one on the top doesn’t move down, my device restarts upon connecting wifi). Do you think I’m okay like I am or I should redo?
Click to expand...
Click to collapse
No idea how to help with that, sorry.
Thanks for explaination anyway

Categories

Resources