Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #197898
| Path | csiph.com!2.eu.feeder.erje.net!feeder.erje.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!not-for-mail |
|---|---|
| From | Maria Sophia <mariasophia@comprehension.com> |
| Newsgroups | comp.sys.mac.system, alt.os.linux, alt.comp.os.windows-11, comp.lang.python |
| Subject | Re: PSA: A python script to clone your phone exactly, over Wi-Fi or USB |
| Date | Sun, 23 Aug 2026 12:36:06 -0800 |
| Organization | BWH Usenet Archive (https://usenet.blueworldhosting.com) |
| Message-ID | <116fljm$1go1$1@nnrp.usenet.blueworldhosting.com> (permalink) |
| References | <116673g$ptq$1@nnrp.usenet.blueworldhosting.com> <1166bch$39qqm$2@dont-email.me> |
| Reply-To | pusvul@getTjewytR4so+mqe2.invalid |
| Content-Type | text/plain; charset=US-ASCII |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Sun, 23 Aug 2026 20:36:06 -0000 (UTC) |
| Injection-Info | nnrp.usenet.blueworldhosting.com; logging-data="49921"; mail-complaints-to="usenet@blueworldhosting.com"; posting-host="0da0fb4e8763147dfb976ccaebd130ab"; posting-account="a24474141b7b153dd56a8f6e0f30f8b5"; |
| User-Agent | telnet + stunnel + gVim on Windows |
| Cancel-Lock | sha1:HRnjnyjEVhmeV8mmVpPYHmTKShg= sha256:HP9XhoEkw3hgkLobc33veRDLbIifoq2T5Rw0KCrwVP8= sha1:wwRoMD0NGb3Q8zWumHDTf0UpwRc= sha256:9hNwlfhmGxIxzl5I8A3Vo5J0nriy/gSpjb98KvxAQ6E= |
| Content-Language | en-GB |
| Xref | csiph.com comp.sys.mac.system:146477 alt.os.linux:83102 alt.comp.os.windows-11:33975 comp.lang.python:197898 |
Cross-posted to 4 groups.
Show key headers only | View raw
Lawrence D'Oliveiro wrote:
> Why not provide your own commands for initializing a new database
> if it doesn't already exist? Save the user some work.
Hi Lawrence,
Regarding launcher-agnostic layout replication without root privileges.
I've been thinking about your suggestion, because it would be the holy
grail in an exact perfect replica of any Android phone to another.
Of course, it's trivial to find every user-installed single package...
adb shell pm list packages -f
But replicating the homescreen layout is a non-trivial database problem.
<https://i.postimg.cc/zvKdH4PX/homescreen-intent.jpg>
Q: How do we obtain the homescreen {pane/folder/app/apk} location & order?
A: ???
I punted, as you noted, by using an SQL database output by Nova Launcher.
<https://i.postimg.cc/hvrv2tXL/nova-db.jpg>
But I agree, we'd rather create our own database of the Android homescreen.
The question is how to query Android homescreen pane names, locations, and
folder names, locations, and app-icon names locations and action intents...
... without root privileges?
We "might" find that information in a dump of the current activities.
adb shell dumpsys activity activities
But, if we want a layout-aware snapshot (folders, icons, positions) without
relying on a launcher database file, maybe, just maybe, an uiautomator
dump via ADB + Python XML parsing might be our best non-root alternative?
<https://help.duoplus.net/docs/uiautomator-dump>
Try this on your desktop with the phone connected over Wi-Fi to adb:
adb shell uiautomator dump /sdcard/window_dump.xml
=> UI hierchary dumped to: /sdcard/window_dump.xml
adb pull /sdcard/window_dump.xml ./window_dump.xml
=> /sdcard/window_dump.xml: 1 file pulled, 0 skipped. 0.1 MB/s (1433 bytes in 0.012s)
However, uiautomator dump only captures what is currently rendered on the
screen at that exact millisecond, but maybe we can find the apps and their
locastions hidden inside closed folders by programmatically swiping through
every single pane and opening every folder via ADB clicks during the dump?
In addition, UI Automator only gives us bounding boxes (pixel coordinates)
rather than a clean relational grid or database model, so we'd have to
infer the final layout based on knowledge of the launcher's grid geometry.
In summary, while parsing the launcher's layout database was essentially trivial
<https://i.postimg.cc/28w4VzSk/sql-query.jpg>
rebuilding that layout database from scratch, is not something I know how to do.
--
Sometimes, together, with help from others, we can accomplish the impossible.
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: PSA: A python script to clone your phone exactly, over Wi-Fi or USB Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-08-20 07:46 +0000
Re: PSA: A python script to clone your phone exactly, over Wi-Fi or USB Maria Sophia <mariasophia@comprehension.com> - 2026-08-20 08:14 -0800
Re: PSA: A python script to clone your phone exactly, over Wi-Fi or USB Maria Sophia <mariasophia@comprehension.com> - 2026-08-20 08:32 -0800
Re: PSA: A python script to clone your phone exactly, over Wi-Fi or USB Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-08-20 22:57 +0000
Re: PSA: A python script to clone your phone exactly, over Wi-Fi or USB Maria Sophia <mariasophia@comprehension.com> - 2026-08-21 01:37 -0800
Re: PSA: A python script to clone your phone exactly, over Wi-Fi or USB Maria Sophia <mariasophia@comprehension.com> - 2026-08-21 01:54 -0800
Re: PSA: A python script to clone your phone exactly, over Wi-Fi or USB Maria Sophia <mariasophia@comprehension.com> - 2026-08-23 12:36 -0800
csiph-web