Hi,
I'm studying how PackageManagerService works, and i noticed that if an application was downloaded to /data/app i can access the file and open inputstream .
but if APK was downloaded to SD card, i can't access the file from PackageManagerService.
is there something i can do?
I want to be able to read the APK before it get installed...
Thanks,
pi.publicSourceDir = apk file path
pyler said:
pi.publicSourceDir = apk file path
Click to expand...
Click to collapse
not sure i follow you.
I'm in the packageManagerService context, i don't have PackageInfo (the application is still not installed)
You could hook PermissionGranter and give the process extra permissions, or see where the system is actually parsing the APK's manifest before installing it.
GermainZ said:
You could hook PermissionGranter and give the process extra permissions, or see where the system is actually parsing the APK's manifest before installing it.
Click to expand...
Click to collapse
Thanks, what I don't understand is, if i give my xposed module permissions to read external storage, why does it still can't read it?
shnapsi said:
Thanks, what I don't understand is, if i give my xposed module permissions to read external storage, why does it still can't read it?
Click to expand...
Click to collapse
They're different processes.
http://forum.xda-developers.com/showpost.php?p=55332926&postcount=9
http://forum.xda-developers.com/showpost.php?p=55186575&postcount=2
GermainZ said:
They're different processes.
http://forum.xda-developers.com/showpost.php?p=55332926&postcount=9
http://forum.xda-developers.com/showpost.php?p=55186575&postcount=2
Click to expand...
Click to collapse
So just to make sure I understand, I can create a service and run it from the hooked method and it should work?
if so, i have another question
How can i stop the original method from running until a point i allow it to continue?
Thanks GermainZ !
shnapsi said:
So just to make sure I understand, I can create a service and run it from the hooked method and it should work?
Click to expand...
Click to collapse
I don't understand how you read that from my reply, to be honest. Here's what I meant:
Hooked code *is not* run as your app. The hooked code is run as the hooked app.
If the hooked app can't do X, then the hooked code can't do X either.
Your app's permissions do not affect the hooked code in any way, only normal (not hooked) code.
shnapsi said:
How can i stop the original method from running until a point i allow it to continue?
Click to expand...
Click to collapse
Using the normal ways you'd normally use if it weren't an Xposed module, in the beforeHookedMethod hook. I'm not familiar with the exact methods, you can look that up. Just be aware that blocking it for too long will cause an ANR.
Related
Recently, I started getting a "not enough storage available" error when trying to install Handcent either from the Market or using a Titanium restore. I know it's not a space issue because all other apps that I have tried install with no problem. I am using A2SD and have about 400 MB free. I have duplicated this error on multiple ROM's so it must be something on my phone. I searched and found something about permissions on *.so files in the lib directory but I don't know enough to fix it myself. Here is a pastebin of the error:
http://pastebin.com/33gKG5Db
Any help is greatly appreciated!
PS - link to the post that talked about the lib perm's - http://forum.xda-developers.com/showpost.php?p=6240715&postcount=5
PROBLEM SOLVED!
wjason said:
Recently, I started getting a "not enough storage available" error when trying to install Handcent either from the Market or using a Titanium restore. I know it's not a space issue because all other apps that I have tried install with no problem. I am using A2SD and have about 400 MB free. I have duplicated this error on multiple ROM's so it must be something on my phone. I searched and found something about permissions on *.so files in the lib directory but I don't know enough to fix it myself. Here is a pastebin of the error:
http://pastebin.com/33gKG5Db
Any help is greatly appreciated!
PS - link to the post that talked about the lib perm's - http://forum.xda-developers.com/showpost.php?p=6240715&postcount=5
Click to expand...
Click to collapse
I know this is a stupid question but ur not trying to install when card is mounted to computer r u. Also what app2sd r u using, is ur ext partition full, I've also noticed this when I thought I had room then went in and deleated a few old nandroids and then it worked great.
I had the same problem.
Go to Applications
Somewhere in there, there is a handcent registry that is different than the normal handcent program.
Scan through everything, you will find something like com.sms.handcent. Uninstall that as well as the program and you should be able to install.
Bielinsk said:
I had the same problem.
Go to Applications
Somewhere in there, there is a handcent registry that is different than the normal handcent program.
Scan through everything, you will find something like com.sms.handcent. Uninstall that as well as the program and you should be able to install.
Click to expand...
Click to collapse
I see it under applications but every time I click on it I get a f/c on settings (I get the f/c if I click on anything under applications that begins with com.). Any way to do it through ADB? I checked system/sd/app and didn't see the com.handcent.nextsms to remove?
wjason said:
I see it under applications but every time I click on it I get a f/c on settings (I get the f/c if I click on anything under applications that begins with com.). Any way to do it through ADB? I checked system/sd/app and didn't see the com.handcent.nextsms to remove?
Click to expand...
Click to collapse
you have gtalk?
if so add me [email protected]
I'll try my best to help out
regaw_leinad said:
you have gtalk?
if so add me [email protected]
I'll try my best to help out
Click to expand...
Click to collapse
Problem solved - Thanks Regaw!!!!
Well hell, what was it?
Make the search usefull
There was an old data entry in /data/data called com.handscent.newsms or something, and I deleted it. then it worked perfectly.
regaw_leinad said:
There was an old data entry in /data/data called com.handscent.newsms or something, and I deleted it. then it worked perfectly.
Click to expand...
Click to collapse
yep... I have had this problem with a couple of apps. The real fun is sometimes that directory is named something completely different then the application name. Then you have to guess at what it is and then check /data/apps to verify it has a missing apk.
GoodDayToDie said:
Two problems with that.
First of all, the app's install directory is read-only to the app permissions. You can't create, delete, or modify any file there from within the app (without some sort of "jailbreak" at least).
Second, and possibly more importantly, the permissions sandbox (or "appcontainer") that the phone uses to restrict an app is created at app install. Modifying the manifest is unlikely to have any benefit whatsoever (it certainly didn't help on WP7).
A good idea, though. Always glad to see people checking for such things.
Click to expand...
Click to collapse
As wp8.1 allows to move an app to the sd-card, I think point one should be ok. So how about modifying the app? I plugged my sd-card to the pc but all app files are kind of encrypted..
I tried it with @GoodDayToDie Webserver 0.5.0. http://1drv.ms/1flmBN4
thanks
gipfelgoas said:
As wp8.1 allows to move an app to the sd-card, I think point one should be ok. So how about modifying the app? I plugged my sd-card to the pc but all app files are kind of encrypted..
I tried it with @GoodDayToDie Webserver 0.5.0. http://1drv.ms/1flmBN4
thanks
Click to expand...
Click to collapse
as my phone doesn't support SD Card please send me one of does little apps you moved to sd card (please send a free app to me)
I will check it
but if you want to try adding Capabilities to app then re-write it in the folder it's surely not possible .
application capabilities are all checked and stored in your phone exactly when you install them (from your pc using Developer Unlock or from store)
Le Sigh...
This has been discussed extensively long, long ago. The manifest is only parsed at installation. You can do whatever you want to the manifest afterwards; it doesn't seem to have any effect.
It wouldn't help much anyhow. You wouldn't be able to *launch* a sideloaded app with Interopservices if not interop-unlocked. This can be tested by interop-unlocking a phone, sideloading an interop app, resetting the MaxUnsignedApp value to undo the unlock, and trying to run the app.
I cannot Install Framework, I download the apk, click on it, accept the permissions and then get message Application not Installed and nothing else. This is a fairly new phone with stock ROM. Rooted LG G3. Any ideas?
Can you post a logcat?
GermainZ said:
Can you post a logcat?
Click to expand...
Click to collapse
I am really new at trying to debug on Android. What is the easiest way to get a logcat? I searched a little but it looks a little complicated and I am not sure what process will give the best results.
Thank you!
christcb said:
I am really new at trying to debug on Android. What is the easiest way to get a logcat? I searched a little but it looks a little complicated and I am not sure what process will give the best results.
Thank you!
Click to expand...
Click to collapse
You can use an app like CatLog.
GermainZ said:
You can use an app like CatLog.
Click to expand...
Click to collapse
I am not sure how to use it. looks like a lot of crazy extraneous info, the only thing I can find about installing is this :
InstallAppProgress D Installation error code: -24
InstallAppProgress I Finished installing de.robv.android.xposed.installer
Edit : found a little more
cannot chmad dir '...xposed...' Operation not permitted
OK from that log into I did more digging, it seems somehow there was a orphaned folder that was blocking the install. I deleted the folder and now it has installed fine. Thank you so much for the help!!!
Good to know you got it fixed. Which directory was it?
GermainZ said:
Good to know you got it fixed. Which directory was it?
Click to expand...
Click to collapse
I forget the exact location but it was something like /data/data/de.robv.android.xposed.installer
christcb said:
OK from that log into I did more digging, it seems somehow there was a orphaned folder that was blocking the install. I deleted the folder and now it has installed fine. Thank you so much for the help!!!
Click to expand...
Click to collapse
Please help me how did u do this step by step I'm using an lg Optimus f3 and I'm having the same problem thnx
In the initZygote() of a module, it is not possible anymore to access files under /data/data/<module package>.
For example, my module needs to load a native library in /data/data/<module package>/lib, with System.loadLibrary().
It fails with an error, as no file is visible under /data/data/<module package>.
Is there any workaround ? Is it possible to restore the pre-Lollipop behavior in Xposed ?
The comment for
Code:
SELinuxHelper.getAppDataFileService()
tells
Retrieve the service to be used when accessing files in /data/data/*
Click to expand...
Click to collapse
dont know how it works
defim said:
The comment for
Code:
SELinuxHelper.getAppDataFileService()
tells
dont know how it works
Click to expand...
Click to collapse
Thanks for the pointer.
I could fix my problem trivially by moving some code from initZygote() to handleLoadPackage() which has permissions to access its own data directory.
rooted with magisk and i'm trying to transfer a file into system/bin but when i click r/w in root explorer nothing happens and when i try to copy it from the sd card it says fail. Anyone else?
Make sure AVB verity is unchecked in magisk then reinstall from the app
qman66 said:
rooted with magisk and i'm trying to transfer a file into system/bin but when i click r/w in root explorer nothing happens and when i try to copy it from the sd card it says fail. Anyone else?
Click to expand...
Click to collapse
If the pixel 4 is any like pixel 3 with its logical partitions you'll have to use magisk to add to system. Easy way download a magisk module. Then go to /data/adb/modules then the module you installed if u need to add to /system/app you might have to add the /app set permissions then add what is wanted set permissions then restart. easy way without having to make your on module you can always go to magisk thread an learn to make a module as well either way only way I've been able to do it on Android 10 which I reverted back to pie so much better in my opinion
virtyx said:
Make sure AVB verity is unchecked in magisk then reinstall from the app
Click to expand...
Click to collapse
It's always been unchecked
billyt1 said:
If the pixel 4 is any like pixel 3 with its logical partitions you'll have to use magisk to add to system. Easy way download a magisk module. Then go to /data/adb/modules then the module you installed if u need to add to /system/app you might have to add the /app set permissions then add what is wanted set permissions then restart. easy way without having to make your on module you can always go to magisk thread an learn to make a module as well either way only way I've been able to do it on Android 10 which I reverted back to pie so much better in my opinion
Click to expand...
Click to collapse
Ok I'm willing to do this. What module do I download exactly?
qman66 said:
It's always been unchecked
Click to expand...
Click to collapse
Strange
That's the only thing I know that could cause you're issue
Android 10 requires you to so any system changes through Magisk in a "systemless" manner. As mentioned above, it needs to be in a module. If you can't do it yourself, ask for help from one of the devs. If it is a common task that others could benefit from, create a thread with the request and I am sure someone will come through...
CyberpodS2 said:
Android 10 requires you to so any system changes through Magisk in a "systemless" manner. As mentioned above, it needs to be in a module. If you can't do it yourself, ask for help from one of the devs. If it is a common task that others could benefit from, create a thread with the request and I am sure someone will come through...
Click to expand...
Click to collapse
ok does anyone know?
bump
qman66 said:
ok does anyone know?
Click to expand...
Click to collapse
What exactly is the question?
trying to transfer a file into system/bin but when i click r/w in root explorer nothing happens and when i try to copy it from the sd card it says fail.
qman66 said:
trying to transfer a file into system/bin but when i click r/w in root explorer nothing happens and when i try to copy it from the sd card it says fail.
Click to expand...
Click to collapse
I think it needs to be done "systemless" with a magisk module. Maybe if you ask @Tulsadiver nicely, he might be able to give you a template or even make you up what is needed. If so and it's possible others might have used for it you could share it.
qman66 said:
trying to transfer a file into system/bin but when i click r/w in root explorer nothing happens and when i try to copy it from the sd card it says fail.
Click to expand...
Click to collapse
You are welcome to try this. Put your file in the vrtheme/system/bin folder. Leave the system folder alone. This is untested.
qman66 said:
Ok I'm willing to do this. What module do I download exactly?
Click to expand...
Click to collapse
BusyBox is the module I always use