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
Related
This is so annoying,
I have tried everything I could find online,
I removed the SD card to eliminate that as an option related to a corrupt image/ card.
I cleared Gallery the data under manage applications.
With ES file explorer
I deleted the com.cooliris.media folder multiple times
I renamed all dirs to hide them from the Gallery indexing.
Example renamed “DCIM” to ”.DCIM”
I opened and examined the file chunk_0 in
/com.cooliris.media/cache/local-album-cache
I was hoping i could see how far or were it crashed by the last dir it indexed.
After hiding all the dirs. I got it to this.
Data in “chunk_0(this file will grow as dirs are scanned and files are found)” opened in a hex editor.
..US..en............./...........4.......4...........b..intro..video/mp4.......................4.........O.{.....O.u...w..............:.............../
Not sure if this is a hit on what is crashing the gallery?
I'm guessing a factory reset didn't work either?
Have not done that, dont want to reconfigure the phone from scratch.
I always like to know the root of the real issue. seems kind of common.
I never use Gallery. Ever. So I wouldn't have an exact idea why it was going crazy.
Are you rooted and do you have Titanium Backup Free/Pro?
If so, back up the gallery app. Then delete it from the /system.
Restart your phone and restore the Gallery app and make it a system app again.
its rooted and i have Titanium Backup Pro.
i did not know you can delete the gallary.
I did download another gallery like app for now.
but i may give that a try.
Yeah. Wipe the data first then uninstall it.
i made the back up of the gallery, uninstalled it, when i try to recover/install it from the back up the phone stays in an install loop.
I have to reboot the phone.
now i deleted it how do i reinstall it?
I have gallery apk from the backup and the original is still under /system/app/com.cooliris.media.apk
when run the apk i get an error, application not installed.
I tried to use adb with no luck.
F:\~droid\root backup restore files\SuperOneClickv2.1.1-ShortFuse\ADB>adb instal
l gal.apk
993 KB/s (458660 bytes in 0.451s)
pkg: /data/local/tmp/gal.apk
Failure [INSTALL_FAILED_DEXOPT]
any pointers?
Follow the exact steps.
Open Titanium Backup
Wipe Gallery data (From Titanium Backup)
Uninstall Gallery (From Titanium Backup)
Restart phone
Restore App of Gallery (From Titanium Backup)
Restart phone
Try using gallery
I don’t think titanium is an option now.
as it never finishes installing. i let it go all night.
The Gallery has been deleted and i only have the option to restore. My only options are to restore App only or App+Data. both don’t finish.
so i have been reading you can force/push installs. i must be doing something wrong as it seems a restriction is preventing the other install methods,
at this point the only reason i care is i cant view images in 3d.
acem77 said:
I don’t think titanium is an option now.
as it never finishes installing. i let it go all night.
The Gallery has been deleted and i only have the option to restore. My only options are to restore App only or App+Data. both don’t finish.
so i have been reading you can force/push installs. i must be doing something wrong as it seems a restriction is preventing the other install methods,
at this point the only reason i care is i cant view images in 3d.
Click to expand...
Click to collapse
Using adb
adb shell
su
mount -o remount,rw /dev/block/stl9 /system
exit
exit
adb push Gallery.apk /system/app
Reboot the phone.
Sent from my Samsung Galaxy S II
thanks but the phone does not seem to install it after the reboot.
F:\~droid\root backup restore files\SuperOneClickv2.1.1-ShortFuse\ADB>adb shell
$
$ su
su
# mount -o remount,rw /dev/block/stl9 /system
mount -o remount,rw /dev/block/stl9 /system
# exit
exit
$ exit
exit
F:\~droid\root backup restore files\SuperOneClickv2.1.1-ShortFuse\ADB>adb push g
al.apk /system/app
1321 KB/s (458660 bytes in 0.339s)
maybe it not 100% uninstalled? could have been an issue with how Titanium removed it.
if the os thinks its still there it wont install over it.
crap i created file called "\" now they systems treats it like a dir. i cant delete it
this is how i created it...fat fingered
F:\~droid\root backup restore files\SuperOneClickv2.1.1-ShortFuse\ADB>adb push c
om.cooliris.media.apk /system/app/\
ES file Explorer shows it as a 447.91kb file the same size as the com.cooliris.media.apk file...
if select delete in ES i starts to tally the root dir as if it will delete everything under "system"
I guess it can stay ....
I am still trying to get com.cooliris.media.apk to reinstall. will i see any installing action once i reboot the phone after pushing it?
I dont see any sign of it installing other than it appearing in the apps dir.
how does push really work should the Os install any apk in the app dir if missing?
No you won't. Do you have root explorer?
no,
does ES file Exploer work the same way?
I've never used it. Does ES File Explorer have root permissions?
this is just getting a annoying if the app is under /system/app
more or less thats it right? what would stop it from being seen by the phone...
been messing with the thing for hours.
then its crap i cant restore the gallery backup i made with out titanium get stuck...
The Dark Lestat said:
I've never used it. Does ES File Explorer have root permissions?
Click to expand...
Click to collapse
yes i can hit any dir like system, and it can change all attributes.
I have been using it now to move files from my pc over the wifi and network shares.
I can have app.apk on my pc see it on the network with ES, and copy it to /system/app
i put a another version of gallery from another phone i found online in /system/app
after a reboot it showed up. not sure it thats a real sign as i can manual run and install it if i wish.
also this does no good in the long run as you cant view photos in 3d, as they are displayed side by side in this version of gallery.
maybe i need a fresh copy if the lg thrill gallery?
ok i found a ver of gallery from a custom cooked rom posting.
it shows up now,
http://forum.xda-developers.com/showthread.php?t=1309114&highlight=gallery
but it still crashes like the original one did at the start of all this lol....
atleast i can view my pictures in 3d again.
i dont know what is causing the crash, but what causes it is at the end of scanning all the images. the more picutes i have the longer it takes to crash.
if i have zero images it crash instantly.
I guess my backup of the original gallery is corrupt?
That's what it seems. Do a titanium backup of all your used apps and reflash or factory reset?
Sent from my Samsung Galaxy S II
I have never seen anything like this. Originally I wanted to ask for a solution here. I have found how to fix the issue, but a few questions still linger.
First, my KFHD is rooted, and had most Amazon apps removed after backing up in Titanium Backup. I'm on Nova Launcher 1.02. Other apps used for this endeavour include Terminal Emulator and aLogcat.
I put this Chinese IME on my KFHD7 to type Chinese:
https://play.google.com/store/apps/details?id=com.diycircuits.inputmethod.latin
I also have it on my GN and it works just fine there.
Having read about IMEs and KFHD, I copied the APK into /system/app. I rebooted, and it kept force closing every few seconds. Logcat shows that it's throwing "UnsatisfiedLinkError". Some digging later I found that two native libraries it uses were missing. I was able to pacify it by going into /system/app and "installing" it again, which installed the libraries. But come next reboot it happens again.
Moments before I posted this, I went into terminal and got a listing of its data directory:
[email protected]:/ # ls /data/data/com.diycircuits.inputmethod.latin/ -l
drwxrwx--x app_41 app_41 2013-01-31 22:45 cache
drwxrwx--x app_41 app_41 2013-01-31 22:46 files
drwxr-xr-x system system 2013-01-31 23:35 lib
drwxrwx--x app_41 app_41 2013-01-31 22:46 shared_prefs
The IME installs two native libraries in lib. When I reboot, lib and all files within are gone and it starts throwing UnsatisfiedLinkError. I placed a copy of one of the libraries in lib/ under a different, and it also got removed on reboot. I had to chown and chmod lib to match the other directories to get the files to stay and error to go away.
So what puts things this way, and what remove the lib directory and all files within?
Finally, is there a better way to install a third party IME?
I figured out the UID issue.
You must have a file browser capable of root permissions or know how to use the terminal
Go to /data/system and look for uiderrors.txt
open it and take note of all the files listed in there.
Go into /data/data/ and remove those folders.
Reinstall the apps that were in conflict and everything should be good
The same fix applies for error -24 from the play store when installing apps. The only difference is that the uiderrors.txt will not have the offending files listed. You will need to know the application package name i.e. com.speedsoftware.rootexplorer
KAsp3rd said:
I figured out the UID issue.
You must have a file browser capable of root permissions or know how to use the terminal
Go to /data/system and look for uiderrors.txt
open it and take note of all the files listed in there.
Go into /data/data/ and remove those folders.
Reinstall the apps that were in conflict and everything should be good
The same fix applies for error -24 from the play store when installing apps. The only difference is that the uiderrors.txt will not have the offending files listed. You will need to know the application package name i.e. com.speedsoftware.rootexplorer
Click to expand...
Click to collapse
do you know whats causing this ??
i had this with quadrant everytime i install a new rom or made a fresh install
this time i cant install quadrant standard and the last time i could not install quadrant advance
i cant delete the folder with root explorer ... any help ??
thanks
in adb on android i cant delete this file ... device or resource is busy .... i only can delete it in adb in recovery
is my phone broken (flash memory) or what is causing this ???
B-Man2005 said:
do you know whats causing this ??
i had this with quadrant everytime i install a new rom or made a fresh install
this time i cant install quadrant standard and the last time i could not install quadrant advance
i cant delete the folder with root explorer ... any help ??
thanks
in adb on android i cant delete this file ... device or resource is busy .... i only can delete it in adb in recovery
is my phone broken (flash memory) or what is causing this ???
Click to expand...
Click to collapse
I believe it is being caused by HTC backup restoring app data. You should be able to remove the folder with root explorer as that's what I used.
Sent from my m7 using Tapatalk 4 Beta
You can easily remove that folder when ur using TWRP recovery. In advanced menu is a file explorer. After deleting the folder you can install e.g. quadrant again via playstore
Hi there i have 4.0.2 rooted working right now but i like to integrate the updates of system apps to have some space. I have been doing it with all my phones and all android versions with rooted and r/w system parts file managers by copy&paste and giving right permissions (644) but i understand that something changed in nougat the way system apps are handled. when i push an apk as a system app and reboot, app disappears even if i gave right permissions. Some apps have libs and odex files also. For example Google Play Store app appears as /system/priv-app/Phonesky/Phonesky.apk but updated version is in data/app/com.android.vending-1 which contains lib and oat folders and base.apk. i used to copy just the apk file in exchange of phonesky.apk and chmod 644 reboot and go! that doesn't work anymore. i tried several apps like link2sd and system file mover, they won't work too. thanks for any help.
I figured how, and want to reply my own question
tried open gapps aroma installer and selected the ones that i want to remain and gapps did the rest. now my device has no updated system google apps. instead all gapps are under system.
AFAIK Titanium Backup has an option to intergrate system apps updates to /system
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/