yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] Lanchon:
sad to hear this. yes, absolutely, booting once without PDroid is NOT a solution, defeats the whole privacy thing.

i was expecting something like this to happen sooner or later. i build this against hammerhead (will switch to bacon at some point). since this is java-only code, it should be mostly the same between phones. but there are some minor differences... build configuration? resource files? i don't know. i thought it was mostly icon resolution and stuff like that, which the system should handle anyway in run time (with a bit less performance). but in this case is clearly not.

i can confirm this NOT to be an issue in hammerhead. i really dont have the infrastructure to build for all phones so i guess the only solution i can think of is building the files from source yourself. i will look into partial building and see if it is an option.

i am curious if, after the one time non-pdroid boot, pdroid is working at all in your phone. could you test if its working?

my quick test is this: in the "Phone" app, i always have "Device ID" set to the custom text "N/A". so if i ever want to check if pdroid i enabled, i just open the dialer and dial *#06#. it should show the IMEI, but if pdroid is enabled it shows "N/A".
[Android Software/Hacking General [Developers Only]] Skippyjan:
Thanks for the great work and updates again! I experienced that the M builds are not that good as the nightlies. M11 was horrible, that's why I decided to start to build my own nightlies with your patch. This works without any problem for the S4 mini and hammerhead :)
[Android Software/Hacking General [Developers Only]] Lanchon:
ive been on M11 hammerhead for a month! it was ok for me, what was wrong on your side?

(since M10 sometimes the screen would begin to show flashes of garbage and id reboot, but happened every few days, not a big deal.)
[Android Software/Hacking General [Developers Only]] Discostrings:
Thanks for the prompt reply!

I was getting ready to build my own patches when you announced the universal builds. The M9 and M10 patches worked so well, however, that I decided to hold off. Perhaps I'll continue down that road to make sure that's the issue here.

Thanks for the information about the quick test--that's really helpful.

I did some more testing, and as you suspected, things don't really fully work when applying the patch after the first unprotected boot. While the settings pages loaded the first time I tried it, I imagine that's only because they cached some data during the unprotected boot. I tried again, and it wouldn't load the settings pages while patched this time, even after an unprotected boot. Patched M11 and M12 on the d2lte would not display the custom IMEI value after dialing *#06#. In fact, they wouldn't display the real IMEI either, or even a blank space--it looks like the field isn't even drawn in the IMEI pop-up. In M10 with PDroid installed, which appears to work perfectly, there's a blank, empty space when I have it set to block, and "N/A" displays correctly when I enter that.

It's a shame things aren't so simple, because the universal patches were super-convenient!
[Android Software/Hacking General [Developers Only]] Lanchon:
yes they were :( thanks for testing!

i wonder what broke things in M11. i wonder if this is widespread or only affects few devices...

here is something you could do if you want to test: the overlay replaces some jars. install official M11, then replace those jars with the version from hammerhead's M11 (you can modify my zip to install them). verify the bad behaviour. better if you can narrow it down to one file.

this is something i could later do: use apktool to decode the jar(s), look at the differences and try to understand the problem.
[Android Software/Hacking General [Developers Only]] Discostrings:
I've done a bit more testing, and I think I've discovered the root of the issue. I really appreciate you pointing me in the right direction!

I confirmed that the problem is that one of the hammerhead jars in the patch is no longer compatible with the d2lte. I grabbed unpatched versions of the four jars that OpenPDRoid patches from official CM11 M10 for the hammerhead. I ran them on my d2lte using your installer, and that worked fine. However, the unpatched jars from the hammerhead for M11 did not work.

In testing, I noticed that the d2lte behaves a little differently under M11 than it did in M10, even when it's unmodified. In particular, behavior differs without a SIM: in M10 there's an icon of a SIM with a question mark in it at the top, while M11 shows the signal strength indicator with no bars. I figured the changes probably involved telephony, so I tried substituting the three other hammerhead jars but keeping telephony-common.jar from the d2lte. That worked!

I took a look in the telephony-common.jar from both phones using apktool, and I discovered that starting in M11, there's a new file in the d2lte version: \com\android\internal\telephony\d2lteRIL.smali . Decoding the OpenPDroid-patched hammerhead jar for M12, adding the d2lteRIL.smali from the d2lte version, and re-building the jar seems to create a working patch for M12. I've verified that the telephony works and OpenPDroid spoofing does as well, but I haven't tested much more than that.

So it seems that one circumstance in which a generic patch will not work is if the CyanogenMod build for the device contains a custom RIL in its telephony-common.jar.
[Android Software/Hacking General [Developers Only]] Lanchon:
thank you, thats excellent work you've done!!! so i guess options here start to look like the old auto-patcher drill, thats too bad. i'll think about options if any... thanks again!!!
[Android Software/Hacking General [Developers Only]] Discostrings:
Yeah, sorry for the bad news... hopefully we can figure out another way.

For the moment, I'm going to build my own patches. I think I've got my build environment all set up, and I'm trying my first CM11 build. I've taken a look at your patch scripts for OpenPDroid, and I think I understand how they work, but I thought I'd ask, just to make sure, before I accidentally mess up the CM repository that took so long to download : )

My CM repo is in the default $android_dir directory indicated by the script (~/android/system/). Do I just put the scripts somewhere like ~/android/openpdroid/openpdroid-scripts and put the patches in ~/android/openpdroid/openpdroid-patches , and then run "repo-patch apply", then "repo-patch make" from the scripts directory, and a patch zip file will be created? Or are there some other steps or configuration I'm missing? Apologies for the basic questions, but I'm a bit new to this.

Thanks again--I really appreciate all your help.
[Android Software/Hacking General [Developers Only]] MiyagiSan:
You can put the patches and scripts in the directories you indicate or use directories with shorter names such as

~/android/pdroid/scripts

~/android/pdroid/patches

Once you have configured the paths in the file ~/android/pdroid/scripts/repo-patch.config, you can then run the commands from the ~/android/pdroid/scripts/ directory like this:

$ ./remove-intermediates
$ ./repo-patch apply

...

$ ./repo-patch reset

More generally, you should probably follow the CM11 build guide for your device step by step to ensure that you can build a working rom first before attempting to build an OpenPDroid-patched rom. Here's a guide you can read in step with the official one and adapt to your device.

The "Extract Proprietary Blobs" section in the official guide is probably best replaced with an entry in a local_manifest file as described in the supplementary guide I linked to (you need to change the entry to match your device).

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung" remote="github" revision="cm-11.0" />
</manifest>

When you are ready, the "Rebuidling with newest sources" section of the guide becomes:

$ cd ~/android/system
$ repo sync
[COLOR="Red"]$ repo status
[/COLOR]$ . build/envsetup.sh
[COLOR="Red"]$ breakfast d2lte
$ make clean[/COLOR]

[COLOR="Red"]$ cd ~/android/pdroid/scripts
$ ./repo-patch apply
$ cd ~/android/system

[/COLOR]$ brunch d2lte

[COLOR="Red"]$ cd ~/android/pdroid/scripts
$ ./repo-patch reset
$ cd ~/android/system[/COLOR]

You mustn't proceed with the build if the repo status is not clean. Don't forget to unpatch the sources after the build. And, if you prefer to time the build replace brunch d2lte with

$ time brunch d2lte

or, to use a custom build name

$ time TARGET_UNOFFICIAL_BUILD_ID="OpenPDroid" brunch d2lte
[Android Software/Hacking General [Developers Only]] Lanchon:
no. apply applies the source level patches. reset de-applies them. make makes them from your source tree, dont use that command.

all is source level. you need to build android afterwards.
[Android Software/Hacking General [Developers Only]] Lanchon:
thanks! that all right on the spot! (you dont need to cd to invoke repo-patch)
[Android Software/Hacking General [Developers Only]] MiyagiSan:
Did you mean like this?

$ cd ~/android/system
$ repo sync
$ repo status
$ . build/envsetup.sh
$ breakfast d2lte
$ make clean
[COLOR="Red"]$ ~/android/pdroid/scripts/repo-patch apply[/COLOR]
$ brunch d2lte
[COLOR="Red"]$ ~/android/pdroid/scripts/repo-patch reset[/COLOR]
[Android Software/Hacking General [Developers Only]] Lanchon:
yes, or through a simlink if you want (i have opd-repo-patch as a link in the path)
[Android Software/Hacking General [Developers Only]] Lanchon:
instead of building all of android, you can build just the files needed to make an overlay with these commands:

mka framework

mmma libcore frameworks/base/services/java frameworks/opt/telephony

mmma packages/apps/Mms <-- only for devices that need the messaging app
​

note that the overlay only works over the exact matching rom. see this:

http://wiki.cyanogenmod.org/w/Doc:_Using_manifests#Recreating_CyanogenMod_releases_using_manifests
[Android Software/Hacking General [Developers Only]] Discostrings:
Thanks so much for all your help, MiyagiSan and Lanchon--I've completed a working build, and now this Galaxy S III is successfully running OpenPDroid on M12!

This looks perfect for what I'd like to do in the future. Would these commands just need to be run instead of "brunch [device]", creating the four .jar files and the Mms.apk needed for the patch in the appropriate out/target/product/[device]/system directories, which could then be put in the zip with the installer to make the patch?
[Android Software/Hacking General [Developers Only]] Lanchon:
that is correct. with a make clean beforehand of course. but...

1) the breakfast device must be issued anyway to configure the build system.

2) you need to set up your source tree to exactly match the rom you will be overlaying. for that you use the link in the previous message. with one caveat: you need to delete roomservice from local_manifests before you repo sync, as the right device and kernel trees will already be included in the build manifest of your rom.

3) instead of pulling blobs you can use TheMuppets stable, thats what i do anyway.
[Android Software/Hacking General [Developers Only]] Discostrings:
Perfect! I'll give it a go with the next M release.
[Android Software/Hacking General [Developers Only]] insi2304:
Hi Lanchon, Can you add rom for Moto E XT1022 with Opendroid Patch.

Thanks in advance
[Android Software/Hacking General [Developers Only]] Lanchon:
read the OP. there are overlays for all devices. i dont do roms.
[Android Software/Hacking General [Developers Only]] Skippyjan:
I am very happy with your patch and I am still using your patch on the latest nightlies of CM11 of Hammerhead. Maybe this is a bit rude to ask but would you expect that you could make the patch also compatible for CM12. There is now a huge missing of tools to prevent privacy leaks on lollipop. This also because xposed is also not working (yet) on lollipop.

Once again great work!
[Android Software/Hacking General [Developers Only]] Lanchon:
yes, but ill wait a bit for CM12 to be more stable. many rom features are not implemented yet. ill give it a try with M1
[Android Software/Hacking General [Developers Only]] jmrkva:
Hello Lanchon

I would use pdroid patch for my HTC OneX + (enrc2b) but the latest version of the patch is the cm-11-20141113. ROM of this version can not longer be downloaded from cyanogenmod.com. Will some kind of update patches for CM11 in the current version?

Thank you

(sorry for my English)
[Android Software/Hacking General [Developers Only]] Lanchon:
as stated in the OP, overlays only support M-snapshots. if your device doesn't have M-snapshots then you can't use overlays. (you'd need to build your own patched CM from the ground up.)

the last snapshot, M12, dates from 20141113.
[Android Software/Hacking General [Developers Only]] XORr0:
E4GT + CM11 M12 + PDroid overlay == 'process com.android.phone has stopped' errors ??

Greetings,

I only recently found your PDroid MODs, and your KERNEL work - I am super excited to try the PDriod overlay with my Samsung Epic 4G Touch I recently acquired... The trouble is that no matter what I do, I am running into a infinite message pop-up "Unfortunately, the process com.android.phone has stopped." when CM 11-M12 boots up. I have tried many different things to get around this error/pop-up, but I cannot figure it out. I am hoping by posting here someone may see what I am doing wrong and can enlighten me to the solution.

This is the process I have been following (as a side note; I am able to run the latest CM 11 NIGHTLY without the PDroid overlay -OR- Villuminati's CM11 ROM, and have them working without issue so far on my E4GT) ::

- I have tried completely leaving out #14 (the TRIM+FPBug KERNEL), and I have tried both the PDroid overlays for "with-stock-messaging" and "without-stock-messaging" files... So far, I am always running into the same 'Unfortunately, the process com.android.phone has stopped.' message :crying:

Does anyone see something I am doing wrong? Or have a suggestion for what I can change in my process? Ultimately, how can I fix this issue, so that I can run the PDroid overlay on my E4GT + CM11 (M12)? As my ultimate goal is to get PDriod running on this E4GT phone.

Any assistance is greatly appreciated, thank you (let me know if anyone needs clarification on any of the above steps I'm taking, or has questions, I am happy to provide any further information) -
[Android Software/Hacking General [Developers Only]] XORr0:
Bit of an update...

I did some further digging + troubleshooting... If I follow STEPS #1 thru #13 (in my PREVIOUS/ABOVE post), and STOP and REBOOT ... everything works beautifully (CM11-M12), I have no errors/no popups, etc... system is fully functional

- I then create a NANDROID backup

- flash the PDroid overlay >> 'overlay-cm-11-20141113-UNOFFICIAL-Lanchon-11-M12-OpenPDroid-generic-with-stock-messaging.zip' (OR the without-stock-messagingoverlay)

- reboot the system, I see the CM11 M12 boot screen appear, and then I see "Android is upgrading..." "optimizing app ## of ###"

- Upon full start-up of CM11 M12, everytime I get the pop-up message that will continuously return/never go away (I can hit OK or REPORT button on the pop-up window a million times, but it always reappears) >> 'Unfortunately, the process com.android.phone has stopped.'

If I reboot into CMW recovery, and and ADVANCED RESTORE to just restore the /system folder (as suggested in OP post to revert), then boot the system fully as normal the pop-up/error message is gone, everything is fully functional!

- this seems like either *I* am doing something wrong, or there is an issue with the overlay??

any assistance anyone can provide is much appreciated! thanks -
[Android Software/Hacking General [Developers Only]] Lanchon:
what the hell is all that???!!!!

to install CM11 in recovery:

0) if you are running and old recovery: flash my kernel (has up to date recovery), then advanced, reboot recovery

1) mounts and storage, format /system

2) flash CM11

3) flash gapps if you will (recommend PA GAPPS NANO)

4) flash my trim kernel if you will (yes, again!)

5) wipe data/factory reset

it looks like the overlay is incompatible with your device, sorry. you can try this:

6) edit the overlay zip file and delete the "telephony-common.jar" file from it.

7) flash the overlay

it might work but the privacy settings regarding telephony will be ignored.

otherwise, build your own android! :)

EDIT: even though youd be using M12, i recommend you try and flash my latest trim kernel
[Android Software/Hacking General [Developers Only]] XORr0:
LOLOLOL

yeah. that. well, that's the process I take to flash to ICS and newer ROMs onto this Epic 4G Touch. long story short; when I was given this phone from a friend ~1week ago, we (errr, I) (soft-)bricked it within 10minutes of handling it. said friend gave me a stern lecture about how easy this phone (e4gt) is to brick, and he gave me a guide (quite similar to the process I posted).

- thank you for the tips! I followed your advice, and still ran into the same pop-up/error message ad infinitum....

you hit the nail. on. the. head.

I was afraid that was what was going on... "knowing is half the battle" as they say.

w00t, right as rain, you are! THAT, my good man, WORKED! sad, no telephony, but this I can live with. it's so much more of improvement from all my failures up-till-now. feels good to "win" sometimes. I am in your debt. thank you for your prompt reply, and your dead-on instructions. looks like I can cut out 90% of my (dreadful) "process" thanks to your sharing of knowledge.

I am also on the latest kernel (TRIM+FPBug, via kernel-Lanchon-TRIM-FPBug-20150113-cm-11-20150111-NIGHTLY-d710.zip).

now my plan is to research your TRIM kernel posts, and work on optimizing things on the front. down the road/ultimately I'd like to try my hand at building CM11 for my e4gt phone using your OpenPDroid patches + scripts in an effort to get the telephony portion of OpenPDroid working on "d710".

THANK YOU Lanchon

, for your epic work you've shared, the knowledge you impart, and just taking the time to respond to my post(s). count me a fan.

:D
[Android Software/Hacking General [Developers Only]] Discostrings:
I ran into a similar problem with d2lte, and I thought it might be possible to make a quick fix for the d710 by decoding and rebuilding telephony-common.jar using apktool. However, it looks like the changes in the jar for the d710 are more extensive. For the d2lte, the only change was an additional .ril file. For the d710, the decoded jar has an additional VirginMobileDecoder.smali file, which is referenced in other files. I suppose there are many ways in which telephony-common.jar could be different between devices, so in general it's best to just build from source when possible. Just thought I'd let you know in case you were considering trying the apktool path.
[Android Software/Hacking General [Developers Only]] AndroidAllStar:
Hi

Hi,

will be any pdroid patch/update for CM12/5.x builds?

Best greets
[Android Software/Hacking General [Developers Only]] Lanchon:
not before the first M release
[Android Software/Hacking General [Developers Only]] XsheldorX:
the final relase of cm 12.0 is out now ( http://www.cyanogenmod.org/blog/releases-11-12-final ). any plans for the openpdroid patches? I'd be very delghited!

or is it to much work due to the first snapshot of 12.1 probably not beeing too far away?
[Android Software/Hacking General [Developers Only]] Lanchon:
i could take a look. not now cause im in the US for vacation. problem is, i cloned cm 12.1 the other day and it was crazy large. i can't have the repo and branch and build dirs on my ssd anymore, wont fit. not sure if i want to work with the slow times of a rotary disk. maybe if i got an ssd while im here... not sure, i really dont need it for anything else.
[Android Software/Hacking General [Developers Only]] Skippyjan:
Yes that would be great if you can take a look :). I am still using openpdroid on CM11
[Android Software/Hacking General [Developers Only]] Lanchon:
so am i. not sure at all i want to "upgrade" to lolli
[Android Software/Hacking General [Developers Only]] jmrkva:
Hi

It will be released the version also for final cm11 ?

Thanks
[Android Software/Hacking General [Developers Only]] Lanchon:
good idea!
[Android Software/Hacking General [Developers Only]] Lanchon:
UPDATE: CM11 SNAPSHOT-XNG3C OpenPDroid overlays for all devices released!

enjoy!
[Android Software/Hacking General [Developers Only]] Lanchon:
also made an unofficial release of CM11 SNAPSHOT-XNG3C for OnePlus One

cm-11-20150718-Lanchon-XNG3C-bacon.zip

this is untested. get it here. enjoy!
[Android Software/Hacking General [Developers Only]] Lanchon:
hi! would you be able to test a lollipop openpdroid release if i did it? it would be for cm-12.0 "final" release (ie: the YNG4N snapshot). are you running that snapshot? on what device? thanks!
[Android Software/Hacking General [Developers Only]] Lanchon:
hi! please read the previous message, thanks!
[Android Software/Hacking General [Developers Only]] jmrkva:
Hello

Big thanks, patch is working on my LG G3 and unofficial stable cm11.
[Android Software/Hacking General [Developers Only]] Lanchon:
UPDATE: CM12 SNAPSHOT-YNG4N (aka FINAL) OpenPDroid overlays for all devices released!

WARNING: this is the first lollipop 5.0 release of openpdroid and is COMPLETELY UNTESTED. i can't test, i need a volunteer running CM12 FINAL to please help and test!
[Android Software/Hacking General [Developers Only]] Skippyjan:
^

Great work! I will test it quickly.

Ok, I tested it on cm12 for LG G2 with a dirty flash from cm11 to cm12. The openpdroid app works, but when I try to save permissions for an app it wont save the settings and it wont block the desired permission. For example if I try to block camera for the google camera app it still can take pictures.

Let me know if I need to test something else?
[Android Software/Hacking General [Developers Only]] Lanchon:
hi, thanks!

just to clarify, you flashed SNAPSHOT YNG4N on the G2, then the patches, correct?
[Android Software/Hacking General [Developers Only]] Skippyjan:
Yes indeed. I used the patch with stock messaging. You have any clue what is wrong?
[Android Software/Hacking General [Developers Only]] Lanchon:
lol probably a lot of things. i only looked at where there were merge or compile problems. certainly i can get it to work, but it will be even more leaky (kk is leaky already, but stops most accesses).

the camera is one thing that probably wont work for newer apps, as i think there is a new api to access it that opd is unaware of. but i dont really care much about the camera anyway.

my problem is, i can only test android 5.1, and i need to get 5.0 working before moving on to 5.1. so if i cant test, i dont know if i should continue...
[Android Software/Hacking General [Developers Only]] Skippyjan:
Is there no 5.0 rom for your device? I understand that it is hard to maintain openpdroid, also with the quick development of android. I am very happy with everything you already did! Unfortunately I have no knowledge of coding etc. so I cannot help you out. Just testing I can perform.

Thanks for the hard work to keep this alive. I will stay as long as possible on CM11 but I think when I buy a new device and there is no openpdroid yet I have to move on and will switch to xprivacy only.
[Android Software/Hacking General [Developers Only]] Lanchon:
im also using KK lol. there is 5.0 for my device. but i need it the way it is, stable modded and with KK. my test device runs KK or 5.1 but not 5.0... :(
[Android Software/Hacking General [Developers Only]] TrueFriend-cz:
It is compalitable with 12.1 ROMs? (LP 5.1.1)
[Android Software/Hacking General [Developers Only]] Lanchon:
no
[Android Software/Hacking General [Developers Only]] Lanchon:
UPDATE: CM11 SNAPSHOT-XNG3C-v2 OpenPDroid overlays for all devices released!

the old XNG3C snapshot has been updated with security bugfixes (stagefright, etc) by the CM team.

this is the overlay for the newer version.

WARNING: THERE IS AN OLDER XNG3C OVERLAY THERE, DOWNLOAD THE RIGHT ONE!

enjoy!
[Android Software/Hacking General [Developers Only]] dexter9:
nice specs in gpl