for line in `pm list packages -f`; do pkg=`echo $line | cut -d: -f2 | cut -d= -f2`; if [ "$(ls /data/app-lib | grep "${pkg}-" | wc -w)" -gt 1 -a "$pkg" != "android" ]; then fullname=`echo $line | cut -d: -f2 | cut -d= -f1`; filename="$(basename $fullname)"; badfile=`ls /data/app-lib | grep "${pkg}-" | grep -v "${filename%.*}"`; rm -rf /data/app-lib/$badfile; echo "Fixed $pkg"; fi; done
Do the following:
1. Delete all files in "data\app-libs\com.facebook.katana-2" then delete this folder.
2. Go to "data\data\com.facebook.katana" then delete the following syslink folders: (app-libs), (lib→data\app-libs\com.facebook.katana-2).
3. Go to "data\app" then delete "com.facebook.katana-2.odex" (if present).
4. Reboot
Then reinstall the facebook from playstore
Tried like 5 methods to get my Castle Clash to update, finally this data\app-libs\{problem app} deletion worked.
Samsung Relay/CM10.1
Thanks !
hey can any one help me same problem with me I use HTC one x rooted and I use stock Rom android 4.2.2 and I found app-lib folder but in there, there was no subfolder named APP-PATH PLEASE help me out thanks
Here is a quick fix.
Run this in adb shell as root and it will fix any bad packages.
Code:for line in `pm list packages -f`; do pkg=`echo $line | cut -d: -f2 | cut -d= -f2`; if [ "$(ls /data/app-lib | grep "${pkg}-" | wc -w)" -gt 1 -a "$pkg" != "android" ]; then fullname=`echo $line | cut -d: -f2 | cut -d= -f1`; filename="$(basename $fullname)"; badfile=`ls /data/app-lib | grep "${pkg}-" | grep -v "${filename%.*}"`; rm -rf /data/app-lib/$badfile; echo "Fixed $pkg"; fi; done
Can anyone translate this into non-developer speak for me. I did a quick search but no joy. I assume this involves pushing a script to the device and then running it. Is there a really basic primer that anyone can link to? Thanks.
Hi,
this is a problem i encountered many times after (a while) i updated my phone to 4.2.2 (cannot install/update any app.apk file outside the playstore and there is this famous "Insufficient storage available" error which cant solved by wiping cache and dalvik cache).
And after some investigation i noticed that since android 4.2, google create a new lib folder for the apps in "/data called /data/app-lib/" and there is a symlink from "/data/data/APP-PATH/lib" to this folder which is the most culpable of this error.
So to avoid this kind of error:
1. go to "/data/app-lib/APP-PATH(that has this error)/lib" and delete.
2. install/update the apk app.
3. if not work go to "/data/app-lib/APP-PATH(that has this error)" and delete all the folder (but you must begin by their sub-folder then the folder itself, because you cant delete the folder of this APP-PATH directly without deleting their sub-folder first.
i hope, i helped some of you guys that you have this erroneous and overstressed error.
thanks:good:
Hello guys,
There is one small problem with this solution, NO SOLUTION FOR NON-ROOTED PHONES!
I have an Xperia ZL C6502 right now and I recently updated it to the latest firmware with android 4.3. The problem is that the phone I've got cannot be unlocked. I was able to root it using an easy method which worked for non-unlocked phones but it's currently not working with the latest firmware, at least not yet.
I've been using custom ROMS for a long time but I had to stop when I found out this cellphone can't be unlocked.
So, what solution can you give me when I have no access to the root folder "data"? I know the folder and everything but I can't access, there has to be a way.
for line in `pm list packages -f`; do pkg=`echo $line | cut -d: -f2 | cut -d= -f2`; if [ "$(ls /data/app-lib | grep "${pkg}-" | wc -w)" -gt 1 -a "$pkg" != "android" ]; then fullname=`echo $line | cut -d: -f2 | cut -d= -f1`; filename="$(basename $fullname)"; badfile=`ls /data/app-lib | grep "${pkg}-" | grep -v "${filename%.*}"`; rm -rf /data/app-lib/$badfile; echo "Fixed $pkg"; fi; done