Skip to content

Instantly share code, notes, and snippets.

@zhuowei
Last active December 19, 2015 01:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zhuowei/5873367 to your computer and use it in GitHub Desktop.
Save zhuowei/5873367 to your computer and use it in GitHub Desktop.
How to enable Debug output in Google Quick Search Box

How to enable Debug output in Google Quick Search Box

Edit: Automated app to enable this is done: https://github.com/zhuowei/UnleashTheGoogle

Google Quick Search Box contains some debug features that can only be enabled through a special debug option. Annoyingly, the Google search team decided to use a custom ProtoBuf based shared preferences file instead of the standard XML based preferences. We can still edit it though!

Here's how you do it. 1: get a rooted device. 2: pull the /data/data/com.google.android.googlequicksearchbox/app_shared_prefs/StartupSettings.bin file to a desktop computer.

To do that:

First, get ADB access (use the search engine of your choice to figure out this). Then run:

adb shell` su cp /data/data/com.google.android.googlequicksearchbox/app_shared_prefs/StartupSettings.bin /sdcard/` exit` exit` adb pull /sdcard/StartupSettings.bin

Now you should have a StartupSettings.bin file. Then, edit the file with a hex editor. You should see something like this.

00000000   0A 14 0A 10  73 65 74 74  69 6E 67 73  5F 76 65 72  ....settings_ver
00000010   73 69 6F 6E  20 06 0A 35  0A 31 75 73  65 72 5F 63  sion ..5.1user_c
00000020   61 6E 5F 72  75 6E 5F 74  68 65 5F 67  6F 6F 67 6C  an_run_the_googl
00000030   65 5F 61 6E  64 72 65 77  77 69 67 67  69 6E 61 6C  e_ 
00000040   74 40 67 6D  61 69 6C 2E  63 6F 6D 20  01 0A 22 0A              ..".
00000050   1E 61 6E 79  5F 61 63 63  6F 75 6E 74  5F 63 61 6E  .any_account_can
00000060   5F 72 75 6E  5F 74 68 65  5F 67 6F 6F  67 6C 65 20  _run_the_google
00000070   01 0A 17 0A  10 6C 61 73  74 5F 72 75  6E 5F 76 65  .....last_run_ve
00000080   72 73 69 6F  6E 20 9C D1  92 64 0A 40  0A 37 6C 61  rsion ...d.@.7la
00000090   73 74 5F 63  6F 6E 66 69  67 75 72 61  74 69 6F 6E  st_configuration
000000A0   5F 73 61 76  65 64 5F 74  69 6D 65 5F  61 6E 64 72  _saved_time_ 
000000B0   65 77 77 69  67 67 69 6E  61 6C 74 40  67 6D 61 69                  
000000C0   6C 2E 63 6F  6D 28 E6 94  89 B2 F2 27  0A 18 0A 14        (.....'....
000000D0   64 65 62 75  67 5F 66 65  61 74 75 72  65 73 5F 6C  debug_features_l
000000E0   65 76 65 6C  20 00 0A 2B  0A 0E 67 6F  6F 67 6C 65  evel ..+..google
000000F0   5F 61 63 63  6F 75 6E 74  32 19 61 6E  64 72 65 77  _account2.andrew
00000100   77 69 67 67  69 6E 61 6C  74 40 67 6D  61 69 6C 2E  wigginalt@gmail.
00000110   63 6F 6D                                            com
00000120
00000130
00000140
00000150
00000160
---  StartupSettings.bin       --0x0/0x113-------------------------------------

Position the cursor after the space in debug_features_level, and see the highlight in the left panel. It should be 00.

(If you look at the hex view, the byte should be preceded by 6C 65 76 65 6C 20 ("level " in hex)

Change the 00 to 02. (1 = dogfood enable; 2 = team and dogfood enable)

Save, and then push the modified file via ADB:

adb push StartupSettings.bin /sdcard/
adb shell
su
cp /sdcard/StartupSettings.bin /data/data/com.google.android.googlequicksearchbox/app_shared_prefs/
exit
exit

Finally, force close the search box and you should get debug options.

If you want, I can make a program to do this automatically.

@archon810
Copy link

What does the debug mode do exactly? Any experimental features?

Edit: nvm, saw the pics on G+.

@zhuowei
Copy link
Author

zhuowei commented Jun 27, 2013

@archon810 I don't have Google Now enabled, so I assume there will be even more debug features. I'm working on an app to do this as I speak. You'll still need root though.

@mralext20
Copy link

i don't have root... i'm missing out on alot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment