Symthic provided the data files for Battlefield 4 (but the actual link to the data appears to be dead).
I don't think you can
I think it is not possible to get RAW gamedata of Battlefield 4. You either would have to break the law1, or ask DICE (LA) for the original data.
Checking out the game files yourself
I have looked in the Battlefield 4 files that I have on my pc. I did find some files that I suspect store the data in them, but like almost all the game files, I couldn't open nor read these files. These are most likely datafiles that were generated when the source code were build to the actual program that runs on your computer.
For example, I found
\Battlefield 4\Data\Win32\XP0Weapons.sb
and
\Battlefield 4\Update\Xpack3\Data\Win32\XP3Vehicles.toc
I suspect that these are files that are read by the .EXE
application when the game is started. But outside of that, there would be no other programs that can read them.
Reverse engineering
So if you would like to retrieve information directly out of Battlefield 4's yourself, you would have to reverse engineer these files. This however is impossible without violating Battlefield's 4 EULA1:
Except to the extent permitted under applicable law, you may not decompile, disassemble, or reverse engineer the Software, or any component thereof, by any means whatsoever.
So how does Symthic does it?
I'm really not sure. My guess is that either they have received some special license that allows them to reverse engineer the software, or they received the RAW game files, the original source code and data DICE (LA) created, before the game was build.
I have searched Symthic's site and forums for more information regarding their source, but I was not able to find any, except their claim that "BF4 info is taken directly from the game files". Outside of Symthic I could also not find any solid proof for accuracy and trustworthiness of Symthic's data.
Footnotes
1. I am not a lawyer, this is not legal advice.
Took me some fiddling but I found how to find your unlock progression for weapons. For some reason, the BF4 battlelog doesn't open this when you click on your weapon from the stats page (like it did in BF3).
To access the unlock progression of a weapon, click on soldier, then Unlocks. By default, this shows a page with all your unlocks like this:
After selecting a weapon, if you mouse over any attachment, it will tell you your progression in (X out of Y kills for the unlock). The orange bar helps too.
As for what is in the battlepacks, they are random attachments for the weapons + XP Boost from what I could see when I got them (same for my friends). The main difference from the levelling battlepacks is that the levelling battlepacks seems to give you attachments for random weapons from your inventory (even some you haven't unlocked yet).
Best Answer
Weapon accessories are unlocked on the number of kills with that weapon.
Below is a screenshot from my Battlelog on my M416 progression:
You can also unlock items with battlepacks.