ngoquang2708 / android_device_samsung_vivalto3gvn

Device tree for Samsung Galaxy V SM-G313HZ
7 stars 8 forks source link

Needs a proper SELinux configuration #28

Closed ngoquang2708 closed 8 years ago

ngoquang2708 commented 8 years ago

Track https://github.com/koquantam/android_device_samsung_vivalto3gvn/issues/86 here.

diepquynh commented 8 years ago

Oh dear, lots of RAM. Free to play games :D However, this is a bug of OC Kernel. Seems it exist since patching UKSM screenshot_2016-03-16-19-51-15

ngoquang2708 commented 8 years ago

Haha, huge amount of RAM!

thanhthuy89 commented 8 years ago

share OC kernel !!!

diepquynh commented 8 years ago

@thanhthuy89 On XDA, Galaxy Ace 4 kernel. I've included CM12.1 version too

diepquynh commented 8 years ago

Bro, do you know how to build custom recovery? I need that to test f2fs with the phone's eMMC

ngoquang2708 commented 8 years ago

Replace CM recovery source code with custom recovery source code.

diepquynh commented 8 years ago

Bad news is: My old HDD was accidentally dead, which was in recovery now. I purchased a new HDD and now have to use Windows to compile kernel :D Edit: OK, it has been recovered, so i'm testing it now

diepquynh commented 8 years ago

We need sth in the ROM to let it mount as f2fs, at least with update-binary, since my TWRP can't install the ROM with f2fs zip

ngoquang2708 commented 8 years ago

I don't know. But I think f2fs it not good enough. I tried f2fs on my Raspberry Pi, and when it lose power, the file system is corrupted. It is not the case with ext4.

diepquynh commented 8 years ago

We use battery to power on the phone, so how can it lose power immediately? At least with insta-reboot, which makes the fs corrupted w/o fsync

diepquynh commented 8 years ago

And R.Pi uses SD to boot

diepquynh commented 8 years ago

My 16GB SD has 3GB partitioned f2fs and mkfs.f2fs has successfully mounted it, even formatting CSC partition still be able to mount and copy data there, but I don't understand why the system won't boot with f2fs data partition, at least with me

diepquynh commented 8 years ago

Now i realized that USB OTG was in the kernel source, and it was in defconfig too LOL CONFIG_USB_OTG=y # CONFIG_USB_OTG_WHITELIST is not set # CONFIG_USB_OTG_BLACKLIST_HUB is not set

ngoquang2708 commented 8 years ago

Haha, I don't have a cable to test it :D

diepquynh commented 8 years ago

At first, it was not set, now i have enabled it Need volunteers to test it

diepquynh commented 8 years ago

Surprise, it doesn't work The main OTG source was removed by SPRD, and i need to port it from another kernels, which is a PITA Nevermind, gotta do it when have time

diepquynh commented 8 years ago

CONFIG_USB_OTG just a trick from Linus, doesn't do anything

ngoquang2708 commented 8 years ago

:)

diepquynh commented 8 years ago

Do you know how to make AROMA Installer? I'll get my kernels there, so no need separate boot.img. But... that seems can't be flashed

ngoquang2708 commented 8 years ago

First time heard about it

diepquynh commented 8 years ago

Oh dear

diepquynh commented 8 years ago

It allows to install different versions of ROMs or kernels, just in one zip

diepquynh commented 8 years ago

Yeah, Linux 3.10.18 :D screenshot_2016-03-24-15-36-17

diepquynh commented 8 years ago

Haha, this is what we need for USB OTG. Our OC Kernel missing these, so OTG doesn't work https://github.com/sprd-dev/kernel_common/tree/sprdroid4.4/drivers/usb/gadget/dwc_otg

ngoquang2708 commented 8 years ago

Our current kernel tree has that source. Just need some configuration in fstab. I made some modification in fstab to support it in the future (when I have a OTG cable :D). On 28 Mar 2016 12:33, "Quyền" notifications@github.com wrote:

Haha, this is what we need for USB OTG. Our OC Kernel missing these, so OTG doesn't work

https://github.com/sprd-dev/kernel_common/tree/sprdroid4.4/drivers/usb/gadget/dwc_otg

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/ngoquang2708/android_device_samsung_vivalto3gvn/issues/28#issuecomment-202241198

diepquynh commented 8 years ago

Yes, but missing some codes, which is needed for OTG I've compiled, but.... white stripes :D

diepquynh commented 8 years ago

2MB more RAM :D screenshot_2016-03-29-12-37-58

ngoquang2708 commented 8 years ago

2G will good :D

diepquynh commented 8 years ago

I'll give you the broken OC kernel, so you can have tons of gigabytes instead of 2 :D:D

diepquynh commented 8 years ago

Do you have any ideas about bind mounting with Android fstab?

diepquynh commented 8 years ago

Bro, any ideas about this? http://hastebin.com/izujazakah.xml

diepquynh commented 8 years ago

Nevermind, I found the problem

ngoquang2708 commented 8 years ago

Is that gralloc?

diepquynh commented 8 years ago

Nope I was about making a flag in defconfig that only Marshmallow and Lollipop have to use Permissive SELinux, but fails. Now when I boot CM13, it was in "Enforcing", no wonder it can't boot :D

diepquynh commented 8 years ago

Now let's fix other bugs left. My exams are over

diepquynh commented 8 years ago

Now I got good news here: My soft keys also broken, because I get the phone to the swimming pool :D

You got a good friend, bro :D

And, you're right. FCs everywhere

diepquynh commented 8 years ago

Have to increase zRAM size to avoid memory leak, at least 256MB is enough

ngoquang2708 commented 8 years ago

LOL

ngoquang2708 commented 8 years ago

I have to remove all HAL modules except hwcomposer and gralloc in order to keep the phone in a stable state, not reboot everytime it run out of memory due to memory leak.

diepquynh commented 8 years ago

All of *.scx15.so?

diepquynh commented 8 years ago

Have to say, after booted you must kill SystemUI before it grows memory Else after 10-20mins it'll kill itself, then the phone become normal

ngoquang2708 commented 8 years ago

I am investigating the cause of that memory leak.

diepquynh commented 8 years ago

You should see this: https://code.google.com/p/android/issues/detail?id=195104

ngoquang2708 commented 8 years ago

OK, our media codecs cause it.

diepquynh commented 8 years ago

Anything in logcat? And I see VPX bug. Is that so? Code loop?

ngoquang2708 commented 8 years ago

I think media server keep trying to load those media codecs and failed.

ngoquang2708 commented 8 years ago

Need some patch in source. But, make audio work first :)

diepquynh commented 8 years ago

Let me sync your branch, then add adoptable storage commit IDK Marshmallow even detect the second SD partition

ngoquang2708 commented 8 years ago

I pushed all of it.

ngoquang2708 commented 8 years ago

What funny is that the Cyanogenmod File Manger app does not see the SDCard, but Setting's Storage & USB see :)