[Resolved] Compiling Android USB Gadget drivers and insmod - General Questions and Answers

Hi everyone,
I have been trying for quite a while now to compile HID Gadget support for my galaxy S3 and think i may be getting close. My current problem is that when i run insmod g_hid.ko i receive the following
Code:
insmod: init_module 'g_hid.ko' failed (Device or resource busy)
. The weird thing is that next time the screen turns off or if i attempt to insert it again the phone crashes (kernel panic i assume). I get this same error when i try and insmod g_zero.ko (although this one doesn't kill the phone). Can anyone tell me how i would attempt to debug this? Or even better, has anyone got g_hid working on there phone and if so, what modifications/kernel configs did you use?
Also, when compiling the kernel, in "USB gadget support" if i select any option other than Android Gadget in USB Gadget Drivers my kernel fails to build. Has anyone got any USB gadgets to compile and run and if so what procedure/modifications did you have to make. Currently i am compiling my kernel with android gadget selected as the usb gadget driver and then changing it to HID module and running make module_prepair and make module to get my .ko files (which may be why i am getting the above error).
If anyone can provide some insite and advice it would be greatly appreciated.
Thank you
Adrian

After months of trying, it appears i have got it solved. Unfortunately its not the most graceful solution and currently it disables MTP but i dont care. To fix it i searched every file in the kernel for mentions of CONFIG_USB_G_ANDROID and everywhere it was involved in an #if defined statement i added another section like so
Code:
#if defined(CONFIG_USB_ANDROID) || defined(CONFIG_USB_G_ANDROID) || defined(CONFIG_USB_S3C_OTGD)
In this case i added USB_S3C_OTG. As i said, it isn't pretty but it works.
Hope this helps someone in the future coz there is very little info on the net about this
Enjoy
Adrian

Code sample
I asked a question on Stack Overflow about exactly this issue. There is a small group of people who seem quite interested in this issue, and there really is not a lot of information on the net.
I would very much appreciate if you could explain in a little more detail what steps you took to get this to work for you. You could probably answer the Stack Overflow question more decisively than the current answers too: stack-overflow questions/9805731 - is-it-possible-to-program-android-to-act-as-physical-usb-keyboard. (I can't post the link as this forum blocks it.)
darcpyro said:
After months of trying, it appears i have got it solved. Unfortunately its not the most graceful solution and currently it disables MTP but i dont care. To fix it i searched every file in the kernel for mentions of CONFIG_USB_G_ANDROID and everywhere it was involved in an #if defined statement i added another section like so
Code:
#if defined(CONFIG_USB_ANDROID) || defined(CONFIG_USB_G_ANDROID) || defined(CONFIG_USB_S3C_OTGD)
In this case i added USB_S3C_OTG. As i said, it isn't pretty but it works.
Hope this helps someone in the future coz there is very little info on the net about this
Enjoy
Adrian
Click to expand...
Click to collapse

No worries, im happy to help. The funny thing is by reading the answers you got it started me on the right path to finding a solution. Im not sure how this will translate to other devices firmware but in the case of the galaxy S3 it was i went threw every file and added the
Code:
|| defined(CONFIG_USB_S3C_OTGD)
to all if defined statement that made any mention of CONFIG_USB_GADGET so that the code inside would be compiled. This was so that in the .config file for the kernel CONFIG_USB_GADGET would be set to yes and would then allow the hid driver to be compiled. Basically every time i got an error i saying something wasn't compiled or wasn't declared i went to that file, found where it was declared and added that if defined statement. I would upload my working source code but it would take weeks on my internet connection. If there is a specific file you want to see then let me know and i will post its contents.
Good luck
Adrian

darcpyro said:
No worries, im happy to help. The funny thing is by reading the answers you got it started me on the right path to finding a solution. Im not sure how this will translate to other devices firmware but in the case of the galaxy S3 it was i went threw every file and added the
Code:
|| defined(CONFIG_USB_S3C_OTGD)
to all if defined statement that made any mention of CONFIG_USB_GADGET so that the code inside would be compiled. This was so that in the .config file for the kernel CONFIG_USB_GADGET would be set to yes and would then allow the hid driver to be compiled. Basically every time i got an error i saying something wasn't compiled or wasn't declared i went to that file, found where it was declared and added that if defined statement. I would upload my working source code but it would take weeks on my internet connection. If there is a specific file you want to see then let me know and i will post its contents.
Good luck
Adrian
Click to expand...
Click to collapse
Hi Adrian
did you manage to use your android phone as a keyboard with USB_H_HID module ? I'm trying to do the same thing and I would be interested if you have more informations. For now, I had cyanogendmod source for Samsung Galaxy S III and I've compiled the default 10.1 ROM.
Yesterday, I tried to modify kernel options to include USB_H_HID in the kernel but the build fails on some android.c error.
See you
--
Thus0

Hi Thus0
I did manage to get it to work late last year (Just so you know that it can be done).From memory i basically ran grep over every file in the modules directory looking for CONFIG_USB_GADGET and then edited those files to say something like:
#if defined(CONFIG_USB_ANDROID) || defined(CONFIG_USB_G_ANDROID) || defined(CONFIG_USB_S3C_OTGD)
This way it would compile the USB Gadget modules as well. Let em know if you have any more questions and ill try and help.
Adrian

Huh – is it possible to make apk file for root devices?

Shir_man said:
Huh – is it possible to make apk file for root devices?
Click to expand...
Click to collapse
No sorry, as far as i know a custom kernal is compiled

darcpyro said:
No sorry, as far as i know a custom kernal is compiled
Click to expand...
Click to collapse
Is it possible to only use a driver and to load it with insmod in a stock rom? What modification require a custom kernel?

i was looking for a solution and ou,d something for the nexus 7
https://play.google.com/store/apps/details?id=remote.hid.keyboard.client
open xource here with kernel patch
https://www.google.com/url?q=https:...t&sa=D&usg=AFQjCNGztTd4-U4gHvd4DLzdg_qBxLb7gw
maybe someone can use it

Related

[Q] archos gen8_gpl_froyo kernel build

Just for fun and because I can, I started to work on recompiling the kernel for my Archos 10.1 (gen8) device.
I'm working with the Archos provided gen8_gpl_froyo source tarball.
Apart from some small stuff I could work out, like unterminated double quoted strings in config.in files, patches that don't apply to sources because the sources contain symlinks where files are expected, and of course the rounds of what-do-I-need-on-my-host (automake, texinfo, ...) - I got both a working kernel compile, and all the rest of the build.
I proceeded to menuconfig in some stuff I'd like to have in the kernel, as modules, like netfilter conntracking / NAT support, advanced (policy) routing, namespaces, nfsd. Also went smoothly.
I can successfully start that kernel on an existing Uruk 0.7 install, by untarring my self built modules over what Uruk comes with in /lib/modules/2.6.29-omap1/kernel, depmod that, and use the Uruk's /root/initramfs.cpio.gz together with my self built zImage for flashing through the recovery menu.
The system then boots up fine, I can verify it is running the kernel, I can load the netfilter conntracking / NAT modules, and even install an state ESTABLISHED rule which does what it should.
HOWEVER - and that's why I open this thread, there is constant chatter, coming from the kernel, being written to logcat. This uses quite a bit of CPU, probably for the logging work, so I rapidly reverted to the Uruk's own kernel.
What I would like to know, is whether somebody else has seen the following kernel messages in a similar scenario, and knows what I did wrong / how I can work around that?
Code:
03-06 15:33:56.816 I/cat ( 1020): <6>tmdlHdmiTxHdcpCheck 4245
03-06 15:33:56.816 I/cat ( 1020): <3>Bad input instance value returned in hdcp_check line 729
03-06 15:33:56.847 I/cat ( 1020): <6>tmdlHdmiTxHdcpCheck 4245
03-06 15:33:56.847 I/cat ( 1020): <3>Bad input instance value returned in hdcp_check line 729
03-06 15:33:56.878 I/cat ( 1020): <6>tmdlHdmiTxHdcpCheck 4245
03-06 15:33:56.878 I/cat ( 1020): <3>Bad input instance value returned in hdcp_check line 729
It is a constant repetition of these two lines, I just showed three instances so you can get a feel for the frequency from the timestamps.
The function names / messages are nowhere to be found in the archos released source code, nor in the modules compiled from there.
They reside in two module files that lie directly in /lib/modules/, named hdmicec.ko and hdmitx.ko
The hdmitx.ko module is loaded when I boot into my kernel. Loading hdmicec.ko by hand does not improve the situation. Also, under the normal Uruk 0.7 kernel, only the hdmitx.ko is loaded.
Update 7.3.: the situation stays the same after I modified my .config to be, except for the diverse modules I additionally selected, identical to the kernel /proc/config.gz found on Uruk 0.7. There seem to be several things missing that are in Uruk 0.7, i.e. the interactive CPU governor, and filesystem caches.
I also compared the loaded modules after boot, and apart from module size, it is the same list with Uruk 0.7 and my kernel.
Trying again to use my kernel, I also noticed that the tablet freezes as soon as I try to start WLAN. Still pings (on the g_ether USB connection I use), but the GUI is frozen and ssh connections, too.
It seems to me that the gen8_froyo_gpl source released by Archos is somewhat lacking...
Where can I find the Uruk 0.7 kernel tree, or some other kernel that is Known Good?
Latest kernel source you can find here:
http://sauron.pourix.com/UrukDroid/
conntrack/nat brakes compatibility with tiwlan kernel driver - witch is not part of kernel (but can be recompiled).
Anyway - entire wifi stock is a mess .. sadly
$aur0n said:
Latest kernel source you can find here:
http sauron.pourix.com /UrukDroid/
Click to expand...
Click to collapse
Thanks! What is the build system are you using?
I'm not exactly confident that the one I built from the Archos GPL package, is good.
But it seems to work! I successfully compiled your kernel, with your .config, and run that now. Wifi is working so far, my g_ether usb network connection works, too, and no funny hdmi messages are showing.
Now I'm going to build in some of the stuff I wanted of the networking stuff, and see what breaks wifi exactly. I would _love_ to have conntrack / NAT available.
Update built again with various networking stuff enabled, advanced routing and namespaces among them, but consciously NOT with conntracking. Guess what - tiwlan_drv.ko does not load! When triggered through the UI that results in an apparent complete hang, but when trying insmod from a shell it is benign. All in all that's good - the wlan problems probably don't have anything to do with conntracking, and I have a half way easy test case to start "bisecting" which build option makes it fail. Now if I only had more time today...
Anyway, thanks again Sauron for providing such a good basis for playing!
$aur0n said:
conntrack/nat brakes compatibility with tiwlan kernel driver - witch is not part of kernel (but can be recompiled).
Click to expand...
Click to collapse
After some compile / flash / test cycles I'm pretty convinced that anything which changes the layout / size of struct net_device or struct sk_buff, breaks that binary tiwlan_drv.ko thing - which is probably to be expected...
Some googling around, did not find me any source code to that tiwlan_drv.ko, only loads of people copying it around between various systems in binary form (argh...)
Do you have source for that module available, so I could try and recompile it when the struct layout changes?
Here's a list of config defines that should probably be left alone, gleaned from looking at the struct definitions:
Code:
options that change sk_buff:
CONFIG_XFRM=y
CONFIG_NF_CONNTRACK=n
CONFIG_BRIDGE_NETFILTER=n (switches on when enabling bridge driver,
but can be switched off separately - bridge
itself builds and module loads)
CONFIG_NET_SCHED=n (so no tc / traffic shaping / queueing)
CONFIG_NET_CLS_ACT=n
CONFIG_IPV6_NDISC_NODETYPE=n?
CONFIG_MAC80211=n
CONFIG_NET_DMA=n?
CONFIG_NETWORK_SECMARK=n
options that change net_device:
CONFIG_WIRELESS_EXT=y
CONFIG_NET_DSA=n
CONFIG_NETPOLL=n (switched on / needed by netconsole... sigh)
CONFIG_NET_NS=n (would love to have that, lxc could work well then...)
CONFIG_DCB=n
CONFIG_COMPAT_NET_DEV_OPS=y
You can try with this source
http://processors.wiki.ti.com/index.php/OMAP35x_Wireless_Connectivity_Release_Notes_beta_3_release
I haven't checked it - so I cant guarantee it will work. But If you could make it work - this would give us NAT on Uruk - so....
$aur0n said:
I haven't checked it - so I cant guarantee it will work. But If you could make it work - this would give us NAT on Uruk - so....
Click to expand...
Click to collapse
Thank you! I looked into the stuff a bit, it is certainly the right code set. It's a pretty huge pack overall, packing a kernel and userlevel stuff, even a copy of the iptables source , but I already located the driver itself...
I'll see that I extract the driver only parts into your kernel tree, somewhere under staging, and get it to build and maybe even work from there.
Will need some time to do that, and I'm rather busy with other work this week - next week maybe.
tiwlan_drv rebuild - no success so far
Hi $auron,
was able to take some time yesterday and today to work on the tiwlan_drv source code you pointed out. Unfortunately I did not get it to run.
I successfully built a module, inside your kernel tree, by incrementally dumping .c and .h files from the TI code drop into a subdir of drivers/staging/ and finding out which -DEFINES it needs to build, and some small code mangling was also neccessary.
However, the resulting module fails to properly load, first with some GPIO allocation message which I could get around (not present in the .ko file from Archos), and then in a request_irq call during initialization. Looking at that second failure point I notice that the more hardware / board oriented parts of the code look not at all like what objdump can tell me about the Archos binary...
Given my nonexistent ARM assembler skills, I cannot go forward at that point with ease, so I'm trying to chicken out by asking some Archos people for the source... No idea whether that will work...
UPDATE: no reply from Archos so far...
I try to sidestep the issue by moving the problematic elements of skbuff and net_device from the middle of the struct, to the end.
Hi!
I see that the topic is quite old - but anyway: are there any news? I am trying to build gen8 kernel with conntrack/nat support but with no luck - the kernel doesn't load, it reboots the device.
Did anybody find the way to compile with that options?
Golomidov said:
Hi!
I see that the topic is quite old - but anyway: are there any news? I am trying to build gen8 kernel with conntrack/nat support but with no luck - the kernel doesn't load, it reboots the device.
Did anybody find the way to compile with that options?
Click to expand...
Click to collapse
In Uruk 1.6 kernel has compiled in conntrack/nat.
$aur0n said:
In Uruk 1.6 kernel has compiled in conntrack/nat.
Click to expand...
Click to collapse
Yes, but there are other options that are missing in your kernel - targets owner and multiport - and because of that orbot transparent proxy doesn't work
Could you please tell how did you achieve that? I mean how did you compile UD kernel with conntrack/nat support?
(btw, I have changed init and installation scripts in UD for it to work with latest archos devices - a35dm for exmple)
EDIT: did you take/recompile tiwlan_drv.ko? would standard kernel work if I just copy tiwlan_drv.ko from UD?
---------- Post added at 03:06 PM ---------- Previous post was at 02:48 PM ----------
Golomidov said:
EDIT: did you take/recompile tiwlan_drv.ko? would standard kernel work if I just copy tiwlan_drv.ko from UD?
Click to expand...
Click to collapse
Nope, it didn't work
$aur0n said:
In Uruk 1.6 kernel has compiled in conntrack/nat.
Click to expand...
Click to collapse
$aur0n, could you please share the knowledge how did you manage to compile kernel with tiwlan driver and conntrack features?
Community will appreciate it! Thanks!
Golomidov said:
$aur0n, could you please share the knowledge how did you manage to compile kernel with tiwlan driver and conntrack features?
Community will appreciate it! Thanks!
Click to expand...
Click to collapse
It's all all written somewhere in developers thread of uruk droid.
$aur0n said:
It's all all written somewhere in developers thread of uruk droid.
Click to expand...
Click to collapse
Confirmed! tiwlan has been compiled and tested with nat/conntrack and targets owners and multiport.
Since openaos is down pasting here instruction:
Code:
How to build the WLAN source provided by archos
Kernel module released at http://gitorious.org/archos/archos-gpl-gen8/trees/master/hardware/ti/wlan/wl1271
Download the above mentioned sources.
cd .../hardware/ti/wlan/wl1271/platforms/os/linux
Now setup your environment by editing wl_env.bash or do it manually on the commandline in my case it was:
export CROSS_COMPILE=/usr/src/gen8/buildroot/build_arm/staging_dir/usr/bin/arm-linux-
export ARCH=arm
export HOST_PLATFORM=zoom2
export KERNEL_DIR=/usr/src/gen8/buildroot/linux/
Then type make and wait a few minutes and you are done. The tiwlan_drv.ko will appear in .../hardware/ti/wlan/wl1271/platforms/os/linux This gives you only the module. I am still looking at how the tiwlan_loader needs to be compiled.
More info can also be found http://omappedia.com/index.php?title=Wilink_Linux&redirect=no
If you use wl_env.bash then don't forget to
# source wl_env.bash
after editing and before make
thanks everybody!

[Q] Can't seem to build a custom kernel

I am trying to compile a custom kernel,
I succeed to build one but I can't boot him, when I load the kernel I go in to boot loop
I haven't made any real changes to this kernel I really just downloaded the source and compile it
The version match its a GB kernel 2.6.35.7 I disabled the lag fix, still it goes to boot loop.
any ideas?
What source code did you try to use to build this kernel? Links would be awesome.
Well I tried this two
Code:
github.com/Krylon360/SGS4G_Kernel_GB
opensource.samsung.com/index.jsp (SGH-T959V-TMB_GB_Opensource.zip)
I did
make clean && make mrproper
make vibrantplus_rev00_defconfig
make -j8
and then I loaded the kernel via heimdall
Building the stock kernel
I have run in to a similar problem. One issue I had to get past is the stock rom source does not have have the initramfs included. It is needed so the kernel can boot into a file system before it can start loading loadable modules and mount the rom filesystem.
I have been able to get an initramfs by extracting it from the original rom, The issue I have is it is loading all modules, but the rom devices will not mount as the /dev directory is empty and the mount needs them to mount the file systems.
This may be off topic for this forum. If you want to PM me, I'm willing to let you know what I have found out.
Tom
You should keep discussing it here since it does pertain to the phone and it'll be useful for future reference
Sent from my SGH-T959V using XDA App
Agree with FB.
I have ran into the same problem. I was unable to find a way to get it beyond boot loop so I scratched the project. I am definitely curious on how to get this working.
FBis251 said:
You should keep discussing it here since it does pertain to the phone and it'll be useful for future reference
Sent from my SGH-T959V using XDA App
Click to expand...
Click to collapse
DISCLAIMER
I am NOT a kernel developer, just a programmer that has done linux programming before, and is trying to understand and build the kernel.
I will share what I have found out through my attempts to build the stock rom as delivered from Samsung.
I have searched XDA and Googled the web in search of the answers I need with some success as well as dead ends. I am not looking to have the answers handed to me on a silver plate, but a few hints or links to point me in the right direction is helpful.
To start:
Recommended Hardware needed:
Search the XDA for AdamOutler threads on building the serial interface via the USB. Highly recommended reading as it helps to see what the kernel is doing when it is in the bootloop. All the important parts was purchased from his recommended supplier(s). Thanks AdamOutler for the information!
What I know about the samsung kernel source as delivered:
1) if you follow the readme in the kernel, it will build cleanly. However, it will NOT run, it will bootloop!!
2) If you intend to only build the stock kernel, I recommend making sure you are starting with a stock build installed on the phone. I suggest the same release version you are trying to build.
3) After you build the kernel and load it ( the zImage file is loaded via Heimdall ) the first problem I ran into was the initramfs. It is not included in the source and must be created from scratch or obtained from another kernel.
4) Once the initramfs is being built and included in the kernel, the next problem is the driver modules that are included, have to have the same version as the kernel. You will need to figure out the version by the kernel debug messages on the serial/usb interface mentioned above. Once the versions match, the kernel will load them.
This is where I am stopped... once the drivers are loaded, the init scripts mount the file systems. This does not happen with my kernel. I am still investigating this. I think it has to do with the /dev files for the mount points not being created/missing. I have not found the piece of info yet points me to the solution. Most of the links I have found pertain to linux on an x86/64 platform. I have found little on embedded linux and how it works.
That is all I have in a nutshell. Feel free to comment and ask questions. Remember to search! Use different forms of your search terms, use different working. I like to use the 'yippy.com' search engine as it places the results in categories.
Good luck!
Tom
logan123 said:
Well I tried this two
Code:
github.com/Krylon360/SGS4G_Kernel_GB
opensource.samsung.com/index.jsp (SGH-T959V-TMB_GB_Opensource.zip)
I did
make clean && make mrproper
make vibrantplus_rev00_defconfig
make -j8
and then I loaded the kernel via heimdall
Click to expand...
Click to collapse
Krylon's tree is stock, no changes.
It has all the problems I fixed in my tree.
I have a lot of uncommitted changes, but you can find my work at: https://github.com/bhundven/
Regardless of me being on xda or not, I am still working on sgs4g.
bhundven said:
Krylon's tree is stock, no changes.
It has all the problems I fixed in my tree.
I have a lot of uncommitted changes, but you can find my work at: https://github.com/bhundven/
Regardless of me being on xda or not, I am still working on sgs4g.
Click to expand...
Click to collapse
Aww hell bhundven! Refreshing to see you stop by!
Thank you everyone
mccabet, You actually saved me some time because those were my next two step
I was looking for the initramfs and I didn't find it...
Could you please share your?
I do not have my initramfs file available to me at work. So here is the info I used to get my copy. You will need an original rom release ( I used the heimdall one-click from bhundven ) to extract the zImage file from.
Here is the link to info on how extract your own initramfs from a kernel image (zImage):
http://forum.xda-developers.com/wiki/index.php?title=Extract_initramfs_from_zImage
I used the improved script mentioned at the bottom of the page from:
https://github.com/mistadman/Extract-Kernel-Initramfs
After getting your initramfs, you will need to modify your vibrantplus_rev00_defconfig file and change the following parameter to point to your initramfs you extracted:
CONFIG_INITRAMFS_SOURCE="/path/to/initramfs"
Hope that helps.
Tom
Ok it seems like I was able to boot the kernel, no more boot loops thank to the initramfs but
The system isn't loading, it get stuck on the "Galaxy S 4G" page.
and when I load recovery it gives me lots of error so as
E:Can't mount /cache/recovery/log
E:failed to mount /cache (No such file or directory)
it goes on and on but its all the same...
logan123 said:
Ok it seems like I was able to boot the kernel, no more boot loops thank to the initramfs but
The system isn't loading, it get stuck on the "Galaxy S 4G" page.
and when I load recovery it gives me lots of error so as
E:Can't mount /cache/recovery/log
E:failed to mount /cache (No such file or directory)
it goes on and on but its all the same...
Click to expand...
Click to collapse
I may be off-base, but do you know if /cache and the other file systems were the Samsung rfs filesystem or the ext4 filesystem? Standard recovery can't mount ext4 & if your kernel doesn't support it, then it won't be able to mount them, either.
I thought so too so I removed the lag-fix and return to rfs
but this is neither because apparently there are no stl devices :\
I pulled out the recovery log
Code:
http://pastebin.com/hDCNbdne
Code:
failed to mount '/dev/block/stl11' '/cache'(rfs) -> No such device
Now I feel like an idiot because I can't seem to find what is it in the kernel config
moreover I tired to pull a config from a working kernel and I basically got the same errors
Any ideas?
Well the solution is simple, apparently version magic didn't load the kernel modules
for rfs_fat and fsr_stl...(you get the point)
now I can't to find way to compile them it seems as if someone removed them from the kernel tree and I can't load them either
I tired several modules from different kernel well all result in failure.
so any ideas?
logan123 said:
Well the solution is simple, apparently version magic didn't load the kernel modules
for rfs_fat and fsr_stl...(you get the point)
now I can't to find way to compile them it seems as if someone removed them from the kernel tree and I can't load them either
I tired several modules from different kernel well all result in failure.
so any ideas?
Click to expand...
Click to collapse
I wish had some, man. I've never compiled a kernel for Android. At least, not yet. However the moduel code should be somewhere in the kernel tree. I believe Android is a layer on top of the Linux kernel so the source may be there.
I'm still reading about and learning the platform side of Android. Hopefully one of the devs around can provide some solid guidance.
Ok no offence but this kernel is worthless
even if I load the modules into the kernel I get a errors because of the unknown symbols
bahh any ideas anyone?
stephen_w said:
I wish had some, man. I've never compiled a kernel for Android. At least, not yet. However the moduel code should be somewhere in the kernel tree. I believe Android is a layer on top of the Linux kernel so the source may be there.
I'm still reading about and learning the platform side of Android. Hopefully one of the devs around can provide some solid guidance.
Click to expand...
Click to collapse
That is as far as I have gotten. The drivers for the RFS ( drivers/tfsr ) are not loading and therefore the /dev mount points do not exist. The default build config flags ( CONFIG_RFS_FSR=m and CONFIG_RFS_FSR_STL=m ) are to build the module as a loadable module. I have tried to build the module with no success. Still investigating when I have the time. I was even thinking of looking at the Epic 4G MTD build and trying that. The problem there is if I can not solve this problem, I probably solve it by trying the MTD conversion. ( Except to brick it.)
if one of you kernel devs gets a bootable MTD kernel hit me up... I got a rom that needs some mtd loving
RaverX3X said:
if one of you kernel devs gets a bootable MTD kernel hit me up... I got a rom that needs some mtd loving
Click to expand...
Click to collapse
I do not claim to be a kernel developer. I am trying to understand and build the base kernel. If you can help me get past this, that would be great! I need to take baby steps before I can start walking. Once I get the build to work and boot completely, I'm game to go further, but have to get to a working base before we can continue. I understand the more experienced developers don't want to be bothered. I understand they have other jobs, and families. So do I. They became as great as they are, through hard work, experience and asking the right people the right questions. Asking the right question also applies to Google. The query only returns the matches to your query. Change a few words, get different results.
I'm not looking for someone to hold my hand, I want to learn by doing, not having it done for me. Just point be to the bread crumb trail, and I will follow.
Right now, I am at a stand still until I figure out why it is not loading the tfsr module. If that is even the problem.
If I make any progress, I'll post it here for all. If I am wrong, please correct me so we all don't go down the wrong path.
Thank you for listening.
Tom

Got kexec-mod, kexec-tools working, atags in progress - Should Also Work With DroidX

I realize people gave up slightly on the whole kexec thing over radio worries, but I now have the module compiling and inserting without error into the Droid2/DroidX gingerbread kernel. Next comes cross compiling the kexec-tools for userspace, to allow us to attempt inserting a different kernel.
To build, you'll need a compiled DroidX kernel from source, as well as the android NDK.
To build, make sure you have downloaded the DroidX GB kernel source and compiled it. There are guides everywhere on how to build Android kernels. Just make sure you use the proper cross compiler.
http://sourceforge.n....l.tgz/download
When you build, make sure to use
Code:
make mapphone_defconfig
Once the kernel is built, clone my repo and edit envsetup.sh to reflect the correct paths to your kernel source directory and the android NDK.
https://github.com/i...kexec-mod-d2-dx
Then, source it:
Code:
source envsetup.sh
Then, just run
Code:
make
and cross your fingers. You should then have a fresh kexec_load.ko file!
To see if it loads, you'll need to copy it to your sdcard, and then on the phone, using a console, do the following:
Code:
su (click allow)
insmod /sdcard/path/to/kexec_load.ko
If you don't get any errors, it inserted! Now, of course, to actually use it, we'd need the kexec-tools built, which I haven't gotten ready yet...but they're coming! To remove the module (no reason to leave it in memory for now):
Code:
rmmod kexec_load
Happy hacking, and help is always appreciated!
This looks great! If you need any help just ask
Thanks! I probably could actually use some. I'm looking at eternity project's git repos now, and am trying to figure out how they managed to get atags working, with the whole procfs thing...still scratching my head there.
I'm looking at eternity project's git repos now, and am trying to figure out how they managed to get atags working, with the whole procfs thing...still scratching my head there, though I do have an atags module working, except it doesn't do anything without atags in the procfs (http://lists.infradead.org/pipermail/kexec/2011-January/004795.html).
kexec-tools:
https://github.com/i...xec-tools-dx-d2
To build, see the README.
Then, copy the binaries from /build/sbin/* to your device, and the move them to the /system/bin directory, and chmod them 770 to make them executable.
mod-atags:
https://github.com/i...mod-atags-d2-dx
Now, if I/we can just get atags and procfs stuff taken care of, we'll be able to go to the next step. I already have atags compiling as a module, but it won't stay inserted because we have no atags in the procfs. Note I can't just trace through code like this and know what everything is doing, but I know enough to hack at it and be dangerous
I know this is kind of off topic, but would this help us people with Motorola Atrix 2? Does it use the same radio?
calebcoverdale said:
I know this is kind of off topic, but would this help us people with Motorola Atrix 2? Does it use the same radio?
Click to expand...
Click to collapse
No idea. I haven't even gotten the kernel to change yet, so I haven't gotten to mess with radio yet. The method itself should/would work though, but radio will require reverse engineering...perhaps find a similar phone with an open bootloader and disassemble and attempt to clone it's modules.
The latest change I made may or may not work, it was an attempt to remove atags from the kexec module based on an old patch I found, which added the functionality. This at leaset made kexec -l zImage work, but when I run kexec -e, the kexec binary complains about atags not being there...hrmmmph.
I may have to revert it (and will if we can get atags somehow) ...but if we can get the kexec bin to ignore /proc/atags or just find a way to rip them out of the running kernel, we'll be in business.
The commit: https://github.com/ilikenwf/kexec-mod-d2-dx/commit/12dffe0ea286be0fe9ab0303a5a35ed92be4ee2c
I'm also looking into 2ndboot.
I like where this is going! Keep working!
Sent from my DROID2 using xda premium
Okies, so, I emailed aliasxerog (original kexec-mod writer), and I hope he'll get back to me. Even though his twitter says he's a "former android developer," maybe he'll be willing to give me some hints so I can pick up where he left off.
I also got the froyo version of the module building properly based on his module, yet again, (all after SBF'ing my phone back down to motoblur froyo - yech!) but neither currently work... (note there's a gingerbread and a froyo branch on my repo): https://github.com/i...kexec-mod-d2-dx
The froyo one throws the following error, which stops me dead in the water:
Code:
Could not find a free area of memory of 3007dc bytes...
The gingerbread one loads the kernel into memory but won't execute it due to our not having atags.
We've moved our git repos to an organization for easier collaboration:
https://github.com/organizations/D2-DX-Customboot
links are imcomplete.
use URL lable pls.
Cross compiler version ?
hello,
Sorry but I am not able to use the sourceforge link that you provided to download kernel source .. Also please share what cross compiler version is to be used....
Thanks in advance.

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

LG OpenSource

You can use this link to find your model:
http://opensource.lge.com/osSch/list...ME&search=G710 <<< Find your model, you must use Linux to compile this code.
Models:
LMG710N - USA model (Carrier unlocked model)
LMG710PM - Pre-release codename Judy
LMG710PS - ?
LMG710AWM - Likely this was the AT&T model that was changed to the V35 ThinQ
LMG710TM - T-Mobile model
LMG710VM - Verizon model
The files are coded with R, P, & X which I am guessing is Release Candidate, Production, and scrapped version.
The readme files are really helpful in explaining how to compile the software.
Under the bootloader section:
This product includes cryptographic software written by "EDITED for Psuedo Privacy". This product includes software written by "EDITED for Psuedo Privacy".
I figured that we could either create a custom bootloader that's NOT encrypted, but still follows the same boot up process. If bootup requires an encryption, then we could set the the process to accept anything, for example: if encryption = 1 or 0 then proceed to bootup.
I hope this helps development on this phone in creating a kernel, custom roms, etc...
a) tar -xvzf LMG710TMP_Oreo_Android.tar.gz
- And, merge the source into the android source code
- Run following scripts to build android
a) source build/envsetup.sh
b) lunch 1
c) make -j4
When I get to this section of creating the ROM for the LMG710TM phone, and I run the make -j4 command, I get this error:
./frameworks/base/Android.mk:865: warning: FindEmulator: find: `frameworks/opt/telephony/src/java/android/provider': No such file or directory
./frameworks/base/Android.mk:874: warning: FindEmulator: find: `frameworks/opt/telephony/src/java/android/provider': No such file or directory
./frameworks/base/Android.mk:879: warning: FindEmulator: find: `frameworks/opt/telephony/src/java/android/provider': No such file or directory
./frameworks/base/Android.mk:884: warning: FindEmulator: find: `frameworks/opt/telephony/src/java/android/provider': No such file or directory
[720/988] including ./system/sepolicy/Android.mk ...
./system/sepolicy/Android.mk:107: warning: BOARD_SEPOLICY_VERS not specified, assuming current platform version
[978/988] including ./vendor/lge/external/android-clat-lg/Android.mk ...
build/core/base_rules.mk:238: error: vendor/lge/external/android-clat-lg: MODULE.TARGET.EXECUTABLES.clatd already defined by external/android-clat.
13:43:02 ckati failed with: exit status 1
build/core/main.mk:21: recipe for target 'run_soong_ui' failed
make: *** [run_soong_ui] Error 1
#### make failed to build some targets (53 seconds) ####
Also, when I am trying to make the Kernel for the same phone, based off of the open source files, I get this:
make[2]: *** [sub-make] Error 2
I have never built a ROM before. What am I doing wrong?
https://drive.google.com/open?id=1x0Bhn4qRnYOFdbI1BlghbNb6kS9N_Qy3 <<< Here is the READ ME file that comes with the OS for the LMG710TM.
bigjohnman said:
a) tar -xvzf LMG710TMP_Oreo_Android.tar.gz
- And, merge the source into the android source code
- Run following scripts to build android
a) source build/envsetup.sh
b) lunch 1
c) make -j4
When I get to this section of creating the ROM for the LMG710TM phone, and I run the make -j4 command, I get this error:
./frameworks/base/Android.mk:865: warning: FindEmulator: find: `frameworks/opt/telephony/src/java/android/provider': No such file or directory
./frameworks/base/Android.mk:874: warning: FindEmulator: find: `frameworks/opt/telephony/src/java/android/provider': No such file or directory
./frameworks/base/Android.mk:879: warning: FindEmulator: find: `frameworks/opt/telephony/src/java/android/provider': No such file or directory
./frameworks/base/Android.mk:884: warning: FindEmulator: find: `frameworks/opt/telephony/src/java/android/provider': No such file or directory
[720/988] including ./system/sepolicy/Android.mk ...
./system/sepolicy/Android.mk:107: warning: BOARD_SEPOLICY_VERS not specified, assuming current platform version
[978/988] including ./vendor/lge/external/android-clat-lg/Android.mk ...
build/core/base_rules.mk:238: error: vendor/lge/external/android-clat-lg: MODULE.TARGET.EXECUTABLES.clatd already defined by external/android-clat.
13:43:02 ckati failed with: exit status 1
build/core/main.mk:21: recipe for target 'run_soong_ui' failed
make: *** [run_soong_ui] Error 1
#### make failed to build some targets (53 seconds) ####
Also, when I am trying to make the Kernel for the same phone, based off of the open source files, I get this:
make[2]: *** [sub-make] Error 2
I have never built a ROM before. What am I doing wrong?
Click to expand...
Click to collapse
I've seen this error before. To fix it go to vendor/lge/external/android-clat-lg and find MODULE.TARGET.EXECUTABLES.clatd or something like that. Then just outline it but why are you making a rom for this phone? It supports project Treble
Basically it was just something I was trying to do to learn. If using project Treble has the framework that LG has so that I can use Quick Remote, LG Gallery, & LG Video, I may be set...
LameMonster82 said:
I've seen this error before. To fix it go to vendor/lge/external/android-clat-lg and find MODULE.TARGET.EXECUTABLES.clatd or something like that. Then just outline it but why are you making a rom for this phone? It supports project Treble
Click to expand...
Click to collapse
but treble aosp NEVER is as good as a normal rom
Did anybody managed to compile the kernel for G7?
I have managed to compile the kernel but so far was not able to make it work. I have a boot.img compiled and flashed to a/b partitions but phoen get stuck in fastboot mode. Any clue?
sign this petition to LG if you have a LG G7
https://www.change.org/p/lg-electro...share_options_more.control&utm_term=triggered
umminkug said:
https://www.change.org/p/lg-electro...share_options_more.control&utm_term=triggered
Click to expand...
Click to collapse
Done and shared to FB!
@LameMonster82 What did you mean by outline the MODULE.TARGET.EXECUTABLES.clatd ? I'm like @bigjohnman trying to learn, but Im not entirely hip to the what you mean. Any help would be appreciated!! thanks (I also have the T-mobile LG G7)
Dvalin21 said:
@LameMonster82 What did you mean by outline the MODULE.TARGET.EXECUTABLES.clatd ? I'm like @bigjohnman trying to learn, but Im not entirely hip to the what you mean. Any help would be appreciated!! thanks (I also have the T-mobile LG G7)
Click to expand...
Click to collapse
Hate to break it to you but the open source kinda doesn't work. I already tried it long time ago. Also I don't think you can test it at all with a non European model. If you still want to learn how to build a rom you can Google how to make GSI roms. You can start from here https://github.com/phhusson/treble_experimentations/wiki/How-to-build-a-GSI?
AWM is Canadian in case anyone is wondering
Any update on this?
LameMonster82 said:
Hate to break it to you but the open source kinda doesn't work.
Click to expand...
Click to collapse
Someone asked me to make a custom kernel for G7 so I took a look.
From what I can see it must be a snapshot of a very early development stage. It's not based on any CAF tag because it's actually older
than the very first CAF release for sdm845.
I read Pie might be out soon, maybe that source will be ok.
askermk2000 said:
Someone asked me to make a custom kernel for G7 so I took a look.
From what I can see it must be a snapshot of a very early development stage. It's not based on any CAF tag because it's actually older
than the very first CAF release for sdm845.
I read Pie might be out soon, maybe that source will be ok.
Click to expand...
Click to collapse
Do you think it's possible to merge the source with the latest CAF or at least the first official one? In case the pie source packs the same kernel source.
LameMonster82 said:
Do you think it's possible to merge the source with the latest CAF or at least the first official one? In case the pie source packs the same kernel source.
Click to expand...
Click to collapse
That might be possible, yes. Although there's no telling how far off LG's own code is from current and what effect that would have.
If they do the same with Pie then the best thing would be to simply e-mail them asking for current source drop.
I've done it before with the G5, they responded rather quickly as well. After all they are legally bound to.
I think they're just lazy about it in general. Probably don't expect anyone to care.
Edit: Well, not e-mail but send an inquiry. You'll find an icon next to the download links ("http://opensource.lge.com")
askermk2000 said:
That might be possible, yes. Although there's no telling how far off LG's own code is from current and what effect that would have.
If they do the same with Pie then the best thing would be to simply e-mail them asking for current source drop.
I've done it before with the G5, they responded rather quickly as well. After all they are legally bound to.
I think they're just lazy about it in general. Probably don't expect anyone to care.
Edit: Well, not e-mail but send an inquiry. You'll find an icon next to the download links ("http://opensource.lge.com")
Click to expand...
Click to collapse
Hi, unfortunately the pie kernel is also not working. J0sh1x tried it. I already send an email to LG but it takes so long for them to respond I got an automatic email reinsuring me that they will eventually respond.
Do you think that the pie kernel can run on Oreo?
LameMonster82 said:
Hi, unfortunately the pie kernel is also not working. J0sh1x tried it. I already send an email to LG but it takes so long for them to respond I got an automatic email reinsuring me that they will eventually respond.
Do you think that the pie kernel can run on Oreo?
Click to expand...
Click to collapse
What did he try exactly?
I'm building it now, there are many compilation errors and I have a slow pc, but I'm getting there.
I was imagining that after if successfully completes, it should work. This is considering I checked out the source beforehand,
and this time there's no pre-caf weirdness going on at least. It's based on LA.UM.7.3.r1-06100-sdm845.0
But ofc, if there is something else going on, like incomplete LG patchset...
Don't know about Oreo, or I don't know what kind of changes there are in Pie and if they can cause troubles.
Edit: Oh, I assume he tried it on Oreo then... I thought first someone could try it on Pie but only Korean variant has the beta ?
I don't have a G7 so...
The source seems ok. Probably doesn't work on Oreo because it's a Pie kernel, and/or changes done.
askermk2000 said:
What did he try exactly?
I'm building it now, there are many compilation errors and I have a slow pc, but I'm getting there.
I was imagining that after if successfully completes, it should work. This is considering I checked out the source beforehand,
and this time there's no pre-caf weirdness going on at least. It's based on LA.UM.7.3.r1-06100-sdm845.0
But ofc, if there is something else going on, like incomplete LG patchset...
Don't know about Oreo, or I don't know what kind of changes there are in Pie and if they can cause troubles.
Edit: Oh, I assume he tried it on Oreo then... I thought first someone could try it on Pie but only Korean variant has the beta ?
I don't have a G7 so...
The source seems ok. Probably doesn't work on Oreo because it's a Pie kernel, and/or changes done.
Click to expand...
Click to collapse
I also tried compiling it and it went buttery smooth. BTW any ideas of how to test it without opening the phone itself?
LameMonster82 said:
I also tried compiling it and it went buttery smooth.
Click to expand...
Click to collapse
Sure, if you use gcc 4.9... (or perhaps an older version of clang).
EDIT: I've built a test for anyone interested. (Just a stock kernel basically, sans exfat, for now)
I don't know how/what exactly LameMonster82 or J0sh1x did, but perhaps I've done something different...
Anyway, I did not really consider to build this for Oreo. For Pie it probably works, when that get's released.
This thing flashes modules as well (assumed to be /system/lib/modules), so if you test on Oreo you should back up those,
as it'll likely not work and then you'll be without working modules.
Finally; there's a lot of new stuff that's completely new to me now I see. Like vendor partition, dtbo, new ramdisk layout etc...
so maybe I've done something wrong, or did not do something necessary.

Categories

Resources