OpenPDroid / platform_frameworks_base

Other
7 stars 5 forks source link

how to rebuilt the framework and run it on phone #15

Open chenjunqiang opened 11 years ago

chenjunqiang commented 11 years ago

Thanks for u do many job for OpenPDroid,now i have add some new feature into framework,but i don't have to rebuilt the framework,would u please tell my how to do ?

What i have done? 1.I have using ApG to patch the original rom,and PDroid Manager can work; 2.I have add a feature to control mac address feature into framework

What i want? I want to rebuilt the framework,and test it,and run it on the phone.

mateor commented 11 years ago

I also maintain source patches for patching source code, as opposed to ApG/Auto-patcher which patches compiled code. If you want to add a feature, you could do it several ways. Probably the best way would be to use our source patches to patch the Android source. Then make your changes and compile.

The source patches are located at github.com/OpenPDroid/OpenPdroidPatches. The README has patching instructions. I also have a collection of scripts that I use to apply source patches and even make Auto-patcher patches. They are really rough because I only have them pushed to github to preserve them. But maybe they can give some additional direction. www.github.com/mateor/patchScripts

chenjunqiang commented 11 years ago

Thanks u reply;

OK, let me try to describe the all thing,

First : i have add a feature(such as control the app to visit MAC Address) on the Framework Second : Download the CM source code Third : Using your patches script to patch the CM source code ?(whether the new feature will not work ?)

Thanks. Maybe i was a new fresh man about this topic;so my question seem so silly.

Do u have some thing reference website about this? maybe u can let me to know more;

On 2013-11-3, at 上午10:02, mateor notifications@github.com wrote:

I also maintain source patches for patching source code, as opposed to ApG/Auto-patcher which patches compiled code. If you want to add a feature, you could do it several ways. Probably the best way would be to use our source patches to patch the Android source. Then make your changes and compile.

The source patches are located at github.com/OpenPDroid/OpenPdroidPatches. The README has patching instructions. I also have a collection of scripts that I use to apply source patches and even make Auto-patcher patches. They are really rough because I only have them pushed to github to preserve them. But maybe they can give some additional direction. www.github.com/mateor/patchScripts

— Reply to this email directly or view it on GitHub.

mateor commented 11 years ago

You have the right idea, but the wrong order. Download CM source. Use the manual directions on the README (probably easiest way) and patch the CM source. Then make your changes and compile.

Or you could add your changes to the patches themselves before applying the patches.

If you already made your edits, what did you edit?

chenjunqiang commented 11 years ago

OK,Got it.

But i just still confuse, As i said,i will add the new api into Framework,and let the PDroid Manager to call api.

And u said patch the CM source first.If i patch first, whether the new api will work?

On 2013-11-3, at 上午10:32, mateor notifications@github.com wrote:

You have the right idea, but the wrong order. Download CM source. Use the manual directions on the README (probably easiest way) and patch the CM source. Then make your changes and compile.

Or you could add your changes to the patches themselves before applying the patches.

If you already made your edits, what did you edit? — Reply to this email directly or view it on GitHub.

chenjunqiang commented 11 years ago

And i mostly will edit the /android/privacy/ some files.

mateor commented 11 years ago

I guess I don't understand your confusion. You can either edit the patches (which contain all the OpenPdroid files, including /privacy) before patching, or apply our original patches to the CM source, and then apply your changes.

Will you need a custom PdroidManager? Compiling that is difficult the first time.

chenjunqiang commented 11 years ago

Yes, i also need a custom PdroidManager. Because i need to add a feature into PdroidManager,and i check the PdroidManager source code, Found that i need to add the source code into framework.so i have all the question.Do u can pm u Skype or another account which can contact u.

mateor commented 11 years ago

No, I would rather do this here. That way the next person can read it and I won't have to give private support to them too. I hope that is acceptable.

In order to compile PDroidManager with your new feature, you will need to compile the framework first. So what I already told you comes first. When you have successfully compiled the framework.jar with your modified OpenPdroid edits, I will show you how to compile PDroidManager. Essentially, you will need to import your custom /privacy files into the android.jar in eclipse.

chenjunqiang commented 11 years ago

OK, i can accept.Thanks very much. If this topic will more question, i will continue ask here. thanks.

mateor commented 11 years ago

No problem. I am happy to do what I can. On Nov 2, 2013 10:16 PM, "chenjunqiang" notifications@github.com wrote:

OK, i can accept.Thanks very much. If this topic will more question, i will continue ask here. thanks.

— Reply to this email directly or view it on GitHubhttps://github.com/OpenPDroid/platform_frameworks_base/issues/15#issuecomment-27637974 .

mateor commented 11 years ago

I have updated the patchScripts repo significantly, mostly as a consequence of our conversation.

If you use the scripts, you will want to edit the first few lines of each where I specifiy things like ANDROID_HOME (the root of your android source tree) and PATCHES_LOCATION (where you git clone https://github.com/OpenPDroid/OpenPDroidPatches ).

Many of those scripts are for the autopatcher, but I think that applyPdroid.sh and removePdroid.sh could help you. applyPdroid.sh accepts a branch of OpenPdroidPatches as argument, so if you are building 4.2, the commands would be:

   repo sync; . build/envsetup.sh; lunch
   ./applyPdroid.sh 4.2
   make

To reset your tree, just run removePdroid.sh. I hope those are helpful, they are not perfect at all, but they have been working for me for a long time now.

Let me know if you need anything else!

chenjunqiang commented 11 years ago

Thanks for u tips; But i am still can not patch the openPDroid Framework into CM10.1

what i allready done:

  1. download the source code from cm, file location : ~/android/system
  2. compite the source code, Success,The .zip file can flash into my i9250 phone; link page:http://wiki.cyanogenmod.org/w/Build_for_maguro

3.Due to u this tip,i using u tip to patch source code; But fail; The log will attach on the last;

4.Try to detail what i have do in the patch process a. get the code from : https://github.com/mateor/patchScripts b. get the code from : https://github.com/OpenPDroid/OpenPDroidPatches c. edit the applyPDroid.sh file, change the ANDROID_HOME,PATHCHES_LOCATION d. and as u suggest : run the ./applyPDroid.sh 4.2.x(i have allready test the : 4.2 4.2.1 4.2.2 4.3 , all fail )

Would u please give me a more detail guide ? I very very need the detail guide

The Log was : (run the ./applyPDroid.sh 4.2.x)


patching file core/pathmap.mk Hunk #2 FAILED at 93. Hunk #3 succeeded at 102 with fuzz 2 (offset 2 lines). 1 out of 3 hunks FAILED -- saving rejects to file core/pathmap.mk.rej patching file target/product/core.mk Hunk #1 succeeded at 18 with fuzz 2 (offset -4 lines). Hunk #2 succeeded at 33 with fuzz 2 (offset -4 lines). Hunk #3 succeeded at 131 (offset -4 lines). patching file target/product/security/privacy.x509.pem The next patch would create the file luni/src/main/java/java/lang/PrivacyInputStream.java, which already exists! Assume -R? [n] Apply anyway? [n] Skipping patch. 1 out of 1 hunk ignored The next patch would create the file luni/src/main/java/java/lang/PrivacyProcessManager.java, which already exists! Assume -R? [n] Apply anyway? [n] Skipping patch. 1 out of 1 hunk ignored patching file luni/src/main/java/java/lang/ProcessManager.java Reversed (or previously applied) patch detected! Assume -R? [n] Apply anyway? [n] Skipping patch. 7 out of 7 hunks ignored -- saving rejects to file luni/src/main/java/java/lang/ProcessManager.java.rej patching file Android.mk Reversed (or previously applied) patch detected! Assume -R? [n] Apply anyway? [n] Skipping patch. 5 out of 5 hunks ignored -- saving rejects to file Android.mk.rej patching file api/current.txt Reversed (or previously applied) patch detected! Assume -R? [n] Apply anyway? [n] Skipping patch. 1 out of 1 hunk ignored -- saving rejects to file api/current.txt.rej patching file core/java/android/app/ContextImpl.java Reversed (or previously applied) patch detected! Assume -R? [n] Apply anyway? [n] Skipping patch. 12 out of 12 hunks ignored -- saving rejects to file core/java/android/app/ContextImpl.java.rej patching file core/java/android/app/Instrumentation.java Hunk #1 succeeded at 55 (offset 7 lines). Hunk #2 succeeded at 102 with fuzz 2 (offset 7 lines). Hunk #3 FAILED at 1402. Hunk #4 succeeded at 1669 with fuzz 2 (offset 252 lines). Hunk #5 FAILED at 1467. Hunk #6 FAILED at 1527. Hunk #7 FAILED at 1542. Hunk #8 FAILED at 1587. Hunk #9 FAILED at 1602. 6 out of 9 hunks FAILED -- saving rejects to file core/java/android/app/Instrumentation.java.rej patching file core/java/android/content/ContentResolver.java Reversed (or previously applied) patch detected! Assume -R? [n] Apply anyway? [n] Skipping patch. 3 out of 3 hunks ignored -- saving rejects to file core/java/android/content/ContentResolver.java.rej patching file core/java/android/hardware/Camera.java Reversed (or previously applied) patch detected! Assume -R? [n] Apply anyway? [n] Skipping patch. 8 out of 8 hunks ignored -- saving rejects to file core/java/android/hardware/Camera.java.rej patching file core/java/android/net/NetworkInfo.java Reversed (or previously applied) patch detected! Assume -R? [n] Apply anyway? [n] Skipping patch. 1 out of 1 hunk ignored -- saving rejects to file core/java/android/net/NetworkInfo.java.rej patching file core/java/android/os/SystemProperties.java Reversed (or previously applied) patch detected! Assume -R? [n] Apply anyway? [n] Skipping patch. 4 out of 4 hunks ignored -- saving rejects to file core/java/android/os/SystemProperties.java.rej patching file core/java/android/provider/Settings.java Reversed (or previously applied) patch detected! Assume -R? [n] Apply anyway? [n] Skipping patch. 3 out of 3 hunks ignored -- saving rejects to file core/java/android/provider/Settings.java.rej patching file core/java/android/speech/srec/MicrophoneInputStream.java Reversed (or previously applied) patch detected! Assume -R? [n] Apply anyway? [n] Skipping patch. 3 out of 3 hunks ignored -- saving rejects to file core/java/android/speech/srec/MicrophoneInputStream.java.rej patching file media/java/android/media/AudioRecord.java Reversed (or previously applied) patch detected! Assume -R? [n] Apply anyway? [n] Skipping patch. 4 out of 4 hunks ignored -- saving rejects to file media/java/android/media/AudioRecord.java.rej patching file media/java/android/media/MediaRecorder.java Reversed (or previously applied) patch detected! Assume -R? [n] Apply anyway? [n] Skipping patch. 12 out of 12 hunks ignored -- saving rejects to file media/java/android/media/MediaRecorder.java.rej patching file preloaded-classes Reversed (or previously applied) patch detected! Assume -R? [n] Apply anyway? [n] Skipping patch. 1 out of 1 hunk ignored -- saving rejects to file preloaded-classes.rej The next patch would create the file privacy/java/android/privacy/IPrivacySettingsManager.aidl, which already exists! Assume -R? [n] Apply anyway? [n] Skipping patch. 1 out of 1 hunk ignored The next patch would create the file privacy/java/android/privacy/PrivacyFileObserver.java, which already exists! Assume -R? [n] Apply anyway? [n] Skipping patch. 1 out of 1 hunk ignored The next patch would create the file privacy/java/android/privacy/PrivacyPersistenceAdapter.java, which already exists! Assume -R? [n] Apply anyway? [n] Skipping patch. 1 out of 1 hunk ignored The next patch would create the file privacy/java/android/privacy/PrivacySettings.aidl, which already exists! Assume -R? [n] Apply anyway? [n] Skipping patch. 1 out of 1 hunk ignored The next patch would create the file privacy/java/android/privacy/PrivacySettings.java, which already exists! Assume -R? [n] Apply anyway? [n] Skipping patch. 1 out of 1 hunk ignored The next patch would create the file privacy/java/android/privacy/PrivacySettingsManager.java, which already exists! Assume -R? [n] Apply anyway? [n] Skipping patch. 1 out of 1 hunk ignored The next patch would create the file privacy/java/android/privacy/PrivacySettingsManagerService.java, which already exists! Assume -R? [n] Apply anyway? [n] Skipping patch. 1 out of 1 hunk ignored The next patch would create the file privacy/java/android/privacy/PrivacySettingsStub.java, which already exists! Assume -R? [n] Apply anyway? [n] Skipping patch. 1 out of 1 hunk ignored The next patch would create the file privacy/java/android/privacy/surrogate/PrivacyAccountManager.java, which already exists! Assume -R? [n] Apply anyway? [n] Skipping patch. 1 out of 1 hunk ignored The next patch would create the file privacy/java/android/privacy/surrogate/PrivacyActivityManagerService.java, which already exists! Assume -R? [n] Apply anyway? [n] Skipping patch. 1 out of 1 hunk ignored The next patch would create the file privacy/java/android/privacy/surrogate/PrivacyConnectivityManager.java, which already exists! Assume -R? [n] Apply anyway? [n] Skipping patch. 1 out of 1 hunk ignored The next patch would create the file privacy/java/android/privacy/surrogate/PrivacyContentResolver.java, which already exists! Assume -R? [n] Apply anyway? [n] Skipping patch. 1 out of 1 hunk ignored The next patch would create the file privacy/java/android/privacy/surrogate/PrivacyCursor.java, which already exists! Assume -R? [n] Apply anyway? [n] Skipping patch. 1 out of 1 hunk ignored The next patch would create the file privacy/java/android/privacy/surrogate/PrivacyLocationManager.java, which already exists! Assume -R? [n] Apply anyway? [n] Skipping patch. 1 out of 1 hunk ignored The next patch would create the file privacy/java/android/privacy/surrogate/PrivacyTelephonyManager.java, which already exists! Assume -R? [n] Apply anyway? [n] Skipping patch. 1 out of 1 hunk ignored The next patch would create the file privacy/java/android/privacy/surrogate/PrivacyWifiManager.java, which already exists! Assume -R? [n] Apply anyway? [n] Skipping patch. 1 out of 1 hunk ignored The next patch would create the file services/java/com/android/server/PrivacyTelephonyRegistry.java, which already exists! Assume -R? [n] Apply anyway? [n] Skipping patch. 1 out of 1 hunk ignored patching file services/java/com/android/server/SystemServer.java Hunk #1 succeeded at 85 with fuzz 2 (offset 13 lines). Hunk #2 FAILED at 227. Hunk #3 FAILED at 282. Hunk #4 succeeded at 1215 with fuzz 2 (offset 202 lines). 2 out of 4 hunks FAILED -- saving rejects to file services/java/com/android/server/SystemServer.java.rej patching file services/java/com/android/server/TelephonyRegistry.java Reversed (or previously applied) patch detected! Assume -R? [n] Apply anyway? [n] Skipping patch. 10 out of 10 hunks ignored -- saving rejects to file services/java/com/android/server/TelephonyRegistry.java.rej patching file services/java/com/android/server/am/BroadcastQueue.java Reversed (or previously applied) patch detected! Assume -R? [n] Apply anyway? [n] Skipping patch. 5 out of 5 hunks ignored -- saving rejects to file services/java/com/android/server/am/BroadcastQueue.java.rej patching file telephony/java/android/telephony/CellInfoGsm.java Reversed (or previously applied) patch detected! Assume -R? [n] Apply anyway? [n] Skipping patch. 1 out of 1 hunk ignored -- saving rejects to file telephony/java/android/telephony/CellInfoGsm.java.rej patching file telephony/java/android/telephony/PhoneStateListener.java Hunk #2 succeeded at 157 with fuzz 2 (offset -8 lines). Hunk #3 FAILED at 347. 1 out of 3 hunks FAILED -- saving rejects to file telephony/java/android/telephony/PhoneStateListener.java.rej patching file telephony/java/android/telephony/ServiceState.java Hunk #1 succeeded at 489 (offset 5 lines). patching file wifi/java/android/net/wifi/WifiInfo.java Reversed (or previously applied) patch detected! Assume -R? [n] Apply anyway? [n] Skipping patch. 1 out of 1 hunk ignored -- saving rejects to file wifi/java/android/net/wifi/WifiInfo.java.rej patching file src/com/android/mms/transaction/HttpUtils.java Reversed (or previously applied) patch detected! Assume -R? [n] Apply anyway? [n] Skipping patch. 3 out of 3 hunks ignored -- saving rejects to file src/com/android/mms/transaction/HttpUtils.java.rej The next patch would create the file src/java/android/privacy/surrogate/PrivacyCDMALTEPhone.java, which already exists! Assume -R? [n] Apply anyway? [n] Skipping patch. 1 out of 1 hunk ignored The next patch would create the file src/java/android/privacy/surrogate/PrivacyCDMAPhone.java, which already exists! Assume -R? [n] Apply anyway? [n] Skipping patch. 1 out of 1 hunk ignored The next patch would create the file src/java/android/privacy/surrogate/PrivacyGSMPhone.java, which already exists! Assume -R? [n] Apply anyway? [n] Skipping patch. 1 out of 1 hunk ignored The next patch would create the file src/java/android/privacy/surrogate/PrivacyPhoneProxy.java, which already exists! Assume -R? [n] Apply anyway? [n] Skipping patch. 1 out of 1 hunk ignored The next patch would create the file src/java/android/privacy/surrogate/PrivacySipPhone.java, which already exists! Assume -R? [n] Apply anyway? [n] Skipping patch. 1 out of 1 hunk ignored patching file src/java/com/android/internal/telephony/PhoneFactory.java Reversed (or previously applied) patch detected! Assume -R? [n] Apply anyway? [n] Skipping patch. 5 out of 5 hunks ignored -- saving rejects to file src/java/com/android/internal/telephony/PhoneFactory.java.rej patching file src/java/com/android/internal/telephony/SMSDispatcher.java Reversed (or previously applied) patch detected! Assume -R? [n] Apply anyway? [n] Skipping patch. 4 out of 4 hunks ignored -- saving rejects to file src/java/com/android/internal/telephony/SMSDispatcher.java.rej patching file src/java/com/android/internal/telephony/cdma/CDMAPhone.java Reversed (or previously applied) patch detected! Assume -R? [n] Apply anyway? [n] Skipping patch. 1 out of 1 hunk ignored -- saving rejects to file src/java/com/android/internal/telephony/cdma/CDMAPhone.java.rej patching file src/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java Reversed (or previously applied) patch detected! Assume -R? [n] Apply anyway? [n] Skipping patch. 8 out of 8 hunks ignored -- saving rejects to file src/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java.rej patching file src/java/com/android/internal/telephony/cdma/RuimSmsInterfaceManager.java patching file src/java/com/android/internal/telephony/gsm/GSMPhone.java Reversed (or previously applied) patch detected! Assume -R? [n] Apply anyway? [n] Skipping patch. 2 out of 2 hunks ignored -- saving rejects to file src/java/com/android/internal/telephony/gsm/GSMPhone.java.rej patching file src/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java Hunk #3 succeeded at 86 with fuzz 2 (offset 8 lines). Hunk #4 FAILED at 97. Hunk #5 FAILED at 242. Hunk #6 succeeded at 369 (offset 19 lines). Hunk #7 FAILED at 628. Hunk #8 succeeded at 687 (offset 20 lines). Hunk #9 succeeded at 741 (offset 20 lines). Hunk #10 succeeded at 1107 (offset 20 lines). 3 out of 10 hunks FAILED -- saving rejects to file src/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java.rej patching file src/java/com/android/internal/telephony/gsm/SimSmsInterfaceManager.java patching file src/java/com/android/internal/telephony/sip/SipPhone.java Reversed (or previously applied) patch detected! Assume -R? [n] Apply anyway? [n] Skipping patch. 1 out of 1 hunk ignored -- saving rejects to file src/java/com/android/internal/telephony/sip/SipPhone.java.rej patching file src/java/com/android/internal/telephony/sip/SipPhoneFactory.java Hunk #1 succeeded at 25 (offset 4 lines). Hunk #2 FAILED at 41. 1 out of 2 hunks FAILED -- saving rejects to file src/java/com/android/internal/telephony/sip/SipPhoneFactory.java.rej

mateor commented 11 years ago

Sure. We will get this working for you.

For the purpose of this walkthrough:

ANDROID_HOME=~/android/system/jellybean PATCH_LOCATION=~/android/OpenPDroidPatches patchScript_location=~/android/patchScripts # this is not a variable in the scripts, just some info

 cd ~/android/system/jellybean
 rm -rf .repo/loc*
 rm -rf .repo/man*
 repo init -u https://github.com/CyanogenMod/android -b cm-10.1
 repo sync -j8
 ~/android/patchScripts/removePdroid.sh
 . build/envsetup.sh
 lunch    # choose your target
 ~/android/patchScripts/applyPdroid.sh 4.2.x
 make bacon

I use removePdroid.sh in this sequence just to be sure there aren't old patch attempts laying around. Each time you run applyPdroid.sh you should run removePdroid.sh. I use a lock file to try and enforce this, but run the remove script to be sure that it is working.

Below is the output of applyPdroid.sh 4.2.x after running those exact instructions on my machine:

mateor@mateor-HP-m6:~/android/system/jellybean$ ~/android/patchScripts/applyPdroid.sh 4.2.x
Switched to branch '4.2.x'
Switched to a new branch 'pdroid'
Switched to a new branch 'pdroid'
Switched to a new branch 'pdroid'
Switched to a new branch 'pdroid'
Switched to a new branch 'pdroid'

Patched build succesfully
Patched libcore succesfully
Patched frameworks_base succesfully
Patched packages_apps_Mms succesfully
Patched frameworks_opt_telephony succesfully

including device/generic/armv7-a-neon/vendorsetup.sh
including device/generic/armv7-a/vendorsetup.sh
including device/generic/goldfish/vendorsetup.sh
including device/generic/mips/vendorsetup.sh
including device/generic/x86/vendorsetup.sh
including device/ti/panda/vendorsetup.sh
including vendor/cm/vendorsetup.sh
including sdk/bash_completion/adb.bash
including vendor/cm/bash_completion/git.bash
including vendor/cm/bash_completion/repo.bash
mateor commented 11 years ago

Here is what the log, OpDPatch.log looks like afterwards: http://pastebin.com/YNgPTV23

If there are any patch failures, it should print to your terminal as well as the log.

chenjunqiang commented 11 years ago

My phone was i9250,the property project target was maguro

cd ~/android/system/jellybean rm -rf .repo/loc rm -rf .repo/man repo init -u https://github.com/CyanogenMod/android -b cm-10.1 repo sync -j8 ~/android/patchScripts/removePdroid.sh . build/envsetup.sh lunch

but cannot find the choose your target ,there are not cm_maguro_eng option;

How am i to compile the system?

i do the step by http://wiki.cyanogenmod.org/w/Build_for_maguro; and i using the command :

croot brunch maguro

to compile maguro system;

I think there must be a file storage in my hard disk,so the brunch can work; What i can do next?

mateor commented 11 years ago

I am sorry, I did not understand your last post. There was a lot of our former correspondence quoted?

Did those posted commands work for you? If not, you could always follow the README on the https://github.com/OpenPdroid/OpenPDroidPatches repo. It is not as flexible or fast, but it does work as well.

chenjunqiang commented 11 years ago

Sorry, i also plan to follow the README on the https://github.com/OpenPdroid/OpenPDroidPatches repo; i will try it

mateor commented 11 years ago

Essentially, the operation is this for each project:

  patch -p1 < openpdroid_4.2.x_build.patch

Just swap the build for the project you are patching. That is really it, then build as normal.

mateor commented 11 years ago

On 11/05/2013 08:07 PM, chenjunqiang wrote:

My phone was i9250,the property project target was maguro

cd ~/android/system/jellybean
rm -rf .repo/loc*
rm -rf .repo/man*
repo init -u https://github.com/CyanogenMod/android -b cm-10.1
repo sync -j8
~/android/patchScripts/removePdroid.sh
. build/envsetup.sh
lunch

I just got this email. Just swap the lunch command for brunch maguro and you will be set.

mateor commented 11 years ago

Wait...that won't work exactly right. Follow my instructions above but pick a random target in lunch ( I use mako). Apply the patches but use your brunch command at the very end to order the build.

chenjunqiang commented 11 years ago

I just do the step again: and success patch.I donn't why.

4.Try to detail what i have do in the patch process a. get the code from : https://github.com/mateor/patchScripts b. get the code from : https://github.com/OpenPDroid/OpenPDroidPatches c. edit the applyPDroid.sh file, change the ANDROID_HOME,PATHCHES_LOCATION d. and as u suggest : run the ./applyPDroid.sh 4.2.x

and now i am compile cm10.1 maguro now. Hope success.

I just want to know : where is the framework.jar file.? If i chance something, how to get the new framework?

chenjunqiang commented 11 years ago

yes,i found the place where the framwork.jar are.But when i chance something, i using "mm" command to re-compile something, such as framework-res.apk ,and framework.jar.

But when i finished the framework.jar. I want to change the another place ,and go to same place, execute "mm" command,it alter me :"lack of the recovery .....",i forgot the alter information,i will show u next time.

By the way ,do u have something easy way to chance the framework code and then to run on the phone. or the simulator.

Now i should to chance the code,re-compile the framework,and then to replace the framework.jar into phone. it's very unconvenient。

mateor commented 11 years ago

You should be able to run on the emulator. I have little experience with the emulator though.

Glad you got it patched!

chenjunqiang commented 11 years ago

Thanks,now maybe the biggest problem was to debug the program between phone and the IDE.

mateor commented 11 years ago

You've got some major problems there. But those are not Pdroid-related. We don't touch those files. I don't know what ROM you are trying to build, but neither AOSP nor CM have those calls in the frameworks/base/core/java/androidps/Build.java file. Did you add some code there? That is not is anything you got from me.

I have spent a large portion of the day working with our patches as I brought OpenPdroid support up to 4.4. I know that the process works. Maybe you need to avoid the applyPdroid.sh script, but the process is mostly cut and dry.

What steps are you taking that gets you here? I gave you a list of commands that will work I am pretty sure. Post the output if they provide an error.

chenjunqiang commented 11 years ago

Oh,yep,Thanks for u job for open source,i have find a method to solve this problem.Lack of class.add the class ,the problem solve.

mateor commented 11 years ago

Very good. I find java to be mostly clear in it's errors, good luck!

mateor commented 11 years ago

I also just rebuilt PdroidManager for the Play Store, so the directions are fresh in my mind. Let me know when you have a ROM with OpenPDroid enabled, and I will write up the next step.

chenjunqiang commented 11 years ago

sorry,i don't understand what are u meaning.Do u meaning where i download the rom?or when i have a rom,what will i do? Why are you rebuild the PdroidManager ? for add some new feature?or fixes bugs?

mateor commented 11 years ago

I meant that whenever you were finished building a ROM with the OpenPdroid framework applied. My understanding was that you needed advice as to building PDroidManager.apk as well.

I updated the binary in the Play Store so it was able to work with Android 4.4. It wouldn't show as available to anydevice running Android 4.4 in the Play Store. So I updated it.

chenjunqiang commented 11 years ago

Oh,got it, now i am still try to find a way to run the PDroidManager.apk. Now was directly added the code into files,and then building the whole ROM,flash into phone.run the phone,test it;

Now I j am still have a problem, i can't directly create a framework.jar file. i was using these sequence

1.source ./build/evnsetup.sh 2.chooseproduct cm_maguro 3.make clean-framework 4.mmm -j4 framework/base

and then will alter me : no private recovery resources for TARGET_DEViCE;

But when i was rebuilt all the rom was ok,do u have this problem?

mateor commented 11 years ago

I use make framework from the Android root. You will need to have all the jars to run on device, though.

make framework services core telephony-common Mms all need to be on the device, and on a ROM made from the same source code. Sometimes it may be best to build the whole ROM first, and then push any jar you made changes to from there.

chenjunqiang commented 11 years ago

Thanks. i will try later.

BTW I am a Chinese man, but i saw u information was on USA,u are at night now.LOL.I will translate all this information into Chinese,let more people.haha

But u seen forgot to tell me how to building PDroidManager.apk.haha

mateor commented 11 years ago

Yeah...translations are great!

Building PDroidManager can be pretty complicated. Have you built apps in Eclipse before? If you have set up eclipse then I can tell you how from there (I hope).

chenjunqiang commented 11 years ago

Maybe u just can give a keyword,and i will try it;

chenjunqiang commented 11 years ago

Yeah, i just told me the command

make framwork

i have try it,and work, you are so nice; Thanks;

chenjunqiang commented 11 years ago

Do have some way to return a fake phone model,brand,my team try many time, was failure.

chenjunqiang commented 11 years ago

Hi, I want to ADD a PrivacyActivityManager which files will replace the ActivityManager,but i don't know how to replace the original ActivityManager in framework.

But i found u had replaced the TelephonyManager as PrivacyTelephonyManager.

So i guess you know how to do it; Please tell me how to do it;

Thanks;

mateor commented 11 years ago

On 11/12/2013 09:34 PM, chenjunqiang wrote:

Hi, I want to ADD a PrivacyActivityManager which files will replace the ActivityManager,but i don't know how to replace the original ActivityManager in framework.

But i found u had replaced the TelephonyManager as PrivacyTelephonyManager.

So i guess you know how to do it; Please tell me how to do it;

Thanks;

— Reply to this email directly or view it on GitHub https://github.com/OpenPDroid/platform_frameworks_base/issues/15#issuecomment-28360761.

If you mean add it to the build, the Android build system is pretty neat. Just add it with the other privacy classes in whatever domain you choose and the class will be added.

I recommend adding it to frameworks/base/privacy because then you can use all the other added classes as references. Search the patches, they have all the additions in one place.

mateor commented 11 years ago

On 11/12/2013 07:57 PM, chenjunqiang wrote:

Do have some way to return a fake phone model,brand,my team try many time, was failure.

— Reply to this email directly or view it on GitHub https://github.com/OpenPDroid/platform_frameworks_base/issues/15#issuecomment-28355503.

Let me look at this, I will get back to you on it.

chenjunqiang commented 11 years ago

Do u find a way to do it ? i have try to write the build.proc in the SD card,and read from here, but also failure;

On 2013-11-13, at 下午12:02, mateor notifications@github.com wrote:

On 11/12/2013 07:57 PM, chenjunqiang wrote:

Do have some way to return a fake phone model,brand,my team try many time, was failure.

— Reply to this email directly or view it on GitHub https://github.com/OpenPDroid/platform_frameworks_base/issues/15#issuecomment-28355503.

Let me look at this, I will get back to you on it. — Reply to this email directly or view it on GitHub.

mateor commented 11 years ago

I thought I had seen some one take a stab at this, but I cannot find it. Those are found in Build as MANUFACTURER and MODEL: http://developer.android.com/reference/android/os/Build.html. They can probably be intercepted in the same way we other things.

My first steps would be to add an entry to PrivacyPersistenceAdapter and PrivacySettings and see what happens.

what did you original attempts look like?

chenjunqiang commented 11 years ago

When my team try to change the Build.prop i also find one which may be can help me. link address:https://github.com/nathanpc/Build.prop-Editor

But this project have the problem, When the APP change the Build.prop file.the phone need to reboot to become effective.

I hope we can avoid to reboot to change it;

mateor commented 11 years ago

I have not had much cause to change device and model. But a developer I know, @DizzyDen has a program called IMEI-Generator that allows device ID changes. Maybe check his XDA thread here

chenjunqiang commented 11 years ago

got it, but we already know how to change this. but thank you, i will contact him later. 在 2013年11月19日 上午6:37,"mateor" notifications@github.com写道:

I have not had much cause to change device and model. But a developer I know, @DizzyDen https://github.com/DizzyDen has a program called IMEI-Generator that allows device ID changes. Maybe check his XDA thread here http://forum.xda-developers.com/showthread.php?t=1103766

— Reply to this email directly or view it on GitHubhttps://github.com/OpenPDroid/platform_frameworks_base/issues/15#issuecomment-28745481 .

mateor commented 11 years ago

Just so I don't worry something has been lost in translation, let me make clear that this program also changes the device model like you were asking.

chenjunqiang commented 11 years ago

There are must be something mistake, I just saying I know how to change imei,not the device model.

And you provider the @DizzyDen ,i will contact him whether he know how to change the device model

At last, If i know how to change, i will told you.To change device model before reboot which it's a hard work,haha

On 2013-11-19, at 上午6:42, mateor notifications@github.com wrote:

Just so I don't worry something has been lost in translation, let me make clear that this program also changes the device model like you were asking.

— Reply to this email directly or view it on GitHub.