Category Archives: mobile phones

Titanium backup doesn’t restore on latest Android version

If you found the latest version of Titanium  Backup (now almost one year old with no recent updates…) cannot restore your apps data anymore on Android 10, this solution was found in the comments on the play store, by Stranger Stunts, published on 9/12/20.

Turn off “Verify apps over USB” in Developer Options, then turn off “Play protect” in the Play Store.

I didn’t test it properly but I remember last time I had such a problem I found a similar solution in the same fortuitous way, and it worked, but I didn’t have the idea to save it somewhere.

So I’m saving it on my blog for future reference.

Il Mio Pos di Setefi, Move & Pay Business che non se ne può più

Nel 2014 mi sono arreso al regalo alle banche all’obbligo di legge di attivare un POS per le attività commerciali, e l’allora offerta di Banca Intesa / Intesa Sanpaolo era la più conveniente, a 0.7% di commissioni bancomat, e 1.4% per carta di credito, con canone mensile di 2€, contro alternative “free” come SumUp e compagnia bella, che ricaricano una strepitosa percentuale del 2.8% su tutte le transazioni (veramente folle, ma non che le prime non siano comunque un latrocinio tutto considerato).

Da allora l’applicazione Android che si collega via Bluetooth al dispositivo iCMP Ingenico è stata aggiornata diverse volte ed è diventata esteticamente più gradevole, ma anche io ho aggiornato più volte i miei telefoni, e soprattutto di recente le mancanze dell’applicazione sono diventate debilitanti.

L’accoppiamento via bluetooth spesso diventa impossibile: se non funziona subito dopo la procedura di inserimento credenziali e pairing da Ingenico, allora è inutile premere RETRY/RIPROVA, disinstallare, cancellare i dati dell’applicazione, riavviare telefono e dispositivo… non andrà mai più.

Unica soluzione: Full Wipe/Hard reset/Rpristino impostazioni di fabbrica come lo si vuol chiamare.

Ma anche qui, attenzione! Appena configurato l’account google sul telefono così resettato, non si può mettere mano a titanium backup per ripristinare le applicazioni mancanti, perché così facendo Move&Pay riprenderà a dare l’errore di connessione fallita in fase di configurazione, e sarà tutto da ripetere. Bisogna per prima cosa scaricare e installare dal Play Store l’applicazione Il Mio POS (MAI ripristinarla da Titanium) e forse si sarà fortunati. Ma non basta, perché l’ultima volta che ho fatto questa tiritera (ORE per ripristinare tutto a puntino come voglio) comunque dopo alcuni giorni ha smesso misteriosamente di accoppiarsi via bluetooth, e tentando di riconfigurare l’applicazione è tornato l’errore.

A suo tempo, ingenuamente, pensavo fosse una defaillance del dispositivo Ingenico, e chiamai il servizio clienti per farmelo sostituire. Dopo tutte le domande di rito, mi venne detto “il suo telefono non è tra quelli supportati”, ma mi volete prendere in giro? Il bluetooth del mio telefono è diverso da quello dei modelli supportati e dal protocollo bluetooth standard universalmente riconosciuto? O è il vostro software che è una ciofeca?

Stesso destino evidentemente lo condividono le altre applicazioni simili: curiosando sul Play Store non ce ne è una tra quelle che si associano a POS bluetooth che abbia valutazione media superiore a 4 stelle. Addirittura il destino peggiore tocca alla versione per iPhone, che ha una media di votazioni sull’AppStore se ricordo bene di 2 stelle o meno. Ed ho potuto sperimentare io stesso: accoppiato e configurata l’applicazione, è andata a buon fine solo la prima transazione di prova verso me stesso, di 1€, perché alle successive, IMPOSSIBILE ripristinare la connessione. Stesso errore riferito dagli altri utenti.
….forse il mio muletto su iPhone 5 è uno dei modelli non supportati?

fix Android gallery timestamp from video image filename

If you copied the files from another phone, you will notice the new gallery will have all files to the same date of the copy operation.

Install BusyBox, and from terminal or better yet JuiceSSH onto local device, go to /sdcard/DCIM/Camera and do

for i in VID*.mp4; do busybox touch -t ${i:4:8}${i:13:4}.${i:17:2} $i; done;

for i in IMG*.jpg; do busybox touch -t ${i:4:8}${i:13:4}.${i:17:2} $i; done;

Supposing the filename is in the format

IMG_YYYYMMDD_HHMMSS.jpg VID_YYYYMMDD_HHMMSS.mp4

 

Import QR vCard with multiple words name and surname in Android

First of all: YOU CAN’T.

Now for real, there’s a workaround, just buid your vCard text to be rendered as QR Code by removing the spaces between the first name words, and the last name words (surname that you may like).

Example:

N:Johns Phillips;John Philip;;; (Last Name;First Name;;;)

becomes:

N:JohnsPhillips;JohnPhilip;;;

and then, in the address book editing form that appears in Android you just tap in the middle of the joined words and press space.

It will be MUCH faster than moving around in the fields the misplaced name components.

 

There is NO WAY to actually have a vcard data correctly formatted to be correctly rendered by a QR Code scanner and correctly passed to the address book.
If you used a correctly formatted vCard file to directly import it in Android address book, it will work (for example, first export a vCard file for a contact, and then reverse engineer it… but to actually copy the VCF to the phone for each contact and manually importing it would be time consuming and bothersome); but if you use a generated QR code from the vCard code, each and every QR scanner out there will pass the full name data to the address book as a single unformatted string, IGNORING the name components of the N field, leaving the address book parser to decypher which is which.

So, depending on how you go about hacking your way into the vCard format, you might get

John (first name) Philip Johns (middle name) Phillips (last name)

or any other weird combination, BUT the one you were looking for.

Believe me, I tried, and chances are, if you ended up here, you did, too.

In my case I spend on it much more time than I care to admit. More than I needed to actually code from scratch the PHP to generate the relevant QR code into my management software.

So just embrace this workaround, but if you find a solution, please Please PLEASE share in the comments.

Revert, undo & go back from adoptable to portable storage in android marshmallow

I replaced my previous 32GB microsd in my note 3, with a transcend 64GB, and the system asked me if I wanted to use it as extended internal storage. Why not, I never use the sd as swappable storage anyway, and I liked the encrypted storage.

Go ahead an hour, I notice the system filled up 30GB more than the starting space, just stealing it from the sd card for no reason. Also, after rebooting I get a message saying “system has stopped responding”, and swiftkey cannot load languages anymore, disabling altogether the swype function.

Great!

I fiddle for good 15 minutes into the settings, finding nothing apparent, until I went into:

Settings > USB and Storage > Internal storage > Options > Migrate

which was supposed to migrate the data from the sd back into the builtin storage.

I started the process and went to sleep (it was late) hoping to find it solved in the morning… too bad! Couldn’t do that, the morning after the internal storage was 100% filled, an error message appeared, and the 60GB sd was still hald full.

The system went from the original 16GB used in the internal storage, to a total of 30GB filled internal storage+roughly 30GB inside the external, which is 60GB used storage… for what? God knows! In the USB&Storage panel of the settings, the details of the used space still amounted to the real space needed, and nothing was there to account for the additional space taken that was reported in the summarized stats…

Hence, I tried copying all the contents from the sd/internal storage to the PC, with the intention of resetting everything afterwards and restoring the data, but using the USB communication resulted in a severely slow transfer speed (we’re talking about a 100Kb file each few seconds, and there were 12GB of data to move).

I tried several times to check and see if I could speed things up, to no avail, so I used the remaining free space on the microsd (I had that, if you don’t you may want to use an OTG cable and a pendrive) to create a ZIP archive (with estrongs) of all the contents of the internal storage, and as a single file like that I could then copy it to my PC at a decent speed.

Once that was done, I wend in settings > USB and storage > SD card > options > format as portable, agreeing to lose all data (I had backed it up anyway), then into recovery I wiped the internal storage, then rebooted to have the changes take effect, and from this state (internal storage almost empty, microsd seen as normal portable storage) I copied over the backed up contents from the previous configuration via normal USB transfer (some files and folders couldn’t be copied, but it was nothing essential).

Up until now eveything looks to have gone back to normal.

AFWall+ and Linux Deploy, no internet access unless firewall is disabled

This is a personal reminder and also an easier-to-find heads up to those looking for a solution: if you installed linux on Android via Linux Deploy, and find that, no matter how you set rules on AFWall+ you can never get internet to the mounted linux image, unless you disable the firewall altogether (not recommendable since you installed a firewall in the first place), then here is the solution provided in this thread (it’s all due to DNS calls being blocked without a possibility to make them pass through in the vanilla AFWall+).

Under AFWall+ contextual menu, open the custom script editor, and inser these lines:

 

$IPTABLES -A afwall-wifi -m owner --uid-owner root -p udp --sport=67 --dport=68 -j RETURN
$IPTABLES -A afwall-wifi -m owner --uid-owner nobody -p udp --sport=67 --dport=68 -j RETURN
$IPTABLES -A afwall-wifi -m owner --uid-owner root -p udp --sport=53 -j RETURN
$IPTABLES -A afwall-wifi -m owner --uid-owner nobody -p udp --sport=53 -j RETURN
$IPTABLES -A afwall-wifi -m owner --uid-owner root -p tcp --sport=53 -j RETURN
$IPTABLES -A afwall-wifi -m owner --uid-owner nobody -p tcp --sport=53 -j RETURN
$IPTABLES -A afwall-3g -m owner --uid-owner root -p udp --dport=53 -j RETURN
$IPTABLES -A afwall-3g -m owner --uid-owner nobody -p udp --dport=53 -j RETURN
$IPTABLES -A afwall-3g -m owner --uid-owner root -p tcp --dport=53 -j RETURN
$IPTABLES -A afwall-3g -m owner --uid-owner nobody -p tcp --dport=53 -j RETURN

making sure you preserve the line return after each RETURN since pasting directly into the tiny textbox of AFWall+ may lose the carriage returns.

BAM you will have internet from your android linux without having to disable the firewall. Naturally, you will also have to enable internet access to “Applications running as root”.

Update: as per Peter’s suggestion in the comments (thank you Peter!) if you still get errors with this approach you may need to add a couple more lines, like so:

$IPTABLES -A afwall-wifi-wan -m owner –uid-owner 5000 -j RETURN
$IPTABLES -A afwall-wifi-lan -m owner –uid-owner 5000 -j RETURN

where “5000” is an id you have to customize to your needs, and you can get it either from AFWall’s errors logs, or by checking the /etc/passwd file for the current user’s entry.

MyPhoneExplorer via Bluetooth: phone could not be indentified and parameter incorrect

Chances are that you are trying to have your Android phone sync with Outlook via MyPhoneExplorer, but whatever you do won’t work, since as soon as you try to connect, the procedure stops at “identification” and MyPhoneExplorer pops up a “phone could not be identified” error.

Syncing via USB cables works though, but you are not going to settle for something as annoying and remembering to plug in your cable everytime.

Update: try this first:
Chris, in the comments below (thank you, Chris), suggests doing this, which is apparently working in Windows 7 (Windows 8 doesn’t have such possibility):

Easier if you just go to control panel > hardware and sound > devices and printers > bluetooth devices

Then right click on the device you’ve already paired. Go to Services tab, and under Bluetooth Services there should be a checkbox for Serial port(SPP) ‘MyPhoneExplorer’.

Check it, apply, done…

If that doesn’t work, continue reading!

Compared to the first version of this article, when I was on Windows 7 + Ice Cream Sandwich, now I’m on Windows 8 + Lollipop, and started having this problem a short while after upgrading from KitKat. The solution was to open MyPhoneExplorer settings, select bluetooth in the connection tab, and choose, from the dropdown menu, the other Bluetooth port that was not selected before, and try again to connect, in my case it went by as normal.

If this doesn’t work as well, then proceed with the very first guide.

So let’s start by saying this out front: this is black magic.

You may have tried to go into “change bluetooh settings” in your control panel, then open the “COM Ports” tab, and manually add incoming ports and trying them out one by one in MyPhoneExplorer… this should not work, no matter how many times you reboot your phone and/or unpair/pair again with your PC.

The procedure I am going to illustrate may work for you, or it may not. It may do nothing on a sunny day of April, but deal impressive results in a foggy evening of november.

I tried to replicate the same method previously, but it worked for me just a few minutes ago as a blessing (and this is why I rushed to write an article about it) while it didn’t at my previous attempts, so these are the steps (keep in mind I have ICS on my phone, and Windows 7 x64 on my laptop, the BT sync worked before, but had stopped working after I upgraded from Gingerbread to Ice Cream Sandwitch on my Galaxy Note)

  1. Find your phone entry in bluetooth devices in Windows, click it and remove it
  2. Unpair with your PC from your Android phone
  3. If there are any remaining, remove every reserved port in “COM Ports” tab of bluetooth settings (unless there are other ports being used by other BT devices you own, leave those alone)
  4. Reboot both your PC and your phone, preferably at the same time (black magic, remember?)
  5. Pair the device from Windows (go into bluetooth panel, “add device”, then proceed with the pairing)
  6. Your aim here is to have Windows itself add the COM ports, you should end up with two COM ports, one Incoming, and one Outgoing, they should both carry the BT name you have given to your phone, and the Outgoing port should also say “MyPhoneExplorer”
  7. You should set MyPhoneExplorer to use the Outgoing port among the two, but if it doesn’t work for you, also try the Incoming port (black magic)

Good luck!

Convert a micro-SIM into a normal SIM card, just a knife without adapter

Sometimes you’re stuck with a brand new microSIM that you can’t use in your phone, because you need a normal form factor SIM, but maybe you had this chance to activate a special promotion that only came in microsim format.

Well do not despair, you can get a normal SIM (-ish) from a microSIM, just DON’T remove the microsim from its matrix just yet!

microsim converted inside it's credit card holder
This is what we are going to get at the end

width comparison between SIM and microSIM
Our micro-SIM in its credit-card like holder, compared to a standard SIM card

marking width on microsim holder
After aligning the correct contacts of SIM and micro-SIM, I used insulating tape to mark the side borders of the new SIM card

marking the outer borders of the SIM on the microsim holder
I did the same thing with upper and lower borders, aligning the microSIM and SIM through their chips

almost finished microsim sim conversion
This is the rough result after cropping the external borders with an exacto knife guided by a ruler, slightly bigger but centered nonetheless

microsim converted to SIM, adapted and rounded with dremel
After cutting the angle, I used a dremel to round the corners

The SIM card works perfectly inside my Galaxy Note, just slightly harder to plug inside but once inserted it goes as a charm.

Android ringtones notifications alarms resetting reverted or lost after reboot

You just added a few ringtones of your own to your android device, but after each reboot you lose them and they are set to something else, or muted altogether? Just like something was resetting them, or they were not saved correctly?

Well, most probably it’s because you copied the MP3’s on your SDcard, under

  • /ringtones
  • /alarms
  • /notifications

or even under

  • /media/audio/ringtones
  • /media/audio/alarms
  • /media/audio/notifications

(they all work as they should).

After a reboot, it may happen that for some reason your sd card takes too long to be mounted/scanned, hence Android cannot actually find anything in the specified folders, because they aven’t become available yet.

I wouldn’t know if there are any solutions to make Android mount your SD any faster, but a pretty workaround consists in copying those files directly in the internal memory. Ugly workaround if you ask me, since you’re taking away precious space for applications, still…

So, just take your desired MP3’s, and drop them in the internal memory (using a root file explorer, like ES file explorer), respectively in

  • /system/media/audio/ringtones
  • /system/media/audio/alarms
  • /system/media/audio/notifications

this way they will be treated just like builtin ringtones (you will actually notice the system ringtones in those folders, which you can delete since they are useless anyway, to save some space), and will be available right after boot.

Why Android sucks at managing battery drain and discharge

So here is my second rant about disliking Android.

I should mention now that I am a happy user of this OS on my HD2 since a while ago, after discovering that CalenGoo is a great substitute for Microsoft’s Pocket Outlook calendar, and that HanDBase in its Android version can be tricked into doing the same things of its Windows Mobile counterpart even if a key feature is missing.

So well, what I’m ranting about today is battery management, or should I say “Battery stats what the hell”?

Just a short anecdote: I went to sleep yesterday at 0:30am, battery percentage reading 58%, I woke up this morning at 8am (in the middle there was a scheduled Titanium Backup of modified data, followed by a reboot, and half an hour of scheduled WiFi with 15′ checks of 6 mailboxes, and obviously mobile network on). When I woke up, battery was at only 14%. Astonished, I deleted the battery stats and rebooted, after that it was reading 2% (!!!). To be noted, battery history, reported by Battery Monitor Widget, tells me that the battery voltage at the moment of getting in the bed was 3.85V, and when I woke up it was 3.79V. Also, the battery current output (which has an exact reading on this HD2, since HTC cares for stuff like this, unlike Samsung), is in a 4-7mA figure all night long, except only when Titanium Backup and mail checks kicked in.

All in all, considering the 2% charge reboot, my phone is telling me, or at least Android is, that it drained 56% of battery in a 7.5hrs period, without doing practically anything. Let’s shave off 10% due to the Titanium Backup and the WiFi checking (I’d say 3-4% is a more realistinc estimate, but oh well), it’s still almost 50% of the battery that disappeared for no reason.

Also to be noted that I put this battery in yesterday morning, it was 98%, and I used it all day long for some calls, a little web browsing in the morning, agenda activity, budget monitoring, and so on. It didn’t drain as much in a 16 hours span, than it did in 7.5hrs of inactivity during the night.
Now, obviously it DID drain more during the day, but Android tells me the other way around. My question is: WHY?

I have 4 batteries, I just swap them out when they are at 10% or so, and put in another charged one. This has led me to up to 4days uptime on Windows Mobile; sure these batteries have aged, but not so much to not even last a couple days with mild usage. Now I understand better what I wrote in this post, calibration does make sense, but only because of a HUGE Android shortcoming (and only if you, unlike me, ever use just one battery). Windows Mobile on this phone never failed reading proper battery, with no “stats” whatsoever.

Now, regarding mV: nominal voltage of a Li-Ion battery is 3.7V, but the charging voltage is 4.2V, so actually a 100% charged LiIon battery has a voltage of 4.2V (or rather 4199mV). That means, for the phone, that the battery was fully charged. As so, the discharged voltage is obviously not 3.7V, but lower than that. What the device (or software?) decides to be 0% is up to the manifacturer, a fact is that most LiIon batteries have a cutoff at 3.0V to prevent damage to the battery, some of them have a cut-off even lower, at 2.5V.

Let’s say it’s not safe to assume that 3000mV is our 0%, let’s say our “0% charge” voltage is 3400mV.

Now, please tell me, WHY is Android reporting 4% battery left (I just briefly attached it to the USB to sync calendar) when the voltage right now is greater than 3700mV? This would mean higher than 50% residual charge, which is just reasonable, since it was 58% before going to bed, and it did no more than 7% worth of stuff during the night, but Android will still insist for it to be 4%. This reminds me of something I read somewhere on XDA, about this user who had two batteries for his phone, a “vanilla” one with normal capacity, and an extended one with almost double capacity. Android would insist reporting 0% on that second extended battery based on the “statistics” of the first battery, thus forcedfully shutting down the device when the residual charge of the extended battery was at least 40%.
This is the stupidest thing I can conceive about a modern operating system.

And yes, I know the battery state of charge cannot be determined by voltage alone, because it is influenced also by temperature and kind of usage until that moment, but surely enough 3700mV is NOT 4% residual charge, it surely enough is more like 50%. We are not talking precise, 1% step-by-step measurement, but wide-range precision measurement. And there is a hell lot of difference between 50% and 4%, it’s called 46%.

The programmer at Google who coded these routines must be a guy affected by a severe form of OCD, and who throws away his gingerbread cookies 6 months before the expiration date, just to be on the safe side (pun intended). But you know, OCD guy, I like my batteries to last all they can instead of having your OS shut down my device a lot sooner than needed.

Which brings us back on track: “battery statistics”: what ARE they? Do they even make sense? How can a discharge cycle affect in any way the subsequent one? Maybe I was bored at work and read some manga keeping the screen on, maybe I was busy like hell and didn’t have time to play with the phone, maybe I was on a trip and out of boredome started watching an episode of Sex And The City after another. So what.
Again, Windows Mobile had no battery stats whatsoever, but never failed to read battery charge properly. Nor any 10-years-old Nokia phone had battery stats, but they still had LiIon batteries.

Yes, I also know what “battery lookup tables” are, and how they are useful in determining battery state of charge more precisely. But it’s clear they are not working at all on Android, and actually are anti-productive for those like me who swap out discharged batteries rather tan charge them inside the phone. I despise you, OCD google guy.