How are you counting writing passive? Sounds like it is the opposite.
All passive income require some initial work. Some more than others. But selling ebooks is something that can get you recurring sales just like "writing" apps, websites etc
You do something once and it earns income for a long time. It's no different than writing a program or building a website.
The kind of "passive" you mean would be truly awesome! Anyone an idea?