Related
I've been playing around on my phone, esp with framework-res.apk .
Now many of my apps have their permissions screwed up (There was a UID mismatch on two seperate occasions)
The apps that show up in the log (below) sometimes FC becasue they dont have the right permissions granted.
Sample logcat on startup:
Code:
D/PackageManager( 141): Scanning app dir /data/app-private
D/PackageManager( 141): Scanning app dir /sd-ext/app-private
I/PackageManager( 141): Time to scan packages: 12.442 seconds
W/PackageManager( 141): Not granting permission com.android.launcher.permission.INSTALL_SHORTCUT to package com.google.code.appsorganizer because it was previously installed without
W/PackageManager( 141): Not granting permission android.permission.INTERNET to package lysesoft.andftp because it was previously installed without
W/PackageManager( 141): Not granting permission android.permission.BATTERY_STATS to package com.dynotes.miniinfo because it was previously installed without
W/PackageManager( 141): Not granting permission android.permission.INTERNET to package com.greenecomputing.linpack because it was previously installed without
I'm thinking an "adb install -r <file.apk>" for each of these apps will fix it...but before that I want to know if theres another/quicker way (reset to default permissions as in each app's apk).
thanks.
In AmonRa's recovery there is an option under the "Other" submenu called "Fix apk uid mismatches." It sounds like that is what you need.
Edit: Yeah I just checked, that is what you need. Once run, that script will give you a "fix_permission.log" file in the root of your sdcard.
FaJu said:
In AmonRa's recovery there is an option under the "Other" submenu called "Fix apk uid mismatches." It sounds like that is what you need.
Edit: Yeah I just checked, that is what you need. Once run, that script will give you a "fix_permission.log" file in the root of your sdcard.
Click to expand...
Click to collapse
That was what I used to fix the UID mismatches. The permissions problem still remains.
Oh that's weird. Sorry I got nothing.
Try re-setting the permissions for each individual app in the actual install script.
Are they installed in system/app? I am assuming so?
If you know the permissions code number that you want to set for the app you can set it accordingly. If you want to try something just for testing to see if your app will work but not as a permanent proceedure try this:
Code:
set_perm(0777, 0777, 0777, "/system/app/your_app_name_here.apk");
This sets specific permissions to that app in particular as totally open, meaning anything can do anything to that app. Once you boot and test the app and see that it works then bring the permissions back on that app to be suitable.
You can also if you are not keen on installing to system partition do this
Code:
symlink("/data/app/your_app_name_here.apk", "/system/app/your_app_name_here.apk");
I'll upload you guys a boot init.d script that will reset permissions on your apps to correct 644 on every boot for after testing.
Can you please tell me what chipset details are? Like on galaxy S MTD system is something like /dev/block/mtdblock2 /system
What is system and data partitions on nexus one?
Once I know these details and if your ROM has init.d support then I the boot script will ensure that this is done on boot every time
I made a simple script for my own use that does pretty much the same job as Knight47's auto bloatware remover.
The main difference is that mine reads the list of removed apps from a separate text-file that can be adjusted to taste.
Root required!
How to use:
1. Backup your phone with nandroid!
2. Unzip zip-file to some folder
3. Connect USB cable to phone and make sure USB debugging is turned on
4. Run debloat.cmd
5. Reboot
6. Enjoy fat-free phone
It MIGHT be necessary to clean Dalvik-cache afterwards if the phone does not rebuild dalvik cache automagically ("updating android"-message during reboot)
I wrote this for Xperia Pro Mk16i ICS, which had some differences from the main APP-list:
SEMCFacebookProxy.apk --- appears to be more facebook stuff
livewaremanager.apk -- all in lower-case now
letsgolf_i.apk -- filename has changed
Also some files listed in the app collection did not exist here. ALL files from main Xperia arc app list are included anyways.
I'm removing:
Browser.apk
facebook.apk
Gmail.apk
GMS_Maps.apk
Maps.apk
Street.apk
YouTube.apk
These apps take double space after you install updates for them so it makes sense to remove them from system. If you already have updated them, there's no need to do anything, otherwise download them from play store.
With regards to stock browser, if you don't have chrome or similar, just comment it out.
..
Changes in v0.2:
Fixed script syntax
Delete .apk and .odex files
Added some files to kill-list:
weatherwidget
com.google.android.youtube-1
SemcCamera3D
SemcSnpVideoPlayer
Semcsdnla
Wait for keypress after finished + reboot into recovery to clean dalvik.
v0.21
Do not delete google maps and youtube app by default, change advisor text
nothing happened. i have rooted phone and busybox
my bloat.txt is something like this(only apps, no cements)
EventStream.apk
EventStreamPluginCallLog.apk
EventStreamPluginFacebook.apk
EventStreamPluginTelephony.apk
EventStreamPluginTwitter.apk
usb conection mode is mass storagemode
ics 4.0.4
seljachina said:
nothing happened. i have rooted phone and busybox
my bloat.txt is something like this(only apps, no cements)
EventStream.apk
EventStreamPluginCallLog.apk
EventStreamPluginFacebook.apk
EventStreamPluginTelephony.apk
EventStreamPluginTwitter.apk
usb conection mode is mass storagemode
ics 4.0.4
Click to expand...
Click to collapse
Are those files in /system/app ? You have ADB drivers installed?
What exactly happens when "nothing happens"? Can you start the script from cmd and tell me what it says?
yes those are apps from /system/app
here is a screenshot of cmd(cmd window is auto closed 1-2 seconds after i run debload.cmd)
on phone is displayed "shell has been granted superuser permission"
can i edit bload.txt in notepad or another text editor?
seljachina said:
yes those are apps from /system/app
here is a screenshot of cmd(cmd window is auto closed 1-2 seconds after i run debload.cmd)
on phone is displayed "shell has been granted superuser permission"
can i edit bload.txt in notepad or another text editor?
Click to expand...
Click to collapse
That's the whole idea, you can edit it. Did you? It looks like the bloat.txt is not in the right place or perhaps has empty lines or something..
command prompt stays open if you run cmd.exe from start menu. Or ctrl-right click on a folder and "open command window here"
yes i did
i notice the difference.. your adb.exe is about 2mb, my adb.exe is 150kb?! maybe that is problem, some drivers.. who knows. (when i try with my adb.exe, it just say "waiting for device").. i manually remove bloatware
I upgraded into omega rom recently that retains some of the cruft in stock rom. So I updated my debloater. Script has been revised to actually work , I must have attached a wrong version by mistake. It now also wipes out .odex files if present. Because of this, deleted filenames are without extension (.apk) in bloat.txt.
To make this really elegant, files should be actually un-installed as now there may be some libraries and data left behind. I'm not going to trace down package name for each and every sony bloatware today, though.
Finally, dalvik cache needs to be wiped to remove the orphaned odex cache files which take most of the space.
It is actually possible to reclaim a lot of space by using titanium backup to integrate some large apps into ROM. Preferably those which do not allow you to move them into sdcard and/or work badly if linked with link2sd. In my phone I have 130MB of free space in the system partition so Chrome alone gives a big chunk of free space for other apps.
After thinking this through, there is NO benefit into removing system apps if you're going to reinstall them from play store anyways. It's better to use titanium backup to integrate any updates into ROM which actually gives more room for apps. I removed google maps and youtube from being deleted by default. Some people may want to edit bloat.txt for facebook and gmail app as well.
Bash script port for linux users
This might not be useful for many people, but I use Linux and I converted this script to work with bash.
Download and run the script as su or sudo.
Hey all,
I have rooted my HTC One. SuperSU works, as well as Titanium Backup, etc.
Some issues...
BusyBox will not install, and AdAware properly alters the hosts file, but after a reboot, AdAware is disabled and the hosts file seems unmodified.
I've also noticed that trying to make some applications "system apps" (sys/app) via Titanium Backup, it seems to work, and applications detect as having system permissions, but after a reboot the apps and permissions are gone.
Any ideas?
Thanks!
The system partition is shadowed, writing to it is temporary. For AdAware the fix is to flash a ROM with a symlinked hosts file, perhaps busybox is similar.
BenPope said:
The system partition is shadowed, writing to it is temporary. For AdAware the fix is to flash a ROM with a symlinked hosts file, perhaps busybox is similar.
Click to expand...
Click to collapse
Hmm...
I also noticed this...
I am using a Notification widget called Power Toggles, and one of the buttons is a Shutdown/Restart button. When I click it, and select Shutdown, Restart, Recovery, etc. it fails "because it doesn't have root access." I have given the application root permissions.
What is going on?
With the intention of helping all those who have difficulties in removing blotwares even with programs like TITANIUM and others..
Here is a small step by step that I did to remove the blotwares..
STEP - 1
You install the app available in the playstore, called System app remover Https://play.google.com/store/apps/details?id=com.jumobile.manager.systemapp&hl=en_US
1.1)
You need to install the app available in the playstore, called Termux Https://play.google.com/store/apps/details?id=com.termux&hl=en_US
1.2)
grants root access to the 2 apps.
STEP - 2
Perform apk removal With the Termux application open,
you enter as root
-> su (enter as root)
You should now allow to modify the directory system
-> mount -o remount, rw -t rfs /dev/stl5 /system
Now you need to get into the "System app remover" application and pick up the APP directory you want to remove.
-> rm -r [DIRECTORY]
Now you need to return the directory system to read only, 'ro', to prevent malicious activities
-> mount -o remount, ro -t rfs /dev/stl5 /system
Restart your phone and you can see that the app is no longer on your device.
NOTE: If you can not go back to read only, after the system reboot you will be able to.
My mobile got much faster and with no crashes after deleting these apps ...
I had difficulty removing blotwares from a rom I downloaded that is available on this link for ZUK Z2 PRO
https://forum.xda-developers.com/zuk-z2-pro/development/miui-8-version-zuk-z2-pro-t3563578
ALERT: As all androis have the same command system, should work for any device, but be careful not to remove applications essential for system operation. It can cause an infinite loop in system reboot.
If you have a rooted phone, you can just download "ES Datei Explorer", grant root access and remove the folders in /system/app , /system/priv-app , /system/preload of the apps you don´t want. After reboot, you´ll just have to remove the icons from your homescreen.
Make a backup by moving the folders somewhere else. You´ll never know when you need one of these "unnecessery" apps.
Tuerkay said:
If you have a rooted phone, you can just download "ES Datei Explorer", grant root access and remove the folders in /system/app , /system/priv-app , /system/preload of the apps you don´t want. After reboot, you´ll just have to remove the icons from your homescreen.
Make a backup by moving the folders somewhere else. You´ll never know when you need one of these "unnecessery" apps.
Click to expand...
Click to collapse
Well thought, I'm accustomed to using linux, commands are the same, so it was something that I created in a "homemade" way and decided to share. This app actually displays the root directory, so, it's very good and less difficult, but the app remover can be useful for help you to know what file you need remove..
Thanks for adding the information ..
This is the link what app he's talking about
https://play.google.com/store/apps/details?id=com.estrongs.android.pop
Grants root access and go to directory for remove the file you want.
can anything be done without rooting?
akyiboy007 said:
can anything be done without rooting?
Click to expand...
Click to collapse
This procedure can not do without root, but, have one way you can do without root, i never tested.
This is the link, for Android 4.4, i don't know if works for 5.0 , 6.0 or 7.0, take a look...
https://www.xda-developers.com/how-to-remove-bloatware-from-your-android-device-xda-tv/
Hello, I have a rooted smartwatch, Ticwatch Pro 4G, with a custom ROM. It has a NFC module, which I wanted to use with app called "NFC Card Emulator". It works on my phone, but NFC module on it broke, so I am forced to use it on my watch. That app tries to edit file
Code:
/vendor/etc/libnfc-hal-st.conf
but it has no RW permissions, app suggest reboot but it doesn't work. I cannot also manually mount /vendor.
So, here is where I need help:
I have no idea if this is possible, but how can I create a module, that will allow that app to edit that file? Is there a way that I can "route" it or something to a place where it can be edited by the app?
I have no experience with making magisk modules, or android programming.