FORUMS

[ROM] LineageOS 16.0 UNOFFICIAL - 1.2 [2020-02-11]

1,504 posts
Thanks Meter: 5,875
 
By modpunk, Recognized Contributor on 28th April 2019, 08:00 PM
Post Reply Email Thread
9th February 2020, 08:04 PM |#891  
Junior Member
Thanks Meter: 13
 
More
Right, I've got somewhere with the sdcard permission problems.

sdcardfs isn't doing the app -> userid mapping on app directories, so everything is owned by root. Playing through termux, you can see that root owns the data directories, and so I can't modify anything (this is a problem with internal storage too, just you don't notice it because you can group-write everywhere).

Code:
[email protected]:~$ ls -ld /storage/6058-473E/Android/data/com.termux
drwxr-x--- 3 root everybody 32768 Feb  9 11:22 /storage/6058-473E/Android/data/com.termux
[email protected]:~$ touch /storage/6058-473E/Android/data/com.termux/files/woo
touch: cannot touch '/storage/6058-473E/Android/data/com.termux/files/woo': Permission denied
But I can configure sdcardfs manually though with an adb root shell:

Code:
# mkdir /config/sdcardfs/com.termux/
# echo 10251 > /config/sdcardfs/com.termux/appid
...and now termux can use the SD card:

Code:
[email protected]:~$ ls -ld /storage/6058-473E/Android/data/com.termux
drwxr-x--- 3 u0_a251 everybody 32768 Feb  9 11:22 /storage/6058-473E/Android/data/com.termux
[email protected]:~$ touch /storage/6058-473E/Android/data/com.termux/files/woo
Looks like the Android PackageManagerService should be doing this configuration on bootup: https://android.googlesource.com/pla...ings.java#2539 but I can't find any logcat lines that suggest that this code is being run. Maybe the package manager compiled into the image is too old to support it? Or it's disabled somehow? selinux would be another obvious answer, but given I can do it manually at the commandline this seems unlikely.

If I find out any more will report back.
The Following 12 Users Say Thank You to lentinj For This Useful Post: [ View ] Gift lentinj Ad-Free
9th February 2020, 08:58 PM |#892  
Senior Member
Thanks Meter: 1,523
 
Donate to Me
More
Quote:
Originally Posted by lentinj

Right, I've got somewhere with the sdcard permission problems.

sdcardfs isn't doing the app -> userid mapping on app directories, so everything is owned by root. Playing through termux, you can see that root owns the data directories, and so I can't modify anything (this is a problem with internal storage too, just you don't notice it because you can group-write everywhere).



But I can configure sdcardfs manually though with an adb root shell:



...and now termux can use the SD card:



Looks like the Android PackageManagerService should be doing this configuration on bootup: https://android.googlesource.com/pla...ings.java#2539 but I can't find any logcat lines that suggest that this code is being run. Maybe the package manager compiled into the image is too old to support it? Or it's disabled somehow? selinux would be another obvious answer, but given I can do it manually at the commandline this seems unlikely.

If I find out any more will report back.

thanks, that's interesting and gave me an idea. let's see if that helps

Sent from my Sony Xperia XZ1 Compact using XDA Labs
The Following User Says Thank You to derf elot For This Useful Post: [ View ] Gift derf elot Ad-Free
9th February 2020, 11:59 PM |#893  
Senior Member
Thanks Meter: 96
 
More
Quote:
Originally Posted by albenex

flashed this ROM couple weeks ago..

had to install Magisk & buildprop hack in order to let Netflix work.
then had also to hide magisk to some other apps but i managed to pass SafetyNet and obtain all apps working.

after a week system became laggy with apps crashing and many freezes but a cache/dalvik wipe solved issue.

now i'm working in order to let 3d stuff work again (like 3d creator app - which is the only thing i miss from stock rom)

last but not least, with stock rom i had several GPS weak signal issues like many other user reported.. with this rom GPS is rock solid... don't know if is there any real difference managing it but i fix satellites way faster and signal is strong and precise as first days

Does this rom support sending mms with data off like stock?
10th February 2020, 12:51 PM |#894  
Senior Member
Thanks Meter: 1,523
 
Donate to Me
More
Quote:
Originally Posted by lentinj

Right, I've got somewhere with the sdcard permission problems.

sdcardfs isn't doing the app -> userid mapping on app directories, so everything is owned by root. Playing through termux, you can see that root owns the data directories, and so I can't modify anything (this is a problem with internal storage too, just you don't notice it because you can group-write everywhere).

Code:
[email protected]:~$ ls -ld /storage/6058-473E/Android/data/com.termux
drwxr-x--- 3 root everybody 32768 Feb  9 11:22 /storage/6058-473E/Android/data/com.termux
[email protected]:~$ touch /storage/6058-473E/Android/data/com.termux/files/woo
touch: cannot touch '/storage/6058-473E/Android/data/com.termux/files/woo': Permission denied
But I can configure sdcardfs manually though with an adb root shell:

Code:
# mkdir /config/sdcardfs/com.termux/
# echo 10251 > /config/sdcardfs/com.termux/appid
...and now termux can use the SD card:

Code:
[email protected]:~$ ls -ld /storage/6058-473E/Android/data/com.termux
drwxr-x--- 3 u0_a251 everybody 32768 Feb  9 11:22 /storage/6058-473E/Android/data/com.termux
[email protected]:~$ touch /storage/6058-473E/Android/data/com.termux/files/woo
Looks like the Android PackageManagerService should be doing this configuration on bootup: https://android.googlesource.com/pla...ings.java#2539 but I can't find any logcat lines that suggest that this code is being run. Maybe the package manager compiled into the image is too old to support it? Or it's disabled somehow? selinux would be another obvious answer, but given I can do it manually at the commandline this seems unlikely.

If I find out any more will report back.

Found the issue, thanks a lot again for the tip. This seems to solve a lot of issues with storage. Also tested saving maps to external sdcard with osmand now (which a lot of people wanted and had issues with) and that now works, too.
The Following 9 Users Say Thank You to derf elot For This Useful Post: [ View ] Gift derf elot Ad-Free
10th February 2020, 12:54 PM |#895  
Junior Member
Thanks Meter: 0
 
More
Is there any chance that this will become part of official lineage OS, so it will be provided with OTA updates?
10th February 2020, 06:12 PM |#896  
Junior Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by derf elot

Right, I've got somewhere with the sdcard permission problems.

sdcardfs isn't doing the app -> userid mapping on app directories, so everything is owned by root. Playing through termux, you can see that root owns the data directories, and so I can't modify anything (this is a problem with internal storage too, just you don't notice it because you can group-write everywhere).

But I can configure sdcardfs manually though with an adb root shell:

...and now termux can use the SD card:

Found the issue, thanks a lot again for the tip. This seems to solve a lot of issues with storage. Also tested saving maps to external sdcard with osmand now (which a lot of people wanted and had issues with) and that now works, too.

Does this affect adoptable storage too? For me any apps on the external storage cannot write to their own data directory, which cases apps to essentially "Clear Data" each time they are closed. At the moment adoptable storage is only useful for encrypted file storage. I would be interested if your solution rectifys this.
10th February 2020, 06:18 PM |#897  
Senior Member
Thanks Meter: 1,523
 
Donate to Me
More
Quote:
Originally Posted by Tonux

Does this affect adoptable storage too? For me any apps on the external storage cannot write to their own data directory, which cases apps to essentially "Clear Data" each time they are closed. At the moment adoptable storage is only useful for encrypted file storage. I would be interested if your solution rectifys this.

No idea, I haven't tried that. However, adoptable storage is not really meant to be working with 4.4 kernels and FBE unfortunately (I think 4.9 is the minimum). Even if you do get it to work somehow, there will be a huge performance drop because all files will get doubly encrypted.
10th February 2020, 06:34 PM |#898  
Junior Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by derf elot

No idea, I haven't tried that. However, adoptable storage is not really meant to be working with 4.4 kernels and FBE unfortunately (I think 4.9 is the minimum). Even if you do get it to work somehow, there will be a huge performance drop because all files will get doubly encrypted.

Ah interesting, I hadn't considered that file based encryption would encrypting individual files on a encrypted block device. To that point, what is the best way to encrypt data on an SD card? Stock has the option to enable FBE on the SD card in portable storage however I could never find this option in LOS.

---------- Post added at 07:34 PM ---------- Previous post was at 07:26 PM ----------

Or was it eCryptFS on the SD card, I can't really remember.
10th February 2020, 06:44 PM |#899  
Senior Member
Thanks Meter: 1,523
 
Donate to Me
More
Quote:
Originally Posted by Tonux

Ah interesting, I hadn't considered that file based encryption would encrypting individual files on a encrypted block device. To that point, what is the best way to encrypt data on an SD card? Stock has the option to enable FBE on the SD card in portable storage however I could never find this option in LOS.

---------- Post added at 07:34 PM ---------- Previous post was at 07:26 PM ----------

Or was it eCryptFS on the SD card, I can't really remember.

Yeah, the problem with FBE and adoptable storage is that adoptable storage generates FDE for the whole sdcard and then adds another FBE layer on top (iirc).

I think the best way to go about it, if you definitely want to have adoptable storage with encryption, would be to convert encryption to FDE. With that you obviously loose some of the advantages of FBE as well (e.g. the system still boots without entering the key/pin - useful if your device reboots at night and you set an alarm for example). IIRC, this would involve changing to
Code:
encryptable=footer
from the current
Code:
fileencryption=ice
in the /vendor/etc/fstab.lilac . Then you would need to format the whole data partition again in TWRP and install from scratch. But this is speaking from my shady memory, haven't used FDE in a long while.

edit: Our TWRP should already contain
Code:
/data            ext4      /dev/block/bootdevice/by-name/userdata          length=-16384
, which basically leaves enough free space after the data partition to place the FDE encryption key in the footer.
10th February 2020, 07:06 PM |#900  
Junior Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by derf elot

Yeah, the problem with FBE and adoptable storage is that adoptable storage generates FDE for the whole sdcard and then adds another FBE layer on top (iirc).

I think the best way to go about it, if you definitely want to have adoptable storage with encryption, would be to convert encryption to FDE. With that you obviously loose some of the advantages of FBE as well (e.g. the system still boots without entering the key/pin - useful if your device reboots at night and you set an alarm for example). IIRC, this would involve changing to from the current in the /vendor/etc/fstab.lilac . Then you would need to format the whole data partition again in TWRP and install from scratch. But this is speaking from my shady memory, haven't used FDE in a long while.

edit: Our TWRP should already contain , which basically leaves enough free space after the data partition to place the FDE encryption key in the footer.

Ah cool, I didn't even realise that FDE was still an option nowadays. This might be preferable to me anyways as I'm generally cautious of FBE as it doesn't conceal metadata. Will give this a go tonight, thanks derf!
10th February 2020, 08:41 PM |#901  
Junior Member
Thanks Meter: 6
 
More
Would someone kindly explain about non-gps location providers and UnifiedNlp?

This ROM comes with UnifiedNlp preinstalled - does UnifiedNlp work without the rest of microG, if not, does this ROM come with more microG / patches for signature spoofing (I think not)?

Is location just working out of the box for people, i.e. can they get a usable location in say OsmAnd within 1 minute?

After a day of testing it seems I can only get a location fast when switching to "Preferred networktype: 3g" or "2g". When switched to 3g or 2g I get a location within 1min, otherwise I have to wait 30min if I get a location at all (pure GPS is slow and likely not to work indoors). I've read of this issue (needing to switch to 2g or 3g) somewhere else, but I can't find the reference at the moment...

One thing seems certain to me: people are reporting Android 9 issues of one kind or the other, e.g. https://github.com/microg/android_pa...Nlp/issues/181

Edit: here is the mention of the 2g/3g bug: https://forum.xda-developers.com/sho...&postcount=751

Edit2: A possible fix to the issue: https://forum.xda-developers.com/sho...&postcount=817
The Following User Says Thank You to uhmnothanksgoogle For This Useful Post: [ View ] Gift uhmnothanksgoogle Ad-Free
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes