I lived in Osaka, and recommend it unreservedly. Osaka is quirky, unique, friendly, less self-conscious and try-hard than Tokyo. But if you only have a short time to see the south part of Japan, you may not make it there. Go to Kyoto, for sure, it is quintessential Japan--go to Kiyomusu-dera and the Silver Pavilion. Also Hiroshima, for the A-bomb museum and the Shinkansen (high speed train) that you can take to get there. Plus Hiroshima is near Miyajima, which has the most famous torii in Japan and also wild monkeys.
Eat: okonomiyaki, yakisoba, takoyaki, tempura maple leaves, sweet red beans, sushi from an all-you-can-eat conveyor belt place, ramen from a street stall, kaiseke in Kyoto.
Drink: umeshu (plum wine), matcha, sencha (green tea), awamori (Okinawan rice wine), shochu (liquor)
Stay at a ryokan, a traditional hotel with tatami mats and futons on the floor. Also traditional Japanese baths. If you can go to an onsen, a public bath, do so, they are wonderfully relaxing.
Bring hand sanitiser; the toilets in touristy places are revolting. People on the street will try to give you advertising leaflets along with little packs of tissues. Take them; you will need the tissues. There is no toilet paper in the public toilets. Also, a lot of them are squats.
"Sumimasen" can mean anything from "I beg your pardon" to "Get the f**k out of my way"
When you go into a restaurant, it's customary to indicate how many people are in your party by holding up the corresponding number of fingers. That saves the trouble of trying to explain that you'd like a table for two.
Use the subway to get around. It's pretty easy to navigate and the cars are air conditioned. It's going to be brain meltingly hot there in August.
See if there are any festivals you can go to, and get yourself a yukata to wear to them. Kimono cost a small fortune, but yukata are also beautiful, much cheaper, and more comfortable in the heat. Summer is festival season and everyone wears a yukata.
I'll stop there, though love Japan so much I could go on and on. You're going to have a great time!