Position independent executables check removal, fix wifi - Shield Android TV Q&A, Help & Troubleshooting

Lollipop requires that the binaries you load be position independent executables. However, I don't know how to decompile iwconfig and iwmulticall and recompile for pie compatibility, and as such, despite root access, I cannot use the app Wi-Fi tx power. A lot of people have mentioned poor Wi-Fi reception; increased tx power would solve a lot of problems. Could someone more knowledgeable and skilled than myself help me figure out how to remove the checks for pie compatibility so I can make the range on my shield's Wi-Fi adapter better? Someone managed it on the nexus 5 but his flashable zip did not remove the checks, and I can't even figure out how to set up the toolchain in ubuntu, or even what toolchain I need in order to compile for any of my devices.

Bumping for awareness and possible iwconfig help.

Related

[Released] The Settings Creator

Howdy all. Do you flash your phone a lot? Don’t you hate it having to put in your WIFI and Exchange settings all the time? Well now you don’t have to with the Settings Creator. I started off creating a XML for just myself but then I decided to give back to the community that has helped me so much with my flashing and cooking needs.
To run the program all that is required is the .NET framework 2.0 (See below for link). After you input the information that is required a nice CAB file will be created, just pop that on your phone and viola settings are all done. In the words of my Cousin Vinny "Make once, use a bunch".
Known Issues:
1. WEP 128bit does not work (I think this is a limitation of the Hermes because even manually I cannot get it to work)
2. E-mail is for Exchange Direct Push Only
Help requested:
1. I don’t have access to a AP/Router that does WPA2 therefore I have no idea if this works with that level on authentication works (Also try manually to see if it is a limitation of the device)
2. I don’t have access to a AP/Router that does WPA with AES Encryption therefore I have no idea if this works with that level on authentication works (Also try manually to see if it is a limitation of the device)
Please provide any feedback you may have. Thanks guys.
-UllSang
Program requires .NET 2.0 Framework. (Download at http://www.microsoft.com/downloads/...CB-4362-4B0D-8EDD-AAB15C5E04F5&displaylang=en
Also required is Visual J#)
Attachment 1: The binary release
Attachment 2: Source code.
Licensed under: http://creativecommons.org/licenses/by-nc-sa/3.0/us/
Change log:
---0.1
-----First Release
Running this on the desktop complained at first - you need to install the Visual J# Redistributable to make it work, as it doesn't seem to be part of the .NET framework by default.
Hope that helps.
Ah thanks for the heads up, I had no idea that it wasn't a part of the .NET framework by default. Did you instal the J# package and try the program? Thanks.
UllSang said:
Known Issues:
1. WEP 128bit does not work (I think this is a limitation of the Hermes because even manually I cannot get it to work)
Click to expand...
Click to collapse
A humble suggestion - this may be worth looking at again as I use wep 128bit and do not find any problem when entered as hex key.
Mike
Hmm.. intresting... I can not get it to work. I am inputting it as an ASCII though and it only works for 64 bit. After i saw your post i tried it entering as hex and it still does not work, it could be my cheap piece of crap router. Any chance you tried it out with the program? Thanks

[info] Get the new model D-Link USB Ethernet to work (DUB-E100 Ver. C1)

Hi all-
I spent literally an entire evening and night pulling my hair out trying to get this thing to work. Turns out all it needed was the right combo of kernel + ROM. Here are some notes.
(sorry for the wall o' text...scroll to bottom for quick & dirty "TL;DR" instructions)
Current, working setup:
unter's "TF300T" kernel from here: http://forum.xda-developers.com/showthread.php?t=1892326 (use the zip attached to the first post that is named "TF300T.zip"
Deodexed stock w/root & busybox from here: http://forum.xda-developers.com/showthread.php?t=2033205 (second post)
Kernel notes:
I think the key for this to work is that the kernel needs to have the right devid for the usb-ethernet dongle. Unter's kernel made this change on 10/27 according to his changelog. I think the key part of these changes is detailed in the kernel module patches detailed inside the zip on this page: http://www.dlink.com/us/en/support/...-usb-2-fast-ethernet-adapter?revision=us_revc
For anyone who cares to look even deeper, I think the difference with the rev C1 kernel module source and the older ones is just the bits that identify the device as needing the asix.ko module. Here are some details: http://www.spinics.net/lists/netdev/msg210743.html
EDIT: Here is probably the real source of changes: http://grinkin.ru/dlink-DUB-E100.html (it doesn't appear that the rev C1 kernel modules from d-link's site will actually work... they don't actually contain the rev C1 vendor ID, etc.)
It'd be quite nice if all the kernel devs out there compiled that change into the kernels. I don't think its too big of a deal. Unter's commit for this change is here: https://github.com/untermensch/asus_kernels/commit/2e231ca50f32509a64b45eccd6c87f558c4a42b1 (it's literally 4 added to one file).
EDIT2: The above 2 patch sets (the grinkin.ru and the one unter made) are not identical. Unter's works, but it's basically telling us that the rev C1 is identical to the rev B. Not sure if making the changes from grinkin.ru would improve compatibility or performance.
ROM notes:
I first tried unter's cm kernel with the cm 10.0 stable release, but for some reason it didn't completely work. The usb-ethernet dongle was enabled and it showed up as eth0, but it was not automatically configured. I had to manually go into the terminal and run a "netcfg eth0 up" then "dhcpcd eth0" to make it get an address. Oddly, "netcfg eth0 dhcp" didn't work. I'm not sure why. After taking these steps in the terminal I could ping successfully and whatever else from the terminal. I could also browse the web from the browser, but I couldn't download files, download apps from the market I could browse the market though), or use gtalk or anything else. It turns out android/cyanogenmod wasn't detecting eth0 as an active connection to the internet (in fact, when clicking on the notifications menu it said "No Internet Connection". I'm not sure if this is due to unter's cm kernel using the 10.4.4.20 sources while his "TF300T" uses older sources or what, but it just wouldn't work.
Next I tried the unter's "TF300T" kernel with a ROM based on stock (I think it was surdu's Ultra Fast JB Overclock ROM). Worked and the usb-ethernet dongle was properly detected by android and I was able to use it to it's full capability.
In the end, I went back closer to stock, because all the themeing and stuff that goes into some of the ROMs isn't really my cup of tea.
TL;DR - To get the D-Link DUB-E100 Rev. C1 working, use a stock-based ROM and unter's "TF300T" kernel.

[Q] selinux add own policy to samsung policy

I would like to write and add my own policy for my GS4 to enforce an app. It's shipped with SELinux in permissive mode by default, so I put it into enforcing mode ('enforcing=true' in init.rc, and flash), and rebuild the kernel from source to enable the AVC logging, for debugging purposes.
I only have the the samsung compiled policy: /sepolicy, Samsung doesn't give the policy source code.
So the question is: What is the right way to add my own rules to the samsung policy ?
Here are some of my (bad) ideas:
1- Decompile the samsung sepolicy, add my own rules for my new app, and recompile all.
2- Add SElinux binaries tools (i.e. semodule) on the device, and link my policy.pp on it.
Any suggestions, ideas ?
Up + more info.
Samsung is not using the per-app MLS category support from SELinux-project sample policy but are instead only using MLS categories for their container implementation.
As far as I know, there aren't any decompilation tools available, just some debug tools that can give you an idea of what the policies do (ie. it can't create pp, te, or fc files). Those tools seem to be broken right now too. They don't work for the policies on my Fedora 18 installation nor do they work on the files from the Galaxy S4 firmware.
I think you'll have better luck with semodule. It's a pain to compile glibc, libselinux, etc. for Android, so it might be better to set up an Ubuntu chroot to use the SELinux tools.
One more (bad) idea would be to compile the policy on a Fedora system, record the data being written to /sys/fs/selinux, and load your policy. Then you could create a simple script that writes the same data to Android's sysfs. I'm not sure how exactly to record the writes though (maybe aufs/overlayfs mounted at /sys/fs/selinux).
Just some ideas...not sure if they're useful
Is there no way to get the samsung policy files? I that case, it wouldn't be possible to build a vendor platform anymore, escpecially not with selinux enforced.

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

Pixel C Performance Modifications...

WARNING! I AM NOT RESPONSIBLE FOR ANYTHING DONE TO YOUR DEVICE. TRY AT YOUR OWN RISK!
Sup y’all!?! Just wanted to share these modifications. These are a collection of android mods that I have been using. Some are original and some are not. The attached ax562.zip contains files which need to be put in the corresponding directories with the corresponding permissions(Not recovery flashable!). I have also included FDEA.I magisk .zip module. This module is an Artificial Intelligence app. This is the first majisk module iteration of the .apk. Links to original works of some of these mods are listed below. Big shout out to followmsi, Feravolt, [email protected], the TWRP team and the LOS team!
PS. If anyone wants to help create a flashable .zip that would be great!
ALL THESE STEPS ASSUME YOUR ARE ON LINEAGE OS 18.1 AND USING MAGISK (They might work on other systems but I have not tested).
*
*
*
Steps:
1. Download and extract ax562.zip anywhere.
2. Copy /data and /system files to their proper locations and change permissions of all files to 755.
3. Copy contents of “build.prop” and put them at the end of /system/build.prop and save (might have to mount /system as rw).
4. In TWRP recovery, mount /vendor and replace /vendor/etc/mixer_paths_0.xml (I amplified the speaker output to 33, if too loud, adjust accordingly) with the mixer_paths_0.xml file provided.
5. Google “Chrome” users, in TWRP recovery, mount /vendor and rename /vendor/lib/libnvomx.so to “libnvomx.so.BAK”(This uses Google codecs instead of Nvidia codecs).
6. FDE.AI – I provided the majisk module in the ax562.zip for majisk users. Go into magisk and add the module manually. If you want to use only the .apk or want to dl the module directly, it’s available on Feravolt’s github page in releases (link below). I recommend "Performance mode", setting "Build Prop Tweaks: Nico's gpu tweaks" and finally executing "/aggressiveai on" in the "Elizabeth" AI Chat section. Lastly, I also recommend turning off "Battery Optimization" for the FDE.AI apk.
7. You can also update accordingly without needing to install a new "updated magisk module". The newest version is 12.6 which was released 10/26/21. I've tested this new version and it gives even more of a performance improvement. I did notice for about the first day of gaming it needs to machine learn but after it settles in, GREAT. There is a renamed function though, /aggressiveai does not exist anymore. Use "/advancedai on" to turn on this function. I also keep "Force Dozed Mode" active in the settings screen.
Release 12.6 · feravolt/FDE.AI-docs
Update changelog.md
github.com
8. Enjoy!
https://github.com/feravolt/FDE.AI-docs
https://forum.xda-developers.com/t/...-flashable-increase-your-performance.1353903/
If anyone has any questions, wants to add a script, or has found an error/improvement I'm all ears!
I will try this when the July 2021 build comes out!
EnginEAR said:
I will try this when the July 2021 build comes out!
Click to expand...
Click to collapse
Word.
Updated instructions. Enjoy!
Seems to be working well! It's always hard to say how much of a perceived improvement is the latest ROM improvements vs the tweaks but it very much feels snappier and more able to switch from app to app without long pauses.
I see the app could just run on the device without the content in the zip you provided, may I ask what's the differences about using the files provided? Sorry if it's a silly question, I'm too noob to understand the instructions :'(
thetample said:
I see the app could just run on the device without the content in the zip you provided, may I ask what's the differences about using the files provided? Sorry if it's a silly question, I'm too noob to understand the instructions :'(
Click to expand...
Click to collapse
2. Some of my custom scripts plus other scripts to improve performance.
3. More custom build.prop commands to improve performance
4. Improve the sound by amplifying the output through the mixer_paths0.xml modification.
5. Using googles codes vs the nvidia codecs which are not supported for watching vids in chrome.
6. Installing FDEai.apk as root app through magisk module installation. This ensures that the app does what it's supposed to do like initialize on startup with root privileges etc. Hope that helps.
Just updated the OG post to be able to update the FDAI.apk. Sorry for the lag but I didn't know the apk would install properly as long as the FDAI magisk module was installed first. Enjoy!
How much does it improve by using these "TWEAKS" ? what about battery consumption? is it any higher?
I'm tempted to try it.
Fonsocruise said:
How much does it improve by using these "TWEAKS" ? what about battery consumption? is it any higher?
I'm tempted to try it.
Click to expand...
Click to collapse
Honestly, I would say it's about 10-30% performance increase (most noticeable while gaming). The battery consumption is very efficient.
Any updates to this? With the more recent FDE updates advanced AI can only be enabled while using auto. Do your performance scripts still work on the most recent LOS? Ive been having heating issues trying to watch livestreams and I'm trying to figure it out
101010101001 said:
Any updates to this? With the more recent FDE updates advanced AI can only be enabled while using auto. Do your performance scripts still work on the most recent LOS? Ive been having heating issues trying to watch livestreams and I'm trying to figure it out
Click to expand...
Click to collapse
These mods were all tested on LOS 18.1 and do work. I am not on LOS 19 so I have not tested them on 19. I know FDEAI was updated recently and you could use the most updated APK found on his github above. I'm waiting for camera support to jump on LOS 19.

Categories

Resources