简体   繁体   中英

Get current wallpaper absolute path?

How do we get a current wallpaper absolute path

On Android 4.2 the wallpaper is located at:

/data/system/users/0/wallpaper

Replace the 0 with your user id (take a look in /data/system/users ).

Make sure you are looking in the phone's root directory to start, NOT on the SDcard. Once you get to the right subdirectory the wallpaper file will just be called "wallpaper" and until you copy it to the SDcard and rename it to "YourName.jpg" the picture viewers may not recognize it as an image file.

I tried both ES File Explorer and Root Explorer (download from Marketplace) to copy the file from the phone root area., ie phone ROOT/data/data/com.android.settings/files/wallpaper.. .it's the lowest level of the phone storage itself, similar to "computer" in windows.

Probably the File Explorer on your phone won't let you access the root (your phone shouldn't need ROOT privileges just to copy the file)

use wallpaperManager and call getWallpaperInfo . This will return you a wallpaperinfo object which contains all the info about the wallpaper. Read more about the wallpapernfo here.

I would imagine that the current wallpaper will be stored in a private system folder.

On Android Oreo and using one of the provided wallpapers from the system, the wallpaper I wanted wasn't on the path mentioned by the accepted answer but I found the apk that had it on a system folder.

I got it from the path: system/framework/framework-res.apk I had to open the apk and extract: /res/drawable-nodpi-v4/default_wallpaper.png.

Android Oreo is not in the place from other comments

Internal Storage/Android/data/com.android.systemui/files/backupwallpapers

I just had to find a wallpaper that I deleted from my downloads folder.

Download the apk file ...

go to this path...you can find it here

Download\\com.amber.launcher.skin.samsung.galaxy_2018-08-24\\res\\drawable-nodpi-v4\\bg_wallpaper.jpg

On Android 4.2 the wallpaper is located at:

/data/system/users/0/wallpaper

Replace the 0 with your user id (take a look in /data/system/users).

Make sure you are looking in the phone's root directory to start, NOT on the SDcard. Once you get to the right subdirectory the wallpaper file will just be called "wallpaper" and until you copy it to the SDcard and rename it to "YourName.jpg" the picture viewers may not recognize it as an image file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM