You should at least tell the detective that you know your friend took the bike because if your friends wants to blame you, he easily could and then it would be your word against his. Also, if the detective eventually figures out it was you, then you'll be in a lot more trouble for lying. If you're only 10/12 years old, chances are you won't get in trouble but you will get a stern talking to so you don't do this again. Usually it's officer discretion as to whether to press charges are not, but I think as long as the boy gets his bike back things will smooth out and you'll be fine.