Modify kernel - Xiaomi Mi 9 Themes, Apps, and Mods

Hi,
1. I try to patch kernel for nethunter "porting nethunter" google. Watching yt video "compile nethunter kernel". At the point ~min6-8 he chooses config to change and got only one in configfolder. I have many, which one is the right?
2. I get error compiling kernel adressed to scripts/gcc-version.sh "oserror: invalid number, exec: invalid number..etcetc: invalid number..
3. Is it possible to do 64 kernel on 32 bit machine?

Related

[Q] Kernel Fails To Boot With Increased Version In Makefile

I have been woeking on a custom kernel I will be releasing shortly but I am having a problem with it. Everything works great with it but when I change the kernel version # and attempt to boot it freezes at rhe samsung screen. I tried insmod -f and compiling with modversions enabled and it continues to freeze and I do not know how to pull a /proc/kmsg during a failed boot to find out as adb does not appear to be active. I suspect a module is barfing at the higher kernel version #. Anyone have a suggestion?
Don't change it.
Its a problem several have had, but with no clear solution yet.
Solution found
Hex edit binary modules from samsung with current required source version...not kosher but it boots and plays well with others. Use my soon to be released kernel as an example.

[Q] [WIFI Monitoring] Toolchain and Linking

Hi everybody,
It's my first post on XDA, because I always got my answer on the differents topics I found.
I'm actually working on monitoring network. I use the firmware provide by these brillant guys :
http bcmon blogspot ie/.
I want to developp an native code to write a easy airodump-ng like, to monitoring the traffic close to my device.
I need to use radiotap headers to do what I want, and of course a monitoring access to my wireless card.
So I reverse the bcmon.apk provided by bcmon team, to look how they lauch airodump-ng in a term. I noticed they use LD_SHARED=`pwd`/libs LD_PRELOAD=`pwd`/fakedriver.so.
My first problems : my toolchain (provided by NDK) don't have radiotap header access, and I really don't know how to add these last one to it.
My second problems : how to compile my code with the LD_SHARED/ LD_PRELOAD libraries used by bcmon drivers to ensure I'll be able to execute my code with the monitor mode activated. I think that I will have to add the libs contained on /data/data/com.bcmon.bcmon/files/libs
on these of my toolchains, but I really don't know.
I read a lot papers to understand how linking works in C, but I'm probably still missing something.
I really don't know how to improve my toolchain, and I'm quite anoyed because I haven't progressed in my work for days...
Any help will be really appreciated.
Thanks a Million
Ant.
I found a solution few weeks ago.
I had linking erros.
I reserved the .apk provided by bcmon guys.
For those that want to develop using monitoring functionnalities, there is the way to do :
LD_PRELOAD=/data/data/com.bcmon.bcmon/files/libs/libfake_driver.so LD_LIBRARY_PATH=/data/data/com.bcmon.bcmon/files/libs ./yourprog
If you want to comiple your code using some of their libraries, for example pcap libraries I have done the fellowing stuffs :
1- found radiotap headers, and pcap headers on github likes websites.
2- try to cross compile with the headers
3- Correct the erros (like typedef missing ...)
4- Build your make file adding name of the libraries :
GCC={your toolchain}
FLAGS={your flags}
LIBS=libfake_driver.so \
libpacap.so.1
OBJ = {your obj}
output :
$(GCC) $(OBJ) -c {yoursrcfile) -o {output} $(FLAGS) $(LIBS)
Hope it 'll help.
Ant.

Netfilter support in savies kernel.

here is a noob question.
yesterday i changed my kernel from kuro to savie#73 (i dont remember version of kuro. it came with jellyblast rom). when im on kuro i was able to use psiphon3.
i used it enable transparent proxying.
yesterday i flashed savies kernel #73. (Flashed directly over kuro. didnt flashed stock kernel). after that im unable to start transparent proxing using psiphon.
error message:
Failed to start transarent proxy configuration command failed:
FIX ME! implement getprotobyname() bionic/libc/bionic/stubs.c:378
iptables: No chain/target/match by that name
so started searching.
here is an explanation from droidwall FAQ for "iptables: No chain/target/match by that name":
Common error messages:
1. can't initialize iptables table 'filter': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded.
This error message unfortunately means that your kernel does not support iptables/netfilter, so DroidWall will not work.
The only possible solution is to flash a customized ROM (or kernel) with full netfilter support.
2. no chains/target/match by that name
This error message unfortunately means that your kernel does not support netfilter owner match module, so DroidWall will not work.
The only possible solution is to flash a customized ROM (or kernel) with full netfilter support.
ROM developers, please ensure that the following configuration option is enabled in the kernel (either built-in or as a module): CONFIG_NETFILTER_XT_MATCH_OWNER
Click to expand...
Click to collapse
im sure that i installed droid wall module in savies kernel. but still i cant solve this problem.
is there a solution other than changing kernel? because i would like to keep savies kernel.
can i resolve this issue by flashing stock kernel first and then savies kernel#73?
can i update droidwall module (if there is a new version available)?
sorry i cant add links.
update from droidwall
flashing this zip,
mikstev_add_initd_to_boot.img__kernel_modules_initd_scripts_for_droidwall_v2.zip
fromthe thread "[CUSTOM][KERNEL][HOWTO] Droidwall on the Samsung Galaxy Y"
will solve this issue?
SORRY I CANT ADD LINKS. IM A NOOB.

How do I set selinux to permissive ?

Current status of my Note 3
Root,Unlocked bootloader,twrp recovery and the firmware is OF1.
The reason I think I need permissive mode is because I am having problems with trying to get linux deploy to work.
From reading some posts I have gathered that selinux might be the problem.
To get into permissive mode I need to replace the kernel I think, how is permissive mode done ?
thank you.
The phantomOne kernel ("hlte-vzw" version) seems to be permissive. You can use it with the AryaMod ROM if you like.*
There are kernel build-time configuration option(s) determining whether SELinux is (a) disabled, (b) alterable by kernel boot arguments (or post-boot changes), or (c) permanently enabled and immutable, and finally (d) either permissive or enforcing. In the case of (b) the default (absent a kernel boot command line argument) could be either permissive or enforcing.
Some of the above combinations are not used in practice - e.g. it makes little sense to be immutable and permissive.
In any event, you would have to see the kernel build configuration files to know what the exact setup was (or the kernel has /proc/config.gz enabled).
Typically a vendor will use "permissive" as a stepping stone towards getting full-up immutable, enforcing SElinux running without problems: the kernel will issue violation warnings without enforcing the SElinux constraints, so that kernel logs can be used to diagnose improper setups of SElinux execution contexts (domains) and filesystem extended attributes on a live testing system.
* I'm on NC4 bootloader; ymmv.
W T F no write access to ext sd card as default ?
still poking about trying to figure out why the linux install script's dont work.
I have discovered that as a default programs or apps dont have the permissions to write to the extsdcard . The extsdcard is read only. I think that actually is my problem.
where do I look to perminatly change my permissions on my extsdcard to 777 for all users and groups.
does android have somthing like an fstab file or mounting options ??
If it's any encouragement to you, I got the "Linux deploy" app to work on
AryaMod6.6 + phantomOne kernel (permissive SELinux).
I had similar troubles creating the initial container on the /sdcard, and I'm pretty sure that was just operator error because the interface is not intuitive and of course I completely failed to RTFM. So, maybe the container creation issue has nothing to do with SELinux at all.
Useful hint: with a default "linux" (==debian jessie ARM) profile container, the default username for all the services (httpd, sshd, vnc) is "android", and the initial passwords are found in two different places: under the "Settings" menu pick for httpd and telnetd, and under the little "inbox" icon menu for the profile for sshd and vnc. I had to use "apt-get install tightvncserver" to get vncserver up and running from the ssh command line. ("sudo /bin/bash" first).
I had to log in to the phone via adb and do a " netstat -n -a | grep 'tcp.*LISTEN' " to convince myself the various servers were up. That helped a bunch. httpd on :5080, telnetd on :5023, vncserver on :5901.
good luck, I struggled with it.
What are you going to use this for? I suppose if you have access to a full native-ARM Linux environment, perhaps it is easier to build native tools against libc without the constraints of bionic and the NDK?
bftb0 said:
If it's any encouragement to you, I got the "Linux deploy" app to work on
AryaMod6.6 + phantomOne kernel (permissive SELinux).
I had similar troubles creating the initial container on the /sdcard, and I'm pretty sure that was just operator error because the interface is not intuitive and of course I completely failed to RTFM. So, maybe the container creation issue has nothing to do with SELinux at all.
<SNIP>
What are you going to use this for? I suppose if you have access to a full native-ARM Linux environment, perhaps it is easier to build native tools against libc without the constraints of bionic and the NDK?
Click to expand...
Click to collapse
What I am trying to do is explore just how well I can really use this brilliantly wonderful device as my main computer. I have good reasons for this but there all related to my personal circumstances and I won't bore you with the details, sufice it to say that I am now living in a electricity/power scarce inviroment and a cell phone is about as power efficient as I can get and have reasonably powerfull hardware.
I had considered sbc's like the Rasb. pi but there are none that even come close to the capabilities of this phone.
GPS,wifi,cellular,acceleromiter etc.
In an Ideal world I could wipe android fully from the phone and load a distro of linux that fully supported all the hard ware of the note 3 giving me as fast and lean a computing enviroment to work with Or perhaps a duel boot configuration like grub boot either android or linux.
Phantom kernel and lss works great ..been going back and forth with the latest international roms since there's not too much happening on our Verizon forum.
Sent from my SM-N930F using Tapatalk

[Building TWRP] Easytone T95 Super Android 10 2GB RAM 16GB ROM

So I made a TWRP device tree for it using twrpdtgen by SebaUbuntu and I’m doing the repo sync of the twrp minimal manifest but I haven’t really built TWRP for a device before. The device tree is android_device_mbox_dolphinp1 but I will also try to make it obvious that that device is also the Easytone… etc so it is easy to find and I will make XDA post when it is fully complete. The main thing I need to do now is double check all the stuff in the build tree and any settings I want TWRP to have in boardconfig.mk and compile and test it. I own this device so if all goes well it could be at least booting by the end of the week. Is there anyone with TWRP building experience that would be willing to help if I make any stupid mistakes? The end goal is to make an official TWRP build on the TWRP website. This year I may also consider looking into ROM development just because I really love tinkering with this device and I would love to see it running a custom ROM with the Android TV controls and features in mind. I also want to help anyone who bought this device and was disappointed by the stock experience, which can be slow and clunky to say the least.
I am trying to do lunch but I get this error please help
~/dolphinp1-twrp/device/mbox/dolphin-p1$ lunch twrp-dolphin-p1
In file included from build/make/core/config.mk:313:
In file included from build/make/core/envsetup.mk:312:
device/mbox/dolphin-p1/AndroidProducts.mk:11: error: device/mbox/dolphin-p1: twrp_dolphin-p1-user: Invalid variant: p1.
16:28:41 dumpvars failed with: exit status 1
Device twrp not found. Attempting to retrieve device repository from TeamWin Github (http://github.com/TeamWin).
Found repository: android_device_emulator_twrp
Checking branch info
Calculated revision: android-12.1
Branch android-12.1 not found
In file included from build/make/core/config.mk:313:
In file included from build/make/core/envsetup.mk:312:
device/mbox/dolphin-p1/AndroidProducts.mk:11: error: device/mbox/dolphin-p1: twrp_dolphin-p1-user: Invalid variant: p1.
16:28:47 dumpvars failed with: exit status 1
build/make/core/version_defaults.mk:56: warning: Invalid TARGET_PLATFORM_VERSION 'p1', must be one of
In file included from build/make/core/config.mk:313:
In file included from build/make/core/envsetup.mk:68:
build/make/core/version_defaults.mk:57: error: SP2A.
16:28:48 dumpvars failed with: exit status 1
** Don't have a product spec for: 'twrp'
** Do you have the right repo manifest?

Categories

Resources