🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.mobile.android
Article #713

Re: Can we programmatically get package names of icons in a homescreen folder?

#713
From: Hank Rogers
Date: Thu, 19 Nov 2026 23:49
167 lines
13420 bytes
Maria Sophia wrote on 11/19/2026 5:09 PM:
> Maria Sophia wrote:
>> But I got what I needed (although it took, oh, an hour or so).
> 
> It always takes longer to write it up so anyone else can do it
> than it takes to hack out the solution, but here's the writeup.
> 
> This is so that every thread adds value to the group knowledge.
> 
> Note I tried first to do it purely on Android, but failed.
> So that's why this is a Windows-only solution (over Wi-Fi).
> 
> How to extract app titles & package names from an Android homescreen folder
> (over Wi-Fi/USB using Nova Launcher & Windows commands & coreutils).
> 
> Dependencies:
>   a. Android Debug Bridge (ADB) is installed and accessible through %PATH%.
>   b. GNU Coreutils are installed and accessible through %PATH%.
>   c. SQLite is available at the specified Android SDK platform-tools location.
> I originally used the graphical user interface but found a CLI method instead:
>   d. DB Browser for SQLite is available for graphical use, but it is optional.
> 
> 1. Create a Nova Launcher backup on Android.
>     NovaSettings > Backup & Restore > Backup > 2026-11-19_12-57.novabackup
> 
> 2. Copy the backup file from Android to Windows.
>      C:\> where pwd
>            => C:\Program Files\coreutils\bin\pwd.exe
>      C:\> pwd
>            => C:\app\editor\android\scrcpy
>      C:\> mkdir nova
>      C:\> cd nova
>      C:\> adb pull /storage/emulated/0/0000/bck/nova_backup/2026-11-19_12-57.novabackup
>           => /storage/emulated/0/0000/bck/nova_backup/2026-...
>           => 0 skipped. 4.1 MB/s (6564861 bytes in 1.536s)
> 
> 3. Rename the backup file to a zip file.
>      C:\> rename 2026-11-19_12-57.novabackup backup.zip
> 
> 4. Extract the backup.zip to obtain the SQL database & supporting files.
>      C:\> powershell -NoProfile -Command "Expand-Archive -LiteralPath backup.zip -DestinationPath backup_extracted -Force"
> 
> 
> 5. Locate the nova.db SQLite database file.
>      C:\> dir backup_extracted
>            11/19/2026  12:58 PM         7,688,192 nova.db
>            11/19/2026  12:58 PM             6,455 nova.xml
>            11/19/2026  12:58 PM             4,818 supportDetails.txt
> 
> Steps 6 to 8 use the optional GUI called "DB Browser for SQLite" to open the
> database and to run the SQL query. Those steps were used when I was honing
> the steps, so at this point, the GUI is vestigial. To do everything from
> the command line, skip steps 6 to 8 and go directly to step 9 which runs
> the honed query using the command-line sqlite3.exe instead of the GUI.
>   
> 6. OPTIONAL: Open nova.db with DB Browser for SQLite.
>      C:\> "C:\app\editor\sql\db4s\App\SQLiteDatabaseBrowser64\DB Browser for SQLite.exe" C:\app\editor\android\scrcpy\nova\backup_extracted\nova.db
> 
> 7. OPTIONAL: Run the SQL query to retrieve contents of the weather folder.
>     a. Open the 'Execute SQL' tab in the DB Browswer for SQLite GUI
>     b. Paste the code below into that tab & press the "run" button
>     c. The result will be the desired output in tabular form
> 
> 8. OPTIONAL: This is the code:
>    /*
>    Pulls all items stored inside the "weather" folder (container = 2921)
>    from Nova Launcher favorites table and extracts each app package name.
>    */
>     SELECT
>         f._id AS item_id,              -- Unique row id of the item in favorites
>         f.title AS app_title,          -- Display name shown on the homescreen or folder
>         CASE
>             -- Use explicit icon package if populated
>             WHEN f.iconPackage IS NOT NULL AND f.iconPackage != '' THEN f.iconPackage
>     
>             -- Otherwise read package name between component= and / in intent
>             WHEN INSTR(f.intent, 'component=') > 0 THEN
>                 SUBSTR(
>                     -- Slice from right after component= (10 chars) to end of string
>                     SUBSTR(f.intent, INSTR(f.intent, 'component=') + 10),
>                     1,
>                     -- Take characters up to the first /
>                     INSTR(SUBSTR(f.intent, INSTR(f.intent, 'component=') + 10), '/') - 1
>                 )
>             ELSE ''                    -- Fallback when no package name is found
>         END AS package_name,
>         f.intent                       -- Raw Android intent string for reference
>     FROM favorites f
>     WHERE f.container = 2921           -- 2921 is the _id of the weather folder
>     ORDER BY f.rank, f._id;             -- Keep folder item order
>     /* end */
>     
> 
> 9. Export SQL results to output.txt using sqlite3.exe.
>     C:\> where sqlite3
>           => C:\app\editor\android\sdk\platform-tools\sqlite3.exe
>     C:\> C:\app\editor\android\sdk\platform-tools\sqlite3.exe --version
>           => 3.32.2
>     C:\> sqlite3.exe -header -cmd ".mode tabs" "C:\app\editor\android\scrcpy\nova\backup_extracted\nova.db" "SELECT f._id AS item_id, f.title AS app_title, CASE WHEN f.iconPackage IS NOT NULL AND f.iconPackage != '' THEN f.iconPackage WHEN INSTR(f.intent, 'component=') > 0 THEN SUBSTR(SUBSTR(f.intent, INSTR(f.intent, 'component=') + 10), 1, INSTR(SUBSTR(f.intent, INSTR(f.intent, 'component=') + 10), '/') - 1) ELSE '' END AS package_name, f.intent FROM favorites f WHERE f.container = 2921 ORDER BY f.rank, f._id;" > output.txt
> 
> 10. Check the output
>       C:\> type output.txt
>             item_id	app_title	package_name	intent
>             1892	AccuWeather	com.accuweather.android	#Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;launchFlags=0x10200000;component=com.accuweather.android/.splashscreen.ui.SplashActivity;end
>             1830	Windy.app	co.windyapp.android	#Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;launchFlags=0x10200000;component=co.windyapp.android/.ui.mainscreen.container.MainActivity;end
>             2456	AeroWind	aerow.us.aerowind	#Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;launchFlags=0x10200000;component=aerow.us.aerowind/.GetWeather;end
>             2448	AirVisual	com.airvisual	#Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;launchFlags=0x10200000;component=com.airvisual/.ui.activity.SplashActivity;end
>             1878	Good Weather	org.asdtm.goodweather	#Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;launchFlags=0x10200000;component=org.asdtm.goodweather/.MainActivity;end
>             2266	Hey Sunrise	com.macca895.sunriise	#Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;launchFlags=0x10200000;component=com.macca895.sunriise/.main.MainActivity;end
>             2455	hiweather	com.lholman.hiweather	#Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;launchFlags=0x10200000;component=com.lholman.hiweather/.MainActivity;end
>             2471	just weather	com.neverads.just_weather	#Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;launchFlags=0x10200000;component=com.neverads.just_weather/com.neverads.myapp.MainActivity;end
>             2469	Klara	org.androworks.klara	#Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;launchFlags=0x10200000;component=org.androworks.klara/.MainActivity;end
>             2472	OpenWeather	uk.co.openweather	#Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;launchFlags=0x10200000;component=uk.co.openweather/.MainActivity;end
>             2509	RadarWeather	org.woheller69.weather	#Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;launchFlags=0x10200000;component=org.woheller69.weather/.activities.SplashActivity;end
>             2460	Rain	com.yoshi.rain	#Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;launchFlags=0x10200000;component=com.yoshi.rain/.MainActivity;end
>             2914	Weather	org.breezyweather	#Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;launchFlags=0x10200000;component=org.breezyweather/.ui.main.MainActivity;end
>             2618	Weather	wangdaye.com.geometricweather	#Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;launchFlags=0x10200000;component=wangdaye.com.geometricweather/.main.MainActivity;end
>             2473	Weather	com.alexplas.weathernew	#Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;launchFlags=0x10200000;component=com.alexplas.weathernew/.ui.MainActivity;end
>             1821	Weather Alerts	info.vazquezsoftware.weatheralarms	#Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;launchFlags=0x10200000;component=info.vazquezsoftware.weatheralarms/.LoadingActivity;end
>             2453	Weather Forecast	com.la.local.weather.forecast.app	#Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;launchFlags=0x10200000;component=com.la.local.weather.forecast.app/.activities.SplashActivity;end
>             1831	WindHub	com.windhub.marine.weather	#Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;launchFlags=0x10200000;component=com.windhub.marine.weather/wind.hub.ui.launcher.LauncherActivity;end
>             1824	Windy	com.windyty.android	#Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;launchFlags=0x10200000;component=com.windyty.android/.MainActivity;end
>             2468	Yr	no.nrk.yr	#Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;launchFlags=0x10200000;component=no.nrk.yr/.MainActivity;end
> 
> 
> 11. Filter columns with coreutils cut.
>       C:\> where cut
>             => C:\Program Files\coreutils\bin\cut.exe
>       C:\> cut -f2,3 output.txt > weather_apps.txt
> 
>      Note: The SQLite output uses tab delimiters, so cut -f2,3 extracts
>            the second and third columns (app_title and package_name).
> 
> 12. Final result.
>       C:\> type weather_apps.txt
>             app_title       package_name
>             AccuWeather     com.accuweather.android
>             Windy.app       co.windyapp.android
>             AeroWind        aerow.us.aerowind
>             AirVisual       com.airvisual
>             Good Weather    org.asdtm.goodweather
>             Hey Sunrise     com.macca895.sunriise
>             hiweather       com.lholman.hiweather
>             just weather    com.neverads.just_weather
>             Klara           org.androworks.klara
>             OpenWeather     uk.co.openweather
>             RadarWeather    org.woheller69.weather
>             Rain            com.yoshi.rain
>             Weather         org.breezyweather
>             Weather         wangdaye.com.geometricweather
>             Weather         com.alexplas.weathernew
>             Weather Alerts  info.vazquezsoftware.weatheralarms
>             Weather Forecast com.la.local.weather.forecast.app
>             WindHub         com.windhub.marine.weather
>             Windy           com.windyty.android
>             Yr              no.nrk.yr
> 

Now that's what I call Value, Maria!  When can we expect a full blown 
tutorial with all details?  I think this deserves at least 500 pages of 
documentation, because:  (1) very, very important. (2) Only you could 
have done it.  (3) Mucho value was added.  (4) It should be recorded and 
enshrined for posterity.  (5) It shows what a true genius can do.

Thanks Mary!  Is there a fund we can contribute to?  We all want to 
encourage further astute research from you. You are brilliant!
Technical Details
Message-ID: <11do1un$2nuou$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <11dnkrt$2pjn$1@nnrp.usenet.blueworldhosting.com> <11dnp91$1eem$1@nnrp.usenet.blueworldhosting.com> <11dnre3$1266$1@nnrp.usenet.blueworldhosting.com> <11dnvjh$2iq8$1@nnrp.usenet.blueworldhosting.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Hank Rogers <Hank@nospam.invalid>
Newsgroups: comp.mobile.android,alt.comp.os.windows-10
Subject: Re: Can we programmatically get package names of icons in a
 homescreen folder?
Date: Thu, 19 Nov 2026 17:49:38 -0600
Organization: A noiseless patient Spider
Lines: 167
Message-ID: <11do1un$2nuou$1@dont-email.me>
References: <11dnkrt$2pjn$1@nnrp.usenet.blueworldhosting.com>
 <11dnp91$1eem$1@nnrp.usenet.blueworldhosting.com>
 <11dnre3$1266$1@nnrp.usenet.blueworldhosting.com>
 <11dnvjh$2iq8$1@nnrp.usenet.blueworldhosting.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 19 Nov 2026 23:49:46 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="2882334"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18d3iFNX2weRL4sFA1JWykJhPX6hjkcK6Y="; posting-host="c4adbc6d311ef69905c83925edf76259"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101
 Firefox/140.0 SeaMonkey/2.53.24
Cancel-Lock: sha1:Biq+NjT1ecem7aiXS6C+7IV3jsk= sha256:fHlopoqm3mfs3hutDQuK/BP2WwNZQ0fgvQNyyd3rRAA=
	sha1:HGVit+X1kVgF8E1E4cu1hZSazrU= sha256:4S6vSnHZ8BzdHSLqOE5EsInv3/yAo7gvyLt3s+gheFs=
In-Reply-To: <11dnvjh$2iq8$1@nnrp.usenet.blueworldhosting.com>