samsung s6 edge+ kernel building help + drivedroid support - Galaxy S6 Q&A, Help & Troubleshooting

hello i was looking for a samsung G928G S6 (Edge plus) kernel that has a drivedroid support but i was unable to find one.
since i am familiar with linux system i decided to try and build my first kernel.
i downloaded a stock kernel source from
https://opensource.samsung.com/uploadSearch?searchValue=g928
and other custom lineage os kernel from github
https://github.com/universal7420/android_kernel_samsung_universal7420
following this guide
https://forum.xda-developers.com/galaxy-s6/general/guide-how-to-build-samsung-kernel-july-t3429355
and this guide.
https://forum.xda-developers.com/an...erence-how-to-compile-android-kernel-t3627297
this are the steps that i did
export CROSS_COMPILE=$(pwd)/bin/aarch64-linux-android-
export ARCH=arm64 && export SUBARCH=arm64
when i came to make clean step i was getting this error
aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: No such file or directory
i noticed in my toolchain folder aarch64-linux-android-gcc was missing
so i downloaded some other toolchains until i found one that has gcc
moving to next steps
make clean
make mrproper
make exynos7420-zenlte_defconfig based on stock kernel and
make lineageos_zenlte_defconfig based on lineage os kernel
when i did the make -j$(nproc --all) i get this error
make: *** [Makefile:552: scripts] Error 2 and when i checked in Makefile line 552 i found this
$(Q)$(MAKE) $(build)=$(@)
i get this error everytime i try. i use Arch linux i tried in Ubuntu same thing

Cool How about Kali-linux mod did you check it?
We have Kali-Linux mod for S6 it has drive-droid build-in

Johannes89 said:
Cool How about Kali-linux mod did you check it?
We have Kali-Linux mod for S6 it has drive-droid build-in
Click to expand...
Click to collapse
i tried it yesterday but it hangs on creating image since my device is s6 edge+ not s6

Try to create img file from other source like windows or other program and move it to your phone

so i followed your advice and tried to build on windows 10 ubuntu from their store (though i hate using windows) and it was a success. i patched drivedroid stuff in the kernel
i build one from samsung official kernel and boom! drivedroid works , after a minute i experience some never ending bootloops , in 30 seconds i can use my phone after that it boots again, the loop never ends.
i clone another kernel the lineage one , after spending the whole day building , failing ,errors , bugs, electricity issue and stuff ,
I HAVE FINALLY HAVE A DEVICE THAT WORKS NO BOOTLOOPS AND DRIVEDROID IS WORKING. though the lineage os rom has some camera problems . But yeah it was a good day

Related

[Q][ROM] My custom rom fails Samsung GTi9100

Hi,
I am a new beginner of android. I am trying to rebuild the kernel with profiling support for Samsung galaxy s2 (GT-i9100). After flashing my custom rom to my phone, my phone does not work.
This is how I do it:
1.Downloaded the image I9100XXLP6_I9100OXXLP3_OXX and flashed my galaxy s2 mobile using odin software. now my Galaxy s2 works fine with ICS build (kernel version - [email protected] #3, Ardroid version - 4.0.3).
2. Downloaded the samsung galaxy s2 source code GT-I9100_ICS_Opensource_Update8.zip from opensoure.samsung.com and cross compiler arm-eabi-4.4.3.
3. Use the initramfs from github (Since I am a new user of this forum, I can not post outside link here; I google with "arighi/initramfs-gt-i9100.git" and use the first link)
4. Through "make menuconfig" to enable the profiling support and configure the initramfs source path as specified at step 3.
5. After compiling, I can get the custom zImage of size about 8 MB
6. Then I use "tar -cvf mykernel.tar zImage" to generate my custom rom; and then flash it to my phone through odin.
7. Now my phone boots with a kernel panic upload mode screen and my phone doesn't work.
My question:
1. Does the initramfs cause the problem? If it is, where can I get the matched initramfs for the kernel source code?
2. Is there anything wrong in my above steps?
I would be very appreciated if someone could help me.
Thanks.

[Q] Compiling perf tool for arm

I am trying to compile perf tool for arm. I have followed the instructions provided in the tool (tools/perf in the linux kernel and also tried compiling it in external/linux-tools-perf). I am getting errors like:
make ARCH=arm CROSS_COMPILE=${NDK_TOOLCHAIN} CFLAGS="--sysroot=${NDK_SYSROOT}"
Makefile:409: No libdw.h found or old libdw.h found or elfutils is older than 0.138, disables dwarf support. Please install new elfutils-devel/libdw-dev
Makefile:424: *** No gnu/libc-version.h found, please install glibc-dev[el]/glibc-static. Stop.
But, when I try to compile it for x86 in linux kernel, there are no issues for x86. Why is that it is very hard for building this tool for arm ?
If anybody has successfully built it, please provide me tips of how to built perf tool for arm.
Thanks,
Malarand
I am also having the same problem
i tried to follow the instructions showed in perf/documentation/android.txt
but i failed with a error saying
Android NDK: NDK_TOOLCHAIN is defined to the unsupported value android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-
Android NDK: Please use one of the following values: arm-linux-androideabi-4.6 arm-linux-androideabi-4.8 arm-linux-androideabi-clang3.2 arm-linux-androideabi-clang3.3 mipsel-linux-android-4.6 mipsel-linux-android-4.8 mipsel-linux-android-clang3.2 mipsel-linux-android-clang3.3 x86-4.6 x86-4.8 x86-clang3.2 x86-clang3.3
build/core/init.mk:555: * Android NDK: Aborting . Stop.
Click to expand...
Click to collapse
then later i though this is not gona work like this, as the perf is part of kernel the perf should be built while the kernel source is being compiled so i tried to go to kernel directory there i have run
make -C tools/ perf_install ARCH=arm CROSS_COMPILE=arm-eabi-
Click to expand...
Click to collapse
which again resulted an error saying like yours
Makefile:592: *** No gnu/libc-version.h found, please install glibc-dev[el]/glibc-static. Stop.
Click to expand...
Click to collapse
my kernel version 3.10.65
i am struggling with this error from days not able build perf for android, i am urgently in need of it
Any solutions?
Any solutions?
shyam.sunder91 said:
i tried to follow the instructions showed in perf/documentation/android.txt
but i failed with a error saying
then later i though this is not gona work like this, as the perf is part of kernel the perf should be built while the kernel source is being compiled so i tried to go to kernel directory there i have run
which again resulted an error saying like yours
my kernel version 3.10.65
i am struggling with this error from days not able build perf for android, i am urgently in need of it
Click to expand...
Click to collapse

Cm13 Question D850

Can someone explain why no Cm13 for d850 but for every other carrier? Use to be ATT always gets updates first.
Link to download
https://www.androidfilehost.com/?a=show&w=files&flid=42910
Link to thread
http://forum.xda-developers.com/lg-g3/general/cm13-lg-g3-test-builds-t3245744
underscorenorm said:
Link to download
https://www.androidfilehost.com/?a=show&w=files&flid=42910
Link to thread
http://forum.xda-developers.com/lg-g3/general/cm13-lg-g3-test-builds-t3245744
Click to expand...
Click to collapse
is it reliable ?
I need the external SD card, and Marshmallow is kinda weird with formatting as internal right now, so I didn't use it long, -I didn't any improvements to battery life either, so I wouldn't say it's great right now, but there are a few ROMs out there based on cm13.
FawkiDied said:
is it reliable ?
Click to expand...
Click to collapse
It's not that difficult...
Update:
Have built and posted CM13 ROM for d850 with working GPS. See this thread.
It's not terribly difficult to build your own "unofficial" CM13 ROM image for the d850. I did it this morning (12/19). I was surprised that most everything works, more or less, except for GPS which is still dead as a doornail.
The only difficult part of building CM yourself is the initial setup of a build environment. After that, any time you want the latest-and-greatest you just sync the environment to the latest changes, which takes maybe a minute, and then start the build – which can take a couple/few hours. Best done last thing before you go to bed. Cyanogenmod has good instructions here: https://wiki.cyanogenmod.org/w/Build_for_d850. When you follow the instructions to build CM-12.1 just substitute CM-13.0.
A few hints:
Your version of java
The CM13 build will fail with anything other than Oracle Java 1.7.xxx. No, it will not build with 1.8. No, it will not build with 1.6. No, it will not build with open openjdk or icedtea anything. I had to uninstall Oracle Java 1.8 to prevent its being used by default even though I had manually specified to use Oracle Java 1.7.
The vendor blobs
The instructions will say at one point to extract the vendor proprietary blobs from your current version of CM13. Huh? Not too helpful there. Use the blobs that TheMuppets has pulled together on github. https://github.com/TheMuppets/proprietary_vendor_lge/tree/cm-13.0. Additional hint: It's a whole lot easier to download the zip than it is to set up a proper git environment to retrieve them. Using git is like taking a howitzer out to hunt rabbits, in this case.
Installing
Copy the newly created .zip image from $OUT to your phone storage by your favorite means. Also copy over a version of gapps for CM13 (Android 6). First, manually wipe system. Then flash your new CM13 image and a CM13 compatible version of gapps at the same time. If you don't then the upgrade from 12.1 to 13 will fail when CM13 starts. Apparently Google Play Store is launched, and if it is not CM13 (Android 6) compatible it will repeatedly abort during the upgrade process. You can find several configurations of gapps for CM13 here: http://opengapps.org/. The "mini" for Android 6 works great for me. If you do this then it seems possible to do the upgrade "dirty"; that is, wiping cache and delvik but not apps and data. That saves a whole lot of time not having to restore that stuff. (Yeah, I can hear the incoming rounds now.)
Rebuilding after first build
I didn't use ccache at first, hoping to avoid additional complexity the first few builds. However, it works great, reducing rebuild time to just over ten minutes on subsequent builds after its first use. Use ccache.
Also, I created a super-simple shell script to initiate a rebuild. It's run from android/system/
Code:
#!/bin/bash
# sync with repository and initiate rebuild using ccache
# see https://wiki.cyanogenmod.org/w/Build_for_d850
repo sync
source build/envsetup.sh
breakfast d850
export USE_CCACHE=1
prebuilts/misc/linux-x86/ccache/ccache -M 50G
croot
brunch d850
echo "end of rebuild script"
Good luck, and let's hope a maintainer for cm13 d850 shows up soon!

Compile stock kernel for SM-G950F / SM-G955F

Hello,
I am participating in the thread to try to get DeX working without the station. I have the kernel source for SM-G950F (the one I rooted is S8, my main phone, official status, is the S8+).
I used stock Ubuntu 17.04.
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9
export CROSS_COMPILE=..../aarch64-linux-android-4.9/bin/aarch64-linux-android- # Also hardcoded CROSS_COMPILE into Makefile as a futile attempt
export ANDROID_MAJOR_VERSION=7
make ARCH=arm64 exynos8895-dreamlte_eur_open_defconfig
make ARCH=arm64 -j8
It compiles, but with section mismatch. When flashed, it did not boot. Just hangs. No blue light.
I complained to Samsung. They instantly refused to have anything to do with it because of "root". I wasn't asking for support with the phone. I wanted to know why the source code does not work.
I verified that I was packing the boot.img properly after all with Windows Android Kitchen - I unpacked stock boot.img, repacked, flashed, and it worked.
The aim is to have a 100% custom kernel, but with CONFIG_DISPLAYPORT_ENG=y. And perhaps kill SE always enforcing.
But I am losing my mind right now. Nobody can help. They just say use a custom kernel. There are two things wrong with this. Custom kernels might cause other issues with Samsung DeX, and also, the developer of the custom kernel must have made the original source code compile successfully from source to make their custom kernel.
Maybe the section mismatch has nothing to do with it. But it is all I have right now. I tried other versions of toolchain, as well as UberTC or something. They all don't compile at all - they error partway through.
If anybody could show me how to take a stock boot.img and kernel source code from the SM-G950F, and repack the boot.img with the freshly compiled kernel, I would be most appreciative.
PS: My screen is completely stuffed, that is how I bought the phone so cheaply. So in TWRP, I can only see ghost images and have to guess where to tap to install the boot.img. Once it has booted, I use screen mirroring or DeX to a monitor.
Please let me know if you have any ideas. I can provide more information on request.
Did you ever resolve this?

Matching a kernel's config for compatible kernel modules

I have:
Downloaded the exact kernel version running on my device from an AOSP mirror (4.9.170) (https://github.com/aosp-mirror/kernel_common.git)
Downloaded the exact compiler used to compile the kernel from my device:
Ran `cat /proc/version`, which returns "Linaro GCC 5.3-2016.05", which I downloaded from https://releases.linaro.org/components/toolchain/binaries/5.3-2016.05/aarch64-linux-gnu/
Took the kernel configuration from `/proc/config.gz`, copied it to the kernel source directory `kernel_common` as `.config`
Ran `make ARCH=arm64 CROSS_COMPILE=xxx oldconfig`
What I'm seeing:
First, the downloaded kernel source for 4.9.170 seems to think that my `config` is incomplete, since it will prompt me to answer ~15 extra configuration questions.
Second, this old Linaro compiled doesn't appear to support `-fstack-protector-strong` despite it being explicitly enabled in the `/proc/config.gz` file. So I end up disabling it with `./scripts/config --disable CONFIG_CC_STACKPROTECTOR_STRONG`
Finally, after successfully compiling, I take `net/ipv4/tcp_westwood.ko`, just as a test module, and try to load it on my Android device, and it fails:
`insmod: failed to load tcp_westwood_5.ko: Exec format error`
And in dmesg output: `tcp_westwood: disagrees about version of symbol module_layout`
My questions:
Can I assume that the `/proc/config.gz` file is not the actual file used to compile the running kernel, considering it doesn't completely configure the 4.9.170 kernel?
Am I on the right path to getting a kernel module that my kernel will load?
Background information:
I'm hoping this isn't very relevant, but just to head off some questions
This is a T95 Android TV device running what appears to be, to this newbie's eyes, a very Frankenstein'd Android 10 install (See https://www.cnx-software.com/2020/0...-comes-with-mali-g31-gpu-supports-android-10/)
I can't find any official - or unofficial - source for this device, which is why I'm going to all the trouble above.
I really appreciate any help, thank you!

Categories

Resources