[Q] MTK6582 TWRP 2.8.2.0 set_metadata_recursive Issue - General Questions and Answers

I have a Blu Studio X+ running 4.4.2 stock firmware with 3.4.67 kernel. When I try to flash a CM13 port (that also uses the same kernel) in both MTKDroidTools-generated CWM and TWRP 2.8.2.0 (generated from an automated tool as well), I get the following error and the ROM stops flashing:
ApplyParsedPerms: lsetfilecon of /system/lost+found to ubject_r:system_file:s0 failed: Operation not supported on transport endpoint set_metadata_recursive: some changes failed
Looking through the updater-script, the problem seems to lie within this line:
set_metadata_recursive("/system", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", "0x0", "selabel", "ubject_r:system_file:s0");
From my research it appears this is an SELinux incompatibility problem. I thought TWRP 2.8.2.0 was supposed to support SELinux. What do I do to fix this?

I have this EXACT same problem on my Posh E500a MT6592M phone. I can't flash many mt6592 roms or else I get that error. Replacing the META-INF folder with a working one from Lollipop boots the rom, but camera & wifi are buggy because of this. Basically what I want to do is flash a CM13 ROM but it won't flash unless I use a working META-INF folder from a CM12.1 ROM. This however is unstable. I have tried every recovery like you have, even TWRP 3.0.0-0 and the latest one but nothing.

patato21 said:
I have this EXACT same problem on my Posh E500a MT6592M phone. I can't flash many mt6592 roms or else I get that error. Replacing the META-INF folder with a working one from Lollipop boots the rom, but camera & wifi are buggy because of this. Basically what I want to do is flash a CM13 ROM but it won't flash unless I use a working META-INF folder from a CM12.1 ROM. This however is unstable. I have tried every recovery like you have, even TWRP 3.0.0-0 and the latest one but nothing.
Click to expand...
Click to collapse
You're lucky, you have another meta-inf folder to work with. There are no ROMs for the Studio X+ out there, and as far as I know none for the Studio X as well. All I have to work with is the stock /system I extracted from an SP Flash Tool system.img. Unless there's a way for me to "compile" my own meta-inf from a stock ROM I'm stuck.

Found a potential solution, going to try it out soon:
http://forum.xda-developers.com/showthread.php?t=2532300
After more research it turns out that SELinux being set to enforced and not permissive is the issue here. I'm guessing that the stock 3.4.67 kernel has that flag that prevents SELinux from being switched to permissive (what we need for flashing to work), causing this flash error. This thread supposedly gives us a solution, allowing us to bypass this metadata setting that causes the error.
EDIT: Ran into an issue immediately after initiating flash saying mount() expected 4 arguments and got 5. Will try to solve.

Related

[CyanogenMod][Custom kernel] stuck on splashscreen

I am very new to the android parralel scene (and the android and smartphones in general) so please excuse me if I have missed obvious things.
I am trying to do a custom android kernel on a CyanogenMod stable in order to activate SCTP support on a HTC Magic (sapphire) PVT 32B (google branded).
I have followed the this tutorial : wiki.cyanogenmod.com/index.php/Building_from_source to make the kernel (2.6.29-cm42) and this tutorial wiki.cyanogenmod.com/index.php/How_to_build_a_kernel_port for the packing.
My base is update-cm-4.2.14.1-signed.zip
I have tried with my new package as a module (and also redone modules.sqf) and also in-kernel.
I have tried the full update, and I've also tried to patch the kernel on a clean Cyanogen install.
Everytime I get stuck on the spash screen (google io09 developer conference).
Thanks for having read that post!
NB: Before the manipulation I had made a nandroid backup so I can get back without problem.
I use cm-recovery-1.4.img as recovery image with fastboot, and I noticed that I can't use adb to push data on the sdcard and then install it with the recovery. In fact the commands seem to work, but behind the scene it is the old sdcard.zip that is installed. I have to use my backup, fullboot, put my test update on the sdcard, rebootfastmode recover and then install.
Ah also, I would be really happy if you could tell me how to diagnostise errors on the bootphase. I'm currently totally helpless (and that's why I am posting here ^^).
I am now trying to build a new complete cyanogenmod from source with my custom kernel and modules. I don't think it will resolve my problem but I hope it will help me in understanding the problem.
While waiting for my repo sync (that won't end before tomorrow :/) I have made a new attempt at a CyanogenMod mod.
So i recompiled my kernel
Regenerated the modules
generated the modules.dep
Remade modules.sqf using update-cm-4.2.14.1-signed.zip as a base
Inserted wlan.ko and my new boot.img (made with unpack repack) into update-cm-4.2.14.1-signed.zip
Signed with the testkeys from the tutorial
Fastboot
update
Stuck...
I zipped some file if it could be of any help
my .config, zImage, boot.img, wlan.ko and modules.sqf
Thanks for reading
After some irc chat session I discovered it would be possible that my problem come from a bad boot.img generation.
I use old unpack / repack scripts (with whose you can't use the --base parameter).
I will try to fix this now, and retest!

[GUIDE][CM Port][ MT6589 only] Port CyanogenMod 10.2/11 for all MT6589 devices

@chrmhoffmann compiled first ever CyanogenMod for his Wiko Stairway which is a MT6589 device and made it possible for other MT6589 users to taste CM. Since then many are porting it to their MT6589 device and many are requesting to make a port for their device. So, I have made a guide here to make it easier for them to port themselves. You should give proper credits to respected developers and hit thanks before posting on XDA.
NOTE:I have made a list of already ported CM roms in #2 post below , if your device is not listed there download any of the ported CM rom and follow this guide to port it to your device
This is the guide to port CM 10.2/11 for all MT6589 devices.Read carefully and follow each step correctly otherwise CM won't boot
Tools Required:
1) Archive Manger (winrar,winzip,7zip)
2) boot.img Unpack Repack Tools
http://forum.xda-developers.com/showthread.php?t=1587411(For Linux)
http://forum.xda-developers.com/showthread.php?t=2036528(For Windows)
NOTE:
For CM 11 the same proceedure is followed but the stock boot.img must be having kernel with binder.c patched and SELinux enabled (This feature can be bypassed but binder.c patch is must otherwise CM 11 won't boot)
Guide:
1) First get your stock rom and download any ported CM 10.2/11 rom from #2 post below
2) Get boot.img from your phone(stock rom) and boot.img from downloaded CM-ROM.zip
3) Unpack both of them to get ramdisk and kernel of both.
4) Repack CM's ramdisk and stock kernel (your phone's) to get a new boot.img
5) Extract system folder from your phone(stock rom) and system folder from downloaded CM-ROM.zip
6) Copy and replace these files from stock to CM,
=> /lib/modules/ -> all files
=> /framework/ -> CustomProperties.jar
mediatek-common.jar
mediatek-framework.jar
mediatek-op.jar
secondary-framework.jar
=> Also all the files mentioned in the below link ( A great thanks to Kashifmin for providing this )
https://github.com/kashifmin/android_device_micromax_a116/blob/master/proprietary-files.txt
7) Now take the modified CM system folder and the new boot.img and make a zip archive with normal deflate compression ( are default in 7zip)
8) Open the newly created zip archive and downloaded CM-rom.zip .Now drag and drop the META-INF and file_contexts from downloaded CM-rom.zip to newly created zip archive.
9) Now flash the new zip using recovery (CWM/TWRP)
10) Enjoy !!
CREDITS:
@michfood for his Boot unpack/repack utils for WINDOWS.
@bgcngm for his Boot unpack/repack scripts for LINUX.
@kashifmin for his proprietary-files.txt
@kashifminfor guiding me.
@chrmhoffmann For bringing the first ever CM10.2 for an MT6589 device.
@XpLoDWilD
@Dr-Shadow
OmniROM project.
Available CM port builds for MT6589
CM 10.2 builds:
Wiko Stairway / MMX Canvas 4 (A210) -> http://forum.xda-developers.com/showthread.php?t=2467400
MMX Canvas HD (A116) -> http://forum.xda-developers.com/showthread.php?t=2673367
XOLO Q700/Q700i -> http://forum.xda-developers.com/showthread.php?t=2675963
LAVA 458Q / XOLO Q600 / CROSS A88 -> http://forum.xda-developers.com/and...-cross-a88-t2814034/post54103404#post54103404
CUBOT GT99 / Cherry Apollo / XYZ X1 -> http://forum.xda-developers.com/and...cubot-gt99-t2834832/post54542482#post54542482
CM 11 builds:
Wiko Stairway / MMX Canvas 4 (A210) -> http://forum.xda-developers.com/showthread.php?t=2676086
MMX Canvas HD (A116) -> http://forum.xda-developers.com/showthread.php?t=2676896
ACER liquid e2 v370 -> http://forum.xda-developers.com/showthread.php?t=2766290
MMX Canvas Magnus (A117) -> http://forum.xda-developers.com/canvas-magnus/development/rom-cyanogenmod-11-canvas-magnus-a117-t2790957
MMX Canvas 2+ (A110Q) / Fly IQ450 -> http://forum.xda-developers.com/mic...-2-cyanogenmod-11-port-canvas-2-plus-t2750867
MMX Canvas Turbo (A250) -> http://forum.xda-developers.com/canvas-turbo/development/rom-cyanogenmod-11-canvas-turbo-t2780905
If CM for any MT6589 device is missing here , PM me. I will add here.
i try but always stuck on boot splash, no boot up.. pleash help thanks
Uhm.... I guess I can't port cm10.2 over stock jb4.2.1 rom, right?
I ask because I first looked for cm10.1 to port, but to my surprise, I didn't find any cm10.1 builds for any mt6589 on google.
@polfrank you can port CM 10.2 using stock 4.2.1 rom. First you have to download any CM 10.2 Rom from above and follow guide to port. You can even port above CM 11 Roms if you have a working kernel source for your device
Sent from my iris458Q using XDA mobile app
@limam27 boot loop occurs if 1) boot.IMG is badly repacked 2) any file is missing from your device stock rom which has to be copied to CM ROM as mentioned in the guide. Check them first . Also Check whether you are getting errors during unpack and repack of boot.IMG.
Sent from my iris458Q using XDA mobile app
Hmm, I'm stuck on my brand's splash screen too. I don't get to see the boot animation, and as you mention I get errors during both unpacking and repacking. But it said that the file was copied though.... I 'll search for another way to upack and repack on Google and come back.
Edit: pfff, seems like the only way to do it on windows was the one you provided...
Which CM version you are trying to port ?
If have Linux use unpack scripts to unpack/repack boot.img
Windows always gave me errors.
Sent from my iris458Q using XDA mobile app
4shreyas said:
Which CM version you are trying to port ?
If have Linux use unpack scripts to unpack/repack boot.img
Windows always gave me errors.
Sent from my iris458Q using XDA mobile app
Click to expand...
Click to collapse
I chose the CM10.2 from Wiko Stairway.
Yes, I'm now setting a Virtual Machine with Linux 14. And I'll try the unpack scripts from there. Let's see...
UPDATE:
OK, i ended up doing a clean install of ubuntu.
I upacked both images SUCCESS.
I repacked using stock kernel.img and CM ramdisk folder, SUCCESS.
I Install boot.img through CWMrecovery, it now gets past boot logo(Cubot white screen) but I think that before it would enter bootanimation the screen becomes a weird mass of colours, as if the screen was broken. It lasts for 1 second, then it restarts.
ps. I can successfully go to recovery with power+volUP If i like..
Any ideas?
You should get CM boot animation even if you use stock boot.img but won't boot. Did u correctly replace all required files in rom ? Do a clean one. Check if you can get logcat. Send me the logs
Sent from my iris458Q using XDA Premium 4 mobile app
4shreyas said:
You should get CM boot animation even if you use stock boot.img but won't boot. Did u correctly replace all required files in rom ? Do a clean one. Check if you can get logcat. Send me the logs
Sent from my iris458Q using XDA Premium 4 mobile app
Click to expand...
Click to collapse
I think I used wrong kernel.img. I repacked, will flash soon and come back to report.
EDIT: Are you sure that I have to use the META-INF folder from the CM rom? It gives me status 7 error.... (I also used the META-INF from a rom for my device, unfortunatelly it uses aroma, but it seems to install properly..)
EDIT2: I think that now I repacked the correct components of boot.img. It seems to get past the Cubot white splash screen, but after this, I get a black screen, but I can see that the screen is on, I can see the backlight. [I will try again with the CM META-INF-->still fails]
ps. Seems like I have to learn how to get a logcat if I wanna make use of your help... I'll be back in some hours.
----------------------------------------------------------------------
To sum up:
I have packed the new boot.img and replaced the needed files in the rom.
1) With the CM's META-INF folder I can't install, status 7 error.
Finding update package...
Opening update package...
Installing update...
assert failed: getprop("ro.product.device") == "stairway || getprop("ro.build.product") == "stairway"
E: Error in /sdcard/experiment/cm102last.zip
(Status 7)
Installation aborted.
Click to expand...
Click to collapse
2) With the stock rom's META-INF it seems to install propperly.
After reboot from recovery it goes to a black screen and stays there. I tried to logcat (adb logcat -v long > port.txt) but it just says:
[email protected]:/home/pol/Documents/sdk/platform-tools# adb logcat -v long > port.txt
- waiting for device -
Click to expand...
Click to collapse
If i write adb devices it says :
[email protected]:/home/pol/Documents/sdk/platform-tools# adb devices
List of devices attached
0123456789ABCDEF offline
Click to expand...
Click to collapse
When I am on recovery I get:
[email protected]:/home/pol/Documents/sdk/platform-tools# adb devices
List of devices attached
CWM-ZTE-V967S recovery
Click to expand...
Click to collapse
---------------------------------------------------------------------------------------------------------------
CONCLUSION: I managed to install the new boot.img and rom but it stops on a black screen, right after it passes from the white logo screen. And now, I need your ideas...
ps. I repeated the porting process from the beginning to make sure that I didn't make any mistakes... again, the same result.
--------------------------------------------------------------------------------------------------------------
NEW UPDATE: IT BOOTED!! but how....? Here it is........
I just replaced the boot.img from the wiko stairway flashable zip with the boot.img I created with repacking my phone's kernel and CM's ramdisk.
SO, I just changed the boot.img !!!! Testing.......
-------------------------------------------------------------------------------------------------------------
Testing results: buggy mobile network and sound not working. I guess this is why all those files are needed to be copied. I think I ll start copying..... But I wonder...what did I do wrong earlier while copying,,,?
You will get status 7 error because it is a security feature which doesn't allow to flash one device's ROM to other. You have to edit using any text editor and remove first line in the update-script found in meta-inf/com/Google/android/
Also don't use other rom's meta-inf as they have different symbolic links which may not boot the device.
Your phone's modules will be different from wiko's. That's why you got buggy audio and network. Replace all the mentioned files.
sent from my iris458Q using XDA mobile app
Okay, after some hours of trial and error I copied all the porting files provided in the op, except 2:
-libjpeg.so - When I port this from stock, Cm boots, but cannot show images, every single image, including the bootanimation is black.
-libmedia.so - When I port this from stock, Cm stays in the bootanimation forever. (No bootloop, just bootanimation forever)
-------------------------------------------------------------------------------------------------------------------------------------
The "extra" bugs that I have are:
1. No sound from the speaker (but yes in the headphone).
2. Weak signal. I don't know if this is normal. It has 1 bar and sometimes it has 0 and says no service. Also, the name of the tile in the QuickSettings is 20201 (weird...). I also get a message when the rom boots and it says: "Restricted Access changed. Data service is blocked." This appears sometimes at random too.
3. USB storage doesn't work through Android.... ( I don't know if this is normal too). When I plug it on PC it just charges. (Note: I now see that other devices have this problem too. I found a partial workaround in the MMX Canvas HD cm10.2 section)
PS. Would logcat help in any of these problems?
--------------------------------------------------------------------------------------------------------------------------------
I moved on, and took some adb logcats.
1. I took the audio.txt as follows: started logcat, pressed play on the apollo widget, pressed pause, stopped logcat
2. I took the signal.txt as follows: started logcat (while on Airplane mode), disable Airplane mode (from quickSettings tiles), enable mobile data, disable mobile data, enable Airplane mode, stop logcat
I'll look at logs meanwhile I never had problem with signal, speaker audio and images. To get USB storage working add these lines to build.prop and reboot
persist.sys.usb.config=mass_storage,adb
persist.sys.usb.config=mtp,adb
For signal issue , did u replace your modem.IMG in CM ROM ?
For image issue try those 2 files from wiko ROM.
Edit:
Try to freshly port CM once again as given in guide with some changes in meta-inf and build.prop as I gave. If you still have problems then report here.
I couldn't debug audio log but in signal log > network is disconnected as data is enabled and even it's saying messaging settings are false. There may be issue with modem.img
sent from my iris458Q using XDA mobile app
Thanks for the USB storage tip. At least the internal SD can be seen now by the computer.
Images are OK now with the lib of CM.
For signal issue I copied modem.IMG from stock into the CM rom, and still having problems.
Btw, I just created a new thread for my device, I hope this is not a problem.
http://forum.xda-developers.com/and...cubot-gt99-t2834832/post54542482#post54542482
Cheers !! I'll add your device in the ported list. As I said previously all necessary files should be replaced in CM to be bug free except major BT,camera,hwcomposer,FM,GPS,2nd Sim bugs.
Also USB storage is buggy now as SD card is unmounted in mass storage mode but not mounted on PC and when disconnected from PC it doesn't get mounted and you have to reboot to get it working on android. Also mtp mode sometimes doesn't work
sent from my iris458Q using XDA mobile app
Nice!
The only file missing is /lib/libmedia.so and I 'm starting to think that this may be the cause of the sound bug. But when I copy it from the stock rom, I get boot problems...
Anyway, thanks for your help, and sorry that I messed up/spammed your thread. I think the most important part of the job is done..! Good job!
EDIT: I think I sort of fixed the mobile network issue. I used a modem.img from another version of stock rom and it seems to work. However I still get the error "Restricted Access changed. Data service is blocked." But I have full signal and 3G! It's something!
Restricted access notification occurs if you enable or disable data and turn on/off airplane mode and phone and it is not a issue I think. It may be cyanogenMod's security message or something.
Also try libmedia.so from other
Stock rom which you said above.
sent from my iris458Q using XDA mobile app
thanks for repley
4shreyas said:
@limam27 boot loop occurs if 1) boot.IMG is badly repacked 2) any file is missing from your device stock rom which has to be copied to CM ROM as mentioned in the guide. Check them first . Also Check whether you are getting errors during unpack and repack of boot.IMG.
Sent from my iris458Q using XDA mobile app
Click to expand...
Click to collapse
I want to port my device MT6589T JB 4.2 to cm11 kitkat but I do not know how to activate the binder c in the boot.img.
I've tried without a binder c install process always aborted status 7
please help thank you
Hello @limam27
@Iimam27 said:
I want to port my device MT6589T JB 4.2 to cm11 kitkat but I do not know how to activate the binder c in the boot.img.
I've tried without a binder c install process always aborted status 7
please help thank you
Click to expand...
Click to collapse
You can't patch binder.c from boot.IMG. You must be having kernel source for your device and you must patch binder.c in kernel. If you don't have kernel source then its almost impossible to get KitKat. See if your device clones have kernel source for their device. Else look for almost similar specs device with same processor. My device has mt6589m but no source from vendor. I used similar mt6589m device's source to build kernel. Now CM 11 is booting but no display due to different GPU config. So it's really hard if you don't have source. Try with CM 10.2 first .
EDIT- Previously I have told why you get status 7 error. So read whole thread before posting here. Good luck
Sent from my iris458Q using XDA Premium 4 mobile app

(GUIDE)(PORT CM 12.1 ) MTK6592 CM 12.1 PORTING GUIDE (Only For Porters) :)

MT6592 CM 12.1 PORTING GUIDE
Lots of people asked me how i ported cm 12.1 from @fire855's compiled rom for kingzone k1 Turbo
First of all huge thanks to @fire855 and other Dev who helped him for bringing cm 12.1 on mt6592
Give support to him via pressing thanks or Donate , here is it's Link : http://forum.xda-developers.com/and...od-12-kingzone-k1-turbo-t3119908#post61000671
Requirements :
1. Stock Rom KK
2. Working Good Custom Recovery
3. Good Porter and Mind
Lets Start This Short Guide :
1. Download Latest Cm 12.1 from above link
2. Extract in a new folder
3. Use this tool LInk : http://forum.xda-developers.com/android/development/tool-convert-folder-to-ext4-format-t3099237
unpack .dat file and copy extracted system folder in new folder as stated in step 2.
4. Using @michfood's tool (link : http://forum.xda-developers.com/showthread.php?t=2036528)
change Kernel and Do necessary changes acc. to your stock's ramdisk
5. Copy new boot.img that created in step 4 and replace in new folder as stated in step 2.
6. From stock kk rom ...........extract libaudio.primary.default.so (system/lib) and modem.img (system/etc/firmware) nd replace in cm 12.1 's rom ................ in the same location
7. Delete meta-inf folder of cm 12.1's rom and extract this (link : https://www.sendspace.com/file/vnf0gi)
8. Open meta-inf's updater-script in notepad++ and change mountpoint of system acc. to your's phone
9. Pack the folder as in zip format and flash via recovery
( meta-inf, install ,system, boot.img, file context these files must there in zip )
10. Voila Rom booted .............if not comment
If Rom Booted ..............Follow this steps :
1. Download this apk (link : http://forum.xda-developers.com/showthread.php?t=2524485)
2. Go to Settings>developer>enable root and install apk from step 1
3. Open app and Set as permissive ,reboot Your device
4. Voila your wifi,bluetooth etc will start working, even Dual Sim
5. If you faced basedband unknown that mean restore your imei
6. For Home Key Bug , Edit generic.kl and mtk-kpd.kl (system/user/keylayout)
7. For Storage Bug, Edit Framework-res.apk and set sdcard1 as primary and edit boot's ramdisk MT6592.rc, fstab
8. For Other Bugs, Let Me Know
Notice : Always give thanks and link of @fire855's Rom Link
Credits : everyone (who's name i added in this guide and there's tools )
​
@[email protected] Thanks for a great guide, I was able to succesfully port the rom and it booted as well and after setting the selinux to permission my sims also started working but mic is not working, my device is MT6582 (Intex Aqua Speed). I have a working CM11 already ported for my device which is working perfectly fine. Also the soft keys (capacitive keys are not working nor even the power button). Please advise...
contactwajeeh said:
@[email protected]. . . . but mic is not working . . . .
Click to expand...
Click to collapse
The microphone is also not working in all apps (except Telephone where it work's fine) in the original CM12.1 by fire855 for the Kingzone K1. (The Rom this Porting Guide is based on).
That could be part of the problem.
Dominic
G-GFFD said:
The microphone is also not working in all apps (except Telephone where it work's fine) in the original CM12.1 by fire855 for the Kingzone K1. (The Rom this Porting Guide is based on).
That could be part of the problem.
Dominic
Click to expand...
Click to collapse
But its not working in calls as well. BTW I am using @moonrotation build as my base. I haven't asked for permissions to port it yet. But that should be fine as far as I dont do the public release of it.
What necessary changes i must do in ramdisk?help
contactwajeeh said:
But its not working in calls as well. BTW I am using @moonrotation build as my base. I haven't asked for permissions to port it yet. But that should be fine as far as I dont do the public release of it.
Click to expand...
Click to collapse
currently mic problem is there ....wait for fixes
contactwajeeh said:
@[email protected] Thanks for a great guide, I was able to succesfully port the rom and it booted as well and after setting the selinux to permission my sims also started working but mic is not working, my device is MT6582 (Intex Aqua Speed). I have a working CM11 already ported for my device which is working perfectly fine. Also the soft keys (capacitive keys are not working nor even the power button). Please advise...
Click to expand...
Click to collapse
edit keylayout's genric.kl etc
mirrr46 said:
What necessary changes i must do in ramdisk?help
Click to expand...
Click to collapse
like some some extra lines der in urs .
Tried to port this, Device reboots right after vendor logo
I compare stock Ramdisk with CM12. There are no diff. At end both have same values. I changed Kernel and Kernel Header
I changed the updater script so it fits to my partition. It gave me strange errors:
lsetfilecon of /system/lost+found to ubject_r:system_file:s0 failed: No such file or directory
m_file:s0 failed: Operation not supported on transport endpoint
Error flashing Zip : Failed
Updating partition details...
Click to expand...
Click to collapse
Also @michfood's tool just ain't work here, i took the v4 for my x64 win8.1. The Program is unable to extract the Ramdisk path, so i was forced to use "MTK Firmware Adapter Tool"
Recovery:TWRP 2.8.1.0
SoC:MT6592
Device: Doogee DG550
Traace said:
Tried to port this, Device reboots right after vendor logo
I compare stock Ramdisk with CM12. There are no diff. At end both have same values. I changed Kernel and Kernel Header
I changed the updater script so it fits to my partition. It gave me strange errors:
Also @michfood's tool just ain't work here, i took the v4 for my x64 win8.1. The Program is unable to extract the Ramdisk path, so i was forced to use "MTK Firmware Adapter Tool"
Recovery:TWRP 2.8.1.0
SoC:MT6592
Device: Doogee DG550
Click to expand...
Click to collapse
1. don't touch kernel header....change only kernel
2. u should try other recovery like philz
3. delete lost and found folder if present
4. use my meta-inf only....just change mountpoint of system........it seems u need good recovery with lp supported or philz recovery :fingers-crossed:
Thanks for guide.
My camera does not work and gallery does not see SD card.
How to fix it?
mirrr46 said:
Thanks for guide.
My camera does not work and gallery does not see SD card.
How to fix it?
Click to expand...
Click to collapse
1. camera icon in launcher is issue (for mt6592)
2. for storage...fixes r from mt6592.rc in this file read proper sysmlink and do changes acc. to it ,decompile framework-res.apk....set sdcard1 as primary ,fstab changes also needed
Enforcing to Permissive
Does anyone know how to make selinux permissive without any app,I tried to change ro.build.selinux and set it to 0 but it didn't work...does anyone know what to edit in ramdisk to make selinux permissive.?
Traace said:
Tried to port this, Device reboots right after vendor logo
I compare stock Ramdisk with CM12. There are no diff. At end both have same values. I changed Kernel and Kernel Header
I changed the updater script so it fits to my partition. It gave me strange errors:
Also @michfood's tool just ain't work here, i took the v4 for my x64 win8.1. The Program is unable to extract the Ramdisk path, so i was forced to use "MTK Firmware Adapter Tool"
Recovery:TWRP 2.8.1.0
SoC:MT6592
Device: Doogee DG550
Click to expand...
Click to collapse
I'm still struggling to port this rom to DG550.
1. The tool you used to extract the kernel does not work in Windows 8.1 and Windows 10 (I got empty RAMDISK folder). So I switched back to Windows 7 and it worked well.
2. Compared both Ramdisk folders in Stock DG550 Kitkat and Stock Kingzone K1 Kitkat boot.img's.
There is no difference except in ueventd.rc file. I tried to mix DG550 kernel and Kingzone Z1 stock Ramdisk with DG550 Kitkat rom. It didn't boot at first. The problem was in ueventd.rc file. See line 152 (Mali Node). After replacing ueventd.rc file from DG550 ramdisk it booted and worked well (stock kitkat rom). So both the stock ramdisks are identical if ueventd.rc file is replaced.
3. But it fails when porting the boot.img for CM12.1. Theoretically CM12.1 ramdisk should work with DG550 kernel for CM12.1 rom without any changes (except ueventd.mt6592.rc). It does not pass the boot logo.
4. Also I noticed that there's some issue in sbin folder in ramdisk.
ADev_28 said:
Does anyone know how to make selinux permissive without any app,I tried to change ro.build.selinux and set it to 0 but it didn't work...does anyone know what to edit in ramdisk to make selinux permissive.?
Click to expand...
Click to collapse
/system/bin/setenforce 0
From any root terminal.
Thanks,
1. But i did port for mtk6582 (camera unfortunelty has stop)
chanaka89 said:
I'm still struggling to port this rom to DG550.
1. The tool you used to extract the kernel does not work in Windows 8.1 and Windows 10 (I got empty RAMDISK folder). So I switched back to Windows 7 and it worked well.
2. Compared both Ramdisk folders in Stock DG550 Kitkat and Stock Kingzone K1 Kitkat boot.img's.
There is no difference except in ueventd.rc file. I tried to mix DG550 kernel and Kingzone Z1 stock Ramdisk with DG550 Kitkat rom. It didn't boot at first. The problem was in ueventd.rc file. See line 152 (Mali Node). After replacing ueventd.rc file from DG550 ramdisk it booted and worked well (stock kitkat rom). So both the stock ramdisks are identical if ueventd.rc file is replaced.
3. But it fails when porting the boot.img for CM12.1. Theoretically CM12.1 ramdisk should work with DG550 kernel for CM12.1 rom without any changes (except ueventd.mt6592.rc). It does not pass the boot logo.
4. Also I noticed that there's some issue in sbin folder in ramdisk.
Click to expand...
Click to collapse
Please let us know if u can let it boot
Ramdisk sBin shoudn't be a problem, if they really cause trouble, try copy the missing files from base dg550 kk to cm12
[email protected] said:
1.
Click to expand...
Click to collapse
Thank you very much... Your guide was very appreciated... Work like a charm..
I used the device MT6592 - BLU VIVO IV of the my friend for port CM12.1
Sent from my LIFE PLAY X KK using XDA Free mobile app
lopestom said:
Thank you very much... Your guide was very appreciated... Work like a charm..
I used the device MT6592 - BLU VIVO IV of the my friend for port CM12.1
Sent from my LIFE PLAY X KK using XDA Free mobile app
Click to expand...
Click to collapse
congo
Traace said:
Please let us know if u can let it boot
Ramdisk sBin shoudn't be a problem, if they really cause trouble, try copy the missing files from base dg550 kk to cm12
Click to expand...
Click to collapse
mirrr46 said:
1. But i did port for mtk6582 (camera unfortunelty has stop)
Click to expand...
Click to collapse
seems storage bug...u need to fix storage .............check guide and comments
chanaka89 said:
I'm still struggling to port this rom to DG550.
1. The tool you used to extract the kernel does not work in Windows 8.1 and Windows 10 (I got empty RAMDISK folder). So I switched back to Windows 7 and it worked well.
2. Compared both Ramdisk folders in Stock DG550 Kitkat and Stock Kingzone K1 Kitkat boot.img's.
There is no difference except in ueventd.rc file. I tried to mix DG550 kernel and Kingzone Z1 stock Ramdisk with DG550 Kitkat rom. It didn't boot at first. The problem was in ueventd.rc file. See line 152 (Mali Node). After replacing ueventd.rc file from DG550 ramdisk it booted and worked well (stock kitkat rom). So both the stock ramdisks are identical if ueventd.rc file is replaced.
3. But it fails when porting the boot.img for CM12.1. Theoretically CM12.1 ramdisk should work with DG550 kernel for CM12.1 rom without any changes (except ueventd.mt6592.rc). It does not pass the boot logo.
4. Also I noticed that there's some issue in sbin folder in ramdisk.
Click to expand...
Click to collapse
i don't think so....again try and don't touch ramdisk
[email protected] said:
congo
seems storage bug...u need to fix storage .............check guide and comments
i don't think so....again try and don't touch ramdisk
Click to expand...
Click to collapse
How to solve storage bug??
Device booted.Not able to mount/access storage. ??

[Patch] Persistent automatic disabling SELinux in any kernel

Warning: SELinux – important security feature.
After disabling it you obliviously make Android less secure. Use it on your own risk.
Why it needed?
SELinux can prevent work some mods, like Viper. Or you can have own reasons.
Executing in Terminal "setenforce 0" or via scripts / apps turns SELinux off only after booting: this is not good.
This solution disables SELinux directly in kernel.
Compatible with any MIUI or custom ROM.
How it works
After flashing ZIP creates kernel dump, then it repacks with new command line androidboot.selinux=permissive and writes back.
Into /system/bin copied script.sh and two binaries: mkbootimg and unpackbootimg plus auto-restore script (addon.d)
Last required for keeping and launching that files at every ROM update. This works only on custom ROM's, on MIUI you need re-apply patch manually.
Note: on previous phone at some rare unknown conditions after updating ROM kernel repackaging ended with error and device can't boot.
In this case enter recovery and restore boot from backup or flash boot.img from ROM via fastboot / TWRP.
How to install
1. Once flash attached ZIP
2. Then flash required mods
How to delete
1. Delete file /system/addon.d/99-selinux.sh (and other, that belong to mods that not work with SELinux)
2. Flash current ROM
P.S. This patch probably will work on any device (at least with custom ROM because stock kernel can use different structure).
Rare, but may be required change path to boot partition in script.sh: /dev/block/bootdevice/by-name/boot, twice.
Hi does this method still work in Android 10 and newer?
Great job. This is exactly what I was searching for!
lebigmac said:
does this method still work in Android 10 and newer?
Click to expand...
Click to collapse
Very likely, don't know for sure because still on Pie. Try yourself and share result
When I run this command:
Code:
cat /proc/cmdline
I get this result:
Code:
BOOT_IMAGE=/boot/vmlinuz-5.0.0-13-generic root=UUID=XXXXX-XXXX-XXXX-XXXX-XXXXXXXXX ro quiet splash vt.handoff=1
Maybe in Android 10 and newer they moved the androidboot.selinux=permissive parameter to somewhere else kind of like how they moved the system partition into the super image?
lebigmac said:
Maybe in Android 10 and newer they moved parameter to somewhere else
Click to expand...
Click to collapse
Parameter not present by default.
It's not clear if you tried to flash ZIP. If yes and got no result: probably script can't handle changes in boot.img structure because it was created 4 years ago. Try some tool on PC to unpack boot and add line manually.

Development boot.img for SM-A127F and SM-A125F with the touch and MTP fixed

Here is a few boot.img files (tarred for Odin and zipped) intended to be used together with GSI systems (e.g. LineageOS) which suffer from the non-functional touchscreen after the wake-up and the non-functional MTP (USB file transfer). The boot.img files contain the recompiled stock kernel taken from Samsung Open Source with only a couple of the most necessary fixes. 99.9% unaltered, 100% open-source
All credits for the touchscreen fix go to manteiga25, he's done an amazing job on figuring this all out, still from his solution which includes additional performance tweaks I've taken the absolute bare minimum so that the problem is no longer present. Also huge thanks to Osvaldo Costa for the wonderful bootimgtool.
NOTE: If you did not yet flash any non-stock boot.img or recovery.img you may get the bootloop after flashing of any of these files (except for the orig's). That bootloop is caused by bootloader refusing to boot the VB-unsigned kernel together with the rest of the VB-signed components. The only solution (unfortunately) is the full factory reset, so you'll have to lose your user data; everything else, including the GSI will remain intact, but you'll have to set it up from scratch.
UPDATE 01/09/23: added the version based on A127FXXU7CVL2 (Android 13) version of the kernel.
UPDATE 01/11/23: added the fixed kernels for SM-A125F.
UPDATE 03/16/23: added the version based on A127FXXU5BVF3 (Android 12) version of the kernel.
Files for SM-A127F:
boot_sm-a127f-u4_fixed.zip: A127FXXU4AUK1-based kernel, Ilitek ili9881x fix, MTP fix
boot_sm-a127f-u5_fixed.zip: A127FXXU5BVF3-based (Android 12) kernel, Ilitek ili9881x fix, MTP fix
boot_sm-a127f-u7_fixed.zip: A127FXXU7CVL2-based (Android 13) kernel, Ilitek ili9881x fix, MTP fix
orig_boot_sm-a127-u4.zip: the original unaltered A127FXXU4AUK1 boot.img for undo
orig_boot_sm-a127-u5.zip: the original unaltered A127FXXU5BVF3 boot.img for undo
orig_boot_sm-a127-u7.zip: the original unaltered A127FXXU7CVL2 boot.img for undo
src_sm-a127f_fix.zip: all the altered source files
Files for SM-A125F:
boot_sm-a125f-u2_fixed_v1.zip: A125FXXU2BVB4-based kernel, Ilitek ili9881x fix, MTP fix
boot_sm-a125f-u2_fixed_v2.zip: A125FXXU2BVB4-based kernel, Ilitek ili9881x fix, Novatek nt36525 fix, MTP fix
orig_boot_sm-a125-u2.zip: the original unaltered A125FXXU2BVB3 boot.img for undo
src_sm-a127f-fix_v2.zip: all the altered source files
v1 should be easy on battery, but v2 will probably eat more because it basically disables the power saving features of the touchscreen chip (unfortunately that's the only solution at the kernel side).
If you don't trust me or if you're in desperate need of a more recent kernel, here are the steps how to rebuild it all yourself (for SM-A127F on Debian 11):
Download the kernel source from Samsung Open Source (A127FXXU3AUJ5)
Unpack SM-A127F_RR_Opensource.zip and Kernel.tar.gz inside
Unpack SM-A127F_RR_Opensource_A127FXXU4AUK1.zip into the same dir (overwriting the files)
Unpack the attached source.tar.gz, it contains only the changed files and build.sh facilitating compilation
From root: apt install clang-9 gcc-9-aarch64-linux-gnu
Remove any other versions of clang. Then cd /usr/bin; ln -s clang clang-9; ln -s clang++ clang++-9; ln -s clang-cpp clang-cpp-9
Back in the Kernel dir, run build.sh and wait for the kernel to compile
Download bootimgtool and compile it (just "make")
Download the stock firmware
Extract boot.img from AP_A127FXX[...].tar.md5 (unpack using tar, ignore the .md5) to the root dir of your Kernel
bootimgtool disassemble boot.img
cp Kernel/arch/arm64/boot/Image kernel
bootimgtool create -o boot.img
Flash boot.img as is using Heimdall or pack into .tar and flash using Odin
For SM-A125F you'll need to use the Google's patched Clang and GCC instead, and there is no way around that except for lots and lots of additional include paths for the Mediatek drivers (and even that does not guarentee that it will be compiled successfully).
uluruman said:
Here is the boot.img (tarred for Odin) intended to be used together with GSI systems (e.g. LineageOS). It contains the recompiled stock U4 kernel taken from Samsung Open Source with only a couple of the most necessary fixes, namely the freezing touchscreen and the non-functional MTP. 99.9% unaltered, 100% open-source.
All credits for the touchscreen fix go to manteiga25, he's done an amazing job on figuring this all out, still from his solution which includes additional performance tweaks I've taken the absolute bare minimum so that the problem is no longer present. Also huge thanks to Osvaldo Costa for the wonderful bootimgtool.
If you don't trust me here are the steps how to rebuild it all yourself (on Debian 11):
Download the kernel source from Samsung Open Source (A127FXXU3AUJ5)
Unpack SM-A127F_RR_Opensource.zip and Kernel.tar.gz inside
Unpack SM-A127F_RR_Opensource_A127FXXU4AUK1.zip into the same dir (overwriting the files)
Unpack the attached source.tar.gz, it contains only the changed files and build.sh facilitating compilation
From root: apt install clang-9 gcc-9-aarch64-linux-gnu
Remove any other versions of clang. Then cd /usr/bin; ln -s clang clang-9; ln -s clang++ clang++-9; ln -s clang-cpp clang-cpp-9
Back in the Kernel dir, run build.sh and wait for the kernel to compile
Download bootimgtool and compile it (just "make")
Download the stock firmware
Extract boot.img from AP_A127FXX[...].tar.md5 (unpack using tar, ignore the .md5) to the root dir of your Kernel
bootimgtool disassemble boot.img
cp Kernel/arch/arm64/boot/Image kernel
bootimgtool create -o boot.img
Flash boot.img as is using Heimdall or pack into .tar and flash using Odin
Click to expand...
Click to collapse
Amazing work. Love to see developers still working on this device. Does it work with SM-A125F?
Allehandro said:
Amazing work. Love to see developers still working on this device. Does it work with SM-A125F?
Click to expand...
Click to collapse
You can try, it may work, but most likely will bootloop. SM-A125F is based on a Mediatek SoC, SM-A127F is based on Exynos, which has a different kernel config.
uluruman said:
You can try, it may work, but most likely will bootloop. SM-A125F is based on a Mediatek SoC, SM-A127F is based on Exynos, which has a different kernel config.
Click to expand...
Click to collapse
I don't want to risk it as it is my main device and don't want to have to restore the device later on. Thanks though.
I've finally managed to compile the SM-A125F kernel (A125FXXU2BVB4 - SM-A125F_EUR_RR): somehow it turned out to be MUCH harder than that for SM-A127F, as nearly everything there is designed for only one specific toolchain, plus the non-Samsung s_mtp driver did not compile, so I had to take it from A127F's source. Anyway, I've ported the same fixes and here is the experimental boot.img. As I don't have SM-A125F I cannot test it, so I need someone to test it. Also attached is the original U2 boot.img: in case it does not work you just flash the original.
Amazing bro! Mad respect!!!!
I will soon put this baby to the test and see what's made of!!!
I can flash this using ODIN (PDA) directly over the current LOS GSI right?
Also, do you plan to include this kernel in your gsi building script so that the boot img of the gsi will be this one?
One other issue that I seemed to also have in my phone was the proximity sensor was not working e.g. when I was in call the screen would remain on....
axy_david said:
Amazing bro! Mad respect!!!!
I will soon put this baby to the test and see what's made of!!!
I can flash this using ODIN (PDA) directly over the current LOS GSI right?
Also, do you plan to include this kernel in your gsi building script so that the boot img of the gsi will be this one?
One other issue that I seemed to also have in my phone was the proximity sensor was not working e.g. when I was in call the screen would remain on....
Click to expand...
Click to collapse
Yes, flash using Odin. GSI should not be affected in any way. If anything does wrong I've also attached the original A127FXXU4AUK1 boot.img, so that you could revert the changes.
Currently I'm struggling to make the same fixed boot.img for my second phone, which is SM-A325F, and I cannot: even if I just unpack and repack back the same boot.img using any tool, including the Google's official mkbootimg, it causes the bootloop. So all of this is currently experimental.
uluruman said:
Currently I'm struggling to make the same fixed boot.img for my second phone, which is SM-A325F, and I cannot: even if I just unpack and repack back the same boot.img using any tool, including the Google's official mkbootimg, it causes the bootloop. So all of this is currently experimental.
Click to expand...
Click to collapse
This issue is sorted out: one cannot flash a custom boot.img over the signed stock one and don't do the full factory reset afterwards. Only after the factory reset the system boots with the unsigned boot partition. Interestingly enough, Download allows flashing such an image without any warnings (in contrast to flashing up_param.bin) but the system just refuses to boot.
uluruman said:
This issue is sorted out: one cannot flash a custom boot.img over the signed stock one and don't do the full factory reset afterwards. Only after the factory reset the system boots with the unsigned boot partition. Interestingly enough, Download allows flashing such an image without any warnings (in contrast to flashing up_param.bin) but the system just refuses to boot.
Click to expand...
Click to collapse
is it possible to fix the proximity sensor?
axy_david said:
is it possible to fix the proximity sensor?
Click to expand...
Click to collapse
There is no physical proximity sensor in this phone, but with the latest firmware you can normally use the Phone app. Now it normally reacts on touching the top part of the screen with your ear and blanks the screen. The screen does not blank on approaching the screen but only on touching it.
uluruman said:
Here is the boot.img (tarred for Odin) intended to be used together with GSI systems (e.g. LineageOS). It contains the recompiled stock U4 kernel taken from Samsung Open Source with only a couple of the most necessary fixes, namely the freezing touchscreen and the non-functional MTP. 99.9% unaltered, 100% open-source.
If the fixed boot.img does not work for you for some reason, I've also attached the original U4 boot (taken from the SM-A127F_NPB_A127FXXU4AUK1 firmware) so you could revert the changes.
All credits for the touchscreen fix go to manteiga25, he's done an amazing job on figuring this all out, still from his solution which includes additional performance tweaks I've taken the absolute bare minimum so that the problem is no longer present. Also huge thanks to Osvaldo Costa for the wonderful bootimgtool.
If you don't trust me or if you're in desperate need of a more recent kernel, here are the steps how to rebuild it all yourself (on Debian 11):
Download the kernel source from Samsung Open Source (A127FXXU3AUJ5)
Unpack SM-A127F_RR_Opensource.zip and Kernel.tar.gz inside
Unpack SM-A127F_RR_Opensource_A127FXXU4AUK1.zip into the same dir (overwriting the files)
Unpack the attached source.tar.gz, it contains only the changed files and build.sh facilitating compilation
From root: apt install clang-9 gcc-9-aarch64-linux-gnu
Remove any other versions of clang. Then cd /usr/bin; ln -s clang clang-9; ln -s clang++ clang++-9; ln -s clang-cpp clang-cpp-9
Back in the Kernel dir, run build.sh and wait for the kernel to compile
Download bootimgtool and compile it (just "make")
Download the stock firmware
Extract boot.img from AP_A127FXX[...].tar.md5 (unpack using tar, ignore the .md5) to the root dir of your Kernel
bootimgtool disassemble boot.img
cp Kernel/arch/arm64/boot/Image kernel
bootimgtool create -o boot.img
Flash boot.img as is using Heimdall or pack into .tar and flash using Odin
P.S.: the U5 kernel sources are suspicously segregated between RR (rest of the world), EUR, CIS and CIS-SER (Russia). It's quite interesting what are the differences?
Click to expand...
Click to collapse
Can you make one for A127F/DSN U7? (I don't have linux)
just tested on my phone latest U7 or s7???? nevertheless it bootloops
axy_david said:
just tested on my phone latest U7 or s7???? nevertheless it bootloops
Click to expand...
Click to collapse
it only works for u4 currently.
TheWorldYT said:
Can you make one for A127F/DSN U7? (I don't have linux)
Click to expand...
Click to collapse
I will, hold on.
just tested on my phone latest U7 or s7???? nevertheless it bootloops
TheWorldYT said:
it only works for u4 currently.
Click to expand...
Click to collapse
damn, and I can't downgrade, im using A127FXXS7BVK1 the latest update for europe really
axy_david said:
just tested on my phone latest U7 or s7???? nevertheless it bootloops
damn, and I can't downgrade, im using A127FXXS7BVK1
Click to expand...
Click to collapse
same thing.
also:
uluruman said:
I will, hold on.
Click to expand...
Click to collapse
axy_david said:
just tested on my phone latest U7 or s7???? nevertheless it bootloops
damn, and I can't downgrade, im using A127FXXS7BVK1 the latest update for europe really
Click to expand...
Click to collapse
uluruman said he will create one.
axy_david said:
just tested on my phone latest U7 or s7???? nevertheless it bootloops
damn, and I can't downgrade, im using A127FXXS7BVK1 the latest update for europe really
Click to expand...
Click to collapse
Done! ) See the update in the first post.
I've used the A127FXXU7CVL2 version source but it should work anyway because it's also U7-based (anyway there is no alternative - Samsung provides only that U7-based kernel). The only thing that theoretically can be needed is the factory reset: at least with my SM-A325F that was the case of the weird boot loop - the Verified Boot protection being voided (the warranty void bit being set) caused the bootloader to refuse loading the kernel.
uluruman said:
Done! ) See the update in the first post.
I've used the A127FXXU7CVL2 version source but it should work anyway because it's also U7-based (anyway there is no alternative - Samsung provides only that U7-based kernel). The only thing that theoretically can be needed is the factory reset: at least with my SM-A325F that was the case of the weird boot loop - the Verified Boot protection being voided (the warranty void bit being set) caused the bootloader to refuse loading the kernel.
Click to expand...
Click to collapse
Thank you!
uluruman said:
I've finally managed to compile the SM-A125F kernel (A125FXXU2BVB4 - SM-A125F_EUR_RR): somehow it turned out to be MUCH harder than that for SM-A127F, as nearly everything there is designed for only one specific toolchain, plus the non-Samsung s_mtp driver did not compile, so I had to take it from A127F's source. Anyway, I've ported the same fixes and here is the experimental boot.img. As I don't have SM-A125F I cannot test it, so I need someone to test it. Also attached is the original U2 boot.img: in case it does not work you just flash the original.
Click to expand...
Click to collapse
Can u make flashable zip for fix touch and mtp for a125f cause i think it dndt work after flashing only boot.img in twrp,still i found out that the baseband version is still bv5 instead of bv4 i hope you fix that bro because i want to install gsi
uluruman said:
Here is the boot.img (tarred for Odin) intended to be used together with GSI systems (e.g. LineageOS). It contains the recompiled stock U4 kernel taken from Samsung Open Source with only a couple of the most necessary fixes, namely the freezing touchscreen and the non-functional MTP. 99.9% unaltered, 100% open-source.
If the fixed boot.img does not work for you for some reason, I've also attached the original U4 boot (taken from the SM-A127F_NPB_A127FXXU4AUK1 firmware) so you could revert the changes.
All credits for the touchscreen fix go to manteiga25, he's done an amazing job on figuring this all out, still from his solution which includes additional performance tweaks I've taken the absolute bare minimum so that the problem is no longer present. Also huge thanks to Osvaldo Costa for the wonderful bootimgtool.
UPDATE 01/09/23: added the version based on A127FXXU7CVL2 (Android 13) version of the kernel.
If you don't trust me or if you're in desperate need of a more recent kernel, here are the steps how to rebuild it all yourself (on Debian 11):
Download the kernel source from Samsung Open Source (A127FXXU3AUJ5)
Unpack SM-A127F_RR_Opensource.zip and Kernel.tar.gz inside
Unpack SM-A127F_RR_Opensource_A127FXXU4AUK1.zip into the same dir (overwriting the files)
Unpack the attached source.tar.gz, it contains only the changed files and build.sh facilitating compilation
From root: apt install clang-9 gcc-9-aarch64-linux-gnu
Remove any other versions of clang. Then cd /usr/bin; ln -s clang clang-9; ln -s clang++ clang++-9; ln -s clang-cpp clang-cpp-9
Back in the Kernel dir, run build.sh and wait for the kernel to compile
Download bootimgtool and compile it (just "make")
Download the stock firmware
Extract boot.img from AP_A127FXX[...].tar.md5 (unpack using tar, ignore the .md5) to the root dir of your Kernel
bootimgtool disassemble boot.img
cp Kernel/arch/arm64/boot/Image kernel
bootimgtool create -o boot.img
Flash boot.img as is using Heimdall or pack into .tar and flash using Odin
P.S.: the U5 kernel sources are suspicously segregated between RR (rest of the world), EUR, CIS and CIS-SER (Russia). It's quite interesting what are the differences?
Click to expand...
Click to collapse
Please create working flashable zip file for twrp for a125f cause i dont have pc i cant use odin,thank you

Categories

Resources