永久隐藏Android的状态栏状态栏、Android

2023-09-12 08:26:17 作者:屁股长痘痘

我试图隐藏在Android 4.4设备上的系统状态栏。这是一个信息亭模式在我的应用程序将是有史以来在设备上运行的唯一的应用程序。对于现在的目标设备是2013年的Nexus 7。

I'm trying to hide the system Status Bar on an Android 4.4 device. This is for a kiosk-mode where my app will be the only app ever run on the device. The target device for now is a 2013 Nexus 7.

该设备是植根,我已经能够完全去除底部导航栏从的这个帖子。

The device is rooted, and I've been able to completely remove the bottom Navigation Bar with some info from this post.

有关顶部状态栏,一切我都试过只能暂时隐藏了吧。如果我的用户动作下来在屏幕顶部,状态栏会重新出现。我不想让他们看到的时候,得到的设置,甚至看到通知。

For the top Status Bar, everything I have tried only hides the bar temporarily. If my users motion down at the top of the screen, the status bar reappears. I don't want to allow them to see the time, get to settings or even see notifications.

帖子,我发现,已经尝试过:

Posts I've found and already tried:

隐藏系统栏在片中 Permanently在活动隐藏导航栏 在Android 隐藏状态栏 在Android的 禁用/隐藏状态栏 Hide System Bar in Tablets Permanently hide navigation bar on activity Hide status bar on android Disable/Hide status bar in Android

有什么建议?

在理想情况下,我喜欢能够编辑build.prop要做到这一点,因为我已经在做,对于导航栏,并能同时做到这一点。我想不必建立自己的机器人形象。

Ideally, I'd love to be able to edit build.prop to do this, since I'm already doing that for the navigation bar, and could do this at the same time. I'm trying to not have to build my own android image.

更新:

在一些更多的工作,这似乎在Android上的确切版本,或者其运行的设备有点依赖。

After some more work, this seems to depend somewhat on the exact build of android, or the device its running on.

一些设备,如Nexus的系列中,我一直在与允许用户刷卡,使酒吧重新出现。

Some devices, such as the Nexus series I've been working with allow the user to swipe to make the bar reappear.

不过,我最近尝试了这对Verizon的Eclipse和酒吧没有再出现,这正是我所期待的。

However, I've recently tried this on a Verizon Eclipse, and the bar does not reappear, which is what I was looking for.

我还在寻找一个更好的解决方案为目标的所有设备,但它可能会回落到创造我自己构建Android的。

I'm still looking for a better solution to target all devices, but it will probably come down to creating my own build of android.

推荐答案

我也尝试@gonglong提供的解决办法,但我却高兴不起来了闪光灯的用户界面,因为结果作为解决办法踢

I did try the workaround provided by @gonglong, but I wasn't happy with the result because of a flash in the UI as the workaround kicked in.

相反,我能够这样做,因为根:

Instead, I was able to do this as root:

settings put secure user_setup_complete 0

我觉得一个正常的设备上,这会导致初始设备安装开始,但是在我的设备,我已经删除了APK的系统,这样不会发生。

I think on a normal device, this would cause the initial device setup to start, but on my devices, I've removed that APK from system so that doesn't happen.

这是不记录任何地方我能找到,但有一个很好的效果,在顶部设置UI不能拖累。通知区域仍可拖累。

This isn't documented anywhere I can find, but has a nice effect, where the top settings UI can't be dragged down. The notifications area can still be dragged down.

这是我发现有用的另一个背景是:

Another setting that I found useful was:

settings put global device_provisioned 0

这个隐藏Power菜单,这是我的应用程序额外的奖励的飞行模式和静音模式的选择。

This hides the Airplane Mode and Silent Mode options from the Power menu, which is an added bonus for my application.

可能有更多的副作用,但我还没有找到任何这对我很重要。

There might be more side effects, but I've yet to find any that matter to me.

这个名单是从一台Nexus 7 2013 LTE运行全新的Andr​​oid 4.4.3(KTU84L)。方括号中的数字是值当我把数据库文件,这是基本的设置设备的设置,使开发者/ USB后,却使得在设置其他任何更改之前

This list was taken from a Nexus 7 2013 LTE running brand new Android 4.4.3 (KTU84L). The number in square brackets is the value when I pulled the db file, which was after basic setup device setup and enabling developer/USB, but before making any other changes in settings

该文件被发现在数据/数据​​/ com.android.providers.settings /数据库/ settings.db

注:某些URL需要增加一个额外的空格字符绕过SO过滤器

Note: Some URLS required adding an extra space character to bypass SO filters

volume_music [11] volume_ring [5] volume_system [7] volume_voice [4] volume_alarm [6] volume_notification [5] volume_bluetooth_sco [7] mode_ringer_streams_affected [174] mute_streams_affected [46] vibrate_when_ringing [0] dim_screen [1] dtmf_tone_type [0] hearing_aid [0] tty_mode [0] screen_brightness [87] screen_brightness_mode [1] window_animation_scale [1.0] transition_animation_scale [1.0] accelerometer_rotation [1] haptic_feedback_enabled [1] notification_light_pulse [1] dtmf_tone [1] sound_effects_enabled [1] lockscreen_sounds_enabled [1] pointer_speed [0] alarm_alert [内容:// /内部/音频/媒体/ 11] notification_sound [内容:// /内部/音频/媒体/ 27] 在铃声[内容:// /内部/音频/媒体/ 35] next_alarm_formatted [] radio.data.stall.recovery.action [0] screen_off_timeout [30000] volume_music [11] volume_ring [5] volume_system [7] volume_voice [4] volume_alarm [6] volume_notification [5] volume_bluetooth_sco [7] mode_ringer_streams_affected [174] mute_streams_affected [46] vibrate_when_ringing [0] dim_screen [1] dtmf_tone_type [0] hearing_aid [0] tty_mode [0] screen_brightness [87] screen_brightness_mode [1] window_animation_scale [1.0] transition_animation_scale [1.0] accelerometer_rotation [1] haptic_feedback_enabled [1] notification_light_pulse [1] dtmf_tone [1] sound_effects_enabled [1] lockscreen_sounds_enabled [1] pointer_speed [0] alarm_alert [content://media/internal/audio/media/11] notification_sound [content://media/internal/audio/media/27] ringtone [content://media/internal/audio/media/35] next_alarm_formatted [] radio.data.stall.recovery.action [0] screen_off_timeout [30000] airplane_mode_on [0] airplane_mode_radios [单元,蓝牙,WiFi,NFC,WIMAX] airplane_mode_toggleable_radios [蓝牙,WiFi,NFC] auto_time [1] auto_time_zon​​e [1] stay_on_while_plugged_in [0] wifi_sleep_policy [2] mode_ringer [2] package_verifier_enable [1] wifi_networks_available_notification_on [1] bluetooth_on [0] cdma_cell_broadcast_sms [1] data_roaming [0] mobile_data [1] netstats_enabled [1] install_non_market_​​apps [0] usb_mass_storage_enabled [1] wifi_max_dhcp_retry_count [9] wifi_display_on [0] lock_sound [/system/media/audio/ui/Lock.ogg] unlock_sound [/system/media/audio/ui/Unlock.ogg] power_sounds_enabled [1] low_battery_sound [/system/media/audio/ui/LowBattery.ogg] dock_sounds_enabled [0] desk_dock_sound [/system/media/audio/ui/Dock.ogg] desk_undock_sound [/system/media/audio/ui/Undock.ogg] car_dock_sound [/system/media/audio/ui/Dock.ogg] car_undock_sound [/system/media/audio/ui/Undock.ogg] wireless_charging_started_sound [/system/media/audio/ui/WirelessChargingStarted.ogg] dock_audio_media_enabled [1] set_install_location [0] default_install_location [0] emergency_tone [0] call_auto_retry [0] preferred_network_mode [9] subscription_mode [1] low_battery_sound_timeout [3600000] wifi_watchdog_on [1] audio_safe_volume_state [1] send_action_app_error [1] web_autofill_query_url [HTTP:// android.clients.google.com/proxy/webautofill] sms_short_ codes_content_url [http://www.gstatic.com/android/config_update/07172013-sms-blacklist.txt] sms_short_ codes_metadata_url [http://www.gstatic.com/android/config_update/07172013-sms-metadata.txt] cert_pin_metadata_url [http://www.gstatic.com/android/config_update/10142013-metadata.txt] cert_pin_content_url [http://www.gstatic.com/android/config_update/10142013-pins.txt] wifi_on [1] assisted_gps_enabled [1] wifi_scan_always_enabled [1] device_provisioned [1] bugreport_in_power_menu [0] development_settings_enabled [1] adb_enabled [1] wifi_country_ code [美] airplane_mode_on [0] airplane_mode_radios [cell,bluetooth,wifi,nfc,wimax] airplane_mode_toggleable_radios [bluetooth,wifi,nfc] auto_time [1] auto_time_zone [1] stay_on_while_plugged_in [0] wifi_sleep_policy [2] mode_ringer [2] package_verifier_enable [1] wifi_networks_available_notification_on [1] bluetooth_on [0] cdma_cell_broadcast_sms [1] data_roaming [0] mobile_data [1] netstats_enabled [1] install_non_market_apps [0] usb_mass_storage_enabled [1] wifi_max_dhcp_retry_count [9] wifi_display_on [0] lock_sound [/system/media/audio/ui/Lock.ogg] unlock_sound [/system/media/audio/ui/Unlock.ogg] power_sounds_enabled [1] low_battery_sound [/system/media/audio/ui/LowBattery.ogg] dock_sounds_enabled [0] desk_dock_sound [/system/media/audio/ui/Dock.ogg] desk_undock_sound [/system/media/audio/ui/Undock.ogg] car_dock_sound [/system/media/audio/ui/Dock.ogg] car_undock_sound [/system/media/audio/ui/Undock.ogg] wireless_charging_started_sound [/system/media/audio/ui/WirelessChargingStarted.ogg] dock_audio_media_enabled [1] set_install_location [0] default_install_location [0] emergency_tone [0] call_auto_retry [0] preferred_network_mode [9] subscription_mode [1] low_battery_sound_timeout [3600000] wifi_watchdog_on [1] audio_safe_volume_state [1] send_action_app_error [1] web_autofill_query_url [http:// android.clients.google.com/proxy/webautofill] sms_short_codes_content_url [http://www.gstatic.com/android/config_update/07172013-sms-blacklist.txt] sms_short_codes_metadata_url [http://www.gstatic.com/android/config_update/07172013-sms-metadata.txt] cert_pin_metadata_url [http://www.gstatic.com/android/config_update/10142013-metadata.txt] cert_pin_content_url [http://www.gstatic.com/android/config_update/10142013-pins.txt] wifi_on [1] assisted_gps_enabled [1] wifi_scan_always_enabled [1] device_provisioned [1] bugreport_in_power_menu [0] development_settings_enabled [1] adb_enabled [1] wifi_country_code [us] wifi_watchdog_watch_list [GoogleGuest] mock_location [0] backup_enabled [0] backup_transport [com.google.android.backup / .BackupTransportService] mount_play_not_snd [1] mount_ums_autostart [0] mount_ums_prompt [1] mount_ums_notify_enabled [1] accessibility_script_injection [0] accessibility_web_content_key_bindings [0x13 = 0x01000100; 0×14 = 0x01010100; 0x15 = 0x02000001;为0x16 = 0x02010001; 0x200000013 = 0x02000601; 0x200000014 = 0x02010601; 0x200000015 = 0x03020101; 0x200000016 = 0x03010201; 0x200000023 = 0x02000301; 0x200000024 = 0x02010301; 0x200000037 = 0x03070201; 0x200000038 = 0x03000701:0x03010701:0x03020701] long_ press_timeout [500] touch_exploration_enabled [0] speak_password [0] accessibility_script_injection_url [https://ssl.gstatic.com/accessibility/javascript/android/AndroidVox_v1.js] lockscreen.disabled [0] screensaver_enabled [1] screensaver_activate_on_dock [1] screensaver_activate_on_sleep [0] screensaver_components [com.google.android.deskclock / com.android.deskclock.Screensaver] screensaver_default_component [com.google.android.deskclock / com.android.deskclock.Screensaver] accessibility_display_magnification_enabled [0] accessibility_display_magnification_scale [2.0] accessibility_display_magnification_auto_update [1] android_id [a0ef8b2a9ade982c] enabled_input_methods [com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME:com.google.android.googlequicksearchbox/com.google.android.voicesearch.ime.VoiceInputMethodService] input_methods_subtype_history [] selected_input_method_subtype [-1] selected_spell_checker [com.google.android.inputmethod.latin/com.android.inputmethod.latin.spellcheck.AndroidSpellCheckerService] selected_spell_checker_subtype [0] lock_screen_owner_info_enabled [0] voice_recognition_service [com.google.android.googlequicksearchbox/com.google.android.voicesearch.serviceapi.GoogleRecognitionService] default_input_method [com.google.android.inputmethod.latin / com.android.inputmethod.latin.LatinIME] enabled_print_services [com.google.android.apps.cloudprint/com.google.android.apps.cloudprint.printdialog.services.CloudPrintService:com.hp.android.printservice/com.hp.android.printservice.ServiceAndroidPrint] enabled_on_first_boot_system_print_services [com.google.android.apps.cloudprint/com.google.android.apps.cloudprint.printdialog.services.CloudPrintService:com.hp.android.printservice/com.hp.android.printservice.ServiceAndroidPrint] bluetooth_name [Nexus的7] masterLocationPackage prefixBlacklist [com.google,com.semaphoremobile.zagat.android] serial_blacklist [827864] 的Dropbox:data_app_anr [禁用] 的Dropbox:data_app_wtf [禁用] ssl_session_cache [文件] pubkey_blacklist [5f3ab33d55007054bc5e3e5553cd8d8465d77c61,783333c9687df63377efceddd82efa9101913e8e] facelock_liveliness_recognition_threshold [2.2] facelock_detection_threshold [0.0] 的Dropbox:data_app_crash [禁用] masterLocationPackage prefixWhitelist [com.google.android.gms] lockscreen.options [enable_facelock] facelock_max_center_movement [10.0] bluetooth_address [AC:22:0B:A5:AF:3D] bluetooth_addr_valid [1] config_update_certificate [截断的base64内容的] location_providers_allowed [全球定位系统,网络] allowed_geolocation_origins [ http://www.google.co.uk 的http:// www.google.com] locationPackage prefixBlacklist [] user_setup_complete [1] locationPackage prefixWhitelist [] last_setup_shown [eclair_1] wifi_watchdog_watch_list [GoogleGuest] mock_location [0] backup_enabled [0] backup_transport [com.google.android.backup/.BackupTransportService] mount_play_not_snd [1] mount_ums_autostart [0] mount_ums_prompt [1] mount_ums_notify_enabled [1] accessibility_script_injection [0] accessibility_web_content_key_bindings [0x13=0x01000100; 0x14=0x01010100; 0x15=0x02000001; 0x16=0x02010001; 0x200000013=0x02000601; 0x200000014=0x02010601; 0x200000015=0x03020101; 0x200000016=0x03010201; 0x200000023=0x02000301; 0x200000024=0x02010301; 0x200000037=0x03070201; 0x200000038=0x03000701:0x03010701:0x03020701;] long_press_timeout [500] touch_exploration_enabled [0] speak_password [0] accessibility_script_injection_url [https://ssl.gstatic.com/accessibility/javascript/android/AndroidVox_v1.js] lockscreen.disabled [0] screensaver_enabled [1] screensaver_activate_on_dock [1] screensaver_activate_on_sleep [0] screensaver_components [com.google.android.deskclock/com.android.deskclock.Screensaver] screensaver_default_component [com.google.android.deskclock/com.android.deskclock.Screensaver] accessibility_display_magnification_enabled [0] accessibility_display_magnification_scale [2.0] accessibility_display_magnification_auto_update [1] android_id [a0ef8b2a9ade982c] enabled_input_methods [com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME:com.google.android.googlequicksearchbox/com.google.android.voicesearch.ime.VoiceInputMethodService] input_methods_subtype_history [] selected_input_method_subtype [-1] selected_spell_checker [com.google.android.inputmethod.latin/com.android.inputmethod.latin.spellcheck.AndroidSpellCheckerService] selected_spell_checker_subtype [0] lock_screen_owner_info_enabled [0] voice_recognition_service [com.google.android.googlequicksearchbox/com.google.android.voicesearch.serviceapi.GoogleRecognitionService] default_input_method [com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME] enabled_print_services [com.google.android.apps.cloudprint/com.google.android.apps.cloudprint.printdialog.services.CloudPrintService:com.hp.android.printservice/com.hp.android.printservice.ServiceAndroidPrint] enabled_on_first_boot_system_print_services [com.google.android.apps.cloudprint/com.google.android.apps.cloudprint.printdialog.services.CloudPrintService:com.hp.android.printservice/com.hp.android.printservice.ServiceAndroidPrint] bluetooth_name [Nexus 7] masterLocationPackagePrefixBlacklist [com.google.,com.semaphoremobile.zagat.android] serial_blacklist [827,864] dropbox:data_app_anr [disabled] dropbox:data_app_wtf [disabled] ssl_session_cache [file] pubkey_blacklist [5f3ab33d55007054bc5e3e5553cd8d8465d77c61,783333c9687df63377efceddd82efa9101913e8e] facelock_liveliness_recognition_threshold [2.2] facelock_detection_threshold [0.0] dropbox:data_app_crash [disabled] masterLocationPackagePrefixWhitelist [com.google.android.gms] lockscreen.options [enable_facelock] facelock_max_center_movement [10.0] bluetooth_address [AC:22:0B:A5:AF:3D] bluetooth_addr_valid [1] config_update_certificate [ truncated base64 content ] location_providers_allowed [gps,network] allowed_geolocation_origins [http://www.google.co.uk http:// www.google.com] locationPackagePrefixBlacklist [] user_setup_complete [1] locationPackagePrefixWhitelist [] last_setup_shown [eclair_1]