[HELP NEEDED] [S7 SM-G930FD] stuck on boot animation after flashing boot.img - Samsung Galaxy S7 Questions and Answers

Hi all,
Im trying to flash a custom built kernel on a g930fd device running android 6.0.1.
ive did the following steps:
built the kernel - the source matches with the rom on the device
replaced the out Image using AIK
created a flashable zip and tried to instal it via TWRP.
another steps ive tried as sanity checks, ALL RESULTED IN BOOT ANIMATION LOOP:
1. dd out the boot.img form running device, dd that boot.img back to /dev/block/platform/*/*/BOOT
2. flash boot.img with odin
3. built dtb and Image and flashed in using Lazyflasher
IF SOMEONE KNOWS WHAT COULD BE THE PROBLEM, ILL APPRECIATE ANY HELP , THANK YOU.
@osm0sis i hope maybe you can help me with a valuble input thanks in advance!

Where's your source?

djb77 said:
Where's your source?
Click to expand...
Click to collapse
i got it from samsung opensource

qroot0 said:
i got it from samsung opensource
Click to expand...
Click to collapse
You do realise you still have to modify it in order to get it to work properly.
So where is YOUR source code? What's your github link?

djb77 said:
You do realise you still have to modify it in order to get it to work properly.
So where is YOUR source code? What's your github link?
Click to expand...
Click to collapse
Sorry,
heres the link:
github.com/IgalGokhman/8890-6.0.1-custom-kernel
Ive reverted the changes i made to the defconfig.
BTW, Its my first time building a kernel for samsung device, so im not sure about all the chhanges i need to make in order to run it on the device.
Ive read a lot through xda and othher forums but the majority of them just saying: run make and install using updater-script...

qroot0 said:
Sorry,
heres the link:
github.com/IgalGokhman/8890-6.0.1-custom-kernel
Ive reverted the changes i made to the defconfig.
BTW, Its my first time building a kernel for samsung device, so im not sure about all the chhanges i need to make in order to run it on the device.
Ive read a lot through xda and othher forums but the majority of them just saying: run make and install using updater-script...
Click to expand...
Click to collapse
Well, I really needed to see what changes you made to start with, because all I have in front of me now is clean source.
Most of us use a build.sh script of some sort which builds the zimage, dtb, and ramdisk. My script does it all, builds kernel and zip.
Here's my old MM kernel that you can have a look at:
https://github.com/TheGalaxyProject/tgpkernel-s7-mm
If you use any of this please give credit

djb77 said:
Well, I really needed to see what changes you made to start with, because all I have in front of me now is clean source.
Most of us use a build.sh script of some sort which builds the zimage, dtb, and ramdisk. My script does it all, builds kernel and zip.
Here's my old MM kernel that you can have a look at:
https://github.com/TheGalaxyProject/tgpkernel-s7-mm
If you use any of this please give credit
Click to expand...
Click to collapse
Thanks I’ll take a look.
I do have a build script, eventually I have an Image and a dtb.image, from both of them I make a boot.img with AIK.
I tried to build the kernel with the config values I pulled from the device /proc/config.gz and with the “as is” values in the arch/arm64/configs/exynos_8890_defconfig
Both boot.imgs bootlooped the device

Related

[Q] Source Code Base to build ROMs for SGS4G

Hello All,
I am new to the android platform. So please forgive if this is too trivial a question.
1. How do I obtain source code for a specific platform and a specific phone?
Is it segregated that way?
2. How do I build ROM and package it to deploy on the phone?
Please provide pointers to these and I am willing to go through the documents/literature. Please help.
Thanks in advance!!
Two answers first question go in general section second start here http://forum.xda-developers.com/showthread.php?t=1117554 very good read hope this helps
sent from gingerbread 2.3.3 sgs4g ROOTED
rose2jam said:
Two answers first question go in general section second start here http://forum.xda-developers.com/showthread.php?t=1117554 very good read hope this helps
sent from gingerbread 2.3.3 sgs4g ROOTED
Click to expand...
Click to collapse
Thanks for the quick response! I have been going over that thread quite extensively but I can't seem to locate threads for
1. How to get the source code for the instrument( SGS4G) ?
2. How to build a complete ROM which is flashable? Basically, How to package it for deployment, like the other developers do on this forum.
androcton said:
Thanks for the quick response! I have been going over that thread quite extensively but I can't seem to locate threads for
1. How to get the source code for the instrument( SGS4G) ?
2. How to build a complete ROM which is flashable? Basically, How to package it for deployment, like the other developers do on this forum.
Click to expand...
Click to collapse
You didn't post in the right section, this needs to go in the general section.
You'll need to download the phone's source:
https://opensource.samsung.com/reception/reception_main.do?method=reception_search&searchValue=t959v
You should grab both files there. You'll need to build this on Linux or anything that has G++ for ARM.
FBis251 said:
You didn't post in the right section, this needs to go in the general section.
You'll need to download the phone's source:
https://opensource.samsung.com/reception/reception_main.do?method=reception_search&searchValue=t959v
You should grab both files there. You'll need to build this on Linux or anything that has G++ for ARM.
Click to expand...
Click to collapse
Thank you so much! I am already onto it!
Moved to proper forum.
androcton said:
Thank you so much! I am already onto it!
Click to expand...
Click to collapse
Did you ever get it working? I also found Dr. Honk's public git here:
https://github.com/drhonk/android_device_samsung_sgs4g
You can see the source for the Bali kernel here:
https://github.com/drhonk/Bali-V4G
Tell me how it goes.
FBis251,
Thanks for the resources! Currently I am still trying to get my dev-env setup properly, somehow have some installation/setup issues with the GNU/LINUX ARM toolchain. Meanwhile, I could build the kernel from the android base from source.android.com.
I have the system.img and other files in the out directory. The build went through but with lot of warnings. Here is the buildlog. Please let me know if something is amiss. Thanks!
Assuming the build went fine, I am not quite sure how to load that onto the device. I am trying to run an emulator though....will get back on that.
androcton said:
FBis251,
Thanks for the resources! Currently I am still trying to get my dev-env setup properly, somehow have some installation/setup issues with the GNU/LINUX ARM toolchain. Meanwhile, I could build the kernel from the android base from source.android.com.
I have the system.img and other files in the out directory. The build went through but with lot of warnings. Here is the buildlog. Please let me know if something is amiss. Thanks!
Assuming the build went fine, I am not quite sure how to load that onto the device. I am trying to run an emulator though....will get back on that.
Click to expand...
Click to collapse
Have you tried looking at:
http://source.android.com/source/building.html
Apparently you can just flash the image you just made... Try to see if you can open the .img as a .tar...?
I'm having trouble compling the bali kernel... I'll try again tomorrow.
FBis251 said:
Have you tried looking at:
http://source.android.com/source/building.html
Apparently you can just flash the image you just made... Try to see if you can open the .img as a .tar...?
I'm having trouble compling the bali kernel... I'll try again tomorrow.
Click to expand...
Click to collapse
Hi FBis251,
Can you please tell me how did you go about setting up the dev-env(the cross compiling toolchains). Are you using linux( which flavor, I am using Ubuntu 11.04 Natty Narwhal). I have some problems setting up the toolchains...as mentioned in the below link
https://opensource.samsung.com/recep...rchValue=t959v
Any ideas??
The readme from the opensource site says:
Code:
HOW TO BUILD KERNEL
1. Visit http://www.codesourcery.com/, download and install Sourcery G++ Lite 2009q3-68 toolchain for ARM EABI.
2. Extract kernel source and move into the top directory.
3. Execute 'make vibrantplus_rev00_defconfig'.
4. Execute 'make' or 'make -j<n>' where '<n>' is the number of multiple jobs to be invoked simultaneously.
I just googled thw 2009q3-68 version since I couldn't find it on the site after signing up and came across this:
http://www.codesourcery.com/sgpp/lite/arm/portal/release1033
I actually haven't gotten the kernel to compile without errors yet, and I haven't tried building the platform source until later today. You'll have to modify the makefile, look for the variable called CrossCompile and set it to the main /bin folder from the CodeSourcery toolchain.
Should be something like
Code:
CROSS_COMPILE ?= /home/user/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-eabi-
I'll give you more details later, I'm still learning as I go too.
Also, something I came across to speed things up when you do the make, apparently if you have a quadcore processor, you can use make -j 8 (or just multiply however many cores you have by 2) and the compile should run as fast as possible.
Keep me posted.
FBis251 said:
The readme from the opensource site says:
Code:
HOW TO BUILD KERNEL
1. Visit http://www.codesourcery.com/, download and install Sourcery G++ Lite 2009q3-68 toolchain for ARM EABI.
2. Extract kernel source and move into the top directory.
3. Execute 'make vibrantplus_rev00_defconfig'.
4. Execute 'make' or 'make -j<n>' where '<n>' is the number of multiple jobs to be invoked simultaneously.
I just googled thw 2009q3-68 version since I couldn't find it on the site after signing up and came across this:
http://www.codesourcery.com/sgpp/lite/arm/portal/release1033
I actually haven't gotten the kernel to compile without errors yet, and I haven't tried building the platform source until later today. You'll have to modify the makefile, look for the variable called CrossCompile and set it to the main /bin folder from the CodeSourcery toolchain.
Should be something like
Code:
CROSS_COMPILE ?= /home/user/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-eabi-
I'll give you more details later, I'm still learning as I go too.
Also, something I came across to speed things up when you do the make, apparently if you have a quadcore processor, you can use make -j 8 (or just multiply however many cores you have by 2) and the compile should run as fast as possible.
Keep me posted.
Click to expand...
Click to collapse
I followed the procedure mentioned in that readme file, but with additional info from other site,,
I extracted the source code from samsung open source, and then used the toolchain from the android base and it looked like it built(lot of warnings), but i cant find zImage anywhere?Wondering what ever happened during the build,,,
command used: make -j4 ARCH=arm CROSS_COMPILE=/android/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi- zImage
Build abruptly end, no build logs anything, see file for build output.
Is there anything that I am missing?, Please help!
And, Don't you think the build log is unusually small for a kernel build?? :O
androcton said:
I followed the procedure mentioned in that readme file, but with additional info from other site,,
I extracted the source code from samsung open source, and then used the toolchain from the android base and it looked like it built(lot of warnings), but i cant find zImage anywhere?Wondering what ever happened during the build,,,
command used: make -j4 ARCH=arm CROSS_COMPILE=/android/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi- zImage
Build abruptly end, no build logs anything, see file for build output.
Is there anything that I am missing?, Please help!
And, Don't you think the build log is unusually small for a kernel build?? :O
Click to expand...
Click to collapse
Folks on the forum, any ideas, the open source code from samsung sure looks like it has built all the '.o's but abruptly stop without even a warning as to what is wrong? Please help. Thanks in advance!
androcton said:
Folks on the forum, any ideas, the open source code from samsung sure looks like it has built all the '.o's but abruptly stop without even a warning as to what is wrong? Please help. Thanks in advance!
Click to expand...
Click to collapse
Okay, I got the kernel to compile after getting rid of the
1. "error: 'SEGMENT_SIZE' undeclared" problem, I had to turn on the Make V=1 ( verbose mode) explicitly to get to this point.
2. Next the compilation stopped saying "make[3]: *** No rule to make target `net/ipv4/netfilter/ipt_ecn.o', needed by `net/ipv4/netfilter/built-in.o'."
I had to remove the netfilter support from the kernel. I REALLY did not know how to solve this problem. Now that I have built the zImage( really small compared to the zImage that gets posted around in the forum) I am now concentrating on how get netfilter back into the kernel, for it is an important module for anything to do with TCP/IP security n filtering.
Finally,
3. How do I package this to the phone as a complete bootable ROM? Please help! Thanks in advance!
I found this thread, it might be useful. I can't try it until later though.
http://forum.xda-developers.com/showthread.php?t=704561

[KERNEL] MultiTasker (beta test)

Well, after doing some testing with this for the last couple days I have had great results. The actual kernel is untouched, since we don't have source yet, but the initramfs has been tweaked to provide proper multitasking capabilities.
Compatible with 1.85 ONLY!
Features:
Insecure (adb always runs as root)
Better multitasking (still sucks, but better)
Init.d Support (run user scripts on boot)
Download:
deprecated
Instructions
Flash from fastboot
Update: I just tested things out with angry birds space, the game will pause and stay in memory like it should, but it will kick all other apps out and cause them to reload.
designgears said:
Well, after doing some testing with this for the last couple days I have had great results. The actual kernel is untouched, since we don't have source yet, but the initramfs has been tweaked to provide proper multitasking capabilities.
This is a beta test, I tested it will standard apps, I have yet to test it with games. Please report what you find!
Compatible with 1.85 ONLY!
Download:
http://www.gigashare.in/91105
Instructions
Flash from fastboot
Click to expand...
Click to collapse
Thanks DG!
have you made this boot.img insecure in the init.rc?
Zarboz said:
Thanks DG!
have you made this boot.img insecure in the init.rc?
Click to expand...
Click to collapse
heh, no, totally forgot about that, meant to.
edit:
just updated the link with one that is
Thanks DG, testing now
EDIT: From preliminary testing it looks like it can handle around 3 small tasks (like a webpage, google music, and gmail) pretty easily. But when you get to 4 it kicks out the oldest task there.
designgears said:
heh, no, totally forgot about that, meant to.
edit:
just updated the link with one that is
Click to expand...
Click to collapse
can't wait for them to let out kernel source i wanna get to building !
this just made my day
adb root
adbd is already running as root
who cares if multitasking works we have a unsecured image to play with now
thanks again and another #win for sure
What device / ROM did you test on?
EDIT: Worked on mine!
Thanks!
What tool did you use to pack / unpack this?
I tired with DSI Kitchen and it only caused no boot. How did you do this?
init.d support?
scrosler said:
What tool did you use to pack / unpack this?
I tired with DSI Kitchen and it only caused no boot. How did you do this?
init.d support?
Click to expand...
Click to collapse
Not sure what tool you are talking about but I had also tried this:
http://forum.xda-developers.com/showthread.php?t=1659584
And I was ending up with a bootloop every time before the animation.
scrosler said:
What tool did you use to pack / unpack this?
I tired with DSI Kitchen and it only caused no boot. How did you do this?
init.d support?
Click to expand...
Click to collapse
waiting for reply as well so we can play with stuff
this is great, i would love to know what you used to unpack it as well and if it does support init.d
rohan32 said:
Not sure what tool you are talking about but I had also tried this:
http://forum.xda-developers.com/showthread.php?t=1659584
And I was ending up with a bootloop every time before the animation.
Click to expand...
Click to collapse
Pretty much the same tool but different. But that exactly what was happening to me too.
I decompiled this boot.img and it doesnt have init.d support. Maybe OP will add it
I am using the same method as dsixda uses in his kitchen to extract it. The build command is a bit different tho.
mkbootimg --cmdline 'console=ttyHSL0,115200,n8' --kernel <kernel path> --ramdisk <ramdisk path> --base 80400000 --ramdiskaddr 81800000
You have to set the ramdiskaddr, and it has to be set after the base or it will be overwritten.
-------------
and multitasking still sucks.. lol, I think we will need kernel source to fix it properly.
designgears said:
I am using the same method as dsixda uses in his kitchen to extract it. The build command is a bit different tho.
mkbootimg --cmdline 'console=ttyHSL0,115200,n8' --kernel <kernel path> --ramdisk <ramdisk path> --base 80400000 --ramdiskaddr 81800000
You have to set the ramdiskaddr, and it has to be set after the base or it will be overwritten.
-------------
and multitasking still sucks.. lol, I think we will need kernel source to fix it properly.
Click to expand...
Click to collapse
Well you got us unsecured boot.img!!!!!!
Going to try your command to see if I can get init.d working... Unless of course you can beat me to it
Thanks DG for deciding to mod for the One X. You and scrosler do awesome work. Two awesome developers on board.
Sent from my HTC One X using XDA
Got init.d support!!!!!!!!!!!!!!!!!!!!!!
Here it is!
Thanks for the help OP!!!!!!!!!
I attached it to this post if you dont want it here I will remove it.
scrosler said:
Got init.d support!!!!!!!!!!!!!!!!!!!!!!
Here it is!
Thanks for the help OP!!!!!!!!!
I attached it to this post if you dont want it here I will remove it.
Click to expand...
Click to collapse
sweet! did you set it up with logwrapper?!
designgears said:
sweet! did you set it up with logwrapper?!
Click to expand...
Click to collapse
No, I just took your boot.img and added modded init.rc. I have to head to work now so I cant play any more but I wnated to try what you told me about the command line parameters and it worked perfect!
Thanks for helping me figure this out. I had been pulling my hair out (what little left I have).
designgears said:
Instructions
Flash from fastboot
Click to expand...
Click to collapse
fastboot flash <imagename> ?
Thank you
nugzo said:
fastboot flash <imagename> ?
Thank you
Click to expand...
Click to collapse
fastboot flash boot imagename.img
nugzo said:
fastboot flash <imagename> ?
Thank you
Click to expand...
Click to collapse
fastboot flash boot <path/to/img>

Stupid SU: Galaxy S 4 stock+root helper

Hi guys!
As some of you must have noticed, latest Samsung GT-I9500 firmwares carry a kernel configuration supposed to prevent SETUID privilege elevation.
Stock unmodified firmware with root is my preferred setup but also a strong dependency for all my development, for me this change is a massive setback if not a dealbreaker.
While poking around I found in about an hour something weird that reveled being a vulnerability, so I created a little thing to make it useful for now.
README:
Stupid SU: Galaxy S4 root helper by François SIMOND aka @supercurio
Circumvent an extremely weak false-security "Anti Root" mechanism implemented
on latest Samsung Galaxy S4 devices (on both Exynos and Qualcomm versions)
Preventing proper root function on official firmware breaks all my Voodoo apps
requiring stock+root and is a move that's hostile to both users and developers.
Samsung security might be embarassed by this proof of concept, as it defeats
their mechanism in a single line... not even with complex ARM assembler
but *one* line of shell script.
However, the goal here is to show Superuser solutions developers how to
deal with those devices for now, and provide a working solution to people who
bought a Galaxy S4 expecting to root it cleanly and easily but cannot.
This proof of concept is slightly slowing down Superuser calls, but its
"plain text" implementation has the merit of showing how stupid this exploit is.
SELinux configuration stays unmodified and active.
Features:
- Detect and supports both SuperSU and Koush's Superuser
- Installs Super SU binary by default
Make sure you have one of those Superuser apps installed:
- https://play.google.com/store/apps/details?id=com.koushikdutta.superuser
- https://play.google.com/store/apps/details?id=eu.chainfire.supersu
Root feature doesn't rely on a "StupidSU kernel" which is only an installer.
Feel free to flash back Samsung's original boot.img from their official firmware
after booting at least once.
Important Note:
This "exploit" is so lame that it will be fixed in no time, making updated S4
a pain to root again.
I wish Samsung will reconsider their "Anti Root" approach, which is damageable
in every regard and defective by design as demonstrated here.
Also, I'm simply not interested developing for and promoting devices from
manufacturers hostile to developers: It's just a waste of valuable time.
Click to expand...
Click to collapse
INSTALL
1/ copy rooting/ directory in your initramfs
Make sure "root.sh" file is has an executable permission (chmod 744 recommended)
2/ Add those lines at init.universal5410.rc end:
# Stupid SU
service rooting /stupidsu/root.sh
class main
user root
group root
oneshot
3/ Assemble your initramfs with the associated Samsung official kernel binary
of choice in a regular boot image
4/ flash as boot.img
5/ At each boot, Superuser app are detected automatically and su binary adjusted
accordingly.
Click to expand...
Click to collapse
Source code
On GitHub
License
Kernels downloads, only for demo purposes of the concept, you can flash back original Samsung boot.img once rooted
GT-I9500 Stock + root StupidSU v4 UBUAMDE
GT-I9500 Stock + root StupidSU v4 XXUAMDK
GT-I9500 Stock + root StupidSU v4 XXUAME1
What's next
Owners of Qualcomm Galaxy S 4 devices experiencing the same dificulties with Samsung the anti root strategy might want to try this method, please let me know if you're ready for some experimentations.
Supercurio pleas add thraed t General section i think ther well bee lots of testers for i9505.thx for suport
Sent from my LG-P500 using xda app-developers app
Going to try this on latest LE1 stock kernel now .....thread is in correct section
edit: did not work on LE1 kernel. I will try once again. DId any one tried the MDK kernel..I am having again the problem with SU binaries installation..
Edit: Thanks bro. working on ME1 kernel now. Did mistake while doing tar. Appreciate it! Root is working fine but cant update the binaries of Supersu, still the root works fine.
Here comes the master welcome to SGS4 development forum mate.. (rahulzeven from twitter here )
So the BEST thing's just happened?!:laugh::good:
i repacked the kernel of Samsung-Updates.com-KERNEL-GT-I9500-XSE-I9500XXUAME1-1367637350 using supercurio method. Root works fine. All we need to is install it from ODIN and dont update the binaries of supersu.
Download Link
Edit: New file uploaded
grgsiocl said:
i repacked the kernel of Samsung-Updates.com-KERNEL-GT-I9500-XSE-I9500XXUAME1-1367637350 using supercurio method. Root works fine. All we need to is install it from ODIN and dont update the binaries of supersu.
Download Link
Click to expand...
Click to collapse
Thanks fo much! Will Titanium Backup work on this kernel?
Hope chainfire will start working on mobileOdin soon. So much easier to flash than.
... tapat*lked
GSeeker said:
Thanks fo much! Will Titanium Backup work on this kernel?
Click to expand...
Click to collapse
wrong file uploaded. Please download the same in 5 minutes. Uploading is on and the kernel date should be MAY 04
---------- Post added at 12:33 PM ---------- Previous post was at 12:28 PM ----------
GSeeker said:
Thanks fo much! Will Titanium Backup work on this kernel?
Click to expand...
Click to collapse
it should work as i dont use titanium backup and instead i use gobackup pro and it works fine anyway
MDK from OP working good, thanks
grgsiocl said:
i repacked the kernel of Samsung-Updates.com-KERNEL-GT-I9500-XSE-I9500XXUAME1-1367637350 using supercurio method. Root works fine. All we need to is install it from ODIN and dont update the binaries of supersu.
Download Link
Edit: New file uploaded
Click to expand...
Click to collapse
I'm trying to repack the kernel of korean gs4,
but I am a noob in kernel devs.
I can edit ramdisc, but fist trying in initramfs, zImage.
Is rooting directory means both root.sh and files(folder)?
and paste them on first class route?
hope you give some advices.. thanks
aslak89 said:
I'm trying to repack the kernel of korean gs4,
but I am a noob in kernel devs.
I can edit ramdisc, but fist trying in initramfs, zImage.
Is rooting directory means both root.sh and files(folder)?
and paste them on first class route?
hope you give some advices.. thanks
Click to expand...
Click to collapse
when you unpack the kernel you will have two folders one is ramdisk and other one is split_img (zimage). You need to copy the folder stupidsu folder in ramdisk and modify the init.universal5410.rc as per OP stated and repack the image
grgsiocl said:
when you unpack the kernel you will have two folders one is ramdisk and other one is split_img (zimage). You need to copy the folder stupidsu folder in ramdisk and modify the init.universal5410.rc as per OP stated and repack the image
Click to expand...
Click to collapse
then, is not necessary to recompile zImage?
ok I m going to try it right now, thank you grgsiocl
muhamet said:
Supercurio pleas add thraed t General section i think ther well bee lots of testers for i9505.thx for suport
Click to expand...
Click to collapse
Yes in fact I was hesitating, but as soon as someone is ready to assist me to try on a Qualcomm device (I9505 or T-Mobile Galaxy S4) I'll make a thread here too.
grgsiocl said:
Going to try this on latest LE1 stock kernel now .....thread is in correct section
edit: did not work on LE1 kernel. I will try once again. DId any one tried the MDK kernel..I am having again the problem with SU binaries installation..
Edit: Thanks bro. working on ME1 kernel now. Did mistake while doing tar. Appreciate it! Root is working fine but cant update the binaries of Supersu, still the root works fine.
Click to expand...
Click to collapse
Great then
aslak89 said:
then, is not necessary to recompile zImage?
ok I m going to try it right now, thank you grgsiocl
Click to expand...
Click to collapse
The point here is to have stock (unmodified Samsung binary) kernel running, with associated modules and no other modification.
Which gives you several usage options:
keep the StupidSU stock+root kernel (same kernel binary, same kernel modules, only very slightly initramfs scripts) that will auto-root depending on which Superuser APK you installed
you can flash back the official kernel and still enjoy root the same.
supercurio said:
The point here is to have stock (unmodified Samsung binary) kernel running, with associated modules and no other modification.
Which gives you several usage options:
keep the StupidSU stock+root kernel (same kernel binary, same kernel modules, only very slightly initramfs scripts) that will auto-root depending on which Superuser APK you installed
you can flash back the official kernel and still enjoy root the same.
Click to expand...
Click to collapse
Thank you for awsering
then I repacked my kernel but still not work.
copyed stupidsu and edited init.universal5410.rc in ramdisk and repacked boot.img.
I guess permission is the thing,
attach my shots
hope you loot at once.
Sent from my SHV-E300S using XDA Premium HD app
walda said:
Hope chainfire will start working on mobileOdin soon. So much easier to flash than.
... tapat*lked
Click to expand...
Click to collapse
He will after he will come back from his vacation.
I'll look into a fixed CF-Auto-Root for the I9505 as soon as I'm back on Sunday. I imagine that will be tested by Sunday evening, with a I9500 test version available sometime Monday. If all is well
In StupidSU environment and for this initial release Koush's Superuser app would
be preffered as SuperSU main UI refuses to launch because it cannot detect its
original su binary. Aside from that both work as expected.
Click to expand...
Click to collapse
This is because you're not installing the backup su binary. The UI app detects this is missing and triggers an update. Bug in StupidSU
aslak89 said:
Thank you for awsering
then I repacked my kernel but still not work.
copyed stupidsu and edited init.universal5410.rc in ramdisk and repacked boot.img.
I guess permission is the thing,
attach my shots
hope you loot at once.p
Click to expand...
Click to collapse
Alright I'm adding some logging in my scripts so you'll be able to see what's happening − or not
supercurio said:
Yes in fact I was hesitating, but as soon as someone is ready to assist me to try on a Qualcomm device (I9505 or T-Mobile Galaxy S4) I'll make a thread here too.
Click to expand...
Click to collapse
Brilliant news!!!! Thanks a LOT!!
Let's make it work!! It will be AWESOME if I could use latest STOCK Kernel in my ROM's......
I'll give you a hand

[DEV ONLY]{RECOVERY] TWRP 2.3 GB

I have tried to compile TWRP 2.3.
It compiled with errors, but after solving a few errors, it was built successfully.
However, on flashing the zip via CWM, no effect took place, I am attaching my TWRP.
Anybody with knowledge and experience can help me compiling a successful build.
XDA:DevDB Information
TWRP 2.3, Tool/Utility for the Samsung Galaxy Y GT-S5360
Contributors
Nachiket.Namjoshi, DC07
Version Information
Status: Testing
Created 2014-06-08
Last Updated 2014-06-08
Downloads
DOWNLOADS
Removed
Go Here for working Builds: https://forum.xda-developers.com/galaxy-y/development/recovery-twrp-3-0-3-0-touch-recovery-t3550609
Reserved
Problems and Changelogs
Changelogs
latest update: Sun, Jun 8 ,2014.
v1.0a(alpha)
-Initial build (doesnt boot into twrp)
Problems and Errors(Intended for the ones who are willing and are able to help)
P.S you can read it but in case you dont understand what you are reading please refrain from posting questions about them in this thread.
If you are really curios, shoot me a PM or USE_THIS_LINK
Several errors (so cant paste) while compiling a otapackage (make -j4 recoveryzip)
Code:
Several mistakes in [B]bootable/recovery/updater/install.c[/B]
some [B]int[/B] not already declared,
some [B]arguments[/B] not appropriately passed in some [B]functions[/B] namely
[B]make_ext4fs(const char *filename, const char *directory,
char *mountpoint, int android, int gzip, int sparse);[/B]
and applypatch funtion...
all this is found on install.c
probably the reason why things arent built properly while [B]make recoveryzip[/B]
hence the size... 1mb
A few errors about the libs which are never compiled !
Code:
collective errors:
libopenaes.so, libblkid.so not a prelink map
These libs are never ever built !
Hence the errors.
Update01
After Solving and re-writing almost all of install.c and the update folder
got this stop
Code:
make: *** No rule to make target `out/target/product/totoro/obj/STATIC_LIBRARIES/libselinux_intermediates/libselinux.a', needed by `out/target/product/totoro/obj/EXECUTABLES/updater_intermediates/LINKED/updater'. Stop.
make: *** Waiting for unfinished jobs....
I think I should halt for today....
update02
recovery.img looks fine, however, there seems to be some problem
if I mount the img (dont ask me how to )
and calculate the size of all the files and folders,
it roughly comes upto 738 kb
but recovery.img is of 4.7 mb
Moreover, If i try
Code:
[B]make -j4 recoveryzip[/B]
there are still errors in install.c (make_ext4fs function errors)
Will try to dig into this again.
and update the thread with my findings :cyclops:
till then, if anyone can advice something, you can.
Update03
No progress yet...
Taking a rest now,
and i need a lil help in this... if anybody has ported before, plz post it here
Brief overview of things:
Getting a recovery.img of 4.7 mb but when executing
Code:
make -j4 recoveryzip
I get the recovery.zip to be 577.6 kb
however, by playing with the code, Its building the extra libs
but NOT adding them to the zip
so, need a proper updater-script
i think you must include it on a kernel., because the recovery of our sgy is not separated to the kernel.,
rio. said:
i think you must include it on a kernel., because the recovery of our sgy is not separated to the kernel.,
Click to expand...
Click to collapse
not really... I believe that if a flashable CWM can be created... a flashable TWRP can also be created...
Anyways, I was going to try dumping it into a prebuilt kernel...
but the issue is my odin doesnt work (in case of bricks)
and it can also hardbrick the device if dumped on to a kernel
Nachiket.Namjoshi said:
not really... I believe that if a flashable CWM can be created... a flashable TWRP can also be created...
Anyways, I was going to try dumping it into a prebuilt kernel...
but the issue is my odin doesnt work (in case of bricks)
and it can also hardbrick the device if dumped on to a kernel
Click to expand...
Click to collapse
oohh sorry i didn't wsee the zip. i thought you just build only img..
i checked the zip and there is no killrecovery.sh which is called by the updater-script..
rio. said:
oohh sorry i didn't wsee the zip. i thought you just build only img..
i checked the zip and there is no killrecovery.sh which is called by the updater-script..
Click to expand...
Click to collapse
oopss... im soo sorry, uploaded the wrong zip
EDIT:
Thread has been updated for the Devs and ppl who can help me.
Nachiket.Namjoshi said:
oopss... im soo sorry, uploaded the wrong zip
Click to expand...
Click to collapse
i checked your zip..
i guess you haven't used any theme.. there is no any images, fonts, twrp,ui.xml in res folder.. and i'm not sure if there are any 240x320 theme officailly available..
and you are missing 30+ libraries and some binaries in the sbin folder..
and mke2fs.conf,twrp.fstab in the /etc folder
and supersu folder
and selinux stuffs..
don't know why you are getting the install.c errors..
which branch are you using.. you need to use latest cm11 with twrp patches or omni branch to build twrp 2.7.x
for the not a prelink map error i think you need to add shared libraries or somethinh like that in prelink-linux-arm.map
anyways.. nice work. and keep trying... you can also ask for help in the official twrp thread here at xda..
psych.half said:
i checked your zip..
i guess you haven't used any theme.. there is no any images, fonts, twrp,ui.xml in res folder.. and i'm not sure if there are any 240x320 theme officailly available..
and you are missing 30+ libraries and some binaries in the sbin folder..
and mke2fs.conf,twrp.fstab in the /etc folder
and supersu folder
and selinux stuffs..
don't know why you are getting the install.c errors..
which branch are you using.. you need to use latest cm11 with twrp patches or omni branch to build twrp 2.7.x
for the not a prelink map error i think you need to add shared libraries or somethinh like that in prelink-linux-arm.map
anyways.. nice work. and keep trying... you can also ask for help in the official twrp thread here at xda..
Click to expand...
Click to collapse
Exactly... missing libs are the reasons, but there is absolutely no way of making these libs individually, well, I can try porting from other device as my last option..
and the most head-banging error is those install.c :/
I use twrp 2.7 branch (refer the link in the OP)
and Im building this with CM7 sources as it was GB
i tried to run your recovery file thru terminal but it doesn't show any action, can u pls upload your source?
i agree with @psych.half
some files are missing that must be call by recovery..
i don't know much about compiling a binary so pls update this thread on your progress. am willing to help
rio. said:
i tried to run your recovery file thru terminal but it doesn't show any action, can u pls upload your source?
i agree with @psych.half
some files are missing that must be call by recovery..
i don't know much about compiling a binary so pls update this thread on your progress. am willing to help
Click to expand...
Click to collapse
Yeh, Im currently updating github with todays changes...
I will now stop for today...
EDIT: Here, are the sources you asked for.
you compiled a higher twrp version
this one needs selinux hence the selinux error.
Some stuff needs to be updated to support the base of "kitkat if i say correct
you need to adjust boardconfig proper and such.
it isnt just a simple compile and get file thing
much much research and also you might need to edit the .C# source yourself.
SpaceCaker said:
you compiled a higher twrp version
this one needs selinux hence the selinux error.
Some stuff needs to be updated to support the base of "kitkat if i say correct
you need to adjust boardconfig proper and such.
it isnt just a simple compile and get file thing
much much research and also you might need to edit the .C# source yourself.
Click to expand...
Click to collapse
Yeah we got our mistake and reverted back to twrp2.3 and cm7 compatible build tools as Minus40 said.
He forgot to update the thread.
and the new twrp.zip in post #3 is twrp2.3,
stopped the work on this for today, will continue tomorrow,
Thanks for pointing it out anyways
Regards
recovery works on GT-S5367? (Galaxy Y TV)
EsromG5 said:
recovery works on GT-S5367? (Galaxy Y TV)
Click to expand...
Click to collapse
I doesn't work with original Galaxy y
Galaxy pocket devs
ı heard about galaxy pocket devs has finished twrp on pocket this can help you
Pocket has also new camera lib for cm9
Only proplem is Audio (On MadTeam)
SpaceCaker said:
you compiled a higher twrp version
this one needs selinux hence the selinux error.
Some stuff needs to be updated to support the base of "kitkat if i say correct
you need to adjust boardconfig proper and such.
it isnt just a simple compile and get file thing
much much research and also you might need to edit the .C# source yourself.
Click to expand...
Click to collapse
Updated thread, sorry, was in a hurry yesterday, forgot to update it just like post #13 by @DC07 says...
Sorry,
So, I can smell the victory though
Good News
I am getting a recovery.zip of a larger size, and finally, the build tools are working great and building the missing libs too...
thanks anyway @Minus40 for giving me the libs, but those libs are not gonna work on this device, its a bit complicated architecture...
Anyway, this is a good break through, ill update the github by the end of the day.
I hope to have a working TWRP by the weekend
presently, build tools error is that it doesnt dump proper permissions for the extra libs, will try give them the proper permissions (which i dont really know, which perms to give), a few days more and it'll be done.
Nachiket.Namjoshi said:
I am getting a recovery.zip of a larger size, and finally, the build tools are working great and building the missing libs too...
thanks anyway @Minus40 for giving me the libs, but those libs are not gonna work on this device, its a bit complicated architecture...
Anyway, this is a good break through, ill update the github by the end of the day.
I hope to have a working TWRP by the weekend
presently, build tools error is that it doesnt dump proper permissions for the extra libs, will try give them the proper permissions (which i dont really know, which perms to give), a few days more and it'll be done.
Click to expand...
Click to collapse
Try twrp 2.2.2.0 for cm7.

The Theory of Everything (Building MTK from saucery) asop cm miui ubuntu

Welcome​
I have started this thread for the THEORETICAL development of the mt6732/mt6752 from source if such a thing happened to exist which of course it does not.
While compiling from source is pretty well documented :good: compiling MTK is not so well documented especially the mt6732/6752.
I have tried to keep this thread as ambiguous as possible and hopefully we will be left in peace to iron out any difficulties.
DO's:
I am a Total Noob myself to compiling from source but experienced enough to use the xda search box, Google and Youtube first before asking any questions. If your still confused after using the above then by all means ask here.
DON'T s:
If your a noob who should happen upon this thread then by all means read and learn but please respect the dev's by not asking random question without searching first :fingers-crossed:
SHARING:
Please only share things of a sensitive nature with recognised members who you know and via the PM. :good:
Lets just see how far we can push this Kernel
Recommended Reading:
[GUIDE]Building a Kernel from source{Mediatek}
Build Kernel MT6577 - Can't boot after build
How To Port CyanogenMod Android To Your Own Device
XDA:DevDB Information
k01q_e k01q_h, Kernel for all devices (see above for details)
Contributors
bigrammy
Kernel Special Features: Remains to be seen
Version Information
Status: Testing
Created 2015-02-25
Last Updated 2015-02-25
I am here, reporting for duty. If anyone wants an extra "potato" because he has too much "ketchup" for use feel free to ask me
Just to be clear
I am new to compiling from source in any shape or form
I believe the kernel to be not a problem and I know dev's are working on getting our phone on cm and maybe others :fingers-crossed:
But me being me I am very curious and would like to understand how we would go about doing what @varun.chitre15 managed to do for the mt6582 Here
I have the PC all setup for building now thanks to @carliv great guide Here and the cm and android tut's I also found this useful guide on youtube by Dave Bennet Here
Our device is not on the cm or google repo so how do we add it locally.
Do we need any special commands for mediatek
Could we use the mt6582 repo and substitute or mod the files
As you can see I have more questions than answers as normal :laugh:
I dont want to tread on any toes here or take over current developing but just want to learn as said in the OP there is a lack of mtk guides regarding this.
If I missed a clear mtk guide then please post the link to it. :good:
In short your looking at manifests. http://wiki.cyanogenmod.org/w/Doc:_Using_manifests
carliv (I think) posted the device config on github - link in your SPFlash thread somewhere.
Found it: https://github.com/carliv/device_elephone_p6000?files=1
Vendor files
I have compiled and flashed a kernel, I've been running it for 24+ hours with no obvious issues. It's honestly very easy to just get it to build if you don't try to make major changes.
I have (very lazily) tried to change a couple of things in the config to fix the known issues (OTG, compass): unfortunately I have no way to test the OTG function right now, while the compass did not magically start working. On the other hand, the notification light issue which is introduced by V8.4 is not strictly or exclusively kernel-dependent, since I am running V8.3 with my own kernel and the notification function is intact. That's all I can share at the moment.
xenonism said:
I have compiled and flashed a kernel, I've been running it for 24+ hours with no obvious issues. It's honestly very easy to just get it to build if you don't try to make major changes.
I have (very lazily) tried to change a couple of things in the config to fix the known issues (OTG, compass): unfortunately I have no way to test the OTG function right now, while the compass did not magically start working. On the other hand, the notification light issue which is introduced by V8.4 is not strictly or exclusively kernel-dependent, since I am running V8.3 with my own kernel and the notification function is intact. That's all I can share at the moment.
Click to expand...
Click to collapse
Can you switch on and post the /proc/config ?
Regarding the notification lights, I think v8.4 introduced the custom partition (might be wrong on that). Running grep -r "ro.notification.breath" /system/ the only result I got was services.odex (might have been settings.odex). I've bak(smali)ed it but couldn't see the difference between the two that would explain the change.
HypoTurtle said:
Can you switch on and post the /proc/config ?
Regarding the notification lights, I think v8.4 introduced the custom partition (might be wrong on that). Running grep -r "ro.notification.breath" /system/ the only result I got was services.odex (might have been settings.odex). I've bak(smali)ed it but couldn't see the difference between the two that would explain the change.
Click to expand...
Click to collapse
The config file is attached to the post, it's too big to paste it.
I have tried the new ROM which came out today, then flashed my kernel. I can't use either SIM card anymore. Flashed the boot.img that comes with the ROM - same. I guess I gotta go back to V8.3 for now.
The new ROM doesn't seem to be the same as the OTA: it reports as: Elephone_P6000_02_V8.0_20150206.
About the notification issues (which bothers me the most), I haven't had much time do to more experiments, but I was thinking this (which probably also led to my confusion*): there's a chance the functionality is not removed or shut down, at least in the intentions of the maker. After all, in V8.4 (and in the new ROM), when the phone is connected the light stays on, while notifications make it breath. While not a desirable behaviour (at least IMO), I wouldn't call it... a non-behaviour, so to say. So perhaps the functionality itself is intact but something is altering the way it works, for whatever reason. I also did some unpacking and grepping a few days ago, but I couldn't find anything useful.
* At some point I thought the issue was fixed because the light was breathing while connected to my PC, but it was probably because I had a notification to read.
xenonism said:
The config file is attached to the post, it's to big to paste it.
I have tried the new ROM which came out today, then flashed my kernel. I can't use either SIM card anymore. Flashed the boot.img that comes with the ROM - same. I guess I gotta go back to V8.3 for now.
The new ROM doesn't seem to be the same as the OTA: it reports as: Elephone_P6000_02_V8.0_20150206.
Click to expand...
Click to collapse
Lets not speculate too much - but perhaps there was a minor board change between the first and second preorders, notification could be a problem with granting notification access (in settings) - could this be a selinux issue? It would explain why things like Light manager work - as you grant them notification access.
For lost Imei - can you compare the custom partition to the one in the ota?
If anyone needs an easier way to grab the 'ketchup', my GitHub has it. Click on my blog link in my signature.
BachMinuetInG said:
If anyone needs an easier way to grab the 'ketchup', my GitHub has it. Click on my blog link in my signature.
Click to expand...
Click to collapse
Thanks bro,
Nice log
I was going to try use the sprout config as this is nice and clean Here when I have worked out how to do things that is.
My eyeballs are bleeding now with all this reading but from what I can see most of files are the same names so maybe we could just replace them with ours probably 98% ish
I did see one ROM some place for the mt6732/52 that had mt6582 references I just wish I could remember where I had seen it
Like I say I am a noob to this compiling and linux stuff so I maybe talking out of my ass :laugh:
bigrammy said:
Thanks bro,
Nice log
I was going to try use the sprout config as this is nice and clean Here when I have worked out how to do things that is.
My eyeballs are bleeding now with all this reading but from what I can see most of files are the same names so maybe we could just replace them with ours probably 98% ish
I did see one ROM some place for the mt6732/52 that had mt6582 references I just wish I could remember where I had seen it
Like I say I am a noob to this compiling and linux stuff so I maybe talking out of my ass :laugh:
Click to expand...
Click to collapse
I'm actually a noob too, and honestly I've only ever successfully built a fakeflash (temporary recovery) that didn't even work.
bigrammy said:
Thanks bro,
Nice log
I was going to try use the sprout config as this is nice and clean Here when I have worked out how to do things that is.
My eyeballs are bleeding now with all this reading but from what I can see most of files are the same names so maybe we could just replace them with ours probably 98% ish
I did see one ROM some place for the mt6732/52 that had mt6582 references I just wish I could remember where I had seen it
Like I say I am a noob to this compiling and linux stuff so I maybe talking out of my ass :laugh:
Click to expand...
Click to collapse
Can anyone actually make a guide noob friendly to build kernel from source? I got kernel with me locally zip file I want to build it please any help?
Tech N You said:
Can anyone actually make a guide noob friendly to build kernel from source? I got kernel with me locally zip file I want to build it please any help?
Click to expand...
Click to collapse
I think you can use the scripts in the root of the source code to build the kernel? make<something>.sh.
Make sure you're on Linux (Ubuntu preferred) and that you have all dependencies installed correctly. To execute the script, simply go to the Terminal, cd to the location, then type . make<something>.sh
Tech N You said:
Can anyone actually make a guide noob friendly to build kernel from source? I got kernel with me locally zip file I want to build it please any help?
Click to expand...
Click to collapse
Have a look at the README.
Does make menuconfig work here?
These few simple instructions from the readme file enable you to build a working kernel (at least in a Linux environment):
Code:
How to Build
kernel
======
1. Get the prebuilt cross compiler from AOSP website:
$ git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6
2. Add required cross compiler to PATH:
$ export PATH=/YOUR_TOOLCHAIN_PATH/arm-eabi-4.6/bin:$PATH
$ export CROSS_COMPILE=arm-eabi-
3. Then use the following commands to build the kernel:
$ ./makeMtk k01q_e new k
make menuconfig can be made to work, but you need to set some parameters and I can't look into it right now.
You previously asked something about the custom partition, I need some guidance there as I am not familiar with the IMEI issue.
xenonism said:
These few simple instructions from the readme file enable you to build a working kernel (at least in a Linux environment):
Code:
How to Build
kernel
======
1. Get the prebuilt cross compiler from AOSP website:
$ git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6
2. Add required cross compiler to PATH:
$ export PATH=/YOUR_TOOLCHAIN_PATH/arm-eabi-4.6/bin:$PATH
$ export CROSS_COMPILE=arm-eabi-
3. Then use the following commands to build the kernel:
$ ./makeMtk k01q_e new k
make menuconfig can be made to work, but you need to set some parameters and I can't look into it right now.
You previously asked something about the custom partition, I need some guidance there as I am not familiar with the IMEI issue.
Click to expand...
Click to collapse
Yea wasn't sure about menuconfig as mtk uses projectconfig rather than def_configs.
In the custom partition there are files like /custom/etc/firmware/modem.img etc. When messing with a Flyme port it was these files (and possible conflicts in /system) that caused an IMEI:nul.
FYI I opened the custom partitions on windows using an ext viewer after running the imgs through sgs2toext4.
Kernel building Mediatek
Tech N You said:
Can anyone actually make a guide noob friendly to build kernel from source? I got kernel with me locally zip file I want to build it please any help?
Click to expand...
Click to collapse
Not sure if you guys have seen or read this but it's a pretty comprehensive guide to building the mediatek kernel by @MasterAwesome and should really be compulsary for all kernel related things thread here http://forum.xda-developers.com/showthread.php?t=2754513
@HypoTurtle
Regarding the custom partition this is or could be a problem for us now and in the future and may require further investigation. The cm sprout branch has the modem.img in the (normal place /system/etc/firmware) but as you say ours is in the custom partition which is probably to protect it from bad /system flashes
Thing is I see no normal type link to it in the /system/etc/firmware so it must be linked some other way which may explain why all my port attempts failed as none of them used a custom partition (Asus_X002)
Maybe we will have to repartition the emmc to a standard config and alter the kernel (if the links are set via the kernel that is) for cm and other ports to work smoothly as I am unsure just how everything is linked up.
I have not had much experience with custom partitions so someone one know's of a good info source please link it. :good:
Hopefully Master @Santhosh M can figure out what's going on with the custom partition :fingers-crossed:
bigrammy said:
@HypoTurtle
Regarding the custom partition this is or could be a problem for us now and in the future and may require further investigation. The cm sprout branch has the modem.img in the (normal place /system/etc/firmware) but as you say ours is in the custom partition which is probably to protect it from bad /system flashes
Thing is I see no normal type link to it in the /system/etc/firmware so it must be linked some other way which may explain why all my port attempts failed as none of them used a custom partition (Asus_X002)
Click to expand...
Click to collapse
The partition is symlinked from .../by-name/custom (which is symlinked by the kernel from dev/block/mmcblk0p12) to /dev/customimg which is mouned after an e2fsck to /custom. /custom isn't linked to /system, it's just added to the global environment (init.environ.rc), will need to check on the environ, I'm on flyme and it has /custom/lib added to the library path (which doesn't exist).
HypoTurtle said:
The partition is symlinked from .../by-name/custom (which is symlinked by the kernel from dev/block/mmcblk0p12) to /dev/customimg which is mouned after an e2fsck to /custom. /custom isn't linked to /system, it's just added to the global environment (init.environ.rc), will need to check on the environ, I'm on flyme and it has /custom/lib added to the library path (which doesn't exist).
Click to expand...
Click to collapse
Haha thanks that explains a lot of weird things perfectly. :good:
What's the problem or what is the issue here.
Mediatek compiling guide ( by masterawesome ) that you have linked to is not actually practically this mtk kernel is done and is just way too complicatedly explained.
There is no defconfig stuff or pulling config.gz from phone in mtk. In this new source its just simple. Set up your toolchain path. Execute the makeMtk followed by the project no u want. Get zImage and patch it for mtk header and merge it with stock ramdisk. For this newer mtk chipsets repack has an extra stuff where u have to be careful of kernel command line parameters.
That's it the kernel stuff in mtk

Categories

Resources