[Solved] Nethunter crashing after upgrading to android 12 - Samsung Galaxy S20 FE Questions & Answers

Recently, i've upgraded my rooted S20 FE 5G(SM-G781B/DS) to android 12 from android 11 and I performed a factory reset in the process
I was able to install magisk(Magisk-v23.0.apk) get root access using the official guides in magisk, and flashed twrp(twrp-3.6.0_11-6_afaneh92-r8q.tar).
I then flashed busybox(https://github.com/Magisk-Modules-Repo/busybox-ndk) [it completed successfully]
I installed twrp, and disabled encryption using this guide
[RECOVERY][UNOFFICIAL] TWRP for Galaxy S20 FE 5G (Snapdragon)
Team Win Recovery Project 3.x, or twrp3 for short, is a custom recovery built with ease of use and customization in mind. Its a fully touch driven user interface no more volume rocker or power buttons to mash. The GUI is also fully XML driven and...
forum.xda-developers.com
I installed magisk using this guide
Installation
The Magic Mask for Android
topjohnwu.github.io
However, everytime I try to open nethunter it first asks me for permissions, i.e location, Files & Media, Nearby Devices and I give it all the permissions
The magisk permission pop up then appears and I grant it
I then close nethunter and re open it however it just opens & immediately crashes
I tried downloading a busybox checker as well, however it also crashes
I rebooted my phone, repeated the whole process from the beginning(factory reset, odin, etc) thrice now
What could be wrong, or how could I figure out why it's crashing?
Note: I checked TWRP all the files are unencrypted I believe because I was able to see the Android, Downloads, etc

Android 12 needs magisk 24+
try updating magisk and then installing it again using the direct (recommended) method from within the app.

3mel said:
Android 12 needs magisk 24+
try updating magisk and then installing it again using the direct (recommended) method from within the app.
Click to expand...
Click to collapse
updated it, still crashing
I'll try to do it using odin

still crashing...

Alright, so the problem was with the permissions
I'd like to thank Svirusx, without him I would have probably given up a long time ago, he's the one who told me how to fix this
If anyone else ever faces this issue, here's how to fix it
In order to fix the issue,
boot device normally into your OS
Connect your phone with your pc with a cable
Open ADB [https://developer.android.com/studio/releases/platform-tools] // Note: make sure to use the ADB provided here not a decade old one
Copy and paste all of these commands, some of them might error, but just ignore it[Magisk will ask you for superuser access, make sure to grant it] // Note: In windows to paste into terminal just right click
//Note 2: You can just copy the whole thing below and paste it, no need to do it line by line
su
pm grant com.offsec.nethunter android.permission.INTERNET
pm grant com.offsec.nethunter android.permission.ACCESS_WIFI_STATE
pm grant com.offsec.nethunter android.permission.CHANGE_WIFI_STATE
pm grant com.offsec.nethunter android.permission.READ_EXTERNAL_STORAGE
pm grant com.offsec.nethunter android.permission.WRITE_EXTERNAL_STORAGE
pm grant com.offsec.nethunter com.offsec.nhterm.permission.RUN_SCRIPT
pm grant com.offsec.nethunter com.offsec.nhterm.permission.RUN_SCRIPT_SU
pm grant com.offsec.nethunter com.offsec.nhterm.permission.RUN_SCRIPT_NH
pm grant com.offsec.nethunter com.offsec.nhterm.permission.RUN_SCRIPT_NH_LOGIN
pm grant com.offsec.nethunter android.permission.RECEIVE_BOOT_COMPLETED
pm grant com.offsec.nethunter android.permission.WAKE_LOCK
pm grant com.offsec.nethunter android.permission.VIBRATE
pm grant com.offsec.nethunter android.permission.FOREGROUND_SERVICE
echo Completed!
Once you've pasted this whole thing, no need to look at the output[there are probably a lot of errors], just try to open Nethunter and it'll work

Related

Problems with SuperSU 2.46

Hello.
I'm having a problem using SuperSU 2.46. When I first installed it from Google Play it wouldn't work right but after reinstalling it, it worked fine until I rebooted my phone. After doing that it no longer prompted for root access. The only way I could grant root access was if I enabled root access for all apps without prompt and even after that my phone would freeze up after a while and I'd have to do a battery pull. Before I installed SuperSU, root access worked for most apps without a superuser prompt but I've found one or two apps on my phone that required superuser before enabling access to root features. The binary installation/update worked fine so I'm at a loss for what to do. I've tried uninstalling/reinstalling it several times.
My phone is an LG Ultimate 2 (lg l41c) running Android 4.4.2. I rooted it using towelroot. It does not have a recovery flashed as I have yet to find one designed for it. I thought that could be the problem but I'm not sure. As I said, most root capabilities worked before I installed a superuser app but it all ceases to work after rebooting my phone with SuperSU on it and the only way I can get it to work is by granting root access to all apps without prompt and even then my phone freezes and needs a battery pull. I'll take any help I can get.
I have the same issues in my note 4 except the freezing part
Any idea for this?
The problem seems to have solved itself. I installed SuperSU again today and everything seems to be going fine for now. I don't know what changed but I'll post again in the future if I run into any more problems.
Sent from my LGL41C using XDA Free mobile app
Same problem happening here on a Galaxy S5 Active. I've reinstalled and even put 2.48 beta on it.
The strange thing is the "Apps" list remains blank the entire time. Log shows apps using root, but they never get added to the list and I have to default "grant" everything for apps to work (at least, the ones that will work with this half broken root).
harmgsn said:
Same problem happening here on a Galaxy S5 Active. I've reinstalled and even put 2.48 beta on it.
The strange thing is the "Apps" list remains blank the entire time. Log shows apps using root, but they never get added to the list and I have to default "grant" everything for apps to work (at least, the ones that will work with this half broken root).
Click to expand...
Click to collapse
I wonder if some userids got munged. Try this in a terminal:
find /data/data/eu.chainfire.supersu -exec stat -c %u {} \;
You should only get about three owner ids: 0; 1023(or other 4-digit); and only one 5 or more digit number for SuperSU.
Frank
Find and Stat command not found.
harmgsn said:
Find and Stat command not found.
Click to expand...
Click to collapse
You can check the owner IDs in that directory with
ls -l eu./data/data/chainfire.superuser
If I got the path right -- it should be what I have in my previous message but I can't see it right now.
Frank
drwxrwx--x u0_a184 u0_a184 2015-04-17 08:05 cached
rwxrwx--x u0_a184 u0_a184 2015-04-17 08:08 files
lrwxrwxrwx install install 2013-12-31 18:00 lib -> /data/app-lib/eu.chainfire.supersu
drwxr-xr-x root root 2015-04-17 17:33 logs
drw------- root root 2015-04-16 23:58 requests
drwxrwx--x u0_a184 u0_a184 2015-04-17 08:08 share

Alternative to installing Better Battery Stats as system app

Starting with Android 4.4 (KitKat) Better Battery Stats (BBS) require installation as system app to be able to collect the stats.
BBS must re re-installed as system app after each ROM upgrade (upgrade that does not preserve third party system apps).
I have found an alternative to this - the required permissions can be granted to BBS when it is installed as a regular user app by running these commands in Android Terminal (or ADB shell session):
Code:
su
pm grant com.asksven.betterbatterystats android.permission.BATTERY_STATS
pm grant com.asksven.betterbatterystats android.permission.DUMP
After using these commands it might be required to restart BBS process (e.g. reboot the device). Permissions granted this way will be preserved across ROM upgrades (even across those completely overwriting /system partition).
This has been tested on CyanogenMod 12.1 nightlies (Android 5.1.1).
Update! This post on BBS thread describes a related method for granting (at least part of) the permissions without root.
Hi DavisNT,
I'm confirming that your adb code appears to be a successful workaround for the normal version of BBS downloaded from the Play Store when the phone is running Lollipop. I'm running the paid version of BBS, on the current CM12.1 Nightly (jfltetmo for my T-Mobilr SGH-M919 Galaxy S4).
Procedure:
1. Install BBS from the Play Store.
2. Use ADB (easy to cut and paste from here) or another terminal program (you'll be typing) to install the code.
3. Reboot the phone.
You'll notice that when you launch BBS, CM's "Privacy Guard" will see that BBS is trying to gain root access, and will prompt you to allow this. I selected "Always Allow" until I'm done my battery testing. You'll notice that you now see "#" up on the phone's status bar. That indicates an app is running with root access. You could probably quiescence this by choosing "Ignore" via Privacy Guard.
Could the developer please approve that this relatively easy workaround is kosher?
Thanks . . .
Moved to main thread to avoid orphan
For apk downloaded from xda change the code to
pm grant com.asksven.betterbatterystats_xdaedition android.permission.BATTERY_STATS
pm grant com.asksven.betterbatterystats_xdaedition android.permission.DUMP
I tried this method, but failed on the BATTERY_STATS permission, the error said this 'permission type is not changeable'
is this method still valid?
andycjw said:
I tried this method, but failed on the BATTERY_STATS permission, the error said this 'permission type is not changeable'
is this method still valid?
Click to expand...
Click to collapse
On what version of Android did this fail? And was 'su' used before 'pm grant'?
Same problem. I'm on CM, Android version 4.4.4. Used 'su' before.
bobcote said:
Same problem. I'm on CM, Android version 4.4.4. Used 'su' before.
Click to expand...
Click to collapse
Most likely this method works only on Lollipop and Marshmallow.
Looks like on KitKat BATTERY_STATS permission does not have development in its protectionLevel, but on Lollipop and Marshmallow it has.
I assume (please correct me if I am wrong, preferably with link to some authoritative documentation) that development in protectionLevel allows a permission to be granted by pm grant command.
Thanks
I can confirm that this method works flawlessly for the Sprint version of the Galaxy Note 3 5.0. Many thanks.
Guys where is the main thread? Pls ?
DavisNT said:
Starting with Android 4.4 (KitKat) Better Battery Stats (BBS) require installation as system app to be able to collect the stats.
BBS must re re-installed as system app after each ROM upgrade (upgrade that does not preserve third party system apps).
I have found an alternative to this - the required permissions can be granted to BBS when it is installed as a regular user app by running these commands in Android Terminal (or ADB shell session):
Code:
su
pm grant com.asksven.betterbatterystats android.permission.BATTERY_STATS
pm grant com.asksven.betterbatterystats android.permission.DUMP
After using these commands it might be required to restart BBS process (e.g. reboot the device). Permissions granted this way will be preserved across ROM upgrades (even across those completely overwriting /system partition).
This has been tested on CyanogenMod 12.1 nightlies (Android 5.1.1).
Click to expand...
Click to collapse
Does this method work on marshmallow?
Thank you
RoxAbout said:
Does this method work on marshmallow?
Thank you
Click to expand...
Click to collapse
Most likely yes. Feel free to test. [emoji2]
Can anyone post BBS apk please!! TQIA
Thanks dude. The command for xdaedition worked flawlessly on my RR rom. Android 6.0.1 Galaxy S3
Worked! Thanks.
Does this works on a non-rooted phone? if it works, is uninstalling as simple as accessing app under setting to uninstall?
Thanks.
nuthing03 said:
Does this works on a non-rooted phone? if it works, is uninstalling as simple as accessing app under setting to uninstall?
Thanks.
Click to expand...
Click to collapse
AFAIK This method should NOT work on non-rooted phones (but you can still try it :fingers-crossed: ). If it will work, uninstalling the app (via Settings - Applications) would also revoke the granted permissions.
Original Thread here: http://bit.ly/1ov1NNy
Can confirm that the workaround is OK on Samsung S6 with Android 6.0.1 (stock DTM/rooted).
Best regards
Glad I found this, thought BBS was bugged when it kept wanting the BATTERY_STAT permission despite having the XPosed module :\
Executing those 2 lines fixed the problem.... wonder why it's not like that by default. I even checked AppOpsXposed and didn't see anything about DUMP/BATTERY_STAT
Installing BBS into /system would break OTA, no? I've read somewhere the claim that it doesn't--maybe even in the app itself

[REQUEST] Make sideloaded APKs appear as if they were installed from Google Play

I came across this guide that explained how to get a sideloaded apk to work with Android Auto.
It got me thinking, there are always some apps that don't respond well to integrations due to the getInstallerPackageName() method of checking the install source.
Would someone be kind enough to create a module that does this so we do not need to connect our phones to the PC every time we update the APK just for a few apps?
There's no need to connect to your computer (and neither for a Magisk module, really). You should be ably to simply run the command in a Terminal emulator instead (without the ADB shell part).
As Didgeridoohan said and you could try as
Code:
pm set-installer "PACKAGE" "com.android.vending"
Replacing PACKAGE with the package name of app installed already you want to change its installer to Google Play.
Can't you do this in titanium backup by clicking on the app and going to special features tab and clicking attach to market?
This pm set-installer didn't work for me. What did was just installing the package (as root , not sure it's needed) with:
pm install -i "com.android.vending" <apk>

Removing Bloatware does not work on MIUI 12

Hello Friends,
When I was on MIUI 11, I had removed Mi apps like Mi pay, Mi video, Poco launcher, Mi browser and Mi music by adb. Now I have updated to latest MIUI 12 but I am not able to remove Mi calendar, Mi browser via adb. I get an error message, "failure [-1000]". Why is it happening and how I can remove the bloatware?
Hi Friends,
I am using MIUI 12.0.2.0 China stable ROM on my K20 Pro & I removed all the bloatwares apps included in this rom. For removings apps I use XiaomiADBFastbootTools.jar .I suggest you download this tool & install JDK (java development kit) for the removal process. I am very haappy with this tool. I also use it on XIAOMI.EU rom.
I hope your problem will be solved with this great tool.
On global rom the tool cannot remove these apps, no idea why not.
boomboomer said:
On global rom the tool cannot remove these apps, no idea why not.
Click to expand...
Click to collapse
You try this tool on global ROM?
i try that tool on global miui 12 and it cant remove that apps.
But on latest beta orange fox recovery exist option to remove system apps. didnt try as i change miui 12 global to Xiaomi.eu weekly and tool can remove that apps.
so global stable cant remove and xiaomi.eu weekly can remove
I tried with both Szaki's tool and OrangeFox Recovery tool, none of them work.
I confirm that following apps can't be removed on Global (12.0.1) MIUI 12
Code:
com.mi.android.globalminusscreen
com.mi.globalbrowser
com.xiaomi.calendar
com.miui.player
com.miui.videoplayer
com.miui.weather2
Following error occurs when I try to uninstall any of these apps:
Code:
pm uninstall --user 0 com.mi.android.globalminusscreen
Failure [-1000]
I removed it
renr29 said:
I removed it
Click to expand...
Click to collapse
This affirmation without an explanation is sh*t
bartito said:
This affirmation without an explanation is sh*t
Click to expand...
Click to collapse
we can remove it on custom miui roms
slavke1976 said:
we can remove it on custom miui roms
Click to expand...
Click to collapse
MIUI custom ROMs are not in question.
You allways can remove these sh*t apps on a custom ROM or, if can't be removed by "pm uninstall" command, you can remove by recovery.
The question is to remove these apps from unrooted and unlocked MIUI 12 global
bartito said:
MIUI custom ROMs are not in question.
You allways can remove these sh*t apps on a custom ROM or, if can't be removed by "pm uninstall" command, you can remove by recovery.
The question is to remove these apps from unrooted and unlocked MIUI 12 global
Click to expand...
Click to collapse
I understand, but the answer is that we cant from miui 12 global. My phone is unlocked and i had magisk. and miui global stable, removing that apps is not possible with that debloater tool or commands. Didnt try other metods. but with debloater tools as sakis, it doesnt work.
bartito said:
I confirm that following apps can't be removed on Global (12.0.1) MIUI 12
Following error occurs when I try to uninstall any of these apps:
Click to expand...
Click to collapse
The smallest ADB package for PC that is enough for ADB is Minimal ADB and Fastboot (find a thread on XDA)
According to your error, it was the following ADB command that failed:
adb shell pm uninstall -k --user 0 <pkg-name>
Try instead the other ADB command:
adb shell pm disable-user <pkg-name>
Where <pkg-name> stands for:
com.mi.android.globalminusscreen com.mi.globalbrowser
...
or package name for any other system app you want to disable - use AppInspector from Playstore to read package names corresponding to the apps
I'm not using any windows command but the adb shell command to access the device then exec pm uninstall command.
I also confirm that I've tried also pm disable and pm disable-user and both fails to remove/disable the related apps
zgfg said:
Instead of using a jar (not knowing what's inside), you can use ADB commands - simply install Minimal ADB and Fastboot package to PC
According to your error, jar executes the following ADB command:
adb shell pm uninstall -k --user 0 <pkg-name>
Try instead the other ADB command:
adb shell pm disable-user <pkg-name>
Where <pkg-name> stands for:
or package name for any other system app you want to disable - use AppInspector from Playstore to read package names corresponding to the apps
Click to expand...
Click to collapse
bartito said:
I'm not using any windows command but the adb shell command to access the device then exec pm uninstall command.
I also confirm that I've tried also pm disable and pm disable-user and both fails to remove/disable the related apps
Click to expand...
Click to collapse
By AppInspector, find the system or data folder and apk name where the corresponding app is installed
By using TWRP (root not required) or e.g. MiXPlorer (root required), go to that folder and rename <app-name>.apk to <app-name>.bak and reboot
If you disabled a critical app causing e.g. a boot failure, use TWRP and rename bak file back to the original apk extension
To use twrp root isn't required but bootloader unlocked.
My bootloader is locked
zgfg said:
By AppInspector, find the system or data folder and apk name where the corresponding app is installed
By using TWRP (root not required) or e.g. MiXPlorer (root required), go to that folder and rename <app-name>.apk to <app-name>.bak and reboot
If you disabled a critical app causing e.g. a boot failure, use TWRP and rename bak file back to the original apk
Click to expand...
Click to collapse
zgfg said:
The smallest ADB package for PC that is enough for ADB is Minimal ADB and Fastboot (find a thread on XDA)
According to your error, it was the following ADB command that failed:
adb shell pm uninstall -k --user 0 <pkg-name>
Try instead the other ADB command:
adb shell pm disable-user <pkg-name>
Where <pkg-name> stands for:
com.mi.android.globalminusscreen com.mi.globalbrowser
...
or package name for any other system app you want to disable - use AppInspector from Playstore to read package names corresponding to the apps
Click to expand...
Click to collapse
Thanks a ton!! The MIUI browser (com.mi.globalbrowser) had been bothering me for quite some time, and because of you I was able to get rid of it! Thanks!
I can also confirm that using the disable function works on both the browser and calender apps, you can't uninstall but it will accept disable - problem solved
boomboomer said:
I can also confirm that using the disable function works on both the browser and calender apps, you can't uninstall but it will accept disable - problem solved
Click to expand...
Click to collapse
Btw, there is not much difference in disabling and 'uninstalling' - i.e., don't think that
adb shell pm uninstall -k --user 0 <pkg-name>
would really remove the package from your system
It only uninstalls for the current user 0 - but the app is still available on the system for user 999
And the opposite command:
adb shell cmd package install-existing <pkg-name>
would reinstall it (for user 0), hence package was not really deleted from the system (to save some MBs or so)
---
The only differences between disabling and uninstalling (both make it for user 0) are
- Disabled apps are still visible in Settings, Apps and some of them can be re-enabled by click from there.
Playstore will show you an update of disabled app and if you want to prevent its automatic update (and re-enabling) you have to disable its auto-update in Playstore.
Similarly for System apps updater from Xiaomi (disable auto-updating and when it offers to update an app you have disabled, click to ignore the update)
- 'Uninstalled' ones are not visible in Settings, Apps. If you want to 're-install' them you have to remember what you have 'uninstalled'' and their package names.
Playstore and System apps updater will not bother you about their updates
Thanks, but this is just with the ADBFastbootTools.jar and the uninstall option failed for the new Mi Browser and Calender, but the disable option worked. Both are annoying bloatware that can't be fully removed without root, so this is the next best option.

how to fix su datebase and uninstall app?

Due to my previous wrong operation, I cannot manage su now.
I tried to download Magisk uninstall.zip in git tonight, uninstall and then install, install and uninstall, Magisk app is always there (because it was installed by me as a system application).
I have tried adb uninstall (adb uninstall com.topjohnwu.magisk), but I cannot get root privileges.
I tried both of the two uninstall methods in the app, but they didn't work. Every time I restarted, it was still the same.
I cannot use magisk to authorize other applications, nor can I uninstall it from the system software.
In addition, after every restart, it will say that the `su database is damaged, the database will be rebuilt`, and then I restarted again, opening magisk is still the same prompt.

Categories

Resources