Even tho not being able to connect to a hidden SSID is not a problem for the majority of the users. But for those that need that feature it can be fixed, as DanielHK proved back in 2017 with a one line patch for his android_device_lenovo_aio_otfp.
But what I first missed is that you have to use the WPA_SUPPLICANT binary that is built when compiling your ROM. So simply removing the old one that was in the vendor repository for the device I'm tinkering with, a fork of the Krillin device made by Paplito2020, and adding the patch, fixed that little issue.
I hope this may be of help for other.
/Magnus
Related
Hi everybody,
I'm currently in process of making my first builds of CM13 for my A310F.
The repositories for CM are unofficial, maintained by a user i tried to get in contact with, who didn't respond yet.
Now, while the stock kernel sources of MM are open sourced and a few hacks were already done in the unofficial CM repositories, the CM device/vendor/kernel sources are already a bit deprecated with a few erroneus configurations in the device repo, so I'm on my way to clean it up a bit.
Currently CM itself builds, but after booting most of the hardware features are broken and they were using the 5.1.1 kernel instead of the 6.0.1, and the blobs were not taken over correctly, or not all blobs were taken.
My question is now, how are you managing to get the correct list of the blobs needed? What is the best way to find out which blobs i need to take from the system.img?
I'm wondering the same thing. How do you know which blobs to pull in the first place when you're trying to build up the first rom?
There will be some dlopen errors for missing files in the logcat. After resolving them, it's mainly trial and error
Believe it or not, there is a method to this, and it requires some trial and error and a good sense of knowing what android needs to boot. If you look at the start up classpath and are just generally aware that the modem/network connection and filesystem utils need to be executed first (though for some reason binder and zygote can't start them themselves, despite the fact they are to running under init, but whatevs) so after bootloader hands off to kernel, you can go through the ramdisk and make sure all the on boot, on init on fs related libs/binaries are present. If you use a qcom device, just assume any lib or binary that starts with "libq" or even just the letter "q" is proprietary and required. Qcom is a bit full of themselves (ironic were talking about cm here) but anyways then there's the rild/crypto/fs libs and binaries. rngd, rmt_storage, rild daemons and anything that starts drmsever or netd will be required as well.
You can get significant hints from boot logs as well.
Aside from that, just keep note of what isn't produced by the aosp tree yet is present on the devices stock system, then determine how important it looks for android to able to start up
I'm currently able to build some customized ROM builds with certain personalized changes for my devices.
However, recently I'm considering using overlays (that'll be loaded as a custom Magisk module) to modify the parameters while staying on official ROM builds (so that I can apply official ROM OTA packages and retain the changes), as the environment for making working ROM builds might not always be available, such as that I'm still having issues when trying to build my own GSI images with the changes included, due to some other issues (mainly due to Treble-related patches that needed to be applied during building, as a good amount of patches are outdated and couldn't be applied).
Not sure to which extent I can modify. The things I currently wanted to modify are:
1. Changing the default captive portal URLs to my own servers (found in frameworks/base/services/core/java/com/android/server/connectivity/NetworkMonitor.java). Not sure if these values could be specified somewhere else in a XML as I couldn't find any helpful documents or google results that applies to Android Pie.
EDIT: I know how to set these values via ADB, but accesses to these values might be blocked by SELinux and it was possible to get it reverted when you update ROM (not sure if this also applies to GSI).
2. Change the network mode options to allow 4G/3G only (disabling 2G), by setting network mode to LTE/WCDMA (found in packages/services/Telephony/res/values/strings.xml, as well as build.prop parameter ro.telephony.default_network).
EDIT: I know how to set these values via *#*#4636#*#*, but the settings there won't persist this way. It'll be reverted to preferrably the value defined in the build.prop parameter when I reboot the phone, or when the phone lost signal then re-established it (or by toggling Airplane Mode on then off).
Currently I'm looking at developing magisk modules so I can start including some other relatively easier to include stuffs, but I'm still uncertain about these two parts.
Hi everyone,
as title suggests, I'd like to "port" clean AOSP to be able to install and run it on the custom device.
Basically, the situation is following: I got a custom device, based on rockchip rk3288 SoC. The device currently runs Android 5.1 successfully. I'd like to update Android to version 6 (got AOSP sources and AWS builder image up and running), but the company that created Android v5 for us no longer exists.
Thus I am here to ask for advice(s) on how to proceed (or whether it even is a good idea to do that myself, given the fact that I have zero experience with Android ROMs development), possibly a step-by-step guide on what to do.
The question is, do I just find drivers for hardware components present in the device (usb hub, ethernet, etc.) and just somehow "link" those to existing sources (of AOSP) and just run the build with different parameters? Or do I need to build a whole new kernel for the given device-OS combination?
Thank you for any advice or opinion!
Well this is an interesting one. There are several routes you can take here.
If you have the kernel source code, and the source code for the drivers, you could probably build the kernel from source and use it to boot Android, however, as that's unlikely, you're looking at a more regular porting process, which usually consists of pulling the vendor blobs from the existing Android system, building AOSP/Lineage with those blobs involved, and hacking together a new ramdisk that HOPEFULLY will be compatible. It's a very long and very tedious process, but it's certainly possible.
From that you'll then get in to the debugging stage of finding out what works out of the box, you'll very well need to make changes to AOSP for it to work on that SoC.
abtekk said:
Well this is an interesting one. There are several routes you can take here.
If you have the kernel source code, and the source code for the drivers, you could probably build the kernel from source and use it to boot Android, however, as that's unlikely, you're looking at a more regular porting process, which usually consists of pulling the vendor blobs from the existing Android system, building AOSP/Lineage with those blobs involved, and hacking together a new ramdisk that HOPEFULLY will be compatible. It's a very long and very tedious process, but it's certainly possible.
From that you'll then get in to the debugging stage of finding out what works out of the box, you'll very well need to make changes to AOSP for it to work on that SoC.
Click to expand...
Click to collapse
Thanks for pointing in the right (or at least some) direction! I found some guide on porting ROMs which I followed, basically like you said. So I just replaced some files in System image. Will flash later today, so maybe I will get some results!
abtekk said:
From that you'll then get in to the debugging stage of finding out what works out of the box, you'll very well need to make changes to AOSP for it to work on that SoC.
Click to expand...
Click to collapse
So I was following this tutorial, although found some irregularities, let's say: For example, none of those 2 folders contained init.d/ directory, thus I didn't update it. Also, I haven't found META-INF folder therefore haven't updated updater-script.
Basically, when I did (or at least what I think I was doing was that I took /system partition from our current ROM, that is working on that custom device and replaced stuff in there by stuff from the new system I wanted to port. My idea from what I've read was that i took kernel (and boot/recovery) from the original, working ROM and "injected" the new system onto it. Is that correct? Is that what I needed to do? Because the problem is, I cannot boot into the system (might as well be because of Kernel version, because I am trying to port Android 6 on Kernel 3.10. which was used in the current ROM running Android 5). It looks like the device is stuck in bootloader, or "somehow doesn't know what to start" (sorry, I can't put it better), displaying only my device's logo.
When I connect it to the computer via USB cable, running adb devices shows me that device, but when I try to access shell using adb shell I got error saying that /system/bin/sh wasn't found, which made me thinking that somehow the /system partition isn't "linked" properly, like I stated in the beginning.
Was I doing everything correctly? Do I need to do something above that? (maybe do you know about some tutorial). I am trying to port AOSP 6 Android.
Thank you!
I would like to patch wpa_supplicant on my Beelink W95 that is susceptible to the KRACK WPA2 WiFi exploit.
I tested the W95 with vanhoefm/krackattacks-scripts (look on github, can't post links) and it failed the first test. I would like to patch wpa_supplicant so I can proceed with the other tests.. Except I'm not sure how to do this.
I've compiled programs for Linux and I've used Android studio. I'm really not sure how to cross compile from Linux to android and I don't think I need the full blown Android studio experience.
Are there any good guides to compiling just individual command line programs. I know I'd have to get the source, then do .configure then make, what I'd like some clarity on is if I need specific source from the device manufacturer or can I just use vanilla android code. Further, what options does make take, and basically what do I need to know so I can just compile wpa_supplicant with the patches I need to apply.
Thank you
Progress...
I decided that the first step should be to compile a generic wpa_supplicant and not worry about patches or security updates or anything like that. In order to do that, I had to compile openssl and libnl libraries. I went through a lot of versions of all three because I would always run into some problem or another. After a lot of trial and error (and some learning) I managed to successfully compile wpa_supplicant for the W95 box.
Yet I'm stuck. I can run wpa_supplicant from adb shell but I have not been able to successfully associate with an access point. I figured this might be some sort of conflict with Network or WiFi manager and two wpa_supplicants running at the same time. I wanted to successfully associate before I continued on to try and replace the wpa_supplicant on the Android box with my compiled version. My problem here was that I could not figure out how to enable wlan0 without network manager. In any case I got desperate and punted. I went ahead and tried to replace the original wpa_supplicant with the one that I compiled. Now everything's a mess.
Now that I think about it, I could probably enable the ssv6051 wifi driver module and bring up wlan0 with ifconfig or ip but did I know that back then? No.
Since I did already try and replace wpa_supplicant with my compilation I figured all bets were off. In any case, I could always copy back the original wpa_supplicant right? Well, not exactly. At this time, neither one works and I'm racking my brains just trying to get things back to square one. I get a vague error about not being able to start HAL. I read some about HAL and a possible culprit, selinux (although this is unlikely due to the w95 box being in Permissive mode by default) but I still am not anywhere closer to fixing my wifi. The button moves on temporarily, the driver modules load, but the HAL error occurs and it does not list any wifi networks.
I think I messed up when I edited one of the wpa_supplicant.conf files. Or it could have something to do with the wifi vendor. I don't know, but I'm close to getting this working. Then I can patch wpa_supplicant and it will no longer be vulnerable to the KRACK attack. At the very least I can continue the other tests.
Thank you for reading. Your input is appreciated.
Hi I am new to kernel tweaking. I am trying to compile the kernel for Xiaomi redmi 5a for latest miui stock rom from source located at
https://github.com/MiCode/Xiaomi_Kernel_OpenSource/tree/riva-o-oss
After flashing the boot image created with compiled kernel , everything except wifi works.
Google search revealed that it is a common issue and one suggestion is to put the wil6210.ko (wifi related) file from compiled kernel in to system/lib/modules which doesn't work.
What confuses me even more is that even in if I delete the wil6210.ko from system/lib/module when the stock kernel is running , the wifi still works . It Seems like this kernel module has no effect on wifi.
But deleting the vendor/lib/modules/pronto/pronto_wlan.ko breaks wifi for stock kernel that came with the rom.
But compiling the kernel from source doesn't generate such files.
one related info at https://github.com/Genom-Project/android_kernel_xiaomi_vince-3.18/issues/2
I found a guide at https://github.com/MiCode/Xiaomi_Ke...#download-qualcomm-android-enablement-project that talks about wifi module.
The download seems to be to big and maybe too many unnecessary files will be downloaded. Tried to init and sync the repo. It seems huge. So if nothing else works will try this.
https://github.com/supercairos/android_device_xiaomi_land/issues/1#issuecomment-259458071 seems to provide a shortcut technique. It asks to download the prima folder from https://source.codeaurora.org/quic/...opensource/wlan/prima/tree/?h=LA.UM.5.3_rb1.1 (I can replace the h value to my kernels tag) , merge it into the source and then compile it to generate the prima_wlan.ko . I did so and also added CONFIG_PRONTO_WLAN=m ( m to compile as module) but such file is not being generated after compiling.
So please, if anyone went through something similar , help me with your recommendations.,
try lineage os aarch64 cumpiler and try prima wlan driver
u can use this https://github.com/baunilla/android...mmit/b7e6d4e6aed50d8ae652f292235be1398be5f344