Search code examples
android

How do I push a wallpaper to android?


I am in an operating systems course that centers around hacking up android phones. I want to set my friend's wallpaper to something amusing but benign. Sadly, our test phones does not have wireless drivers on them. Any idea of how I can adb push something in?

Is there a wallpapers directory I can place things in, for instance?


Solution

  • You could place it on the phones external storage:

    Environment.getExternalStorageDirectory()
    

    or you could create your own directory on the external storage:

                    File root = new File(Environment
                            .getExternalStorageDirectory()
                            + File.separator + "MyAppName" + File.separator);
                    root.mkdirs();