After frameworkh is compiled for Android, the android icon remains on the boot and the OS cannot be fully accessed. Solution

Source: Internet
Author: User

Recently, I was looking at the source code in frameworks. I wanted to change it to see the effect. I didn't expect the simulator to run after the change.

First, we declare that I have successfully pushed Android 4.0.3 plugin and launcher. odex.

Now I am

Frameworks/base/policy/src/COM/Android/Internal/policy/impl/lockscreen. Java

Frameworks/base/CORE/Java/COM/Android/Internal/widget/multiwaveview. Java

A bit of log is added, in fact, the corresponding output coordinates and other information during unlocking,

We tried two methods:

1. Make framework
Make Snod

2.mm in framework/base
ADB push framework. jar and framework. odex to system/framework/

The result is that when the simulator is started, the android text is not displayed when it is started, and the following information is continuously printed in ddms:

07-30 06:50:52. 762: I/servicemanager (30): Service 'Media. audio_policy 'died
07-30 06:50:52. 762: I/servicemanager (30): Service 'Media. audio_flinger 'died
07-30 06:50:52. 762: I/servicemanager (30): Service 'Media. player' died
07-30 06:50:52. 762: I/servicemanager (30): Service 'Media. cama' died
07-30 06:50:52. 822: I/netd (383): netd 1.0 starting
07-30 06:50:52. 842: E/netd (383): Unable to bind netlink socket: no such file or directory
07-30 06:50:52. 842: E/netd (383): Unable to open quota2 logging socket
07-30 06:50:53. 253: I/(381): servicemanager: 0xf958
07-30 06:50:53. 253: I/audioflinger (381): loaded primary audio interface from legacy audio HW Hal (audio)
07-30 06:50:53. 253: I/audioflinger (381): Using 'legacy audio HW Hal '(audio. Primary) as the primary audio interface
07-30 06:50:53. 253: D/audiohardwareinterface (381): setmode (normal)
07-30 06:50:53. 253: I/cameraservice (381): cameraservice started (pid = 381)
07-30 06:50:53. 262: D/emulatedcamera_qemuclient (381): emulated camera list:
07-30 06:50:53. 262: D/emulatedcamera_fakecamera (381): Initialize: fake camera is facing back
07-30 06:50:53. 262: V/emulatedcamera_factory (381): 1 cameras are being emulated. Fake camera ID is 0
07-30 06:50:53. 272: I/audioflinger (381): audioflinger's thread 0x10fb0 ready to run
07-30 06:50:53. 272: W/audioflinger (381): thread audioout_1 cannot connect to the Power Manager Service
07-30 06:50:53. 272: I/audiopolicyservice (381): loaded audio policy from legacy audio policy Hal (audio_policy)
07-30 06:50:56. 022: D/androidruntime (393): >>>>>> androidruntime start com. Android. Internal. OS. zygoteinit <
07-30 06:50:56. 022: D/androidruntime (393): checkjni is on
07-30 06:50:56. 042: I/dalvikvm (393): dexopt: Mismatch Dep signature for '/system/framework. odex'
07-30 06:50:56. 042: E/dalvikvm (393):/system/framework/Android. Policy. Jar odex has stale Dependencies
07-30 06:50:56. 042: I/dalvikvm (393): Zip is good, but no classes. Dex inside, and no valid. odex file in the same directory
07-30 06:50:56. 042: D/dalvikvm (393): unable to process classpath element '/system/framework/Android. Policy. jar'
07-30 06:50:56. 042: I/dalvikvm (393): dexopt: Some deps went away
07-30 06:50:56. 042: E/dalvikvm (393):/system/framework/services. Jar odex has stale Dependencies
07-30 06:50:56. 042: I/dalvikvm (393): Zip is good, but no classes. Dex inside, and no valid. odex file in the same directory
07-30 06:50:56. 042: D/dalvikvm (393): unable to process classpath element '/system/framework/services. jar'
07-30 06:50:56. 042: I/dalvikvm (393): dexopt: Mismatch Dep signature for '/system/framework. odex'
07-30 06:50:56. 042: E/dalvikvm (393):/system/framework/apache-xml.jar odex has stale Dependencies
07-30 06:50:56. 042: I/dalvikvm (393): Zip is good, but no classes. Dex inside, and no valid. odex file in the same directory
07-30 06:50:56. 042: D/dalvikvm (393): unable to process classpath element '/system/framework/apache-xml.jar'
07-30 06:50:56. 042: I/dalvikvm (393): dexopt: Mismatch Dep signature for '/system/framework. odex'
07-30 06:50:56. 042: E/dalvikvm (393):/system/framework/filterfw. Jar odex has stale Dependencies
07-30 06:50:56. 042: I/dalvikvm (393): Zip is good, but no classes. Dex inside, and no valid. odex file in the same directory
07-30 06:50:56. 042: D/dalvikvm (393): unable to process classpath element '/system/framework/filterfw. jar'
07-30 06:50:56. 682: E/jnihelp (393): Native registration unable to find class 'com/Android/Server/watchdog ', aborting

07-30 06:50:56. 682: A/libc (393): fatal signal 11 (SIGSEGV) at 0 xdeadbaad (code = 1)

Later, I checked build/CORE/Main. mk according to the prompts and found a droidcore command,

After compiling with make droidcore, the simulator runs successfully, prints the modified log, and then analyzes the droidcore carefully:

755. Phony: droidcore

756 droidcore: files \
757 systemimage \
758 $ (installed_bootimage_target )\
759 $ (installed_recoveryimage_target )\
760 $ (installed_userdataimage_target )\
761 $ (installed_files_file)
I found that systemimage was executed at the beginning, so I tried to compile it with make systemimage:
Modify the source code in the framework, mm in the framework/base, return to the source code root directory, make systemimage, start the simulator, and the modification effect is displayed successfully.
PS:
1. It seems that the execution of make Snod (systemimage no dependence) is not good. It seems that dependence must be compiled.
2. After make systemimage, you must disable the simulator and restart it. Execute ADB shell stop, and neither can ADB shell start.
It takes about 10 minutes to compile the code.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.