Would this be the famous AppOps? See attachments. If so, should I not be able to access it through an emulator?
Code:
[email protected]:/system/bin $ appops
usage: appops set [--user <USER_ID>] <PACKAGE> <OP> <MODE>
appops get [--user <USER_ID>] <PACKAGE> [<OP>]
appops reset [--user <USER_ID>] [<PACKAGE>]
<PACKAGE> an Android package name.
<OP> an AppOps operation.
<MODE> one of allow, ignore, deny, or default
<USER_ID> the user id under which the package is installed. If --user is not specified, the current user is assumed.
[email protected]:/system/bin $
DragonFire1024 said:
Would this be the famous AppOps? See attachments. If so, should I not be able to access it through an emulator?
Click to expand...
Click to collapse
Oops wrong attachment
Also this: all from /system/bin
Code:
# Script to start "appwidget" on the device, which has a very rudimentary shell.
base=/system
export CLASSPATH=$base/framework/appops.jar
exec app_process $base/bin com.android.commands.appops.AppOpsCommand "[email protected]"
/system/bin/appwidget:
Code:
# Script to start "appwidget" on the device, which has a very rudimentary shell.
base=/system
export CLASSPATH=$base/framework/appwidget.jar
exec app_process $base/bin com.android.commands.appwidget.AppWidget "[email protected]"
/system/bin/appops:
Code:
# Script to start "appwidget" on the device, which has a very rudimentary shell.
base=/system
export CLASSPATH=$base/framework/appops.jar
exec app_process $base/bin com.android.commands.appops.AppOpsCommand "[email protected]"
Terminal Emulator:
Code:
[email protected]:/ $ appops
usage: appops set [--user <USER_ID>] <PACKAGE> <OP> <MODE>
appops get [--user <USER_ID>] <PACKAGE> [<OP>]
appops reset [--user <USER_ID>] [<PACKAGE>]
<PACKAGE> an Android package name.
<OP> an AppOps operation.
<MODE> one of allow, ignore, deny, or default
<USER_ID> the user id under which the package is installed. If --user is not
specified, the current user is assumed.
[email protected]:/ $
I tried to run the scripts, which appear to work, but no widget appears and emulator closes after I run the widget script. I managed to get a minimized screen cap, posted below.
Related
The first method I presented showed you how to enable sideloading but to toggle it you'd need to re-edit the db file. This method enables the checkbox in System > Settings > Applications so there's no need to modify any DBs.
Code:
[[email protected] ~]$ adb shell
$ su
# busybox cp /data/data/com.motorola.android.providers.settings/databases/settings.db /data/data/com.motorola.android.providers.settings/databases/settings.db.bak
# chown system.system /data/data/com.motorola.android.providers.settings/databases/settings.db
# busybox cp /data/data/com.motorola.android.providers.settings/databases/settings.db /sdcard/settings.db
# exit
$ exit
[[email protected] ~]$ adb pull /sdcard/settings.db
sqlite3 settings.db
sqlite> SELECT * FROM settings WHERE name="force_only_market_apps";
107|force_only_market_apps|0
sqlite> UPDATE settings SET value=0 WHERE name="force_only_market_apps";
sqlite> SELECT * FROM secure WHERE name="force_only_market_apps";
107|force_only_market_apps|1
sqlite> .quit
[[email protected] ~]$ adb push settings.db /sdcard/
[[email protected]ite ~]$ adb shell
$ su
# busybox cp /sdcard/settings.db /data/data/com.motorola.android.providers.settings/databases/settings.db
# chown system.system /data/data/com.motorola.android.providers.settings/databases/settings.db
# exit
$ exit
Oh, and I am pretty sure OneClick doesn't enable this. So you Windows fanboys can hush up.
Back in September 2017 Lineage made some changes to the privacy guard in attempts to clean it up. Unfortunately, this this sacrificed user privacy, and means you must go into the privacy guard multiple times. Until an app actually uses a feature it will not appear in the privacy guard unless it has been specifically declared. This also means by the time it appears in the privacy guard, it's already accessed your information. Second we all know how much fun setting up the privacy guard is after a clean install.
** This requires root access **
To fix this both of these issues, and give you access to options you didn't have before you can create a script. I do want to thank Gabriele for supplying the information to help with this.
The options you have available to set are:
COARSE_LOCATION
FINE_LOCATION
GPS
VIBRATE
READ_CONTACTS
WRITE_CONTACTS
READ_CALL_LOG
READ_CALENDAR
WRITE_CALENDAR
WIFI_SCAN
POST_NOTIFICATION
NEIGHBORING_CELLS
CALL_PHONE
READ_SMS
WRITE_SMS
RECEIVE_SMS
RECEIVE_EMERGECY_SMS
RECEIVE_MMS
RECEIVE_WAP_PUSH
SEND_SMS
READ_ICC_SMS
WRITE_ICC_SMS
WRITE_SETTINGS
SYSTEM_ALERT_WINDOW
ACCESS_NOTIFICATIONS
CAMERA
RECORD_AUDIO
PLAY_AUDIO
READ_CLIPBOARD
WRITE_CLIPBOARD
TAKE_MEDIA_BUTTONS
TAKE_AUDIO_FOCUS
AUDIO_MASTER_VOLUME
AUDIO_VOICE_VOLUME
AUDIO_RING_VOLUME
AUDIO_MEDIA_VOLUME
AUDIO_ALARM_VOLUME
AUDIO_NOTIFICATION_VOLUME
AUDIO_BLUETOOTH_VOLUME
WAKE_LOCK
MONITOR_LOCATION
MONITOR_HIGH_POWER_LOCATION
GET_USAGE_STATS
MUTE_MICROPHONE
TOAST_WINDOW
PROJECT_MEDIA
ACTIVATE_VPN
WRITE_WALLPAPER
ASSIST_STRUCTURE
ASSIST_SCREENSHOT
OP_READ_PHONE_STATE
ADD_VOICEMAIL
USE_SIP
PROCESS_OUTGOING_CALLS
USE_FINGERPRINT
BODY_SENSORS
READ_CELL_BROADCASTS
MOCK_LOCATION
READ_EXTERNAL_STORAGE
WRITE_EXTERNAL_STORAGE
TURN_ON_SCREEN
GET_ACCOUNTS
RUN_IN_BACKGROUND
WIFI_CHANGE
BLUETOOTH_CHANGE
BOOT_COMPLETED
NFC_CHANGE
DATA_CONNECT_CHANGE
SU
The first thing you need to do is enable to the local terminal app. This is under developer options, Local terminal.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
This will place a terminal icon in your app drawer.
For all of these commands you need the actual program name. This piece of information is available in settings, under application information. In this example, it is com.adobe.reader.
To see what permissions an app has, in the terminal you need root permissions. So the first thing you need to do is type SU. If you never done this before grant the terminal root permissions. Then type:
appops get com.adobe.reader
Or whatever app you want. This should show you what permissions that particular application currently has.
Now onto the good stuff. Actually making a script, and adding in options to the privacy guard. Your script is just written in any basic text editor. However, make sure you save it with the ending .sh
It follows this template:
appops set <PACKAGE> COARSE_LOCATION <MODE>
appops set <PACKAGE> FINE_LOCATION <MODE>
appops set <PACKAGE> GPS <MODE>
appops set <PACKAGE> VIBRATE <MODE>
appops set <PACKAGE> READ_CONTACTS <MODE>
appops set <PACKAGE> WRITE_CONTACTS <MODE>
appops set <PACKAGE> READ_CALL_LOG <MODE>
appops set <PACKAGE> READ_CALENDAR <MODE>
appops set <PACKAGE> WRITE_CALENDAR <MODE>
appops set <PACKAGE> WIFI_SCAN <MODE>
appops set <PACKAGE> POST_NOTIFICATION <MODE>
appops set <PACKAGE> NEIGHBORING_CELLS <MODE>
appops set <PACKAGE> CALL_PHONE <MODE>
appops set <PACKAGE> READ_SMS <MODE>
appops set <PACKAGE> WRITE_SMS <MODE>
appops set <PACKAGE> RECEIVE_SMS <MODE>
appops set <PACKAGE> RECEIVE_EMERGECY_SMS <MODE>
appops set <PACKAGE> RECEIVE_MMS <MODE>
appops set <PACKAGE> RECEIVE_WAP_PUSH <MODE>
appops set <PACKAGE> SEND_SMS <MODE>
appops set <PACKAGE> READ_ICC_SMS <MODE>
appops set <PACKAGE> WRITE_ICC_SMS <MODE>
appops set <PACKAGE> WRITE_SETTINGS <MODE>
appops set <PACKAGE> SYSTEM_ALERT_WINDOW <MODE>
appops set <PACKAGE> ACCESS_NOTIFICATIONS <MODE>
appops set <PACKAGE> CAMERA <MODE>
appops set <PACKAGE> RECORD_AUDIO <MODE>
appops set <PACKAGE> PLAY_AUDIO <MODE>
appops set <PACKAGE> READ_CLIPBOARD <MODE>
appops set <PACKAGE> WRITE_CLIPBOARD <MODE>
appops set <PACKAGE> TAKE_MEDIA_BUTTONS <MODE>
appops set <PACKAGE> TAKE_AUDIO_FOCUS <MODE>
appops set <PACKAGE> AUDIO_MASTER_VOLUME <MODE>
appops set <PACKAGE> AUDIO_VOICE_VOLUME <MODE>
appops set <PACKAGE> AUDIO_RING_VOLUME <MODE>
appops set <PACKAGE> AUDIO_MEDIA_VOLUME <MODE>
appops set <PACKAGE> AUDIO_ALARM_VOLUME <MODE>
appops set <PACKAGE> AUDIO_NOTIFICATION_VOLUME <MODE>
appops set <PACKAGE> AUDIO_BLUETOOTH_VOLUME <MODE>
appops set <PACKAGE> WAKE_LOCK <MODE>
appops set <PACKAGE> MONITOR_LOCATION <MODE>
appops set <PACKAGE> MONITOR_HIGH_POWER_LOCATION <MODE>
appops set <PACKAGE> GET_USAGE_STATS <MODE>
appops set <PACKAGE> MUTE_MICROPHONE <MODE>
appops set <PACKAGE> TOAST_WINDOW <MODE>
appops set <PACKAGE> PROJECT_MEDIA <MODE>
appops set <PACKAGE> ACTIVATE_VPN <MODE>
appops set <PACKAGE> WRITE_WALLPAPER <MODE>
appops set <PACKAGE> ASSIST_STRUCTURE <MODE>
appops set <PACKAGE> ASSIST_SCREENSHOT <MODE>
appops set <PACKAGE> OP_READ_PHONE_STATE <MODE>
appops set <PACKAGE> ADD_VOICEMAIL <MODE>
appops set <PACKAGE> USE_SIP <MODE>
appops set <PACKAGE> PROCESS_OUTGOING_CALLS <MODE>
appops set <PACKAGE> USE_FINGERPRINT <MODE>
appops set <PACKAGE> BODY_SENSORS <MODE>
appops set <PACKAGE> READ_CELL_BROADCASTS <MODE>
appops set <PACKAGE> MOCK_LOCATION <MODE>
appops set <PACKAGE> READ_EXTERNAL_STORAGE <MODE>
appops set <PACKAGE> WRITE_EXTERNAL_STORAGE <MODE>
appops set <PACKAGE> TURN_ON_SCREEN <MODE>
appops set <PACKAGE> GET_ACCOUNTS <MODE>
appops set <PACKAGE> RUN_IN_BACKGROUND <MODE>
appops set <PACKAGE> WIFI_CHANGE <MODE>
appops set <PACKAGE> BLUETOOTH_CHANGE <MODE>
appops set <PACKAGE> BOOT_COMPLETED <MODE>
appops set <PACKAGE> NFC_CHANGE <MODE>
appops set <PACKAGE> DATA_CONNECT_CHANGE <MODE>
appops set <PACKAGE> SU <MODE>
< PACKAGE > Gets replaced with the program name. < MODE > Gets replaced with ignore, allow, or ask. The " # " is a comment. So here is an example from my script file:
#Gello Browser
appops set org.cyanogenmod.gello.browser COARSE_LOCATION ignore
appops set org.cyanogenmod.gello.browser FINE_LOCATION ignore
appops set org.cyanogenmod.gello.browser GPS ignore
appops set org.cyanogenmod.gello.browser VIBRATE ignore
appops set org.cyanogenmod.gello.browser READ_CONTACTS ignore
appops set org.cyanogenmod.gello.browser WRITE_CONTACTS ignore
appops set org.cyanogenmod.gello.browser READ_CALL_LOG ignore
appops set org.cyanogenmod.gello.browser READ_CALENDAR ignore
appops set org.cyanogenmod.gello.browser WRITE_CALENDAR ignore
appops set org.cyanogenmod.gello.browser WIFI_SCAN ignore
appops set org.cyanogenmod.gello.browser POST_NOTIFICATION allow
appops set org.cyanogenmod.gello.browser NEIGHBORING_CELLS ignore
appops set org.cyanogenmod.gello.browser CALL_PHONE ignore
appops set org.cyanogenmod.gello.browser READ_SMS ignore
appops set org.cyanogenmod.gello.browser WRITE_SMS ignore
appops set org.cyanogenmod.gello.browser RECEIVE_SMS ignore
appops set org.cyanogenmod.gello.browser RECEIVE_EMERGECY_SMS ignore
appops set org.cyanogenmod.gello.browser RECEIVE_MMS ignore
appops set org.cyanogenmod.gello.browser RECEIVE_WAP_PUSH ignore
appops set org.cyanogenmod.gello.browser SEND_SMS ignore
appops set org.cyanogenmod.gello.browser READ_ICC_SMS ignore
appops set org.cyanogenmod.gello.browser WRITE_ICC_SMS ignore
appops set org.cyanogenmod.gello.browser WRITE_SETTINGS ignore
appops set org.cyanogenmod.gello.browser SYSTEM_ALERT_WINDOW ignore
appops set org.cyanogenmod.gello.browser ACCESS_NOTIFICATIONS allow
appops set org.cyanogenmod.gello.browser CAMERA ignore
appops set org.cyanogenmod.gello.browser RECORD_AUDIO ignore
appops set org.cyanogenmod.gello.browser PLAY_AUDIO allow
appops set org.cyanogenmod.gello.browser READ_CLIPBOARD allow
appops set org.cyanogenmod.gello.browser WRITE_CLIPBOARD allow
appops set org.cyanogenmod.gello.browser TAKE_MEDIA_BUTTONS ignore
appops set org.cyanogenmod.gello.browser TAKE_AUDIO_FOCUS ignore
appops set org.cyanogenmod.gello.browser AUDIO_MASTER_VOLUME allow
appops set org.cyanogenmod.gello.browser AUDIO_VOICE_VOLUME ask
appops set org.cyanogenmod.gello.browser AUDIO_RING_VOLUME ignore
appops set org.cyanogenmod.gello.browser AUDIO_MEDIA_VOLUME ignore
appops set org.cyanogenmod.gello.browser AUDIO_ALARM_VOLUME ignore
appops set org.cyanogenmod.gello.browser AUDIO_NOTIFICATION_VOLUME ask
appops set org.cyanogenmod.gello.browser AUDIO_BLUETOOTH_VOLUME ask
appops set org.cyanogenmod.gello.browser WAKE_LOCK allow
appops set org.cyanogenmod.gello.browser MONITOR_LOCATION ignore
appops set org.cyanogenmod.gello.browser MONITOR_HIGH_POWER_LOCATION ignore
appops set org.cyanogenmod.gello.browser GET_USAGE_STATS ignore
appops set org.cyanogenmod.gello.browser MUTE_MICROPHONE ignore
appops set org.cyanogenmod.gello.browser TOAST_WINDOW allow
appops set org.cyanogenmod.gello.browser PROJECT_MEDIA ignore
appops set org.cyanogenmod.gello.browser ACTIVATE_VPN allow
appops set org.cyanogenmod.gello.browser WRITE_WALLPAPER ignore
appops set org.cyanogenmod.gello.browser ASSIST_STRUCTURE ignore
appops set org.cyanogenmod.gello.browser ASSIST_SCREENSHOT ask
appops set org.cyanogenmod.gello.browser OP_READ_PHONE_STATE ignore
appops set org.cyanogenmod.gello.browser ADD_VOICEMAIL ignore
appops set org.cyanogenmod.gello.browser USE_SIP ignore
appops set org.cyanogenmod.gello.browser PROCESS_OUTGOING_CALLS ignore
appops set org.cyanogenmod.gello.browser USE_FINGERPRINT ignore
appops set org.cyanogenmod.gello.browser BODY_SENSORS ignore
appops set org.cyanogenmod.gello.browser READ_CELL_BROADCASTS ignore
appops set org.cyanogenmod.gello.browser MOCK_LOCATION ignore
appops set org.cyanogenmod.gello.browser READ_EXTERNAL_STORAGE allow
appops set org.cyanogenmod.gello.browser WRITE_EXTERNAL_STORAGE allow
appops set org.cyanogenmod.gello.browser TURN_ON_SCREEN ignore
appops set org.cyanogenmod.gello.browser GET_ACCOUNTS ignore
appops set org.cyanogenmod.gello.browser RUN_IN_BACKGROUND allow
appops set org.cyanogenmod.gello.browser WIFI_CHANGE ignore
appops set org.cyanogenmod.gello.browser BLUETOOTH_CHANGE ignore
appops set org.cyanogenmod.gello.browser BOOT_COMPLETED ignore
appops set org.cyanogenmod.gello.browser NFC_CHANGE ignore
appops set org.cyanogenmod.gello.browser DATA_CONNECT_CHANGE ignore
appops set org.cyanogenmod.gello.browser SU ignore
The last line of your script should be:
appops write-settings
Now realize you don't have to use all those options up there. That is every option available. Not every app will use them. I've have not had any errors from setting options from apps that don't exists, so I've chosen to create one script for all my devices.
Once you get done with the script, use the terminal to run it:
So for those that aren't familiar with the terminal, the firs thing that you need to do is gain root privileges, by typing, su (as above). The "ls" command will list everything in the current directory, so you can figure out where you are. For simplicity sake, I just placed the script in the root directory of the internal memory. Note this directory is called sdcard, even though your device may not be using an actual SDCard. CD sdcard should look familiar to the windows users, this is just switching directories, to the sdcard folder, which again is actually internal memory on most devices. Finally, sh scriptname.sh will run the script.
Give it time, when you run the script it's not complete until the terminal goes to the next line. Mine took almost a minute. The biggest thing I noticed is you then have to go back to the privacy guard and re-enable it for every app, as it will be disabled. However all the options will now be what you chose. I don't know why it turns it off, but turn it back on is easier than manually changing all the settings.
You'll also notice now you have all sorts of new options in privacy guard for all the apps. Again though, most of these options won't ever be used by many of these apps.
For convenience I've attached an example file to this post. You will have to change the .txt extension to .sh, however it hopefully will give you an idea of what you can do with this.
So some background on why this was needed.
This is a screenshot of the September 11 nightly privacy guard options, for Angry Birds by default:
On the October 2 nightly with the updates, you'll notice most everything is gone when you first install everything:
Then as the application uses or requests new things, they show in privacy guard, however not in a denied state like the screenshot below shows (I've already changed those settings). See the same screenshot from the October 2 nightly, after the application has been opened and used:
This means you must go into the privacy guard multiple times to see what options have appeared which is less than ideal.
Hi, do you know how can I install 'Privacy Guard' app in a stock or custom rom for any device?
Thank you so much for sharing this dude !
I just want to also share that you can now set every single permission controlled by AppOpsService through a nice GUI thanks to this sweet app : AppOpsX
https://f-droid.org/app/com.zzzmode.appopsx
Just beware that :
1/ permissions are only added when it's already been asked at least once
2/ auto turn off permissions for newly installed app isn't working for me (from Fdroid and Aurora)
For the rest it's working like a charm.
Though I would suggest combining this with Bouncer (unfortunately not open source) : using AppOppsX for definitely turning off every permissions not necessary, and then Bouncer to temporarily allow the few which are truly necessary for the app to function and automatically reverting it to the ignore state afterwards
Hope it will help some of you guys stopping by here still looking for a solution !
Oh, what do I see? Isn't it a little smile on your face?
Thank you, wholeheartedly. @Voxitme
Is there any chance to improve Privacy guard or Lineage, if someone must, by wiping every single O of this awful implementation?
R.i.p. CyanogenMod :crying:
PS
Voxitme, how much cost this fabulous invention?
Is it true that I can install every single thing trough recovery and have the result afterwards really on my device?
This is hokum.Better Privacy guard activating.
You see what I did here..
UsPdSr said:
Thank you, wholeheartedly. @Voxitmee
Is there any chance to improve Privacy guard or Lineage, if someone must, by wiping every single O of this awful implementation?
R.i.p. CyanogenMod :crying:
PS
Voxitme, how much cost this fabulous invention?
Is it true that I can install every single thing trough recovery and have the result afterwards really on my device?
This is hokum.Better Privacy guard activating.
You see what I did here..
Click to expand...
Click to collapse
Hi @UsPdSr,
I'm not at the devolepper of AppOpsX, hence don't really know how much time he spent working on this.
Hope we'll have a better way to manage permissions soon
Voxitme said:
Hi @UsPdSr,
I'm not at the devolepper of AppOpsX, hence don't really know how much time he spent working on this.
Hope we'll have a better way to manage permissions soon
Click to expand...
Click to collapse
Joke beside.
I just saw that the pro-version(€ 1,89) was deprecated for some reason.
If the owner didn't change suddenly it's certainly a better choice, then..oh, I forgot the name..hmm
1y later, 2 versions, does this govern bluetooth access as well?
Aloha,
Very informative post about terminal usage and using .sh scripts.
My HTC One M9 has Lineage OS 16 from @Claymore1297, collection of ROMs for said device. It will connect to bluetooth in a car or truck in my case, but it won't play music. Only make calls for hands free operation. An improvement from at least v14 release notes. The car display says "Bluetooth Device is locked," when I push the media button to play music from from phone. I thought this might be the Google privacy, but the app info when I click on the i icon on the notice says it is the Android System app . It still occurs after disabling the Google protection in settings. So I was wondering if this also is the same case for bluetooth. Basically just another app technically for transferring data.
Mahalo Thanks,
William 飞鰞鰂
I never tried this with a Fire OS other than 5.6.2.0, but when I run the "adb shell settings list system" command, it fails with the following response:
usage: settings [--user NUM] get namespace key
settings [--user NUM] put namespace key value
settings [--user NUM] delete namespace key
The "list" option is missing; just get, put and delete are available. Is this something Amazon did on 5.6.2.0 or has this been around awhile? And is there a fix/work-around?
Store and Voice input will be lost.
1, Install Launcher of your choice. ( adb install 123launcher.apk )
2, adb shell su -c "pm disable-user --user 0 com.amazon.tv.launcher"
wait 5 seconds
3, adb shell su -c "pm disable-user --user 0 com.amazon.firehomestarter"
wait 5 seconds
5, adb shell reboot
6, adb install com.markus.firetools-1.2.apk (to access Settings "allow Root" )
#########
Disable OTA Updates:
adb shell "su -c pm disable com.amazon.tv.forcedotaupdater.v2"
adb shell "su -c pm disable com.amazon.device.software.ota"
adb shell "su -c pm disable com.amazon.device.software.ota.override"
adb shell "pm clear com.amazon.device.software.ota"
########
to restore the Amazon Launcher
adb shell su -c "pm enable com.amazon.firehomestarter"
wait 4 seconds
adb shell su -c "pm enable com.amazon.tv.launcher"
Update
New Settings APK in 1st Post
0815hoffi said:
After Tests i found out , you can replace amazon launcher without other Tools.
Please test if you want.
1 install launcher of your choice.
Boot twrp.
adb shell mount -o rw /system
Backup Apps
adb shell "cp /system/priv-app/com.amazon.firehomestarter/com.amazon.firehomestarter.apk /sdcard/"
adb shell "cp /system/priv-app/com.amazon.tv.launcher/com.amazon.tv.launcher.apk /sdcard/"
Delete amazon launcher.
adb shell "rm -r /data/app/com.amazon.tv.launcher-1/"
adb shell "rm -r /data/app/com.amazon.firehomestarter/"
adb shell "rm -r /data/data/com.amazon.tv.launcher/"
adb shell "rm -r /data/data/com.amazon.firehomestarter/"
adb shell "rm /system/priv-app/com.amazon.firehomestarter/com.amazon.firehomestarter.apk"
adb shell "rm /system/priv-app/com.amazon.tv.launcher/com.amazon.tv.launcher.apk"
adb push NewSettingsRoot.apk /sdcard/NewSettingsRoot.apk
adb shell "mkdir /system/priv-app/NewSettingsRoot/"
adb shell "chmod 0775 /system/priv-app/NewSettingsRoot/"
adb shell "chown root:root /system/priv-app/NewSettingsRoot/"
adb shell "cp /sdcard/NewSettingsRoot.apk /system/priv-app/NewSettingsRoot/NewSettingsRoot.apk"
adb shell "chmod 644 /system/priv-app/NewSettingsRoot/NewSettingsRoot.apk"
adb shell reboot
Workaround : The Settings app. Requires root
Click to expand...
Click to collapse
Works great! I'm really glad to see the last of the Amazon launcher screen. Thanks for your hard work.
TWRP Flashable Zip 1st Post.
Install launcher of your choice.
Then flash the zip.
Modified Leanbacklauncher with FireTvSettings.
Needs Root for Settings.
Will this work on the 2nd Gen sticks?
Yes it should.
Would it not be easier to just freeze pm disable com.amazon.firehomestarter and com.amazon.tv.launcher instead of deleting it? I'm using leanback launcher 1.18. I found it here on xda but I don't have the link anymore.
mrxtc89117 said:
Would it not be easier to just freeze pm disable com.amazon.firehomestarter and com.amazon.tv.launcher instead of deleting it? I'm using leanback launcher 1.18. I found it here on xda but I don't have the link anymore.
Click to expand...
Click to collapse
You can try it.
I haven't tested
Deleted some more on my Stick. See delete.txt
MarkusOnFire.apk is based on leanback launcher 1.19 .
Org. Leanback Launcher you can find here.
https://github.com/tsynik/LeanbackLauncher/releases/
Next step is to try using the stick without an amazon account and Initial Setup maybe
This is what worked for me on a fire stick 2nd gen
NewSettingsRoot.apk
adb push NewSettingsRoot.apk /sdcard/NewSettingsRoot.apk
adb shell su -c mount -o remount,rw /system
adb shell su -c mkdir /system/priv-app/NewSettingsRoot/
adb shell su -c chmod 0775 /system/priv-app/NewSettingsRoot/
adb shell su -c chown root:root /system/priv-app/NewSettingsRoot/
adb shell su -c cp /sdcard/NewSettingsRoot.apk /system/priv-app/NewSettingsRoot/NewSettingsRoot.apk
adb shell su -c chmod 644 /system/priv-app/NewSettingsRoot/NewSettingsRoot.apk
adb shell su -c mount -o remount,ro /system
adb shell su -c rm /sdcard/NewSettingsRoot.apk
adb shell pm grant com.markus.firetools android.permission.WRITE_SECURE_SETTINGS
adb shell pm grant com.amazon.tv.leanbacklauncher android.permission.WRITE_SECURE_SETTINGS
On a rooted FireTV2 (sloane) the Settings App doesn't work
If I select anything it goes back to the Home Screen!
I Flashed the zip with TWRP and also tried that Method which is discribed above, any Idea whats wrong?
Try this commands in adb shell.
su -c am start -a com.amazon.device.settings.action.APPLICATIONS -n com.amazon.tv.settings.v2/.tv.applications.ApplicationsActivity
su -c am start -a com.amazon.device.settings.action.APPS -n com.amazon.tv.settings/.tv.BuellerApplicationsSettingsActivity
su -c am start -a com.amazon.device.settings.action.MANAGE_APPLICATIONS -n com.amazon.tv.settings/com.amazon.tv.settings.tv.applications.ApplicationsActivity
su -c am start -a com.amazon.device.settings.action.MANAGE_APPLICATIONS -n com.amazon.tv.settings/com.amazon.tv.settings.tv.applications.ApplicationsActivity
Is one of them working?
If yes, i Think that i must make a New settings apk for firetv2.
This one is for 4k.
0815hoffi said:
Try this commands in adb shell.
su -c am start -a com.amazon.device.settings.action.APPLICATIONS -n com.amazon.tv.settings.v2/.tv.applications.ApplicationsActivity
su -c am start -a com.amazon.device.settings.action.APPS -n com.amazon.tv.settings/.tv.BuellerApplicationsSettingsActivity
su -c am start -a com.amazon.device.settings.action.MANAGE_APPLICATIONS -n com.amazon.tv.settings/com.amazon.tv.settings.tv.applications.ApplicationsActivity
su -c am start -a com.amazon.device.settings.action.MANAGE_APPLICATIONS -n com.amazon.tv.settings/com.amazon.tv.settings.tv.applications.ApplicationsActivity
Is one of them working?
If yes, i Think that i must make a New settings apk for firetv2.
This one is for 4k.
Click to expand...
Click to collapse
The first one works for me.
[[email protected] firestick]$ adb shell
-n com.amazon.tv.settings.v2/.tv.applications.ApplicationsActivity <
Starting: Intent { act=com.amazon.device.settings.action.APPLICATIONS cmp=com.amazon.tv.settings.v2/.tv.applications.ApplicationsActivity }
amazon.tv.settings/.tv.BuellerApplicationsSettingsActivity <
Starting: Intent { act=com.amazon.device.settings.action.APPS cmp=com.amazon.tv.settings/.tv.BuellerApplicationsSettingsActivity }
Error type 3
Error: Activity class {com.amazon.tv.settings/com.amazon.tv.settings.tv.BuellerApplicationsSettingsActivity} does not exist.
mantis:/ $
.settings/com.amazon.tv.settings.tv.applications.Application sActivity <
Starting: Intent { act=com.amazon.device.settings.action.MANAGE_APPLICATI pkg=ONS }
Error: Activity not started, unable to resolve Intent { act=com.amazon.device.settings.action.MANAGE_APPLICATI flg=0x10000000 pkg=ONS }
.settings/com.amazon.tv.settings.tv.applications.Application sActivity <
Starting: Intent { act=com.amazon.device.settings.action.MANAGE_APPLICATI pkg=ONS }
Error: Activity not started, unable to resolve Intent { act=com.amazon.device.settings.action.MANAGE_APPLICATI flg=0x10000000 pkg=ONS }
mantis:/ $
---------- Post added at 09:27 PM ---------- Previous post was at 09:20 PM ----------
0815hoffi said:
Try this commands in adb shell.
su -c am start -a com.amazon.device.settings.action.APPLICATIONS -n com.amazon.tv.settings.v2/.tv.applications.ApplicationsActivity
su -c am start -a com.amazon.device.settings.action.APPS -n com.amazon.tv.settings/.tv.BuellerApplicationsSettingsActivity
su -c am start -a com.amazon.device.settings.action.MANAGE_APPLICATIONS -n com.amazon.tv.settings/com.amazon.tv.settings.tv.applications.ApplicationsActivity
su -c am start -a com.amazon.device.settings.action.MANAGE_APPLICATIONS -n com.amazon.tv.settings/com.amazon.tv.settings.tv.applications.ApplicationsActivity
Is one of them working?
If yes, i Think that i must make a New settings apk for firetv2.
This one is for 4k.
Click to expand...
Click to collapse
Just noticed a couple of extraneous spaces in #3 & #4. Removing the spaces results in a different error.
mantis:/ $
.settings/com.amazon.tv.settings.tv.applications.Application sActivity <
Starting: Intent { act=com.amazon.device.settings.action.MANAGE_APPLICATI pkg=ONS }
Error: Activity not started, unable to resolve Intent { act=com.amazon.device.settings.action.MANAGE_APPLICATI flg=0x10000000 pkg=ONS }
MANAGE_APPLICATIONS -n com.amazon.tv.settings/com.amazon.tv.settings.tv.applic*
Starting: Intent { act=com.amazon.device.settings.action.MANAGE_APPLICATIONS cmp=com.amazon.tv.settings/.tv.applications.ApplicationsActivity }
Error type 3
Error: Activity class {com.amazon.tv.settings/com.amazon.tv.settings.tv.applications.ApplicationsActivity} does not exist.
.settings.action.MANAGE_APPLICATIONS -n com.amazon.tv.settings/com.amazon.tv.s*
Starting: Intent { act=com.amazon.device.settings.action.MANAGE_APPLICATIONS cmp=com.amazon.tv.settings/.tv.applications.ApplicationsActivity }
Error type 3
Error: Activity class {com.amazon.tv.settings/com.amazon.tv.settings.tv.applications.ApplicationsActivity} does not exist.
mantis:/ $
Yes the 1st one is for mantis an Stick2 an should work in this devices.
This command style is used for my app.
I not have a FireTV2 to test what is the correct am start command for this device
So i need any one Who can test it.
Edit:
Sry hatte das eben nur überflogen!
Also bei jedem der Befehle kommt der gleiche Fehler raus, Nr 3 und 4 sind gleich, hab dann nochmal einen Versuch gemacht ohne die 2 Leerzeichen aus 3/4, aber wieder der selbe Fehler
Code:
[email protected]:~/Downloads$ adb connect 192.168.2.51
already connected to 192.168.2.51:5555
[email protected]:~/Downloads$ adb shell su -c am start -a com.amazon.device.settings.action.APPLICATIONS -n com.amazon.tv.settings.v2/.tv.applications.ApplicationsActivity
Error type 2
android.util.AndroidException: Can't connect to activity manager; is the system running?
at com.android.commands.am.Am.onRun(Am.java:299)
at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
at com.android.commands.am.Am.main(Am.java:97)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:256)
[email protected]:~/Downloads$ adb shell su -c am start -a com.amazon.device.settings.action.APPS -n com.amazon.tv.settings/.tv.BuellerApplicationsSettingsActivity
Error type 2
android.util.AndroidException: Can't connect to activity manager; is the system running?
at com.android.commands.am.Am.onRun(Am.java:299)
at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
at com.android.commands.am.Am.main(Am.java:97)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:256)
[email protected]:~/Downloads$ adb shell su -c am start -a com.amazon.device.settings.action.MANAGE_APPLICATI ONS -n com.amazon.tv.settings/com.amazon.tv.settings.tv.applications.Application sActivity
Error type 2
android.util.AndroidException: Can't connect to activity manager; is the system running?
at com.android.commands.am.Am.onRun(Am.java:299)
at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
at com.android.commands.am.Am.main(Am.java:97)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:256)
[email protected]:~/Downloads$ adb shell su -c am start -a com.amazon.device.settings.action.MANAGE_APPLICATIONS -n com.amazon.tv.settings/com.amazon.tv.settings.tv.applications.ApplicationsActivity
Error type 2
android.util.AndroidException: Can't connect to activity manager; is the system running?
at com.android.commands.am.Am.onRun(Am.java:299)
at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
at com.android.commands.am.Am.main(Am.java:97)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:256)
So with each of the commands the same error comes out, No. 3 and 4 are the same, then I tried again without the 2 spaces from 3/4, but again the same error
0815hoffi said:
You can try it.
I haven't tested
Deleted some more on my Stick. See delete.txt
MarkusOnFire.apk is based on leanback launcher 1.19 .
Click to expand...
Click to collapse
@0815hoffi
I would be interested in how and from where you execute start the delete.txt file,
thank you
Akki67 said:
@0815hoffi
I would be interested in how and from where you execute start the delete.txt file,
thank you
Click to expand...
Click to collapse
On your Windows PC folder where the adb.exe is located.
Download cleanup.cmd.txt, rename to cleanup.cmd and run.
Hi
thank you first. Unfortunately, nothing is deleted for me, see log.
Code:
C:\adbLink>adb devices
List of devices attached
G070VM1600230K52 device
C:\adbLink>cleanup.cmd
Wait for TWRP
Drücken Sie eine beliebige Taste . . .
Debloating Amazon Apps...
rm: can't remove '/system/priv-app/android.amazon.perm': No such file or directory
rm: can't remove '/system/priv-app/com.amazon.android.marketplace': No such file or directory
rm: can't remove '/system/priv-app/com.amazon.awvflingreceiver': No such file or directory
USB cable from the PC goes directly to the FireTV4K, without a USB hub.
Or do I have to enter or install something in TWRP?
Warning!!!! Warning!!!!
Do it with your own risk! For correctest, I 'm not responsered - please read it very carefully!
Source: https://www.heise.de/tipps-tricks/Android-Vorinstallierte-Apps-loeschen-ohne-Root-4324092.html
This article is in German - please use an online translator!
Here is the short form:
Open the adb shell in the computer:
Code:
adb shell
su
Listing the packages:
Code:
pm list packages |grep samsung
List the packages the 3rd providers:
Code:
pm list packages -3
Packages forever erasing:
Code:
pm uninstall -k --user 0 [name of the package from the list]
And install your own packages collection, on the fast and easy way
First copy the apps in to the tmp directory:
Code:
cp /use/your/own/path/the/collection/*.apk /data/local/tmp
Please use here your own path, where is the collection!
The installation:
Code:
for app in /use/the/full/path/for/the/*.apk [ type Enter]
do $(pm install --user 0 $app) [type Enter]
done; [type Enter]
Please use the full path for the installation!
To eliminate this error:
Code:
Failure [INSTALL_FAILED_INVALID_URI]
Responser
Code:
: Success: inaccessible or not found
This is normal. Important >> Success <<
Finally, the job has done, cleaning the tmp directory:
Code:
rm -rf /data/local/tmp/*.apk
This was it, and very simple.
To Debloat this phone we have to create whitelist of apps.
This debloat for advanced users.
Before you begin you should install custom launcher, SMS app, dialer, camera app and keyboard and any other which stopped working.
If something went wrong you can restart phone by holding vol down + pwr (more than 7 seconds), then when phone restarts release them and hold vol up to enter recovery (sometimes you had to reflash with odin in download mode not only wipe data and cache).
At the beginning we should remove all updated system apps:
Code:
pm uninstall-system-updates
Then we can remove all samsung and 3hrd party apps:
I will add more apps to remove to this list. I'm trying to prepare list of minimal apps from AOSP.
expermental list: https://pastebin.com/AkyA2WpT
Uninstalling app command:
Code:
pm uninstall -k --user 0 <name of package>
Restore app command:
Code:
cmd package install-existing <name of package>
If you forgot to install alternative apps you can restore the original one :
To restore Original Camera:
without this package camera app will still crashing
Code:
cmd package install-existing com.samsung.android.provider.filterprovider
Restore Dialer + incoming calls + sim card pin and settings:
Code:
cmd package install-existing com.samsung.android.dialer
cmd package install-existing com.samsung.android.incallui
cmd package install-existing com.samsung.android.app.telephonyui
Restore keyboard
Code:
cmd package install-existing com.samsung.android.honeyboard
Restore fingerprint sensor:
Code:
cmd package install-existing com.samsung.android.biometrics.app.setting
Same packages list as below, without app names, you can generate using adb:
Code:
adb shell pm list packages
Full List of Apps from Samsung Galaxy A51 generated by: App List Package Manager
https://pastebin.com/KwkZhkZH