yashsingh1/xdaforums huggingface dataset:
[Android Studio] Ultimate Chicken:
This question was also asked in StackOverflow by me. (http://stackoverflow.com/questions/34547745/android-marshmallow-new-file-gives-permission-denied)

My apologies if this has been asked, but the only articles/threads for SELinux explained the policies and didn't have a procedure on Android, OR were not for Android.

Currently writing an app where content (in a small zip file) is downloaded from an external location and stored inside /data/data/package_name_removed/user1/, to be read later.

I currently have a zip file in that directory "Test.zip".

A try-catch loop containing:

//where filename is Test.zip
//and userDir = "user1"
//and sourceContext is passed from the base Activity calling this class that does not inherit Activity
Log.d("Target file is", sourceContext.getFilesDir()+"/"+userDir +"/"+ fileName);
File file = new File(sourceContext.getFilesDir()+"/"+userDir +"/"+ fileName);
ZipFile loadedFile = new ZipFile(file);

Doesn't seem to work in Marshmallow:

D/Target file is: /data/data/package_name_removed/files/user1/Test.zip
W/package_name_removed: type=1400 audit(0.0:11699): avc: denied { open } for name="Test.zip" dev="mmcblk0p29" ino=57426 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:app_data_file:s0 tclass=file permissive=0

"avc" is a SELINUX error according to the documentation.

This is a Log.d of the IOException getMessage; I think this one's generated from the new File() statement:

D/Log_title_omitted: /data/data/package_name_removed/files/user1/Test.zip: open failed: EACCES (Permission denied)

I'm pretty sure I do not need READ/WRITE_EXTERNAL_STORAGE at this point as I'm in a directory that is the app's personal directory, which the app is supposed to have access to anyway.

I don't think I should change SELINUX to Permissive in order for this to work, I can't guarantee this flag is set on any other device but mine.

Any help here? Or is the procedure now to get write permissions to a location that isn't guaranteed to exist?
[Android Studio] Ultimate Chicken:
Answer found on StackOverflow:

Manually copying the file into the app's own data/data/package_name/ directory on a rooted device will not work if SELinux is "enforcing" - The app must own the file by "creating" it. Giving it r permissions across the board isn't enough.

No idea how this is for places requiring READ_EXTERNAL.

My solution involved creating a temporary http download service to pass the file along.
[Redmi Note 2 Q&A, Help & Troubleshooting] Avati1992:
Hi, i used 3dmark days ago to test my redmi note 2, Sling shot is recommended and it use openGl es 3.1 and 3.0 but the test doesn't start, same problem with antutu, the new 3d test have some bugs and don't run good, why this problems? :crying::crying::crying:
[Galaxy Note5 Q&A, Help & Troubleshooting] TheVoices_:
Hey, so I'm really new to Android (this Note 5 is my first Android phone) and I don't know much about firmware flashing, so I thought I would inquire here... I have the SM-N920I model of the phone, but it was a Spark (New Zealand carrier) phone so it's not factory unlocked but it has been unlocked as I can use my Vodafone SIM. Since it has the Spark firmware, there is the Spark boot animation, and I was wondering if I could flash the factory unlocked firmware onto the device to get rid of this and a couple other things that bug me a little with the carrier firmware.

Thanks for any help guys!
[XDA Assist] khatedi:
I'm using samsung galaxy trendplus GT-S7580 android version of Jelly bean 4.2.2. One thing reveal on mind, can I upgrade jelly bean up to lollipop 5 with odin lollipop firmware downloading mode. Any suggestion.
[XDA Assist] v7:
Hello,

Thanks for using XDA Assist.

Here's the link to CM 12.1 for you device.http://xdaforums.com/s7582/development/rom-cm12-1-galaxy-s-duos-2-trend-plus-t3225297

___

v7

XDA Assist
[MDA II, XDA II, 2060 Windows Mobile 6 Upgrading] ipenzyu:
Hi All ..

It's so nice could join in these forum .. I need a help from your the expertise

My Problem:

I cannot do connecting to my computer when the USB for my PC insert to Computer ..:confused:

I've tried to follow some instructions that appear on the mobile but it still same the same ..:(

I need it to upload any data from my computer to my mobile, such as MP3 and some photos ..

I'm sorry for my simple questioned :)

Mine:

Xda II

Windows Vista

ROM Version: 4.20a40CS

ROM date: 08/31/07

Radio Version: 1.17.00

Protocol Version: 1337.28

Your prompt feedback will be appreciated :)

Thanks,
[MDA II, XDA II, 2060 Windows Mobile 6 Upgrading] Rudegar:
"I need it to upload any data from my computer to my mobile, such as MP3 and some photos .."

you could always copy them to a SD card untill the issue is fixed
[MDA II, XDA II, 2060 Windows Mobile 6 Upgrading] utak3r:
Did you checked "Advanced communication" in USB connection properties in "Settings -> Connections" ?
[MDA II, XDA II, 2060 Windows Mobile 6 Upgrading] ipenzyu:
"Did you checked "Advanced communication" in USB connection properties in "Settings -> Connections" ?"

Yes I did, I've checked for it .. but it's still cannot be connecting to My computer ..

Could you advice me for "Microsoft activesync" ?? even I've click to open this software but it still as same ..

thanks for the help ,,
[MDA II, XDA II, 2060 Windows Mobile 6 Upgrading] utak3r:
Ummm... I don't understand, what you're asking for... :confused:

Remember that with WM6 you need ActiveSync 4.5. Check your firewall, too - wcesmgr.exe and wcescomm.exe need to be unblocked.
[MDA II, XDA II, 2060 Windows Mobile 6 Upgrading] Nojahoda:
i had the same trouble, Start>Settings>Connections>Usb to Pc>tick Enable advanced network functionality :)
[MDA II, XDA II, 2060 Windows Mobile 6 Upgrading] Ather:
Why dont u Use Wm5torage......the USb is working fine with me..

chk out this rom..its cooked by me

Read More here : http://xdaforums.com/showthread.php?t=328438

Download here : http://www.megaupload.com/?d=MS86R7ZP
[MDA II, XDA II, 2060 Windows Mobile 6 Upgrading] taim99:
Since your are using Windows Vista, you would need Windows Mobile Device Center 6.1 installed on your PC in order to sync your device with your PC USB or Bluetooth. You can download it from here:

http://www.microsoft.com/windowsmobile/devicecenter.mspx
[MDA II, XDA II, 2060 Windows Mobile 6 Upgrading] andur:
When i recived a sms, the wm6 doesn't advise me in any way, so i don't realice that i got a message.

Also the hima doesn't wake up when a msg is incoming.

Is there any applet like the smsfix from wm5?

Many thanks:)

PD:: This is the best rom i've ever seen... Thanks to Helmi&Tofclock
[Android Q&A, Help & Troubleshooting] zhtengw:
I use Xiaomi Redmi 2 2014812, and using [MENTION=2072381]KumaJay[/MENTION]a's CM 13.0 rom(built at 2015-12-30). Everything works fine except the cdma signal. I can get to the network with LTE data, but cannot make phone calls or send messages.

These are the things I have tried:

--set the Prepered network type to "LTE/cdma auto(PRL)" or "CDMA only"

--dirty flash CM13 rom from kumajaya's CM 12.1 ROM

--clean flash CM13 rom

Does anybody have any ideas? Thank you anyway.

ps: kumajaya's CM 12.1 rom works perfect here.
[Android Q&A, Help & Troubleshooting] firelock123:
hardware not supported or cm13 incomplete
[Android Q&A, Help & Troubleshooting] zhtengw:
It is CM13's bug maybe. But I don't have enough privilege to reply the developement thread of this ROM
[Galaxy Tab S Q&A, Help & Troubleshooting] noxarcana:
I've had my Tab S (T700) since tax time earlier this year and I just found out (like 10 minutes ago) this thing has a heart rate monitor! Anyone else not know this?
[Galaxy Tab S Q&A, Help & Troubleshooting] snapper.fishes:
Er not it doesn't. Unless if you are using a third party app that uses the led flash and camera to read your heart rate.
[Zenfone 5 Original Android Development] tank0412:
What is AOSP?

The Android Open Source Project is the original unmodified version of android. It's the base ROM that all other ROM's work on. There are a few changes from CAF (code aurora forums) and cyanogenmod to get this working for non-nexus devices like ours.

Bug list:

GPS & FM

What is working:

Media (IT IS FIXED) But Youtube can be dead

Audio (IT IS FIXED)

RIL (baseband) (IT IS FIXED)

Touchscreen xD

Image decoding

MTP

Webview

Camera

Sensors

Houdini (stable)

Wi-Fi

Rom features:

First Lollipop AOSP rom

I used proprietary files from WW 3.24.40.87

I used device tree by quanganh2627 for building so this way community will get all fixes

How to flash it:

Step 1:

You should download files for flashing:

File with AOSP rom (aosp-a500cg-userdebug-20032016.zip) :

http://xdaforums.com/devdb/project/?id=13245#downloads

ADB v1.0.32: Download from Google Drive

TWRP 2.8.7.0 recovery by quanganh2627 (new December build): Download from Google Drive

Step 2:

1) Unpack archive with ADB and put TWRP image there.

2) Copy file with rom and gapps to internal/external memory of your phone.

3) Then you should reboot your phone in the droidboot mode. (turn off you gadget then press Turn off button and volume + button)

Then go to the ADB folder and hold Shift + Right Mouse button and write this command:

fastboot flash recovery new-zen5-reco.img

Then you should reboot your phone in the recovery mode. (turn off you gadget then press Turn off button and volume - button)

Step 3:

Then you phone will reboot in the recovery. In the recovery you should instal package with rom.

Step 4:

After flashing, you should format (not wipe) data and cache in the TWRP.

Then you should reboot to system.

Bug reporting:​

Attach logcat and detailed describe the issue. Send this to me (tank0412)

Credits:​

[MENTION=5392204]quanganh2627[/MENTION] (i used his AICP device tree with my bring up for OMNI)

[MENTION=6425564]X AnwarMov[/MENTION] (help for booting + this rom has a kernel which was built by me from X Anwar source)

morrey from 4PDA. (THis guy helped to fix RIL)

USING MY ROM AS BASE FOR YOUR ROM IS DENIED

IF YOU IGNORE IT, I WILL ASK MODERATOR TO DELETE YOUR THREAD

XDA:DevDB Information

AOSP Lollipop by tank0412, ROM for the Asus Zenfone 5

Contributors

tank0412

Source Code: https://github.com/tank0412/aosp_device_asus_a500cg

ROM OS Version: 5.1.x Lollipop

ROM Kernel: Linux 3.10.x

ROM Firmware Required: Unlocked bootloader

Based On: AOSP

Version Information

Status: Beta

Current Beta Version: 2.2

Beta Release Date: 2016-03-20

Created 2016-01-01

Last Updated 2016-03-20
[Zenfone 5 Original Android Development] tank0412:
Changelog (20032016):

Hardware butttons was re-fixed

Fixing video recording using camera app

Using AICP device tree by [MENTION=5392204]quanganh2627[/MENTION] with my bring up to AOSP

Use new kernel. (Minimum frequency was set to 800 mhz to avoid lag)

Default governor of ntw kernel is wheatley

Changelog (10032016):

Audio is fixed

Media is fixed (but you can have troubles with Youtube)

RIL and hardware buttons is OK.

Changelog (29022016):

RIL WAS FIXED

Thx morry from 4PDA

Changelog (17022016):

Minor fixes and improvements

Changelog (06022016):

Trying to fix RIL. (EXPERIMENTAL)

Thx [MENTION=6292495]dgadelha[/MENTION] for his tip. (i used his stock RIL.java decompiled with JADX)

I plan to build few another builds with differrent stock RIL.java which was decompiled using different tools)

Changelog (04022016):

Using blobs files from WW V3.24.40.87

And more

Changelog (07012016):

Houdini was fixed

Rom become much stable

Camera was totally fixed

Minor fixes for audio

Removed many apps from Asus stock.

Changelog (04012016):

Wi-Fi was fixed.

Using another Houdini source.

Unfortunately, RIL stay dead and rom is unstable.

Changelog(02012016):

Houdini was enabled

Bluetooth was fixed

Camera was fixed

Sensors was fixed

New custom kernel is added

New bugs:

Wi-Fi is dead

System is less stable

All launchers are dead

Changelog (01012016):

initial release
[Zenfone 5 Original Android Development] RevanEphys:
Great One [MENTION=5875920]tank0412[/MENTION] you only make a ROM with working Touchscreen only XD i can't wait what other things that working :laugh:
[Zenfone 5 Original Android Development] no_name:
[MENTION=5875920]tank0412[/MENTION] you misspelled moderator :p
[Zenfone 5 Original Android Development] tank0412:
Wi-Fi is working too. xD
[Zenfone 5 Original Android Development] pedromd:
Is it possible to boot boot.img stock ?
[Zenfone 5 Original Android Development] tank0412:
No.

Because stock boot using Selinux of Android 5.0, but Selinux of Androdi 5,1 is needed for my rom.
[Zenfone 5 Original Android Development] RevanEphys:
This AOSP ROM alpha is gonna make a lot of history for the next version and so on :D
[Zenfone 5 Original Android Development] freddy_62:
[MENTION=5875920]tank0412[/MENTION] screenshot?
[Zenfone 5 Original Android Development] tank0412:
http://xdaforums.com/devdb/project/?id=13245#screenshots
[Zenfone 5 Original Android Development] baszu:
May I ask some stupid question?

What's great of 5.1 compare to 5.0?

Why don't you aim for AOSP 5.0, it the same as Asus stock. Maybe, it is easier and/or we don't need to unlock bootloader so everyone can enjoy?
[Zenfone 5 Original Android Development] tank0412:
Main target for me now is fix RIL and Camera on my AOSP rom.

When i do this, i can try to compile AOSP based on 5.0.2 but on this moment i do not plan to do this because i have not any screen freezes.
[Zenfone 5 Original Android Development] no_name:
And one more question that y not 5.1.1 [emoji14]
[Zenfone 5 Original Android Development] tank0412:
Unfortunately, i can not use repo.

So i should download AOSP source from other sources. So i download it from there:

http://xdaforums.com/android/software/sources-android-sources-highly-t3231109

Unfortunatly, there is an Android 5.1.0.

If you find highly compressed AOSP Android 5.1.1, i will build 5.1.1 for community.
[Zenfone 5 Original Android Development] no_name:
What's the size of sources you downloaded?
[Zenfone 5 Original Android Development] tank0412:
3,4 GB (because it was highly compressed)
[Zenfone 5 Original Android Development] no_name:
Check this I think it's smaller than your source

Without repo 2gb

http://xdaforums.com/showthread.php?t=3051687
[Zenfone 5 Original Android Development] X AnwarMov:
rill fix from here

include here from your boardconfig.mk

inclede here from your device.mk

see attactment
[Zenfone 5 Original Android Development] tank0412:
Thank you a lot.
[Zenfone 5 Original Android Development] shobint7:
[MENTION=5875920]tank0412[/MENTION] then u can port marshmellow from above link given??
[Zenfone 5 Original Android Development] tank0412:
All this rom is beta. Bugs are same.

Androdi version is different. And that rom use stock kernel.
[Zenfone 5 Original Android Development] vinsensiusk:
Oowh okay... Thank you
[Zenfone 5 Original Android Development] ChristopherXI:
I'm still waiting for your audio fix Tank. Waiting patiently........
[Zenfone 5 Original Android Development] tank0412:
On this moment i know how to fix audio and media but this way RIL will be dead again.

I am working on it.
[Zenfone 5 Original Android Development] ChristopherXI:
I saw it on the Euphoria rom. That's why you are hesitant to apply it to the other rooms right?
[Zenfone 5 Original Android Development] tank0412:
I published update for Euphoria but RIL became dead.

I can make update for this rom too but RIL will be dead again.
[Zenfone 5 Original Android Development] ChristopherXI:
That's what I'm talking about ?
[Zenfone 5 Original Android Development] dgadelha:
You could help us to fix the RIL if you're able to. All the sources are here.
[Zenfone 5 Original Android Development] ChristopherXI:
I have no experience in Android coding or development. If I want to start learning then I have to afford a good enough computer to work on it. My computer is a Dell Latitude D830. FAR AWAY FROM THE RECOMMENDED SPECS
[Zenfone 5 Original Android Development] dgadelha:
Alright, no problem.

I've already fixed the RIL.

Thanks!
[Zenfone 5 Original Android Development] ChristopherXI:
Damn that was fast. Audio and media too?

New AOSP version up soon?
[Zenfone 5 Original Android Development] dgadelha:
Hi,

It appears that only 1080p MP4 video playback is broken.

And [MENTION=5875920]tank0412[/MENTION] is working on AOSP builds, I work on CM12.1 only for now.

Thanks!
[Zenfone 5 Original Android Development] tank0412:
I plan to compile AOSP build with fixed audio and media tomorrow.

Do not ask for ETA. OK?
[Zenfone 5 Original Android Development] tank0412:
Guys, i just compiled AOSP 5.1.0 build with audio & media fixes but

this build is dead.

i can not figure out why because i used same device tree to build AOSP 5.0.2. and it was OK.

After booting it show a black sreen only. I just tried many different kernel to get logcat. It looks that something wrong with drm && selinux or Houdini

So it will take more time than i expect to release new build with audio and media fixes. Sorry, guys.
[Zenfone 5 Original Android Development] tank0412:
Guys, thank you for your trust a lot.

New build is coming.
[Zenfone 5 Original Android Development] iel0000:
may i know what are the changes,?
[Zenfone 5 Original Android Development] tank0412:
Guys, new build is released. Thx dhadelha.

Changelog:

Audio is fixed

Media is fixed (but you can have troubles with Youtube)

RIL and hardware buttons is OK.

Download:

http://xdaforums.com/devdb/project/dl/?id=17295
[Zenfone 5 Original Android Development] tank0412:
Sure. Looks at the previous post. Build have already been published.
[Zenfone 5 Original Android Development] iel0000:
ow..thats quick.ill try it maybe tomorrow :))
[Zenfone 5 Original Android Development] Emresaygin:
You solve this problems on Aosp 5.0.2 :

Hardware bottons

YouTube maximum quality is 360p

Only one SIM is working

Thankx.
[Zenfone 5 Original Android Development] tank0412:
I used another device tree for building. So hardware buttons is working on this build. Second SIM is not tested because i usually use only one SIM
[Zenfone 5 Original Android Development] Emresaygin:
hmm hardware buttons not work 5.0.2 ? it's true

---------- Post added at 06:02 PM ---------- Previous post was at 06:02 PM ----------

hmm hardware buttons not work 5.0.2 ? it's true?
[Zenfone 5 Original Android Development] tank0412:
Only one hardware button is working on AOSP 5.0.2 xD

On this AOSP 5.1 build all buttons is working.
[Zenfone 5 Original Android Development] RevanEphys:
Well it's only vibrator then , I managed to download the 5.0.2 aosp but i kinda afraid to flash it cause of the hardware button so i cancel it...... and hope both 5.1 and 5.0.2 finish soon enough
[Zenfone 5 Original Android Development] minhtri109:
I don't understand what is it , but wifi can't turn on on my phone

[IMG="1"]http://i.imgur.com/djnDCvf.png[/IMG]
[Zenfone 5 Original Android Development] tank0412:
Try to wipe data, cache and/or reinstall rom.

If it does not help, send me logcat, please.
[Zenfone 5 Original Android Development] minhtri109:
I will test and tell you result

---------- Post added at 02:15 PM ---------- Previous post was at 02:03 PM ----------

I try format data/cache but not success

Here is logcat https://drive.google.com/open?id=0B72NTfPYQ4nINkd3RGl4UG95MVU
[Zenfone 5 Original Android Development] tank0412:
To check you words i installed latest AOSP build.

Wi-fi is working well on my phone. But i saw in logcat that it looks like you installed xposed. Try to re-install rom without everything. Just a archive with rom and wipes.

[IMG="http://www.pixic.ru/i/B0q1q042w1h3I4r1.png"]http://www.pixic.ru/i/B0q1q042w1h3I4r1.png[/IMG]
[Zenfone 5 Original Android Development] minhtri109:
maybe because xposed, i will install rom again
[Zenfone 5 Original Android Development] ronaldotalison:
There is a tested way to root this rom?
[Zenfone 5 Original Android Development] tank0412:
I think that if you install zip archive with SuperSU, it will work.
[Zenfone 5 Original Android Development] tank0412:
i just compiled new AOSP 5.1 build where media and camera problems was fixed.

Unfortunatly, hardware buttons is dead.

https://drive.google.com/file/d/0B-Fin8UxrD6PY3QwMm9FeV9YNGM/view?usp=sharing

Anwyay, i will work to fix it.
[Zenfone 5 Original Android Development] ronaldotalison:
Thanks, the rom is fine still testing.
[Zenfone 5 Original Android Development] ChristopherXI:
Hardware buttons. Volume and power work but the home, back recent button doesn't work?
[Zenfone 5 Original Android Development] tank0412:
Yeah.
[Zenfone 5 Original Android Development] ChristopherXI:
Not a huge problem for me tho. I can just go to build prop to enable nav keys
[Zenfone 5 Original Android Development] tank0412:
New build is released.

Changelog:

Hardware butttons was re-fixed

Fixing video recording using camera app

Using AICP device tree by [MENTION=5392204]quanganh2627[/MENTION] with my bring up to AOSP

Use new kernel. (Minimum frequency was set to 800 mhz to avoid lag)

Default governor of ntw kernel is wheatley
[Zenfone 5 Original Android Development] ChristopherXI:
Vibrator is working fine on the latest build
[Zenfone 5 Original Android Development] cerberosbr:
What is the diference between this ROM and Omni Rom ? Perfomance, APIs ?

I learning android development what is the best of these for me install for study ?
[Zenfone 5 Original Android Development] RevanEphys:
[MENTION=7353659]cerberosbr[/MENTION] Well from my point of view you must have device tree ..... And currently device tree that available is for lollipop and for CM Based ROM (?), so maybe you could do that however the most available rom is always CM based, so you could try develop a CM based ROM, and make a thread of your own so when you have problem don't ask on somebody's thread

Regards
[Zenfone 5 Original Android Development] tank0412:
[MENTION=7243401]resk87[/MENTION] compiled AOSP 5.1.1 rom from latest AOSP source using my device tree.

https://drive.google.com/file/d/0B7jEhXo641J8YWhUeFV4Q0xIZWc/view?pref=2&pli=1

And he asked me to publish a link.

So...
[Zenfone 5 Original Android Development] marceloz5:
You know how to do to have a more powerful sound power like rr or rr leopard?
[Zenfone 5 Original Android Development] cerberosbr:
I just don`t understand why ignorance. but ok thanks
[Zenfone 5 Original Android Development] tank0412:
Why it is so hard for you to read my answer?

http://xdaforums.com/showpost.php?p=65954858&postcount=61
[Zenfone 5 Original Android Development] ronaldotalison:
Worked, thanks
[Zenfone 5 Original Android Development] BaoDanh:
How about setup CHPLAY ?
[Zenfone 5 Original Android Development] tank0412:
CHPLAY ? What is this? :confused:
[Zenfone 5 Original Android Development] ChristopherXI:
It's vietnamese language for Google play store
[Zenfone 5 Original Android Development] Thiago.m_:
RIL is dead on this build

FORGET IT, IT WAS A PROBLEM OF MINE
[Zenfone 5 Original Android Development] quanganh2627:
[MENTION=5875920]tank0412[/MENTION] look at your device's overlay/framework/.../config.xml to fix hardware/virtual keys problems. Must correct with keyevents defined in framework/base
[Zenfone 5 Original Android Development] tank0412:
Thank you a lot.

But i made many experiments with this stuff and i found that it was a fault of vendor folder. (Yeah, it is strange)

If i use your vendor folder, all is OK.

But if i use vendor folder by dhadelha, i get a dead hardware buttons because he deleted few vital libs. (IMHO)

Anyway i have already fixed it. ( I created my blobs mix for AOSP)
[Zenfone 5 Original Android Development] EduDias:
Tank AOSP 5.1.1 ta working RIL?
[Zenfone 5 Original Android Development] tank0412:
I did not test it.
[Zenfone 5 Original Android Development] :
Ril is working in aosp 5.1.1 i use tanks source ;)
[Zenfone 5 Original Android Development] quanganh2627:
Place here link to that vendor or list all of its files,then I'll see what can i do ? Maybe missing some idc/ keylayout files or some oem's ime libs etc...., not sure, i have to see in fact
[Zenfone 5 Original Android Development] tank0412:
Blobs where buttons is OK:

https://github.com/tank0412/aosp_vendor_asus_a500cg

Blobs where buttons is dead:

https://github.com/zf5/android_vendor_asus_a500cg