Is flashlight/brightness RW on all android phones? - Android Software Development

Is /sys/<led device>/brightness writeable on all standard Android phones (if applicable)?
If not, is there a listing of which phones do and do not support writing to that file?

Related

[Q] [Website] Kitchen for ZIP updates

Hello everyone.
I developed a kitchen (it's already online) where you can create zip updates for a lot of apps. Before I sharing it with all you, I need to know one thing - I'm sorry for the question but I only "know" the filesystem of my phone since it was the only android device I used - it's a samsung galaxy spica and I'm not a very active user in this forum for a long time, so I honestly do not know how other devices work.
So what I need to know is: in general, all android phones have /system and /data partition, where apps are saved?
Also, all rooted devices have a recovery which accept ZIP Updates?
Thank you all.
The apps saved to data partition
and the most(if not all) rooted devices can updated via zip files.
dancer_69 said:
The apps saved to data partition
and the most(if not all) rooted devices can updated via zip files.
Click to expand...
Click to collapse
Thanks. I just wanted to be sure.
there are a few things that differ between phone (eg. /sdcard vs. /mnt/sdcard) but I'm fairly certain that all of them will have /system and /data. It just wouldn't make sense otherwise.

[Q] How can I access files across users in 4.2?

I'm having a little trouble with sharing music and videos between users in 4.2. Is there any way to be able to access them via a file manager or music app. I've been messing around with it for awhile with no luck.
I'm wondering the same thing.
I know that /sdcard/ now links to /storage/emulated/legacy/ or /storage/emulated/[user_number] (where user_number is 0 for the main user).
But I haven't been able to access files from another user, even with a root explorer or terminal emulator. I can change the permissions on the directories, but I never see any files in them.
Does anyone know? I couldn't find any documentation on this...
It's not on mine, but the rest of the family just got a Transformer and a Nexus 7. It's pretty bad if you can't share across users, they really need to fix that if it's not currently possible.
Bump.
I also want to know how to share the media files with different users. I know that it's good to separate some private folders but we still need to have some common folders that every user can access.....
Yeah, have to agree we need to have some "Common" folders across users. I want media I choose to be available across users. I like the idea of walled off access per user, but some shared folder goodness would be appreciated.
I like the idea of having to "install" apps for each user (It fakes the download and install essentially). It will be nice when apps will have multi user support such as the Kindle app so that different users can be at different places in the same book even.
admin
The tablet owner (which the tab already knows to be user 0) should have administrator privileges. it's my tablet, I want to know what's on it, and share whichever content I choose with whichever user I choose... Not so 'open' now, is it? This will no doubt get a fix before long.
Solution?
Has anyone found a solution to this problem yet? It seems like a major oversight.
DroidRaven said:
Has anyone found a solution to this problem yet? It seems like a major oversight.
Click to expand...
Click to collapse
posted another thread about this...It looks like either no one cares/people have better things to do, or its known to be impossible. I've never seen anything about this aside from the 1 or 2 people asking about it on xda.
You can access other user's file with a root-enabled filebrowser (rootexplorer, ghostcommander, etc.) via accessing the path
Code:
/data/media/<usernumber>/
with root priviledges.
Setting up a a common/shared storage should be fairly easy with a couple of symlinks.
I haven't tried it yet, but might.
The basic idea is to create a folder for the shared storage at like "/data/media/common/" for example and then change permissions and set symlinks accessible for all users at"/storage/common/" or inside each's users own storage....
HellcatDroid said:
You can access other user's file with a root-enabled filebrowser (rootexplorer, ghostcommander, etc.) via accessing the path
Code:
/data/media/<usernumber>/
with root priviledges.
Setting up a a common/shared storage should be fairly easy with a couple of symlinks.
I haven't tried it yet, but might.
The basic idea is to create a folder for the shared storage at like "/data/media/common/" for example and then change permissions and set symlinks accessible for all users at"/storage/common/" or inside each's users own storage....
Click to expand...
Click to collapse
tried that, but im having issues with accessing the linked folder. For some reason everywhere it just shows up as a file (created a symlink to /data/media/shared). SYmlinked plain don't work properly tbh. Permissions are just wierd, in either accounts folders are owned by media_rw and have the same permissions yet, the secondary account cannot acess some of them (notably folders inside /data/media/0) and so on. I have NO idea whats going on with tihs and its very confusing.
As I said, untested basic idea.
And yeah, the permissions of /data are what makes the symlink to /data/media/shared nonworking.
It would be better (and more systemconform) anyways to loopmount it via /dev/fuse, like the actual /sdcard target is as well.
I'll look into this into a bit.
HellcatDroid said:
As I said, untested basic idea.
And yeah, the permissions of /data are what makes the symlink to /data/media/shared nonworking.
It would be better (and more systemconform) anyways to loopmount it via /dev/fuse, like the actual /sdcard target is as well.
I'll look into this into a bit.
Click to expand...
Click to collapse
Ty.
At some point i am hoping this wud become a standard in every AOSP/CM based ROM and so on. shared data is a no brainer.
I've got the same problem..try to make ln -s to the file...but when i try to mv the file or access from other user..it's 0 byte...
Sent from my Nexus 7 using xda app-developers app
will 4.3 provide a solution?
I was wondering if 4.3 addresses this issue or is shared local data not going to happen on android across multiple users?
Put it in the cloud!
Sent from my Lean Mean Jelly Bean Machine. N7

I'm creating a video about using a root file manager; topic suggestions appreciated.

I'm creating a YouTube video about using a file manager with root access to do common tasks. The intent is to provide some background information to a novice-level root user who is starting to customize/tweak his or her phone/tablet. I'm going to be using FX File Explorer as the file manager (full disclosure: it's my own app, but I'll be using only the free components--all local file management stuff, including root, is free and ad-free).
These are the topics I plan to address (so far):
Cautions/dangers: basic information about ways to recover your device if you screw this up, and how you should be certain to have such a solution readily available before you do anything.
Filesystem structure of Android, specifically, /, /system, /data, /cache, and the various user-storage locations.
Remounting core (/, /system) filesystems as read-write, doing work, and then putting them back to read-only.
Backing up files before you destroy them. Will probably demonstrate simply making a copy of /system inside a newly created directory off /data.
Android permissions, important users/groups (e.g. root, sdcard, and sequential per-app users).
Editing text files (probably will demo a DPI adjustment in build.prop)
Disabling permanently installed bloatware. Discussion of deleting/renaming APKs, and the more appropriate method of disabling them via the package manager.
Executing scripts. (FX is actually missing this feature in the current 1.3.1, but it's currently in development and will appear before the video).
Hoping to keep it to < 10-15 minutes, it'll be scripted/edited (multiple takes, etc). The format will be similar to this video:
http://www.youtube.com/watch?v=QWtmoNtOeeQ
I'm looking for advice/suggestions on additional topics/refinements to the above. Any advice would be appreciated, e.g., what scared the daylights out of you when you were a novice at rooting and almost accidentally did _____ while using a root file manager? Or in what way do you see new users most often bricking their phones?

chmod in a Root Shell Fails On A File in /data/data

I hope I am getting this is the right place. If not, please respond with a suggestion of where to place it. Thanks!
First some background. I have written a root app that, to accomplish its work, must chmod some files located under /data/data. This app works as expected on my 3 test devices - all JB or KK and has been published to Play Store where comments from users indicate that it works on other devices including those with Android 5 and 6.
The other day, a user contacts me and says the app doesn't work on his device. Here is some of the device info my app captures:
Linux Version: 3.10.40-perf-g90ddf4a
Android SDK Version: 22
Maker: motorola
Brand: motorola
Product: quark_verizon
Device: quark
Model: XT1254​
My app confirms that the device is indeed rooted and that there is a recent SuperSu app installed. My app is able to chmod directories and some other files. But it cannot manage certain others. I get a result code of 10 but am not sure what exactly that means except some form of failure.
I should add that trying to change the permissions on the file using Root explorer also seems to fail (silently) since right after doing so, the user ran my app and its log shows the file's permissions unchanged.
I wondered if it was an SeLinux issue - something about the files' contexts - but having my app perform ls -Z shows that the contexts (other than the user id - as expected) are identical to those on my 3 devices. Plus there are no context violation warnings in dmesg as I understand there should be were SeLinux the issue.
I have read about extended file attributes and there is one for marking a file immutable. I don't know if this would case a chmod to fail but maybe. I doubt this is the case with these files since I know they are being changed by the file's owning app. But there is no way to confirm this unless the user installs busybox which contains the lsattr command. And he isn't keen on doing that.
Can anyone suggest what might be causing this problem and why it might be restricted to this particular device? I am just completely stumped.
Thanks

Treble

As you may know, Android 8 introduced a lot of new features
Including a new feature called "Treble" which is supposed to reduce the time taken to do updates. But how?
Now let me explain a little bit
Every Android version ever made has a folder called Vendor which has all the things needed to be able to let Android communicate to your phone's hardware.
Now after android 8 that same Vendor underwent a few changes.
First being: Now it is a partition in root not a folder in /system
Second: All phones launching with oreo should support treble.
And finally: Now android will always look for /vendor not /system/vendor
So what does this mean for us well this means that because LG and other manufacturers that don't support treble are using a symlink to /system/vendor so we can move /vendor (Copy in this case as if it dosent work I can revert back to normal). But it isn't as simple as that. As of now, I don't know how to make new partitions in the android root. So what other treble porters have done is to make /oem which is mainly empty and free as the vendor and we do have a /oem that is empty and free.
Step three(Doing the hard things)
So I made a flashable zip with only a META-INF and with a shell script to copy and the updater-script to set permissions and make the needed symlink.
Step 3.5 (flashing it)
Does it boot now?
Yes, but with a twist android undo's all my changes and proceeds to boot meaning it is like i did absolutely nothing.
And the old symlink is still there can someone please help me with these problems
In short please help in bringing unofficial treble to the LG V20 on stock oreo or any rom. I will be fine with testing it on my device no problems with that
[email protected] said:
As you may know, Android 8 introduced a lot of new features
Including a new feature called "Treble" which is supposed to reduce the time taken to do updates. But how?
Now let me explain a little bit
Every Android version ever made has a folder called Vendor which has all the things needed to be able to let Android communicate to your phone's hardware.
Now after android 8 that same Vendor underwent a few changes.
First being: Now it is a partition in root not a folder in /system
Second: All phones launching with oreo should support treble.
And finally: Now android will always look for /vendor not /system/vendor
So what does this mean for us well this means that because LG and other manufacturers that don't support treble are using a symlink to /system/vendor so we can move /vendor (Copy in this case as if it dosent work I can revert back to normal). But it isn't as simple as that. As of now, I don't know how to make new partitions in the android root. So what other treble porters have done is to make /oem which is mainly empty and free as the vendor and we do have a /oem that is empty and free.
Step three(Doing the hard things)
So I made a flashable zip with only a META-INF and with a shell script to copy and the updater-script to set permissions and make the needed symlink.
Step 3.5 (flashing it)
Does it boot now?
Yes, but with a twist android undo's all my changes and proceeds to boot meaning it is like i did absolutely nothing.
And the old symlink is still there can someone please help me with these problems
In short please help in bringing unofficial treble to the LG V20 on stock oreo or any rom. I will be fine with testing it on my device no problems with that
Click to expand...
Click to collapse
There was a thread on here awhile back about treble and as I recall it was eventually determined that treble wouldn't work on our phones
Sent from my LG-H910 using XDA Labs
cnjax said:
There was a thread on here awhile back about treble and as I recall it was eventually determined that treble wouldn't work on our phones
Sent from my LG-H910 using XDA Labs
Click to expand...
Click to collapse
Well that is really sad

Categories

Resources