yashsingh1/xdaforums huggingface dataset:
[XDA Assist] RickRonnick:
Hello everybody,

As the update on my Samsung Galaxy S7 (SM-G930F) failed, it does not start properly.

When I try to switch it on, it starts with a blue screen, saying "Installing system update...",

but then it displays a dead android guy with a yellow triangle above.

After that it starts the stock recovery mode.

The Stock Rom does not start, so I am not able to get into the phone settings.

Unfortunatelly OEM is not unlocked.

There is no root on my phone. I can only acces the stock recovery mode and bootloader.

I already tried to repair the phone via SmartSwitch, but nothing has changed.

I have also tried to flash the stock firmware via Odin.

And of course I tried to wipe cache and factory reset.

Can anyone of you please help me?
[XDA Assist] :
Greetings and welcome to xda, I see you found the correct place to ask your question here

http://xdaforums.com/galaxy-s7/help/samsung-galaxy-s7-doesnt-boot-t3463005

Thread closed
[SuperSU] Matt07211:
I am in the position of having to manually apply the defult sepolicy patch, init,?*init_shell?* and?*recovery?*permissive, and as the title states when using the supolicy tool to modify my supplieded sepolicy it is not being produced and on closer inspection throwing an error. I have attached both the images and the sepolicy file I am trying to applie these change to.

Have I been doing something wrong or is the file corrupted??

If you need more info just ask ;)

Note: when I first tried it inside an adb shell it reported a segumentation fault, but I was unable to reproduce that condition to be provided with as a screen shot.

View attachment 3877025

View attachment 3877026

EDIT: I at least can say that the possibility of a corrupt file is now smaller becuse I am able to run dumpav and dump its contents to a txt file and then do afb pull back to pc. So amyone know any way to applie the defult P atchs needed to sysyemless root?
[SuperSU] Matt07211:
[MENTION=631273]Chainfire[/MENTION] Since this is your binary files, you should know the most about it.

Commands to gain application root on emulator

adb shell df #Check Available Space
adb shell mount -o remount,rw /system
adb push su /system/bin/su
adb shell chmod 0755 /system/bin/su
adb push su /system/xbin/su
adb shell chmod 0755 /system/xbin/su
adb shell su --install
adb shell "su --daemon&"
adb install superuser.apk
adb install rootcheck.apk

I then proceed to patch the sepolicy file with the following commands

adb push sepolicy /data/local/tmp/sepolicy
adb shell su -c "supolicy --file /data/local/tmp/sepolicy /data/local/tmp/sepolicy_out" #There is no sepolicy_out file
adb shell su -c "chmod 0644 /data/local/tmp/sepolicy_out"
adb pull /data/local/tmp/sepolicy_out sepolicy_out

So what am I able to do?

Are you able to

A) Help me debug the problem

Or

B) Patch the sepolicy file and post the output back to me/here
[SuperSU] Chainfire:
Works fine on my device... could be an x86 specific issue? Unfortunately I don't have any x86 devices to test with.
[SuperSU] Matt07211:
Thanks for that. Yes, I am trying to patch the policy for my armv8 (arm64) cpu device (just realised, but would trying to patch the sepolicy from one architecture using the supolicy for a different architecture have new the problem?, if so I feel dumb). And since I didn't have a spare device devce that met the requirements, I resorted to use the already setup emulator in my Windows installation.

I had proceeded to root and run the supolicy tool for which nothing out-putted (tried different directorys), I then created a new sub-directory, test, in /data/local/tmp and chmod it with read and write permissions. I tried again and failed, I then ran a dumpav in the sepolicy I was trying to patch and outputted it to /data/local/tmp/test/dumpav.txt which worked.

I am just wondering why it didn't work for me :(.

Thanks again for the sepolic_out file, I really do apperciate it.
[SuperSU] Chainfire:
Ah you're saying the segmentation fault occurred on the emulator? That's interesting. Might be reproducable on my end.
[SuperSU] Matt07211:
Note: look at my first image with cms in the foreground and near the bottom of the command window you should see the segfault message, around second last command or so.

To reproduce that segfault (hopefully):

1) https://software.intel.com/en-us/android/articles/android-44-kitkat-x86-emulator-system-image Download the system image from here (had to direct download instead of sdk as internet was running through profile and ask wouldn't work through it)

2) used the 2.78 SuperSu zip and run above commands to gain root

3) run above commands to try and modify sepolicy (it doesn't produce anything)

4) start an adb shell and then run the commands inside the shell. Know the outputs shown was segfault the first time running the commands, every time afterwards it would show the error in the above screenshots

If you figure out what cause the segfault can you please tell me ;) ?
[SuperSU] Chainfire:
Before I go do all this, can you make sure the issue persists with the v2.78 SR1 version from the BETA thread ? Some issues with supolicy were fixed in that release.
[SuperSU] Matt07211:
Started with a fresh emulator and the newest SuperSu and ran these commands to gain root (I am placing everything as described in update-binary in the right places just to eliminate one thing, missing dependencies)

adb shell df
adb shell mount -o remount,rw /system
adb push Superuser.apk /system/app/Superuser.apk
adb shell chmod 0644 /system/app/Superuser.apk
adb push install-recovery.sh /system/etc/install-recovery.sh
adb shell ln -s /system/etc/install-recovery.sh /system/bin/install-recovery.sh
adb shell chmod 0755 /system/etc/install-recovery.sh
adb push su /system/xbin/su
adb shell chmod 0755 /system/xbin/su
adb push su /system/bin/.ext/.su
adb shell chmod 0755 /system/bin/.ext/.su
adb push su /system/xbin/daemonsu
adb shell chmod 0755 /system/xbin/daemonsu
adb push su /system/xbin/sugote
adb shell chmod 0755 /system/xbin/sugote
adb push supolicy /system/xbin/supolicy
adb shell chmod 0755 /system/xbin/supolicy
adb push libsupol.so /system/lib/libsupol.so
adb shell chmod 0644 /system/lib/libsupol.so
adb push 99SuperSUDaemon /system/etc/init.d/99SuperSUDaemon
adb shell chmod 0755 /system/etc/init.d/99SuperSUDaemon
adb shell su --install
adb shell "su --daemon&"
adb install superuser.apk
adb install rootcheck.apk

No everything should be in place, and we now can eliminate one thing (supolicy not finding needed dependencies)

Opened up SuperSu and let it install/update binary (succesful)

I then proceeded to patch the sepolicy file like so

adb push sepolicy /data/local/tmp/sepolicy
adb shell su -c "supolicy --file /data/local/tmp/sepolicy /data/local/tmp/sepolicy_out"

I then did "ls" in the directory and no file out-putted. So I went into a shell and ran

supolicy --file /data/local/tmp/sepolicy /data/local/tmp/sepolicy_out

And it throw the error shown in the image below. First time running that command in shell it says stopped, but the second time it says stopped as well as segfault.

Keep in mind I am trying to patch a sepolicy file that originates from an armv8 cpu (arm64) on an x86 Intel emulator.

Any more info needed? I am happy to help ;) [MENTION=631273]Chainfire[/MENTION]
[SuperSU] Chainfire:
So, I think it has something to do with your emulator image (perhaps its too old ?)

I took SuperSU's ZIP file and extracted it, changed to that folder, then:

(note that my adb shell to my emulator image has # root by default)

adb push c:\download\sepolicy /data/local/tmp/sepolicy
adb push x86\. /data/local/tmp/.

adb shell
cd /data/local/tmp
chmod 0755 supolicy
LD_LIBRARY_PATH=/data/local/tmp:$LD_LIBRARY_PATH ./supolicy --file sepolicy sepolicy_out
exit

Resulting in:

supolicy v2.78 (ndk:x86) - Copyright (C) 2014-2016 - Chainfire

Patching policy [sepolicy] --> [sepolicy_out] ...
- Success

So, I'm really not sure what might be going on with your setup, but I don't think its SuperSU itself, but rather the emulator.

Note that to use supolicy --file, you only need supolicy and libsupol.so, you don't even need root.
[SuperSU] Matt07211:
Hmm, I really don't know what is wrong, I will try exactly what you have done later today, to see If can reproduce the output. If it doesn't work then we can pin it down to the emulator itself. What emulator image did you use?

I also realise that so emulator are rooted in the sense that web shell has root acess, just wasn't sure what dependices supolicy had at the time.
[SuperSU] Chainfire:
I created an API 22 Google Nexus x86_64 AVD in Android Studio
[SuperSU] Matt07211:
I should be able to try that in about 20-30 mins after I download it, I was using api level 19, Intel's emulator image.
[SuperSU] Matt07211:
I ran these commands on the Intel api 19 x86 emulator image.

adb push libsupol.so /system/lib/libsupol.so
adb shell chmod 0644 /system/lib/libsupol.so
adb push /system/xbin/supolicy
adb shell chmod 0755 /system/xbin/supolicy
adb push supolicy /data/local/tmp/supolicy
adb shell chmod 0755 /data/local/tmp/supolicy

adb push sepolicy /data/local/tmp/sepolicy
adb shell
cd /data/local/tmp
chmod 0755 supolicy
LD_LIBRARY_PATH=/data/local/tmp:$LD_LIBRARY_PATH ./supolicy --file sepolicy sepolicy_out

and it results in the error(shown in screenshot)

libsepol.policydb_read: policydb magic number 0x464c457f does not match expected magic number 0xf97cff8c or 0xf97cff8d
-Failure!

[IMG="Error on API 19 Emulator using SUPOLICY"]http://i.stack.imgur.com/Q6AbX.png[/IMG]

I then tried it on the Intel x86_64 api 22 emulator image (running the same commands as the first one, resulting in a succes, with the file being outputted as the sepolicy_out.

So as you have stated [MENTION=631273]Chainfire[/MENTION] , it looks like a problem with the emulator itself, and most likely not the supolicy tool.
[SuperSU] ashyx:
[MENTION=631273]Chainfire[/MENTION], I'm trying to patch sepolicy for a Samsung device running Nougat, so that Supersu can be installed in system mode. Could you confirm if the --sdk=24 parameter is required?

adb shell su -c "supolicy --file /data/local/tmp/sepolicy /data/local/tmp/sepolicy_out --sdk=24"

Thanks, appreciate your time.
[SuperSU] Chainfire:
Yes it is.

System mode hasn't been tested at all on 7.0 though. I'm not sure anybody has been able to get it to work at this point.

If you do, let me know and with the steps :)
[SuperSU] ashyx:
Hmm wasn't aware of the lack of support for system mode in nougat, any plans to implement?

It seems system mode root renders the device unbootable according to reports from my tester.

Question, if I modify the supersu script to mount su.img from /system am I likely to hit issues?

Seems a strange query I know.

Reason is we have a Samsung device that for some reason will not boot from a source built custom Nougat kernel. Not sure if this is related to AVB yet or something else.

However we can get a half assed TWRP to boot with the stock kernel.

Only problem is, no matter what, only /system can be mounted and accessed with write permission due to permission denied issues with the rest of partitions. Pretty sure this is an SELinux issue.

Meaning systemless root cannot be installed as normal. No access to /data or /cache.

I can patch the boot.img ramdisk manually for systemless, but for root to work I would need to push su.img to system and mount it from there.

Is it possible to still mount su.img from system if I modify the ramdisk init as required?

The other avenue is to flash su.img to /data or /cache via ODIN.

If it was flashed to /cache would supersu automatically pick up its location and copy it to /data or would a flag need to be set?

Just trying to keep my options open here.
[SuperSU] Chainfire:
It is on my list of things to test/fix, but that list is long and full of terrors.

I think that could work, yes.

SuperSU should pick it up from /cache. Alternatively, try SuperSU's FRP mode, which stores a copy of the needed files in the boot-image and re-creates /data/su.img as needed.
[SuperSU] ashyx:
Thanks, great info as always. Finally managed to root the damn thing by adding a short script to the init which copies su.img to cache.

However FRP mode sounds like a more elegant solution if I can work out how to implement it in the Ramdisk.

Much appreciate your input.
[SuperSU] Matt07211:
Yea believe it was segfaulting due to the Android version, I think I was using KitKat and it wasn't working, bumped up to lollipop and above and it worked fine

Oh, the SDK parameter, never heard of it, what does it do? Geuss I'll Google that then.

I did the same thing for my device, add a little script to move it to data. Had no other way to get it to a locked down device without TWRP. Hehe. Good job
[SuperSU] dawnc:
Can you please tell me how to manually patch init by supersu ?

I've googled a lot, but haven't found a way to manually patch init by supersu.

My model is Honor v10, there isn't a custom recovery, so i have to make a boot.img with supersu inside to get root.
[SuperSU] ashyx:
Upload your boot.img
[SuperSU] dawnc:
This is my stock boot.img(Honor V10 Emui8.0 with oreo8.0)

This is my modified boot.img(I replace init with which i get from [MENTION=1097168]mankindtw[/MENTION] 's mate 10 's root boot.img)

But i don't know how to patch init by my own, i found many threads about patching sepolicy with a rooted phone, but found none about how to patch init.
[SuperSU] ashyx:
I've unpacked your stock boot.img which seems to be a standard AOSP image, but cannot locate the sepolicy file?

And neither does there seem to be a zImage as its 0kb :confused:

Possibly there is a problem with my unpacking method.

Which tool do you use to unpack these images?
[SuperSU] dawnc:
For newest huawei emui8.0, it has different partitions, there's no more boot.img, they are ramdisk.img kernel.img vendor.img...

There's no sepolicy in the ramdisk.img, they placed sepolicy in vender.img /etc/selinix/precompiled_sepolicy.

I unpack the ramdisk.img and vendor.img with bootimg.exe https://github.com/cofface/android_bootimg

And i've described what i did here https://xdaforums.com/apps/supersu/patching-sepolicy-issues-honor-emui8-0-t3732319

After all , do we have a way to patch init manually just like patching sepolicy using supolicy on a rooted phone?
[SuperSU] ashyx:
I can manually patch the ramdisk. Could you upload the unpatched sepolicy file?
[SuperSU] KZekai:
I have successfully modified ans saved custom sepolicy but now I need to do some granular editing outside of live system. Are there any tools that would allow me to edit saved sepolicy file?
[Galaxy Note5 Q&A, Help & Troubleshooting] hamidrezatata:
Hi all!

Can anyone share a link about mega wipe for galaxy note5?

I have a big problem !

Please help me!
[Samsung Galaxy S7 Edge Themes, Apps, and Mods] komanguy:
Hi all!

Is it possible to record with h265 codec? I know a middle range phone (infinix zero 3) which does it very well in 4k format?

Any hack? Any app?

Thanks in advance;
[Samsung Galaxy S7 Edge Themes, Apps, and Mods] billyliem:
Bitstream
[Android Q&A, Help & Troubleshooting] marshy21:
Hi xda forums! i hope you guys can help me out. I just got my self a new table from ebaya sain Sonic qt-9. But the software/firmware i guess is terrble, i was wondering is there any roms that will safe to install on to my tablet.

Thanks Marshy

Specs

Model number

QT-9

Processor Type:

Quadcore-a33

Android Version

4.4.2

Firmware Version

v2.0

Kernel version

3.4.39]wujun@yingjie-srv#2

Build Number:

astar_rtl8703-eng 4.4.2 kvt49l20160422 test keys
[Android Q&A, Help & Troubleshooting] lenlennart:
Hey all,

i am looking for an app to screencast from my rooted 4.2 Jellybean tablet.

I found various "screencast" or "screenmirror" app that allow me to take videos of my screen OR apps to stream "ANY VIDEO!!!" from my phone to my chromecast...

Officially, screen mirroring is available from 4.4 KitKat.

The only casting i can do is app-specific like Youtube, Google Music - but there is non to simply cast my whole screen :(

There is this ominous app called #MirrorEnabler (http://lifehacker.com/mirror-enabler-brings-chromecast-screen-mirroring-to-mo-1604683876) - but it vanished completly from the forum...

Background: Im trying to bring my Amazon prime videos to my chromecast... i have the videos running on my (legacy) tablet in the amazon app (which doesnt support chromecast), but not on my TV just yet :(

Thanks!
[XDA Assist] RyanLandsberg:
HI There,

I've had my Huawei G8 for about 9 months now and during that time I've never had an update, I'm still running EMUI 3.1 and Lollipop 5.1, my build number is RIO-LC629B140. I've tried the manual updates but it just says "fail Software Install." Please help me I'm desperate for answers.
[XDA Assist] :
Greetings and welcome to xda, this is the correct forum to ask your question in.

http://xdaforums.com/gx8/help

Good luck

Sawdoctor
[Samsung Galaxy S7 Themes, Apps, and Mods] misulik79:
It's just for rooted phone?
[Samsung Galaxy S7 Themes, Apps, and Mods] hbigatti:
Hi,

But I got that error: Operation failed: Failed to get lock level

Have you a solution?

Thank you in advance
[Samsung Galaxy S7 Themes, Apps, and Mods] omrij:
Are you with the correct (old) modem version?
[Samsung Galaxy S7 Themes, Apps, and Mods] Meytarmz:
Thank you for the beautiful explantion but unfortunally my modem version is BPH1 so the app is not working. what other options i have got? just finished rooting my phone.

---------- Post added at 04:16 AM ---------- Previous post was at 04:05 AM ----------

no. my modem version is G930FXXU1BPH1
[Samsung Galaxy S7 Themes, Apps, and Mods] omrij:
So flash old modem

https://drive.google.com/open?id=0B_KNNXfgovrMNXcxNlZuMmtwaGs

After that, you can return to the new one

https://drive.google.com/open?id=0B_KNNXfgovrMUVhPTHdQSV81Z2M
[Samsung Galaxy S7 Themes, Apps, and Mods] cyke0213:
Thanks Brother for this great apps!!

Hi good day, I want to try this but i don't want to Trip my Knox yet, i'm not ready for that.

I hope the Non-Rooted support come soon

thanks for this great development.

Thumbs up for you Bro.

if the non-rooted is released i want to donate for a coffee for your nice work.

thanks a lot

waiting :D:D:D
[Samsung Galaxy S7 Themes, Apps, and Mods] ZigBrick:
Sorry I was away for the past few days. Actually we have tested a version that doesn't require rooting the phone. The only thing you'd miss with the non-root version would be the ability to backup your EFS info. We only have to do the final testing and release it, but we decided to postpone that for a while since we didn't find huge demand for such feature to justify the effort to put towards that.

I've created a poll to see if more people would like to have a non-root version of this app. If we find high demand for the non-rooted version, then we would bring releasing it back to the top of our priorities.
[Samsung Galaxy S7 Themes, Apps, and Mods] omrij:
Changing csc without root would be great!

Thanks for the effort.
[Samsung Galaxy S7 Themes, Apps, and Mods] vmostransistor:
Samsung S6 Region lock

So I bought my Samsung S6 from the UK in June, now I live in South Africa and it seems the region lock has kicked in after about a month in the country. I have tried just about everything to try and unlock the phone (except flying back to the UK to make my 5 minute call and paying for unlock codes over the internet). I've tried your app on my model SM-G920F (Software Version G920FXXS4DPH7, Modem Version G920FXXS4DPG3) but it says "Operation failed: Failed to get lock info". How do I get around this? Is there an older modem version for my S6 that will allow this?

Just to explain why I've never paid for an unlock code over the internet, I have never gotten an unlock screen request on the device so that's why I'm unsure if that will work. My device simply says "No SIM | Emergency Calls only", but Samsung UK has confirmed that the device contains a regional SIM lock.

Thanks in advance!

Pieter
[Samsung Galaxy S7 Themes, Apps, and Mods] ZigBrick:
It's very annoying and inconvenient indeed.

You can find old stock firmware images for your device at sammobile. You can try the following steps:

Download the desired firmware from here: http://www.sammobile.com/firmwares/database/SM-G920F/

Extract the zip file.

Put the phone in download mode and flash the extracted file "CP_..." only. Make sure to use the latest version of Odin (3.12 or later) as they've changed the way you provide the files. Fill the CP field only in Odin.
[Samsung Galaxy S7 Themes, Apps, and Mods] technomedico:
[MENTION=7734937]ZigBrick[/MENTION] Sir

First up, Thank you very much for resurrecting this kind of app really! It's a life saver for unfortunate souls like me who have been robbed by Samsung by region locking our phones.

As a noob I have a few questions though

I have a region-locked (European, unlocked Single SIM, SM-G935F) Galaxy S7 Edge, should I try this app in my phone?

Is removal of Region lock is a one-time phenomenon? I mean will updating the phone bring the lock again or not?

Thanks in advance

---------- Post added at 09:32 PM ---------- Previous post was at 09:29 PM ----------

Please can you share old modem download link for Galaxy S7 Edge (SM-G935F Exynos variant)?
[Samsung Galaxy S7 Themes, Apps, and Mods] ZigBrick:
Thank you for the encouragement.

The app has already been successfully used to unlock SM-G935F.

The app modifies the nv-data.bin file, which contains specific settings for your phone (including IMEI, serial number, etc.) This file is not included with any firmware and doesn't get changed as part of updating/flashing. Therefore, updating "should" normally not cause your device to get locked again. This had been verified with several firmware updates.

I'm saying "should" because we don't know the future and whether samsung could be able to implement something specific in future firmwares that would detect this unlock method and undo it.

You can find old stock firmware images for your device at sammobile. You can try the following steps:

Download the desired firmware from here:

1- http://www.sammobile.com/firmwares/database/SM-G935F/

2- Extract the zip file.

3- Put the phone in download mode and flash the extracted file "CP_..." only. Make sure to use the latest version of Odin (3.12 or later) as they've changed the way you provide the files. Fill the CP field only in Odin.
[Samsung Galaxy S7 Themes, Apps, and Mods] technomedico:
Thanks for the quick reply!

I will update here whatever happens to my S7 Edge (hopefully the lock is removed).
[Samsung Galaxy S7 Themes, Apps, and Mods] KaiserCola:
This is very helpful, I had been looking for such an app to remove the region lock on my device. RegionLock Away wasn't working, and now I know why (thanks to the OP), however, even though this app worked and removed the region lock (in theory), I still have no access to my network. I can't make calls, and have no mobile data.

My device is an SIM-unlocked Galaxy S7 edge (SM-G935F), bought from the UK. It was set up for use in Tanzania, and worked fine there. However, it's now with me in the US, with a Verizon sim card, and seems to still be region-locked despite me using this app to remove that lock.

This is probably a long shot, but does anybody know what more I can do? Thanks for your help!
[Samsung Galaxy S7 Themes, Apps, and Mods] ZigBrick:
I'm not an expert in the CDMA networks phone compatibility, but according to this (http://xdaforums.com/s7-edge/help/sm-g935f-verizon-t3346926), SM-G935F seems to have frequency compatibility problems with Verizon.

I suggest you investigate more along the CDMA compatibility route and possibly pop in a SIM from another US compatible network to verify.