Audio/video stream recording forums (http://stream-recorder.com/forum/index.php)
-   Removing DRM protection from eBooks (http://stream-recorder.com/forum/forumdisplay.php?f=63)
-   -  

How to find PID from Kindle for Android

(http://stream-recorder.com/forum/showthread.php?t=8931)

drsquash 05-01-2011 10:36 AM

How to find PID from Kindle for Android


 
hi there,

How can I find PID from Kindle for Android ?

And where are the books downloaded with Kindle for Android located on the phone?

/dr

mafro 06-01-2011 09:10 AM

Re: How to find PID from Kindle for Android


 
I'm still looking for where my PID is stored under Android.. But the PRC files themselves was easy:

SDCARD/kindle

fro

Stream Recorder 06-19-2011 02:32 AM

Re: How to find PID from Kindle for Android


 
DRM Tools Archive 4.0 includes a solution for Kindle for Android:

Quote:

Kindle for Android uses a different scheme to generate its books specific PIDs than Kindle for PC, Kindle for iPhone/iPad, and standalone Kindles.

Unfortunately, K4Android uses an "account secrets" file that would only be available if the device were jail-broken and even then someone would have to figure out how to decode this secret information in order to reverse the process.

Instead of trying to calculate the correct PIDs for each book from this primary data, "Me" (a commenter who posted to the ApprenticeAlf site) came up with a wonderful idea to simply modify the Kindle 3 for Android application to store the PIDs it uses to decode each book in its "about activity" window. This list of PIDS can then be provided to MobiDeDRM.py, which in its latest incarnations allows a comma separated list of pids to be passed in, to successfully remove the DRM from that book. Effectively "Me" has created an "Unswindle" for the Kindle for Android 3 application!

Obviously, to use "Me"'s approach, requires an Android Developer's Certificate (to sign the modified application) and access to and knowledge of the developer tools, but does not require anything to be jail-broken.

This is a copy the detailed instructions supplied by "Me" to the ApprenticeAlf blog in the comments. The kindle3.patch described below is included into the DRM Tools Archive
Quote:

Originally Posted by Me
A better solution seems to create a patched version of the Kindle apk which either logs or displays it's PID. I created a patch to both log the pid list and show it in the Kindle application in the about activity screen. The pid list isn't available until the DRMed book has been opened (and the list seem to differ for different books).

To create the patched kindle apk a certificate must be created (http://developer.android.com/guide/p...ning.html#cert) and the apktool must be build from source (all subprojects) as long as version 1.4.2 isn't released (http://code.google.com/p/android-apk.../BuildApktool).

These are the steps to pull the original apk from the Android device, uninstall it, create a patched apk and install that (tested on a rooted device, but I think all steps should also work on non-rooted devices):

Code:

adb pull /data/app/com.amazon.kindle-1.apk kindle3.apk
adb uninstall com.amazon.kindle
apktool d kindle3.apk kindle3
cd kindle3
patch -p1 < ..\kindle3.patch
cd ..
apktool b kindle3 kindle3_patched.apk
jarsigner -verbose -keystore kindle.keystore kindle3_patched.apk kindle
zipalign -v 4 kindle3_patched.apk kindle3_signed.apk
adb install kindle3_signed.apk

kindle3.patch (based on kindle version 3.0.1.70) is available on pastebin:
http://pastebin.com/LNpgkcpP

Have fun!


redballpoint 06-29-2011 05:21 PM

Re: How to find PID from Kindle for Android


 
thanks for the super-helpful post! linux users--mind the back-slash on the patch line. also, there's an updated apktool.jar available here: http://bit.ly/kdBzru (posted in comment #1)--version 1.4.2 was throwing errors on the decode.

happy reading!

cachibachero 11-25-2011 11:52 PM

Re: How to find PID from Kindle for Android


 
Hi, I am a Windows user and I cannot get to work the syntaxis of:

patch -p1 < ..\kindle3.patch

it gives me this:
'patch' is not recognized as an internal or external command,
operable program or batch file.

would you please give me some advice?
I have these files on C:\Kind:

C:\Kind\kindle3.patch
C:\Kind\apktool.jar
C:\Kind\apktool.bat
C:\Kind\aapt.exe

Thanks in advance

tim132 04-27-2012 12:20 PM

Re: How to find PID from Kindle for Android


 
Does anyone have time to explain this further, I don't really understand how to use these command lines. I'm using windows 7 and whilst I've modded my Galaxy s2 with custom roms and modded my PS3, xbox and Wii, I'm a little lost with this.

I have tried running the code using the terminal emulator on my phone but just get an error, although it does seem to begin to run, mentioning daemon is running, but then the error occurs

Any help would be highly appreciated!

p1r473 10-20-2012 03:56 PM

Re: How to find PID from Kindle for Android


 
The problem I am experiencing is that the version the patch was made for, 3.0.1.70, is not compatible with my books so I cant view the PIDs.
Also, opening any free books in this patched version crashes the app. So I cant see my PID anywhere. When I try to patch the latest version of the app with the patch, the interface is different in the latest version so the PIDs arent anywhere to be found


All times are GMT -6. The time now is 09:17 AM.