yashsingh1/xdaforums huggingface dataset:
[General Questions and Answers] glitchbit:
I am trying to work on a custom kernel, but with it being my first one I am stuck with seandroid preventing it from booting. I have tried several different things to either enable it or disable it completely. Either way I seem to be stuck on the same issue of selinux/seandroid hanging me up. Very few devs at this point and time have been able to help me.

Part of the issue I think is that the kernel requires dtb or dt.img as well and that was a missing key for me for awhile. Most guides do not mention it at all, only the most recent of documentation and guides do and that information is quite scattered. The CPU type, msm8226, is the reason for this requirement. Fortunately it is not totally new at this point, so there is some documentation to go by, but still it is quite annoying to run across posts of people acting like it ought to be like magic to understand this stuff. If I knew those people in real life I'd probably punch them and the beat them given the opportunity. I sorta understand the desire to not want someone completely new to this picking it up, but still people - communities exist for a reason.
[General Questions and Answers] theemaster:
Okay, I figured it out.. it's $16.. gonna give these guys a try.

http://www.ebay.com/itm/Unlock-Code...506?pt=LH_DefaultDomain_2&hash=item43d3c12d82
[General Questions and Answers] glitchbit:
This has been a relatively futile effort it seems. As long as the bootloader remains locked, we will not see custom kernels or roms with version 4.4.2 due to the selinux or seandroid feature. The is a chain of trust that has to be broken with the bootloader and that is outside my scope. Exploits are no minor feat.

To quote a member here EVA.

1. Locked bootloaders = only allow signed code in the chain of trust.

2. Signed kernel = doesn't matter if not locked bootloader.

3. "Permissive" kernels refer to SEAndroid set to "Permissive" contrary to "Enforced" which makes any kind of root mods way more complicated.

---------- Post added at 06:28 AM ---------- Previous post was at 06:23 AM ----------

My advice is this, no one cares about the Avant. If you want an unlocked bootloader for it then follow what happens with the S5 Mini and the Grand 2 (with 4.4.2 baseband/bootloader). They share very similar architecture with our phone and if either one sees a bootloader unlock then hit up the guy that does it, because he will likely hold the key to our device as well.
[General Questions and Answers] shabbypenguin:
I can't imagine why you didnt get any help with that attitude. Looking through your post history shows nothing on xda asking for assistance so who are the people that are acting so smug and ignoring you?

The bootloader isnt locked, you flashed a custom recovery which has a custom kernel.
[General Questions and Answers] glitchbit:
I've asked mostly in IRC chat rooms, but as far as the smug attitude goes it was actually a thread somewhere on xda that sort of upset me when I came across it. It was actually very helpful to me, but then it got derailed as the thread creator and another member started bashing people for no good reason. It wasn't like someone even came into the thread with really stupid questions or anything.

I have not yet posted for assistance in here, because I want to make certain I am not missing something obvious and I do not like wasting anyone's time, not if I can find it in an extensive search.

So I was wondering how you managed to get the custom recovery going, as I have also taken the defconfig you had and recompiled my kernel with it as well. The result was the same however in that I got the same error "kernel is not seandroid enforcing". I was wondering if maybe your recovery was some where else in the boot chain avoiding this issue altogether. My issue likely comes from the ramdisk partition as it is booting it checks with various files at least 3 default.prop, init.rc, init.target.rc for what state the kernel should be in most likely. I may not have found all the selinux settings to turn off all of the checks that are in place. Honestly I do not understand why your recovery and kernel works, unless there is just less checks in place, or I am simply screwing up the creation of my own kernel that badly.

Also I guess I am confused, because I thought for this to have an unlocked bootloader that fastboot would be part of it then?
[General Questions and Answers] shabbypenguin:
the zimage you get with the defconfig will boot just needs to be packaged correctly in a boot.img.

https://github.com/OUDhs/android_device_samsung_afyonltetmo/blob/cm-11.0/BoardConfig.mk#L18

this is the device tree and the configuration on what the source gets told on how to pack it all. you need the ramdisk, correct offsets, tags offset, cmdline, dtb, and the zImage. using the dtc in the kernel source you can convert the dts files found in /arch/arm/boot/dts (grab just the ones for your platform) and convert it to a dtb file. for now i would suggest just grabbing the one from the stock boot.img using tools lie this https://github.com/xiaolu/mkbootimg_tools that will spilt a boot.img into all the parts you need as well as repack them.

use the tools to start with but i cannot stress how important it is to learn what happens behind the scenes of the tools as well, far too many people on here dont have a clue on what to do when their android kitchen cant figure out where to go because it hit an error and they dont know whats wrong.

Fastboot is found on many devices, but many oems replace it. both samsung and LG use a special "download mode" they are different but work in a similar fashion.the only way i know of to test for a locked bootloader is when you flash something and it alerts you that your bootloader is screwed. cf-root wouldnt have worked if you guys had a locked bootloader.
[General Questions and Answers] glitchbit:
Thanks, I have been using the xiaolu, but not at the start and as far as kitchens go I haven't really been using any of them I don't guess, just the tools that get mentioned and whatever I need to do to recompile things like mktoolimg and I did waste a lot of time not understanding the dts, dtb, device trees, dt.img mess. I can repackage the stock kernel and ramdisk just fine, so I am sure I have that part down. It's my own kernels that fail.

I have also just now compared your kernel with mine, file size and hex wise and they do not match either way. Initially most of it appears the same and then it changes radically, so maybe it is just my gcc 4.7 toolchain that is screwing it up. It's pretty similar though file size wise, and it always seems to be even when I try to recreate the stock kernel.

-rw-rw-r-- 1 glitchbit glitchbit 4502048 Dec 17 23:12 recovery.img-kernel (yours)

-rwxrwxr-x 1 glitchbit glitchbit 4503728 Dec 17 16:47 zImagePenguin (my recreation of yours)
[General Questions and Answers] shabbypenguin:
i used 4.7 myself so im not sure what all is wrong, have you tried unpacking your image and replacing the zImage with the one in my device tree to see if that works?

i used the source labelled for metropcs the one with the extra 1 in it so im not sure if that would have altered it at all.
[General Questions and Answers] glitchbit:
I have not just yet, but I was about to and frak I think I may know what I did wrong brb... I think when I resolved the dt.img issue I screwed up my offsets.

---------- Post added at 08:08 AM ---------- Previous post was at 07:43 AM ----------

Yea, that was it!! Thanks Shabbypenguin... technically I had all the right pieces, but I really needed to talk it out with someone. Made me look back over my own mistakes. I thought I had the offsets set correctly still in the binary mktoolimg I was using, but that was not the case. I still get the seandroid enforcing is not enabled, but it does not prevent the device from booting or any ill effects for what I am trying to accomplish.

It also seems, as I feared, that enabling bnep on the kernel is not the solution to fixing our bluetooth tethering problem. We are missing some sort of "Internet Access" profile file or connectivity module. It may help to have it explicitly enabled in the kernel, I do not know though.
[General Questions and Answers] glitchbit:
At this stage joy32 or f0mey looks to be my best bet on getting more details on how to handle the bluetooth tethering situation. I believe most other devs that have seemingly dealt with it had the benefit of not having so many things stripped away. These 2 users I think have a better grasp and understanding of it than anyone else and until I hear back all development work my kernel/rom will cease.
[General Questions and Answers] Deceptitech:
Unlocking the T-Mobile...

I unlocked mine easy, I got 2 months of prepay(I use their service anyhow, and just got this device for the account) And all I did was have 2 months under its belt(used the $30.00 wal mart cheapie value price) and used the Device Unlock app. Worked like a charm. Total cost for the unlocked device? Device was on sale for 129.99, tax was 7.00 ish. Service cost was 63.00. Around 200.00 for the device unlocked free and clear. I checked out T-Mobile's terms. You have to only use it for the 2 months paid in order to activate the unlock feature on the device.
[General Questions and Answers] PHIL GRUMPYOLDMAN:
Searched Amazon and found this battery EBL1L7LLA, Samsung brand, for $19.05. it stated it was for the

Avant.
[General Questions and Answers] OutaTheLoneWolf:
Unlock help?

Is there a way to sim unlock the phone without paying?

My sister gave me the phone because she "did not like it"

I have already rooted the phone and someone told me to try this guide

http://xdaforums.com/showthread.php?t=2014982

But the menu options are not the same (phone is updated to the most recent version)

Do I need to downgrade to see if the options are there or is there a better way to unlock the phone?

The unlock app has problems with connecting to the server or denies the unlock (She dose not know where the sim card is)

My contract ends at the 31'st and was hoping to renew with just the contract for $45 a month, this widows phone is killing me inside.
[General Questions and Answers] glitchbit:
Bluetooth Tethering Fixed

Ok, so here it is for anyone that wants it, the fix that brings ALL bluetooth profiles to our device as it should have been from day 1. This may also allow you to tether on MetroPCS or Tmobile over Wifi or bluetooth natively, but I am not 100% certain of this as I am not on either, cricket here, and I did nothing to change the editability of the APN settings that I can recall.

The modified kernel should not be necessary as the source indicates that it was not enabled on the kernel level on other (S5 Mini) phones which is where I got this version of the bluetooth driver.

Please report back if you have any issues. This file is to be flashed using TWRP, but you may want to install ZIPme first and backup your /system/framework/framework-res.apk and /system/lib/hw/bluetooth.default.so.

I never did hear back from the other xda members about the bluetooth profiles, but I did manage to find the info I needed. I needed to take a step back and realize more people care about other bluetooth profiles more than BNEP. Also this link gives a wonderful overview of the entire OS.

https://events.linuxfoundation.org/images/stories/slides/abs2013_zores_jellybean.pdf

If you want to know the full list of BT Profiles you will be getting with this update then go here.

http://www.phonearena.com/phones/co...,Samsung-Galaxy-S5-mini/phones/8726,8573?ft=2
[General Questions and Answers] Masterchief87:
Just so everyone knows I took the newest ota and could no longer install twrp.

[Edit] I went back to the previous firmware (G386TUVU1ANHA) and now it installed.
[General Questions and Answers] glitchbit:
What version does the OTA put you on? I'd be curious to know if the Kies software would download the update in full. If the update changes the bootloader and any of the offsets for the boot.img or recovery.img then that would do it, but I am not certain that that is how it would work.
[General Questions and Answers] Masterchief87:
I think it was G386TUVU1ANK3. Also, after I went back to G386TUVU1ANHA cf auto root wouldn't root the phone anymore. I'm trying to get root back now by restoring a nandroid.

I think the ota modifies the bootloader so it unroots your phone on bootup. I would heavily advise not taking the update if you ever plan on rooting your phone.

I finally got root access back by restoring a nandroid I made after I had rooted it before. For a minute I thought I had lost root permanently. Whew that was close.
[General Questions and Answers] glitchbit:
Yea, I definitely have a couple of nand backups as well. Sounds like it was a real life saver for you lol. Wonder if we can mix and match the update with the hold bootloader?
[General Questions and Answers] Masterchief87:
Honestly I wouldn't be surprised if the only thing the update does is try to prevent you from rooting your phone. This new update for the avant reminds me of when I had a Motorola Photon 4G from Sprint and they put out an update that unrooted the phone and permanently locked the bootloader so you couldn't flash roms anymore. In my honest opinion the main purpose of small over the air updates that don't upgrade your phone to a newer version of Android is to sabotage the efforts of people like us to root and modify our phone.
[General Questions and Answers] glitchbit:
I would not go that far, Apple does the same thing and if I was a company I wouldn't want to support people with all sorts of very unexpected software configurations. That is realistically difficult to support when people are customizing every little thing. It's amazing that Windows works as well as it does considering the mind boggling amount they have to support it, but we can also see the trend of closing the system down more and more with Windows 8. The less hardware configurations you have to support the more you can focus on the software and experience.

It is strange though, because a lot of the best user experience features come from the hacker community and it later gets re-incarnated into the main OS. I would say that a large majority 80-90% of UI innovations in the mobile space is happening on jailbroken iOS devices. The other percent is Android, but they lag behind in the usability and user experience space.
[General Questions and Answers] shabbypenguin:
if teh bootloader needs a new dtb its not a big deal, i need a dump of the new recovery.img and i can make a new recovery in mins. the bootloader isnt locked, it just failed to boot. most ota's also install /system/etc/install-recovery.sh which write stock recovery over custom ones, so if you go from download mode to the phone booted (even just a little bit) you need to boot directly into recovery after flashing twrp in odin otherwise you lose it.

samfirmware has the NK3 tar, for G386T someone download it and upload the recovery.img from it and ill update twrp as needed. im not spending hours downloading a tar thats GB's big for me to continue working on stuff :P.
[General Questions and Answers] glitchbit:
It seems like a pointless update if adding chinese language support was the only thing they have added.

https://support.t-mobile.com/docs/DOC-11068
[General Questions and Answers] Masterchief87:
I guess I got a little carried away there lol.
[General Questions and Answers] kdkirk08:
I took the ank3 Ota and rooted it like 10 minutes ago. Haven't tried flashing twrp though yet.
[General Questions and Answers] glitchbit:
Mr. Shabbs would like the recovery.img. May want to see if this app can back that up and then upload the file here. I am not really interesting in downloading a large tar either for 10mb. I would if the update had something more interesting the chinese language support going for it.

https://play.google.com/store/apps/details?id=com.h3r3t1c.onnandbup&hl=en
[General Questions and Answers] Masterchief87:
Flashify will work for making a copy of the recovery.img also.
[General Questions and Answers] shabbypenguin:
how did you root?
[General Questions and Answers] kdkirk08:
With the cf auto root. It didn't install superuser for some reason but I downloaded it from the play store and it updated the binaries when I opened it up.
[General Questions and Answers] shabbypenguin:
if cf-root worked then the dtb files are the same and twrp will work fine as well :)
[General Questions and Answers] kdkirk08:
Well doesn't chainfires root method flash the stock recovery back after it's done? So wouldn't it be the same recovery from ang6 or whatever version he used to make the root file?

I can pull it, but I think it'll be the recovery from an older version.
[General Questions and Answers] kdkirk08:
well I just flashed twrp and everything seems to be fine. im in recovery right now making a back-up. I was on NK3
[General Questions and Answers] theemaster:
hmm damn these can be bought for $13.. I think I over-paid :eek:

http://stores.ebay.com/unlockboxcanada?_trksid=p2047675.l2563
[General Questions and Answers] Signa112:
AOSP
[General Questions and Answers] lox2013:
I pull the recovery

---------- Post added at 02:55 AM ---------- Previous post was at 02:17 AM ----------

Can u share the link
[General Questions and Answers] lox2013:
https://docs.google.com/file/d/0B89bDvfRDP18ZHdrZE5LOF95cDQ/edit?usp=docslist_api
[General Questions and Answers] kdkirk08:
So is there anything stopping us from having custom roms now? How hard would it be to build a cyanogen rom for this?
[General Questions and Answers] glitchbit:
I am not aware of anything, but I do not cook roms... I don't even make custom kernels either, but I did that because I thought I needed too. Oh how many things I wouldn't even dare to do if I thought I could be lazy.

The source from Samsung is very much incomplete, but I guess it almost always is. The most critical part is that the chipset msm8226 has already seen custom roms, so in that sense the most critical of things should work. Find those that cooked a msm8226 based rom and see if they want to help us - or better yet learn how to do it yourself if you have the free time and stop asking. It's ok to bug people with questions, just keep them specific... you are sitting at a computer on the cusp of all human knowledge a few key strokes away.
[General Questions and Answers] Cobra11Murderer:
That's what makes this phone different from the light the cpu and board is a qualcomm, the light is in house cpu.. we have a great chance on getting a rom to work just time is needed
[General Questions and Answers] kdkirk08:
Wow dude, it was a pretty specific question. Trust me, I've been researching and reading up on how to build one for our device for a while now. But as of right now, we don't even have an insecure boot.img that I'm aware of. And every time I tried to make one it would never compile right and was unable to boot up.

Not trying to start anything, but that last statement came off a little snarky. nobody should be scared to ask a question here. And I asked what I did to see if I was wasting my time on what I was working on or not.
[General Questions and Answers] cragains:
Good point.
[General Questions and Answers] lox2013:
Did twrp work so I can put it on my phone
[General Questions and Answers] Masterchief87:
Yes it does
[General Questions and Answers] lox2013:
Thanks again I flash it now ROMs can wait
[General Questions and Answers] Masterchief87:
I believe that the kernel that ShabbyPenguin made for twrp is insecure. I asked him if it gives adb root privileges and he told me yes. That's what a kernel being insecure means right?

Edit: Looks like I spoke too soon. I opened the tar that contains twrp and all I see is recovery.img.
[General Questions and Answers] shabbypenguin:
samsung has root blocking stuff in the zimage, i removed those to allow adb while in recovery. an insecure kernel is a bit more work, youd have to take that zimage and modify the ramdisk to allow insecure connections.

is there something you need it for?
[General Questions and Answers] Masterchief87:
I don't need it myself. Kdkirk08 mentioned an insecure boot.img having to do with making roms. I myself don't have need for it.
[General Questions and Answers] shabbypenguin:
ah, nah its not needed at all. all it does is make your phone less secure by granting root to any app that uses shell commands. it also saves you the hassle of typing adb shell and then su.
[General Questions and Answers] alucardromero:
Roms, roms, roms!

Here's to an AOSP rom without that gawd-forsaken Samsung overlay...cheers!
[General Questions and Answers] kdkirk08:
That's all I was wanting it for. It's not needed but I'm just picky I guess lol.

Also, can someone tell me which block the kernel installs to? I searched all night and couldn't find an answer.
[General Questions and Answers] glitchbit:
It was a fairly general question, one that gets asked a lot for any new device that does not have a rom built yet. If it has similar guts as other devices and everything is developing along (root, recovery, etc) then it is inevitable - but interests, and time are the main question, not so much the feasibility at this point. I am already swapping files around, but only on stock. I do not have the time nor the inclination to deal with all the bugs a cyanogen or AOSP build would create, but I do hope someone will lol... it just won't be me.

I admit rebuilding the kernel and learning about dt.img took me more effort than what I would think is reasonable. The information should be more freely and openly talked about, but there is a lot of old information that you have to swift through to get to what is current.
[General Questions and Answers] Signa112:
I've tried without success to port the t399 kenel and rom over. I belive i havent hammered out everything in the kernel yet. Believe me im working with a t399 (light) dev atm
[General Questions and Answers] lox2013:
Did your try T-Mobile avant ROMs for this metro PCs avant
[General Questions and Answers] Planterz:
Is that even possible? Admittedly I know next to nothing about kernels, but the T399 has a Samsung Exnyos processor, while the Avant has a Qualcomm Snapdragon 400. Both A7 cortex, but different brands, different GPU manufacturers, etc...
[General Questions and Answers] shabbypenguin:
http://xdaforums.com/showthread.php?t=1687590 :)
[General Questions and Answers] kdkirk08:
Thanks ? I'll give that a try.

Also, has anybody looked at this: http://opensource.samsung.com/reception/receptionSub.do?method=sub&sub=F&searchValue=sm-g386t yet? I'm downloading it right now. But it's taking forever. I don't know if it'll help anything but I'm just gathering and reading everything I can.
[General Questions and Answers] Signa112:
The t399 had a snapdragon in it. But thats not where in having issues... i know next to nothing about kernel development either. This is all trial by fire.
[General Questions and Answers] shabbypenguin:
it did not have a snapdragon, it was an exynos 3xxx

Its just kernel source :)
[General Questions and Answers] kdkirk08:
Do you know where to get the meta-inf folder with the correct path to install the kernel to? Or how to build one? I've been trying to figure this out for a while now. That's really the only thing stopping me from making a flashable stock rom zip.

I tried using a kitchen to do it all for me but it tells me to manually input the kernel path to install to and I can't seem to find it.

Any help from ANYBODY would be appreciated. PM me if you want to maybe team up and try to just get a stock rom that people can work from going.

I downloaded the ANK3 firmware and that's where I'm getting my files from.
[General Questions and Answers] lox2013:
Avant galaxy hopefully u like what I did