yashsingh1/xdaforums huggingface dataset:
[Galaxy Tab 10.1 Android Development] LiverpoolFCfan:
Hi decatf,

Still enjoying this fantastic ROM. Thank you.

I posted some time back about an issue with Push functionality for exchange not working in the stock email client. I was searching just now to see if anyone else has reported the issue and found this.

https://android-review.googlesource.com/#/c/119493/

Could you please check to see if this fix is already in the sources you compile from - as I am still having issues with Push. And, if it is not already there could you include it in the next build to see if it fixes the problem.

Thanks
[Galaxy Tab 10.1 Android Development] L3R0N:
[MENTION=4404851]decatf[/MENTION], thank you for adding in the rotation fix. It works great and this ROM works wonderfully on the Tab 8.9. Great work with this ROM. A million thanks to you. :good:
[Galaxy Tab 10.1 Android Development] twhansen:
Thanks a million for this fantastic ROM. It's been my daily driver the last couple of months.

Since the 31012015 release I have had an annoying problem with the tablet freezing up in sleep and I can't wake it. Only solution is to hold the power button for 10 seconds to force it to restart. I had the same problem previously, but at that time it seemed to be caused by Device Control. After removing Device Control (now using No Frills to control CPU frequency to 1200MHz), it was all good, but now it is an issue again.

Any good ideas?

Many thanks for all the hard work you put into this.
[Galaxy Tab 10.1 Android Development] Prowler665:
DeviceControl versions newer then 0.7.0 are messin' up the tab pretty bad. If I recall it right only a clean install of the ROM could help. This was a pretty big issue in the nameless KK-ROM since DC was a integral part of the ROM. Only downgrading DC and a clean install would help back then.

So if you didn' t do a 'clean' install since you removed DeviceControl, that's a pretty good candidate for your problems.

Regards
[Galaxy Tab 10.1 Android Development] twhansen:
I did a clean install a couple of version ago (long after getting rid of DC). So I was hoping not to have to do a clean install again. I was considering if System Tuner Pro could be the culprit.
[Galaxy Tab 10.1 Android Development] Prowler665:
I never used System Tuner Pro so it would be a long shot to point the finger at it, but all apps that "mess around " with system-setting are potentially prone to cause trouble... Using an app with a 'low' set of features dedicated to only one specific task , like NoFrills(Classic), usually minimizes that risk.

And since "it's not a bug unless you can reproduce it on a clean install", fire up TitaniumBackup, backup your user-apps and account/wifi/APN-setings and you're back on track after a clean install in no time.

If you place the TitaniumBackup.apk on your tab you can restore everything from scratch, even account/wifi/APN, in a minimum amount of time ;)

I suggest making a nandroid-backup before (re)installing any suspicious apps so you can get back to a working ROM easily and also pinpoint the offending app.

Regards
[Galaxy Tab 10.1 Android Development] rcmarotz:
Thank you for the advice, it worked.

Another issue.... Has anyone had success or problems with Dice Player? Right now Dice Player will open, but as soon as I try to play a video (mp4) it closes.

-Ryan
[Galaxy Tab 10.1 Android Development] j555:
What version of twrp are you using to flash this on the Tab 8.9? Thanks.
[Galaxy Tab 10.1 Android Development] L3R0N:
Version 2.7.1.0. :)
[Galaxy Tab 10.1 Android Development] clinton77:
I use 2.6.3 try that I'm trying to lose android process has stopped

Sent from my SPH-L900 using Xparent Red Tapatalk 2
[Galaxy Tab 10.1 Android Development] j555:
Thanks for the quick reply. Is that the standard version or the f2fs version.

Thanks again.
[Galaxy Tab 10.1 Android Development] clinton77:
Standard I have p4

Sent from my SPH-L900 using Xparent Red Tapatalk 2
[Galaxy Tab 10.1 Android Development] L3R0N:
Either one works fine. If you intend to use f2fs then use the one with f2fs support. If you have a p5 tablet then please post your questions in the p5 thread. Let's leave this thread to the p4 guys.

Regards,

L3R0N
[Galaxy Tab 10.1 Android Development] honhan0904:
Anyone here get problem when make a video??

And i dont know why sketbook crash when load save. Android 4.4 dont have this problem

Do u need log??
[Galaxy Tab 10.1 Android Development] springbock.arg:
Keybord Dock fot Samsung GT-P7500

Galaxy Tab 10.1 - GT-N7500 (P4) with a Keyboard-Dock for Samsung Galaxy Tab 10.1.

No physical keyboard recognizes only serves to recharge
[Galaxy Tab 10.1 Android Development] decatf:
Send a logcat. I don't know app you're talking about.
[Galaxy Tab 10.1 Android Development] decatf:
Build 20150212 SELinux

p4wifi-lollipop-20150212-selinux.zip

p4wifi-bootimage-20150212-permissive.zip

p4wifi-bootimage-20150212-enforcing.zip

p4-lollipop-20150212-selinux.zip

p4-bootimage-20150212-permissive.zip

p4-bootimage-20150212-enforcing.zip

twrp2850-20150212-p4_experimental.zip

twrp2850-20150212-p4wifi_experimental.zip

Changes:

Added SELinux support

Info:

The only difference in this build is that SELinux support. SELinux is set to permissive by default. Flash the "enforcing" bootimage to enable SELinux enforcing mode.

I have written the device specific rules except for 3G. This means 3G will probably not work in enforcing mode. So those with a 3G tablet please send system logs after using 3G in permissive mode.

All of the SELinux denials are logged in logcat. View them by running:

logcat -d | grep avc:

Installation process:

A clean install is recommended. You must use TWRP 2.8.5.0. Previous versions of TWRP were not compiled with SELinux support.

If you do attempt a dirty flash you should expect that things will break. The problem is that SELinux uses extended filesystem attributes and previously without SELinux this metadata is not set at all. If the filesystem attributes are not set correctly then we get all kinds of permission errors and the ROM won't boot right.

We can use restorecon to fix the SELinux file labels. To do this run restorecon in recovery on the data partition:

restorecon -DFRv /data/
[Galaxy Tab 10.1 Android Development] lexbian:
Have to ask to make sure I don't bone anything up. I would update my TWRP to 2.8.5.0, then flash p4wifi-lollipop-20150212-selinux.zip, then flash the bootimage (permissive or enforcing depending on desire)? Just haven't seen a boot image and rom separate before.
[Galaxy Tab 10.1 Android Development] Prowler665:
The p4(wifi)-lollipop-20150212-selinux.zip contains a bootimage in permissive mode so you can flash the ROM as is. Flash the enforcing bootimage to "enable" SELinux and, if needed, the permissive bootimage to revert to permissive again.

Regards
[Galaxy Tab 10.1 Android Development] decatf:
Yeah, that is right. The ROM zip has the permissive bootimage. I posted both so that people can switch easily.

The only difference in the bootimage is one system property that tells it which SELinux mode to use. In permissive mode there should be no problems because all of the SELinux rules are allowed. Meaning no security is enabled. If there is a whole bunch of filesystem attributes not set correctly it won't affect anything because all of the rules allowed anyways.
[Galaxy Tab 10.1 Android Development] Prowler665:
Attached are the logs for the p4 in permissive mode. Didn't have time to test enforced mode, but some of the denials indicate it will not be much fun ;)

Just a word of clarification on the new TWRP and Advanced Wipe. While it is now default to use 'mkfs' instead of 'rm -fr', this only goes for cache and system. For data the files are simply deleted like they used to, so your internal storage is safe as long as you don't explicitely delete it!

If on the other hand you explicitely choose to format data using 'Wipe/Format Data' or want to switch to F2FS via 'Wipe/Advanced Wipe/Repair or Change File System' your Internal Storage will be gone!

Use 'adb pull/push' to backup your files in /data/media before formating and restore them afterwards. You will need to do this since most likely the files you will need to flash (ROM, GApps and SuperSu) are stored there.

adb pull /data/media/ media/
...
adb push media/ /data/media/
adb shell

echo "3" > /data/.layout_version
chmod 600 /data/.layout_version

chown -R media_rw:media_rw /data/media/
restorecon -FRv /data/media/

reboot

Since /data/media(/0) is what you know as /sdcard or your home-folder, it would be a good idea to move all your music, pictures, whatever to an external storage first to reduce the time for the backup via adb.

On linux you will need root permissions to do this. If 'adb root' doesn't work use 'sudo adb start-server' or 'su' and 'adb start-server' as root. If an adb-server is already running kill it with 'adb kill-server' first.

Edit:

Setting "/data/.layout_version" will prevent the user-data from being migrated to multiuser (again). Without this your data might end up in "/data/media/0/0".

Regards
[Galaxy Tab 10.1 Android Development] eushaun99:
[MENTION=4404851]decatf[/MENTION] isn't this an easier way to change SELinux mode?

https://play.google.com/store/apps/details?id=com.mrbimc.selinux&hl=en
[Galaxy Tab 10.1 Android Development] twhansen:
Amazing work! You just continue keeping this tab alive. Wonderful. Just a quick question. My P4 is running very nicely on the 08022015 release. What is the benefit of having SELinux support?

Thanks.
[Galaxy Tab 10.1 Android Development] spamam1:
1) thank you for the update

2) the links for the TWRP are flipped : P4wifi = P4, and vice versa

Cheers
[Galaxy Tab 10.1 Android Development] decatf:
I added some more sepolicy rules for 3G radio based on logs from [MENTION=5768847]Prowler665[/MENTION]. Run "restorecon -DFRv /data/misc/radio/" after installing it.

p4-bootimage-20150213-enforcing.zip

p4-bootimage-20150213-permissive.zip

It might take a few tries until we have all the necessary rules added.

That will change the mode after boot when the script runs. By setting the system property SELinux can be enabled early in the boot process.

Also that app requires root so the bootimage way will work incase there are some that aren't rooting.

It is for security and provides access control. Processes run under a certain context and are limited to the rules of that context. For example all apps run under the untrusted_app context which has limited set of rules so they don't have unfettered access to the entire OS.

https://source.android.com/devices/tech/security/selinux/index.html
[Galaxy Tab 10.1 Android Development] twhansen:
I don't get the download site. It keeps redirecting me to some advertisement.
[Galaxy Tab 10.1 Android Development] Prowler665:
If you refere to this use Download Now instead of Download.

Regards
[Galaxy Tab 10.1 Android Development] twhansen:
It doesn't work. It doesn't lead anywhere and doesn't download anything.
[Galaxy Tab 10.1 Android Development] decatf:
I will upload it on XDA later. I can't get any files uploaded to XDA today. It's failing with 500 error. Sometimes that happens but it will start working later on.
[Galaxy Tab 10.1 Android Development] Prowler665:
All bootimages, 20150212 & 20150213, have the updater-script for the p4wifi so the p4 won't install as is. I had to change it to p4 first (assuming the p4-bootimages actually are for the p4). :D

Wiped cache & dalvik after flashing and restoring the SELinux context for /data/misc/radio/.

Attached are the logs.

Regards
[Galaxy Tab 10.1 Android Development] decatf:
Looks like nothing changed. Can you check what files are in /data/misc/radio? Use ls -Z /data/misc/radio to show the file contexts. They should be

u:object_r:radio_data_misc_file:s0

But they are probably not since it's still showing avc: denied errors.

If ls doesn't show anything then it might mean files don't have any context set. If that is the case then a plain ls will still show files.
[Galaxy Tab 10.1 Android Development] Prowler665:
~ # ls -Z /data/misc/radio
-rw-rw-r-x radio radio u:object_r:system_data_file:s0 ahrh
-rw-rw-r-x radio radio u:object_r:system_data_file:s0 dakl
-rw-rw-r-x radio radio u:object_r:system_data_file:s0 kmem
-rw-rw-r-x radio radio u:object_r:system_data_file:s0 mgzc

...did another restorecon -DFRv /data/misc/radio/, but no change... :confused:

~ # cat /file_contexts | grep radio
/dev/modem.*	u:object_r:radio_device:s0
/data/misc/sms(/.*)? u:object_r:radio_data_file:s0
/dev/ttyACM0 u:object_r:radio_device:s0

...seems like it is not set in /file_contexts...

Regards
[Galaxy Tab 10.1 Android Development] decatf:
You're right it's not. I forgot to account for the recovery too. That needs to be updated if we want restorecon to use the right radio file contexts while in recovery. You'll have to run restorecon when booted into the ROM so that it will use the file_contexts from the boot image.

Here's another try with a few changes. The install script should be for p4 now too.

p4-bootimage-20150213b-enforcing.zip

p4-bootimage-20150213b-permissive.zip
[Galaxy Tab 10.1 Android Development] Bram Laurens:
Both TWRP Download links are down :/
[Galaxy Tab 10.1 Android Development] eushaun99:
What would be the correct procedure to switch from ext4 to f2fs?

1. Backup data to computer

2. Full wipe

3. Change file systems for data, cache and system partitions to f2fs in twrp.

4. Push ROM zip to tab

5. Flash.

Am I right? Just wanna make sure so I don't mess anything up. And if I don't change the file systems to f2fs I presume it will still be ext4?
[Galaxy Tab 10.1 Android Development] Prowler665:
VERY important!

There is no need for a wipe since you gonna format the partitions anyway.

Correct. Use 'Wipe/Advanced Wipe/Repair or Change File System'

Edit: F2FS on /system does not work atm. Have a look here.

Use ADB-Sideload from within TWRP or 'adb push' from your pc. Here are some hints on using adb.

If you don't explicitely change the filesystem it will stay the default ext4.

Regards
[Galaxy Tab 10.1 Android Development] Prowler665:
Thats not as easy as it sounds as I don't have enough permissions when booted up.

...ok, forget about that - somehow becomming root failed ;)

So I copied /file_contexts to /sdcard while booted up and went back into recovery mode for enough permissions.

cat /sdcard/file_contexts > /file_contexts

restorecon -DFRv /data/misc/radio/
SELinux: Loaded file_contexts from /file_contexts
SELinux: Relabeling /data/misc/radio/ from u:object_r:system_data_file:s0 to u:object_r:radio_data_misc_file:s0.
SELinux: Relabeling /data/misc/radio/mgzc from u:object_r:system_data_file:s0 to u:object_r:radio_data_misc_file:s0.
SELinux: Relabeling /data/misc/radio/dakl from u:object_r:system_data_file:s0 to u:object_r:radio_data_misc_file:s0.
SELinux: Relabeling /data/misc/radio/ahrh from u:object_r:system_data_file:s0 to u:object_r:radio_data_misc_file:s0.
SELinux: Relabeling /data/misc/radio/kmem from u:object_r:system_data_file:s0 to u:object_r:radio_data_misc_file:s0.

ls -Z /data/misc/radio/
-rw-rw-r-x radio radio u:object_r:radio_data_misc_file:s0 ahrh
-rw-rw-r-x radio radio u:object_r:radio_data_misc_file:s0 dakl
-rw-rw-r-x radio radio u:object_r:radio_data_misc_file:s0 kmem
-rw-rw-r-x radio radio u:object_r:radio_data_misc_file:s0 mgzc

Still getting denials thou...

EDIT:

For some reason the changes did not survive a reboot :confused:

I just tried twice to set the SELinux context while booted up. It worked, but didn't survive a reboot...

After a reboot the contxt is back to default.

ls -Z /data/misc/radio/
-rw-rw-r-x radio radio u:object_r:system_data_file:s0 ahrh
-rw-rw-r-x radio radio u:object_r:system_data_file:s0 dakl
-rw-rw-r-x radio radio u:object_r:system_data_file:s0 kmem
-rw-rw-r-x radio radio u:object_r:system_data_file:s0 mgzc

EDIT 2:

I injected the 20150213b bootimage and file_contexts into the 20150212-build ROM and did a clean install - with the same result.

It started up with 'system_data_file' and changing the SELinux context for /data/misc/radio/ didn't survive a reboot...

How is /data/misc/radio/ populated btw? If this is done not only at the first, but on every bootup we will have to set the permissions at the source...

Regards
[Galaxy Tab 10.1 Android Development] decatf:
I don't know for sure but I suspect rild is creating things /data/misc/radio/. This is based on the denials in your logs. There are a whole bunch of requested permissions related to creating files.

Have you tried running under enforcing mode? Newly created files should have the proper context according to the definitions in /file_contexts. For me it is only doing this when running under enforcing mode. In permissive mode when I create files in /data/misc/radio they are system_data_file. In enforcing mode they are created as radio_data_misc_file.
[Galaxy Tab 10.1 Android Development] Prowler665:
I used a ROM with the 20150213b bootimage and file_contexts in enforcing mode for a clean install.

This way /data/misc/radio/ is not populated at all, since rild is denied access...

I double-checked '/file_contexts' to be sure it has the ruleset for /data/misc/radio/...

Files created still get the wrong SELinux context...

cd /data/misc/radio/
touch test
ls -Z
-rw------- root root u:object_r:system_data_file:s0 test

Seems like the file inherits the context from the parent-directory, which is the way it should be, but the parent-directory has the wrong context...

ls -Z /data/misc/
...
drwxrwx--x radio system u:object_r:system_data_file:s0 radio
...

restorecon -DFRv /data/misc/
ls -Z /data/misc/
...
drwxrwx--x radio system u:object_r:system_data_file:s0 radio
...

Regards
[Galaxy Tab 10.1 Android Development] yebminusone:
Samsung hard keyboard not working.

Did you find a resolution to this?

I'm having the same problem with my keyboard dock for my p4wifi not being recognized after installing 20150212 SELinux (enforcing mode) using twrp2.8.5.0. I'm enjoying the new lease on life this is giving my tablet, having come from an older Cynanogen build. Many thanks to the developer. I'd love to get my keyboard working. Any pointers? What data should I collect to troubleshoot this?
[Galaxy Tab 10.1 Android Development] decatf:
p4-bootimage-20150214-enforcing.zip

p4-bootimage-20150214-permissive.zip

I added another entry to explicity define the /data/misc/radio directory. Also added some file permissions that I missed in the sepolicy. I tested permissive mode with a clean install of the p4 ROM and the directory has the right permission without having to do anything else.

See the second post in this thread under "Problem reporting steps".
[Galaxy Tab 10.1 Android Development] Prowler665:
I started again from scratch just to make sure ...

Reinstalled twrp2850-20150212-p4_experimental.

Wiped Dalvik, Cache, System & Data.

Flashed:

p4-lollipop-20150212-selinux.zip

p4-bootimage-20150214-enforcing.zip

SuperSu

...and this time it seemed to work :)

ls -Z /data/misc/radio/
-rw-rw-r-x radio radio u:object_r:radio_data_misc_file:s0 ahrh
-rw-rw-r-x radio radio u:object_r:radio_data_misc_file:s0 dakl
-rw-rw-r-x radio radio u:object_r:radio_data_misc_file:s0 kmem
-rw-rw-r-x radio radio u:object_r:radio_data_misc_file:s0 mgzc

Edit:

Looking at the definitions for the other directories under /data/misc/ one difference disturbes the eye...

If this is a regular expression "?" Matches the preceding element zero or one time. so it would make quite a difference.

/data/misc/radio(/.*) u:object_r:radio_data_misc_file:s0
/data/misc/radio(/.*)? u:object_r:radio_data_misc_file:s0
^

/data/misc/radio(/.*)?
...
/data/misc/radio
/data/misc/radio/.*

Regards
[Galaxy Tab 10.1 Android Development] decatf:
Good find. That was the problem.

I noticed your post above on switching to F2FS says to format system as F2FS but it only works for data and cache partitions. I should have mentioned that when I posted the build.
[Galaxy Tab 10.1 Android Development] CraigWiggins:
F2FS with encryption already on data - just don't!

So I had previously encrypted the tab, then came back to migrate to F2FS.

All *seems* to go well, but after entering the decrypt pin/pass, the boot freezes. Returned data and cache to ext4, but still no go. Finally pushed the "Format Data" button in Wipe to remove encryption and it's all back on the air. I have successfully moved to f2fs on data and cache (system reverts to ext4, and it looks like this is by design, yes?).

So, if someone has already encrypted the tab prior to changing file systems... just DON'T. Remove encryption first, and all will be well. I'm sure some of the more experience folk here are getting a bit of a laugh. I can roll with that. :laugh:

I am reluctant to try encryption now that I *have* switched. Any word on how well that works?

Still loving that my almost four year old device is the most advanced of several Android devices we have- all of which are much newer.
[Galaxy Tab 10.1 Android Development] Gil81:
I'm sorry..I misunderstood you. I think now what you wanted to do was backup your apps and app data.

Unfortunately.. We didn't do this..but you do still have the nand backup in recovery, if you really needed those apps and data.

There is an app called titanium backup on the play store that can backup all apps and data, but since ur coming from ICS to lollipop..I doubt it would install those apps correctly and allow them to run.

Linux based operating systems are great, but as we all know. From our distros on a PC to a laptop, that our beloved Linux can be a little fickle when it comes to package installation....and android is no less fickle either.

If you do want them back..we can try. I'll write up a little guide for you to follow and we will see what happens.

There are a couple different paths we can try, so the options are out there..it will be a matter if the apps run after installation.

I'm at work now, but just hit me back after you see this and let me know. I will check back in a few hours.
[Galaxy Tab 10.1 Android Development] losttheblue:
I have the P7500 and I flashed the p4 file, actually in the setup I skipped the activating cellular network. I went into settings-> About tablet and see the IMEI is Unknown and cannot activate the network. Am I wrong in setup step? :confused:
[Galaxy Tab 10.1 Android Development] spamam1:
I think right now mobile network is not working..

If you need it, need to revert to a different ROM for now,

And wait for a new ROM, or someone figures out how to

Enable in this ROM.
[Galaxy Tab 10.1 Android Development] Gil81:
Here is a Link to a guide for titanium backup and restoring apps and data from a nandroid backup.
[Galaxy Tab 10.1 Android Development] decatf:
The keyboard should be working now for p4. I put up a new build p4-lollipop-20141115.zip.

And yeah. Cellular is not working until I figure out how to get it done. If anyone with a p4 could post a logcat and kernel log after trying to enable cellular that would be great. You can save the logs with the SysLog app. (root is required).
[Galaxy Tab 10.1 Android Development] Gil81:
[MENTION=4404851]decatf[/MENTION]

Nice work Dev..

Good to see this ROM moving forward.

Do you have any plans for incorporating the cm theme engine?
[Galaxy Tab 10.1 Android Development] decatf:
No. It's stock AOSP and I plan to keep that way. I have no plans to make any large changes or mods.

I do have a kernel branch that has a lot of backports for the video driver. But I'm not posting that yet since there is not any noticeable performance improvement and a few big bugs. A lot of things changed under the hood but other than that it was mostly a learning experience for me. I will post if I get around to fixing a couple of things first.
[Galaxy Tab 10.1 Android Development] SystemDoctor:
Whenever I try to charge the tab while it's turned off, it boots up. Is this a new feature of Android L? Also it doesn't respond to touches.
[Galaxy Tab 10.1 Android Development] Gil81:
I've seen that in other aosp and cm builds..not sure if my tab is doing that..it hasn't been shut off for years..lol Well, except to boot recovery or download mode.
[Galaxy Tab 10.1 Android Development] losttheblue:
I'm not actually in need of mobile network cause everywhere I go they have free Wi-Fi there. Just wanted to know if it was personal error