Skip to content

Commit

Permalink
Initial commit, added files, metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
johnzweng committed May 17, 2017
1 parent f9e2e9b commit 2b132dc
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 40 deletions.
42 changes: 16 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,20 @@
## !! Please update this README.md file for online Repo submission !!
You can edit your `README.md` within Github's online editor, it also has an preview button!
Check the [Markdown Cheat Sheet](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) for markdown syntaxes, it's super easy!
# Magisk Module: **Smartcard Service**

## How to Create a Magisk Module
1. Clone / download this repo
2. Open `config.sh`, follow the instructions written at the beginning of the file. You should at least change `config.sh` and `module.prop`
3. Zip your files, the zipped file is a flashable zip for both Magisk Manager and custom recoveries
4. Please check **Notes** for precautions
### What's this:

## How to Request a New Repo
1. Fork [this repo](https://github.com/topjohnwu/magisk-module-template)
2. Create your own Magisk Module as stated above
3. Push your changes to Github
4. Change the description of the Github repo to **the id of your module. This is important! Never change it to anything else!**
5. Open an issue in [topjohnwu/Magisk_Repo_Central](https://github.com/topjohnwu/Magisk_Repo_Central/issues/new)
Please include your repo link so I can check and clone it
6. Your repo should be cloned into [Magisk-Modules-Repo](https://github.com/Magisk-Modules-Repo), and you should receive an email to become the collaborator of that repo so you can edit it in the future.
This is a module for the [Magisk Framework](http://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445). You need to have the Magisk framework (which is not made by me) installed on your phone.

## Notes
1. (Windows aware!!) This git repo is configured to force Unix endlines on all necessary files. The line endings on these files should remain the Unix format. Please use advanced text editors like Sublime, Atom, Notepad++ etc. to edit the text files
2. In `module.prop`, `version` is any string you like, so any fancy version name (e.g. ultra-beta-v0.0.0.1) is allowed. However, `versionCode` **MUST** be an integer. The value is used for version comparison.
2. Make sure your module ID **doesn't contain any spaces**.
3. (For repo developers) Magisk Manager monitors all repo's `master` branch. So any changes to the branch `master` will be reflected to all users immediately. If you are working on an update for a module, please work on another branch, make sure it works, and then merge the changes back to `master`.
### What this module does:
This module installs the **SmartcardService** system application, from this [Github account](https://github.com/johnzweng/platform_packages_apps_SmartCardService/releases/tag/jz_android_6.0_OMAPI-2.05).

## Best Practice for Updating a Repo
1. Open a new branch, and start update your files on the new branch
2. Test if everything works fine
3. Bump up the `versionCode` in `module.prop`, or Magisk Manager won't know that your module is updated!
4. Merge the changes back to master, all users shall now receive the update in Magisk Manager
SmartcardService is the implementation of the Open Mobile API which is not part
of the standard Android API (Google doesn't support it) but is needed by apps
which need to access the SIM card (for example to use the SIM card as Secure
Element).

### Contents:
This module adds the following files (and necessary directories):

- `/system/etc/permissions/org.simalliance.openmobileapi.xml`
- `/system/framework/org.simalliance.openmobileapi.jar`
- `/system/priv-app/SmartcardService/SmartcardService.apk`
31 changes: 23 additions & 8 deletions config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
#
# Magisk
# by topjohnwu
#
#
# This is a template zip for developers
#
##########################################################################################
##########################################################################################
#
#
# Instructions:
#
#
# 1. Place your files into system folder (delete the placeholder file)
# 2. Fill in your module's info into module.prop
# 3. Configure the settings in this file (common/config.sh)
# 4. For advanced features, add shell commands into the script files under common:
# post-fs-data.sh, service.sh
# 5. For changing props, add your additional/modified props into common/system.prop
#
#
##########################################################################################

##########################################################################################
Expand All @@ -27,7 +27,7 @@

# This will be the folder name under /magisk
# This should also be the same as the id in your module.prop to prevent confusion
MODID=template
MODID=at.zweng.magisk.openmobile205

# Set to true if you need to enable Magic Mount
# Most mods would like it to be enabled
Expand All @@ -49,9 +49,24 @@ LATESTARTSERVICE=false
# Set what you want to show when installing your mod

print_modname() {
ui_print "*******************************"
ui_print " Magisk Module Template "
ui_print "*******************************"
ui_print "***************************************"
ui_print "***************************************"
ui_print " Magisk Module: SmartcardService"
ui_print " ----------------------------------"
ui_print " (aka Open Mobile API 2.05)"
ui_print " "
ui_print " This Magisk module installs "
ui_print " SmartcardService as a privileged "
ui_print " system service."
ui_print " "
ui_print " This is needed for (mostly banking)"
ui_print " apps, which want to communicate with"
ui_print " the Secure Element in the SIM card."
ui_print " "
ui_print " see github/johnzweng"
ui_print " (XDA user androcheck)"
ui_print "***************************************"
ui_print "***************************************"
}

##########################################################################################
Expand Down
10 changes: 5 additions & 5 deletions module.prop
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
id=template
name=Template Module
version=v1
id=at.zweng.magisk.openmobile205
name=Smartcard Service
version=1.0
versionCode=1
author=topjohnwu
description=A short description
author=johnzweng
description=Installs SmartcardService as privileged system app. This is the implementation of the Open Mobile API (OMAPI) 2.05. Apps which want to use this must be grant the Smartcard permission in the app's setting.
template=3
20 changes: 20 additions & 0 deletions system/etc/permissions/org.simalliance.openmobileapi.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<permissions>
<library name="org.simalliance.openmobileapi"
file="/system/framework/org.simalliance.openmobileapi.jar" />
</permissions>
Binary file not shown.
1 change: 0 additions & 1 deletion system/placeholder

This file was deleted.

Binary file not shown.

0 comments on commit 2b132dc

Please sign in to comment.