mirror of
https://github.com/MuntashirAkon/android-debloat-list.git
synced 2025-01-13 04:37:54 +08:00
Add JSON schema for bloatware list and suggestions
This commit is contained in:
parent
17a484ed71
commit
3e7fa95cbb
@ -126,7 +126,7 @@
|
|||||||
"id": "com.android.carrierdefaultapp",
|
"id": "com.android.carrierdefaultapp",
|
||||||
"label": "CarrierDefaultApp",
|
"label": "CarrierDefaultApp",
|
||||||
"description": "This package is a generic solution that allows carriers to indicate when a device has run OOB (Out Of Balance). Android devices that are OOB need carrier mitigation protocols to allow select data through (like to notify users their data/balance is out, or allow them to buy more data through the carrier app).\nWill probably break that functionality if disabled, but is otherwise safe to disable (should only affect users that are out of data/balance?).",
|
"description": "This package is a generic solution that allows carriers to indicate when a device has run OOB (Out Of Balance). Android devices that are OOB need carrier mitigation protocols to allow select data through (like to notify users their data/balance is out, or allow them to buy more data through the carrier app).\nWill probably break that functionality if disabled, but is otherwise safe to disable (should only affect users that are out of data/balance?).",
|
||||||
"web" : [
|
"web": [
|
||||||
"https://source.android.com/devices/tech/connect/oob-users"
|
"https://source.android.com/devices/tech/connect/oob-users"
|
||||||
],
|
],
|
||||||
"removal": "caution"
|
"removal": "caution"
|
||||||
|
70
schema/bloatware_list.json
Normal file
70
schema/bloatware_list.json
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"$id": "https://muntashirakon.github.io/android-debloat-list/bloatware_list.json",
|
||||||
|
"title": "Bloatware List",
|
||||||
|
"description": "Listing of Android bloatware",
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"description": "Bloatware package name",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"label": {
|
||||||
|
"description": "Bloatware package label",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"description": "Packages that this bloatware depends on",
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"minItems": 1,
|
||||||
|
"uniqueItems": true
|
||||||
|
},
|
||||||
|
"required_by": {
|
||||||
|
"description": "Packages that depend on this bloatware",
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"minItems": 1,
|
||||||
|
"uniqueItems": true
|
||||||
|
},
|
||||||
|
"tags": {
|
||||||
|
"description": "Predefined tags",
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"minItems": 1,
|
||||||
|
"uniqueItems": true
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"description": "Bloatware description",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"web": {
|
||||||
|
"description": "Online references",
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"minItems": 1,
|
||||||
|
"uniqueItems": true
|
||||||
|
},
|
||||||
|
"removal": {
|
||||||
|
"description": "Bloatware removal type (delete, replace, caution, unsafe)",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"suggestions": {
|
||||||
|
"description": "Suggestion ID for listing alternatives to this bloatware",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [ "id", "label", "description", "removal" ]
|
||||||
|
},
|
||||||
|
"uniqueItems": true
|
||||||
|
}
|
34
schema/suggestion_list.json
Normal file
34
schema/suggestion_list.json
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"$id": "https://muntashirakon.github.io/android-debloat-list/suggestion_list.json",
|
||||||
|
"title": "Suggestion List",
|
||||||
|
"description": "Listing of suggestions for Android bloatware",
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"description": "Suggested package name",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"label": {
|
||||||
|
"description": "Suggested package label",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"reason": {
|
||||||
|
"description": "Reason for choosing this package if it violates some criteria",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"source": {
|
||||||
|
"description": "Predefined list of app stores where this package might be located",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"repo": {
|
||||||
|
"description": "Source code repository for this package",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [ "id", "label", "repo" ]
|
||||||
|
},
|
||||||
|
"uniqueItems": true
|
||||||
|
}
|
@ -154,7 +154,7 @@ function validate_bloatware_item(array $item): int {
|
|||||||
fprintf($lint_writer, "{$item['id']}: Expected `warning` field to be a string, found: " . gettype($item['warning']) . "\n");
|
fprintf($lint_writer, "{$item['id']}: Expected `warning` field to be a string, found: " . gettype($item['warning']) . "\n");
|
||||||
++$error_count;
|
++$error_count;
|
||||||
}
|
}
|
||||||
// `warning` is an optional string
|
// `suggestions` is an optional string
|
||||||
if (isset($item['suggestions'])) {
|
if (isset($item['suggestions'])) {
|
||||||
if (gettype($item['suggestions']) != 'string') {
|
if (gettype($item['suggestions']) != 'string') {
|
||||||
fprintf($lint_writer, "{$item['id']}: Expected `suggestions` field to be a string, found: " . gettype($item['suggestions']) . "\n");
|
fprintf($lint_writer, "{$item['id']}: Expected `suggestions` field to be a string, found: " . gettype($item['suggestions']) . "\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user