Thursday, April 2, 2015

streaming - Can I use my PC as an audio device for my Android phone?


I know it is possible to play music from my Android using the PC as the output device. This takes place over the local Wi-Fi network. However, the solutions given here don't work for me, since they are limited to playing music files, and one isn't even available in my country.


Is there a way for me to connect the Android and the PC, such that all sound the device generates from any application uses the PC as the output device?


I do not have Bluetooth on my PC, though I'm aware that if I did, I could probably use that.


I have Jelly Bean 4.1.2 on a rooted Droid RAZR MAXX, so solutions requiring root are OK. Though I would rather not replace the firmware if I can avoid it. It's also OK if the solution involves the USB cable.




system - Is it possible to write to a device's clipboard using ADB?


I am interested in learning how to write to (and if possible, read from) a rooted Android device's clipboard.


I hope to do so using ADB over USB and I am not interested in installing any apps to help me do this, as this is something I plan on rarely doing.


Any suggestions or help guiding me in the right direction would be greatly appreciated.




Answer



Yes, you actually can do this. It's kind of kludgy looking when you inspect the clipboard, but it works just fine.


First off, you can inspect the current clipboard contents with service call clipboard 1 from an adb shell (or, without shelling in first, adb shell service call clipboard 1). It may start out initially blank after a reboot, for example:


# service call clipboard 1
Result: Parcel(
0x00000000: 00000000 00000001 00000000 00000000 '................'
0x00000010: 00000000 00000000 '........ ')
#

You can put text into the clipboard using service call clipboard 2, which basically takes 3 parameters - two ints and the string you want to put on the clipboard:



# service call clipboard 2 i32 1 i32 0 s16 "Hi there"
Result: Parcel(00000000 '....')

To be honest, I'm not sure what the first two parameters are. One answer on Stack Overflow has suggested the first int is "number of items in the parcel" (one in this case) and that the second is the length of the string. However, I've used 0 for the second parameter and it works fine, and I can't find any documentation that matches up with this particular function...so take that for what it's worth.


In any case, it's basically creating a Parcel object with 3 fields, then passing it into the clipboard. The clipboard then unpacks the Parcel and sets the string value passed in as the clipboard's contents. You can see this when you go to retrieve the value afterwards:


# service call clipboard 1
Result: Parcel(
0x00000000: 00000000 00000001 00000000 00000008 '................'
0x00000010: 00690048 00740020 00650068 00650072 'H.i. .t.h.e.r.e.'
0x00000020: 00000000 00000000 '........ ')

#

Similarly, if you long-press on a text entry field and hit "Paste" after doing this, you will get the text that was set via the call service clipboard 2 line above (and it will look completely normal).


(The above examples come from my HTC EVO, running CyanogenMod 7)


Wednesday, April 1, 2015

applications - How to list my recently updated apps



I would like to be able to see a list of my apps sorted by the date the app was last updated. Descending order is preferred, but honestly I'll take anything.


One use case: Earlier today I had two apps show they needed an update. Neither was one that I use daily, but both were important enough to me that I knew I wanted to update. Unfortunately, my phone crashed shortly after the update and thus the notifications are gone. I cannot for the life of me remember what both apps were. (I blame my advancing age. I remembered one of them.) I know I wanted to check out the changes, but since I've no idea what app it was, I don't know where to look.


I could open up every one of my apps in the Play Store and look at the updated date, but I've get well over two hundred apps on here and that is impractical.


Do you have a technique or know of an app that would help me?



Answer



As of version 4.3.10, the Google Play Store now has a "Recently updated" section under "My apps", which is ultimately what I wanted.


rom flashing - Can not re-sign Android system app without app crashing (using LineageOS)


I have re-signed all system apps of LineageOS with my own key and have replaced them all before the first boot. LineageOS boots normally but then all re-signed system apps crash with an error like:


SystemUI stopped, Settings stopped.


The screen stays dark. It seems that the re-signed system apps are unusable. Maybe I made some mistake or LineageOS has some anti-tampering check implemented?


What i have done: I opened all system apps with the winrar zip manager and removed the CERT.RSA and CERT.SF files in each META INF folder and deleted all the names and SHA-256 digest entries in all MF manifest-files. Also all other apk for example, in the framework folder, like the framework-res.apk file, I edited them like this. Then I created a keystore with Key, using the Java keytool, I think this is self-signed. Then I signed all APKs with the Uber Apk signet tool and successfully performed zip-aligning. Then I flashed Lineage OS with TWRP on the phone. Before the first boot, I deleted the system apks with the TWRP file manager and replaced them with my self-signed ones. Uber-Sign-Tool: https://github.com/patrickfav/uber-apk-signer


Picture of the error: https://imgur.com/a/hAwsJuO



Thanks for your help


Mike the android-noob


That's why I did that: https://www.reddit.com/r/LineageOS/comments/9z728h/how_to_change_frameworkresapk_without_bootloop/


UPDATE (thx Zillinium): I have now adapted with the TWRP terminal chmod with the following commands: Before I adapted chmod I checked everything with ls -l. Then I adjusted everything as it is right in the system so for me: chmod 644 for system-apk's and the apk-folders and chmod 755 for the /system/app and /system/priv-app folders. Now I'm stuck again in BOOTLOOP when i edit chmod :(((


The chown-Settings were already on root. Also i tried chown 0.0 -R and chcon u: object_r: system_file: s0 (see also installing apk in /system/app with android 5.1 or higher (simple adb push doesn't work anynore) push does) I stuck again in BOOTLOOP when i edit chmod :(((


There are no Odex files available.


Why i can edit without problems the AndroidManifest.xml from all Systemapps if i keep the original signature except at the framework-res.apk. Does anyone know why it dont work with the framework-res.apk?? The only way i find which works is to turn off signature verification in the whole system, but this is bad for the security.




can't use adb shell in recovery mode


I have a china tablet named Quest. I have accidentally repeated pattern lock more than 5 times. Now I have also forgotten the email address.


So for a factory-reset of my tablet I simply booted it into recovery mode. But it shows an Android bot lying with red exclamation mark. After a spending hours I found a shortcut i.e, vol + and power to access recovery menu. But my tablet doesn't go to recovery menu even when I pressed the keys.


So I simply connected my tablet to my pc via USB and installed drivers. In adb command prompt I typed adb devices. Now my tablet is listed as 20110301 recovery. I can simply use only adb pull, adb push, and reboot commands. But I cant access adb shell to unlock my tablet: it simply says exec '/system/bin/sh' failed: No such file or directory (2).



What can I do?




How do I configure Dropbox in my Galaxy S III so that it does NOT automatically upload every photo/video I take?


How do I configure Dropbox on my mobile - Galaxy S III so that it does not automatically upload every photo and video I take?




internal storage - Phone memory full and it shouldn't be


I have a weird problem with my android phone: for some reason, I'm getting a 'Low phone memory' error message, and before getting the message the phone was slow and unresponsive.



I have 2 GB internal storage; in the app manager, it says 1.2Gb used, 27Mb free. Where did the rest of the space go? I noticed this slowdown after installing an app (QR droid) from that Play Market (or whatever name it has now). When I first saw the error message, I had like 100 mb free in the app manager, and each time I reopened it the space was decreasing.


The phone is a Motorola Defy, rooted and using Miui, android version is Gingerbread.


So how can I fix this issue?



Answer



What filled my internal memory were 'tombstones', files located in /data/tombstones, and in total used about 800 MB. After some digging up, I found that these are crash dumps from applications, and are only useful for debugging, so they can be safely removed.


samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...