Commit graph

125 commits

Author SHA1 Message Date
0410db538c
fix: update database url and signing key 2025-01-27 02:10:17 +03:00
Tavi
4e7cb16498
Going the distance... [pt3]
Signed-off-by: Tavi <tavi@divested.dev>
2024-07-27 18:34:19 -04:00
Tavi
52b79bf526
LinkScannerService: don't repeatedly scan
- have the system only send 10 events a second, instead of 1000
- don't scan the same package+class name more than once a second
- put each event view scanner on its own thread keyed by package+class
- don't scan if there is already an existing thread for the package+class

this can still cause high cpu usage on views with lots of text
especially if the user continually interacts with it
but is overall much better

to recap:
- a given package+class can only be scanned at most once a second
- a given package+class can only have one scanner at a time
- text to scan will not be scanned if already scanned
- domains to scan will not be scanned if already scanned

Signed-off-by: Tavi <tavi@divested.dev>
2024-05-25 18:49:56 -04:00
Tavi
8fb829ca6d
LinkScanner: performance improvements
Signed-off-by: Tavi <tavi@divested.dev>
2024-05-23 11:39:27 -04:00
Tavi
ff2e34e49e
Tweaks
Signed-off-by: Tavi <tavi@divested.dev>
2024-05-23 09:11:26 -04:00
Tavi
02dd4f624e
Ability to scan screen content for malicious links
Signed-off-by: Tavi <tavi@divested.dev>
2024-05-22 20:09:16 -04:00
Tavi
8d9314ef97
Add the Cloudflare mirror and bump version
Signed-off-by: Tavi <tavi@divested.dev>
2024-05-17 09:20:56 -04:00
Tavi
8ab60efed9
Fixup
Signed-off-by: Tavi <tavi@divested.dev>
2024-04-11 12:13:21 -04:00
Tad
fedca835d6
Crash fixes
Also adds an icon
Closes https://gitlab.com/divested-mobile/hypatia/-/issues/37

Signed-off-by: Tad <tad@spotco.us>
2023-12-30 14:39:09 -05:00
Tad
a0f6a00244
Many changes
- Fix signature count reseting on update but not changed
- Better handle reloads for extended
- Metered connection warning
- Block all actions when appropriate
- Use a wakelock instead of keeping the screen on
- Increase max scan sizes
- Always check if files can be read before scanning
- Resolve true paths to avoid duplicates from symlinks
- Scan more app paths
- Scan more system paths
- Bump version

Signed-off-by: Tad <tad@spotco.us>
2023-12-29 00:57:58 -05:00
Tad
486d96e10c
Extended database option
Signed-off-by: Tad <tad@spotco.us>
2023-12-27 16:26:36 -05:00
Tad
c242c1fa75
Restore support for Jelly Bean
+ code cleanup

Signed-off-by: Tad <tad@spotco.us>
2023-12-26 19:34:33 -05:00
Tad
f1d747b739
Better handle notifcation actions
Signed-off-by: Tad <tad@spotco.us>
2023-12-25 22:43:39 -05:00
Tad
5b423016dc
Small crash fix
Tested on Android 7.1.2, 8.1.0, 10, 11, and 13:
- Install app
- Update databases
- Write test files
- Enable system scan
- Run a scan
- Check signature count
- Enable realtime scanner
- Write test files
- Ignore a detection
- Look up a detection
- Delete a detection
- Copy file over MTP and confirm detection

Signed-off-by: Tad <tad@spotco.us>
2023-12-25 20:54:29 -05:00
Tad
72d1f97a96
More fixes
- Fixup SHA1 hash calculation
- Show full notification text when expanded
- Make basic self test more robust
- Add a self test option that actually writes files
- Bump version to 3.0, since all previous versions are basically completely broken garbage

Signed-off-by: Tad <tad@spotco.us>
2023-12-25 16:43:34 -05:00
Tad
71cc9157a7
Fixup signature count miscalculation when database already loaded
Signed-off-by: Tad <tad@spotco.us>
2023-12-25 14:39:48 -05:00
Tad
ee3b4fed72
Tweaks
- Add signature count back to notification too
- Ignore hashes of empty content

Signed-off-by: Tad <tad@spotco.us>
2023-12-25 14:30:03 -05:00
Tad
a323b45373
Show the approximate signature count
Signed-off-by: Tad <tad@spotco.us>
2023-12-25 14:10:40 -05:00
Tad
6de29e5a40
Handle all detections via notifications
Also add actions to lookup, delete/uninstall, or ignore the detection

Signed-off-by: Tad <tad@spotco.us>
2023-12-24 18:19:11 -05:00
Tad
dfabf6b9ff
Normalize all strings to lower-case and add self-test function
Signed-off-by: Tad <tad@spotco.us>
2023-12-22 19:07:01 -05:00
Tad
fa25395a08
Database downloader changes
- Store the new database separately and move into place
- Check for network connection before trying to download
- Don't immediately delete the database on download start
- Only delete new database on download failure
- Wait until all downloads complete before attempting reload

Signed-off-by: Tad <tad@spotco.us>
2023-12-22 16:05:03 -05:00
Tad
55305f88f1 Declare QUERY_ALL_PACKAGES
Signed-off-by: Tad <tad@spotco.us>
2023-12-22 14:59:47 -05:00
Tad
1c29038125
Directly load the pre-processed bloom filters
No more conversion, much quicker loading, much smaller downloads

Signed-off-by: Tad <tad@spotco.us>
2023-12-21 23:30:41 -05:00
Tad
a004d22c07
Fixup
Signed-off-by: Tad <tad@spotco.us>
2023-12-21 20:07:14 -05:00
Tad
7ae8069c1b
Overhaul to use a bloom filter instead of a HashMap
Signed-off-by: Tad <tad@spotco.us>
2023-12-21 20:02:03 -05:00
Tad
3bd703d6b8
Add support for the MalwareBazaar database
Signed-off-by: Tad <tad@spotco.us>
2023-12-19 17:06:22 -05:00
Tad
22cc72ab87
Fix the downloader
With all databases enabled the ThreadPool queue is exceed (25>16).
This normally isn't an issue for other users of the pool as it will get pushed onto the main thread.
But Android prohibits network activity on the main thread, which the downloader runs from.

Increase it 32 which should be suitable for now.
Maybe consider adding a separate pool in future.

Fixes https://github.com/Divested-Mobile/Hypatia/issues/34
Fixes https://gitlab.com/divested-mobile/hypatia/-/issues/31

Signed-off-by: Tad <tad@spotco.us>
2023-05-15 23:54:59 -04:00
Tad
44d2d1c905
GPG signature verification for databases
TODO: inform user if verification fails or key is unavailable

Signed-off-by: Tad <tad@spotco.us>
2023-04-16 13:08:25 -04:00
Tad
76d06b504f
Add support for the Echap stalkerware database
Signed-off-by: Tad <tad@spotco.us>
2023-03-06 20:16:32 -05:00
Tad
d052fff807
Small tweaks
Signed-off-by: Tad <tad@spotco.us>
2023-02-07 11:58:17 -05:00
Tad
1fcaab82b8
Make the app smaller
Signed-off-by: Tad <tad@spotco.us>
2023-02-07 11:30:30 -05:00
Tad
4c65d96a81
Increase hash length due to false positive repots
Signed-off-by: Tad <tad@spotco.us>
2023-01-31 14:48:09 -05:00
Tad
833eae3841 Don't trim hashes as much
Collisions

Signed-off-by: Tad <tad@spotco.us>
2022-12-15 06:39:03 -05:00
Tad
745d70ced5
Various optimizations
- Trim hashes to 8 characters instead of 12. Saves ~10MB by default.
- Optimized databases. Saves ~8MB by default.
- Deduplicated strings. Saves ~12MB by default.

idle usage on arm64
- With defaults: ~165MB, previously ~195MB
- With all databases: ~350MB, previously ~650MB

Signed-off-by: Tad <tad@spotco.us>
2022-12-15 06:29:35 -05:00
Tad
7d774092c6
Add support for the Amnesty International Investgations database
Signed-off-by: Tad <tad@spotco.us>
2022-12-06 12:53:48 -05:00
Tad
0940066459
Fixup inability to fully scan on Android 11 and higher
Signed-off-by: Tad <tad@spotco.us>
2022-12-03 16:09:15 -05:00
Tad
3c0307c1fc Crash fix
Fixes https://gitlab.com/divested-mobile/hypatia/-/issues/23
Fixes https://gitlab.com/divested-mobile/hypatia/-/issues/20

Signed-off-by: Tad <tad@spotco.us>
2022-08-21 20:48:09 -04:00
Tad
108dab063d Server override option
Signed-off-by: Tad <tad@spotco.us>
2022-04-03 21:19:10 -04:00
Tad
ca4f26fd7d Many changes
- Bump version
- Don't find files recursively on main thread
- Reduce number of threadpools
- Ensure there are always enough threads available
- Cap the queue limit on thread pools
- Do work on main thread if queues are full, thereby blocking
- Use more thread safe objects
- Replace some runnables with lambas
- Code cleanup
- Typo fixes

Closes https://gitlab.com/divested-mobile/hypatia/-/issues/6
Closes https://github.com/Divested-Mobile/Hypatia/issues/13
Closes https://github.com/Divested-Mobile/Hypatia/issues/1

Signed-off-by: Tad <tad@spotco.us>
2021-09-20 13:47:24 -04:00
Tad
fe49d06902 Invert the fileHashes* HashMaps
This fixes scan detection of multiple files with the same hashes.

Signed-off-by: Tad <tad@spotco.us>
2021-09-10 07:09:30 -04:00
Tad
de868c458f Bump versions
+ fix small quirk when too few sigs
2021-07-21 15:47:10 -04:00
Tad
2e8994ee7a Improve database descriptions and add a new database source 2021-07-21 15:31:07 -04:00
Tad
2d56574a1e Show scan speed too 2021-06-04 15:32:08 -04:00
Tad
22f86dc0e4 Add a comphrensive credits menu 2021-03-03 16:00:32 -05:00
Tad
0218f04e79 Bump version
https://gitlab.com/divested-mobile/hypatia/-/merge_requests/4
2021-03-03 15:38:01 -05:00
Petra Mirelli
21a62fd804 Adding 'versionName' from 'app/gradle.build' to UI 2021-03-03 20:09:49 +00:00
Tad
0f9b897c41 Bump version 2021-03-02 10:18:44 -05:00
Petra Mirelli
87d94b451f Added 'realtime scanner stopped' UI notification strings for de, en, fr 2021-03-02 10:16:16 -05:00
Tad
d5b176ff61 Legal goodies 2021-03-01 21:33:47 -05:00
Tad
28f710d5ad More small improvements
- Don't try to load the database multiple times at once
- Add the signature count to the notification
- Format numbers for the locale
- Improve check for when no databases are available
2021-02-22 23:28:07 -05:00