Category Archives: mobile phones

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.

Why Android sucks for professional use

UPDATE at the end of this post.

I tried many, many times to switch from Windows Mobile to Android, and every and each time I went back to Windows Mobile. Honestly, I would like to upgrade, because my HD2 won’t be enough forever, and no new phone gets shipped with a shiny Windows Mobile 6.5 OS anymore. Funny enough though, Windows Mobile allows me to do a better job.

Lt’s start with the calendar:

  1. Builtin calendar app is pretty much useless, under certain aspects even more useless than the primitive calendar found in old-ass Nokia phones. You cannot either jump to an arbitrary date of your liking, but have to interminably scroll through months, and you cannot search through entries for a name, a number or a place (at this point I might as well get myself a paper agenda, at least that’s got a vintage sexy feel to itself);
  2. Half-hour time separation is out of the question, unless you’re using the paid Pocket Informant, each and every calendar defaults to whole hour appointments and starts appointments at o’clock’s;
  3. Search is, all round, an impossible function, I couldn’t even find it inside Pocket Informant (it relies on the OS builtin search function in Windows Mobile, too); a couple of free apps from the same developer should provide it, either Searchify that hooks onto the builtin search widget, but I couldn’t make it work, or Touch Calendar, which is a viewer only, and sports a -working- search function, that alas won’t get you any results before the few past months, even if you have records of appointments dating back to 2005;
  4. Calendar access is slow, no matter the application, when you load a month you could be counting up to 1 second for the “busy days” to get displayed depending on the application, and we’re talking about a 1GHz CPU with 576MB of RAM (my oh so old Casio Cassiopeia was instaneous on that aspect);
  5. Maybe I’m forgetting something, but the bottomline is that Pocket Oulook had a better calendar on PocketPC 2002 than any app for Android can offer, and that’s a heavy fact, so try and tell me I’m wrong.
  6. UPDATE: I discovered that Android *chooses* in your place to simply discard anything in the calendar which is more than 2 months old; no setting, no option, no nothing to let you choose to keep your frigging data on the phone even if it dates back 10 years. Do I need to say more?

Let’s go on to office suits, and more notably to Excel support:

  1. Google gives NO builtin spreadsheet support, unless you have a data plan, the area you’re in is covered by your carrier, and you’re totally fine with sharing your private data with google apps;
  2. There are several free alternatives to a commercial spreadsheet: some just don’t read XLS unless in the paid version, some will open it read-only, some have no XLS support altogether;
  3. NONE of the spreadsheet applications in the market (I tried them all, free and commercial) has the ability to immediately show the SUM of the values inside a selected column inside the statusbar, like we are used to with desktop applications, and like I’ve been used to since (again) PocketP C2002;
  4. Again, also in this aspect the bottomline is that no spreadsheet app whatsoever keeps up to the Pocket Excel bundled wih PocketPC 2002.

This may be for a small group of users, but no application can do half what can do HanDBase on Windows Mobile, not even HanDBase’s native version for Android, and that’s for certain it will stay forever like this.

But don’t falther readers: if you want to count the meters you travel in a workday, or manage your own virtual cafeteria, or just slingshoot birds with anger management problems against a castle full of mutated legless green pigs with moustaches and helmets, then Android just shines at that, and will do it gloriously while passing all your private information to Google for free.

Windows Phone 7 may be the alternative, too bad you just can’t synch offline, but need to again send your private data to Microsoft’s servers, while there’s a workaround on Android for this.

UPDATE (6 Oct 2011): so here I am, writing while finally using Android as my main platform. I had to go far until I managed to do all I needed, but overall I have a platform I don’t really loathe anymore:

  1. Calendar: CalenGoo manages to do all I need, notably has a good search function and a nifty time-separation default set; having DroidWall block everything except those things that absolutely need an internet connection, I prevented old calendar events to be deleted, and this way I can also avoid my data going to the cloud, while keeping it in synch with MyPhoneExplorer; it’s still a tad slower than PocketOutlook, but I can manage.
  2. DocumentsToGo is decent enough in handling XLS files, even without any “sum on column select” function, but I added a formula somewhere in the sheet.
  3. HanDBase finally returned as good as new when I implemented some additional calculated field in the rows, enabling me to see stats that I couldn’t calculate otherwise.
  4. Stock phonebook is ugly enough, but GO Contacts EX is promising, even if hella slow to start.

Li-Ion battery calibration, funny myth? Personal thoughts

I regularly lurk over at XDA since I started -happily- using my HTC HD2 Leo (actually, I just brought it to a collection center for warranty servicing… dead touchscreen, sigh). Since then, I began reading about “funny” practices regarding lithium ion battery usage to prolong their life. Even before that, when I still used older pocketpc’s (namely, iPaq’s) I would always run down the battery to about 30% and then recharge to full, and I avoided at most to recharge before it was “time”; on the other hand, you can often read guides saying that LiIon batteries get better the more often you recharge them, and get worse the bigger and less frequent the charges (sure, now tell me your laptop battery improves by always using it attached to the mains charger…).

Following is an excerpt taken from here (I suppose these are pretty standard steps, I’ve read similar ones on some XDA threads):

  1. Run the device down until it turns itself off.
  2. Turn it back on and wait for it to turn itself off again.
  3. Remove the battery for 10 seconds.
  4. Replace the battery, but leave the device off.
  5. Charge the device until full and then for another hour.
  6. **Root users only** Using a Terminal Emulator, type “su” enter, followed by “rm /data/system/batterystats.bin”
  7. Run the device’s battery down until it turns itself off.
  8. Turn the device on and charge for at least 8 hours.
  9. Unplug the device, turn off, then charge for another hour.
  10. Unplug the device, turn on, wait 2 minutes.
  11. Turn off again and charge for another hour.
  12. Restart and use as normal.

Now, the least of my intentions is to criticize their work in any way (believe me), yet, personally (very personally) I think you could insert in any place in that list the following statement:

  • Dress in a striped white and greenish scottish skirt, and, while wearing ONLY that, during a full moon, jump yelling “IIIOOOONNNN” around your charging phone

and it would perfectly fit in the overall mood of said list.

On a side note, when the charging device says it’s full, it stops sending energy to the battery, so for any kind of purpose you could leave the charger attached for a whole day after the led got green, it won’t really make any difference.

I am an extreme case, and I know it, but I can very honestly report my experience: I have the standard original battery, and I bought off chinese eBay other 3 clones (1230mAh, perfectly identical to the original except a slightly tinier barcode), together with a desktop charger.

I use the phone until it runs down to ~20% (lately down to 10% or even 5% if I’m doing something I don’t want to interrupt, like reading manga) at which point I take out the battery, and put inside the next charged one (I have them numbered, from 1 to 4). The drained battery goes straight inside the desktop charger (or in my pocket, until I get back home).

I rarely use the car charger, but I kind of regularly use the phone inside the car as MP3 player/navigator.

I have gotten, on very light use, up to 4 days uptime. Yes, you read it well, FOUR days uptime; I may have used it very little, yet it’s still 96 hours. Are you going to tell me that with those tricks you read about it could’ve lasted even longer?

  This article has been Digiproved

How to build a solar panel charger with LiIon battery backup and USB output

Ah, solar power. The tingly feeling of getting free energy and saving the environment.

My HD2, the HTC phone/device I own at the moment, has its own reserve of four batteries to switch in case I need to make an intense use without a mains plug handy, yet I wasn’t satisfied as I didn’t have a renewable source of energy for charging it if those batteries died altogether, namely a decent solar panel; let’s face it, the solar chargers you see on eBay simply suck, they are built around teeny tiny solar cells capable of maybe 40mA @ 5V, and actually have an internal battery which does all the job, and that you’re supposed to charge at your mains at home before going out, because the builtin panel is going to take a couple of days in full sunlight to fill that battery, let alone being able to charge both backup battery, and phone battery, while you’re using your phone, which is actually the ideal usage scenario, as you’re going to need the backup battery when there is no sun, during the night.

My first attempt at building a solar charger was by using a 1W (5V@200mA) solar panel, that was exactly the same size of my HD2, but wasn’t enough in my opinion, since movie playback takes more than 200mA for itself, and there is nothing left to charge the phone. So I have that one set aside (and for sale, if you’re interested), but then I discovered this solar panel that outputs 700mA@5V, obviously bigger, but that is what I needed to playback movies, and at the same time charge both the phone battery and the charger internal backup battery.

So this page is a chronicle of my experience, and a DIY tutorial about building such contraption with the smallest expense possible.

First of all, the shopping list:

  1. Digital multimeter to check the project as it develops, to avoid discovering any mistakes when it’s too late
  2. Soldering iron
  3. Hot melt/hot glue gun, you wll be using at least a full stick of glue
  4. Solar panel (obviously), the bigger the better. You need a 5V model (higher voltage models are fine only if you add a voltage regulation circuit which I am not going to cover in here), and buy the one with the biggest current rating available, my 700mA one is pretty impressive in itself but you may be able to find better. You can go with lower output, but then it makes no sense to add a backup battery because it won’t be powerful enough to charge everything
  5. “Naked” female USB-A port, you can easily take it out off an old, not working motherboard, or hub
  6. Electrical wires, preferably in the standard colours red and black, but as you can see I used white and green since I only had those spare, as long as you remember which colour is which polarity (in my case, white is positive and green is negative)
  7. Two Schottky diodes (to stop the backwards flow of current to the solar panel and from the solar panel to the battery; you don’t need to buy them, just desolder off an old motherboard, an old phone charger, whatever
  8. A LiIon battery, my choice fell on a 18650 “Ultrafire” 3000mAh battery, but anything 3.7V with decent capacity is ok, really
  9. A protected charging circuit (a circuit that takes a variable voltage input and outputs static 4.2V, and has “flowback” protection, I got it by disassembling an OEM desktop charger for my old Nokia batteries); in alternative, just buy a “protected ultrafire”, costs more but delivers both things in less the hassle; in this case you will need just one diode.

Here is the step by step photoguide:

monocristalline solar panel 700mA 5V
This is the panel I bought, roughly 16x16cm, big, but a little powerhouse
18650 ultrafire 3000mAh
The Li-Ion battery I bought, it's a 18650 stylus battery, 3000mAh capacity, more than double of my own phone's battery
Li-Ion charging pretected circuit front
Front of the internal board I took off a desktop LiIon charger
rear liion protected charging circuit
The rear of the charging board, I soldered my own wires, I can still use the nokia small plug to power it; later I also soldered new wires for the battery output
female USB-A connector
The polarity of the USB-A connector; for it to be recognised as a charger, you need to short circuit the central pins, that are usually for data, by tinning them together
solar panel charger backup battery scheme
This is the sexy hand-drawn electrical scheme of the whole charger; after drawing it, I realized that the diode marked in red is not necessary, so I wasted one piece of electronics, no big deal; UPDATE: there is a diode coming out of the positive pole of the battery, this is to prevent direct-flow of current into the battery from the solar panel, so that the battery is charged only by the protection circuit. If you use instead a protected UltraFire, the battery will be directly in parallel to the panel, so you won't need any additional diode.
rear solar panel diode and female usb
This is the basic version of a solar charger, without battery backup system, it gives 5V output from the USB port blocking back flow of the current inside the solar panel with the diode
solar panel protection diode
You can see through the hot glue how the diode is soldered; it comes out of the positive pole of the panel, and the white stripe is located on the far side from the panel
two diodes on the solar panel
Here I added another diode thinking it was necessary for the back flow protection to the backup battery charging circuit (which happens if the battery poles go back into the power input of the charging circuit, in a failing attempt of the battery to charge itself); anyway, the first diode is enough to prevent it. The soldering stinks and I know it.
negative pole 18650 soldered
I was able to tin the wires to the negative pole of the ultrafire battery, it's not very solid but a little hot glue helped out
hot glue on 18650 negative pole
Here, a slab of hot melt glue on the negative pole, to keep the tinning in place and isolate it
spring for positive pole of 18650 battery
I literally wasted half an hour trying to tin the positive pole of the 18650, with no luck; in the end I devised this ugly spring, by attaching a small piece of metal to the wire...
18650 positive pole with spring attached
...and then applying it against the positive pole and keeping it there with hot melt glue... it worked!
solar panel charge with battery backup rear
After sticking all the components to the rear of the panel (I used more than a stick of melt glue) this is how it looked like
solar panel charger front look
This is how it looks from the front... nothing different, you can barely see the led and usb port on top
detail charging led and usb port solar panel charger
This is a close detail of the area where the charging led and USB port lie
solar panel charger with backup battery in action
This is the reward for the hard work: solar panel at sunlight (not direct sunlight but enough); you see the detail of both the charging led being lit green (which means the charging circuit is powered by the solar panel, and the backup battery is fully charged, otherwise while charging, it would be lit red), and the HTC HD2 with the lit orange charging led

UPDATE (9/29/11): several visitors asked me how to change the procedure in order to build a vanilla solar chager with no backup battery; easily done: take the circuitry scheme above, ideally remove the part regarding the battery, the charging control PCB, and the cables coming and going to these, and you’re set.

UPDATE (11/4/11): mpigio in the comments pointed out a serious flaw in the electrical scheme: the protection circuit was useless, since the battery was directly in parallel with the solar panel; I just added a diode coming out of the battery, so this is finally safe.
On a side note, as other pointed out in the comments, instead of digging for a recharging protection, you may just buy a protected 18650, that is a battery that has its own integrated protection circuit.

UPDATE (11/9/11): adding here something I needed to clarify in the comments more than once. Obviously, with no sun whatsoever, it’s the backup battery that gives the output voltage: this will not be 5V like a normal USB port, but at max 4.2V, and down to 3.7V or even less. Now, most devices should still consider this as a valid charging voltage (my HD2 did) even if for technical reasons they won’t charge up to 100%, but someone in the comments reported about it not being enough for a GPS navigator, which didn’t consider enough even the 4.8V that four 1.2V AA rechargeable batteries in series gave; in this cases it’s needed a voltage regulator (of the “boost” or “step-up” kind) that can take lower, variable voltages and always outputs 5V, so you can connect it to the USB port. This component should be safe to be the last and only one connected to the USB port, so that both solar panel and backup battery converge into it, and only a regulated, constant 5V output is given from the port.

 

With this setup you can charge anything which has a USB charging cable, be it iphone, ipod, ipad, mp3 player, every htc phone… you can even attach a USB hub to it if the panel is powerful enough, and charge more than one device at the same time!

Since the desktop charger had its own charging plug, I can use a standard Nokia charger to charge the backup battery.

Dual sim mod for HD2, how-to, and disable auto connection setup

HD2, great phone, really. Shame it’s not dualsim, and no wonder there are people wanting to make it work with two different mobile numbers. Same thing did I, and this guide is to recount my findings, especially thanks to the italian member mannyy at XDA forums.

First things first: do NOT buy the insanely expensive adapters you find on the internet, it would be plain stupid to spend 70 euro on a little piece of plastic, when a full-fledged dual sim chinaphone with TV, radio, camera and bluetooth costs less than that.

There are two kind of dual-sim adapters on the market, no matter the brand, the “cutting” and “no cutting” versions, where either you have to cut the chip out of the SIMs to insert the in a single adapter, or you plug both integer SIMs into a bigger one without having to cut anything. The adapter I bought off ebay (the auction has been cancelled in the meantime, but you can find it from chinese shops on the internet) is the Magicsim “iphone 3g dualsim” no cutting, but I also own a Magicsim 23th-A cutting, which I have been told by mannyy at XDA that works correctly on the HD2 as well; the 26th should work as well.

magicsim 26th
This is the MagicSim iphone 3G dualsim; I spent 8USD something on it, including shipping from China
magicsim 26th hd2
Peeled off the cover from the adhesive strip, adapted both SIMs, this is how the MagicSim fits into the HD2
HD2 back metal cover
Interior of the metal back cover of the HD2; I marked the areas where the second SIM, and the chip, overlap the embossed metal frame, hence you cannot close the cover; you will need a diamond bur mounted on a dremel, or equivalent, to drill out those parts of the frame

As you can see, I didn’t actually drill the cover interior… in fact, in the end I avoided using the dual sim adapter at all, because I use my “SIM1” for my job, and since it goes offline when I switch to the other SIM, I’d rather not lose important work calls while I’m doing personal calls, this is why for the time being I will keep using a second phone for that.

Now, onto the operational part.

dualsim hd2 menu1
Main menu of the dual sim adapter; just tap on either SIM1 or SIM2 to switch between them; the one with the asterisk is the currently active card
Dualsim hd2 menu 2
This is the second level menu under "Dual mode"; make sure you have "STK mode" selected and DO NOT activate 007 mode

WARNING: DO NOT select 007 mode from the Dual Mode menu!!
007 mode is very useful in those phones that support it, since it doesn’t replace the SIM card menu, and you can switch between the SIMs by dialing either 001 or 002 and then hanging up, which is undoubtedly faster than going everytime in the menu; to disable 007 mode, you’d have to dial 007 and then hand up, and the STK menu will be back. Yet, the HD2 does NOT support 007 mode, you will get stuck into it and will not be able to disable it nor switch between SIM cards, so if you are silly enough to activate it even after reading this, there’s a way that worked for me: put the adapter inside another phone, and try disabling it by dialing 007, calling and then immediately hanging up. For me it didn’t work with a Nokia 3310, but it worked with a Nokia 7210, so I could disable it succesfully. I also wrote a mail to MagicSim support, and Cindy from their support (I always wonder why chinese people working in helpdesks always have american names) sent me a documentation doc, which says to create a new contact in your phonebook, called 007 and with number 007, and then save it to SIM memory (not phone memory), and it should switch off 007 mode and go back to STK mode.
Another method contained in that DOC file, was to switch from 3g mode to GSM mode in the phone settings, and reboot the phone, then the STK menu should reappear… but in my case, I already had 3g disabled.

Dualsim hd2 menu 3
Make sure that "Not connected" under "NO. Hide" is disabled, like this

Another detail to keep in mind: I do not have any data plans on my phone, so I have 3g disabled, to save battery, hence what I’m going to say could change for those with 3g enabled. Under the “NO. Hide” menu, make sure it says “Not Connected”, instead of “*Not Conneted” (in other words, there must be no asterisk). If I enable that (asterisk shows), when I switch between the cards, the phone sayd there is no SIM card, and cannot complete the switch, and I have either to reboot the phone, or activate and deactivate “Airplane mode” to reboot just the radio. If instead I have no asterisk under this option, the switch between SIM cards completes succesfully in about 30 seconds.

Disable Automatic connection network setup

Now, the next worst problem I faced, is that whenever I switched SIMs, the phone automatically started the network connection setup with my mobile carrier; I do not have any data plans, so if the phone has the ability to connect to the internet via the SIM, it means I waste a lot of money, so what I did before, once per ROM flash, was to wait that the connection setup finished, then go into:
Manila settings > Wireless > Menu > Connections > Advanced tab > Network selection
and from there make sure that both entries read “Office network”, that way the Edge/3g connection of the SIM card is never used and I don’t waste money.

Yet, when you continually switch between the cards inside the dualsim adapter, the auto connection setup always kicks in, and other than a bother to the eye, it also compells you to go into that wireless settings loop each time to select “Office network”. Not feasible. You need a way to disable altogether the network setup wizard.

EDIT (28th Sept 2010): you can ignore the last paragraph of this guide, I was overdoing it; member xlr8me at XDA found the “easy” way: from Manila settings, open the Communications Manager, then Data Connection, and from the menu button untick the “auto-configuration” line.

The app that configures the network is /Windows/ConnectionSetupAuto.exe, which you cannot delete/rename, because it is in the ROM, so unless you want to cook it out of the ROM yourself, all you need to do is make sure nothing runs that exe, no matter what. A quick repulisti of the registry did this for me: I used DotFred’s Advanced Task Manager registry editor, searched the WHOLE registry for values containing the string connectionsetupauto and made sure to delete whatever upper folder contained a key with a value matching that search, TOGETHER with the other keys contained in that upper folder; quite harsh I agree, but it worked for me, so I am not going back. Another more conservative way would be to manually change the paths inside the keys pointing to that exe file, by adding, for example, .off at the end, but as I didn’t test it, I cannot really guarantee it will work.

  This article has been Digiproved