yashsingh1/xdaforums huggingface dataset:
[Xposed General] Chainfire:
Again, please take all this with a grain of salt. Moving target, answered from memory. We are getting more and more into deep specifics that really need to be tested to know the answers for sure.

Is it absolutely necessary to do this from the zygote context, as opposed to the system_server/system_app/platform_app/untrusted_app contexts, where this might actually work? (as stated before zygote seems to have less permissions than the ones it actually transitions to)

Perhaps this specific jar should go into /system/framework (or something) ?

This is a different library than the jar? The init context cannot load executable content from /data, but the contexts apps actually run as can...

chcon u:object_r:app_data_file:s0 && chmod 777 seems to allow most contexts full read/write access to most files. Not necessarily execute. However, if you're talking about a native library and you've moved the loading from where the context was init to a place where the context is now zygote or friends, that has indeed probably solved that problem.

For the time being, it should work as "su", though that may be changed in the future. I'm not so sure this can't be done from zygote, or system_server.

I haven't really investigated this in-depth, but I wasn't able to get some things working from /data with SuperSU, that I was able to get working from /data/data ... Maybe I didn't try the right chcon, just saying what happened.

If you transition from one context to another and a handle is open that the target context should not have access to, that handle will be closed. At the moment, there are only 5 relevant contexts for all this, zygote, system_server, system_app, platform_app, and untrusted_app, but who knows how they will expand that... You could a socket under each of these contexts from zygote and test if you can connect to at least one from each of them, and your problem would be solved for now. I don't like it much, though. Note that you cannot set the context for a pipe for some reason, only for sockets (and files, and ...).

I still think reading config files should be possible with correctly chcon'd and chmod'd files under /data/data somewhere.

You can switch dynamically from zygote to system_server and *_app domains, but you indeed cannot switch back.
[Xposed General] rovo89:
Sure. I'm fully aware that this will require lots of testing. Just trying to figure out the rough direction to go.

Yes, it's absolutely necessary. Xposed has to be initialized in the Zygote process, before anything of the Java stack has been loaded (shortly after the VM was started). At this time, it's still running in the zygote process. Switching to a different context at this time seems very risky to me, as probably none of the subcontexts will contain all the permissions granted to the zygote context (which are needed for other things the Zygote process does).

Should be possible. I put it into /data/data/.../bin now because it's much easier to manage it than requesting root every time.

Yes, it's an .so file which needs to be loaded from the zygote context (not a subcontext) as well. It includes implementations of the native methods and other stuff. But I could probably put it to /system/lib, that simply has to be accessible.

I have tested it again, and unfortunately, the zygote context doesn't seem to be able to access files labeled as "u:object_r:app_data_file:s0" (even when I put them to /system/framework, where it can read files with other contexts). The zygote context is really very limited with regard to file permissions: https://android.googlesource.com/platform/external/sepolicy/+/master/zygote.te

Also the system_server process just seems to have { getattr read write } on these files: https://android.googlesource.com/platform/external/sepolicy/+/master/system_server.te

I'm not used to reading these definitions, but it seems to me that only system_data_file and dalvikcache_data_file could be useful, the latter being r/w from both zygote and system_server. So at least these two could exchange data both ways. And apps could contact the system_server via IPC. It shouldn't be too hard to inject an additional service or receiver via Xposed. It could receive config values which are needed for Zygote and store them in a file which is at least readable by it. Reading data from other apps should be possible with the same requirement as today (world-readable bit).

Too bad. This doesn't solve it, does it? "allow appdomain zygote:fd use;"

I hoped it would... but zygote seems to be the blocker here. I will have to test further if it works better in other contexts.
[Xposed General] defim:
Instead of replacing the file, the command "mount -o bind A B" could help.

So /system has not to be altered, but the "mount" has to be executed in any way. Maybe it is enough to mount sometime, and not before the 1st start of the binary. Additionally i'm not sure if a mounted app_process could be executed (SE).
[Xposed General] rovo89:
There is a tiny catch in that plan: When would you execute that mount command? It would need to be done very early, before app_process is started. I think that would be very hard, if not impossible to achieve for most ROMs.

I didn't know that mount --bind works for single files as well. I'll keep it in mind, maybe it will be handy for something. I already though whether creating a tmpfs mount for file exchange could be useful.
[Xposed General] defim:
Remounting a single file is possible with this command. I'm using this on another device maby times to alter read only files in a rom.

But I dont know where to exectute the mount for android...

Maybe the system could be started unmodifyed, and the app_process is mounted&re-started later. I dont know if this is possible, dont know the Android startup procedure.
[Xposed General] Tungstwenty:
[MENTION=4419114]rovo89[/MENTION] and [MENTION=631273]Chainfire[/MENTION],

Would a decoder for binary sepolicy files be of any use in this context?

As part of the learning curve for this stuff, I not only read a bit of documentation but was also looking at the binary file format. Given that non-AOSP roms don't necessarily have the same SELinux definitions, and if no such tool exists yet, I could put together a few java classes to dump the binary file in a readable form.

Let me know if that would serve any purpose; if so, I just need to work on the "display" part as the parsing of the raw structures is already working, both for an aosp-built file and from my device's ROM. It's not possible to output the info in the original format but it should be readable even if it's a bit more verbose than the *.te sources.
[Xposed General] rovo89:
I think it definitely would be useful. I haven't done enough research yet to know whether this data could be used for some intelligent algorithm to find a good storage position. But for manual analysis, it would be very helpful. If something doesn't work on some ROMs, it would be much easier to ask users to send their sepolicy and *_contexts files than sending them test versions for trial and error.

Anything into that direction would be great to have. A few ideas came to my mind right away, maybe you can check whether they could be realized:

1) Would it be possible to emulate a certain access? Give a certain operation, source and target context and it says yes or no? That's a bit more than a search function, and could especially be useful for some automated compatibility checks on the user's device.

2) Maybe using 1) with wildcards, or with a different approach, would it be possible to find out e.g. which file contexts the zygote domain can write to? Or which operations are allowed for the system server on dalvik cache files?

3) It might be useful to diff two policies, which would be easy if the policy could be dumped into a text file in a reproducable, human readable way. Actually, this would allow for other scripts to perform post-processing and analysis as suggested in 1) or 2) as well, so maybe that could be the answer to the display part.

By the way, my current use case for 3) is that I'm playing around with the L preview and had to recompile sepolicy from AOSP with the userdebug variant in order to get adbd running as root (with the correct context). It's working fine now, but I would really like to know whether I ditched some other important policies with this.
[Xposed General] rovo89:
I just found the "checkpolicy" command, which could be used with the "-b -d - M" options to show some menu:

Select an option:
0) Call compute_access_vector
1) Call sid_to_context
2) Call context_to_sid
3) Call transition_sid
4) Call member_sid
5) Call change_sid
6) Call list_sids
7) Call load_policy
8) Call fs_sid
9) Call port_sid
a) Call netif_sid
b) Call node_sid
c) Call fs_use
d) Call genfs_sid
e) Call get_user_sids
f) display conditional bools
g) display conditional expressions
h) change a boolean value
m) Show menu again
q) Exit

But to be honest, I don't really understand what it can do.
[Xposed General] Chainfire:
Don't have anything useful to add, just posting to let you know I'm still following and reading up on this.
[Xposed General] rovo89:
[MENTION=4322181]Tungstwenty[/MENTION] I checked a bit further. "sesearch" is available on many Linux distributions and seems to work quite well to search for certain rules. Maybe you want to look at it before investing more time.
[Xposed General] Dark_Avenger:
It's Samsung Galaxy S5 G900F with stock firmware/kernel G900FXXU1ANC9.
[Xposed General] Chainfire:
I don't see any obvious issues with it. Maybe I'd still try to do the communication via sockets (if possible) rather than MMAP, but that seems a rather inconsequential difference.
[Xposed General] rovo89:
I'll try that, but I assume it won't work because zygote isn't listed for any socket permissions:

sesearch -A sepolicy_l -c socket
Found 14 semantic av rules:
allow platform_app platform_app : socket { ioctl read write create getattr setattr append bind connect getopt setopt shutdown } ;
allow mtp mtp : socket { ioctl read write create getattr setattr append bind connect getopt setopt shutdown } ;
allow radio radio : socket { ioctl read write create getattr setattr append bind connect getopt setopt shutdown } ;
allow rild rild : socket { ioctl read write create getattr setattr append bind connect getopt setopt shutdown } ;
allow untrusted_app untrusted_app : socket { ioctl read write create getattr setattr append bind connect getopt setopt shutdown } ;
allow system_server system_server : socket { ioctl read write create getattr setattr append bind connect getopt setopt shutdown } ;
allow unconfineddomain domain : socket { ioctl read write create getattr setattr lock relabelfrom relabelto append bind connect listen accept getopt setopt shutdown recvfrom sendto recv_msg send_msg name_bind } ;
allow ppp mtp : socket { ioctl read write getattr setattr append bind connect getopt setopt shutdown } ;
allow sensors sensors : socket { ioctl read write create getattr setattr lock relabelfrom relabelto append bind connect listen accept getopt setopt shutdown recvfrom sendto recv_msg send_msg name_bind } ;
allow time time : socket { ioctl read write create getattr setattr lock relabelfrom relabelto append bind connect listen accept getopt setopt shutdown recvfrom sendto recv_msg send_msg name_bind } ;
allow unconfineddomain port_type : socket name_bind ;
allow thermald thermald : socket { ioctl read write create getattr setattr append bind connect getopt setopt shutdown } ;
allow rmt rmt : socket { ioctl read write create getattr setattr append bind connect getopt setopt shutdown } ;
allow mediaserver mediaserver : socket { ioctl read write create getattr setattr append bind connect getopt setopt shutdown } ;
[Xposed General] Tungstwenty:
Looks good to me.

My main doubt was whether it would be possible to use *inter-process* mutexes not subject to SELinux restrictions. As you mentioned, it should be that way. pthread relies on kernel futexes for the inter-process communication, and there doesn't seem to be any SEL class for that kind of object.

One thing I read here is the possibility of problems in case the (shared) memory being used for the futex operation is swapped out. It isn't clear to me if this is the responsibility of the developer to lock the userspace page where the futext is located, or if the kernel handles it automatically when it creates the futex object pointing to that address. It might be something worth clarifying, since if it is indeed a possibility, it will be something that might be very hard to reproduce in case of occasional failures.
[Xposed General] Chainfire:
Ah yes, I misremembered this. I actually have a root process running above zygote that opens sockets, then reconnect to those from zygote subs (system, untrusted, etc) rather than the zygote context itself.
[Asus Transformer TF700] lartomar2002:
I have a new Hyundai sport suv and I am trying to use this adapter to charge the Asus while traveling:

http://www.amazon.com/Mini-Universa...keywords=silver+bullet+car+charger+ac+adapter. To indicate it is working it has a blue lightthat lights up, which it does. When I plug the Asus cord into the the tablet there is no charging symbol showing over the battery icon. I check the battery settingand it says it is not charging. When I get home I plug the regular ac plug into the home socket (using the same cord) and it starts chsrging. I also tried using my wifes adaper that she uses on her phone but it did not work either. Any suggestions on where to start diagnosing?
[Asus Transformer TF700] _that:
The Transformers use 15 V instead of 5 V. You can charge the tablet (but not the dock) on 5 V, but it will not indicate that it is charging and it will take very long (> 10 hours).
[Asus Transformer TF700] lartomar2002:
How about having it plugged into the adapter and using it, will it keep the battery at the same charge level or will it just slow down battery drain?
[Asus Transformer TF700] berndblb:
If you are using it for anything more than playing music with the screen off, it most likely will drain much faster than the trickle charge can provide.
[Asus Transformer TF700] lartomar2002:
Well hell, none of this is happy news!
[Asus Transformer TF700] berndblb:
How about this then: Buy a power converter for your car from 12v > 110v. Use the original charging cable - bingo.

Just be careful - one of those went up in flames in my truck [emoji12]
[Asus Transformer TF700] lartomar2002:
Which ones would you recommend and please which one caused the fire because I will definitely stay away from it.
[Asus Transformer TF700] berndblb:
Man! That was years ago - I don't remember.

But I'm cheap, so probably the converter was too! [emoji23]

Just get a quality one, read reviews on amazon and you should be fine.
[Asus Transformer TF700] dilfred:
I use one of these to charge my TF700

http://www.amazon.co.uk/Ring-Automotive-RINV120-12V-240V/dp/B002XDERD8/ref=pd_sxp_grid_pt_1_1

The other advantage of it is that it has USB out also so can charge more than 1 device from the plug. A little expensive, but there are cheaper places.
[Asus Transformer TF700] bobkoure:
I got curious and went looking on eBay.

You can get a 12VDC to 15VDC power converter for around $30. It's 70W (you won't need more than 20W - but that's fine)

http://www.ebay.com/itm/DC-DC-12V-15V-5A-70W-Step-Up-Power-Converter-Shockproof-Waterproof-/290998109551?pt=LH_DefaultDomain_0&hash=item43c0d6c56f
[Asus Transformer TF700] lartomar2002:
Guess what, I went digging into my tech boxes and found a 12volt ac/110 volt dc inverter that I had taken out of a motor home I'd sold and had forgotten all about it. Lucky day.:laugh:
[About XDA developers] s!mon:
Hi all,

I hope XDA gives a place for this phone (Samsung Galaxy Trend Plus GT-S7580) too, so those who have it or decide to buy it, can have a place to discuss about it.

******For those of you who already have this phone, please add your requests for a forum section here so the moderators can see.******

Thanks in advance.
[About XDA developers] E.Cadro:
The forum admins choose new device forums carefully, based on several factors. There's no guarantee your device will have a forum created here, but feel free to posts your requests in the thread located here.

**** New Device Forum Requests ***

Thanks.

Thread Closed.
[Sprint Galaxy S 5 Q&A, Help & Troubleshooting] tammyjustin:
Hey all, went to download something and tried to switch it to save to my SD card, I got this message, is there a mass storage toggle or something? Thanks
[Sprint Galaxy S 5 Q&A, Help & Troubleshooting] PhazeDelta1:
Android 4.4.2 changes the way the OS reads and writes to the sd card. CLick the link for the work around.

http://xdaforums.com/showthread.php?t=2715657
[Sprint Galaxy S 5 Q&A, Help & Troubleshooting] tammyjustin:
got an app from play store
[Sprint Galaxy S 5 Q&A, Help & Troubleshooting] cmdrogogov:
This "feature" is exceptionally annoying.
[G2 Q&A, Help & Troubleshooting] eltarod:
So... The quickremote app has the option to learn any remote control even if it isn't on the list. Did anyone make it work? Why can't I? If it helps I'm rooted with CloudyFlex.
[G2 Q&A, Help & Troubleshooting] XxZombiePikachu:
It depends on the remote and it has to be ir remote, I've succeeded with multiple remotes at home

Sent from my Potato powered G2 D800
[G2 Q&A, Help & Troubleshooting] eltarod:
And the sensor is at the flash of the camera?
[G2 Q&A, Help & Troubleshooting] siankatabg:
No.

http://www.slashgear.com/wp-content...-1020_20130807_09_44_39_Pro-LG-G2-580x326.jpg

The black dot on the upper side of the phone is the Ir blaster. Try target it there and you will succeed.
[G2 Q&A, Help & Troubleshooting] eltarod:
Will try again... Thanks all :)
[G2 Q&A, Help & Troubleshooting] E-I-K-E:
Hey,

So I got my D802 today and I want to do the whole Root, Recovery, ROM shenanigans.

But for the love of god I cant connect the phone in MTP mode, so I cant Root, nor install a recovery.

I cant connect to the LG PC Suite either.

Any Ideas? :)
[G2 Q&A, Help & Troubleshooting] somnambulator:
what connection type are u choosing after plugging it into the computer? are u running Windows, Mac, Linux? Windows will work with mtp out of the box but I think Mac and Linux need phone drivers installed. Windows will need drivers when you're ready to "unlock" using adb.

Sent from Tapatalk using my xposed VZW G2 :)
[G2 Q&A, Help & Troubleshooting] E-I-K-E:
Right, so I´m running Win7 64 Bit

I tried multiple USB Ports, rebooting PC and Phone, resetting Phone and now i´m all out of ideas :(

I never had any problems with the other phones I rooted and unlocked on this Computer
[G2 Q&A, Help & Troubleshooting] XxZombiePikachu:
when you first plug in your phone it gives you the option to install the drivers needed to connect in the different modes, if not on the top right corner of the menu with charge/mtp/pc software it should have the option to install the drivers
[G2 Q&A, Help & Troubleshooting] somnambulator:
you never said what connection type you're choosing on the phone after plugging it in. there are a few options and change how the phone is seen by Windows. some options won't have it display as an mtp device or as a drive letter in my computer.

Sent from Tapatalk using my xposed VZW G2 :)
[G2 Q&A, Help & Troubleshooting] siggey:
Usb cable problem?
[G2 Q&A, Help & Troubleshooting] basti2909:
Try toggle usb debugging
[G2 Q&A, Help & Troubleshooting] ugslick:
Really Weird

I'm having the same issue. I'm running OptimusG3 v1.3, I've never had an issue with it before, I used MTP to transfer files yesterday, worked flawlessy, now it won't. I was trying to map the G2 as a network drive, I installed LGPCSuite, a couple of other software that should be inconsequential, and suddenly my phone says connected as MTP, but my laptop won't recognize or show the device in My Computer. I get installing device drivers prompts, I used the hardware and devices troubleshooter which told me 'LGE Android MTP Device has a driver problem' and LGE Mobile USB Modem has a driver problem. Reinstall device driver -> completed, but still not fixed. I installed LG's universal uSB tool or whatever, no fix. I have no idea wth is up (It's not a USB debugging accidental toggle either). I'll try uninstalling PCSuite. I though it would be more useful :(
[Xperia Z2 Q&A, Help & Troubleshooting] Somnium1:
Hello,

I'm currently an owner of an S3 . I've been wanting to upgrade for some time now and I just can't decide what to buy.

I love the M8, but the camera is so awful that I am just not ready to pay a flagship-phone price for a phone like that. (my old s3 beats m8's camera (!!) )

I loved the G3 too , but reading in the GSMaren's review how bad its battery is (aside from 3G talk time , it really isn't that different than my ancient S3 in terms of its battery life which is just ridiculous! )

The Z2 has a boring and an outdated UI which is just a shame for a 2014 phone.

But , its battery ,camera, overall performance are superb. At least compared to its rivals. (Though it seems that the screen is rather dim and dark compared to the S5 and M8).

But my main concern , is that Video shooting and overheating issue.

I don't need to record videos in 4K. But as far as I understand the the overheating issue occurs even when shooting an 1080p video, and that's a problem.

Does 1080p shooting cause the overheating and camera app shut down for everyone?
[Xperia Z2 Q&A, Help & Troubleshooting] ProdigalFather:
If you really think the UI is "boring and outdated" (really?!) it is easily remedied with any launcher of your choice..

Regarding the overheating issue, I have been recording 12 minute 4K videos (it shut down by itself) and 30 minute 1080p videos (I stopped recording, I could have gone longer the phone was warm but not hot at that point) without any issues.

That being said, based on what everyone on here has been saying my experience is not the same as most.

At the end of the day mate, it's a mobile phone. You don't have much to lose picking this over one of the other flagships.
[Xperia Z2 Q&A, Help & Troubleshooting] jawang26:
Have you seen the phone in person and used it? I read a lot of reviews complaining about the brightness but when I got it I was quite surprised I could use it in daylight with no issues. As for the UI you can alway use a launcher or themer to change the look of the phone, as for the 4K video recording it seems to be an issue across all companies I think it's probably being an issue of the hardware not being at that level yet. I am hoping that there will be a software fix for the overheating issues. I'm not sure if you are in the US but there are sellers who are Amazon verified once in a while that will let you do no hassle returns if you dont like it. I was really impressed with the phone but ended up returning it because it was a bit too big for my tastes but I am planning on buying it again when the prices go down. Good Luck!
[Xperia Z2 Q&A, Help & Troubleshooting] Ryland Johnson:
One thing for sure when the price reduces the phone will NOT reduce in size;)

Ryland
[Xperia Z2 Q&A, Help & Troubleshooting] charlie460:
I would have to disagree with you here. The Z2 has a beautiful elegant UI IMO, one of the best Android "skins" aside from stock Android on the flagship devices. I've owned the One M8, Galaxy S3, Galaxy Note 3, and this is my favorite device by far.
[Xperia Z2 Q&A, Help & Troubleshooting] Tomo1971:
I had...well,still have a z2 (its in for repair, after three days of light use the back panel cracked).

I did want to like it, but a few things missing from it that I missed from previously having Samsungs. Yes the ui is cleaner,closer to stock android but the the features of Touchwiz for me, make android better.

Like the swipe left to call/right to text.... Vibrate when there is an unread text, scheduled text messages, block numbers etc.

Ok, apps can be installed to mimic most of these but arnt as fluid as the built in features of Touchwiz.

Also had issues with the volume of notifications and screen brightness in the sun.

Great looking phone tbh, but have a play properly with a demo unit before committing.