Something similar to this was brought up by at least one other person, but whatever.
The issue with it only being primary type is that there are a variety of missing SR types (Flying and Electric being prime examples of this). So I was thinking for a bit about this mechanic and then something occurred to me when I saw someone mentioning chosing whether it is primary or secondary typing. A way that this could be worked is if, similarly to hidden power, there were two versions of Stealth Rock: primary and secondary, with single-typed pokemon only being able to learn primary. However, unlike Hidden Power, this would have no effect on IVs, with the importable versions looking like the hidden power types ("Stealth Rock [Primary]" and "Stealth Rock [Secondary]" - this is similar to hidden power's importable version as it says "Hidden Power [Ice]" (or whatever type HP you choose to use)). This change would add a layer to teambuilding that I feel would be rather interresting, and there are some pokemon which really wish that they had access to their other type, such as Skarmory (as a Steel-type Stealth Rock is generally pretty terrible when it could have a Flying-type SR) and it would open the role up to so many users that would otherwise steer clear of the move. Sure there would still be a few types which would be Stealth Rock-free, such as Electric (unless you don't mind wasting a team slot on Stunfisk), but it would really open up the metagame to some wierder things like Cobalion, who would otherwise steer clear of this metagame as they were weak to common SR types and having a poor Stealth Rock of its own, changing from the the steel-type SR to the floating fists that people have been talking about.
Now, time for me to do one of these:
Entry Hazards (Normal)
Floating Fists (Fighting)
Pointed Beaks (Flying)
Acid Pool (Poison)
Potholes (Ground)
Stealth Rock (Rock)
Hornet's Nest (Bug)
Spooky Hands (Ghost)
Iron Ore (Steel)
Great Balls of Fire Molten Rocks (Fire)
Sharkskin Sheds (Water)
Thorns (Grass)
Static Trap (Electric)
Telekinetic Friction (Psychic)
Icicles (Ice)
Komodo Spit (Dragon)
His Dark Materials (Dark)
Glowstone Shards (Fairy)