Pulling libraries off Android phones

Well, have you ever wanted to pull a bunch of libraries off an Android phone? I bet you wish you could execute the command like this:

  1.  
  2. > adb pull /system/lib/*.so
  3.  

Sorry. A no go. What about this then:

  1.  
  2. > for file in `adb ls /system/lib/`; do adb pull /system/lib/$file; done
  3.  

Well, almost, but adb ls attaches the \n\r to the files. That wouldn't be a problem if adb pull didn't attach them to the names, so you have to get rid of the white space. This can work:

  1.  
  2. > for file in `adb ls /system/lib`; do adb pull `echo /system/lib/$file | tr -d '\n\r'`; done
  3.  

Yea. Enjoy.

  1. No Comments



css.php