yashsingh1/xdaforums huggingface dataset:
[Advantage X7500, MDA Ameo General] weaselcossey:
No, no, you've got it all wrong. What he's trying to say is:

"I can't access nothing."

1. Nothing is inaccessible.

Now let'S break this down.

Nothing (subject, which oddly enough is a thing) is (verb present tense) inaccessible (direct object, what the subject "is" ,in this case anyway).

Upon evaluating this, we find that just because we have no access to this "nothing", we do not necessarily have access to everything other than nothing.

Not that that means anything; the idea that our lack of access to nothing equals access to everything, of course....uhhh....I think. But who cares, because 24 hours from now, today will be tommorrow, on Thursdays anyway.
[Advantage X7500, MDA Ameo General] Confucious:
You are, of course, right.

I can access nothing so maybe he has got a fault with his phone.
[Advantage X7500, MDA Ameo General] weaselcossey:
Indeed, maybe he should send it to htc with a post-it note:

"This thing's a piece of crap. I can't access nothing." :D
[Advantage X7500, MDA Ameo General] Confucious:
Shouldn't that be

"This thing's a piece of crap. I can't access nothing."?
[Advantage X7500, MDA Ameo General] weaselcossey:
Ok damnit you win. :p

But of course I intentionally left out that apostrophe because I was impersonating the one (whoever that was) who started this whole "C.A.N." discussion, if only it had been a C.A.S. discussion, we wouldn't be having this discussion.

Hope you have fun deciphering that monstrosity of a run-on sentence. :D
[Galaxy A3, A5, A7, A8, A9 Q&A, Help & Troubleshoot] MAS98:
Hello!

Today, marshmallow update 6.0.1 released to my device. I wanna ask who had a go with this update if it's worth to update.

Well, I don't have any problem with lollipop. My battery is lil bit draining, but in general my phone is so good.

Thanks.
[Samsung Galaxy Tab A series Questions & Answers] ashyx:
You won't because it has a locked bootloader, therefore not currently rootable and certainly no custom recovery.
[Samsung Galaxy Tab A series Questions & Answers] ashyx:
Not unless Samsung provides one.
[Samsung Galaxy Tab A series Questions & Answers] jedld:
Probably no hope for root. the PIT, boot and recovery are basically untouchable, selinux enforcing enabled also does not help. You can still debloat and customize the system partition though:

http://xdaforums.com/android/development/guide-samsung-galaxy-tab-7-0-sm-t285-t3438296

I'm working on getting CM 12.1 to run on this device.
[Samsung Galaxy Tab A series Questions & Answers] ashyx:
Yes at least the saving grace is that Samsung left Dm-verity off for this device.

If only they'd have left out the root restriction in the kernel too we'd have a rootable device.

I have an idea for this that I haven't tried yet.

Basically Samsung sends out security Policy updates via OTA, they recently released an SEPOLICY update to most devices breaking root. Chainfire patched this.

As this policy is stored in DATA and over rides the one in the boot.img it may be possible to use a patched SEPOLICY by creating a flashable DATA image with the patched SEPOLICY thereby removing the SElinux root restriction.

I ran it by Chainfire and he said in theory it should work except for that fact that the SEPOLICY in DATA is signed.

I have yet to try this out.

I think it would be difficult to get CM running as the kernel may need some patches and as we know that can't be touched.
[Samsung Galaxy Tab A series Questions & Answers] jedld:
Would probably need to brush up on se policies in linux. If there are already files available that I just need to flash over to /data I can try it out and also a means to test it if it works.
[Samsung Galaxy Tab A series Questions & Answers] jedld:
I've created a petition here:

https://www.change.org/p/samsung-unlock-the-bootloader-for-the-samsung-galaxy-tab-a-7-0-2016?recruiter=286570213&utm_source=petitions_show_components_action_panel_wrapper&utm_medium=copylink&recuruit_context=copylink_long

Not sure if samsung is the type that listens to this sort of thing though.
[Samsung Galaxy Tab A series Questions & Answers] jedld:
I made an attempt to patch sepolicy using data however all I got in the logs was

E/SELinux ( 733): Function: fileToArray, File Open Unsuccessful:
E/SELinux ( 733): Function: getVersionhash, signature is NULL
I/SELinux ( 733): Function: selinux_init_verify_sepolicy, getVersionhash return false
E/SELinux ( 733): Function: VerifyPolicy , selinux_init_verify_sepolicy is failed

So far I have no indication that my patch worked

sepolicy-inject -s shell -t system -c file -p read -P sepolicy -o sepolicy

The error above only comes up if I place sepolicy in /data/security and sepolicy_version in /data/security/spota

sha256 hashes were also updated in the version file so I'm not sure what I'm missing.

If I could have a copy of a samsung ota that actually updates the policies I can probably have better direction
[Samsung Galaxy Tab A series Questions & Answers] jedld:
Finally found a way to patch the kernel on this device. Stay tuned...
[Samsung Galaxy Tab A series Questions & Answers] jedld:
Turns out I was just able to modify files in the boot.img, though when I try to update the sepolicy itself, it won't boot.
[Samsung Galaxy Tab A series Questions & Answers] ashyx:
Can you at least explain a bit further?

What modifications allow you to create a boot able image?

How have you overcome image signing?

Only way I can think of is hex editing the signature, however I was under the impression this was crc based.
[Samsung Galaxy Tab A series Questions & Answers] jedld:
Yeah I was able to flash a modified boot.img using heimdall, turns out that you just need to use abootimg -u boot.img -r yourmodifiedramdisk so that you don't overwrite the SELINUXENFORCE headers appended at the end of the boot.img file, it appears the bootloader only checks for the presence of those headers but does not actually compute the sig.

Modifying ramdisk works, haven't tried modifying the kernel itself.
[Samsung Galaxy Tab A series Questions & Answers] jedld:
I tried to modify the sepolicy files after using sepolicy-inject but it throws a KERNEL not SEnforced error. I am not certain if this is just a blanket error if the kernel doesn't boot due to modifying the policy files incorrectly or if there is legit checking going on. Nevertheless I am able to modify the init.rc files now.
[Samsung Galaxy Tab A series Questions & Answers] jedld:
Continued checking it out. So even though I can modify the ramdisk, I am unable to add more than 1000 - 2000 bytes before setting off the SEAndroid enforce error on bootup. Might be some headers on the boot.img that I fail to update when the ramdisk size gets bigger. Trying to modify the sepolicy in any way even if there is minimal change in size prevents it from booting. I have no idea what is checking it, I'll try to hexedit and see what happens.
[Samsung Galaxy Tab A series Questions & Answers] jedld:
So I used a hexedit on the sepolicy file and was able to modify one byte of it effectively changing its sha256sum... and it worked. So the sepolicy file CAN be changed, however current sepolicy-inject and supolicy tools does something to it that trips it, looks like samsung has again added a proprietary modification sepolicy format.
[Samsung Galaxy Tab A series Questions & Answers] ashyx:
I've never known a kernel not boot due to the kernel not SEANDROID enforcing warning.

It's a meaningless warning and easily bypassed.

However this is on bootloader unlocked devices.

So just let me get this straight, you have been able to repack the boot.img with modifications to the ramdisk then force flash it via Heimdall and it still boots?
[Samsung Galaxy Tab A series Questions & Answers] jedld:
yup. that's correct. I'll post my modified boot.img in a while
[Samsung Galaxy Tab A series Questions & Answers] jedld:
note that using the update only method of abootimg "abootimg -u boot.img -r xxxxxx " is the only one that works for repacking the ramdisk. Trying to build the boot.img from scratch using any other method has so far failed for me.
[Samsung Galaxy Tab A series Questions & Answers] jedld:
Here is a flashable boot.img for the SM-T285.

It contains the following modifications to the ramdisk:

a file at /this_device_is_owned

and a modified init.rc that creates a /tmp folder
[Samsung Galaxy Tab A series Questions & Answers] jedld:
now managed to patch sepolicy using chainfire's supolicy tool. needed to use a customized mkbootimg due to changes in the Tab A image format for this. now attempting to root the device... wish me luck
[Samsung Galaxy Tab A series Questions & Answers] gian20:
the build you suggested, the Alarm Clock problem persists.whenever I try to set the alarm clock the device will reboot and reboot and reboot ........ Still trying to find more bugs. I am attempting to try the 'Encrypt Phone" functionality.
[Samsung Galaxy Tab A series Questions & Answers] osm0sis:
[MENTION=649003]jedld[/MENTION] [MENTION=4899305]ashyx[/MENTION] Is anything at all actually required in the DHTB header? Lineage's repo seems to suggest otherwise: https://github.com/samsung-sc8830/lineage_device_samsung_gtexswifi/tree/cm-13.0/boot
[Samsung Galaxy Tab A series Questions & Answers] jedld:
I don't have the SM-T280 so most of my knowledge comes from results obtained by other developers, if I remember another developer [MENTION=6847876]_mone[/MENTION] (who managed to build twrp for this device btw) might have said that the actual content of the DHTB header may not matter as long as it exists. Though a properly formed DHTB header prevents various flashing errors from showing up as tested by [MENTION=4899305]ashyx[/MENTION]. The SM-T285 which I have uses a pretty standard boot.img format and does not require a DHTB header.
[Samsung Galaxy Tab A series Questions & Answers] ashyx:
I'm a bit sketchy on the procedure now, memory not what it used to be, but IIRC to flash the boot.img with ODIN the DHTB header is needed plus padding and the sha256 checksum created from the boot.img +SEandroid enforcing header. Also the size of the boot.img is included in the header.

For flashing via any other means, DD, TWRP etc., I think it was just the DHTB header required.

I would need to consult my notes to confirm, however I've just moved home and haven't got a working PC at the mo, so can't check the procedure.

However I can test an image built by your excellent AIK kitchen, assuming that's what the info is for?

Just for info though, custom kernels won't boot stock TouchWiz as yet. Still working on that one.
[Samsung Galaxy Tab A series Questions & Answers] osm0sis:
Yup, hoping to add repack support for DHTB headered images to AIK. :)

Considering you guys have basically reverse engineered everything for it already, would one of you be able to write a proper standalone tool to create the header?
[Samsung Galaxy Tab A series Questions & Answers] jedld:
Maybe this repo can help. There is another dev trying to get the T280 working:

https://github.com/USA-RedDragon/gtexswifi/commit/2888bbf24074a071bd112f54cb27604c2f1eb4c6
[Samsung Galaxy Tab A series Questions & Answers] osm0sis:
His GitHub mentions are what put me onto this, but he's still just working with mkbootimg to reappend the header, not build a fresh one, which is what we need.
[Samsung Galaxy Tab A series Questions & Answers] IngolfN:
Update LineageOS ?

Hello!

Nice work!

I have a question: If I have installed the inofficial LineageOS on my SM-T285, how I can update it to a newer (inofficial) version without losing my data? Booting in Download-Mode and reinstalling the new version via Odin/Heimdall without flashing before?

Best regards!
[Samsung Galaxy Tab A series Questions & Answers] jedld:
You can flash over the boot.img and system.img and leave your data partition intact. You might also need to reflash your gapps or other mods if you did those. Do note that my LineageOS builds are still alpha and I do not test upgrade scenarios. Make sure you backup your data and have a copy of the previous images just in case things goes sideways.
[Samsung Galaxy Tab A series Questions & Answers] lovemytab:
where is the option to give a "thanks" to jedid for compiling these resources?
[Samsung Galaxy Tab A series Questions & Answers] osm0sis:
[MENTION=649003]jedld[/MENTION], [MENTION=4899305]ashyx[/MENTION], any progress on a standalone tool to regenerate a proper header?
[Samsung Galaxy Tab A series Questions & Answers] ashyx:
Chiefwigms seems to have made progress with that:

https://xdaforums.com/showpost.php?p=73579475&postcount=22
[Samsung Galaxy Tab A series Questions & Answers] osm0sis:
Ooh. I had just gotten started on one myself, so this saves reinventing the wheel! I'm a better editor/debugger anyway. ;)

[MENTION=2796220]chiefwigms[/MENTION], would would you be willing to share your header generating utility? I'd like to include it in the next version of AIK. :)
[Samsung Galaxy Tab A series Questions & Answers] chiefwigms:
Yep - i'll upload it when i get home tonight :good:
[Samsung Galaxy Tab A series Questions & Answers] osm0sis:
Do you have a GitHub account so I can pull, cross-compile and of course credit the source correctly? :D
[Samsung Galaxy Tab A series Questions & Answers] chiefwigms:
Yep - same name on github.. Right now I just forked repos from [MENTION=649003]jedld[/MENTION] & [MENTION=6847876]_mone[/MENTION], but all the code is still local in my vm. Should be home in a few hours
[Samsung Galaxy Tab A series Questions & Answers] chiefwigms:
Alright - I pushed the utility to my fork (minimal error checking). feel free to modify/whatever - it's mostly [MENTION=649003]jedld[/MENTION]/@ashyx/@_mone's work :)
[Samsung Galaxy Tab A series Questions & Answers] osm0sis:
Awesome work! Since it's still part of mkbootimg my plan will be to turn it into a standalone utility, like I did with mkmtkhdr for MTK zImage/ramdisk signing. :)

Edit: Oh wait, you did do it separately. Nice! :D

Edit 2: Okay, I think I know why it's not booting for you. The sha256sum needs to be generated from everything ANDROID! to SEANDROIDENFORCE + trailing 0xFFFFFFFF, without the trailing FFFFFFFF the sha256sum doesn't match the original.
[Samsung Galaxy Tab A series Questions & Answers] chiefwigms:
Hmm - it matched my original boot.img (from Samsung's AQA4 factory firmware). When I branched, I had to recompile unpack/mkbootimg, otherwise it gave me bad results:

root@ubuntu:/gtaba/degas-mkbootimg/boot# ../tools/degas-unpackbootimg -i boot.img
Android magic found at: 512
BOARD_KERNEL_CMDLINE console=ttyS1,115200n8
BOARD_KERNEL_BASE 00000000
BOARD_RAMDISK_OFFSET 01000000
BOARD_SECOND_OFFSET 00f00000
BOARD_TAGS_OFFSET 00000000
BOARD_PAGE_SIZE 2048
BOARD_SECOND_SIZE 0
BOARD_DT_SIZE 380928
Before read
After read
Total Read: 14064384
root@ubuntu:/gtaba/degas-mkbootimg/boot# ../tools/degas-mkbootimg -o boot_new.img --signature ../tools/seandroid_t280.img --base 0 --pagesize 2048 --kernel boot.img-zImage --cmdline "console=ttyS1,115200n8" --ramdisk boot.img-ramdisk.gz --dt boot.img-dt
root@ubuntu:/gtaba/degas-mkbootimg/boot# ../tools/mkT280bootimg -i boot_new.img -o boot_t280.img
root@ubuntu:/gtaba/degas-mkbootimg/boot# diff boot.img boot_t280.img
[Samsung Galaxy Tab A series Questions & Answers] osm0sis:
Figured out the issue, mkT280bootimg expects the full signature to be there (per your "Assumption" note in the code), otherwise it doesn't hash correctly, even though only up to the FF FF FF FF is needed. Must be counting/subtracting from the end?

I was thinking something like this:

check for input file

- usage if not found

check for DHTB magic

- abort if found

check for ANDROID! magic

- abort if not found

check for SEANDROIDENFORCE

- add if not present

check for 0xFFFFFFFF

- add if not present

calculate sha256sum and size from full payload

write file with added header and additional 12 bytes 00 padding to trailing 0xFFFFFFFF​

I'll mess around and see what I can work out. :)
[Samsung Galaxy Tab A series Questions & Answers] osm0sis:
Alright, I got it all worked out; should be pretty robust now:

https://github.com/osm0sis/dhtbsign

:highfive::D

I'll have support added for Android Image Kitchen v2.9. :cowboy::good:
[Samsung Galaxy Tab A series Questions & Answers] AnierinB:
If you still need a device I'm willing to part with mine as long as you can pay for the shipping label. Anything to help development for this device is worth it as I can get them from my work for 120 USD. Just PM me If you're still up to it and can pay for the label.
[Samsung Galaxy Tab A series Questions & Answers] Delgoth:
Okay I haven't read the rest of the thread yet. I found this post first. But I will read after I make this post before I forget what I was going to say.

If I read your post correctly, "the standard mkbootimg" program cannot actually unpack and repack the boot.img correctly. Which is an extremely common occurrence on Samsung Devices, even though the vast majority of those Samsung Devices use AOSP type boot.img's.

I am also surprised there is actually data on the kernel command line.

Does Your patched boot image just modify the ramdisk by simply inserting the init.supersu.rc and making sure it gets called?

I ask these kind of basic questions because I've had my tablet for a month, and it's a bit different in some areas than the Galaxy Mobile Phones. This is the first device I've had in awhile that allowed me All Possibilities without worrying about telephony services. So I've been slowly getting my environment back in order. So I can take some new details into my older projects.
[Samsung Galaxy Tab A series Questions & Answers] jedld:
This post is a little bit outdated now. But yeah the kernel command line doesn't really do anything, I've discovered that it is actually part of the dt image.

For a 5.1 device at launch, LineageOS 14.1 runs on this device if you want a measure on how hackable it is, you can check out the lineageos customrom thread for the T285. I've also included links to the kernel and LOS manifest if you want to build it for your device. I've gotten oreo partially to work, unfortunately it is not on a level that is usable at the moment.
[Samsung Galaxy Tab A series Questions & Answers] Delgoth:
What I am most interested in, now that I've read the thread, is the process that went into finding out how to sign the images. What implications does this give way to for other samsung based devices?
[Samsung Galaxy Tab A series Questions & Answers] jedld:
At least for the T285, although there is a signature check, it allows the image to be flashed anyway.
[Samsung Galaxy Tab A series Questions & Answers] tekcomm:
Ya thats probably why I could hex edit into the 7.1.2 kernel androidboot.selinux=permissive then magisk it and then pop it with magisk-permissive-script_v1.2.zip . There is a russian tool that will sign it from the same guy who made the Rk image packer/unpacker tool I believe.

.
[Samsung Galaxy Tab A series Questions & Answers] Khanjoon123:
Bro I have tab a6rooted but I cannot install xposed

I have error from install xposed installer and recovery mode also

In installer error is error 1 occurrd

And recovery most is error fount 255 what's the problem please help me
[Samsung Galaxy Tab A series Questions & Answers] steadicam:
updates?

Any luck? Anyone make any progress?
[Samsung Galaxy Tab A series Questions & Answers] TopTongueBarry:
https://xdaforums.com/xposed/unofficial-xposed-samsung-lollipop-t3180960

https://androidfilehost.com/?fid=385035244224402234
[Samsung Galaxy Tab A series Questions & Answers] ashyx:
Just use Magisk it comes with Xposed that can be used on any device.
[Samsung Galaxy Tab A series Questions & Answers] gogomogo:
hello.

i have sm-t280 tablet and i need to change bootlogo. i tried all of ways but no result. can you help me please?
[Samsung Galaxy Tab A series Questions & Answers] gcrutchr:
See post #2 at this URL:

Change Boot Logo
[Samsung Galaxy Tab A series Questions & Answers] Mubanda:
Hello guys!

I'm kinda new here,,,

I have SM-T285, and I have installed leanageOs 14.1 developed by [MENTION=649003]jedld[/MENTION] and it really worked well.

I was wondering if there is any hope of developing newer LineageOS either Oreo or Pie for this model.

Please, if anyone knows how to do it, please help!
[Samsung Galaxy Tab A series Questions & Answers] katodelumo:
Is there any difference between SM-T285 and SM-T285M?
[Samsung Galaxy Tab A series Questions & Answers] _mone:
Sorry for necromancing this old thread.

If you want to have a look at the "original" tool, you can find it here:

https://github.com/underscoremone/android_device_samsung_gtexswifi/tree/android-6.0/insertheader/source
[Samsung Galaxy Tab A series Questions & Answers] baltazar9:
hello guys!

i have SM-T285 Samsung tab which have MDM Locked No factroy reset allow, no firmware writing allow, no uodates installtion allowed anyone have removing solution plz tell me
[Samsung Galaxy Tab A series Questions & Answers] RFZ:
Hey, I came across this when researching the DHTB header.

I learned about it the hard way when I tried to install SuperSU (using zip in TWRP) on my SM-T280 that has LineageOS 14.1 installed. It didn't boot ( see https://xdaforums.com/t/sm-t280-supersu-install-zip-creates-broken-kernel-image.4492241/ ).

I noticed the missing DHTB header in the boot partition after the install, so I simply put it back (backup from the LOS image) and this worked for the SuperSU 2.78 install, but not for the SuperSU 2.82 install (still stuck on boot screen).

After more testing I found that it ignores the signature and doesn't care much about the payload length either. However, some payload lengths cause it to get stuck at boot. That's why my fix did not work for SuperSU 2.82.

Using a signature AND payload length of just 0x00 just worked fine for me.

Is this some kind of edge case or did others notice that as well?
[Samsung Galaxy Tab A series Questions & Answers] osmanbasar:
is Sailfish OS done yet?
[Samsung Galaxy Tab A series Questions & Answers] Sqovex:
ㅤ
[Samsung Galaxy Tab A series Questions & Answers] ashyx:
If you have patched SEPOLICY with supolicy AND it boots then rooting should work.
[Samsung Galaxy Tab A series Questions & Answers] jedld:
yup it booted with the patched sepolicy. In theory recovery should be ownable as well but I will root it by hand for now.
[Samsung Galaxy Tab A series Questions & Answers] ashyx:
I feel a success post coming on. [emoji6]

Can you up the patched boot.img?
[Samsung Galaxy Tab A series Questions & Answers] jedld:
rooted. The Galaxy Tab A 7" 2016 LTE (SM-T285) now joins the family of rooted devices. Now uploading the latest pre-rooted ROM. Will work on the SM-T280 next.

uploaded the boot.img now. Sorry I have a slow net connection.

Proof below for the unbelievers:

http://imgur.com/a/7Bl8t
[Samsung Galaxy Tab A series Questions & Answers] ashyx:
Congrats you deserve a medal for all the hard work you've put in. [emoji106]
[Samsung Galaxy Tab A series Questions & Answers] jedld:
SM-T285 patched sepolicy boot

For those who are impatient and know how to patch their system.img with the SuperSu binaries:

Attached patched boot.img (has init.supersu.rc ready to run /system/xbin/daemonsu).

To build a boot.img for device you need a custom mkbootimg here:

https://github.com/jedld/degas-mkbootimg/commit/b63ae38e2ab7040cc7ddaef777652a56b2e48322

Unpacking/packing the ramdisk is pretty standard. The mkbootimg is used like this:

degas-mkbootimg -o boot.img --signature seandroid.img --base 0 --pagesize 2048 \
--kernel boot.img-zImage --cmdline "console=ttyS1,115200n8" --ramdisk boot_kitchen/boot.img-ramdisk-new.gz --dt boot.img-dt

I've tested this so far only for my device. Feedback needed if boot.img flashes properly in other devices as well.

haven't tried if this technique works for recovery, but in theory it should. Now someone please get TWRP on this device :)

Installation:

Flash boot.img using heimdall/odin as is. If everything works well the device should accept it like nothing :)