Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange, felica/common.cfg from Japanese ver. doesn't have 014 015&018 #1

Closed
palBazzi opened this issue Aug 6, 2023 · 4 comments
Closed

Comments

@palBazzi
Copy link

palBazzi commented Aug 6, 2023

Here are felica/common.cfg from Xperia 5III(XQ-BQ42 JP sim free)and Pixel 3(G103B)
Pixel 3, path: /product/etc/felica/common.cfg
00000001,100008
00000002,000068
00000003,com.android.chrome
00000004,com.android.vending
00000005,1
00000010,1
00000011,eSE1
02020001,3030373030310000000000
02030001,0
02030002,0
02030003,intent:#Intent;action=android.settings.NFC_SETTINGS;end

Xperia 5III, path: /vendor/etc/felica/common.cfg
00000001,100008
00000002,000068
00000003,com.android.chrome
00000004,com.android.vending
00000005,1
00000010,1
00000011,eSE1
02020001,3030313031300000000000
02030001,0
02030002,0
02030003,intent:#Intent;action=android.settings.NFC_SETTINGS;end
00000012,1
00000013,1
00000016,0001

@kormax
Copy link
Owner

kormax commented Aug 6, 2023

Interesting. If Osaifu-Keitai works nonetheless, it could be because of an older app that looks into another location or that it detects support in other way.
The only devices i've confirmed my info with were pixel 6 and newer, and this gist was intended primarily for them. If you have any info on how detection works for old devices, would be interesting to know.

@kormax
Copy link
Owner

kormax commented Aug 6, 2023

I've decided to look at the isCheckInbound method again.
There is in fact an additional if clause that returns success (return false) if ALL of the keys are missing, but the file itself isn't (as in that case it returns an error even earlier).

 public boolean isCheckInbound(Context context) {
        int parseInt;
        Integer num = (Integer) Sg.getValue(Sg.Key.SETTING_SKU_VALUE);
        if (num != null) {
            try {
                return 1 != num.intValue(); # If value 1 result of this expression is false - which means success
            } catch (NumberFormatException unused) {
            }
        }
        String str = (String) Sg.getValue(Sg.Key.SETTING_SKU_URL_VALUE);
        String str2 = (String) Sg.getValue(Sg.Key.SETTING_SKU_KEY_VALUE);
        // This is the clause 
        if (str == null && str2 == null) {
            return false;   // false means success
        }
        Cursor cursor = null;
        ***Cursor code cut to save space, same logic***
}

That answers the question. Thanks for pointing it out. Will update gist to reflect on new information.

@kormax
Copy link
Owner

kormax commented Aug 6, 2023

Added related info in e61d8d1.

@kormax kormax closed this as completed Aug 6, 2023
@palBazzi
Copy link
Author

palBazzi commented Aug 6, 2023

Thanks for your working. This is a nice project/discovering.
I am Android JP models‘ user, also want global models can use felica.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants