What sensor is used for detecting the position of the slider - Xiaomi Mi Mix 3 Guides, News, & Discussion

Since there is no way in a GSI (without recompiling stuff) to add proper support for the screen slider, I'm going to see if I can write a shell script to run on update of the value for the sensor that detects the position of the display, however,I don't actually know what sensor this is.
After a bit of testing, I believe there's a magnetic field sensor that detects the change in the field as the screen moves (since moving a magnet over the device can activate the slider detection ) however I am unsure about this.

ambitiousButRubbish said:
Since there is no way in a GSI (without recompiling stuff) to add proper support for the screen slider, I'm going to see if I can write a shell script to run on update of the value for the sensor that detects the position of the display, however,I don't actually know what sensor this is.
After a bit of testing, I believe there's a magnetic field sensor that detects the change in the field as the screen moves (since moving a magnet over the device can activate the slider detection ) however I am unsure about this.
Click to expand...
Click to collapse
I'm not sure how useful it will be to identify the hardware. Somewhere, there must be a driver, and there must also be some way, in the stock rom/kernel, to register an action associated with that driver.

It's a magnetic sensor
and I know this because when i slide it into my magnet dash holder, it activates the slide.
then I tried just sliding a magnet across the back, and yes it activates the slider lol

invisiblewave said:
I'm not sure how useful it will be to identify the hardware. Somewhere, there must be a driver, and there must also be some way, in the stock rom/kernel, to register an action associated with that driver.
Click to expand...
Click to collapse
if i can identify the sensor, i can try to find the file associated with its value in the 'sys' partition, and read this to detect changes, when it changes, this can be used to assign an event etc...
in the same way that i did my flashlight fix for huawei phones with GSIs, this would just be a bash script running accessing the specific files associated with the hardware, as remember android is linux (is unix), so everything is a file, this includes the state of the sensor, so it can be read

ambitiousButRubbish said:
if i can identify the sensor, i can try to find the file associated with its value in the 'sys' partition, and read this to detect changes, when it changes, this can be used to assign an event etc...
in the same way that i did my flashlight fix for huawei phones with GSIs, this would just be a bash script running accessing the specific files associated with the hardware, as remember android is linux (is unix), so everything is a file, this includes the state of the sensor, so it can be read
Click to expand...
Click to collapse
i understand. I'm not an Android developer, but i work in a similar industry
There is also the possibility that the magnetic switch actually pushes some sort of "button" inside the phone, it could even be some sort of magnetic film where a magnet pushes two membranes together to complete a physical circuit like a button.
would "show input touches" or some sort of log viewer be able to see what that input is?

i killed tupac said:
i understand. I'm not an Android developer, but i work in a similar industry
There is also the possibility that the magnetic switch actually pushes some sort of "button" inside the phone, it could even be some sort of magnetic film where a magnet pushes two membranes together to complete a physical circuit like a button.
would "show input touches" or some sort of log viewer be able to see what that input is?
Click to expand...
Click to collapse
judging by the teardown, there's no physical switch.
ive tried aida64, but it doent list all sensors, there is however a hall sensor that does not display a value, that looks somewhat promising, i will investigate this more.
the input is over gpio or similar so show input touches wouldn't work, however, a logcat output might

It's in kernel:
https://github.com/MiCode/Xiaomi_Kernel_OpenSource/blob/perseus-p-oss/drivers/halls/halls.c

AndroPlus said:
It's in kernel:
https://github.com/MiCode/Xiaomi_Kernel_OpenSource/blob/perseus-p-oss/drivers/halls/halls.c
Click to expand...
Click to collapse
Thanks! As I suspected. All we need now is a kernel programmer who can merge it into the AOSP kernel for the MM3!

I'll still see if I can 'hack' a temporary solution, I'm not a kernel dev (and know very little C) so will try my bash script solution.
Anyways, flashing a GSI doesn't alter the kernel, it's down to the system to communicate with kernel modules, if the system doesn't implement the features, even if it's in the kernel, it won't work.

ambitiousButRubbish said:
I'll still see if I can 'hack' a temporary solution, I'm not a kernel dev (and know very little C) so will try my bash script solution
Click to expand...
Click to collapse
But without the driver in the kernel, there'll be no external notification.

invisiblewave said:
But without the driver in the kernel, there'll be no external notification.
Click to expand...
Click to collapse
True for a custom kernel, but not if you flashed the GSI onto a stock kernel since the driver already exists, it's down to Android to communicate with the kernel, if the communication methods don't exist in the Android system then it doesn't work, conveniently it may however be possible to read the value of the hall sensor through a bash script, and subsequently an app. In the same way that you can turn on an off the flashlight by changing the values in /sys/class/LEDs, regardless of what system (stock kernel though) you are running, will work the same for the hall sensor.
I just need to find what file the system uses as it's interface with the kernel driver, looks like it's over GPIO, which means finding it will be 'fun'

ambitiousButRubbish said:
I just need to find what file the system uses as it's interface with the kernel driver, looks like it's over GPIO, which means finding it will be 'fun'
Click to expand...
Click to collapse
Would the event not be logged in dmesg or kern?

invisiblewave said:
Would the event not be logged in dmesg or kern?
Click to expand...
Click to collapse
i can view events written to logcat, but its simply a log stating the sensor was polled when the screen slides, not what io is being checked, though, looking at the kernel source, gpio 49 and 113 are used, which i cant find in /sys/class/gpio, there is a 'halls' folder under /sys/devices/virtual/misc, which corresponds to the sensor, but it doesn't contain anything of any use, apart from the uevent details, which i cant do nything with anyway

ambitiousButRubbish said:
i can view events written to logcat, but its simply a log stating the sensor was polled when the screen slides, not what io is being checked, though, looking at the kernel source, gpio 49 and 113 are used, which i cant find in /sys/class/gpio, there is a 'halls' folder under /sys/devices/virtual/misc, which corresponds to the sensor, but it doesn't contain anything of any use, apart from the uevent details, which i cant do nything with anyway
Click to expand...
Click to collapse
That's one step further, at least you know the kernel knows about the sensor. I checked dmesg on mine (non-GSI) and I don't see any sign of it. The "everything is a file" mantra is great, but I spend half my life trying to find files in Linux when I have a problem...... I wish IBM would take it and rework it all to make it logical and useable, or better yet, make the IBM i run Linux apps.

invisiblewave said:
That's one step further, at least you know the kernel knows about the sensor. I checked dmesg on mine (non-GSI) and I don't see any sign of it. The "everything is a file" mantra is great, but I spend half my life trying to find files in Linux when I have a problem...... I wish IBM would take it and rework it all to make it logical and useable, or better yet, make the IBM i run Linux apps.
Click to expand...
Click to collapse
im on stock checking all of this, but since im looking in /sys, flashing a GSI or any other system image doesn't affect that, so i know, if i can make it work on stock, chances are, it will work on non stock too, however, should your system flash overwrite /sys, then you may have an issue.

ambitiousButRubbish said:
im on stock checking all of this, but since im looking in /sys, flashing a GSI or any other system image doesn't affect that, so i know, if i can make it work on stock, chances are, it will work on non stock too, however, should your system flash overwrite /sys, then you may have an issue.
Click to expand...
Click to collapse
Yes. Hence my previous comment about merging the driver into the AOSP kernel. It'll be a cold day in hell before I go back to MIUI.

invisiblewave said:
Yes. Hence my previous comment about merging the driver into the AOSP kernel. It'll be a cold day in hell before I go back to MIUI.
Click to expand...
Click to collapse
i understand your point now, theres quite a bit more than just the slider implementation you need though for the device to function correctly with an AOSP kernel. To be fair to MIUI, having come from an honor 9, i only suffered EMUI for a month before i got rid of it, becasue it was so unbearable, MIUI, i dont really mind that much, its actually designed well, and is pretty nice to look at, obviously i still prefer stock android, hence the idea of this, because i could just flash a GSI and still have a somewhat semi functional slider.

ambitiousButRubbish said:
i understand your point now, theres quite a bit more than just the slider implementation you need though for the device to function correctly with an AOSP kernel. To be fair to MIUI, having come from an honor 9, i only suffered EMUI for a month before i got rid of it, becasue it was so unbearable, MIUI, i dont really mind that much, its actually designed well, and is pretty nice to look at, obviously i still prefer stock android, hence the idea of this, because i could just flash a GSI and still have a somewhat semi functional slider.
Click to expand...
Click to collapse
Yes, I know, but the work has already been done on the AOSP kernel, since we have a bunch of non-GSI roms now running (I'm assuming they don't use the OEM kernel, otherwise the driver would be present and the interrupt would work). With the driver merged into the whatever kernel the non-GSI roms are running, we'd then be at the same point with the non-GSI roms as we are with the GSI, at least as far as detecting the slider action goes. Then your app/script would work on either.

invisiblewave said:
Yes, I know, but the work has already been done on the AOSP kernel, since we have a bunch of non-GSI roms now running (I'm assuming they don't use the OEM kernel, otherwise the driver would be present and the interrupt would work). With the driver merged into the whatever kernel the non-GSI roms are running, we'd then be at the same point with the non-GSI roms as we are with the GSI, at least as far as detecting the slider action goes. Then your app/script would work on either.
Click to expand...
Click to collapse
as i said earlier, the GSI (im talking about where you just flash the SYSTEM image, nothing else) ROMs wont detect the event since its handled by the MIUI framework, so whilst the event does take place, the only way of knowing it takes place is having something poll the data the kernel outputs for the event, which would either mean a third party program, or somehow getting the MIUI framework working on AOSP, but you then have the issue of it being MIUI, which you want to get rid of. maybe its worth me looking a the code for the slider implementation in the MIUI framework, if its open source.

ambitiousButRubbish said:
as i said earlier, the GSI (im talking about where you just flash the SYSTEM image, nothing else) ROMs wont detect the event since its handled by the MIUI framework, so whilst the event does take place, the only way of knowing it takes place is having something poll the data the kernel outputs for the event, which would either mean a third party program, or somehow getting the MIUI framework working on AOSP, but you then have the issue of it being MIUI, which you want to get rid of. maybe its worth me looking a the code for the slider implementation in the MIUI framework, if its open source.
Click to expand...
Click to collapse
You've already proved that it's not the ROM detecting the event, it's the kernel. GSI - Xiaomi kernel, slider event detected, no framework in ROM to handle the event. Non-GSI - AOSP kernel, slider event not detected, no framework in ROM to handle the event. If the driver is merged into the AOSP kernel, then GSI & non-GSI roms are in the same boat, needing either an app or your script to handle the event.

Related

[prj][Android 1.6 Donut][AOSP][Theme Noche Oscura][+CAB Install][Ext2 parttion test]

Do Not Bother xdandroid devs, with fillrate or hw3d being faster on donut than on eclair, plz they are not mages, stuff dont just magically work out of no were
Here's what iv been working on, for about a week, its Donut 1.6 AOSP, this rom includes only 2 extra apps aside from the google ones, Since this is based on AOSP i tried to leave it as clean as possible, except of course for the theme i made for it.
This ROM Should pretty much as Stable as Android can get on our Devices, it is also very fast since its based on Donut(no fillrate). If you find any bugs report them on this thread, i will try as best i can to fix it. And yes i know the Date in the status bar is still Default color(black) i will fix it as soon as i find the exact place to change it.
Click to expand...
Click to collapse
Ok now Screen Shots:
Whats Working:
Wifi
Gsensor: (to some extent))
hw3d:
SIM Syncing:
Mass Storage: (For this to work use massstoragerootfs.zip, and replace it with default one, Be warned mass storage is buggy once you mount the SDcard you cannot unmount it, also after you do mount it android will keep mounting the sdcard regardless you want to or not.(this was not made/found out by me it was by gm112, also you have to put the device in active sync mode with usb cable pluged in and then boot android, if not this wont work)
Sound
Incall sound
Speaker sound
Click to expand...
Click to collapse
Whats not working:
BT: (you can try and turn it on but for some reason it turns back off,, no idea why this happens)
Camera(most ppl knows this..)
GPS(libhardware_legacy need to be backported)
Click to expand...
Click to collapse
EXt2 partition's test Build 08.1.10
follow this link http://forum.xda-developers.com/showpost.php?p=7454855&postcount=39
Click to expand...
Click to collapse
[Root access fix][08.01.10]: Place this in Storage Card/andboot/conf and replace the file
http://www.mediafire.com/?sn84lv46b9a244l
Click to expand...
Click to collapse
Download Link [Normal Package][Update1 07.30.10][Uploading]:
http://www.mediafire.com/?ckf3efoulip3fbx
Changes:
added
neocore
sysmonitor
updated task killer
added estrongs file manager
notification colors update(makes notifications readable)
removed adw launcher(forgot to remove it before releasing Rom)
Click to expand...
Click to collapse
Download Link [Normal Package]:
http://www.mediafire.com/?05y05ir1dni3y5r
Click to expand...
Click to collapse
Download Link[Cab installation][install this in to the storage card]
http://www.mediafire.com/?9ayziouku7f5r5p
Click to expand...
Click to collapse
Notice:
If you chose this method of installation, make shure after it is done installing, navigate to Storage Card/andboot, in there look for STARTUP CONFIG folder inside you will find different startup.txt for each device, pick the one right for your Device and copy it to your andboot folder
Click to expand...
Click to collapse
Download Link for Mass Storage enabled rootfs.img[this is for ppl that are using the cab installation method]
http://www.mediafire.com/download.php?i4pydnm4ywkeaki
Click to expand...
Click to collapse
And remeber you can always find me in freenode, #xdandroid,#htc-linux, under Unholy
You forgot, Non working:
Camera?
Mr.Sir said:
You forgot, Non working:
Camera?
Click to expand...
Click to collapse
i can put that up but.. most ppl know camera is not working on our kernel, dint think it was necessary to specify that.
support chinese?
I'm donwloading...will try soon
edit: is fast and stable and the theme is awesome,good job
232603 said:
support chinese?
Click to expand...
Click to collapse
its does not, but i will look into this and try to add support for it
EDIT: look here for the chinese language apks, install them and see how it goes, http://bbs.hiapk.com/thread-65370-1-1.html
HELICOPTER88 said:
I'm donwloading...will try soon
edit: is fast and stable and the theme is awesome,good job
Click to expand...
Click to collapse
im glad you like it, enjoy =)
EDIT: btw guys cab install is up, for anyone that might not know how to install the normal package, i made the cab install
I'll check it out and post back results...
Any reason why you went with 1.6? Speed?
arrrghhh said:
I'll check it out and post back results...
Any reason why you went with 1.6? Speed?
Click to expand...
Click to collapse
well for starters the overall speed of donut is just awesome, there other thing is that there is no fillrate on donut so 3dapps,games and 2d games also don't have that slowness and stutter you get in eclair/froyo(they both lack fillrate or should i say a fixed fillrate?) phh would know how to explain fillrate better than me, but anyways basically it stops the screen from filling extra pixels, Do too our screen being vga. This slows down 3dapps considerably, if you want to see this just run lets say Raging Thuder 2 you will notice how fast it is in donut, and how it stutters and seems like a jpg slideshow on elcair/froyo
siulmagic said:
well for starters the overall speed of donut is just awesome, there other thing is that there is no fillrate on donut so 3dapps,games and 2d games also don't have that slowness and stutter you get in eclair/froyo(they both lack fillrate or should i say a fixed fillrate?) phh would know how to explain fillrate better than me, but anyways basically it stops the screen from filling extra pixels, Do too our screen being vga. This slows down 3dapps considerably, if you want to see this just run lets say Raging Thuder 2 you will notice how fast it is in donut, and how it stutters and seems like a jpg slideshow on elcair/froyo
Click to expand...
Click to collapse
Ah, makes sense. I didn't know that stuff about the fillrate either, good info. If only phh could dump all his knowledge into a wiki on a daily basis...
On first impression - very fast, wow! Also, 3g internet works out of the box. Can't seem to get GPS workin tho. Seems like it may be disabled completely, if I only have the GPS option enabled under Security & Location, Google Maps tells me that I need to enable a My Location source in system settings. Tried also allowing the option to let Google use my location to help their services, didn't make a difference. I never see the GPS icon in the notification bar either.
Still amazed at how fast this build is. Very nice! We'll see how battery life is next. It does seem to be going into deep sleep correctly (I get the 'breathe' LEDs...)
arrrghhh said:
Ah, makes sense. I didn't know that stuff about the fillrate either, good info. If only phh could dump all his knowledge into a wiki on a daily basis...
On first impression - very fast, wow! Also, 3g internet works out of the box. Can't seem to get GPS workin tho. Seems like it may be disabled completely, if I only have the GPS option enabled under Security & Location, Google Maps tells me that I need to enable a My Location source in system settings. Tried also allowing the option to let Google use my location to help their services, didn't make a difference. I never see the GPS icon in the notification bar either.
Still amazed at how fast this build is. Very nice! We'll see how battery life is next. It does seem to be going into deep sleep correctly (I get the 'breathe' LEDs...)
Click to expand...
Click to collapse
yea its seems that gps is not working, im gona have to talk to phh about this, im almost shure that gps is only enabled for eclair/froyo not for donut im not shure, i guess google maps works because of triangulation
edit: iv talked to stinebd and phh, they say libhardware-legacy need to be backported for donut in order for gps to work, so that i cannot fix sorry
Cool, thanks. I'll try running this for the remainder of the day to see how battery stacks up. There are a few things I've been missing from newer builds, but for the most part this build is awesome!
arrrghhh said:
Cool, thanks. I'll try running this for the remainder of the day to see how battery stacks up. There are a few things I've been missing from newer builds, but for the most part this build is awesome!
Click to expand...
Click to collapse
hah thx, what sucks is root is not working, hopefully someone here figures how to get it working, its probly the way i do my roms that root access gets broken
siulmagic said:
hah thx, what sucks is root is not working, hopefully someone here figures how to get it working, its probly the way i do my roms that root access gets broken
Click to expand...
Click to collapse
That does suck. I know all of the XDA versions are rooted, but I have no clue what makes them so.
arrrghhh said:
That does suck. I know all of the XDA versions are rooted, but I have no clue what makes them so.
Click to expand...
Click to collapse
i do its the su binary located in /system/xbin, but mine just does not have the right permission, or they get lost when i build the rom
Well the phone is still chuggin. Only issues I've ran into so far are the GPS problems I stated earlier, and ADW keeps getting a force close error every hour or two.
I like LauncherPro better, but that's just personal preference. ADW seems alright, but the random crashes are a little obnoxious. Not that LauncherPro is perfect either
arrrghhh said:
Well the phone is still chuggin. Only issues I've ran into so far are the GPS problems I stated earlier, and ADW keeps getting a force close error every hour or two.
I like LauncherPro better, but that's just personal preference. ADW seems alright, but the random crashes are a little obnoxious. Not that LauncherPro is perfect either
Click to expand...
Click to collapse
im goin to remove awd launcher, that thing FC like crazy(i forgot to remove it before releasing the Rom) anyways use the stock launcher works way better, and i would love to include launcher pro but it does not work on Donut, fede carnales would have to compile it for Donut
siulmagic said:
im goin to remove awd launcher, that thing FC like crazy(i forgot to remove it before releasing the Rom) anyways use the stock launcher works way better, and i would love to include launcher pro but it does not work on Donut, fede carnales would have to compile it for Donut
Click to expand...
Click to collapse
I actually prefer stock over anything else. Any program cooked in seems to be more of a hassle, and limits choice the user has.
On another front, I have almost 4hr uptime with 26% battery reported left. That's... probably about what I've gotten with the other ones. With a lot of standby, I could probably stretch it to 7-9 hrs. Not bad, but with heavy usage it depletes pretty quickly... So no marked improvement over other builds, but certainly not any worse either
arrrghhh said:
I actually prefer stock over anything else. Any program cooked in seems to be more of a hassle, and limits choice the user has.
On another front, I have almost 4hr uptime with 26% battery reported left. That's... probably about what I've gotten with the other ones. With a lot of standby, I could probably stretch it to 7-9 hrs. Not bad, but with heavy usage it depletes pretty quickly... So no marked improvement over other builds, but certainly not any worse either
Click to expand...
Click to collapse
yea battery driver need to be worked on, i head some is taking a look at it on the xdandroid froyo 2.2 thread
siulmagic said:
yea battery driver need to be worked on, i head some is taking a look at it on the xdandroid froyo 2.2 thread
Click to expand...
Click to collapse
There have been small improvements here and there... here's hoping to some breakthru!

Find 7a prospected ROMs with on-screen buttons instead?

Alright, I must say, I'm not a fan of hardware navigations keys. That is a reason as shallow as it can be to some but not for me, I like it on-screen.
So my question is, is there an existing ROMs around that supports that feature even on a phone with hardware navigation keys?
If yes, are they planning to support 7a? Thanks all in advance.
PS: doesn't want to start with the hardware versus on-screen argument(or get a phone with on-screen instead), just want to know if there are ROMs that do that
Afaik there is a xposed framework plugin that enables onscreen buttons
Dat-Guy said:
Afaik there is a xposed framework plugin that enables onscreen buttons
Click to expand...
Click to collapse
good to know:good:
although, personally, I prefer it be built-in into the ROM coz sometimes xposed(or maybe the module) gets in the way of the ROMs' stability, etc. as far as I've seen on other threads
but if that's the last resort, I may still consider that xposed thingy
If I can set the hw buttons behavior I don't see the point in using SW buttons.. The space is used, so why to reduce dimensions of the useful screen?
andriman said:
If I can set the hw buttons behavior I don't see the point in using SW buttons.. The space is used, so why to reduce dimensions of the useful screen?
Click to expand...
Click to collapse
as i've mention, it's my preference and don't want to start an argument with on-screen versus hardware nav keys
to each his own and i understand that
and yes, it's also good if the hardware can be set as back-HOME-recent setup, I can tolerate that(again personally my opinion only)
I just saw One+'s feature regarding switching to on-screen or capacitive keys. That's quite neat being a built-in feature. Oppo 7 hope will have this built into their ROM as well.
Tapatalked from my Nypon
I prefer on screen buttons myself so I can set them up my way (four across in my chosen order) but I cant say I would be willing to give up screen area for them as you would be doing here. Regardless xposed will usually play well with others if you keep it to a minimum, its when you pile on the changes that things usually go wrong. Might be worth a try if nothing else comes up.
i already found a way to disable capacitive buttons and enable onscreen/soft-keys buttons. Its pretty hacky though and involves root and commenting a few things in Generic.kl in system/usr/keylayout. Also adding a line to build.prop
ayysir said:
i already found a way to disable capacitive buttons and enable onscreen/soft-keys buttons. Its pretty hacky though and involves root and commenting a few things in Generic.kl in system/usr/keylayout. Also adding a line to build.prop
Click to expand...
Click to collapse
PA dev to the rescue! Thanks man.?
Rycon33 said:
PA dev to the rescue! Thanks man.?
Click to expand...
Click to collapse
ill see if i can make a flashable zip with this mod
ayysir said:
ill see if i can make a flashable zip with this mod
Click to expand...
Click to collapse
Great, the 7a will be available here at my place next week. So having this mod ready is really good. Just hope there's no delay on the availability here.
While I've generally been "not a fan" of hacks like this, since CM is officially doing it on the OnePlus - I'm going to look into this eventually for Omni. (I think maxwen has already implemented 75%+ of it on the N1...)
With Omni though, my top priority after basic bringup is figuring out a way to have unified storage in an optional way.
ayysir - don't try to use the omni f7a kernel in its current state BTW. I screwed up merging something somewhere in the display code and it IOMMU faults where stock usually does the contsplash handoff.
I love you for this entropy.
Gesendet von meinem MI 2 mit Tapatalk
Entropy512 said:
While I've generally been "not a fan" of hacks like this, since CM is officially doing it on the OnePlus - I'm going to look into this eventually for Omni. (I think maxwen has already implemented 75%+ of it on the N1...)
With Omni though, my top priority after basic bringup is figuring out a way to have unified storage in an optional way.
ayysir - don't try to use the omni f7a kernel in its current state BTW. I screwed up merging something somewhere in the display code and it IOMMU faults where stock usually does the contsplash handoff.
Click to expand...
Click to collapse
Unified storage? Oh yes. That would rock. I have no idea why OPPO chose to go with the ancient implementation of the 3GB partition for apps.
I prefer hardware keys myself, but giving people the choice would be cool.
I can't wait until I get my 7a.
Sent from my HTC One using Tapatalk
Entropy512 said:
While I've generally been "not a fan" of hacks like this, since CM is officially doing it on the OnePlus - I'm going to look into this eventually for Omni. (I think maxwen has already implemented 75%+ of it on the N1...)
With Omni though, my top priority after basic bringup is figuring out a way to have unified storage in an optional way.
ayysir - don't try to use the omni f7a kernel in its current state BTW. I screwed up merging something somewhere in the display code and it IOMMU faults where stock usually does the contsplash handoff.
Click to expand...
Click to collapse
nawh im not, im basically trying to help out which way i can for ya
btw, oppo messed up on back key software keys drawable
ayysir said:
nawh im not, im basically trying to help out which way i can for ya
btw, oppo messed up on back key software keys drawable
Click to expand...
Click to collapse
Omni kernel is now usable - at the very least, the kernel/device tree produces a usable TWRP.
It also builds successfully when using blobs from teamgruntled - but I have yet to actually try flashing it. (plan is to whip up an eng build tomorrow, I'm too busy tonight to make any progress.)
Entropy512 said:
Omni kernel is now usable - at the very least, the kernel/device tree produces a usable TWRP.
It also builds successfully when using blobs from teamgruntled - but I have yet to actually try flashing it. (plan is to whip up an eng build tomorrow, I'm too busy tonight to make any progress.)
Click to expand...
Click to collapse
great bro, its omni's repos?
ayysir said:
great bro, its omni's repos?
Click to expand...
Click to collapse
teamgruntled for blobs temporarily since I might forcepush-rebase the blobs once or twice, kernel/device tree are in omni github.
Current state of the device tree is almost guaranteed to result in massive bogosity if flashed. As in if I'm afraid to flash it to my device you should be too!
Entropy512 said:
teamgruntled for blobs temporarily since I might forcepush-rebase the blobs once or twice, kernel/device tree are in omni github.
Current state of the device tree is almost guaranteed to result in massive bogosity if flashed. As in if I'm afraid to flash it to my device you should be too!
Click to expand...
Click to collapse
i know, the main objective is for me being able to compile it then back track from there
atm though i am recieving this issue: http://jenkins.hostingsharedbox.com...l=93.buildbot.hostingsharedbox.com/20/console
dtb related

Themes / Apps / Mods Solution for non-functioning proximity sensor (for GSIs)

11/05/2022: UPDATED the instructions and the rules.
NOTICE: This method is no longer relevant for the U2-baseband firmware and Android 13-based GSIs, they should work out of the box.
After a couple of weeks of the real-world use of SM-A325 with LineageOS GSI installed, I've found that the phone has no real proximity sensor and that's a real problem. The so called "virtual" proximity sensor mentioned by Samsung is obviously just an emulation done by reading the tilt sensor (vertical position) and the touchscreen (touch anywhere in the upper half).
Almost all of the GSIs use the generic Call app, so just a slight accidental touch with your ear or finger and you can have a whole bunch of functions activated. There is a solution though:
Install the "Automation" app (open-source) by Jens Schröder
Go to the "Rules" tab and press "Add Rule"
Give the new rule some name (e.g. "Turn screen off during call")
Press "Add trigger", "Phone call", "State" = "started", "Call direction" = "any". Press "Save".
Press "Add action", "Turn screen on or off", "Deactivate"
"Save Rule"
If the rule is marked with the yellow dot go to the "Overview" tab, start the service and give the needed permissions
Also press "Control center", "Settings" and make sure that "Start at system boot" is checked.
And another, mode advanced version (if that's too complicated you can just import the attached settings file):
Go to the "Rules" tab and press "Add Rule"
Give the new rule some name (e.g. "Turn screen off during call")
Press "Add trigger", "Phone call", "State" = "started", "Call direction" = "any". Press "Save".
Press "Add trigger", "Device orientation"
Position the phone vertically (Pitch = 0±5) and press "Apply"
Enter tolerances: 180, 70, 180
"Must apply" checked
Press "Save"
Press "Add trigger", "Screen state", "on"
Press "Add action", "Turn screen on or off", "Deactivate"
"Save Rule"
I recommend setting "Signal frequency" in "Device orientation settings" in the settings to 500 ms. This way there will be much lesser chance of lag when phone is lifted up to the ear, while the battery consumption by the Automation app will still remain negligible.
That's it. Now when you receive a call the screen will be turned off. You can turn it on during the call by pressing the side button, the call will not be interruped. When using the advanced version of the rules the side button works only when the device is held horizontally, unfortunately there is no way to improve this but I think that is a very minor issue (or just use the simple version instead).
Updated rules, working with Automation v1.7.6.
This causes an issue in video calling on whatsapp where the phone turns the screen off again and again.
Captain_cookie_200 said:
This causes an issue in video calling on whatsapp where the phone turns the screen off again and again.
Click to expand...
Click to collapse
Try the rule that I am using now. It's much simpler and much more reliable. If it does not work for you then probably this solution is just incompatible with WhatsApp. BTW, I am not using it and don't recommend to anyone as it's the privacy-violating app.
uluruman said:
Try the rule that I am using now. It's much simpler and much more reliable. If it does not work for you then probably this solution is just incompatible with WhatsApp. BTW, I am not using it and don't recommend to anyone as it's the privacy-violating app.
Click to expand...
Click to collapse
oh. btw how do i import these files??? and that small brown message sooo your living without screen turning off on its own? and privacy invading.... WAIT WAS IT TRACKING MY STUFF ALL ALONG?
Captain_cookie_200 said:
oh. btw how do i import these files??? and that small brown message sooo your living without screen turning off on its own? and privacy invading.... WAIT WAS IT TRACKING MY STUFF ALL ALONG?
Click to expand...
Click to collapse
Any free commercial app is doing this. That's why it's free.
uluruman said:
Any free commercial app is doing this. That's why it's free.
Click to expand...
Click to collapse
but aint this open source. its on the f droid store. and over there, there are only open source apps.
and how do i import it btw. the xml file. thanksss
To import the rules put them in some folder, start Automation, press Control center, Import configuration and choose that folder.
Captain_cookie_200 said:
but aint this open source. its on the f droid store. and over there, there are only open source apps.
Click to expand...
Click to collapse
I was talking about WhatsApp, of course.
uluruman said:
I was talking about WhatsApp, of course.
Click to expand...
Click to collapse
oh yes... whatsapp... i am forced because of my school groups and my whole family using it.. otherwise i would ditch it. anyways thanks for your time
It seems that this problem is no longer present at least with the latest Android 13 stock firmware (A325FXXU2CVK3) or even slightly older used together with LineageOS 20.0 or even 19.0. Using the Android 13 firmware also cures another long-standing issue - the non-functional MTP file transfer. Analyzing the kernel source reveals that Samsung obviously abandoned their own f_mtp_samsung driver in favor of the standard f_mtp.
uluruman said:
It seems that this problem is no longer present at least with the latest Android 13 stock firmware (A325FXXU2CVK3) or even slightly older used together with LineageOS 20.0 or even 19.0. Using the Android 13 firmware also cures another long-standing issue - the non-functional MTP file transfer. Analyzing the kernel source reveals that Samsung obviously abandoned their own f_mtp_samsung driver in favor of the standard f_mtp.
Click to expand...
Click to collapse
i am aware. unfortunately gsi's lag alot on android 13 and i was getting almost 1 fps on hill climb racing. yep. i dont know why... thats why im sticking to android 11 firmware.
Captain_cookie_200 said:
i am aware. unfortunately gsi's lag alot on android 13 and i was getting almost 1 fps on hill climb racing. yep. i dont know why... thats why im sticking to android 11 firmware.
Click to expand...
Click to collapse
Hmm. I'm currently using Lineage 20.0 (td version) installed upon the unaltered A325FXXU2CVK3 firmware and I didn't notice any difference in performance.
uluruman said:
Hmm. I'm currently using Lineage 20.0 (td version) installed upon the unaltered A325FXXU2CVK3 firmware and I didn't notice any difference in performance.
Click to expand...
Click to collapse
i see. there was a huge performance drop for me
@uluruman
Hi! First of all sorry for my mechanic English hehehe.
I just broke my proximity sensor cause water... , Now im trying this method but I have a question.
Exist some way to put audio in the calls speaker ( the topside speaker used in calls)? For example, I want to listen some Whatsapp audio in private.
I want to put the smartphone on my ear and then automation change the speaker, besides turn off the screen.
I didn't saw any option, just the script option that I don't know how to use it and the "boardcast" option that i dont know how to use it neither.
Thanks in advance.
ADDJ69 said:
@uluruman
Hi! First of all sorry for my mechanic English hehehe.
I just broke my proximity sensor cause water... , Now im trying this method but I have a question.
Exist some way to put audio in the calls speaker ( the topside speaker used in calls)? For example, I want to listen some Whatsapp audio in private.
I want to put the smartphone on my ear and then automation change the speaker, besides turn off the screen.
I didn't saw any option, just the script option that I don't know how to use it and the "boardcast" option that i dont know how to use it neither.
Thanks in advance.
Click to expand...
Click to collapse
I am sure that Automation can't do that, changing whatever speaker is used for sound output is ruled entirely by the particular phone app.
ADDJ69 said:
@uluruman
Hi! First of all sorry for my mechanic English hehehe.
I just broke my proximity sensor cause water... , Now im trying this method but I have a question.
Exist some way to put audio in the calls speaker ( the topside speaker used in calls)? For example, I want to listen some Whatsapp audio in private.
I want to put the smartphone on my ear and then automation change the speaker, besides turn off the screen.
I didn't saw any option, just the script option that I don't know how to use it and the "boardcast" option that i dont know how to use it neither.
Thanks in advance.
Click to expand...
Click to collapse
there was a app i think i saw on playstore. it wont automate it but u can switch entire audio output to ear piece. then u can revert it back lager manually

Question OnePlus 9 Pro Lineage 19.1 ROM NetHunter Enabled

I picked up a OnePlus 9 Pro, nice phone, and I wanted to run SDR on it but couldn't find a ROM to fit my needs. So, I modified a Lineage 19.1 build to support NetHunter and figured I would share it here in case anyone else was also wanting to do the same.
OnePlus 9 Pro Lineage 19.1 NetHunter Enabled
If you wish to extract the kernel alone, please keep in mind that the VintF compatibility checks were left intact. The compatibility matrices are stored on the System image and you may need that to accompany the kernel.
perelax.
Nice. I just got my OnePlus 9 Pro yesterday and this is exactly what I was hoping for. Perfect timing. I'll check it out and let you know how it goes. Thanks!
Pretty cool work man. Maybe you can edit the topic from Question. I'm sure a lot of people missed this thinking it was another person asking for Nethunter. Good work
Woww!!! Thx man!!! I cant believe that.... It's awesome
Appreciative said:
Pretty cool work man. Maybe you can edit the topic from Question. I'm sure a lot of people missed this thinking it was another person asking for Nethunter. Good work
Click to expand...
Click to collapse
Sorry for the late reply, thanks for the compliment. I thought that the topic might be ambiguous, but its a lot to mention in a title.
Did you try the build? If so, is it working ok?
When I modified the kernel, I checked to make sure that the required dependencies were also selected, so it should be good to go. NetHunter kept crashing before I made the modifications, but it works on my device now.
perelax said:
Sorry for the late reply, thanks for the compliment. I thought that the topic might be ambiguous, but its a lot to mention in a title.
Did you try the build? If so, is it working ok?
When I modified the kernel, I checked to make sure that the required dependencies were also selected, so it should be good to go. NetHunter kept crashing before I made the modifications, but it works on my device now.
Click to expand...
Click to collapse
No, I haven't. Maybe when I get another 9P I'll give it a shot. My daily OS is parrot so I don't think I'd ever need NH on the go but it's still cool. It has been asked about a bunch of times on here, reddit and github for other devices.
And I just meant the "flair" on the post is set to Green "Question". Most people glance over those if they don't think they have the answer. If you can't change it any longer, I'm sure a mod would be happy to change it for you. And then you can get the proper feedback from multiple people on it also.
Is the 9P included wifi card capable of monitor mode or injection, or are you using an external card for those? I remember installing some stuff in one of my Nexus phones to get my Alfas recognized but I never did finish the job on that device.
Also, do you know if it's possible to take advantage of the Adreno gpu for hashcat? Or if there's a mobile equivalent? I'm not sure if there's an API available for the depth needed for something like that. It would be neat to have the onboard gpu increasing hashcat rates tho . Or for someone to make a pcie adapter and I can just carry a spare battery and a 1080ti around with me when I need cracking on the go
Appreciative said:
Also, do you know if it's possible to take advantage of the Adreno gpu for hashcat? Or if there's a mobile equivalent? I'm not sure if there's an API available for the depth needed for something like that. It would be neat to have the onboard gpu increasing hashcat rates tho . Or for someone to make a pcie adapter and I can just carry a spare battery and a 1080ti around with me when I need cracking on the go
Click to expand...
Click to collapse
Even if you had a PCIE adapter... getting any video card, 1080ti or otherwise, working on an ARM chip is not realistic as there are no drivers. And even if you could use the GPU for hashcat it would still be very slow.
Why not just spin up a cloud server with an RTX 4090 or few? You can rent them by the hour. For a full day is only around $30. No need to do it locally... you can just use the phone to capture the handshake, crack it in the cloud via the phone and have the cracked password sent back to your phone. Achieves the same thing you're after but much much faster and without the need to crack it locally on very under powered hardware.
not_the_droid_ur_lookin4 said:
Even if you had a PCIE adapter... getting any video card, 1080ti or otherwise, working on an ARM chip is not realistic as there are no drivers. And even if you could use the GPU for hashcat it would still be very slow.
Why not just spin up a cloud server with an RTX 4090 or few? You can rent them by the hour. For a full day is only around $30. No need to do it locally... you can just use the phone to capture the handshake, crack it in the cloud via the phone and have the cracked password sent back to your phone. Achieves the same thing you're after but much much faster and without the need to crack it locally on very under powered hardware.
Click to expand...
Click to collapse
Carrying around a 1080 otg was a joke. I thought I made that clear when I said carry around a battery, sorry for the confusion or missed sarcasm.
I have been using pooled resources for cracking for ages. We set up hashtopolis and had a bunch of 1080s. I have a different resource now but that wasn't the question anyway. The question was whether someone had a way to use the onboard Adreno gpu to speed up any calculations on mobile. Something similar to hashcat for mobile.
A full day of 4090 for $30 is super interesting tho, I may look into that and compare some speeds of that vs my current pooled resource.
Appreciative said:
Carrying around a 1080 otg was a joke. I thought I made that clear when I said carry around a battery, sorry for the confusion or missed sarcasm.
I have been using pooled resources for cracking for ages. We set up hashtopolis and had a bunch of 1080s. I have a different resource now but that wasn't the question anyway. The question was whether someone had a way to use the onboard Adreno gpu to speed up any calculations on mobile. Something similar to hashcat for mobile.
A full day of 4090 for $30 is super interesting tho, I may look into that and compare some speeds of that vs my current pooled resource.
Click to expand...
Click to collapse
Ok sorry. Sometimes I take things a bit too literally.
Was almost going to mention hashtopolis but was trying to keep it short. That's cool though.
To at least half answer the actual question... it would seem 3d hardware acceleration is possible on a rooted device in a linux chroot. See mesa 3d library / Turnip + Zink https://github.com/Grima04/mesa-turnip-kgsl
Discussion about it here:
[Guide] Running Linux on Android with 3D Acceleration / OpenGL (Root Required)
All credits go to: Hentacler for making Sparkle Meefik for making Linux Deploy Now on to the tutorial! Requirements: Sparkle Linux Deploy Termux Now you have all those apps installed lets continue Open Termux then enter: su Once in root...
forum.xda-developers.com
That doesn't answer if it works with hashcat, but probably it will.
Awesome work! I was hoping this would come out soon. Anyone try out any of the features and see what’s working yet? Injection, monitor mode, internal Bluetooth, etc? I’m debating upgrading to an 8 Pro or 9 Pro, but I wanted to see if the stuff from the unofficial 8 Pro kernel was working here yet.
Thank you for building this ROM and kernel. I have tried many times to get the wireless adapters to work with this. Monitor mode works natively if you find the right version of nethunter or install the nethunter lite zip. But it stops working after update && upgrade. I haven't tested the desktop version yet to see if packet injection works in that mode. But testing injection mode by typing sudo aireplay-ng -9 wlan0 doesn't find any APs and injection doesn't work. If someone has gotten it to work can you help me out.
I got the wireless adapters to work after using the firmware module for magisk. Injection works also. Thank you for making this build
NameIsOptional said:
I got the wireless adapters to work after using the firmware module for magisk. Injection works also. Thank you for making this build
Click to expand...
Click to collapse
Nice! Way to go, dude. By chance did you test HID interfaces? Are you still able to use everything after update && upgrade since you installed the Magisk module?
DomDomPop said:
Nice! Way to go, dude. By chance did you test HID interfaces? Are you still able to use everything after update && upgrade since you installed the Magisk module?
Click to expand...
Click to collapse
I didn't test the hid interfaces or the bluetooth. I did test the packet injection using an Alfa AWUS036NHA. The adapter also still worked after running update and upgrade. After installing the firmware module and restarting. I plugged the adapter in but it didn't light up. So I went to custom commands in the nethunter app and chose start monitor mode on wlan1 and the blue light came right on.
NameIsOptional said:
I didn't test the hid interfaces or the bluetooth. I did test the packet injection using an Alfa AWUS036NHA. The adapter also still worked after running update and upgrade. After installing the firmware module and restarting. I plugged the adapter in but it didn't light up. So I went to custom commands in the nethunter app and chose start monitor mode on wlan1 and the blue light came right on.
Click to expand...
Click to collapse
Aha! Thanks for the update. So this is strictly on external Wifi adapters or was both internal and external working? Sorry, I’d test this stuff myself but I haven’t decided whether I’m gonna get a 9 Pro or just get an 8 Pro and use the official release.
Both worked for monitor mode but I don't know if the internal is capable of packet injection. I tried aireplay-ng's injection test and it didn't say injection mode was working, but it did work with the adapter. Are you certain that the internal can inject on the 8 pro? I've been told that the 7 pro was the last that it worked with. But I could be wrong.
NameIsOptional said:
I got the wireless adapters to work after using the firmware module for magisk. Injection works also. Thank you for making this build
Click to expand...
Click to collapse
Can't you install the Nethunter mod on any device w/Magisk?
I ask bc I've installed it and got chroot installed successfully with different devices as I'm interested in learning to use Kali (been lacking on it tho) but have had problems with newer ROMs on 1+7pro, haven't tried the 9 pro yet but have the device. I like custom heavy OS like crDroid and stuff (certain features I gotta have), so I'm wondering if there is anything specific about this ROM and Nethunter compatibility?
You need the nethunter kernel for packet injection to work properly. This ROM has the kernel built into lineage 19 and everything seems to work fine. The internal WiFi doesn't do injection. But it can be put into monitor mode.
I've got a question:
Is the USB arsenal present on the nethunter app drawer? I'm on Nameless AOSP with nethunter chroot installed and yet I can't access it...
David_#27 said:
I've got a question:
Is the USB arsenal present on the nethunter app drawer? I'm on Nameless AOSP with nethunter chroot installed and yet I can't access it...
Click to expand...
Click to collapse
I got the USB arsenal to work after installing USB gadget tool from f-droid.

Wanting to set native thread priorities for application

I built and installed a custom LineageOS ROM. I have an application that has JNI code and it generates several threads. I want to customize the priority of the threads since it is a live video application. I have tried using pthread_setschedparam and get an EPERM error. I have tried rooting the device and using Magisk to give root privs to my app, but I still get EPERM error. I tried setcap for CAP_SYS_NICE on the apk, but still get EPERM error. Also tried setrlimit(...). I tried going through the pthread_setschedparm code to see what the issue is. In the lineageos source the code it looks like it calls a trap function to SYS_sched.... but I can't seem to find the SYS_sched code. If anyone can tell me how to take control of the thread priorities, that would be a big help. I understand that by taking control, I can 'hang' the system etc. so I have been warned.
Y-
I dunno. Maybe the cgroup makes some limitation?
Maybe try setting to lower priority just to see if anything works.
Renate said:
I dunno. Maybe the cgroup makes some limitation?
Maybe try setting to lower priority just to see if anything works.
Click to expand...
Click to collapse
Thanks but not the direction I need to go.
YileKu said:
Thanks but not the direction I need to go.
Click to expand...
Click to collapse
Well, obviously. Still, it would tell you if any change is allowed.

Categories

Resources