[Issue] Omni 4.4 wifi can't find network - Omni Q&A

Hey guys,
I finally built omni 4.4 for Gtab2 10.1
My wifi is turned On, but can't find any network.
I used latest blobs from samsung stock rom 4.2.2 to be sure.
logcat:
http://pastebin.com/xm6un9Tg
During the build process i faced an error :
Code:
out/target/common/obj/APPS/framework-res_intermediates/src/com/android/internal/R.java
out/target/common/obj/APPS/framework-res_intermediates/src/android/R.java
expected "}"
public static final class string-array{ }
^
this is not the exact error code but it was almost this.
To bypass this error i just comented both class, i wonder if this can be related?
thanks

I'd suggest looking at other device bringup commits first.
4.4 requires wifi configuration changes and storage configuration changes.

Entropy512 said:
I'd suggest looking at other device bringup commits first.
4.4 requires wifi configuration changes and storage configuration changes.
Click to expand...
Click to collapse
mmhh still no luck.
I don't have any error message in logcat now but still scanning for network and can't find any.
I based my change on aries bring up commit.
Now my ext sdcard work if i'm root, i may need to change some permission in fstab,
and i add edit this line in init.espresso10.rc
Code:
service wpa_supplicant /system/bin/wpa_supplicant \
-Dnl80211 -iwlan0 -e/data/misc/wifi/entropy.bin [email protected]:wpa_wlan0 \
-c/data/misc/wifi/wpa_supplicant.conf -O/data/misc/wifi/sockets
and if I try to add an ssid by hand i got this error in logcat:
Code:
E/WifiConfigStore( 441): failed to set SSID: "mywifi"
E/WifiConfigStore( 441): Failed to set a network variable, removed network: 0
E/WifiStateMachine( 441): Failed to save network
thanks.

Did you add it, or change the one that was already there?

Entropy512 said:
Did you add it, or change the one that was already there?
Click to expand...
Click to collapse
I add it to try, there is no wifi network, it loop on "searching network"

I wonder if my error can be related to what i said earlier
sevenup30 said:
During the build process i faced an error :
Code:
out/target/common/obj/APPS/framework-res_intermediates/src/com/android/internal/R.java
out/target/common/obj/APPS/framework-res_intermediates/src/android/R.java
expected "{"
public static final class string-array{ }
^
this is not the exact error code but it was almost this.
To bypass this error i just comented both class, i wonder if this can be related?
thanks
Click to expand...
Click to collapse
Do you face this error while building omni? can it be because of my java version? i'm on java 6

finally got it working, it was related in init conf file like you said.
Does someone just know how can I disable hardwar keyboard at first boot?
Because of that keyboard never show up so i have to skip the first settings and disable it in language & input.

sevenup30 said:
finally got it working, it was related in init conf file like you said.
Click to expand...
Click to collapse
Could you precise which mod you did in init conf file ?
Because I've the same problem with a build for Acer A200 : loop on AP scan, no results, no possibilities to configure an AP manually....
Thanks

sevenup30 said:
finally got it working, it was related in init conf file like you said.
Does someone just know how can I disable hardwar keyboard at first boot?
Because of that keyboard never show up so i have to skip the first settings and disable it in language & input.
Click to expand...
Click to collapse
Fix or remove the broken kernel driver that's reporting a keyboard as being present when it's not.
Another possibility is you're missing KL/IDC files for some input device that is being treated as a hardware keyboard when it's not. (See the galaxys2-common family - the sii9234 or whatever it is IDC file was needed to keep that input device from being detected as a HW keyboard)

Related

KK 4.4 !! [Solved] Wifi Regional problem with sim card inserted

For 4.4 goto 2'nd post
This is for JB 4.3.1
If you like me have the problem of : ( wifi + sim_card ) = wifi not working
here is the fix : credits to HTCZ715E
http://forum.xda-developers.com/showthread.php?t=2368501
but just 1 more step , after making the new "telephony-common.jar" and adb push , and chmod 644
you HAVE TO wipe dalvik+cache
without wipe dalvik+cache it never worked for me.
HTC MyTouch 4G
[ROM] CM-10.2 | AOSP 4.3 Jellybean [KANG] [Oct-11]
cm-10.2-20131011-Albinoman887-glacier
Well heads up to the android 4.4
non of the previous solutions is not working :crying:
today i tried ROM Legacy Carbon 4.4
so i started to use my knowledge about cracking from the old MS-dos ages !!!!!!!!! and i cracked the bcmdhd.ko file
using IDA dissembler and HexEdit the bcmdhd.ko file.
Now wifi works again. :good:
The problem is that , in this method i cannot provide a universal file and you have to make your own cracked driver ".ko" file.
Or the developers of each Rom should use the working source code for the wifi driver which has the complete support for all languages.
refer to this post:
http://forum.xda-developers.com/showthread.php?t=1077329
and also here are some lines from logcat (i changed my mcc , mnc and country to XX ) with the cracked driver.
(i prefer to use cracking instead of patching because it was previously we called it)
Code:
D/Tethering( 1874): Exception adding default nw to upstreamIfaceTypes: java.lang.NullPointerException
E/wpa_supplicant( 2047): wpa_driver_nl80211_driver_cmd: failed to issue private commands
E/WifiStateMachine( 1874): Failed to set country code XX
D/MccTable( 2051): updateMccMncConfiguration: mcc=XXX, mnc=XX
D/MccTable( 2051): getLocaleFromMcc to null_ir mcc=XXX
D/MccTable( 2051): getLocaleForLanguageCountry: skipping no language
D/MccTable( 2051): WIFI_COUNTRY_CODE set to ir
I/WifiService( 1874): WifiService trying to set country code to XX with persist set to true
D/MccTable( 2051): updateMccMncConfiguration updateConfig config={1.0 XXXmccXXmnc ?locale ?layoutDir ?swdp ?wdp ?hdp ?density ?lsize ?long ?orien ?uimode ?night ?touch ?keyb/?/? ?nav/? themeResource=null}
I/ActivityManager( 1874): Config changes=3 {1.0 XXXmccXXmnc en_US ldltr sw384dp w384dp h615dp 200dpi nrml long port finger -keyb/v/h tball/v s.6 themeResource=null}
The whole problem started from the "wldev_set_country" function in "C" code in a ".h" file of wifi driver.
i don't have the knowledge to manipulate the source code of the wifi driver and compile compile the ".ko" file.
This method is not for pplz who don't know about reverse engineering.
So i opened the "bcmdhd.ko" in IDA disassembler and select the ARM Architecture.
Then searched for the "wldev_set_country" function and in the disassembled code there is some Branches which should be re-routed.
for example: (these are the OP-Codes of ARM cpu)
BNE loc_206E4 in the hex view window "08-00-00-0A"
BNE = Branch if not Equal , (and must have to change to just Branch no matter what is the result of compare )
0A = BNE
EA = B (Branch)
AA = BGE (Branch if Greater or Equal)
..... and etc
The important thing is that in IDA hex-view for examaple it shows : 000206BC 08 00 00 1A
but at the bottom of window it shows: 000206F0 <= this is the address which u needs to find and change in your hex-ediotor
and in hex editor we will change that 1A to 0A
The whole process i re-route 4 branches to get success.
Also i've checked it , and there is no need to appliy the previous patch "telephony-common.jar"
Only the bcmdhd.ko driver needs to patch
I attached the cracked version of my bcmdhd.ko file.
you can try it , BUT IT MAY NOT FOR YOUR COUNTRY AND/OR YOUR SIM CARD and for sure it only works in some Roms
this is the driver version from dmesg
Dongle Host Driver, version 5.90.195.114
Compiled in drivers/net/wireless/bcmdhd on Nov 18 2013 at 17:0
Click to expand...
Click to collapse
i made the attachment for this Rom
[ROM][UNOFFICIAL] LegacyCarbon 4.4 \\ 18.11.2013 \\ Built From Source
you should unzip it and use "adb push" and "chmod 644 "
Code:
adb root
adb push bcmdhd.ko /system/lib/modules/
adb shell
su
cd /system/lib/modules/
chmod 644 bcmdhd.ko
and reboot
----------------------------------------------
HTC MyTouch 4G
[ROM][UNOFFICIAL] LegacyCarbon 4.4 \\ 18.11.2013 \\
I test this file on [ROM][Official][4.4] Evervolv Nightlies
It's compatible And works 100% :good:
BobZombiE said:
I test this file on [ROM][Official][4.4] Evervolv Nightlies
It's compatible And works 100% :good:
Click to expand...
Click to collapse
Did you use it? Bug important? I want to know some information. Thanks!
Sure , i'm using this patched driver almost on all Roms i'm testing and never had any wifi problems.
Sent from my myTouch 4G using xda app-developers app
BobZombiE said:
I test this file on [ROM][Official][4.4] Evervolv Nightlies
It's compatible And works 100% :good:
Click to expand...
Click to collapse
Camera, cam recording, and Browser? What any problem?
If I want back Rom 4.3 after install 4.4. Can I back?!
Thank so much your infomation!
hdhthed said:
Camera, cam recording, and Browser? What any problem?
If I want back Rom 4.3 after install 4.4. Can I back?!
Thank so much your infomation!
Click to expand...
Click to collapse
go to the related thread and take a look , or make a nandroid backup and try.
anyway:
Evervolv 4.0: at this moment: Camera does not work at all . but stock browser is ok :good:
Carbon 4.4 Rom : at this moment : Camera & Cam recording is ok. but stock browser does not work. u have to use other browsers like firefox
Yea! Make a nandroid backup ,after I can restore in Recovery. Have lost root?
hdhthed said:
Yea! Make a nandroid backup ,after I can restore in Recovery. Have lost root?
Click to expand...
Click to collapse
i don't think so
BobZombiE said:
i don't think so
Click to expand...
Click to collapse
Mean? You think lose root or cant restore a backup nandroid ?
hdhthed said:
Mean? You think lose root or cant restore a backup nandroid ?
Click to expand...
Click to collapse
i'm root and s=off , HBOOT 75
and flashed, backed up, restored my phone more than 100 times last week . and never lost root
This is my old phone... Fun to be back here.
I am asking about this modified driver. I need to find out first if my phone uses this driver (looks like a broadcom driver), but if it is, I am going to try it.
My question to the author is: do the changes you made make this driver location agnostic? Because you changed the BNE, to just branch, it seems that you are allowing it to function regardless of the country (in the MMC).
I have an HTC One running 4.4 and my issue is that I really need to use channel 13. My router is set to 13, but no matter what changes I make to the wi-fi region encoding (the region encoding change is successful), I still am limited to only channels 1 to 11.
So I just thought I'd ask to get your input on this...
Thanks,
Paul
help me solve my wifi issue
BobZombiE said:
For 4.4 goto 2'nd post
This is for JB 4.3.1
If you like me have the problem of : ( wifi + sim_card ) = wifi not working
here is the fix : credits to HTCZ715E
http://forum.xda-developers.com/showthread.php?t=2368501
but just 1 more step , after making the new "telephony-common.jar" and adb push , and chmod 644
you HAVE TO wipe dalvik+cache
without wipe dalvik+cache it never worked for me.
HTC MyTouch 4G
[ROM] CM-10.2 | AOSP 4.3 Jellybean [KANG] [Oct-11]
cm-10.2-20131011-Albinoman887-glacier
Click to expand...
Click to collapse
Hey guys ... I'am a normal user having sony xperia ion Lt28h .... I've just flashed CM11 unofficial rom but I have a wifi problem ..... can you teach me how to solve my regional wifi issue as I am in syria and have faced this problem earlier so i know it's a regional problem ..... thx for help

bugs with SHV-E210K build (i9300 variant)

I have Omni booting and running on a E210K (It is a SGS3 Korean variant, only changes are LTE, 2GB and DMB antenna), but some major bugs need fixing. There not much if any device trees for these out there so I have just been modifying the i9300 and it works.
These are probably the major two issues I have for now:
1. without manually adding ro.zygote.disable_gl_preload=1 to the build prop, it won't boot. I noticed this line wasn't in the i9300 builds either, but it's definitely referenced in my builds:
/android/omni/device/samsung/smdk4412-common/common.mk
# Set default USB interface
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
persist.sys.usb.config=mtp \
ro.zygote.disable_gl_preload=true
Click to expand...
Click to collapse
2. Can't adjust the vibration in advanced settings, when I do I get the logcat message below, there is no (very light) feedback because it seems the value is set very low.
If I manually edit the values (by putting it up to 10+) I can get feedback, so it is working.
Code:
I/ActivityManager( 2466): Displayed org.omnirom.device/.DeviceSettings: +428ms
W/DeviceSettings_Utils_Read( 5375): file /sys/vibrator/pwm_val: 2
W/DeviceSettings_Utils( 5375): file /sys/vibrator/pwm_val not found: java.io.FileNotFoundException: /sys/vibrator/pwm_val: open failed: EACCES (Permission denied)
W/DeviceSettings_Haptic( 5375): key: vibrator_tuning
but I have no idea where/how to proceed.
My device tree is up over at:
https://github.com/kaijura/android_device_samsung_e210k
I am using the same omni sources for smdk4412-common and kernel.
Thanks in advance
kaijura said:
I have Omni booting and running on a E210K (It is a SGS3 Korean variant, only changes are LTE, 2GB and DMB antenna), but some major bugs need fixing. There not much if any device trees for these out there so I have just been modifying the i9300 and it works.
These are probably the major two issues I have for now:
1. without manually adding ro.zygote.disable_gl_preload=1 to the build prop, it won't boot. I noticed this line wasn't in the i9300 builds either, but it's definitely referenced in my builds:
2. Can't adjust the vibration in advanced settings, when I do I get the logcat message below, there is no (very light) feedback because it seems the value is set very low.
If I manually edit the values (by putting it up to 10+) I can get feedback, so it is working.
Code:
I/ActivityManager( 2466): Displayed org.omnirom.device/.DeviceSettings: +428ms
W/DeviceSettings_Utils_Read( 5375): file /sys/vibrator/pwm_val: 2
W/DeviceSettings_Utils( 5375): file /sys/vibrator/pwm_val not found: java.io.FileNotFoundException: /sys/vibrator/pwm_val: open failed: EACCES (Permission denied)
W/DeviceSettings_Haptic( 5375): key: vibrator_tuning
but I have no idea where/how to proceed.
My device tree is up over at:
https://github.com/kaijura/android_device_samsung_e210k
I am using the same omni sources for smdk4412-common and kernel.
Thanks in advance
Click to expand...
Click to collapse
LTE screams "qcom modem" to me - perhaps look at the i9305 tree?
Figured it out, for anyone searching for this problem - the issue has to do with the ramdisk portion of a (custom) kernel as it wasn't matching up omni's init setups.
Entropy512 said:
LTE screams "qcom modem" to me - perhaps look at the i9305 tree?
Click to expand...
Click to collapse
Tried a i9305 build it was a little worse off (no mobile connection), haha. I'm thinking of submitting for an official build after I figure out the build for a working stock omni kernel.
Since this device gets few attention (maybe less than 50 in the sgs3 forum) is it possible that you guys could set the jenkins buildbot to build like every week or other week?
kaijura said:
Figured it out, for anyone searching for this problem - the issue has to do with the ramdisk portion of a (custom) kernel as it wasn't matching up omni's init setups.
Tried a i9305 build it was a little worse off (no mobile connection), haha. I'm thinking of submitting for an official build after I figure out the build for a working stock omni kernel.
Since this device gets few attention (maybe less than 50 in the sgs3 forum) is it possible that you guys could set the jenkins buildbot to build like every week or other week?
Click to expand...
Click to collapse
Hmm, that might be a possibility...
kaijura said:
I have Omni booting and running on a E210K (It is a SGS3 Korean variant, only changes are LTE, 2GB and DMB antenna), but some major bugs need fixing. There not much if any device trees for these out there so I have just been modifying the i9300 and it works.
These are probably the major two issues I have for now:
1. without manually adding ro.zygote.disable_gl_preload=1 to the build prop, it won't boot. I noticed this line wasn't in the i9300 builds either, but it's definitely referenced in my builds:
2. Can't adjust the vibration in advanced settings, when I do I get the logcat message below, there is no (very light) feedback because it seems the value is set very low.
If I manually edit the values (by putting it up to 10+) I can get feedback, so it is working.
Code:
I/ActivityManager( 2466): Displayed org.omnirom.device/.DeviceSettings: +428ms
W/DeviceSettings_Utils_Read( 5375): file /sys/vibrator/pwm_val: 2
W/DeviceSettings_Utils( 5375): file /sys/vibrator/pwm_val not found: java.io.FileNotFoundException: /sys/vibrator/pwm_val: open failed: EACCES (Permission denied)
W/DeviceSettings_Haptic( 5375): key: vibrator_tuning
but I have no idea where/how to proceed.
My device tree is up over at:
https://github.com/kaijura/android_device_samsung_e210k
I am using the same omni sources for smdk4412-common and kernel.
Thanks in advance
Click to expand...
Click to collapse
This says u r building a rom.Is it working fine?
thanks

WiFi monitor mode

OK, I don't think this thread will get any attention, but I want to document it anyway. All this should work on other devices with qcom WiFi drivers.
TL;DR:
Grab iwpriv binary somewhere (i've got my here: https://github.com/kriswebdev/android_wireless_tools/tree/master/bin)
adb push iwpriv /data/local/tmp/
adb shell su -c chmod +x /data/local/tmp/iwpriv
Code:
#!/system/bin/sh
ip link set wlan0 down
sleep 1
echo 4 > /sys/module/wlan/parameters/con_mode
sleep 2
ip link set wlan0 up
/data/local/tmp/iwpriv wlan0 monitor 1
/data/local/tmp/iwpriv wlan0 MonitorModeConf 9 40 1 111 0
And enjoy your airodump output
NO PACKET INJECTION! (stubbed out in driver, removed previously?)
If you don't receive any packets, issue "/data/local/tmp/iwpriv wlan0 monitor 1" again.
How does this all work?
Some time ago I discovered these strings in wlan_hal_msg.h: (they appeared in google):
Code:
...
/* Monitor Mode */
WLAN_HAL_ENABLE_MONITOR_MODE_REQ = 302,
WLAN_HAL_ENABLE_MONITOR_MODE_RSP = 303,
WLAN_HAL_DISABLE_MONITOR_MODE_REQ = 304,
WLAN_HAL_DISABLE_MONITOR_MODE_RSP = 305,
...
Then I unscrambled some indirections:
WLAN_HAL_ENABLE_MONITOR_MODE_REQ to WDI_MON_START_REQ in WDI_2_HAL_REQ_TYPE
WDI_MON_START_REQ sent in WDI_ProcessMonStartReq <— actual message sents here!
Called from "Request Processing Array" in function WDI_MonStartReq
Wrapped in WDA_ProcessMonStartReq, which is called in WDA_McProcessMsg by message WDA_MON_START_REQ
Which message is posted by wlan_hdd_mon_postMsg if (MON_MODE_START == pMonCtx->state)
Which is called in __iw_setint_getnone with sub_cmd = WE_SET_MONITOR_STATE
Which is set by iw_priv cmd "monitor"
And then figured out that driver works in different modes:
(vos_types.h)
Code:
/// Concurrency role. These are generic IDs that identify the various roles
/// in the software system.
typedef enum
{ /*ON linux maintain 1-1 corespondence with device_mode_t in hdd*/
VOS_STA_MODE=0,
VOS_STA_SAP_MODE=1, //to support softAp mode . This is misleading. It means AP MODE only.
//The constant name has historical reason
VOS_P2P_CLIENT_MODE,
VOS_P2P_GO_MODE,
VOS_MONITOR_MODE,
VOS_FTM_MODE = 5,
VOS_IBSS_MODE,
VOS_P2P_DEVICE,
VOS_MAX_NO_OF_MODE
} tVOS_CON_MODE;
Mode can be changed by "con_mode" module parameter.
(idk why they reinvented the wheel and not used the default "iw dev wlan0 set mode monitor")
Combined all this and... got a kernel panic. You may get it too. Main reasons are:
- You have not disabled WiFi before changing the mode
- The sleep time after disabling interface is short
- Driver is old. Yes, you can get crashes on some kernels. If you are, flash AGNi.
After successful switching you'll get a working monitor (check this with tcpdump -i wlan0), but with ethernet packets instead of radiotap, so airodump will not work. Luckily, this giant crappy driver can work with radiotap, but you need to configure it. This is done by another iwpriv call:
MonitorModeConf: <channel> <bandwidth> <crccheck> <filter> <conversion_required>
Filter: 3 decimal numbers
least to most: management packets, control packets, data packets
Conversion: 1 - ARPHRD_ETHER (802.3 packets), 0 - ARPHRD_IEEE80211_RADIOTAP (802.11 packets)
(again don't know why they implemented these calls instead of default ioctl's for channel switch, etc. This makes airodump unable to switch channels)
As a result you may get something like on a screenshot
Happy sniffing!
Who said it will not be an interesting , I my self appreciated your effort to bring this up. Kudos to you friend.
Crayvolt said:
Who said it will not be an interesting , I my self appreciated your effort to bring this up. Kudos to you friend.
Click to expand...
Click to collapse
Thanks. I wanted to say that kenzo development is almost dead, we've lost official LOS and keep losing devs.... So it's most likely we'll not see working packet injection (cuz devs who know driver's internals better than me are left), and, possibly, a wrapper library implementing the default ioctl's (like channel switch) used in most programs.
i understand, hopefully we can have new devs. who will continue
This is a perfect news. At least if this device became obsolete, it should still be useful to be a portable linux pen test device, if possible. Anyway, awesome job mate. Very much appreciated
Sent from my Note 3 using XDA Labs
you dont have permission to capture on that device sokect operation not permitted
aldhi said:
This is a perfect news. At least if this device became obsolete, it should still be useful to be a portable linux pen test device, if possible. Anyway, awesome job mate. Very much appreciated
Sent from my Note 3 using XDA Labs
Click to expand...
Click to collapse
Thank you. I forgot to say that monitor mode requiers support from firmware (there's some code in driver that checks for it). Kenzo guys are lucky because we have it enabled . There's also sta+monitor mode (so you can have working wifi connection while sniffing), but it also requiers support from firmware and kenzo's fw compiled without it. I forgot how to enable it, but i think you need to issue "iwpriv wlan0 monitor 1" in default con_mode and check dmesg - there will be a string that says it's not supported (if it is not).
And if someone is interested, our wireless chip is wcn3680b, simmilar one (or same, idk) can be found in nexus 4 (mako)
cerg2010cerg2010 said:
Thank you. I forgot to say that monitor mode requiers support from firmware (there's some code in driver that checks for it). Kenzo guys are lucky because we have it enabled . There's also sta+monitor mode (so you can have working wifi connection while sniffing), but it also requiers support from firmware and kenzo's fw compiled without it. I forgot how to enable it, but i think you need to issue "iwpriv wlan0 monitor 1" in default con_mode and check dmesg - there will be a string that says it's not supported (if it is not).
And if someone is interested, our wireless chip is wcn3680b, simmilar one (or same, idk) can be found in nexus 4 (mako)
Click to expand...
Click to collapse
Can you ziping code and flashable instal on twrp?
Khimin said:
Can you ziping code and flashable instal on twrp?
Click to expand...
Click to collapse
There's nothing to install except iwpriv binary... But OK, I'll try to create a magisk module with enable/disable scripts.
cerg2010cerg2010 said:
There's nothing to install except iwpriv binary... But OK, I'll try to create a magisk module with enable/disable scripts.
Click to expand...
Click to collapse
Thx, im waiting
Khimin said:
Thx, im waiting
Click to expand...
Click to collapse
Ok, I made it quickly!
Source: https://github.com/cerg2010cerg2010/qcmon
There's 2 scripts, run them from shell:
monen - enables monitor mode (you can specify configuration in the parameters, see system/xbin/monen)
mondis - disables monitor mode. You can use your wifi connection again.
cerg2010cerg2010 said:
Ok, I made it quickly!
Source: https://github.com/cerg2010cerg2010/qcmon
There's 2 scripts, run them from shell:
monen - enables monitor mode (you can specify configuration in the parameters, see system/xbin/monen)
mondis - disables monitor mode. You can use your wifi connection again.
Click to expand...
Click to collapse
Thx dude
thank you you are awsome +thumbsup
---------- Post added at 08:49 AM ---------- Previous post was at 08:03 AM ----------
filter expresion syntax error using command tcpdump -i wlan0
help please
---------- Post added at 09:05 AM ---------- Previous post was at 08:49 AM ----------
can you help me?
cerg2010cerg2010 said:
Ok, I made it quickly!
Source: https://github.com/cerg2010cerg2010/qcmon
There's 2 scripts, run them from shell:
monen - enables monitor mode (you can specify configuration in the parameters, see system/xbin/monen)
mondis - disables monitor mode. You can use your wifi connection again.
Click to expand...
Click to collapse
Is it safe to flash with magisk in note 5 pro ?
cerg2010cerg2010 said:
Ok, I made it quickly!
Source: https://github.com/cerg2010cerg2010/qcmon
There's 2 scripts, run them from shell:
monen - enables monitor mode (you can specify configuration in the parameters, see system/xbin/monen)
mondis - disables monitor mode. You can use your wifi connection again.
Click to expand...
Click to collapse
@cerg2010 Tried to flash with magisk in note 5 pro. System apps are not working after disabling the module from magisk it returned to normal. Any solution for this ?
Perinban Parameshwaran said:
@cerg2010 Tried to flash with magisk in note 5 pro. System apps are not working after disabling the module from magisk it returned to normal. Any solution for this ?
Click to expand...
Click to collapse
Please understand that I don't have any "note 5 pro". You can send me logcat and I can try to identify the problem or ask your ROM developer to take a look (if it's not MIUI lol). Anyway, that's just scripts, so you can copy them to /data/local/tmp or /system/bin manually.
Lol I'm a n00b what does this do? Is this a packet sniffer or something?
Op_Flashpoint said:
Lol I'm a n00b what does this do? Is this a packet sniffer or something?
Click to expand...
Click to collapse
Sort of. It makes your sniffer to work - you will be able to capture raw WiFi packets from your device without any dongles.
plis whats rom u use ¿
cerg2010cerg2010 said:
Ok, I made it quickly!
Source: https://github.com/cerg2010cerg2010/qcmon
There's 2 scripts, run them from shell:
monen - enables monitor mode (you can specify configuration in the parameters, see system/xbin/monen)
mondis - disables monitor mode. You can use your wifi connection again.
Click to expand...
Click to collapse
thank you man, monitor mode now working on my poco F1, using its module magisk + aircrack-ng

Guide to port to Lineage-16.0

Hello,
I am interested in trying to port sumire to Lineage 16.0, the problem is I couldn't find any guide that seemed to help me get started.
In IRC someone told me I had to:
1. Fork the cm-14.1 branch to lineage-16.0, change the required config files, and build in a 16.0 build env.
2. Wait for it to error out, fix error, repeat. Eventually once it builds, attempt booting, check logs to see why it isn't booting, fix error, repeat.
But as you can see, its not much.
I have been taking a look into the first commits for sumire on cm-14.1, https://github.com/LineageOS/androi...mmit/7be9d2e5edf6f7ea1f399febbeee9d9fbdc122e1
But I do not know if its the best way to learn.
Where could I find some guides?
Best regards
algui91 said:
Hello,
I am interested in trying to port sumire to Lineage 16.0, the problem is I couldn't find any guide that seemed to help me get started.
In IRC someone told me I had to:
1. Fork the cm-14.1 branch to lineage-16.0, change the required config files, and build in a 16.0 build env.
2. Wait for it to error out, fix error, repeat. Eventually once it builds, attempt booting, check logs to see why it isn't booting, fix error, repeat.
But as you can see, its not much.
I have been taking a look into the first commits for sumire on cm-14.1, https://github.com/LineageOS/androi...mmit/7be9d2e5edf6f7ea1f399febbeee9d9fbdc122e1
But I do not know if its the best way to learn.
Where could I find some guides?
Best regards
Click to expand...
Click to collapse
It's not really a guide, but the guy in this thread tried to port LOS 15 to the Z5, so it's probably the best place to start. He ran into issues with the camera so take a look at the last few pages too see what's going on. The people in that thread are willing to help.
https://forum.xda-developers.com/z5...erimental-lineageos-15-1-z5c-suzuran-t3894617
Devo7v said:
It's not really a guide, but the guy in this thread tried to port LOS 15 to the Z5, so it's probably the best place to start. He ran into issues with the camera so take a look at the last few pages too see what's going on. The people in that thread are willing to help.
https://forum.xda-developers.com/z5...erimental-lineageos-15-1-z5c-suzuran-t3894617
Click to expand...
Click to collapse
Thanks, although its not for the same device (Mine is sumire) it may be helpful.
I have also found this guide, it seems interesting:
https://fat-tire.github.io/porting-intro.html
algui91 said:
Thanks, although its not for the same device (Mine is sumire) it may be helpful.
I have also found this guide, it seems interesting:
https://fat-tire.github.io/porting-intro.html
Click to expand...
Click to collapse
Is there any progress at porting LOS 16?
BrazzerHead said:
Is there any progress at porting LOS 16?
Click to expand...
Click to collapse
I'm still on it. Advancing slowly as I am a newbie on this and only have a few hours/week to do it.
I will keep you updated
I have successfully come to execute brunch sumire, but I am having problems with open jdk-9:
Code:
/run/media/hkr/BackUp/out/soong/make_vars-lineage_sumire.mk:644: warning: JAVAC does not match between Make and Soong:
/run/media/hkr/BackUp/out/soong/make_vars-lineage_sumire.mk:644: warning: Make : /home/hkr/.gentoo/java-config-2/current-user-vm/bin/javac
/run/media/hkr/BackUp/out/soong/make_vars-lineage_sumire.mk:644: warning: Soong: prebuilts/jdk/jdk9/linux-x86/bin/javac
/run/media/hkr/BackUp/out/soong/make_vars-lineage_sumire.mk:1044: error: Soong variable check failed.
I have copied the prebuild version of java that comes with android into my own local version in gentoo, but still getting the same error.
Any ideas?
I have set up android_device_sony_sumire from sony-msm8994 in the included .repo/local_manifest. Setting ROOMSERVICE_BRANCHES=cm-14 as it functions as a fallback branch was suggested in the console output while i was getting familiar and this is a helpful feature worth noting.
There is an incompatibility in https://github.com/sony-msm8994/android_device_sony_sumire and kitakami-common, the lineage.dependencies file needs to be moved or it will try and download dependencies for the sumire files from the LineageOS Github (http://github.com/LineageOS). Next there are two easy defines, SND_AUDIOCODEC_ALAC and SND_AUDIOCODEC_APE to deal with before an untimely error because of a typo present in the Xperia kernel, content_interprtation_type instead of content_interpretation_type.
Code:
hardware/qcom/media-caf/msm8994/mm-video-v4l2/vidc/vdec/src/omx_vdec_msm8974.cpp:9377:60: error: no member named 'content_interprtation_type' in 'msm_vidc_s3d_frame_packing_payload'; did you mean 'content_interpretation_type'?
if (s3d_frame_packing_payload->content_interprtation_type == 1)
^~~~~~~~~~~~~~~~~~~~~~~~~~
content_interpretation_type
out/target/product/sumire/obj/KERNEL_OBJ/usr/include/media/msm_vidc.h:109:15: note: 'content_interpretation_type' declared here
unsigned int content_interpretation_type;
^
hardware/qcom/media-caf/msm8994/mm-video-v4l2/vidc/vdec/src/omx_vdec_msm8974.cpp:9379:65: error: no member named 'content_interprtation_type' in 'msm_vidc_s3d_frame_packing_payload'; did you mean 'content_interpretation_type'?
else if (s3d_frame_packing_payload->content_interprtation_type == 2)
^~~~~~~~~~~~~~~~~~~~~~~~~~
content_interpretation_type
out/target/product/sumire/obj/KERNEL_OBJ/usr/include/media/msm_vidc.h:109:15: note: 'content_interpretation_type' declared here
unsigned int content_interpretation_type;
^
hardware/qcom/media-caf/msm8994/mm-video-v4l2/vidc/vdec/src/omx_vdec_msm8974.cpp:9394:89: error: no member named 'content_interprtation_type' in 'msm_vidc_s3d_frame_packing_payload'; did you mean 'content_interpretation_type'?
s3d_frame_packing_payload->fpa_type, s3d_frame_packing_payload->content_interprtation_type, stereo_output_mode);
^~~~~~~~~~~~~~~~~~~~~~~~~~
content_interpretation_type
It compiled, but gives a black boot screen both from early boot, a kernel issue, adb seems to be communicating, I'm meddling with the boot image atm so i will know more later (Later: The updated mdss code broke for our case somewhere. I will also need to work on the local_manifest) (Later: New Manifest attached) . Last I tested the kernel a few moons ago it worked on the Z1, so issue this was a surprise... I will also import the changes from the sony-msm8994 project, who is doing a great job, i see quite a lot of work to the sdcardfs code.
threader said:
It compiled, but gives a black boot screen both from early boot, a kernel issue, adb seems to be communicating, I'm meddling with the boot image atm so i will know more later (Later: The updated mdss code broke for our case somewhere. I will also need to work on the local_manifest) (Later: New Manifest attached) . Last I tested the kernel a few moons ago it worked on the Z1, so issue this was a surprise... I will also import the changes from the sony-msm8994 project, who is doing a great job, i see quite a lot of work to the sdcardfs code.
Click to expand...
Click to collapse
How did you managed to compile it? I am finding a lot of problems, for example, in system/core/init/util.h
Code:
#include <android-base/chrono_utils.h>
#include <selinux/label.h>
were not found, so I had to comment them out, but I do not know if this its going to be the best approach...
@algui91
Im about to test what built tonight. I suspect i need to port the binder from sony-msm8994 though, it lookst tasty anyway. But does your build by any chance warn against building with a pre compiled kernel? I guess or simply some headers might have new names maybe or some feature needs to be introduced into the kernel.
The .repo/local_manifest/oss.xml contains some qcom opensource projects, to compile for 16.1 change opensource-location from revision=o-mr to p-mr. Also add https://github.com/sonyxperiadev/transpower/commits/android-8.1.0_r35, for 15.1 or probably master for 16.1, i missed that yesterday.
threader said:
@algui91
Im about to test what built tonight. I suspect i need to port the binder from sony-msm8994 though, it lookst tasty anyway. But does your build by any chance warn against building with a pre compiled kernel? I guess or simply some headers might have new names maybe or some feature needs to be introduced into the kernel.
The .repo/local_manifest/oss.xml contains some qcom opensource projects, to compile for 16.1 change opensource-location from revision=o-mr to p-mr. Also add https://github.com/sonyxperiadev/transpower/commits/android-8.1.0_r35, for 15.1 or probably master for 16.1, i missed that yesterday.
Click to expand...
Click to collapse
Hello,
Thanks for your quick reply, How did your test went? this are the only warnings I get when running brunch sumire:
Code:
build/make/core/combo/TARGET_linux-arm.mk:43: warning: cortex-a53.a57 is armv8-a.
build/make/core/combo/TARGET_linux-arm.mk:45: warning: TARGET_2ND_ARCH_VARIANT, armv7-a-neon, ignored! Use armv8-a instead.
Trying dependencies-only mode on a non-existing device tree?
I applied the required binder changes from sony-msm8994 for AOSP 8.1 and it turns out it results in a locked kernel that fails to even boot, so i'm looking that problem now. So for instant results instead of my Z1 to Z5 kernel, use https://github.com/sony-msm8994/android_kernel_sony_msm8994 in , .repo/local_manifests/LA.BR.1.3.3_rb2.14.xml , you need to comment out common-headers common-kernel, also i see i commented out my kernel, a good place to add sony-msm8994, i realize my project to update the unified kernel is riddled with mines., and we really need 15.1 and 16.1 yesterday.
I've come around to testing the whole Sony-msm8994 project that's up on Z5c, Lineage 15.1 is up with wifi, location, nfc available at least, so is the usb otg switch, not working is fingerprint and gsm services, camera.
Spotted this in logcat.
Code:
Abort message: 'CANNOT LINK EXECUTABLE "/system/bin/netmgrd": cannot locate symbol "_ZN6google8protobuf2io16CodedInputStream20ReadVarint32FallbackEPj" referenced by "/system/vendor/lib64/libcneapiclient.so"...'
TARGET_CPU_VARIANT in device/sony/kitakami-common/BoardConfigCommon.mk is set to generic, it's supposed to be TARGET_CPU_VARIANT := cortex-a53
threader said:
I've come around to testing the whole Sony-msm8994 project that's up on Z5c, Lineage 15.1 is up with wifi, location, nfc available at least, so is the usb otg switch, not working is fingerprint and gsm services, camera.
Spotted this in logcat.
Code:
Abort message: 'CANNOT LINK EXECUTABLE "/system/bin/netmgrd": cannot locate symbol "_ZN6google8protobuf2io16CodedInputStream20ReadVarint32FallbackEPj" referenced by "/system/vendor/lib64/libcneapiclient.so"...'
TARGET_CPU_VARIANT in device/sony/kitakami-common/BoardConfigCommon.mk is set to generic, it's supposed to be TARGET_CPU_VARIANT := cortex-a53
Click to expand...
Click to collapse
Have the same problem, spotted the same Fatal message, Did the change in TARGET_CPU_VARIANT solved the problem?
Best
I've got a problem with librmnetctl, vendor/qcom/opensource/dataservices, not building, netmgrd is complaining about that missing now, I'm trying the version on Xperiadev, but now I've messed up the build i built earlier and need to rebuild all of it...
threader said:
I've got a problem with librmnetctl, vendor/qcom/opensource/dataservices, not building, netmgrd is complaining about that missing now, I'm trying the version on Xperiadev, but now I've messed up the build i built earlier and need to rebuild all of it...
Click to expand...
Click to collapse
I am trying to detect where the error
Code:
Abort message: 'CANNOT LINK EXECUTABLE "/system/bin/netmgrd": cannot locate symbol "_ZN6google8protobuf2io16CodedInputStream20ReadVarint32FallbackEPj" referenced by "/system/vendor/lib64/libcneapiclient.so"...'
comes from.
I am guessing its some makefile which has a SHARED_LIBRARY link to _ZN6google8protobuf2io16CodedInputStream20ReadVarint32FallbackEPj missing, but do not know where to find it. I've searched on the LineageOS repos without luck.
algui91 said:
I am trying to detect where the error
Code:
Abort message: 'CANNOT LINK EXECUTABLE "/system/bin/netmgrd": cannot locate symbol "_ZN6google8protobuf2io16CodedInputStream20ReadVarint32FallbackEPj" referenced by "/system/vendor/lib64/libcneapiclient.so"...'
Click to expand...
Click to collapse
It seems to be called from protobuf, maybe a missing link to it somewhere?
threader said:
It seems to be called from protobuf, maybe a missing link to it somewhere?
Click to expand...
Click to collapse
It seems so, the question is where that 'Somewhere' is. . Will keep searching.
algui91 said:
It seems so, the question is where that 'Somewhere' is. . Will keep searching.
Click to expand...
Click to collapse
I see its in prebuilt compiler also.
But maybe?
Code:
external/protobuf/src/google/protobuf/io/coded_stream.cc :
Los 14.1
bool CodedInputStream::ReadVarint32Fallback(uint32* value) {
if (BufferSize() >= kMaxVarintBytes ||
// Optimization: We're also safe if the buffer is non-empty and it ends
// with a byte that would terminate a varint.
(buffer_end_ > buffer_ && !(buffer_end_[-1] & 0x80))) {
const uint8* end = ReadVarint32FromArray(buffer_, value);
if (end == NULL) return false;
buffer_ = end;
return true;
} else {
// Really slow case: we will incur the cost of an extra function call here,
// but moving this out of line reduces the size of this function, which
// improves the common case. In micro benchmarks, this is worth about 10-15%
return ReadVarint32Slow(value);
}
}
Los.15.1
int64 CodedInputStream::ReadVarint32Fallback(uint32 first_byte_or_zero) {
if (BufferSize() >= kMaxVarintBytes ||
// Optimization: We're also safe if the buffer is non-empty and it ends
// with a byte that would terminate a varint.
(buffer_end_ > buffer_ && !(buffer_end_[-1] & 0x80))) {
GOOGLE_DCHECK_NE(first_byte_or_zero, 0)
<< "Caller should provide us with *buffer_ when buffer is non-empty";
uint32 temp;
::std::pair<bool, const uint8*> p =
ReadVarint32FromArray(first_byte_or_zero, buffer_, &temp);
if (!p.first) return -1;
buffer_ = p.second;
return temp;
} else {
// Really slow case: we will incur the cost of an extra function call here,
// but moving this out of line reduces the size of this function, which
// improves the common case. In micro benchmarks, this is worth about 10-15%
uint32 temp;
return ReadVarint32Slow(&temp) ? static_cast<int64>(temp) : -1;
}
}
The function ReadVarint32Fallback is used in the following libraries :
vendor/sony/kitakami-common/proprietary/vendor/lib64/libsettings.so
vendor/sony/kitakami-common/proprietary/vendor/lib64/libcneapiclient.so
vendor/sony/kitakami-common/proprietary/vendor/lib/libsettings.so
vendor/sony/kitakami-common/proprietary/vendor/lib/libcneapiclient.so
vendor/sony/kitakami-common/proprietary/vendor/lib/mediadrm/libwvdrmengine.so
So i rolled back the functions required by the libraries in external/protobuf/src/google/protobuf/io/coded_stream.h, external/protobuf/src/google/protobuf/io/coded_stream.cc, attached a patch to get a bit farther .
I get the following error now.
Code:
520 F DEBUG : Abort message: 'CANNOT LINK EXECUTABLE "/system/bin/netmgrd": cannot locate symbol "_ZN6google8protobuf8internal14WireFormatLite10ReadStringEPNS0_2io16CodedInputStreamEPNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEE" referenced by "/system/vendor/lib64/libcneapiclient.so"...'
I think the correct thing to do now is call ReadStringEPNS0_2io16CodedInputStreamEPNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEE

Need help building a SM-T555 (gt510lte) LineageOS ROM

Dear all,
I am trying to build a LineageOS 17.1 ROM for the Galaxy Tab A 9.7 (gt510lte) SM-T555.
Using the repos of @retiredtab and aala27's repos I managed to build a config that resulted in a buildable LineageOS that I could install and that shows the Lineage boot animation but crashes/reboots after a while.
Fyi, my forks for the GT510LTE (SM-T555) I currently maintain here: https://github.com/blizzard4591?tab=repositories
Questions to @retiredtab:
- What is your current local_manifest/roomservice? I could not locate this in your Github and used one posted by aala27 in a different thread, but it might be "off".
- Did you extract the required proprietary files by hand from stock ROMs or is there an automated way? I have "SM-T555_1_20190103084053_we4a668guy_fac" with T555XXU1CQHA/T555XXU1CRG1 that I know works on my T555.
- The repo "vendor-samsung-gt5note10wifi" in your Github only contains a branch for Lineage 18.1, is that intentional?
Sadly, I am a total noob in the area of building Lineage, so I might miss some obvious things!
I am willing to put in some time and effort to make this work, but I just do not know enough to do it efficiently.
If you can spare the time for a few hints, I believe I can make some progress!
Cheers
Update 1:
My image is working, i.e. it boots and gives a stable system.
Problem: Bluetooth does not work and crashes a lot, I have no clue what the problem is.
Problem: Audio is not working, I see a lot of "audio_route: unable to find path 'low-latency-playback speaker'
The system settings dialog is missing the "Android Patchlevel" information - is this expected? I am building using "repo sync, breakfast gt510lte, brunch gt510lte" - is this correct? I am just an idiot.
Update 2:
Bluetooth and Audio are working, SELinux is not, so permissive it is for now.
Builds available on request.
RandomAndroidTinkerer said:
- What is your current local_manifest/roomservice? I could not locate this in your Github and used one posted by aala27 in a different thread, but it might be "off".
Click to expand...
Click to collapse
It was there before, but I think after the switch to Xenforo on Dec 1, 2020, it might have gotten lost. It's there now and what I use to generate 17.1 for T550.
RandomAndroidTinkerer said:
- Did you extract the required proprietary files by hand from stock ROMs or is there an automated way? I have "SM-T555_1_20190103084053_we4a668guy_fac" with T555XXU1CQHA/T555XXU1CRG1 that I know works on my T555.
Click to expand...
Click to collapse
No, I just used what's in at https://github.com/Galaxy-MSM8916. Having said that, I found that for the SM-T350, it was missing some very important files so I grabbed those from stock.
RandomAndroidTinkerer said:
- The repo "vendor-samsung-gt5note10wifi" in your Github only contains a branch for Lineage 18.1, is that intentional?
Click to expand...
Click to collapse
gt5note10wifi is for the P550, not T550. You shouldn't be using that as the *.mk files won't copy the correct blobs for your device.
RandomAndroidTinkerer said:
Update 1:
My image is working, i.e. it boots and gives a stable system.
Problem: Bluetooth does not work and crashes a lot, I have no clue what the problem is.
The system settings dialog is missing the "Android Patchlevel" information - is this expected? I am building using "repo sync, breakfast gt510lte, brunch gt510lte" - is this correct?
Click to expand...
Click to collapse
Congrats on getting a bootable stable system. For bluetooth, you are probably missing a bluetooth blob. Look in your adb logcat (see below) for red messages that are bluetooth related. It might say something like "missing libbt-nv.so".
Missing Android Patchlevel means you don't have a property declared in your *.mk file. Right now, I can' t remember what it is, but I will look for it.
Instead of brunch, I do
Code:
TARGET_BUILD_TYPE=debug TARGET_BUILD_VARIANT=eng make -j2 bacon
This makes an engineering build that starts adb logcat immediately. That way, you can see all the messages as soon as the device boots. It helps a lot in troubleshooting stuck at boot animation problems.
The -j2 indicates how many CPU cores I have. If you have more, say 4, then -j4.
Once you solved all your problems and if you want to share your ROM, then do a brunch which is userdebug by default (for me, I just do a make -j2 bacon).
For adb logcat, I find
Code:
adb logcat -C | nl
helpful. It color codes the log so anything in red (error) needs attention. Nl numbers the log so it's easier to remember where you error messages are vs a timestamp.
For the Android patch level, show me a screenshot so I exactly what you mean.
RandomAndroidTinkerer said:
Problem: Audio is not working, I see a lot of "audio_route: unable to find path 'low-latency-playback speaker'
Click to expand...
Click to collapse
Try not to edit your initial post because I didnt' see the audio problem. Just make a new one so that I see new responses.
The audio problem is likely you don't have the correct definition in mixer_paths.xml. aala27 had the exact same problem. It's likely this
[UNOFFICIAL][ROM] LineageOS 17.1 for Galaxy Tab A 9.7[SM-P550]
NOTE: There is no S-pen support. If you need S-pen, DO NOT USE THIS ROM. I am not responsible for lost data, identity theft, lost money, security vulnerabilities, bricked devices or any other hardware or software malfunctions that comes as a...
forum.xda-developers.com
For SM-T550, the line inside mixer_paths.xml looks like
Code:
<path name="low-latency-playback speaker">
<ctl name="QUAT_MI2S_RX Audio Mixer MultiMedia5" value="1" />
</path>
You can see above, I have a path name that matches 'low-latency-playback speaker' exactly. Your mixer_paths.xml probably doesn't have this defined so you get no audio.
BTW, all the info I'm giving wasn't available via search engine when I first started. It's extremely frustrating to troubleshoot when I first started. Even now, I have problems with audio over bluetooth and stuttering audio over bluetooth for two platforms that both worked perfectly on the previous last major revision on Android.
Thank you so much; I know how hard this kind of initial research is!
Regarding the audio issues:
I tried that already, as you can see in https://github.com/blizzard4591/android_device_samsung_gt510lte/tree/lineage-17.1/configs/audio I used the config files from my stock image (I had assumed they would work, but they do not - why?) and then added said speaker there, but no luck, it still has the same error message. What am I misunderstanding?
Regarding Bluetooth:
Thanks to you tip, I added the libbt-nv.so module, but this did not change the situation.
I am now building a debug/eng build, but in the log I still see no messages of missing drivers/firmware/SOs. You can find my Logcat attached - could you take a look and tell me whether I am missing something? Should there be messages?
How did you find out that you were missing BLOBs?
RandomAndroidTinkerer said:
I tried that already, as you can see in https://github.com/blizzard4591/android_device_samsung_gt510lte/tree/lineage-17.1/configs/audio I used the config files from my stock image (I had assumed they would work, but they do not - why?) and then added said speaker there, but no luck, it still has the same error message. What am I misunderstanding?
Click to expand...
Click to collapse
You need to check the actual rom image to see if the mixer_paths.xml is correct. Do
Code:
adb pull /system/vendor/etc/mixer_paths.xml
and compare if the two are the same.
RandomAndroidTinkerer said:
Regarding Bluetooth:
Thanks to you tip, I added the libbt-nv.so module, but this did not change the situation.
Click to expand...
Click to collapse
I only guessed at what might be missing. The logs will tell who what's missing.
RandomAndroidTinkerer said:
You can find my Logcat attached - could you take a look and tell me whether I am missing something?
Click to expand...
Click to collapse
I see no log attached. Zip the log and then attach it.
You need to check the actual rom image to see if the mixer_paths.xml is correct. Do
Code:
adb pull /system/vendor/etc/mixer_paths.xml
and compare if the two are the same.
Click to expand...
Click to collapse
Yes, the file was incorrect, I guess the path
Code:
$(LOCAL_PATH)/configs/audio/mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths.xml
did not resolve to where it should, I changed that, once the build is done I will check.
I see no log attached. Zip the log and then attach it.
Click to expand...
Click to collapse
Interesting, I can see it, but I attached it as ZIP!
The log you attached is missing all the bootup sequence. You need to start adb logcat as soon as the device boots.
Audio
=====
Your mixer_paths.xml should be in /vendor/etc. /system/vendor is usually a link to /vendor. From my P550.
Code:
$ adb shell
gt5note10wifi:/ # ls -al vendor
lrw-r--r-- 1 root root 14 2008-12-31 17:00 vendor -> /system/vendor
If you are using the 17.1 msm8916-common repo, see lines 80 to 83
android_device_samsung_msm8916-common/msm8916.mk at lineage-17.1 · Galaxy-MSM8916/android_device_samsung_msm8916-common
Common MSM8916 tree for Samsung devices. Contribute to Galaxy-MSM8916/android_device_samsung_msm8916-common development by creating an account on GitHub.
github.com
may be overwriting your stock mixer_paths. I would comment out lines 80 to 83 as a test.
Bluetooth
=========
You have tons of errors with your bluetooth. If you view your logcat in color, these are all in red.
Code:
04-01 13:19:22.910 1212 1212 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
04-01 13:19:22.911 1212 1212 F DEBUG : LineageOS Version: '17.1-20210401-UNOFFICIAL-gt510lte'
04-01 13:19:22.911 1212 1212 F DEBUG : Build fingerprint: 'samsung/gt510ltexx/gt510lte:7.1.1/NMF26X/T555XXU1CQI8:user/release-keys'
04-01 13:19:22.911 1212 1212 F DEBUG : Revision: '8'
04-01 13:19:22.911 1212 1212 F DEBUG : ABI: 'arm'
04-01 13:19:22.912 1212 1212 F DEBUG : Timestamp: 2021-04-01 13:19:22+0200
04-01 13:19:22.912 1212 1212 F DEBUG : pid: 866, tid: 1203, name: bt_hci_thread >>> com.android.bluetooth <<<
04-01 13:19:22.912 1212 1212 F DEBUG : uid: 1002
04-01 13:19:22.912 1212 1212 F DEBUG : signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
04-01 13:19:22.912 1212 1212 F DEBUG : Abort message: '[0401/131922.772914:FATAL:hci_layer_android.cc(119)] Check failed: btHci != nullptr.
When it crashes hard like above, there's no way bluetooth will work.
Again, if you are using the 17.1 msm8916-common repo, it's missing the bluetooth entries for manifest.xml and msm8916.mk.
For the manifest.xml you need something like
Code:
<hal format="hidl">
<name>android.hardware.bluetooth</name>
<transport arch="32+64">passthrough</transport>
<version>1.0</version>
<interface>
<name>IBluetoothHci</name>
<instance>default</instance>
</interface>
</hal>
For msm8916.mk, you need
Code:
# Bluetooth
PRODUCT_PACKAGES += \
[email protected]
[Sorry for the delay]
Okay, I think I ironed out most of the issues.
What is confirmed working:
- WLAN
- Bluetooth
- Audio
- GPS (though the initial fix took 30min+...)
What does not work
- SELinux
WLAN:
I see a messages like
wificond: No Offload Service available
wificond: Offload HAL not supported
wificond: Failed to get NL80211_ATTR_EXT_FEATURES
Click to expand...
Click to collapse
Is that an issue? I don't know...
I see a lot of messages from the PowerHAL:
QTI PowerHAL: Failed to acquire lock.
Click to expand...
Click to collapse
I already tried https://review.statixos.com/c/android_device_essential_mata/+/1626/1 but that apparently was not enough.
SELInux:
I added the policies by https://github.com/VirsysElectron/android_device_samsung_gt510wifi and made them work, but it seems they are not really working.
Example:
I/init ( 233): type=1400 audit(0.0:4): avc: denied { mounton } for path="/firmware-modem" dev="mmcblk0p25" ino=27 scontext=u:r:init:s0 tcontext=ubject_r:tmp_root_mount_file:s0 tclass=dir permissive=1
I/e2fsck ( 253): type=1400 audit(0.0:5): avc: denied { read } for name="mmcblk0p13" dev="tmpfs" ino=7580 scontext=u:r:fsck:s0 tcontext=ubject_r:efs_block_device:s0 tclass=blk_file permissive=1
I/e2fsck ( 253): type=1400 audit(0.0:6): avc: denied { open } for path="/dev/block/mmcblk0p13" dev="tmpfs" ino=7580 scontext=u:r:fsck:s0 tcontext=ubject_r:efs_block_device:s0 tclass=blk_file permissive=1
I/e2fsck ( 253): type=1400 audit(0.0:7): avc: denied { write } for name="mmcblk0p13" dev="tmpfs" ino=7580 scontext=u:r:fsck:s0 tcontext=ubject_r:efs_block_device:s0 tclass=blk_file permissive=1
I/e2fsck ( 253): type=1400 audit(0.0:8): avc: denied { ioctl } for path="/dev/block/mmcblk0p13" dev="tmpfs" ino=7580 ioctlcmd=127c scontext=u:r:fsck:s0 tcontext=ubject_r:efs_block_device:s0 tclass=blk_file permissive=1
I/init ( 1): type=1400 audit(0.0:9): avc: denied { relabelfrom } for name="rmt_storage" dev="debugfs" ino=6571 scontext=u:r:init:s0 tcontext=ubject_r:debugfs_rmt:s0 tclass=dir permissive=1
I/init ( 1): type=1400 audit(0.0:10): avc: denied { relabelfrom } for name="rmts" dev="debugfs" ino=6574 scontext=u:r:init:s0 tcontext=ubject_r:debugfs_rmt:s0 tclass=file permissive=1
Click to expand...
Click to collapse
I declare
/firmware-modem(/.*)? ubject_r:tmp_root_mount_file:s0
Click to expand...
Click to collapse
in device/samsung/gt510lte/sepolicy/file_contexts, but it is not applied:
dr-xr-x--- 3 system drmrpc ubject_r:vfat:s0 16384 1970-01-01 01:00 firmware-modem
Click to expand...
Click to collapse
And I really do not know enough about SELinux to effectively engage this.
@retiredtab: How did you solve SELinux in your builds for the T550?
RandomAndroidTinkerer said:
- GPS (though the initial fix took 30min+...)
Click to expand...
Click to collapse
That seems like a really long time. Did you go outside to do the GPS reading? Sometimes it makes a difference if you are in or outside. You should do an adb logcat while testing out GPS. It might show some clues as to why it takes so long.
With the P550 and using GPStest from
GPSTest | F-Droid - Free and Open Source Android App Repository
An app for testing GPS and GNSS capabilities of a device
f-droid.org
I get a lock in 48 seconds by the window.
RandomAndroidTinkerer said:
What does not work
- SELinux
Click to expand...
Click to collapse
You need to read posts 202 and beyond at
[ROM][SM-T350][UNOFFICIAL][crDroidAndroid-10.0][v6.17][ANDROID 10] Galaxy Tab A 8.0
Finally this thread is back :)
forum.xda-developers.com
I list the tools that you can use to help build selinux policies. As I wrote in the other thread, do you blindly trust the policies generated by the tools? I'm not an expert so I don't know and it's highly dependent on each hardware device.
I built an image with selinux enforcing as a test sometime in March and while it works, I'm not confident and ready to release that. In addition, each device will require it's own set of selinux policies. What might work for the P550 may not work on the T555 due to differences in hardware (LTE, S-pen).
Building the correct selinux policies is an iterative exercise. Wipe everything on your device, format data. Install the ROM only. You grant the initial batch of policies, reboot, look at logs, grant some more and repeat until they are gone. You should do this with the ROM only. Don't load gapps, games, apps, etc and then run selinux.
RandomAndroidTinkerer said:
Is that an issue? I don't know...
Click to expand...
Click to collapse
I see them in my own builds and so far there's been no problem.
RandomAndroidTinkerer said:
I see a lot of messages from the PowerHAL:
Click to expand...
Click to collapse
Same as above.
RandomAndroidTinkerer said:
I already tried https://review.statixos.com/c/android_device_essential_mata/+/1626/1 but that apparently was not enough.
Click to expand...
Click to collapse
You will find through experience and more building that what works for one platform may not work for another. It's highly dependent on the device and code specific to that device.
RandomAndroidTinkerer said:
SELInux:
I added the policies by https://github.com/VirsysElectron/android_device_samsung_gt510wifi and made them work, but it seems they are not really working.
Click to expand...
Click to collapse
In order to boot selinux enforcing, you need to remove line 140 from
android_device_samsung_msm8916-common/BoardConfigCommon.mk at lineage-17.1 · blizzard4591/android_device_samsung_msm8916-common
Common MSM8916 tree for Samsung devices. Contribute to blizzard4591/android_device_samsung_msm8916-common development by creating an account on GitHub.
github.com
Also, I'm not an expert in selinux, but I don't know why you would permit untrusted_app.te, untrusted_app_25.te and untrusted_app_27.te?
retiredtab said:
That seems like a really long time. Did you go outside to do the GPS reading? Sometimes it makes a difference if you are in or outside. You should do an adb logcat while testing out GPS. It might show some clues as to why it takes so long.
With the P550 and using GPStest from
GPSTest | F-Droid - Free and Open Source Android App Repository
An app for testing GPS and GNSS capabilities of a device
f-droid.org
I get a lock in 48 seconds by the window.
Click to expand...
Click to collapse
I think it was just the initial, first fix, and yes, I was not in the best position. Now that it knows where and when it is, a new fix even inside takes a couple of seconds. I used the same tool, also from F-Droid
retiredtab said:
You need to read posts 202 and beyond at
[ROM][SM-T350][UNOFFICIAL][crDroidAndroid-10.0][v6.17][ANDROID 10] Galaxy Tab A 8.0
Finally this thread is back :)
forum.xda-developers.com
I list the tools that you can use to help build selinux policies. As I wrote in the other thread, do you blindly trust the policies generated by the tools? I'm not an expert so I don't know and it's highly dependent on each hardware device.
I built an image with selinux enforcing as a test sometime in March and while it works, I'm not confident and ready to release that. In addition, each device will require it's own set of selinux policies. What might work for the P550 may not work on the T555 due to differences in hardware (LTE, S-pen).
Building the correct selinux policies is an iterative exercise. Wipe everything on your device, format data. Install the ROM only. You grant the initial batch of policies, reboot, look at logs, grant some more and repeat until they are gone. You should do this with the ROM only. Don't load gapps, games, apps, etc and then run selinux.
Click to expand...
Click to collapse
I had to load Magisk and LiveBoot to even get the early-boot log. Using ADB logcat I was unable to get a log from "system start" - the adb process would hang and wait for the device to be fully booted. Even afterwards, no messages from boot. I had USB debugging enabled, default USB conf "file transfer", etc.
Any ideas what I am doing wrong?
retiredtab said:
I see them in my own builds and so far there's been no problem.
Same as above.
You will find through experience and more building that what works for one platform may not work for another. It's highly dependent on the device and code specific to that device.
In order to boot selinux enforcing, you need to remove line 140 from
android_device_samsung_msm8916-common/BoardConfigCommon.mk at lineage-17.1 · blizzard4591/android_device_samsung_msm8916-common
Common MSM8916 tree for Samsung devices. Contribute to blizzard4591/android_device_samsung_msm8916-common development by creating an account on GitHub.
github.com
Also, I'm not an expert in selinux, but I don't know why you would permit untrusted_app.te, untrusted_app_25.te and untrusted_app_27.te?
Click to expand...
Click to collapse
Good catch - I simply copied the policies from VirsysElectron to start, but since they do not really work, I don't think I will continue much on this path. I share your opinion on old drivers and the greater picture. I had hoped the old policies would work for most of the basics, but they do not.
RandomAndroidTinkerer said:
I had to load Magisk and LiveBoot to even get the early-boot log.
Click to expand...
Click to collapse
For an eng build, there's no need for Magisk and LiveBoot to get an adb logcat. Part of the eng parameters is that it enables adb right away.
For developing selinux policies, you leave it in permissive first, develop the policies as I stated and then when you think you are done, then enable selinux enforcing. More at
Validating SELinux | Android Open Source Project
source.android.com
RandomAndroidTinkerer said:
Good catch - I simply copied the policies from VirsysElectron to start,
Click to expand...
Click to collapse
And that's the problem right there. It's so easy to kang or copy someone else's work today (legal or illegal) that some don't bother to check if it's right in the first place. I'm not saying VirsysElectron code is wrong, he may have a good reason why those files are generated.
I also fall into that boat. I use the public open source repos, but there's no way that I have the expertise or time to check everything in the repo for errors, security vulnerabilities, code correctness, etc.
retiredtab said:
For an eng build, there's no need for Magisk and LiveBoot to get an adb logcat. Part of the eng parameters is that it enables adb right away.
Click to expand...
Click to collapse
No, that is the problem - it did not. I am using eng-builds and, as I described, adb did not work, and I have no clue why.
retiredtab said:
For developing selinux policies, you leave it in permissive first, develop the policies as I stated and then when you think you are done, then enable selinux enforcing. More at
Validating SELinux | Android Open Source Project
source.android.com
Click to expand...
Click to collapse
I read that and some other introductions to SELinux, I get the general idea and concept - but as shown in my example, the labeling rule
/firmware-modem(/.*)? u: object_r :tmp_root_mount_file:s0
Click to expand...
Click to collapse
is not applied, I did not find anything that would tell me why or how to debug such an issue.
retiredtab said:
And that's the problem right there. It's so easy to kang or copy someone else's work today (legal or illegal) that some don't bother to check if it's right in the first place. I'm not saying VirsysElectron code is wrong, he may have a good reason why those files are generated.
Click to expand...
Click to collapse
I started writing my own policies from scratch (its somewhere in the repo history), but I first wanted to get my bearings, see how things work - ideally from a known, working starting point - which was a good idea, as otherwise the issue mentioned above regarding the labeling rule that does not get applied would have cost me much more sanity than just questioning someone else's code
Hello RandomAndroidTinkerer
I also own a T555, currently with TWRP 3.3.1 and LineageOS 16.0 from Virsys( 20191231). It's very stable, except the SIM didn't work.
Am of course interested in your image and would like to test it out. Which TWRP version do you use ?
Friendly greetings
Schaagi
Hallo RandomAndroidTinkerer,
thank you very much for your work and of course thanks for retiredtab and the others for their work This is my first post here and I you are the only one I found who builded an actual image. I'm very interested in testing your build. Could you send me an link, please? Thank you and bye bye.
Hi, I applied for an uploader account at AndroidFileHost, once this is granted I will upload a current build.
Current engineering build is up: https://www.androidfilehost.com/?w=files&flid=324776
I am using TWRP 3.1.0 from here.
Be kind on the feedback
RandomAndroidTinkerer said:
Current engineering build is up: https://www.androidfilehost.com/?w=files&flid=324776
I am using TWRP 3.1.0 from here.
Click to expand...
Click to collapse
For fun, I tried it on the P550 and not surprisingly, it doesn't boot. It doesn't even out adb logcat.
LineageOS also builds it's own recovery.img as another recovery option to TWRP. It's not as user friendly and lacks some features, but it's functional.
Thank you so much for your image - I am very excited to test it. Feedback follows in the next days.

Categories

Resources