yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] txoof:
I am running the autopatcher on OS X and having some small problems. After downloading and running the autopatcher, for the first time, it makes the complaints below:

... Updating Auto-Patcher ...
The Auto-Patcher v2.9.93

### checking for updates ###
... initial setup to allow automatic updating ...
... backing up auto_patcher to auto_patcher.bak ...

This is a one time set-up process that will overwrite all local changes!
If this is not ok with you press ctrl-C and set AUTO_UPDATE to false in .config

### establishing the repo ###
... please be patient, this should only be needed once ...

remote: Counting objects: 5377, done.
remote: Compressing objects: 100% (1979/1979), done.
remote: Total 5377 (delta 2917), reused 5320 (delta 2863)
Receiving objects: 100% (5377/5377), 44.06 MiB | 165.00 KiB/s, done.
Resolving deltas: 100% (2917/2917), done.
Checking out files: 100% (925/925), done.

rm: illegal option -- I
usage: rm [-f | -i] [-dPRrvW] file ...
unlink file
### rerunning script with latest version ###

The Auto-Patcher v2.9.9315
(auto-updated from v2.9.93)
... changelog.txt has been updated ...

rm: illegal option -- I
usage: rm [-f | -i] [-dPRrvW] file ...
unlink file
### checking for updates ###
Updater: Auto-Patcher is already up to date

After running it a second time I get the following errors:

The Auto-Patcher v2.9.9315

Check for update failed, probably because of no internet access.
The autopatcher will continue with current local version: v2.9.9315

The rom that it makes appears to work fine other than the GPS being borked, so I think that the patching is going on as expected. I just can't quite figure out why, on the second run, it complains that there is no 'net connection.

Thanks again for all the great work!
[Android Software/Hacking General [Developers Only]] My Gnexi:
Did anyone try to patch Android 4.3?

I also wonder what App Ops is bringing us, should OpenPDroid be based on App Ops? Maybe you can take what Google started and build on that.
[Android Software/Hacking General [Developers Only]] samarium:
Similar questions going thru my head too, especially OPD vs CM PG. I just patched CM 0725 and it patched and installed, and I've noticed the new privacy guard option in 'Manage Apps'. Haven't noticed any problems in the short short term.
[Android Software/Hacking General [Developers Only]] swiggs98:
And to add to that, I am sure you saw that Goolge seems to be actively pursuing per app privacy features into Android proper (see link below, same as referred to in posts above as well). I am wondering if even the CM PG folks are wondering if their efforts will be negative work now. I wonder if the Google apps are given equal treatment in this framework though. Gotta love the dynamics of Open Source.

http://www.androidpolice.com/2013/0...ager-control-permissions-for-individual-apps/
[Android Software/Hacking General [Developers Only]] Magissia:
We cannot deny everything with this, only what google allow us to.

Regards
[Android Software/Hacking General [Developers Only]] mateorod:
The only complain, really, is the new info (to me) that OSX doesn't support the -I flag. I have removed it from the script. The autopatcher updater just pings github to determine network access. If it cannot reach github, for whatever reason, then it assumes that the network is shut off. If you are indeed connected to the network and still get that message, could you post a log? OSX is by far our least tested, I do what I can to keep things compliant, but it sometimes doesn't work out that way.

Well, to be completely honest, Google looks to have reused some of the OpenPdroid implementation. You can see an example here. But the less we have to code inject the better, it is something I have been working on. Hooking into and using the AppOps is definitely something I am very much considering, I also discuss that at the link. But there are several glaring problems with the way that implementation is done (apps have to use a permission before it appears I hear, so there is at least one guaranteed leak, the search is slow, and as noted, just blocking, no spoofing, etc) This is not an audit or an informed analysis, just what I have seen as I port our existing code base to 4.3. All things are in play, but there is a bunch of work to be done and we will have to gauge the communities will to complete it.
[Android Software/Hacking General [Developers Only]] txoof:
I've tracked down the connection issue and it looks like it has to do with ping under OS X being a bit more strict with how it handles things. The current line looks like this:

no_network_access () {
ping www.github.com $PINGCOUNT >> "$LOG" 2>&1 && NETWORK=true # second try and check github
ping www.google.com $PINGCOUNT >> "$LOG" 2>&1 # test for internet in general
if [[ "$NETWORK" == true ]]; then
return
else
printtask "Check for update failed, probably because of no internet access."
echo "The autopatcher will continue with current local version: $VERSION"
NETWORK=false
echo ""
sleep 2
fi
}

OS X ping expects the following format:

no_network_access () {
ping $PINGCOUNT www.github.com >> "$LOG" 2>&1 && NETWORK=true # second try and check github
ping $PINGCOUNT www.google.com >> "$LOG" 2>&1 # test for internet in general
if [[ "$NETWORK" == true ]]; then
return
else
printtask "Check for update failed, probably because of no internet access."
echo "The autopatcher will continue with current local version: $VERSION"
NETWORK=false
echo ""
sleep 2
fi
}

This fixes the issue until auto patcher downloads the git version of the script and changes things back.

Attached are a log from a working version with my changes (log20130728222938.txt) and a non working version (log20130728223728.txt).

Thanks again for the hard work and looking into this issue. The linux version of ping accepts the same format as OS X, but I don't have Cygwin to test against.
[Android Software/Hacking General [Developers Only]] mateorod:
Thanks txoof! I took your findings an implemented it in a slightly different manner, because I actually switched it to the way it was befor your edits on the advice of an informed Cygwin user. So we had one way worked for Linux and Cygwin and not OSX, and the other way was the reverse. So I just tossed it in a uname function. The commit looks like this (someday I need to standardize these variable names, it drives me crazy):

diff --git a/auto_patcher b/auto_patcher
index aac6912..9a7b203 100755
--- a/auto_patcher
+++ b/auto_patcher
@@ -455,8 +455,8 @@ prep_alternate_patch () {
}

no_network_access () {
- ping www.github.com $PINGCOUNT >> "$LOG" 2>&1 && NETWORK=true # second try
- ping www.google.com $PINGCOUNT >> "$LOG" 2>&1 # test for internet in gener
+ PING_CHECK "www.github.com" >> "$LOG" 2>&1 && NETWORK=true # second try an
+ PING_CHECK "www.google.com" >> "$LOG" 2>&1 # test for internet in general
if [[ "$NETWORK" == true ]]; then
return
else
@@ -1158,18 +1158,29 @@ TMPDIR="$ROOT/tmp$DATE"
mkdir "$TEMP"
ROM=$(abspath "$1")
ROMX=$(extpath "$1")
-PINGCOUNT=" -c1 "
PATCH_BINARY=patch
+PINGCOUNT="-c1"

if [[ $OSTYPE == "cygwin" ]]; then
EXE=".exe"
PGFORM="0x"
- PINGCOUNT=" -n 1 "
+ PINGCOUNT="-n 1"
PATCH_BINARY="./patch$EXE "
AUTO_UPDATE=false # CYGWIN AUTO_UPDATE TESTERS COMMENT THIS LINE HERE!
-
fi

+PING_CHECK() {
+ case $(uname -s) in
+ [Dd]arwin*)
+ (ping "$@" "$PINGCOUNT")
+ ;;
+ *)
+ (ping "$PINGCOUNT" "$@")
+ ;;
+ esac
+}
+
+
LOG=$(abspath ./log$DATE.txt)
#echo $ROOT $TOOL $ROM $TEMP "$LOG"
echo "ROOT= $ROOT" >> "$LOG"
@@ -1197,7 +1208,7 @@ if [[ -n "$AUTO_PATCHER_WAS_UPDATED" ]]; then
fi

if [[ "$AUTO_UPDATE" == true ]] && [[ "$GIT" == true ]]; then
- ping www.github.com $PINGCOUNT > /dev/null 2>&1 && NETWORK=true || no_netw
+ PING_CHECK "www.github.com" > /dev/null 2>&1 && NETWORK=true || no_network
if [[ "$NETWORK" == true ]]; then
printtask "### checking for updates ###"

Here is a paste of the script with this change, would you run it and make sure that I added your central findings correctly?
[Android Software/Hacking General [Developers Only]] txoof:
It looks good! The PING_CHECK is a good solution. It's too bad the different environments have such different needs.

I think you swapped the darwin and cygwin styles in the sub. Here's a version that should fix that:

PING_CHECK() {
case $(uname -s) in
[Dd]arwin*)
(ping "$PINGCOUNT" "$@")
#(ping "$@" "$PINGCOUNT")
;;
*)
(ping "$@" "$PINGCOUNT")
#(ping "$PINGCOUNT" "$@")
;;
esac
}
[Android Software/Hacking General [Developers Only]] btyre:
Get this error when trying to apply PDroid to Galaxy Ace Plus CM10.1. The rom doesn't have a working Camcorder, and the error seems to be at the part, so Is there any way round this?

http://codepad.org/SPsVXjGu
[Android Software/Hacking General [Developers Only]] mateorod:
OpenPDroid has been ported to 4.3 and I should have new source patches and an updated Autopatcher before the end of the weekend.

I would try the other latest patch dates. We have hard-coded all 10.1.2 builds to be patched with the 20130516 patches, since the Official builds that is the case. but unofficial may need different or current patches. Use a recent nightly, or try the other patch dates manually.

,.auto_patcher ROM.zip openpdroid cm 20130626

or try 20130719
[Android Software/Hacking General [Developers Only]] txoof:
What 4.3 roms have people been using with openpdroid? I've been sticking with CM 10.1, but I'm having issues with the GPS on a Galaxy Nexus. Have you had wild success with a GN, openpdroid and another rom?
[Android Software/Hacking General [Developers Only]] poo706:
I just bought a sprint gnex and have cm10.1 and OpenPDroid on it. I just tested gps literally 10 minutes ago and gps status was able to lock on 6 satellites after about 3 minutes. I'm going to try the non-stock gps.conf that I used on my dinc2 and see if I can get the gnex to lock as fast as my dinc2 did.

[poo]
[Android Software/Hacking General [Developers Only]] MadMic:
Good luck :fingers-crossed: it makes it a little better, but still anywhere between 1 to 5 minutes... I find if I get a lock with WiFi on & connected it seems faster...

Mateo is working on it - but it seems to only really effect the GNex devices :(
[Android Software/Hacking General [Developers Only]] yuuzhantar:
Thanks :)
[Android Software/Hacking General [Developers Only]] tolik873:
Since I use openpdroid I occasionally have problems with the GPS.

No matter which application I use, it gets a fast GPS fix, but after about 20 seconds, the GPS just gets disabled for about half a minute. After this time GPS is turned on again for 20 seconds and so on. GPS monitor app shows that GPS actually gets disabled and not just losing fix.

the logcat shows the following entries:

E/gsiff_sp_com( 1969): I/sp_process_raw_sensor_data: ACCEL_DATA (1.886631,-1.254562,9.433155) samp num = 4, flag 0, read @ sns 5269959 ms, print @ sys 5269959 ms

E/gsiff_dmn( 1969): I/loc_api_event_ind_callback: Received LocAPI Event ind = 46

E/gpsone_dmn( 1969): gpsone_glue_pipewrite:110] fd = 7, buf = 0x4122e8ec, size = 820

E/gpsone_dmn( 1969): gpsone_glue_pipewrite:116] fd = 7, result = 820

E/gpsone_dmn( 1969): gpsone_glue_piperead:150] fd = 7, len = 4

E/gpsone_dmn( 1969): gpsone_glue_piperead:144] fd = 7, buf = 0x40f30b80, size = 816

E/gpsone_dmn( 1969): gpsone_glue_piperead:150] fd = 7, len = 816

E/gsiff_dmn( 1969): I/gsiff_ctl_task: Handling message type = 1

E/gsiff_dmn( 1969): I/gsiff_daemon_sensor_streaming_handler: Recv Sensor Streaming Accel(1,0,0,0) Gyro(1,0,0,0) (valid,ready,#samp,batching)

E/gsiff_sp_and_ndk( 1969): I/sp_and_ndk_update_sensor_status: Updating on accel reporting = 0 sampling_rate = 0

E/gsiff_sp_and_ndk( 1969): D/sp_and_ndk_update_sensor_status: Disabling Sensor!

D/iNemoSensor( 2374): setDelay(): handle(0), en(20000000)

I/iNemoSensor( 2374): iNemoSensor::skip update_delay wanted_gyro = 66666000 current delay = 66666000

I/iNemoSensor( 2374): skip update_delay wanted_accel = 20000000 current delay = 20000000

E/gsiff_sp_and_ndk( 1969): I/sp_and_ndk_update_sensor_status: Updating on gyro reporting = 0 sampling_rate = 0

E/gsiff_sp_and_ndk( 1969): D/sp_and_ndk_update_sensor_status: Disabling Sensor!

flashing restore resolves this issue. is there a workaround?
[Android Software/Hacking General [Developers Only]] alroger:
Try disabling your gps apps and try a clean GPS Status from the market.

I dont have any problems after I get a lock. I use maps, ingress, endomondo, sometimes geocache.

Edit: thought I was replying to my sgt7 thread. Dont even know your device/build. But I will leave the suggestion for testing, anyway.
[Android Software/Hacking General [Developers Only]] mateorod:
OpenPDroid support for Android4.3 has been pushed. You can find source patches here and the trees here. Those source patches have been tested against AOSP and CM. But there has not been nearly enough testing on actual running devices. So report your experiences and contribute bug fixes. This is a three armed-project (Autopatcher, OpenPDroid, PdroidManager) and I am simply not capable of serviceably maintaining all three projects in the long term.

I have also updated the to Autopatcherv3.0.0. Not all of my milestones have been hit but this is where we are so far, with autopatcher support for Android4.3 limited to OpenPDroid for AOSP and CM. More roms and mods to come in the next few weeks.The big issue on my immediate plate is I will soon be updating the PDroidManager in the Play Store. I have already updated the app for 4.3, but it has not been published yet. That should hopefully get done relatively soon. For now, you will have to sideload PDroidManager while on Android-4.3. You can either restore through a Titanium Backup-type service, or sideload from the PDroidManager thread.

I have some more things I have been working on I wanted to bundle in for this release, but it started to seem pointless to keep users waiting for 4.3 while I had it in my pocket. So here you go.
[Android Software/Hacking General [Developers Only]] mateorod:
[MENTION=4293606]DualJoe[/MENTION]

I think that the ServerThread files may be missing something...can you give me the entire services.jar from those builds? As in, the temasek build and then the temasek build with OpenPDroid attached? Shouldn't take me more than a few minutes with that in hand...
[Android Software/Hacking General [Developers Only]] IUnga:
original services.jar from [MENTION=2332422]temasek[/MENTION]'s build v6
[Android Software/Hacking General [Developers Only]] bone101:
It don't work for quarx defy Cm10.2 roms :(

MB525
[Android Software/Hacking General [Developers Only]] DualJoe:
Files attached.

Currently [MENTION=2332422]temasek[/MENTION] pulled the patch in his current releases. But i guess he will reimplement it once its compatible with pdroid again.
[Android Software/Hacking General [Developers Only]] txoof:
I've been using the autopatcher with CM 10.1.2 (maguro stable 2013-07-11 19:32:19) for a while, but I just noticed the <PATCHDATE> option. I'm not quite sure what I should be filling in here. I've been using the following command:

$ ./auto_patcher cm-10.1.2-maguro.zip openpdroid cm

Patches are created, but they always have the date of 20130712. Based on that date, I don't think I'm applying the latest happenings in openpdroid. What should I be filling into the <PATCHDATE> option to ensure that I have the latest patches against that build?

Thanks for the advice. I feel like I'm missing something, but I just can't seem to find anything about this option in this thread or the autopatcher thread.
[Android Software/Hacking General [Developers Only]] mateorod:
Thanks...I am migrating a hard drive tonight but will add something expressly for you guys very soon.

I have the PATCHDATE stuff at the third postas "Advanced Usage", mostly because it is barely needed anymore. It is a remnant of the early days, when you had to manually pick a PATCHDATE everytime you ran the patcher. In the early days, it was probably 75% of my questions.

Eventually, I got a decent build query working, where the patcher parses your build date, and then find the patches that were built right before that date. Just recently, I figured out how to emulate multi-dimensional arrays in bash (I could use associative arrays in bash 4+, but I always worry that advanced bashisms won't work in cygwin- they rarely do) where each mod you pick is separately matched against the available patches for your rom.

The one exception to this is the so-called Final builds from CM. Those builds screw everything up, because they have current build dates, but actually use a code base that is older than the most recent patches. Eventually I got tired of the questions (you guys have seen it, the Settings$Secure failures) and I hardcoded any CM10.1.2 build to be patched by the best match, which for the Final build is the 20130516 patches. If you are seeing different patches selected, that means that your device likely has a non-standard build.prop, and doesn't have 10.1.2* explicitly in that entry.

tl;dr

You almost certainly don't need it, that is why the docs are sparse. But the CM=-10.1.2 builds are the only ones I can thin that might, so if you are having trouble, you can list the available patches by running

./auto_patcher -h

or

./auto_patcher -h advanced

and following the directions. I think our command-line help and error messages are quite good, even if most people never see them.:p
[Android Software/Hacking General [Developers Only]] txoof:
Thanks for that explanation. I thought I was being denser than usual.
[Android Software/Hacking General [Developers Only]] mateorod:
There is some sort of disconnect happening, likely on my end. What rom is this from? I made the patch from the included files, but when I try and apply the patch to the Galaxy S3 116.1 OR 116 build (I just looked at your recent posts list) it doesn't patch. Which means that the services.jar in all three cases is pretty dissimilar.

I tested it, and the patch DOES work on the unpatched services.jar you sent me (which, duh, because that is what it is made from. But that rules out a corruption/bad patch) so if that file is made from the source for an upcoming release, then we can use the new patch then.

Awhile back I added $BACKUP patches (variable may have another name, i can't remember), where if a certain $PATCH fails, it will look for $PATCH2, and if that fails, $PATCH3 and so on. I implemented it because ParanoidAndroid has several forks they "maintain" which are indistinguishable from each other in the build.prop. For a long time, PA users of the less-used fork had to edit those patches by hand. I added this feature to handle those cases.

Essentially, if your builds fail to patch with the current services.patch, it will try the services2.patch that I made from your posted jars. I just say this so you see what I am doing, if that helps you.

You can test this with any builds you make by decompiling, diffing and then adding the services2.patch to the directory.

$ ls
stock-services opd-services # both directories with pertinent services.jars inside

$ java -jar baksmali.jar -a 17 -b stock-services/services.jar -o stock-services/smali
$ java -jar baksmali.jar -a 17 -b opd-services/services.jar -o opd-services/smali

$ diff -Npru stock-services/smali opd-services/smali > services2.patch
$ cp services2.patch ~/auto-patcher/patches/openpdroid/4.3/cm/20130719/services2.patch

There is already a services2.patch there, but that got commited by accident and needs to be removed. You can just keep sending me files/information, but I figured I would but the power to experiment out to anyone interested.

Update: Okay, when experiementing with various patches, it has become clear to me that those jars are not from the S3. I diff the S3 services.jar aginst the OpenPDroid one you posted and the diff is 10 mb. I am uploading the services2.patch I made from your posted files. Place it in the patches/openpdroid/4.2/cm/20130719 directory (replacing the unneeded one that is there) and see what happens. But the fact that this patch fails on the S3 is not a good sign, unless only the one temsek build was having problems and this solves them.

I am working pretty hard on a MAJOR update to the autopatcher which I hope will solve all of these problems for good. But it is still very much in the pipeline.
[Android Software/Hacking General [Developers Only]] DualJoe:
Temasek:

cm-10.2-20130807-UNOFFICIAL-i9300-V3.2.zip

Edit: The V116 builds are CM10.1 not CM10.2.

Thanks. Will look into it.
[Android Software/Hacking General [Developers Only]] My Gnexi:
Maybe Google hired svyat and that's why he disappeared?
[Android Software/Hacking General [Developers Only]] mateorod:
Yeah...if you look at my examples, I was using 4.2. I didn't realize the issue carried over to 4.3. So just add it to latest cm patches and it should work. Explains a hell of a lot.

Edit: So I have been p[laying with this and I think this would just be easier if I could build and make patches. Now that I am diggin in, I see that the Services.jar is patching with our existing patch structure, but the framework.jar fails. I assume that the Services.jar would need the new services2.patch if temasek applied that particular troublesome commit, right?

But that still leaves us with a rogue commit in Settings.java. I went and looked at the history, but it would be much easier if I just built it. Where does temasek leep his manifest? I don't see one. I am not a kanger, you guys can trust me...

That and a link to the original commit that is breaking things, thanks.
[Android Software/Hacking General [Developers Only]] takota6:
First I apologize for my ignorance.

I've patched the latest cyanogen 10.2 (8/10) droid DNA. the AGP patches fine but when I apply patches in recovery which flashes fine, but upon boot and install of Pdroid Manager it states no patches, and looking into data/pdroid nothing appears .. I'll take a link if this had been explained before..Txs

Æaaa..\„/
[Android Software/Hacking General [Developers Only]] lothos:
Patched a 10.2 tree and build successfully for AT&T Galaxy S3, seemed to boot just fine. But using the phone caused screen freezes and eventually rebooted the phone. HOWEVER, not sure if I can completely blame openpdroid since I haven't been running 10.2 until now... After seeing how much data the facebook app stole from my phone and how often it looks at personal data I don't want to run without some protection.

Anyone using it for an AT&T S3 who has a better experience?
[Android Software/Hacking General [Developers Only]] karamelos:
Do you have some log?
[Android Software/Hacking General [Developers Only]] lothos:
No, it always rebooted. Plus my gf was getting pissed since it was her I was talking to... I'll try another build and see how it goes.
[Android Software/Hacking General [Developers Only]] lothos:
Made another build and it seemed stable enough during a call.

But llama is still broken, so I can't use it. Has anyone worked on that problem?
[Android Software/Hacking General [Developers Only]] emph4tic:
I stepped away from OpenPDroid a while back when I noticed that llama cell polling wasn't working properly. I came back to try out CM10.2 with OpenPDroid and was disappointed that that issue was still present.

[MENTION=4342828]mateorod[/MENTION] -

I saw in the AutoPatcher thread that there were some experimental fix back in May/June to address this issue, but was remiss to see it still occurring. I don't want to start any sort of flame war or anything, but I left to use CollegeDev's PDroid2.0 on 4.2.2 due to it's updated fixes and features and was really looking forward to the collaboration and merge for OpenPdroid.

Not to sound ungrateful, but it seems like a lot more efforts have been prioritized to Autopatcher lately and attempting to keep up with supporting the frequent custom ROM releases. Any luck on revisiting the merge lately?

Greatly appreciate your efforts!