yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] mateorod:
This is going to continue to be a a goal. But multi-user (as you know) opens lots of complications. Especially for data protection. It is not being ignored, but it isn't solved yet.

Yeah. I almost changed the branch name to 4.2 yesterday. I am still thinking about that. The 4.2.1 patches apply to all versions of the 4.2.2 tree I have tried.
[Android Software/Hacking General [Developers Only]] Syndra:
Just patched it yesterday and its working great.

Thanks and keep up the nice work :)
[Android Software/Hacking General [Developers Only]] Koetermann:
Hi there,

when I try to patch my repo (cm10.1, Android 4.2.2) I get some error messages on every patch. For example:

koeter@mann:~$ cd ~/cm10.1/system/build; git checkout -b openpdroid; patch -p1 < ~/openpdroid_4.2.1_build.patch
bash: cd: /home/koeter/cm10.1/system/build: Datei oder Verzeichnis nicht gefunden
fatal: Not a git repository (or any parent up to mount parent )
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
patching file core/pathmap.mk
Hunk #1 FAILED at 81.
Hunk #2 FAILED at 92.
Hunk #3 FAILED at 99.
3 out of 3 hunks FAILED -- saving rejects to file core/pathmap.mk.rej
patching file target/product/core.mk
Hunk #1 FAILED at 22.
Hunk #2 FAILED at 36.
Hunk #3 FAILED at 133.
3 out of 3 hunks FAILED -- saving rejects to file target/product/core.mk.rej
patching file target/product/security/privacy.x509.pem

This is one of the patches from HERE. https://github.com/OpenPDroid/OpenPDroidPatches

The patches are actually for 4.2.1 but they should work for 4.2.2., too.

I guess these issues are there, 'cause I do not set the opendroid git??!!

Where do I have to set this? In the localmanifest.xml??

Regrads

Koetermann
[Android Software/Hacking General [Developers Only]] mateorod:
Where it says 'not a Git file system'? That is probably your problem. You either are not in the proper directory of your build system when you execute the command.

Check the CD portion of the command. It looks like bash is reporting that isn't a directory. Whereever you synced the source from (I use android/system in the commands as it is a common starting directory in many guides and walkthroughs) put that before 'build' and 'lib core' etc.
[Android Software/Hacking General [Developers Only]] Koetermann:
Hi mateor,

you are absolutly right, thanks. I just copied the pathes from your README.mkdn, but I my case all of the directories mentioned are in the ~/cm10.1 dir.

So I had another try.

Still got many HUNK ERROR messages in all patches. For example:

koeter@mann:~/cm10.1/libcore$ patch -p1 < ~/openpdroid_4.2.1_libcore.patch
patching file luni/src/main/java/java/lang/PrivacyInputStream.java
patching file luni/src/main/java/java/lang/PrivacyProcessManager.java
patching file luni/src/main/java/java/lang/ProcessManager.java
Hunk #3 FAILED at 216.
Hunk #4 FAILED at 265.
Hunk #6 FAILED at 304.
3 out of 7 hunks FAILED -- saving rejects to file luni/src/main/java/java/lang/ProcessManager.java.rej

Tried to finsish the compiling process. But I received many similiar of the following error messages:

frameworks/base/core/java/android/app/ContextImpl.java:362: cannot find symbol
symbol: class ConnectivityManager
return new ConnectivityManager(IConnectivityManager.Stub.asInterface(b));
^
frameworks/base/core/java/android/app/ContextImpl.java:552: cannot find symbol
symbol: class IPrivacySettingsManager
IPrivacySettingsManager service = IPrivacySettingsManager.Stub.asInterface(b);
^
frameworks/base/core/java/android/app/ContextImpl.java:552: package IPrivacySettingsManager does not exist
IPrivacySettingsManager service = IPrivacySettingsManager.Stub.asInterface(b);

Finally the compiling process stopped with this error message:

target SharedLib: libaudioutils (/home/koeter/cm10.1/out/target/product/i9300/obj/SHARED_LIBRARIES/libaudioutils_intermediates/LINKED/libaudioutils.so)
target SharedLib: libusbhost (/home/koeter/cm10.1/out/target/product/i9300/obj/SHARED_LIBRARIES/libusbhost_intermediates/LINKED/libusbhost.so)
Install: /home/koeter/cm10.1/out/target/product/i9300/system/lib/libcutils.so
Install: /home/koeter/cm10.1/out/target/product/i9300/system/lib/libnativehelper.so
Install: /home/koeter/cm10.1/out/target/product/i9300/system/lib/libicui18n.so
target SharedLib: libpower (/home/koeter/cm10.1/out/target/product/i9300/obj/SHARED_LIBRARIES/libpower_intermediates/LINKED/libpower.so)
target SharedLib: libbt-utils (/home/koeter/cm10.1/out/target/product/i9300/obj/SHARED_LIBRARIES/libbt-utils_intermediates/LINKED/libbt-utils.so)
target SharedLib: libbt-vendor (/home/koeter/cm10.1/out/target/product/i9300/obj/SHARED_LIBRARIES/libbt-vendor_intermediates/LINKED/libbt-vendor.so)
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
138 errors
make: *** [/home/koeter/cm10.1/out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes-full-debug.jar] Fehler 41
make: *** Warte auf noch nicht beendete Prozesse...
target SharedLib: libstagefright_yuv (/home/koeter/cm10.1/out/target/product/i9300/obj/SHARED_LIBRARIES/libstagefright_yuv_intermediates/LINKED/libstagefright_yuv.so)

Now I really don't know what to do. May someone help me out?

Regards

Koetermann
[Android Software/Hacking General [Developers Only]] *error*:
I just tried it out and it also failed with the 4.2.1 patches. But it seems to work with the 4.1.2-cm patches.

At least for libcore, I did not check all.
[Android Software/Hacking General [Developers Only]] mateorod:
The libcore patches have not changed in quite some time, and have applied cleanly for me and the other autopatcher maintainers very very recently for many different roms. So indulge me if I try and error-catch a bit.

Koetermann: try this, okay?

cd ~/cm10.1
cd ~/cm10.1/frameworks/base; git clean -df; cd ~/cm10.1/frameworks/opt/telephony; git clean -df; cd ~/cm10.1/build; git clean -df; cd ~/cm10.1/libcore; git clean -df
cd cm10.1
repo abandon openpdroid
repo forall -c "git reset --hard"
repo init -u https://www.github.com/CyanogenMod/android -b cm-10.1
repo sync -j2 -f
cd ~/cm10.1/libcore; git checkout -b openpdroid; patch --dry-run -p1 < ~/openpdroid_4.2.1_libcore.patch

I know it is a lot of steps, but I am trying to debug blind here. I just patched a CM10 build, which is currently building, so I can't test the 4.2.1 branch right now. But I don't see any commits in the CM repo that would cause us any problems...in fact there is nothing new there at all.

Note: I am having you patch with the dry-run flag. If it patches without incident, rerun the command without that flag before building. As is, nothing is actually getting patched, just checked.
[Android Software/Hacking General [Developers Only]] Svardskampe:
Does anyone have experiences how this performs with the latest paranoid android (android 4.2.2)? Or is it still buggy?
[Android Software/Hacking General [Developers Only]] lvtjul:
A quick question : as I can see Pdroid manager doesn't need root access to set the rights of each app. So I'm asking myself : are the pdroid rights settable by any app ? If this is the case, isn't it a security threat or am I missing something ?
[Android Software/Hacking General [Developers Only]] mateorod:
Reports are that it works well, with only the known issues (chiefly cell tower location is always blocked and no multi-user permission management)

It is an issue. One that is disagreed about even among those of us working on the project. The current setup is that the framework is only operated upon by the first installed manager. There have been suggestions, but no movement yet.

Having acknowledged this, circumventing and taking advantage of this is a good bit of work for the attacker and is (at this point) probably a negligible concern. But it needs to be resolved as we move forward.
[Android Software/Hacking General [Developers Only]] lvtjul:
Ok thanks for your answer.
[Android Software/Hacking General [Developers Only]] I900-Nutzer:
Hi,

sorry for beeing a Noob but where / how can i get the Patches from the "devel" - Branch?

Thx!
[Android Software/Hacking General [Developers Only]] wbedard:
Provided you're comfortable with git (though not a requirement...) and building your ROMs from source code (currently a requirement...), you can get the development code over at our GitHub page (https://github.com/OpenPDroid).

R/

wbedard
[Android Software/Hacking General [Developers Only]] I900-Nutzer:
Hi wbedard!

Thx for your Reply. So when i'm using this Files i am on the "bleeding Edge" of JB v4.1.2?

I am asking because the ReadMe says:

Thx!
[Android Software/Hacking General [Developers Only]] wbedard:
Not exactly. That particular repo pulls together the current release code into a few diffs that you can apply to an existing source tree. For the development code, you need to look at the individual "platform_*" repos which you will notice have many branches, including the "devel" ones. These repos (and there are several...) need to be downloaded "whole" as part of a complete Android source tree and this is where git comes in handy, although again, it's not actually required.

Hope this clarifies things for you a bit more...good luck!

R/

wbedard
[Android Software/Hacking General [Developers Only]] I900-Nutzer:
Ahh - i understand now. And from Time to Time someone makes the Patches in "OpenPDroidPatches" out of these Branches to reflect the actual Developement. So as done by mateor yesterday.

Thx for clarification wbedard!
[Android Software/Hacking General [Developers Only]] mateorod:
Thanks for the thorough report...it makes things easier to investigate. Something screwy is going on with 4.1.2. None of the working Android devices I own had 4.1.2 (mako and tilapia) so I finally broke down and bought an original Nexus 7 specifically to look at this issue.

I don't think of this as an Auto-Patcher issue, we have enough data at this point that we are confident that moving over the copies of the GSM and CDMA ServiceStateTrackers is a safe move. With that said, 4.1.2 is not working, for CM10 we know and now it appears AOKP. I am looking at it as we speak, actually, attempting to determine if this is replicated by a full build or just when using the Autopatcher.

I had been blaming CM10's latest FM radio commit as the culprit, but that is not included in your rom, so maybe something wider is at fault.

That milestone build is from several months before the project even started, you might have more luck with a more recent build, although I doubt it.

The best things to help us is to grab a logcat...if we gather enough logs, we will be able to solve the problem. But there is phone FCing coming from somewhere, we just haven't nailed down where yet.
[Android Software/Hacking General [Developers Only]] zroice:
Will get you a logcat. Over ADB should still work even though phone keeps crashin or?

And which patch should I try? Using autopatcher and saying Yes to using prepatched files or using my own modified patch which has no hunks failing (if second: should I use the one with the original constant values from the aokp 4.1.2 rom or should I use the values which the patch dictates? (But since only 1 hunk failing and its JUST the two constants i think the prepatched files are identical to the ones that come out if I use my modified patch and the values the patch dictates - I hope that was understandable lol, my grammar is sometimes horrible)

ADD: Unfortunately there is no "official" newer 4.1.2 for the note - but I might have luck with nightlies or so I guess.#

ADD2: Found a newer build of 4.1.2 from November (latest I could find):

Patch runs through with no errors except on the mms.apk (HttpUtils.smali again, all chunks failed). Will flash that rom and patch and then report, and get you a logcat if its not working.
[Android Software/Hacking General [Developers Only]] mateorod:
Zroice- Thanks a million. Your logcat confirms my suspicions of the last several weeks. I will try and get together with the guys and fix this. Your log cat echoes my own from this morning (on a built from source CM10). My bet is that we have this problem elsewhere as well, but that no one noticed due to my auto-patcher trickery.

I felt like I was shouting down a well until you posted this, so thanks. As a stopgap for the meantime, you can use pd2.0 mod with your rom. It basically has OpenPdroid patches version 0.90. We will fix the 1.01 patches as soon as we can.
[Android Software/Hacking General [Developers Only]] zroice:
Glad to hear I could help!

Any downsides on using pdroid 2 for now and restoring + using fixed openpdroid when its done?

A Backup or smth not needed right? A restore will fully wipe the old pdroid 2 when the new openpdroid is out?

(maybe also clear the cache i guess though, or?)

Sorry im actually quite tech savvy but still gotta ask those noob questions from time to time :P
[Android Software/Hacking General [Developers Only]] mateorod:
I actually don;t really have that much experience with that. There is the possibility that you will have to delete the /privacy folder in between versions and maybe have to redo your settings. I know that FFU5y and CollegeDev are working to erase the complications between switching to or from.

The OP of this thread, as well as PDroidManager thread (link in OP) have the latest and best advice. I think that the risk of losing your PDroid configuration is all you are risking, though.

Good luck!
[Android Software/Hacking General [Developers Only]] tonyp:
First, please do not just post full logcats in your post, that's incredible annoying when using the app.

attach the file, use pastebin.com or add

tags around the logcat :)

then about the reboot:

this probably happened as you applied the pd2 patches on top of openpdroid - you should only patch an unpatched rom.
[Android Software/Hacking General [Developers Only]] mateorod:
Full OpenPdroid project history

Well, I am here to let any interested party know that I finally finished a pretty huge archival project for OpenPdroid.

In the OpenPDroid github page, you can now find build patches for all the iterations of Pdroid/OpenPdroid. The patches go from 2.3 to 4.2.2, and all have been reformatted so as to be applied in the same manner as recommended for the 4.2 patches in the first post.

You can see all the build patches here.

The patches were originally worked on by svyat, but have been contributed to by CollegeDev, FFU5y, pastime1971, me and wbedard among several others.

I have also finished converting and moving the original PDroid project tree I have from Svyat. I consider this something worth rescuing and representing, the full commit history of the Pdroid project is preserved. I also pushed that to the OpenPDroid page, you can see the PDroidHistory here.

The whole thing was incredibly tedious. I had to convert the repos and checkout and remake every patch by hand to have it fit our current structure...plus custom READMEs for each branch...I expect at least one person here to care, if only for a second. I don't think many people have ever seen the commit history for PDroid, so hopefully there is something to be learned there.
[Android Software/Hacking General [Developers Only]] tonyp:
thank you mateo, this truly is amazing!
[Android Software/Hacking General [Developers Only]] g.armour:
I have tried and tried to get auto patcher to patch CM 10.1 and Aokp mr1 for the Nexus 10 to work but it fails every single time, does this not work for tablets as well? I'll try to post the logs tomorrow.
[Android Software/Hacking General [Developers Only]] doublediamond:
Sorry if the answer to my question is already posted somewhere but i couldn't find it.

With autopatcher i patched the Slimbean 4.2.2 rom.

how do i go about flashing?

Flash the rom and without rebooting flash the gapps and the (openpdroid)update.zip or do i have to reboot first and than flash the update.zip?

Thanks in advance.
[Android Software/Hacking General [Developers Only]] karamelos:
hi

post in auto-patcher thread for regrouped all logs

you can flash ROM gapps & update.zip before reboot
[Android Software/Hacking General [Developers Only]] zroice:
sowwy I didnt know that, dont use the app.

And no i didnt flash pd2 over openpdroid, im not that silly =)
[Android Software/Hacking General [Developers Only]] doublediamond:
Thanks for your answer, however i tried it but i only got it done when i rebooted after i flashed the rom and the gapps.
[Android Software/Hacking General [Developers Only]] mateorod:
Is your GPS behaving slow?
[Android Software/Hacking General [Developers Only]] zroice:
Hey, did you guys here hear about the XPosed Framework?

http://xdaforums.com/showthread.php?t=1574401

---

This allows app patching through modules and doesnt require apk's to be pre-modified. (with it you can hook methods to the modules)

When I read about it, my first thought was: This would be awesome if it works with openpdroid!

Could modules be created which have the same function as openpdroid has now?

It allows to "overwrite" methods so it basically should or?

Unfortunately my knowledge is a bit limitited yet, so I couldn't answer that for myself, since the framework is affected and not just some "app".

Maybe one of the dev's could take a look if they have time and interest in it - if it worked that would allow you to use openpdroid on pretty much all roms 4.0+ (as far as I understood the hooking method used is independant of the actual rom and works on all devices)

Word from the Dev who created it:

The **** sounds awesome! No re-flashing to disable/re-enable, no decompiling and having the need to have the EXACT right patch for that particular rom, Odexed support!
[Android Software/Hacking General [Developers Only]] lulli1:
cm10 Rom for motorola milestone 2 patch error

Hello friends,

I tried to patch OPD to a cm10 Rom from tezet (link to the thread: http://xdaforums.com/showthread.php?t=1827801 )

The patching process failed. Enclosed you will find the log files from APG-tool and the serverThread.class java code of the classes.dex out of the services.jar file in txt format. This is where the error happend, I think (see the log files). Hopefully someone can help me, patching this Rom with this great OPD. Would be great. Thanks....;)
[Android Software/Hacking General [Developers Only]] Micha_Btz:
is there any progress? especially for the llama bug?

seems to be really quit at the moment about openpdroid.
[Android Software/Hacking General [Developers Only]] speckschwarte:
I had exactly the same idea when I read about it the first time.

However, a quick look into the sources left a bad feeling since some security checks of the dalvik engine are removed by the framework.

Just look into the method "xposedOnVmCreated()" in source file "xposed.cpp".

It might cause major security issues.

Maybe some devs with deeper understanding could comment on this.

Regards
[Android Software/Hacking General [Developers Only]] Tungstwenty:
I don't think causes security issues.

The access checks that are disabled are just a convenience, as you'd be able to access the methods (or fields) anyway either by creating a class of your own with the same package as the one you're trying to access (see android.app.AppHelper on XposedBridge) or using reflection and calling setAccessible(true).
[Android Software/Hacking General [Developers Only]] speckschwarte:
Thanks for your answer.

I wonder if this is true for ordinary user apps.

Wouldn't this mean that every App is able to read/modify private stuff of each Java class inside the runtime environment?

Reflection should require runtime permission which I would expect to be not present for user apps.

Please correct me if I'm wrong.
[Android Software/Hacking General [Developers Only]] lothos:
Still a bug, at least on the latest patchset. I'm trying to make a new diff, though.
[Android Software/Hacking General [Developers Only]] Tungstwenty:
All apps can do it, but given the distributed nature of android services, they can only do so in their own running process.

Whenever invoking e.g. Activity Manager, etc., permission checks are done in the server process and not on the client. Reflection can help you access internal info not accessible through the API, but theoretically no security issues should arise from that.
[Android Software/Hacking General [Developers Only]] CyberLine:
change app settings via console?

hi there,

i'am new to this board as registered user but read a lot of time here and using openproid on my nexus 7 with cm10.1 for weeks now.

My Question is if it is possible to change app settings like GPS coords or android id from within shell console.

I looked into the source and found the sqlite database. But changing the values there does not affect anything.
[Android Software/Hacking General [Developers Only]] idovitz:
Hi all. Got the latest AOKP MR1 build 5 rom + openpdroid working on my grouper (nex7). Works fine but not for multiple users. All gapps are crashing for second user. Is this a known issue for openpdroid or only in combination with aokp?
[Android Software/Hacking General [Developers Only]] lulli1:
AW: [MOD][4.1.2 or 4.2.1][GPL] OpenPDroid [v1.0, 2013-01-14]

its a known issue for all roms. multiuser and opd doesn't work...
[Android Software/Hacking General [Developers Only]] el_ruwen:
Hi guys,

I just installed yesterday a custom ROM for the first time, so I am pretty new to all the stuff. I hope my suggestions/questions are not that stupid ;)

1.

About default behaviour:

If there pdroid services are correctly running and the app is not configured, I would deny everything. So when an app is directly starting after installation, an exception will be thrown with a message like "The app xyz has not been configured right now using PDroid." The only exception is: When you install pdroid, all currently installed apps have full permissions (so you have to populate the database on the first start). I think this is necessary in order to not to break the current user's installation.

When the pdroid services are not running correctly, I would deny everything. In that case a kill switch would be nice, how about doing it this way: Write a second app called pdroid kill switch. It just write a simple text file called kill-pdroid somewhere. When the user wants to kill pdroid, he has to start and app, kill the button and reboot. When pdroid is starting up, it checks if the kill file exists and is asking the user: do you want to disable pdroid? Of course pdroid has to prevent other from starting at this stage. The advantage is, that any other (malicious) app can create the file, but the user is ask before pdroid dies. And you don't have to check for that file every n seconds.

And I would make an exception for calls to 112.

2. Is there a way to try openpdroid using an emulator? I already got a working installation of the android sdk and eclipse.

3. What do you think about the following features:

a) When an app is querying the users database, return only members of a specified group. Example: I use WhatsApp. But I dont want WhatsApp to have all my contacts. I create a normal calender group called WhatsApp. After the User Data is queried, PDroid is filtering out the users which are not in that group (or maybe query manipulation is easier).

b) Return only specified elements of a contact when an application is querying the contacts list. Example: Again WhatsApp ;) It is ok that WhatsApp get my mobile numbers in order to work. But I dont know if they are also reading stuff like the mail addresses or birthdays etc. And I dont really trust them when they would be saying that they dont do that.