{"id":17918939,"url":"https://github.com/trinea/android-switch-env","last_synced_at":"2025-06-12T23:38:09.516Z","repository":{"id":18469323,"uuid":"21664208","full_name":"Trinea/android-switch-env","owner":"Trinea","description":"Android development tool which can be used for switching between test enviroment and online enviroment","archived":false,"fork":false,"pushed_at":"2014-07-23T02:29:33.000Z","size":736,"stargazers_count":27,"open_issues_count":0,"forks_count":13,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-04T19:41:39.361Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://codekk.com","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"brianrizo/Project-1---","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Trinea.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-09T18:41:53.000Z","updated_at":"2025-02-21T15:47:21.000Z","dependencies_parsed_at":"2022-09-24T10:50:36.829Z","dependency_job_id":null,"html_url":"https://github.com/Trinea/android-switch-env","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Trinea/android-switch-env","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trinea%2Fandroid-switch-env","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trinea%2Fandroid-switch-env/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trinea%2Fandroid-switch-env/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trinea%2Fandroid-switch-env/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Trinea","download_url":"https://codeload.github.com/Trinea/android-switch-env/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trinea%2Fandroid-switch-env/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259551195,"owners_count":22875454,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-28T20:13:31.353Z","updated_at":"2025-06-12T23:38:09.486Z","avatar_url":"https://github.com/Trinea.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Android 开发测试环境切换工具\n====================================\n`一年前周末花半天写的，用着没太多其他需求就没怎么改进，现在源码开放出来，需要的话可以提交 Request 添加更复杂需求`  \n原理介绍：[Android 开发测试环境切换工具](http://www.trinea.cn/android/switch-between-development-and-testing-environment/)  \n### 1. 功能介绍  \n现在大多开发人员都是通过程序中 isDebug 变量表示是否是 Debug 模式，从而确定后台服务器是接入测试环境还是开发环境  \n\u003cbr/\u003e\n那么如果没有程序代码呢？如果是已上线某个老版本呢？  \n\u003cbr/\u003e\n这个项目的主要功能是修改 Host 文件，从而达到将对线上环境的访问全部指向到测试环境的目的  \n`PS：手机必须开启了 Root 权限`  \n\n![screenshot](screenshot.png)  \n### 2. 如何设置\n在 SD 卡根目录下 Trinea 文件夹内新建文件 switch-env-host.txt，内容为测试环境和开发环境对应的 Host  \n在 SD 卡根目录下 Trinea 文件夹内新建文件 switch-env-app-info.txt，内容为 App 信息，每行信息为包名 空格 应用名  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrinea%2Fandroid-switch-env","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrinea%2Fandroid-switch-env","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrinea%2Fandroid-switch-env/lists"}