Open Cyber1000 opened 2 years ago
Vào 4:16, CN, 29 thg 5, 2022 Cyber1000 @.***> đã viết:
[image: IccId] https://user-images.githubusercontent.com/1142765/170843074-5c4fbe24-ef7c-4617-b484-3b632a5210a3.jpg [image: Multisim] https://user-images.githubusercontent.com/1142765/170843076-5c49748a-fa63-48a4-b8ef-394183ca9886.jpg [image: Settings_Sim2] https://user-images.githubusercontent.com/1142765/170843077-117c8118-1bec-44cc-a4a0-a7fae27fa6cd.jpg [image: SMS] https://user-images.githubusercontent.com/1142765/170843078-2762d778-1872-407e-9934-db97de483d08.jpg [image: Calllog] https://user-images.githubusercontent.com/1142765/170843079-9f2bc590-2d4e-444d-ac71-595c3eee590a.jpg
— Reply to this email directly, view it on GitHub https://github.com/jberkel/sms-backup-plus/pull/1080#issuecomment-1140330648, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHG3HMBOSBPIOP6ZLQC2OEDVMKEKBANCNFSM5XHE7SHQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Could you please explain how I can get my version of smsbackup+ to look like and work like that? On my dual sim phone the app looks the same as before, no options as you show above
@Vaentus Sorry to come back so late. This is an (unmerged) PR, and it seems that no one is reviewing here.
You would need to do this: https://github.com/jberkel/sms-backup-plus#installation-from-source, instead of "git clone https://github.com/jberkel/sms-backup-plus.git" you would do: "git clone -b Cyber1000-multisim https://github.com/Cyber1000/sms-backup-plus.git", thats's this branch.
The resulting apk may be in another subdir and doesn't need to be installed via adb (can also be transferred somewhere on your mobile device and installed manually, if "unknown sources" are allowed). Don't know how deep (or if) you are in development.
@Cyber1000 It turns out I can make some code changes, but I can't push builds to Google Play or f-Droid, or make administrative changes.
I've squash-merged two white-space fix-ups (one overdue and one in your branch), and rebased the multisim branch onto the adjusted master branch; please fetch+reset before adding more commits.
@Vaentus you can pull the "multisim" branch from this repo.
@Cyber1000
Firstly thank-you very much for making a start on this.
I've been reviewing this code, and I'm a bit confused by the ICCID stuff.
As a user, I would naïvely expect that backing up would label each record with either the SIM's ICCID or its MSISDN, so that records are tied to a specific SIM regardless of which slot it's installed in, and that upon restoration, look to see if that SIM or MSISDN is currently present, and if so, write it into the connected call log or SMS database.
However it appears, looking at getUseIccIdForRestore
, that it's taking the ICCID from the SIM that's currently in a given slot, and putting that as the PHONE_ACCOUNT_ID
.
Is that how it's supposed to work?
(It occurs to me that there are broadly two ways to label the call logs and messages with the relevant ICCID or MSISDN: write it as an extra RFC-822 header; and/or include it in the IMAP label. For preference I would do both.)
@Cyber1000 It turns out I can make some code changes, but I can't push builds to Google Play or f-Droid, or make administrative changes.
I've squash-merged two white-space fix-ups (one overdue and one in your branch), and rebased the multisim branch onto the adjusted master branch; please fetch+reset before adding more commits.
Sorry for the very late reply, had a lot todo last year and no time for this, but now (new mobile with android 14) I got back to this.
Thanks for rebasing, I've fetched my branch again and done 2 commits:
merge commit to get the current master
I've found out that for my specific information I still need READ_PHONE_STATE on sdk>29 instead of READ_PHONE_NUMBERS, that was a bug I found out with android 11 - so I fixed this
For now I'm having the problem, that for iccID, I would need READ_PRIVILEGED_PHONE_STATE rights, which I don't get ( https://developer.android.com/reference/android/telephony/SubscriptionInfo#getIccId() ) - think I would need device-admin, so this works again with android 14.
@Cyber1000
Firstly thank-you very much for making a start on this.
I've been reviewing this code, and I'm a bit confused by the ICCID stuff.
As a user, I would naïvely expect that backing up would label each record with either the SIM's ICCID or its MSISDN, so that records are tied to a specific SIM regardless of which slot it's installed in, and that upon restoration, look to see if that SIM or MSISDN is currently present, and if so, write it into the connected call log or SMS database.
However it appears, looking at
getUseIccIdForRestore
, that it's taking the ICCID from the SIM that's currently in a given slot, and putting that as thePHONE_ACCOUNT_ID
.Is that how it's supposed to work?
(It occurs to me that there are broadly two ways to label the call logs and messages with the relevant ICCID or MSISDN: write it as an extra RFC-822 header; and/or include it in the IMAP label. For preference I would do both.)
Well you are correct, how it works for now:
Things to keep in mind:
subscription_id always seems to be 1-based number of the simcard (1 or 2), at least on all of my devices so far. PHONE_ACCOUNT_ID seems to be different:
That said on newer devices I may not get an iccID. After thinking about it I tend to stay with the current implementation, since on newer devices this new iccID-header may work or not. So it's better to just keep the order of SIMS. Don't know why getIccId worked with my samsung galaxy A70, since this more-secure-behaviour should be there since android10, maybe it's OEM-specific behaviour of A70.
added a commit, which makes singleSIM safer (actually queries for singlesim now use "1 OR subscription_id = ? OR subscription_id = ?", which leads to always true, for multisims it's " subscription_id = ? OR subscription_id = ?")
Any thoughs? For me and android 14 (multisim) backup works so far.
@Cyber1000 I'd like to clone your build & test process, and discuss project succession, but that discussion isn't really appropriate here. Could you please contact me privately at martin@kurahaupo.gen.nz
Added support for multisim (see #598):