[Completed] Can BypassLKM be used for 4.4.2 on I9505? - XDA Assist

Hi, I'm currently trying to compile and insmod my own module into my rooted stock I9505, the problem is, Samsung implemented a very troublesome signature checking that prevents any modules unsigned by Samsung from being inserted and launched. I've found a thread: Link that features an exploit for bypassing the signature checking for 4.3, but I'm currently using 4.4.2 on I9505, so I would like to ask if anyone knows if it works on 4.4.2 or not. I've tried compiling the source, but it seems like there's lots of errors thrown by the arm-eabi-gcc:
Code:
make /home/jack/toolchain/arm-eabi-4.7/bin/arm-eabi-gcc -g -static -Wall -I /usr/include -o bypasslkm.o -c bypasslkm.c
bypasslkm.c: In function 'ptrace_write_value_at_address':
bypasslkm.c:65:3: warning: implicit declaration of function 'strerror' [-Wimplicit-function-declaration]
bypasslkm.c:65:60: error: 'errno' undeclared (first use in this function)
bypasslkm.c:65:60: note: each undeclared identifier is reported only once for each function it appears in
bypasslkm.c: In function 'main':
bypasslkm.c:84:2: warning: implicit declaration of function 'strstr' [-Wimplicit-function-declaration]
bypasslkm.c:84:6: warning: incompatible implicit declaration of built-in function 'strstr' [enabled by default]
bypasslkm.c:89:2: warning: format '%X' expects argument of type 'unsigned int', but argument 2 has type 'long unsigned int' [-Wformat]
make: *** [bypasslkm.o] Error 1
Any ideas how to fix this? I'm not familiar with C language, so this error message is hard for me to solve. I'm trying to insmod a KTGP module, which, if successful, allows me to perform kernel debugging on the stock kernel without recompiling my own kernel.

If there are Signature verification issues, then you need to have the module signed by the same Key that Samsung uses. I bet that's going to be harder to come by. You might be better off instead in using one of the Custom Kernels and then compile the module for that. You might wish to post the request over in Android Software and Hacking General [Developers Only] Forum. There you will be able to discuss with other developers and get great advice.

Perseus71 said:
If there are Signature verification issues, then you need to have the module signed by the same Key that Samsung uses. I bet that's going to be harder to come by. You might be better off instead in using one of the Custom Kernels and then compile the module for that. You might wish to post the request over in Android Software and Hacking General [Developers Only] Forum. There you will be able to discuss with other developers and get great advice.
Click to expand...
Click to collapse
I've looked into the thread itself, and saw a few post that keep telling those who posted in the thread but are not developers to not post in that thread as it's for developers themselves only. Can i really post in there?

Related

can some1 with more knowledge than me help me with a root thats out of my league?

http://www.youtube.com/watch?v=mo3IlbpfoFk&feature=plcp
its root for logitech revue. all be it temp root...but still. i'm on a mac. ive got git. i've cloned the exploits. when i go to build it, i get this error...
Macintosh:nandpwn myname$ make
gcc -c nandpwn.c -m32
nandpwn.c:18:21: error: syscall.h: No such file or directory
nandpwn.c: In function ‘getprivs’:
nandpwn.c:109: error: ‘__NR_write’ undeclared (first use in this function)
nandpwn.c:109: error: (Each undeclared identifier is reported only once
nandpwn.c:109: error: for each function it appears in.)
nandpwn.c:110: error: ‘__NR_read’ undeclared (first use in this function)
nandpwn.c:114: error: ‘__NR_restart_syscall’ undeclared (first use in this function)
make: *** [nandpwn.o] Error 1
honestly this is the first time ive had to do anything involving git or building from. i'm pretty lost there. i'm pretty ok with adb though. i cant cd to usr/local/src as per the first line. i'm not sure what the preferrred repo even means. this is probably a very very basic mistake...but ya gotta start somewhere.
any help out be much appreciated. Also, i know. This root is above my level and i probably shouldnt be messing with it. i'm aware that i can brick my revue. at 79$ i'm not worried about a brick. plus new vizio costar for 99$.

compile kernel error

Dear friends,
I encountered the trouble of compiling kernel failed.Ten days ago,I compiled it successfully.But today I am failed to do it again.The error is as below:
arch/arm/mm/alignment.c: In function ‘do_alignment’:
arch/arm/mm/alignment.c:298:15: error: ‘offset.un’ may be used uninitialized in this function [-Werror=uninitialized]
arch/arm/mm/alignment.c:720:21: note: ‘offset.un’ was declared here
cc1: all warnings being treated as errors
make[1]: *** [arch/arm/mm/alignment.o] Error 1
My host OS is ubuntu10.04 and the cross-compile is arm-2012.09/bin/arm-none-linux-gnueabi-.
I check it,but some's suggestion is about GCC.I have upgraded it.It is not OK.
Thank you in advance.
Mark
confused
I have no idea.
envizhang said:
Dear friends,
I encountered the trouble of compiling kernel failed.Ten days ago,I compiled it successfully.But today I am failed to do it again.The error is as below:
arch/arm/mm/alignment.c: In function ‘do_alignment’:
arch/arm/mm/alignment.c:298:15: error: ‘offset.un’ may be used uninitialized in this function [-Werror=uninitialized]
arch/arm/mm/alignment.c:720:21: note: ‘offset.un’ was declared here
cc1: all warnings being treated as errors
make[1]: *** [arch/arm/mm/alignment.o] Error 1
My host OS is ubuntu10.04 and the cross-compile is arm-2012.09/bin/arm-none-linux-gnueabi-.
I check it,but some's suggestion is about GCC.I have upgraded it.It is not OK.
Thank you in advance.
Mark
Click to expand...
Click to collapse
envizhang said:
arch/arm/mm/alignment.c: In function ‘do_alignment’:
arch/arm/mm/alignment.c:298:15: error: ‘offset.un’ may be used uninitialized in this function [-Werror=uninitialized]
arch/arm/mm/alignment.c:720:21: note: ‘offset.un’ was declared here
cc1: all warnings being treated as errors
make[1]: *** [arch/arm/mm/alignment.o] Error 1
Click to expand...
Click to collapse
Well, the point is "all warnings being treated as errors". "-Werror=uninitialized" makes an error out of what would normally be only a warning.
There seems to be a patch to remove that warning:
lkml.indiana. edu/hypermail/linux/kernel/1209.1/02186.html
(xda recommends that I "answer" some questions, but I can not include links until I have 10 posts. Nice work, xda. Really makes sense, this policy)
But as there may be more warning, I would try to disable that behaviour that warnings are treated as errors. Maybe search for "Werror" in the Makefiles and just remove the whole option?
envizhang said:
My host OS is ubuntu10.04 and the cross-compile is arm-2012.09/bin/arm-none-linux-gnueabi-.
Click to expand...
Click to collapse
On an unrelated note that's really old. It should work I guess, but Updating to something more modern may be a good idea regardless whether the build works or not.

[Q] Error compiling CM10.1 (Ubuntu Phone build)

Hey!
I'm working on porting Ubuntu 13.04 for phones to HTC One S, and everything has gone well.... except, well, the compile.
Ubuntu Phone is based on a version of CM10.1 with only the low-level android services required (theres no dalvik) so it should be REALLY simple to port to our device, I have downloaded the Ubuntu Phone repo via git and also used "breakfast ville" to clone the CM10.1 Git, I have also used "repo sync" to get all of the dependencies.
But the error is in the compile, I use ". build/envsetup.sh" to prepare the build environment and then I run "brunch ville".... now this is where the problems begin:
Code:
make: *** No rule to make target `/home/djayc/ubuntu/ville/out/target/product/ville/obj/SHARED_LIBRARIES/libril_intermediates/export_includes', needed by `/home/djayc/ubuntu/ville/out/target/product/ville/obj/EXECUTABLES/rild_intermediates/import_includes'. Stop.
I've done a lot of Googling around, the compile only takes around 30 seconds before it gets to this stage - I presume it must be much longer than that.
There's probably a bunch of errors too but for now I'd just like to get this fatal one out of the way and continue the build before we start the debugging.
Thanks, help is appreciated.
-Cameron
Okay! Progress!
So, I commented out:
Code:
# RIL
BOARD_PROVIDES_LIBRIL := true
in the file device/htc/ville/BoardConfig.mk
This was recommended on Ubuntu Launchpad at https://lists.launchpad.net/ubuntu-phone/msg02822.html
It seems to fix this make error, but another one has popped up :/ (gotta love linux!)
Code:
Import includes file: /home/djayc/ubuntu/ville/out/target/product/ville/obj/SHARED_LIBRARIES/hwcomposer.msm8960_intermediates/import_includes
target thumb C++: gralloc.msm8960 <= hardware/qcom/display-caf/libgralloc/mapper.cpp
target thumb C++: liboverlay <= hardware/qcom/display-caf/liboverlay/overlay.cpp
target thumb C++: liboverlay <= hardware/qcom/display-caf/liboverlay/overlayCtrl.cpp
hardware/qcom/display-caf/libgralloc/framebuffer.cpp: In function 'int fb_post(framebuffer_device_t*, buffer_handle_t)':
hardware/qcom/display-caf/libgralloc/framebuffer.cpp:93:25: error: 'MDP_DISPLAY_COMMIT_OVERLAY' was not declared in this scope
make: *** [/home/djayc/ubuntu/ville/out/target/product/ville/obj/SHARED_LIBRARIES/gralloc.msm8960_intermediates/framebuffer.o] Error 1
make: *** Waiting for unfinished jobs....
target thumb C++: liboverlay <= hardware/qcom/display-caf/liboverlay/overlayUtils.cpp
hardware/qcom/audio-caf/alsa_sound/AudioPolicyManagerALSA.cpp: In member function 'virtual void android_audio_legacy::AudioPolicyManager::setPhoneState(int)':
hardware/qcom/audio-caf/alsa_sound/AudioPolicyManagerALSA.cpp:431:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
[email protected]:~/ubuntu/ville$
I copied all of it because the error is about gralloc.msm8960 and it is referenced repeatedly, so maybe this could provide insight as to what the error derives from - wait, actually, I know, I'm missing the framebuffer.o file in gralloc.msm8960_intermediates.... but I DO have a framebuffer.d file in gralloc.msm8960_intermediates, is there a chance that the makefile that is compiling the project is referencing the wrong name of a file (unlikely I'd have thought because it is the offical CM10.1 & Ubuntu Phone environment)?
TL;DR: Is framebuffer.d equal to framebuffer.o, and if not how vital is the file and where would I get it?
I think the answers to those 3 questions would be: not sure, pretty vital (it seems to make the display work!), and the CM10.1 ville repo. Of course, the reason I am documenting this is because I'm not sure! So I'm grateful for any input.
Thanks!
-Cameron
EDIT: There seems to be a different issue each time, I ran brunch ville again and it gave me a metric ton of errors about qcom audio.... :/

[Resolved] Need help with compiling android 7.0 from source!

Hello xda users,
Today I started to build android 7.0 aosp for the Zenfone 2 ZE550ML (Z008) using this guide and the Cyanogenmod guide.
But when trying to build the rom with "lunch" and "make Z008" I received an error message (this also happends with "make -j2" and "sudo")(soms words are dutch):
Running kati to generate build-aosp_x86.ninja...
out/build-aosp_x86.ninja is missing, regenerating...
<A lot of text>
build/core/binary.mk:928: warning: overriding commands for target `out/target/product/generic_x86/obj/STATIC_LIBRARIES/libv8_intermediates/src/base/atomicops_internals_x86_gcc.o'
build/core/binary.mk:928: warning: ignoring old commands for target `out/target/product/generic_x86/obj/STATIC_LIBRARIES/libv8_intermediates/src/base/atomicops_internals_x86_gcc.o'
build/core/binary.mk:664: warning: overriding commands for target `out/host/linux-x86/gen/STATIC_LIBRARIES/libaapt2_intermediates/proto/frameworks/base/tools/aapt2/Format.pb.cc'
build/core/binary.mk:664: warning: ignoring old commands for target `out/host/linux-x86/gen/STATIC_LIBRARIES/libaapt2_intermediates/proto/frameworks/base/tools/aapt2/Format.pb.cc'
build/core/binary.mk:668: warning: overriding commands for target `out/host/linux-x86/gen/STATIC_LIBRARIES/libaapt2_intermediates/proto/frameworks/base/tools/aapt2/Format.pb.h'
build/core/binary.mk:668: warning: ignoring old commands for target `out/host/linux-x86/gen/STATIC_LIBRARIES/libaapt2_intermediates/proto/frameworks/base/tools/aapt2/Format.pb.h'
build/core/ninja.mk:163: recept voor doel 'out/build-aosp_x86.ninja' is mislukt
make: *** [out/build-aosp_x86.ninja] Eliminated
#### make failed to build some targets (52 seconds) ####
See the whole log here
Can anyone help me solve this issue?
-Greeting Indy
I installed kati manually and added
export EXPERIMENTAL_USE_JAVA8=true
export USE_NINJA=false
if [ -d "$HOME/android_source/build/kati" ] ; then
PATH="$HOME/android_source/build/kati:$PATH"
fi
to my bashrc.sh file.
After this it worked just fine , but now have to see if it finishes.
Well, got an error 41 so Lets try it all over again
Solved
Solved
Any pointers. I'm running Linux Ubuntu from a VM I got updates and tools set repo and ran sync found my device binaries on github made git clone and put them in folder "vendor" and ran "make -j3" cause the VM has 3 cores assigned. It failed when It go to jack. Make with Jack is confusing. What do I do did i put the right files in the right place?
Sent from my SM-G900T using XDA-Developers mobile app
@Migush
How did you solve the problem?
Thanks for the response.
excelly2k1 said:
@Migush
How did you solve the problem?
Thanks for the response.
Click to expand...
Click to collapse
I'm sorry, but I don't know. It just worked after I did something I can't remember.

[Completed] Ninja_wrapper error

building my very first nougat ROM for the GT-I9505 (Jfltexx) but I keep getting this error when use the brunch command.
Starting build with ninja
ninja: Entering directory `.'
ninja: error: '/home/lochlan/LAOS/out/target/product/jfltexx/obj/lib/libtime_genoff.so.toc', needed by '/home/lochlan/LAOS/out/target/product/jfltexx/obj/SHARED_LIBRARIES/libandroid_servers_intermediates/LINKED/libandroid_servers.so', missing and no known rule to make it
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
make: Leaving directory '/home/lochlan/LAOS'
I've done some research and still haven't come to a conclusion on what the hell it means...
Any and all help would be nice!
skyskidder said:
building my very first nougat ROM for the GT-I9505 (Jfltexx) but I keep getting this error when use the brunch command.
Starting build with ninja
ninja: Entering directory `.'
ninja: error: '/home/lochlan/LAOS/out/target/product/jfltexx/obj/lib/libtime_genoff.so.toc', needed by '/home/lochlan/LAOS/out/target/product/jfltexx/obj/SHARED_LIBRARIES/libandroid_servers_intermediates/LINKED/libandroid_servers.so', missing and no known rule to make it
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
make: Leaving directory '/home/lochlan/LAOS'
I've done some research and still haven't come to a conclusion on what the hell it means...
Any and all help would be nice!
Click to expand...
Click to collapse
Did you get the vendor repo for your device? Please pay attention on this. I think your vendor repo is outdated and file libtime_genoff.so is missing.
blinoff82 said:
Did you get the vendor repo for your device? Please pay attention on this. I think your vendor repo is outdated and file libtime_genoff.so is missing.
Click to expand...
Click to collapse
Hello, this is what I'm using for my vendor repo
https://github.com/JDCTeam/android_vendor_cm
And you are correct about libtime_genoff.so is missing. I checked all my repos for that file and have gotten no results. Any idea on what I should do?
P.S. Thanks for your help thus far! It means a lot!
skyskidder said:
Hello, this is what I'm using for my vendor repo
https://github.com/JDCTeam/android_vendor_cm
And you are correct about libtime_genoff.so is missing. I checked all my repos for that file and have gotten no results. Any idea on what I should do?
P.S. Thanks for your help thus far! It means a lot!
Click to expand...
Click to collapse
You should use another vendor blobs like this https://github.com/DonkeyCoyote/proprietary_vendor_samsung/tree/android-7.1/jflte.
Add in local_manifest (roomservice.xml):
<project name="DonkeyCoyote/proprietary_vendor_samsung" path="vendor/samsung" revision="android-7.1" remote="github" />
Then: "repo sync -j1 --force-sync" and build again.
I never encountered with Samsung devices, I hope I did not make a mistake with path...
blinoff82 said:
You should use another vendor blobs like this https://github.com/DonkeyCoyote/proprietary_vendor_samsung/tree/android-7.1/jflte.
Add in local_manifest (roomservice.xml):
<project name="DonkeyCoyote/proprietary_vendor_samsung" path="vendor/samsung" revision="android-7.1" remote="github" />
Then: "repo sync -j1 --force-sync" and build again.
I never encountered with Samsung devices, I hope I did not make a mistake with path...
Click to expand...
Click to collapse
Hey thanks for the idea on using this new repo for the device blobs and providing the link! But i have a few questions.
#1. There are severely many less files in this new repo. Why is that?
#2 This effect anything with my rom? if so like what?
You dont need to give me a full out explanation a brief one will do if you can, if you cant dont sweat it!
I will also try this new repo when i get home and I'll update you on how it goes.
Thank you so very much!
-Sky
skyskidder said:
#1. There are severely many less files in this new repo. Why is that?
#2 This effect anything with my rom? if so like what?
Click to expand...
Click to collapse
1. Because this repo ONLY for jflte.
2. No effect, this is just blobs needed for your device and for compilation.
blinoff82 said:
1. Because this repo ONLY for jflte.
2. No effect, this is just blobs needed for your device and for compilation.
Click to expand...
Click to collapse
Welp. I tried what you told me to do and Ive gotten farther but i ran into another error.
FAILED: /bin/bash -c "(make -j2 -C kernel/samsung/jf O=/home/lochlan/LAOS/out/target/product/jfltexx/obj/KERNEL_OBJ ARCH=arm CROSS_COMPILE="/home/lochlan/LAOS/prebuilts/misc/linux-x86/ccache/ccache arm-linux-androidkernel-" VARIANT_DEFCONFIG= SELINUX_DEFCONFIG= cyanogenmod_jf_defconfig ) && (if [ ! -z "" ]; then echo "Overriding kernel config with ''"; echo >> /home/lochlan/LAOS/out/target/product/jfltexx/obj/KERNEL_OBJ/.config; make -j2 -C kernel/samsung/jf O=/home/lochlan/LAOS/out/target/product/jfltexx/obj/KERNEL_OBJ ARCH=arm CROSS_COMPILE="/home/lochlan/LAOS/prebuilts/misc/linux-x86/ccache/ccache arm-linux-androidkernel-" oldconfig; fi ) && (make -j2 -C kernel/samsung/jf O=/home/lochlan/LAOS/out/target/product/jfltexx/obj/KERNEL_OBJ ARCH=arm CROSS_COMPILE="/home/lochlan/LAOS/prebuilts/misc/linux-x86/ccache/ccache arm-linux-androidkernel-" savedefconfig ) && (if [ ! -z "" ]; then echo "Using additional config ''"; kernel/samsung/jf/scripts/kconfig/merge_config.sh -m -O /home/lochlan/LAOS/out/target/product/jfltexx/obj/KERNEL_OBJ /home/lochlan/LAOS/out/target/product/jfltexx/obj/KERNEL_OBJ/.config kernel/samsung/jf/arch/arm/configs/; make -j2 -C kernel/samsung/jf O=/home/lochlan/LAOS/out/target/product/jfltexx/obj/KERNEL_OBJ ARCH=arm CROSS_COMPILE="/home/lochlan/LAOS/prebuilts/misc/linux-x86/ccache/ccache arm-linux-androidkernel-" KCONFIG_ALLCONFIG=/home/lochlan/LAOS/out/target/product/jfltexx/obj/KERNEL_OBJ/.config alldefconfig; fi )"
make: Entering directory '/home/lochlan/LAOS/kernel/samsung/jf'
GEN /home/lochlan/LAOS/out/target/product/jfltexx/obj/KERNEL_OBJ/Makefile
HOSTCC scripts/basic/fixdep
/home/lochlan/LAOS/kernel/samsung/jf/scripts/basic/fixdep.c:106:23: fatal error: sys/types.h: No such file or directory
compilation terminated.
scripts/Makefile.host:118: recipe for target 'scripts/basic/fixdep' failed
make[2]: *** [scripts/basic/fixdep] Error 1
/home/lochlan/LAOS/kernel/samsung/jf/Makefile:417: recipe for target 'scripts_basic' failed
make[1]: *** [scripts_basic] Error 2
Makefile:130: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2
make: Leaving directory '/home/lochlan/LAOS/kernel/samsung/jf'
[ 6% 2204/33925] target R.java/Manifest.java: framework-res (/home/lochlan/LAOS/out/target/common/obj/APPS/framework-res_intermediates/src/R.stamp)
warning: string 'candidates_style' has no default translation.
warning: string 'gsm_alphabet_default_charset' has no default translation.
warning: string 'wfcSpnFormat' has no default translation.
nothing matches overlay file default_wallpaper.png, for flavor hdpi-v4
nothing matches overlay file default_wallpaper.png, for flavor xhdpi-v4
nothing matches overlay file default_wallpaper.png, for flavor xxhdpi-v4
nothing matches overlay file default_wallpaper.png, for flavor xxxhdpi-v4
ninja: build stopped: subcommand failed.
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
make: Leaving directory '/home/lochlan/LAOS'
#### make failed to build some targets (08:00 (mm:ss)) ####
Click to expand...
Click to collapse
Any idea what this error is?
Sorry my friend you should think for yourself. That's all.
http://stackoverflow.com/questions/37771339/sys-types-h-no-such-file-or-directory
:QUICK UPDATE:
I don't think I'm ready to tackle a project of this scale yet. My frustration, lack of knowledge of compiling and knowledge of repo commands, java, and the damn terminal have caused as of now to post pone my attempts at making a ROM. With exams coming up I have take EVEN MORE time away from my attempts.
:SIDE NOTES:
I feel I have made some progress since the last post I have made with the help of @binoff82 of course. Slowly but surely I'm getting there. With the expense of many broken things in my room... Including a fractured wrist...
In a few days and or weeks time I will update the thread with another post either explaining my progress or if I'm just going to halt my attempts completely for quite a while.
-Sky
P.S. I should probably take anger management classes...
skyskidder said:
:QUICK UPDATE:
I don't think I'm ready to tackle a project of this scale yet. My frustration, lack of knowledge of compiling and knowledge of repo commands, java, and the damn terminal have caused as of now to post pone my attempts at making a ROM. With exams coming up I have take EVEN MORE time away from my attempts.
:SIDE NOTES:
I feel I have made some progress since the last post I have made with the help of @binoff82 of course. Slowly but surely I'm getting there. With the expense of many broken things in my room... Including a fractured wrist...
In a few days and or weeks time I will update the thread with another post either explaining my progress or if I'm just going to halt my attempts completely for quite a while.
-Sky
P.S. I should probably take anger management classes...
Click to expand...
Click to collapse
Greetings and welcome to assist. Have you seen this excellent guide by jackeagle ?
https://forum.xda-developers.com/chef-central/android/guide-android-rom-development-t2814763
that thread is probably your best bet for advice
Good Luck
Sawdoctor
sawdoctor said:
Greetings and welcome to assist. Have you seen this excellent guide by jackeagle ?
https://forum.xda-developers.com/chef-central/android/guide-android-rom-development-t2814763
that thread is probably your best bet for advice
Good Luck
Sawdoctor
Click to expand...
Click to collapse
Hi, thanks for taking your time to help me. Sadly this is the original guide I have been following when attempting to build my ROM.

Categories

Resources