The project is coming to an end. Today, we just need to initialize the default values in the system. After a Google review, we sometimes have to be an expert.
1 Boot Image:
Android-logo-mask.png
Android-logo-shine.png
The two pictures are the same as the previous one.
./Out/target/common/obj/java_libraries/android_stubs_current_intermediates/classes/assets/images/android-logo-shine.png
./Frameworks/base/CORE/RES/assets/images/android-logo-shine.png
Note: If the source code does not have make, you can directly change the images in frameworks.
Then make directly. Otherwise, make must be completely changed. Make cannot only make firmwar.
2 default start wallpaper location:
Default_wallpaper.jpg
./Out/target/common/obj/java_libraries/android_stubs_current_intermediates/classes/RES/drawable/default_wallpaper.jpg
./Frameworks/base/CORE/RES/drawable/default_wallpaper.jpg
Note: This setting is the same as above. Neither of these can change the file name.
3. Modify the text kernel of the PC machine to delete the hardware.
Drivers/USB/gadget/f_mass_storage.c
FSG-> vendor = "xxxxxxxxxxxxx ";
4. Change the volume label:
Bootable/recovery/etc/init. RC
Setprop uservolumelabel "xxxxxxxxxxxxx"
Directly package
5. Modify the screen lock:
(1)
Frameworks/base/packages/settingsprovider/RES/values/defaults. xml
<Integer name = "def_screen_off_timeout"> 60000 </Integer>
Change 60000 to the desired time. If the lock is not set to-1
(2)
Frameworks/policies/base/phone/COM/Android/Internal/policy/impl/keyguardviewmediator. Java
Private Boolean mexternallyenabled = true;
Change it to false.
In this way, the changes will no longer enter the sleep state.
6. Initialization language:
Refer to the next article
7. Set the initialization homepage:
Package/APP/Browser/RES/values/string. xml
655 rows
It should be followed by bookmarks.
8. Set the brightness to 0 ~ 255:
Frameworks/base/packages/settingsprovider/RES/values/defaults. xml
Def_screen_brightness --> the value initialization seems to be more than 100
9 volume:
Frameworks/base/Media/Java/Android/Media/audiomanager. Java
Array default_stream_volume 4th values (maximum I set to 30, but the difference is still 2 to the maximum -- the default is 11
We recommend that you set all the values in the array to the maximum value)
MM frameworks/base
Audioservice. Java defines the maximum volume level of each audio stream:
/** @hide Maximum volume index values for audio streams */ private int[] MAX_STREAM_VOLUME = new int[] { 5, // STREAM_VOICE_CALL 7, // STREAM_SYSTEM 7, // STREAM_RING 15, // STREAM_MUSIC 7, // STREAM_ALARM 7, // STREAM_NOTIFICATION 15, // STREAM_BLUETOOTH_SCO 7, // STREAM_SYSTEM_ENFORCED 15, // STREAM_DTMF 15 // STREAM_TTS };
10. Set the Google account. The upper left corner of the page indicates "setting rk2818sdk". You must change it to "setting W9 ":
Line 3 of the default. Prop file in out \ target \ product \ sdkdemo \ Root
Ro. Product. Model = rk2818sdk changed to RO. Product. Model = W9
11 The recording is not displayed in hours. Requirements added:
Packages \ apps \ soundrecorder \ SRC \ com \ Android \ soundrecorder
(1) soundrecorder. Java: Private void updatetimerview ()
Set string timestr = string. Format (mtimerformat, time/60, time % 60 );
Change to: long hour = Time/3600;
String timestr = string. Format (mtimerformat, hour, (time-hour * 3600)/60, time % 60 );
(2) Change strings. XML in \ res \ values:
<String name = "timer_format"> <xliff: G id = "format"> % 02d: % 02d: % 02d </xliff: G> </string>
12 remove Bluetooth:
(Main interface-> Add folder-> Bluetooth stored ed)
Ic_launcher_folder_rjth.png (72*72 ):
In \ packages \ apps \ Bluetooth \ res \ drawable-hdpi
Solution: delete th.apk under \ out \ target \ product \ sdkdemo \ System \ app.
13 pictures when charging screen lock:
Frameworks \ base \ core \ res \ drawable-hdpi: ic_lock_idle_charging.png
14 when the screen lock is removed, the charging percentage is displayed as follows:
Content and brackets in lockscreen_plugged_in of strings. XML in frameworks \ base \ core \ res \ values-ZH-RCN !!
15 remove the dynamic desktop background option:
<Service> of androidmanifest. XML in packages \ wallpapers \ basic, such as comment out the following:
<Service
Android: Label = "@ string/wallpaper_galaxy"
Android: Name = "com. Android. wallpaper. Galaxy. galaxywallpaper"
Android: Permission = "android. Permission. bind_wallpaper">
<Intent-filter>
<Action Android: Name = "android. Service. wallpaper. wallpaperservice"/>
</Intent-filter>
<Meta-data Android: Name = "android. Service. Wallpaper" Android: Resource = "@ XML/Galaxy"/>
</Srvice>
16. Change the version number:
Build/CORE/makefile
79 rows
Rk_ver: = xxx
17. Change the interface Layout
Location: package/APP/launcher2/RES/XML/default_workspace.xml
Note: When you click any APK in the ADB shell
I/activitymanagers (728): starting activity: intent {act = android. intent. action. main cat = [android. intent. category. launcher] flg = 0x10200000 CMP = com. estrongs. android. POP /. view. fileexploreractivity bnds = [294,373] [393,478]}
I/windowmanager (728): Setting rotation to 1, animflags = 0
You can find the package name/class name before/in the blue section --> This is required in default_workspace.xml.
Launcher: packagename = "com. Android. Browser"
Launcher: classname = "com. Android. browser. browseractivity"
18 how to put PDF files on the desktop
The customer asked to place their own PDF help documents on the desktop so that the guests could click to view them directly.
String urlstring = "/system/APP/nvsbl p4dv2 English manual.pdf ";
Intent intent = new intent ();
Intent. setaction (Android. content. Intent. action_view );
Intent. setdataandtype (URI. fromfile (new file (urlstring), "application/pdf ");
Startactivity (intent );
Finish ();
Explanation:
First, put the PDF document under out/target/product/sdkdemo/system/app.
The fixed address is given urlstring, using intent
Intent. setaction (Android. content. Intent. action_view); Start View
Intent. setdataandtype (URI. fromfile (new file (urlstring), "application/pdf ");
Application/pdf can be used to specify other formats, including audio, video, images, and so on. However, you have not tried it. You can try it if necessary.
Note: This method is not suitable for storing only some images, but it can be packaged if the file to be placed is large.
The system. imgfile is very large, that is, it occupies the system memory -----> so it is not recommended !!!!!!!!!!!
19. after finding that the pin unlock page appears for 5 seconds, it will automatically enter the sleep state and cannot be unlocked again. Current solution:
Modify the file frameworks \ Policies \ base \ phone \ com \ Android \ internal \ Policy \ impl \ keyguardviewmediator. Java
Set the following line:
Protected static final int awake_interval_default_ms = 5000;
To:
Protected static final int awake_interval_default_ms = 1000*60*5;