Wednesday, December 31, 2014

cyanogenmod - What can I do to save my Samsung Galaxy from a bootloop?



I have a relatively old phone that I would like to make some use of again. It's the GT-I9000, and it's currently stuck in a bootloop.


I'd like to install CyanogenMod on it. I've already flashed it with the CWM, however, I'm experiencing problems when trying to finally put the actual mod on the internal sd card.


First off, when I execute: adb push cm.zip /sdcard, ADB complains that /sdcard is a directory... Of course it is!


So, I've tried to be a bit more specific... adb push cm.zip /sdcard/Videos - I didn't expect any significant change, but there was. It now complained about the permission being denied.


I overcame this on Linux by becoming root, and executed the command again...


Then, it complained about not having enough space...


I used the CWM recovery to navigate internal storage, and noticed that it really was crammed with all my data.


In order to get more space, I tried factory resetting, data wiping, and partitioning. The first two finished successfully, but didn't delete any of my files, and CWM recovery couldn't partition the thing.


After that, I noticed that ADB can provide a shell connection, so I tried adb shell.


On both Windows and Linux, this is the error:



link_image[1963]:  2950 could not load needed library 'libm.so' for '/system/bin/sh' (reserve_mem_region[832]: OOPS:  2950      prelinked library 'libm.so' mapped at 0x40008000, not at 0xafc00000)CANNOT LINK EXECUTABLE

So I suspect it has something to do with my Android phone, not my computers.


And the best thing is: my phone cannot read external cards for some reason. What a great combination!


How can I wipe internal storage without a shell connection?



Answer



First, if your source is a file, adb push requires the target to be a file as well. Hence, the correct syntax would be:


adb push cm.zip /sdcard/cm.zip

Second, a usually doesn't touch the SDCard (internal or external), unless there's an option offered to do so and you checked that.



As for the link error: That looks like something on the device is screwed up. You're probably in recovery mode when trying this, and (just a guess, but a good one) the partition holding the required library file was not mounted.


I don't know what options are available for your device specifically, but there are generally several ways to flash a device, as e.g.:



  • update.zip via recovery (which is what you're just trying)

  • side-loading via adb sideload

  • using

  • using a device (or manufacturer) specific flash tool, in your case , , or


I'd suggest the last mentioned method: you could e.g. first flash the latest official ROM via Odin/Heimdall, so it is able to boot correctly again. After that, you would have a working device again, and could cleanup your SDCard to use the update.zip method for flashing your CM image.


Another way to free some space: If you know some of the "big filenames", you could try using adb push to overwrite them with "small ones". Say, if there's a video file with 500 MB size in /sdcard/Videos/bigmovie.mp4, you could take an empty text file empty.txt ( 0 Bytes ) and push it over the video:



adb push empty.txt /sdcard/Videos/bigmovie.mp4

This should set enough space free to finally push your cm.zip to the card.


Tuesday, December 30, 2014

ringtone - Ring volume keeps reseting to zero



I have a OnePlus X running Android 5.1.1.


I noticed that the ring volume keeps reseting itself (or is reset by s.t.) to zero. This usually happens when I switch the phone back from no-interruptions mode but also at essentially random moments (if much more rarely then).


Is there any way to stop this?




6.0 marshmallow - Plasma Mobile in MultiROM Manager on Nexus 5



I tried to install Plasma Mobile on Nexus 5. It is very important to me to start testing it in MultiROM Manager first (with some other mobile operating systems).
I followed this tutorial.
In section:



Finally install the Plasma Phone



on:



It will take while to download. After download is over, it will reboot to recovery, in recovery it will make real installation process, so drink a coffee meanwhile.. ;-)




I got error:



cheching file device-687a931c47e1...d6b63d42054.tar.xz..FAILED



I checked "dev" (version 8), but I got same error on: "dev-proposed" (version 1).
I have:



  1. OS version (official Nexus 5 latest update - 6 IX 2016):

    Andorid 6.01





  2. Kernel:

    3.4.0-g4ad03fa-dirty
    tasadar@tyene #1
    Tue Feb 9 21:30:30 CET 2016




  3. Compilation number:


    M0B31E





In MultiROM (patched - like in tutorial) I have installed:





  1. MultiROM v33







  2. Recovery 2016-02-10 (0)"






  3. Kernel: Stock 6.0 and 6.1






How can I solve this error message?




usb drivers - Do all Android devices have USB OTG support?


I am using celkon A98. The specification of my device says it does not have USB OTG support .. I tried OTG troubleshooter app... it says USB host is supported ... Do I have USB host functionality **or was that a bug in the **OTG troubleshooter app ? L




samsung galaxy s 2 - How do I check who is connecting to my hotspot?


Is there any way to check who is connecting to my hotspot? I am using a rooted Samsung Galaxy SII.


I use the SII's tethering feature in: Settings > Wireless and network > Tethering and portable hotspot > Portable Wi-Fi hotspot settings > Portable Wi-Fi hotspot to create my hotspot.



Answer



As mentioned in a comment it really depends on what app you are using to provide tethering.


On the stock HTC tethering app there is a view called "Manage users" which lets you see a list of connected devices listed be resolved host name. Touching each device reveals its hardware address and currently assigned IP address.HTC tethering app - manage users


As far as I can recall it is the same for the stock Samsung G S2 (at least in this region - northern europe).


Monday, December 29, 2014

security - How does an app reads an OTP SMS without SMS permission?


I have recently installed an Android app from the Play Store. While registering in it, I realized that it was able to read my message of OTP without even asking for my permission to read the message.


I have AOSP Extended 5.8 with the August security patch. It's an Android Oreo 8.1 based custom rom.



Answer



Verification by OTP uses a different API which doesn't need read SMS permission. You can read more here Perform SMS Verification on a Server


Hence, the app isn't reading your SMS but using a separate channel to read specially formatted text messages


I learnt of this when an Xposed module to block permissions did not work as I expected (similar case) and the developer explained the reason


silent mode - Completely "Mute" my Android Phone?


I have seen the Question: Is there a one-click widget to make my phone completely silent? and this is not a Duplicate Question.


In my, Samsung Galaxy Y phone, when I completely reduce my volume, it goes to the "Vibration" mode. Turning the volume down again after the "Vibration" mode appears has no effect in my phone.


I have look around and found no option to mute at all. My Question is whether is it possible to completely mute an Android phone without downloading/installing any extra app?


Doing everything mentioned in: What is the fastest way to turn the phone into silent mode? puts my phone to "Vibration".


I can't believe that there can exist a phone in today's world without such a basic feature.




Answer




  1. Go to your Settings on your phone

  2. When in your settings go to "Sound", then "Silent mode and vibrate" and things will pop up

  3. Push "Silent mode"

  4. Then push "Vibrate", then "Never"

  5. Then your phone is all the way off!!


How to permanently remove a particular Chrome notification from Android mobile phone?



I visited a website yesterday. Today, a notification popups every time my mobile phone is rebooted, showing me that website (it is grouped under "Social digest"). However, when I click on that notification, it only takes me to Chrome but not to that website.


How to permanently remove this notification?



Answer



Open Chrome → Settings → Site settings (under "Advanced") → Notifications and click on it.


The following screen will appear



Per-site notification setting on Chrome



If you turn off the Notifications slider, you will not get any notification from Chrome at all (from sites).


To turn off for a particular site, click on Allowed → [URL of the site] → Notifications (under "Permission") → change "Allow" to "Block".



2.2 froyo - I deleted my only launcher


I deleted my only launcher and now I cannot open settings to set to debug mode in order to use ADB or similar to install a new launcher. I can't open the Play store, can't open anything except those that use voice commands: e-mail, text, phone, maps, navigation, and note to self.


Oh, and it only boots in safe mode.


It's an LG Optimus T.


How do I put a launcher back on this phone?




Answer



I figured this out only after months of being without most of my phone's functionality and taking it to a 3rd-party repair place that declared it "unrepairable".


It is stupidly easy:



  1. Download an apk of your home launcher (I got one from here: http://forum.xda-developers.com/archive/index.php/t-1125331.html )

  2. E-mail it to yourself

  3. Use voice commands to send yourself a test e-mail. If you don't have gmail set up, then it will give you the screens you need for configuration.

  4. E-mail the apk to yourself. When you check your gmail on your phone you should see an "install" button next to the attachment name. Install it and enjoy your new old phone.


Sunday, December 28, 2014

Does Android have a 2.1GB file size limit?



I have tried many voice recording type applications and the best I have found only allows me to do a recording upto a maximum file size of 2.1GB. I can do many of these 2.1GB recordings as I have a fairly large SD card.


On one of the applications I have tried, the developer has specifically said that his/her app has no recording length limit


So my question, does Android have a built in 2.1GB limit per file?



Answer



Short Answer: Yes


More Detailed Answer:


The file size limit is not something specific to Android, it is a limit of the File System.


It may "technically" be a bug in Android though, as FAT32, which is what the file system is for the sdcard, should have a file size limit of 4GB ((2^32)-1 = 4,294,967,295B) but it looks like the filesystem on Android is android is actually using a limit of ((2^31) - 1 = 2,147,483,647B). Which means they could be using signed integers, instead of unsigned integers for the addressing on the filesystem.


security - Application for remote-wiping a lost phone without handing access to my data to a third-party?


Or having to pay a subscription?


I have an idea for a hypothetical Android app. Tell me if such a thing already exists.



  1. You install a server in a machine you have total control of, and is (preferably, but not obligatorily) online 24/7.

  2. You install the client app on your phone. You configure it to connect to the hostname/port the server you installed in #1 is listening to.

  3. The client app does a connect every 5 minutes or so. (Configurable.) It backs up your data to your server machine if you configured it to do so.

  4. Your phone is lost or stolen.

  5. You connect to yourcomputer:yourport and feed it the Nuking Password. The server app hashes your Nuking Password and stores it at a predefined location (i.e. yourcomputer:yourport/Nuke)

  6. Like in every watchdog connect, your phone tries to download yourcomputer:yourport/Nuke - but this time it succeeds. It then hashes its own locally stored copy of the Nuke Password and, if it's a match, it nukes all data in the phone. Before doing the pieces of nuking that will kill Internet access, it reports to the server that the nuke command went through.



Can be improved, of course. But tell me, is there a FOSS app like that somewhere? I imagine it would be especially neat for businesses that issue smartphones for a number of employees.



Answer



I don't know of an app that meets your exact requirements. But a simpler version that's (in my opinion) equally secure is an Android app that listens for a specific SMS message, and wipes the phone. Remote Wipe does this. Of course, it doesn't entirely kill the phone's software (that would be very device-specific and require a modified bootloader in most cases); and it might be useful to use one of the apps that reports the phone's physical location too, if you want to recover it.


internal storage - When files are created in Android 4.2 and above, are files ever stored in one location?





  1. /sdcard -> /storage/sdcard0




  2. /storage/sdcard0 -> /storage/emulated/legacy




  3. /storage/emulated/legacy -> /storage/emulated/0





It is known that symlinks in the above example are locations on the Android file system that reference other storage locations on a device. However, when a user creates a file, in any of the locations above, all of the locations will contain the same file, but where is the original file? Does the file remain in the location in which it was created and is referenced by all the other symlinks? I would like to know if any of the above locations store the original file or if there no original file, what is the technical process that Android handles that file?




Saturday, December 27, 2014

windows - Google Nexus 7 not recognized via USB


I'm trying to connect my Google Nexus 7 to my PC for Android development but so far I've been unsuccessful.



I've tried connecting to my PC using different cables. When I connected the device to my Windows 7 PC, I didn't get any notification on Android or my PC that a device was connected. In "Other devices" my PC shows an Unknown device. I tried using MTP and PTP, as well as disabling and enabling USB debugging. I've used Nexus Root Toolkit, Universal Naked Driver, Nexus 7 toolkit, and I've tried this tutorial and many others and nothing has helped me.


I don't understand why there aren't any notifications on Android. Could it be a hardware problem? How can I check it?




Google Play downloads last forever


I have been trying to download several apps from google play. I've got a 3G tested connection but whatever I try to download the download lasts forever. Can I somehow reinstall google play? What can I do?


Thanks.



Answer




Go to the apps list in settings, slide to see all apps (including system ones), open Download, clear data and cache of it, reboot and try again. If it doesn't work, try doing the same with Play Store app (you'll need to login again to your Google account).


game controllers - Does the LG Aristo work with gamepads, if so how can I connect it too the ípega?


I have an LG Aristo and I recently got an ípega Bluetooth controller off the wish website, the phone isn't rooted an I don't know much on what to do so it's not working for any of my games I don't know what to do please help...




Friday, December 26, 2014

Nexus 7 stuck in a boot loop


I have a two-week-old Google/Asus Nexus 7 tablet, unrooted and otherwise standard.


Yesterday it ran out of charge a lot faster than it usually does, and wouldn't seem to recharge. When it finally ran completely out of juice it shut down.


Now when I turn it on, it gets stuck in an endless boot loop. I contacted Google's support and they're looking to send out a new item. However if I go that road, I'll lose the data on there.



Has anyone experienced this issue? Is there anything else I could try? Thanks!



Answer



(EDIT)
This answer is only really helpful for unlocked tablets.. Look after this paragraph if that is already the case. Otherwise read on.


"fastboot oem unlock" also does a factory reset, you need to have it unlocked before you need it, alas. This is both good for privacy and bad for recovery from half-bricked devices... The factory reset does In fact a secure erase which nullifies all your data.


According to Android: Building for devices:



$ fastboot oem unlock The procedure must be confirmed on-screen, and deletes the user data for privacy reasons. It only needs to be run once.



$ fastboot boot recovery-clockwork-6.0.1.0-grouper.img 

downloading 'boot.img'...
FAILED (remote: Bootloader is locked.)
finished. total time: 0.020s
$ fastboot oem unlock
...
(bootloader) erasing userdata...
(bootloader) erasing userdata done
(bootloader) erasing cache...
(bootloader) erasing cache done
(bootloader) unlocking...

(bootloader) Bootloader is unlocked now.
OKAY [ 12.704s]
finished. total time: 12.704s
$ fastboot flash recovery recovery-clockwork-6.0.1.0-grouper.img
sending 'recovery' (6480 KB)...
OKAY [ 0.785s]
writing 'recovery'...
OKAY [ 0.225s]
finished. total time: 1.010s
# after that boot into the recovery (don't boot normal! it overwrites valuable data...)

$ adb shell cat /dev/block/platform/sdhci-tegra.3/by-name/UDA \| gzip -1 -c \| uuencode bla | uudecode -o - | gunzip -dc | bar > /media/qnap/backup/n7.data.formatted.img

(END EDIT)


You can boot a temporary custom recovery and create a backup of your device.


It should also be possible to wipe it afterwards and recover from your problem without having to send it back at all (provided it's not a hardware issue).


Steps:



  • install the SDK (if not already done) and have working adb + fastboot executables ready

  • Download a CWM recovery image from here

  • unlock your Nexus 7's bootloader: fastboot oem unlock

    Here's how to enter the fastboot mode (the Nexus 7's codename is grouper): Press Power for a second, and press Volume Down when the bootloader logo appears

  • boot into a temporary CWM recovery: fastboot boot recovery-clockwork-6.0.1.0-grouper.img

  • Create a nandroid/CWM backup from your broken installation (backup&restore->backup)

    • after the backup is complete, try to pull all data from your device:
      adb shell mount (should list something like /dev/block/mmcblk0p1 on /sdcard or so (not really sure however)
      adb pull /sdcard backup/ (replace /sdcard with the above noticed directory, this should extract all your data to backup/) check if everything is transmitted correctly)

    • you can buy TitaniumBackup+ProKey afterwards (it allows extracting data from Nandroid backups quite easily)




  • If that fails you can alternatively leech everything manually with adb:
    I assume you use Linux.


.


#list available devices:
adb shell ls /dev/block
adb shell cat /proc/partitions
#create images for each mtdblock
#uuencoding is needed because the shell interferes with the stream (adds linefeeds or so):
adb shell cat /dev/block/mtdblockX \| uuencode foo | uudecode -o mtdblockX.img

adb shell cat /dev/block/mmcblkXXX \| uuencode foo | uudecode -o mmcblkXXX
#compare md5sums:
adb shell md5sum /dev/block/*
md5sum mtdblock* mmcblk*

# Look for reasonably sized images and what file system they are:
ls -lh mtdblock* mmcblk*
file mtdblock* mmcblk*
# You should be able to mount those images now (if you happen to use linux):
mount -t ext4 -oloop,ro mtdblockX /media/mtdblockX

# Now use some file-explorer to access your saved data


  • Final step:
    If you are really sure that you got all your data back, boot back into the CWM recovery (see step above) and issue a wipe data/factory reset command. Then reboot and re-setup your tablet (hopefully you don't have a hardware issue).

  • Optional step: relock your bootloader via fastboot oem lock


applications - Getting "not enough space" error even i have enough space in sd card


I have a android jellybean phone [model - ETEl-I4] .i cannot install any apps anymore.i have installed lot of apps before.i can see i have enough space in sd card and i have set default write device to SD card.but when i try to installs apps like skype,viber..etc.i'm getting this error.i read some answers but i think i don't have any cashes problem i have enough space in sd card. please help me how to fix this issue.


error


enter image description here


I have set default write device to SD card.


enter image description here


As you can see i have 5GB space and apps i'm trying to install are less than 50mb.


enter image description here





Thursday, December 25, 2014

shell - How can I run a script on boot?


I'm accustomed to running scripts on boot in Linux, but I'm not sure how to do this in Android. I'd like to start my SSH daemon on start, so I'll always be able to connect. How can I run an arbitrary script on Android boot? It'd be preferable to do this outside of Dalvik.



Answer



While looking around my Android filesystem, I found that it did, in fact have a /etc/init.d/ directory. After peeking around in there, I found /etc/init.d/20userinit with the following lines:


if [ -e /data/local/userinit.sh ];
then
log -p -i -t userinit "Executing /data/local/userinit.sh";

busybux chmod +x /data/local/userinit.sh;
logwrapper /system/bin/sh /data/local/userinit.sh;
setprop cm.userinit.active 1;
fi;

This being, of course, exactly what I needed, I wrote the following script on my computer then pushed it to my device:


#!/system/bin/sh 

dropbear -s -g


(pushed to device via scp userinit.sh phone:/data/local/userinit.sh, mind you :] )


Rebooted the device, then ran ps | grep "[d]ropbear", and sure enough, it's running. Coolness!


bluetooth - Answer my phone on my Tablet?


I have an Android phone (HTC Desire Z), I also have a Android tablet (Acer Iconia Tab A501). I would like to link up my phone to my tablet so I can answer my phone on my tablet.


Is this possible with Bluetooth? Is this possible with any apps? Is this possible with Call-Fowarding to a VOIP?


Not sure if there is anything else to try.




2.2 froyo - Change the number of home screen panels in Android


A phone user manual (HTC Wildfire S. Android 2.2) says



'Home screen has seven panels that you can customise'.




The system settings do not contain an option to modify the number of panels.


I was searching for this on the web and was not able to find any solution that does not involve third-party applications.


If this requires programming, please, move the question to StackOverflow and respond with detail.



Answer



If you don't want use 3rd party apps:


This requires decent computer skills and a rooted phone, but here are the steps for android 2.3 Gingerbread.



  1. Copy /system/home.apk from your phone to pc.

  2. Decompile home.apk using apktool.

  3. Goto [decompiled folder]/res/values/integer.xml


  4. Change 5, to 7 or whatever you want.

  5. Save it,and compile the apk using apktool.

  6. Copy it back to phone i.e to /system,change its permissions to -rw-r-r.


Wednesday, December 24, 2014

Turn off notification sounds and vibrations while allowing phone calls to trigger sound and/or vibration on Nexus 5


I have a Nexus 5 running Android 4.3.2. I want to turn off all sound and vibration notifications for all apps, while allowing phone calls to trigger sound and/or vibrations. Is there a way to do this?


I have tried following the advice at How can I turn off Notification Sounds and leave phone sounds on but the answers don't work. There's no separate slider for notifications, and the AudioManager app doesn't shut off vibrations. I have tried the official Google answer but there's no setting, Vibrate -> Never, and setting notifications to silent does not stop the vibrations. I've tried the individual app settings, too, but there's no setting for vibration in the official twitter app, for example.


I can stop specific apps from sending any notifications at all, but that's not what I want. I want the notifications to show up in the drop-down, I just don't want any sounds or vibrations.




Answer



This is an issue I have as well, it lies with the apps, whose settings override the default ringer and vibration settings. In order to completely disable vibrations you will have to disable them in Settings > Sound, and individually in each app.


Twitter app you will have to go to Settings > and there is a Notification Settings sections that allows you to disable vibration.


As an aspiring developer, it will be my goal to default to system settings but allow for customization, as it should be...


applications - Is there a way to move unmovable apps to the SD card in Android 6.0?


I recently updated to Android 6.0 and made my new 64GB SD card as adoptable storage. Unfortunately, as per here:



Apps can be placed on adopted storage media only when the developer has indicated support through the android:installLocation attribute.



This is problematic since I only have roughly 4GB of internal storage and some of these unmovable apps are quite large.


Without going into partitioning the SD card into 2 and using Link2SD/Apps2SD, is there a way to move these unmovable apps? My device is indeed rooted so that should hopefully help.



Edit: In reply to the user1871, and also I will add: I already put all those things on the SD card. Right now I have roughly 1 GB free in the internal storage. Also I do not want to uninstall anything. When I used DiskUsage to see what was using up a lot of the space, it was the data/app folder which contains a whole bunch of unmovable things such as base.apk, lib and oat folders.


These types of unmovable files is what concerns me since they will quickly add up and overtake my free 1 GB. I just want to find out a way I can move (or at least create symbolic links to those files after putting them into the SD card) without using Link2SD type apps. I'm leaving doing that as a last resort since formating an adopted SD Card will result in me having to factory reset my phone :(




locked out - Android lock screen won't accept password from Android Device Manager


I have Samsung Galaxy S3 Neo with android 4 TouchWiz (I'm not sure about the exact version). I've locked my phone using Android device manager. It seems successful, the recovery message is displayed on lock screen, but it wont accept the password. I tried re-setting the password several times with ADM and it never accepts the password.


What I've tried:



-I can't reset password with my google login, as this is password, not pattern (I'm not offered with "Forgot password" button)


-Tried bypassing with ADB or CWM but USB Debug mode is off and bootloader is locked, so if I try anything, the data gets lost


-There's an app (Screen Lock Bypass Pro) that supposedly can help in situations like these but it's not compatible with my phone.


-I can't copy data by connecting the phone to my PC with USB because you have to first unlock the phone before you can access the files with PC


My top priority is getting data from my phone (pictures specifically), so factory reset is not an option. Anyone have any suggestions?




samsung galaxy s 4 - How to create a hardware shortcuts in Android 4.3?


I have Samsung Galaxy S4 GT-i9500 running the latest firmware with Android 4.3.


I want to create "hardware shortcuts".


For example, if I hold volume up and home at the same time, then it'll open an application that I set, for example "Firefox".


As a Linux user, I know it's possible in Fedora and Ubuntu.


Is it possible with Android? My device has not been rooted.




Tuesday, December 23, 2014

Android Antivirus Software (solution and battery life relevance)


Is there a security solution for Android that's vastly regarded as "the best" one at the moment or is it like in the PC world where there are 3-4 which are "the best"?



Also, what should I expect to happen to the battery life between charges if I were to install an antivirus?


Note: I am running Android 2.2, soon to be updated to 2.2.1.



Answer



An antivirus app will have a major effect on your battery life. A friend with an HTC Desire couldn't understand why he could never get more than 4 or 5 hours out of his battery, even turning most things off, until he remembered installing one of the AV apps to try it out. Removing that brought his battery life back up to what it should be.


When the first Android troojan virus hit back in August last year, similarly to the recent Geinimi trojan, in both cases the affected user had to willingly install an app that was from a third-party source, and go through the permissions screen where the app specifically asks for permissions that it shouldn't really need.


An attentive and careful user can protect themselves from these kind of threats just by taking care to only install apps from trusted sources, and to read which permissions an app asks for as it installs, and stop to think whether it really needs to do things like read your contacts and send SMSs.


The real problem will come when a virus learns to either break out of its app's sandbox and into another, or learns how to give itself root access, or take advantage of the root access that someone else has installed. This is what the iPhone worm of about a year ago did, when it took advantage of the fact that the most popular iPhone jailbreak app left all jailbroken phones with the same root password by default, and most users never bothered changing the password. No Android virus has yet been shown to be able to do that.


How to set Wi-Fi HTTPS proxy, not HTTP, via adb shell?



For HTTP I found a link: How to set WIFI proxy via adb shell? But I want to setup HTTPS proxy via adb shell.




rooting - How to root HTC Desire (Froyo 2.2) without putting in a custom ROM (flashing)?


for research purposes I'd need to root a HTC Desire phone without flashing it. I did it already on the HTC Hero, where it was quite simple.



Basically all I would need is to get r/w access to the /system/app folder for copying my custom apk file there. Obviously this needs root access.


Is there a way to easily root the Desire without the need to completely flash and place a custom ROM on it?


Some details about the phone:



  • OS: Froyo 2.2

  • Software number: 2.12.110.4

  • Kernel version: 2.6.32.15


Thx for your help



Answer




Unrevoked 3 will root the HTC Desire without replacing the ROM, however it does reflash the recovery ROM: http://unrevoked.com/#desire


updates - Updating from version 4.4 to version 5 let me to a dead phone



I have a Nexus 5 celullar. I was asked by the system to update some features. In fact it was to update to a new version: Android 5. I accept the request and give the celullar do its work. At the last pass when the celullar has to be restarted it went dead. trying to open it give the word Google but not anymore. Trying to push the power button + the volume buttom down, appears a dead andorid with an admiration red sign and the text : No Command. The power buttom + the volume buttom up give the possibility of START, Restart bootloader, Recovery mode or Power off. None of then give any result. The system in my PC can't mount the celullar. But recognize is a Nexus 5. Before I could always connect the celullar to my PC. Thanks in advance to anyone that can help me. Otherwise the celullar (only 3 months!) is useless!




Monday, December 22, 2014

rom flashing - How to disable dm-verity on `Treble` , `system-as-root` device?


Background: Please check following links



  1. How to disable dm-verity on Android with “user” build type ROM?

  2. Stuck in boot-loop when unpack and pack system.img?


Update: So, I am trying to disable dm-verity on my Samsung S10 5G device to successfully flash an unpack, unmodified and then packed system.img.ext4.lz4 file(with another ROM files) using Odin.



I have tried the following things:



  1. Removed avb flag from boot.img with following commands:


# magiskboot dtb boot.img print -f
> #345900: fstab
│ [compatible]: [android,fstab]
├── #345940: vendor
│ [compatible]: [android,vendor]
│ [dev]: [/dev/block/platform/soc/8804000.sdhci/by-name/vendor]

│ [type]: [ext4]
│ [mnt_flags]: [ro,barrier=1,discard]
│ [fsmgr_flags]: [wait,slotselect,avb]
│ [status]: [ok]
└── #346156: vm-linux
[compatible]: [android,vm-linux]
[dev]: [/dev/block/platform/soc/8804000.sdhci/by-name/vm-linux]
[type]: [emmc]
[mnt_flags]: [ro]
[fsmgr_flags]: [wait,slotselect]

[status]: []
#343692: fstab
│ [compatible]: [android,fstab]
├── #343732: vendor
│ [compatible]: [android,vendor]
│ [dev]: [/dev/block/platform/soc/8804000.sdhci/by-name/vendor]
│ [type]: [ext4]
│ [mnt_flags]: [ro,barrier=1,discard]
│ [fsmgr_flags]: [wait,slotselect,avb]
│ [status]: [ok]

└── #343948: vm-linux
[compatible]: [android,vm-linux]
[dev]: [/dev/block/platform/soc/8804000.sdhci/by-name/vm-linux]
[type]: [emmc]
[mnt_flags]: [ro]
[fsmgr_flags]: [wait,slotselect]
[status]: []


# magiskboot dtb boot.img patch


# magiskboot dtb boot.img print -f
> #345900: fstab
│ [compatible]: [android,fstab]
├── #345940: vendor
│ [compatible]: [android,vendor]
│ [dev]: [/dev/block/platform/soc/8804000.sdhci/by-name/vendor]
│ [type]: [ext4]
│ [mnt_flags]: [ro,barrier=1,discard]
│ [fsmgr_flags]: [wait,slotselect]

│ [status]: [ok]
└── #346152: vm-linux
[compatible]: [android,vm-linux]
[dev]: [/dev/block/platform/soc/8804000.sdhci/by-name/vm-linux]
[type]: [emmc]
[mnt_flags]: [ro]
[fsmgr_flags]: [wait,slotselect]
[status]: []
#343692: fstab
│ [compatible]: [android,fstab]

├── #343732: vendor
│ [compatible]: [android,vendor]
│ [dev]: [/dev/block/platform/soc/8804000.sdhci/by-name/vendor]
│ [type]: [ext4]
│ [mnt_flags]: [ro,barrier=1,discard]
│ [fsmgr_flags]: [wait,slotselect]
│ [status]: [ok]
└── #343944: vm-linux
[compatible]: [android,vm-linux]
[dev]: [/dev/block/platform/soc/8804000.sdhci/by-name/vm-linux]

[type]: [emmc]
[mnt_flags]: [ro]
[fsmgr_flags]: [wait,slotselect]
[status]: []


  1. Removed avb and verify flags from dtbo.img with following commands:


# magiskboot dtb dtbo.img print -f
> #126600: fstab

├── #126612: product
│ [compatible]: [android,product]
│ [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│ [type]: [ext4]
│ [mnt_flags]: [ro,errors=panic]
│ [fsmgr_flags]: [wait,verify,avb]
└── #126800: vendor
[compatible]: [android,vendor]
[dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/vendor]
[type]: [ext4]

[mnt_flags]: [ro,barrier=1,discard]
[fsmgr_flags]: [wait,verify,avb]
#126596: fstab
├── #126608: product
│ [compatible]: [android,product]
│ [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│ [type]: [ext4]# magiskboot dtb dtbo.img print -f
│ [mnt_flags]: [ro,errors=panic]
│ [fsmgr_flags]: [wait,verify,avb]
└── #126796: vendor

[compatible]: [android,vendor]
[dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/vendor]
[type]: [ext4]
[mnt_flags]: [ro,barrier=1,discard]
[fsmgr_flags]: [wait,verify,avb]
#126600: fstab
├── #126612: product
│ [compatible]: [android,product]
│ [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│ [type]: [ext4]

│ [mnt_flags]: [ro,errors=panic]
│ [fsmgr_flags]: [wait,verify,avb]
└── #126800: vendor
[compatible]: [android,vendor]
[dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/vendor]
[type]: [ext4]
[mnt_flags]: [ro,barrier=1,discard]
[fsmgr_flags]: [wait,verify,avb]
#126600: fstab
├── #126612: product

│ [compatible]: [android,product]
│ [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│ [type]: [ext4]
│ [mnt_flags]: [ro,errors=panic]
│ [fsmgr_flags]: [wait,verify,avb]
└── #126800: vendor
[compatible]: [android,vendor]
[dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/vendor]
[type]: [ext4]
[mnt_flags]: [ro,barrier=1,discard]

[fsmgr_flags]: [wait,verify,avb]
#126600: fstab
├── #126612: product
│ [compatible]: [android,product]
│ [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│ [type]: [ext4]
│ [mnt_flags]: [ro,errors=panic]
│ [fsmgr_flags]: [wait,verify,avb]
└── #126800: vendor
[compatible]: [android,vendor]

[dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/vendor]
[type]: [ext4]
[mnt_flags]: [ro,barrier=1,discard]
[fsmgr_flags]: [wait,verify,avb]
#126600: fstab
├── #126612: product
│ [compatible]: [android,product]
│ [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│ [type]: [ext4]
│ [mnt_flags]: [ro,errors=panic]

│ [fsmgr_flags]: [wait,verify,avb]
└── #126800: vendor
[compatible]: [android,vendor]
[dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/vendor]
[type]: [ext4]
[mnt_flags]: [ro,barrier=1,discard]
[fsmgr_flags]: [wait,verify,avb]


# magiskboot dtb dtbo.img patch



# magiskboot dtb dtbo.img print -f
> #126600: fstab
├── #126612: product
│ [compatible]: [android,product]
│ [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│ [type]: [ext4]
│ [mnt_flags]: [ro,errors=panic]
│ [fsmgr_flags]: [wait,]

└── #126792: vendor
[compatible]: [android,vendor]
[dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/vendor]
[type]: [ext4]
[mnt_flags]: [ro,barrier=1,discard]
[fsmgr_flags]: [wait,]
#126596: fstab
├── #126608: product
│ [compatible]: [android,product]
│ [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]

│ [type]: [ext4]
│ [mnt_flags]: [ro,errors=panic]
│ [fsmgr_flags]: [wait,]
└── #126788: vendor
[compatible]: [android,vendor]
[dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/vendor]
[type]: [ext4]
[mnt_flags]: [ro,barrier=1,discard]
[fsmgr_flags]: [wait,]
#126600: fstab

├── #126612: product
│ [compatible]: [android,product]
│ [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│ [type]: [ext4]
│ [mnt_flags]: [ro,errors=panic]
│ [fsmgr_flags]: [wait,]
└── #126792: vendor
[compatible]: [android,vendor]
[dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/vendor]
[type]: [ext4]

[mnt_flags]: [ro,barrier=1,discard]
[fsmgr_flags]: [wait,]
#126600: fstab
├── #126612: product
│ [compatible]: [android,product]
│ [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│ [type]: [ext4]
│ [mnt_flags]: [ro,errors=panic]
│ [fsmgr_flags]: [wait,]
└── #126792: vendor

[compatible]: [android,vendor]
[dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/vendor]
[type]: [ext4]
[mnt_flags]: [ro,barrier=1,discard]
[fsmgr_flags]: [wait,]
#126600: fstab
├── #126612: product
│ [compatible]: [android,product]
│ [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│ [type]: [ext4]

│ [mnt_flags]: [ro,errors=panic]
│ [fsmgr_flags]: [wait,]
└── #126792: vendor
[compatible]: [android,vendor]
[dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/vendor]
[type]: [ext4]
[mnt_flags]: [ro,barrier=1,discard]
[fsmgr_flags]: [wait,]
#126600: fstab
├── #126612: product

│ [compatible]: [android,product]
│ [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│ [type]: [ext4]
│ [mnt_flags]: [ro,errors=panic]
│ [fsmgr_flags]: [wait,]
└── #126792: vendor
[compatible]: [android,vendor]
[dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/vendor]
[type]: [ext4]
[mnt_flags]: [ro,barrier=1,discard]

[fsmgr_flags]: [wait,]


  1. Patched ramdisk.cpio with following commands:


# magiskboot cpio ./initrd 'patch false true'
Loading cpio: [./initrd]
Patch with flag KEEPVERITY=[false] KEEPFORCEENCRYPT=[false]
Found fstab file [etc/recovery.fstab]
Dump cpio: [./initrd]


# magiskboot cpio ./initrd extract
# cat etc/recovery.fstab
> # Copyright (c) 2013, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.

# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF

# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


#
/dev/block/bootdevice/by-name/boot /boot emmc defaults recoveryonly
/dev/block/bootdevice/by-name/recovery /recovery emmc defaults recoveryonly
/dev/block/bootdevice/by-name/system / ext4 defaults recoveryonly
/dev/block/bootdevice/by-name/userdata /data ext4 defaults wait,length=-16384
/dev/block/bootdevice/by-name/cache /cache ext4 defaults recoveryonly
/dev/block/mmcblk0p1 /sdcard vfat defaults recoveryonly
/dev/block/bootdevice/by-name/sec_efs /efs ext4 defaults recoveryonly
/dev/block/bootdevice/by-name/sec_efs /sec_efs ext4 defaults recoveryonly
/dev/block/bootdevice/by-name/carrier /carrier ext4 defaults recoveryonly

/dev/block/bootdevice/by-name/hidden /preload ext4 defaults recoveryonly

# FOTA
/dev/block/bootdevice/by-name/apnhlos /modem emmc defaults recoveryonly
/dev/block/bootdevice/by-name/modem /mdm emmc defaults recoveryonly
/dev/block/bootdevice/by-name/dsp /dsp emmc defaults recoveryonly
/dev/block/bootdevice/by-name/vendor /vendor ext4 defaults recoveryonly
/dev/block/bootdevice/by-name/product /product ext4 defaults recoveryonly

# Add misc for GOTA

/dev/block/bootdevice/by-name/misc /misc emmc defaults recoveryonly

# Samsung ODE
/dev/block/bootdevice/by-name/keydata /keydata ext4 defaults recoveryonly
/dev/block/bootdevice/by-name/keyrefuge /keyrefuge ext4 defaults recoveryonly

#Auto-generated code by FOTA Portal
/dev/block/bootdevice/by-name/dtbo /dtbo emmc default recoveryonly



After patching, I have converted dtbo.img to dtbo.img.lz4 using lz4 compression tool and created new recovery.img image with patched initrd file.


After that. I have tried to flash magisk_patched.tar file with AP contents as one of the following:



  • Overwritten all three patched file in points 1, 2 and 3 above. -> Stuck at splash screen when trying to go to recovery after successfully flash with Odin. Download mode is appearing on splash screen.

  • Overwritten 1.boot.img and 2.dtbo.img.lz4 above. -> Successfully rooted but when trying to edit the system_root partition then I am facing the following problem:


D:\>adb shell
beyondxq:/ $ su
beyondxq:/ # mount -o rw,remount /system
beyondxq:/ # cd system

beyondxq:/system # echo "Test /system mounting" > temp.txt
beyondxq:/system # cat temp.txt
Test /system mounting
beyondxq:/system # cd ..
beyondxq:/ # mount -o rw,remount /system_root
beyondxq:/ # echo "Test /system_root mounting" > temp.txt
/system/bin/sh: can't create temp.txt: Read-only file system ---> Error here
1|beyondxq:/ # cat system/temp.txt
Test /system mounting
beyondxq:/ # cat system_root/temp.txt

cat: system_root/temp.txt: No such file or directory ---> Verify: File not created
1|beyondxq:/ # exit
1|beyondxq:/ $ exit

D:\>adb remount
Not running as root. Try "adb root" first.

D:\>adb root ---> It didn't work as the next command is not working

D:\>adb remount

Not running as root. Try "adb root" first.

D:\>adb shell
beyondxq:/ $ su
beyondxq:/ # ls sdcard
Alarms Android DCIM Download Movies Music Notifications Pictures Podcasts Ringtones Samsung selinux_policy_modified
beyondxq:/ # mount -o rw,remount /system_root
beyondxq:/ # cp sdcard/selinux_policy_modified /system_root/sepolicy
cp: /system_root/sepolicy: Permission denied ---> Permission Denied here
1|beyondxq:/ #



  • Overwritten 1.boot.img and 2.dtbo.img.lz4 above with unpack and packed system.img.ext4.lz4 -> The result is boot-loop after successful flashing.


Please suggest what went wrong or am I missing any step.




Does Verizon Prepaid Mobile Broadband work on Android PHONES?


According to this page:



Prepaid Mobile Broadband usage is not available on any PC cards. Only available on Express-Cards, USB modems, Intelligent Mobile Hotspots and Mobile Broadband Built-In on select notebooks/netbooks.



Note how cell phones are missing from that list. Does this mean that Android phones are excluded from Verizon's Prepaid Mobile Broadband?



Answer



No, mobile broadband is called such specifically to distinguish it from a cell phone data plan. You might be able to trick them by claiming your phone is one of the tablets they support, but only if you can get all its info (IMEI etc.) beforehand and they accept it, rather than requiring you to bring in the device.


However I believe they are able to detect this sort of trickery on a network level, even if you're not an existing customer and they know that your device is a phone. I would not expect it to work for long. I did a similar thing on T-Mobile and my service was cut after 2 days.



Youtube Preload limit?



I have enabled Preloading for my Watch Later playlist. This currently contains 23 hour-long Google IO videos but YouTube seems to only ever preload up to 2 of them, never any more.


I have an HTC One X with over 24GB of space - I have to remove a video from the playlist that has been downloaded to allow another to begin.


Everywhere I search gives no details about limits on how much you can preload so I was wondering if anyone else knows anything about this or has seen anything similar?




My Samsung Galaxy S front-facing camera doesn't work in camera app, Gtalk or Skype -- How can I use it?


One of the reasons I brought my Samsung Galaxy S was because it has a front facing camera.


However I have found since buying it:



  • Camera app can't use it

  • Gtalk doesn't support video calling on android

  • Skype isn't supported (Update: skype has announced support, but not working on Galaxy S yet, and is voice only)



So what can I actually do with my front facing camera or did I just waste my money?



Answer



The built-in Camera app on the Galaxy S can use the front facing camera. It's called "Self Shot Mode" and I've used it on mine once or twice, easiest way to grab a quick picture of you and a friend when there's no one else around to take the shot.


Open the camera app, press the square symbol at the top-left (the mode button), press Self-Shot, smile at the funny person on the screen!


Update November 2010: As an update, the official Samsung Froyo release has changed the way this works, there is a new icon in the top-left of the camera screen, that looks like a camera with rotating arrows around it, pressing this button swaps between the front and rear cameras. Picture of the new button to swap between cameras


See this table for a list of which Galaxy S models have the front facing camera (and other differences between the models in the range).


Sunday, December 21, 2014

Cannot access local storage on HTC Desire HD with Linux


If I set my new HTC Desire HD to connect to PC in disk drive mode, a Windows computer can see the internal storage as a Removable Disk. If I attempt the same with my Linux system, "HTC Android Phone" briefly shows up, but is not possible to interact with and disappears a few moments later.



How do I use my HTC Desire HD from my Linux system?


(It does not currently have a microSD card - that is in the mail atm)




adb - Samsung Galaxy S3 I9300 is not detected by fastboot under Ubuntu 14.04


When I connect my device in Download mode to my laptop, it is not detected by neither adb nor fastboot commands:


fastboot devices and sudo fastboot devices returns nothing when device is connected in "Download mode".


fastboot device and sudo fastboot device returns < waiting for device > when device is connected in "Download mode" and nothing occurs if i disconnect and reconnect the device.


cat /etc/udev/rules.d/51-android.rules returns:


SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="6860", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="685d", MODE="0666"


cat /lib/udev/rules.d/70-android-tools-adb.rules returns:


# Udev rules for letting the console user access adb.
# Vendor ids
# Important product ids
# d001 adb recovery
# d002 adb system

# Applies to 18d1
# 2d00 accessory
# 2d01 accessory,adb

# 2d02 audio_source (part of libgphoto2-2)
# 2d03 audio_source,adb
# 2d04 accessory,audio_source
# 2d05 accessory,audio_source,adb
# 4ee1 mtp (part of libmtp-common)
# 4ee2 mtp,adb (part of libmtp-common)
# 4ee3 rndis
# 4ee4 adb,rdnis
# 4ee5 ptp
# 4ee6 ptp,adb

# 4e41 mtp
# 4e42 mtp,adb
# 4e43 ptp
# 4e44 ptp,adb
# 4e23 rndis
# 4e24 rndis,adb

ACTION=="add|change", SUBSYSTEM=="usb", \
ATTRS{idVendor}=="18d1", \
ATTRS{idProduct}=="2d01|2d03|2d05|4ee2|4ee4|4ee6|4e42|4e44|4e24|d001|d002", \

TAG+="uaccess"

# Applies to 04e8
# 685b mass_storage
# 685e mass_storage,adb
# 685c mtp (libgphoto2-2 libmtp-common)
# 6860 mtp,adb (part of libgphoto2-2 libmtp-common)
# 6862 rndis,dm
# 6863 rndis
# 6864 rndis,adb & rndis,acm,dm

# 6865 ptp
# 6866 ptp,adb
# 6864 rndis,dm
# 6865 ptp
# 6866 ptp,adb

ACTION=="add|change", SUBSYSTEM=="usb", \
ATTRS{idVendor}=="04e8", \
ATTRS{idProduct}=="685e|6860|6864|6866|6866", \
TAG+="uaccess"


cat /lib/udev/rules.d/70-android-tools-fastboot.rules returns:


# Udev rules for letting the console user access fastboot
# 4e40 grouper
# 4ee0 mako/manta
# 4e30 maguro/toro

ACTION=="add|change", SUBSYSTEM=="usb", \
ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="4e30|4e40|4ee0", \
TAG+="uaccess"


# Applies to 04e8
# 686d odin mode (Download mode, Bootloader mode)

ACTION=="add|change", SUBSYSTEM=="usb", \
ATTRS{idVendor}=="04e8", \
ATTRS{idProduct}=="685d", \
TAG+="uaccess"

lsusb returns Bus 002 Device 015: ID 04e8:6860 Samsung Electronics Co., Ltd GT-I9100 Phone [Galaxy S II], GT-I9300 Phone [Galaxy S III], GT-P7500 [Galaxy Tab 10.1] if device is booted normally or in recovery mode.



lsusb returns Bus 002 Device 024: ID 04e8:685d Samsung Electronics Co., Ltd GT-I9100 Phone [Galaxy S II] (Download mode) if device is booted in "Download mode" (power-on device with Power Key + Home Key + Volume Down)


adb device returns 4dxxxxxxxxxxxxxx device when device is booted normally.


adb device returns 4dxxxxxxxxxxxxxx recovery when device is booted in recovery mode.


adb detects device and can reboot it in both normal mode and recovery mode by following commands: adb reboot and adb reboot recovery. But if run adb reboot bootloader or even sudo adb reboot bootloader just boots device in normal mode. To boot device in Download mode I have to manually press Power + Home + Volume Down keys simultaneously.


I tried restarting my laptop and device, but no success.
My android-tools-fastboot and android-tools-adb and android-tools-adbd versions are: 4.2.2+git20130218.



Answer



Samsung devices with Download Mode do not support fastboot.


adb is not supported in fastboot mode anyways (nor Download mode).


If you want to flash something via fastboot, you must use Odin or Heimdall (or another tool that works with Download Mode).



Saturday, December 20, 2014

Can I generate a QR code for a contact?


I'm pretty sure I remember someone showing me a tool they were using to generate QR codes for individual contacts on their Android.


Is there an app that does this either specifically for contacts or for arbitrary content?



Answer



Use the popular Barcode Scanner App, it gives you a "share via barcode" option in the "share" menu when viewing a contact.



How to downgrade Micromax Yureka to KitKat from Lollipop?


Kindly give stepwise process with link for downgrading to KitKat original version from upgraded Lollipop version in Micromax Yureka.




Friday, December 19, 2014

cyanogenmod - If ROM and firmware and OS are the same thing, can one be upgraded without the other?


These terms still confuse me: operating system (Android), firmware and ROM.


From CyanogenMod's website:




Whether you call CyanogenMod a "ROM" or a "firmware" or an "operating system" or a "distribution", it all means in this case the same thing.



Does that mean you can't upgrade your firmware without simultaneously upgrading the ROM and operating system? For example my device has CM but says it's Android 5.02 and I was wondering if it's possible to update the OS without losing CM? Also, the firmware is out of date, so should I be searching for the update to the firmware or CM (since the above quote claims it's the same thing)?




settings - Hide Developer Options in Android 4.2


I know how to show the developer options menu. How do I hide it again?




Answer



Clearing the data on the "settings" app will get rid of the developer options on the Galaxy Nexus (at least on 4.1. Not sure about 4.2), but that may only work on that device. It doesn't do it on my Galaxy S3.


Note: The above action clears the settings of the settings app, i.e. not actually importanty data per se. You should be fine doing this.


The only other known method to get rid of them requires root and deleting /data/data/com.android.settings/shared_prefs/development.xml.
See Where are the developer options in Android 4.2?


How to perform a hot reboot using the terminal emulator?


How do I perform a hot reboot on my device using the Terminal Emulator? I do not have busybox installed, but my phone is rooted.


EDIT: I am looking for a solution to perform a hot reboot(see Quick Question - Hot Reboot - Android) using the terminal emulator/shell.



Answer



if device is rooted you can kill the gui process from root shell, it will restart immediately. terminal app and all subprocesses are killed too, but adb shell processes will survive. all current mounts remain intact (even manual mounts) device is not fully rebooting


killall system_server

Thursday, December 18, 2014

Can I backup my APN settings?


Where are my Access Point Names stored in the file system? Can I back them up via adb shell?


My phone is unlocked (AT&T Contract. Le sigh.) and I'm inching towards modding it but I want to be sure I've got my APN settings.



Answer



Yes, just copy the /system/etc/apns-conf.xml file.


You can also use an app like APN Backup & Restore: https://market.android.com/details?id=com.riteshsahu.APNBackupRestore


Edit: To backup manually-entered APNs (or ones otherwise not part of your ROM, such as ones "imported" when you insert a new SIM card) you also need to back up



/data/data/com.android.settings/shared_prefs/com.android.settings_preferences.x­ml

APN Backup & Restore does not do this.


installation - Why can't I install apps when I have enough storage?


In "Settings" > "SD card & phone storage settings" under "Internal Phone Storage" it lists "Available Space" as 13.78MB. I'm trying to install an app that is 2.38MB. Why do I get the "Insufficient storage available" error message? I clearly have enough space.


If it's relevant, my phone is an LG Optimus V.



Answer



Android devices actually have several different buckets of storage that can fill up independently, any one of them can cause an "insufficient storage" error. This question: Why is "insufficient storage" wrongly reported when installing an .apk via adb? seems to cover the details and options best.


4.1 jelly bean - Flashed my phone without rooting and now it doesn't work


I have an international Samsung Galaxy SIII i.e. GT-I9300.


Few days after the official upgrade to v4.1, it started freezing. So I removed the battery and inserted again and it did not boot and was stuck at the boot logo. It doesn't start with the recovery mode either but it does start in download mode.


So I flashed it with odin to leaked Galaxy SIII v4.1.2 build.


Now it shows 'custom binary count to one'. But when I boot it, it still doesn't start. (same issue; it gets stuck in the boot logo).


I'd also like to mention that the phone was not rooted prior to flashing.



I don't care about data now, I just need my phone back.




Wednesday, December 17, 2014

Message: Unfortunately Google Play Store has stopped


The problem is happening on a very old HTC Sensation running Android 4.0.3, and all the help found online refers to more modern versions.


In Apps -> Google Play Store, I forced stop, cleared data and cache, rebooted but it didn't cure the problem. I also performed a factory reset without success. Someone in the Google Play Help Forum advised me to call the Play support team which I did. They sent me an email, I followed the procedure but it didn't fix anything. They told me to contact HTC if the bug still persisted, which I did a while ago but no reply, so far.




email - How can I set up a VPN connection on my Nexus One?


I often check my mail at my office using the VPN connection which bridged my PC with the Microsoft Exchange Server and so that I can check mail using Outlook.


I want to do the same thing when I'm out of my office and on my Nexus One mobile phone. But I don't know how to set up a VPN connection like the way I do it on my PC.


Below is the screenshot of how I set up my VPN on my PC. Please share if you know a solution for me. All helps are welcome and very much appriciated!


alt text


alt text



Answer



I don't know about older versions of Android, but from my 2.1 version it is pretty straight-forward. From the Home screen go to Settings and tap "Wireless and Networks." Then "VPN Settings" and Add VPN and follow the prompts from there.


applications - Launch app on start (even SD card apps)


I'm pretty sure (despite of haven't seen them) that there are a few question about running some app when you turn on the phone. But I want a something a little more complex here. I have a few apps to run on start. Some of them have no trouble because they are installed in the phone, but the rest is installed in my SD card. As we all know (I think thats normal) after starting Android takes a few seconds to load all information saved in the SD card. How can I do to run some apps from the SD card after Android finishes loading information from the media device?


If changes something I'm using Android 2.2


Thanks!



Answer



I achieve on this using Tasker. For the apps in the SD card I created a profile with the context Events -> Hardware -> Card Mounted and it loads all apps I want. For the apps in the phone I created a profile with the context Events -> System -> Device Boot and it loads all apps I want.


Note: The first thing you MUST do before anything in both of this contexts is wait a few seconds. In the "Card Mounted" event is to let Android load all the apps installed in the memory (I'm guessing) and in the "Device Boot" is because after booting Android is too busy doing important stuff (I'm quoting Tasker guys).



mi a1 - How to enable multilingual typing in Google Keyboard (GBoard) app?


Until recently I had multilingual typing enabled on my keyboard. It was possible to swipe in German and English at the same keyboard without changing languages. The spacebar had "English - German" written on it.


Somehow it got accidentally turned off. Maybe by some gesture on the spacebar?


Now I can't figure out how to turn that feature on again. The toggle used to turn it on in the keyboard settings is disabled and can't be turned on.


IMG:


The hint says that multiple languages have to be enabled. But where can that be done?


On the languages screen there are already two languages. Unfortunately they are also separate keyboards and I always have to switch with the globe button.


IMG:




Answer



This seems to be an incompatibility or bug in newer versions of Gboard. The issue was solved for me by uninstalling all updates for Gboard.


Go to system preferences -> "apps and notifications" -> "all apps" -> "Gboard". Choose the 3 dot icon on top right and select "uninstall all updates".


This downgraded Gboard to version 7.5.12.211120321-release where it works. It doesn't work for me in the current Gboard stable release (version 7.6.13.215505041-release) nor in the current beta release (version 7.7.5.218156409-beta).


screenshot: uninstall all updates


Tuesday, December 16, 2014

sync - How to prevent Google from "synchronizing" my personal data after a factory-reset, adding a new Google account or software updates?



It seems that after a factory-reset, whenever a new Google account is enabled on a device and potentially after some software updates sync will be enabled again even if it was turned off in the Android settings before any personal data was loaded onto the device.


How can this be prevented?




rooting - ROOT Lenovo tab 3 7" TB3-710F Android 5.0.1. also to that's stuck in FASTBOOT MODE



Lenovo tab 3 7" TB3-710F 5.0.1. There's no unlock OEM in developer mode. Ok. Found. But now it's stuck in FASTBOOT MODE. I entered FASTBOOT with in the standard recovery




Monday, December 15, 2014

Ringtones from my MP3


I have in Bluetooth folder some .mp3 files. How can I make them ringtones? The phone ringtone option doesn't see them.




Sunday, December 14, 2014

Where does YouTube's offline feature store video files?


I'm using YouTube offline feature on my Android device, so that I can playback the offline videos within the YouTube app even there is no internet connection. When I searched for any of the video files, I can't find them on device/SD card memory. Are they encrypting the file so that it can be played only with YouTube app? Does anyone know the specific folder for offline video data?




external sd - Encrypted SD card failed after S5 restart


As I can't get my Samsung S5 connected to my Debian 9.1 with KDE machine over MTP I had to use KDE Connect to copy over files.


I then had to move the files from my internal storage to the SD card.


I have both my internal storage as well as the SD card encrypted.



I copied over a lot of files which worked well. Then I ran KDE Connect for a bit longer to transfer a bit more files. I still have over 1 GB of free storage space on my internal disk. However my phone got stuck for quite a while: I could unlock it to see my wallpaper for a few seconds until it went back to the lockscreen (it had very slow reactions). I waited for a while and disabled the WLAN on my computer to stop any data transmissions which didn't help. I hence restarted my phone.


After restart I got greeted with the dialog to encrypt the SD card that said that SD card encryption has been activated and asking me to either enable it by proceeding or deactivating it. On the phone it shows no files on the SD card.


I connected it to my computer where I can see all the files which are unreadable (encrypted). I copied all the encrypted files over in case that helps me restore them and also wrote down the name under which the SD card was mounted.
I also deleted the "LOST.DIR" directory and a couple of files to free up some space in case that was the problem. I dismounted the SD card, reinserted it to my phone and restarted it.


The phone showed me that same dialog again. In searches I could only find questions where people had this problem after software updates or factory resets: but not after just a restart.


Any ideas what might have caused this and how I could fix it?


Note that it doesn't look like I can format the SD card. I could try pressing "deactivate" or proceed at that dialog. But wouldn't that change the decryption keys so that even if I copy my files back it won't be able to decrypt them?




google apps - How do I remove gapps from CyanogenMod



I installed CyanogenMod 11 on my HTC One with CyanogenMod Installer. So I got also the google Apps (gapps) on my device. But I need a CM11 without gapps. I did then the following without success:



  1. copy cm-11-20140308-SNAPSHOT-M4-m7.zip to /sdcard/

  2. boot to recovery mode -> recovery -> ClockworkMod Recovery v6.0.4.6:

  3. "wipe data/factory reset"

  4. "install zip" choosing the zip-file


  5. "reboot system now"


    So I got a new CM11 but with gapps still installed.


    What should I do in addition to "wipe data/factory reset" to get rid of this apps?







Saturday, December 13, 2014

4.0 ice cream sandwich - How do I add another keyboard layout to my ICS phone?


I speak English as my first language, but I also am fluent in French and I'd like to occasionally write in French on my Android phone. I have ICS, and whilst I can easily change my language to French, I cannot change the keyboard layout to an AZERTY or QWERTZ layout.


How do I add another language keyboard layout to my phone?




navigation - What can I do when my GPS doesn't work (or if my tablet doesn't have GPS)?


The problem: I want to use an (offline|online) navigation app but:



  • I have an Asus Transformer Prime with very bad GPS reception

  • I have a tablet without GPS (e.g., a Nook Color)


  • My phone has a very low GPS signal
    (Samsung is infamous here, Galaxy S, Nexus S, Gio and so on all have users complaining about it)

  • My phone often loses track of GPS satellites


My device has Bluetooth however.


What can I do to get a working and precise GPS signal?



Answer



I have several bluetooth-GPS adapters that I use with all of my devices when I need a superb signal because a specialiced receiver is almost always superior to a smartphone's internal GPS (due to integration constraints).



It's very handy for my Nook Color tablet that has no GPS but bluetooth (Asus Transformer Prime users also have this kind of problem).



samsung galaxy s 3 - How to make stock Camera app silent when shot is taken without preventing phone call ringtone sounds?


This question is basically the same as this one but the canonical answer for that post is not compatible with my particular device for which a discussion and a solution can be found below.


I would often like to use the Samsung Galaxy SIII Neo stock Camera app but would like to keep the sound it makes while pictures are shot on silent (so that when I take a shot people are not distracted by the sound so that the resulting pictures taken look more natural). However, I've figured out that to turn such sound off, out of the volume settings Ringtone, Notifications, Media, and System, it is the Ringtone volume setting which must be turned off for this to take place (click on any of the volume hardware buttons and then on the volume settings cogwheel to see these). Unfortunately, setting the Ringtone to silent means no sound will be made when a phone call is received.



So, I would like to know whether newer phones have a Camera setting menu list entry for enabling or disabling the sound specifically for the Camera application. And, if not, then I would like to know where to place a feature request width Samsung for this to be implemented in future releases of the stock Camera software.


Anyways, I think, as a hack, if one knew where the mp3 sound file for the camera app is stored, one could just deleted (or perhaps replaced it with an mp3 file producing no sound to resolve the problem). Anyone know where I could find such a file?




UPDATE: I've tried rooting my device and then following this solution but I still get an error message saying the filesystem is read-only. Not sure if Samsung KNOX is causing this. Thank you for your replies.


enter image description here




UPDATE: Remounting the system with the following command as root:


mount -o remount,rw /system

Allowed me to rename the file, but it seems it's the wrong file as the stock Camera app still produces a snap sound when taking a picture after the rename. Candidate files related to the stock Camera app under /system/media/audio/ui could be the following:




  • Cam_Start.ogg

  • Cam_Stop.ogg

  • Camera_click_short.ogg

  • Camera_click.ogg

  • Camera_empty.ogg

  • camera_focus.ogg

  • Camera_Timer_2sec.ogg

  • Camera_Timer.ogg



I've tried renaming both Camera_click.ogg and Camera_click_short.ogg to Camera_click.ogg.bak and Camera_click_short.ogg.bak but no luck! Even after rebooting the phone, the stock Camera application still produces a sound when a picture is taken with the Ringtone Volume enabled. The Camera_empty.ogg sound file produces no sound; ideally I would like this one to play when the camera takes a picture.


Anyone know where the problem may be and how to fix it?




UPDATE: After installing the BusyBox app in order to have the Unix find tool and then running:


find / -name '*.ogg' > out.txt

the contents of out.txt were the following:


/storage/emulated/legacy/Ringtones/hangouts_message.ogg
/storage/emulated/legacy/Ringtones/hangouts_incoming_call.ogg
/storage/emulated/legacy/Notifications/Calendar Notification.ogg

/storage/emulated/0/Ringtones/hangouts_message.ogg
/storage/emulated/0/Ringtones/hangouts_incoming_call.ogg
/storage/emulated/0/Notifications/Calendar Notification.ogg
/mnt/shell/emulated/0/Ringtones/hangouts_message.ogg
/mnt/shell/emulated/0/Ringtones/hangouts_incoming_call.ogg
/mnt/shell/emulated/0/Notifications/Calendar Notification.ogg
/system/media/audio/alarms/Alarm_Day_by_day.ogg
/system/media/audio/alarms/Alarm_Morning_flower.ogg
/system/media/audio/alarms/Dawn_chorus.ogg
/system/media/audio/alarms/Daybreak.ogg

/system/media/audio/alarms/Sea_breeze.ogg
/system/media/audio/alarms/Serene_morning.ogg
/system/media/audio/alarms/Springtime_memories.ogg
/system/media/audio/alarms/Ticktac.ogg
/system/media/audio/alarms/Walk_in_the_forest.ogg
/system/media/audio/notifications/Beep_once.ogg
/system/media/audio/notifications/Hang_drum.ogg
/system/media/audio/notifications/Harp_glissando.ogg
/system/media/audio/notifications/S_Bubbles.ogg
/system/media/audio/notifications/S_Charming_bell.ogg

/system/media/audio/notifications/S_Chirps.ogg
/system/media/audio/notifications/S_Dew_drops.ogg
/system/media/audio/notifications/S_Flowers.ogg
/system/media/audio/notifications/S_Good_News.ogg
/system/media/audio/notifications/S_Harmonics.ogg
/system/media/audio/notifications/S_Knock.ogg
/system/media/audio/notifications/S_On_time.ogg
/system/media/audio/notifications/S_Opener.ogg
/system/media/audio/notifications/S_Postman.ogg
/system/media/audio/notifications/S_Pure_Bell.ogg

/system/media/audio/notifications/S_Temple_bell.ogg
/system/media/audio/notifications/S_Tickety_tock.ogg
/system/media/audio/notifications/S_Whistle.ogg
/system/media/audio/notifications/Sweet_favour.ogg
/system/media/audio/notifications/Whisper.ogg
/system/media/audio/ringtones/A_rustling_in_the_trees.ogg
/system/media/audio/ringtones/Basic_bell.ogg
/system/media/audio/ringtones/Basic_tone.ogg
/system/media/audio/ringtones/Beep-beep.ogg
/system/media/audio/ringtones/Beep_once.ogg

/system/media/audio/ringtones/Blowing_dandelion_seeds.ogg
/system/media/audio/ringtones/Break_of_day.ogg
/system/media/audio/ringtones/Breeze.ogg
/system/media/audio/ringtones/Bugs_story.ogg
/system/media/audio/ringtones/Chime.ogg
/system/media/audio/ringtones/Drifting_downstream.ogg
/system/media/audio/ringtones/Ecliptic.ogg
/system/media/audio/ringtones/Flying_in_the_sky.ogg
/system/media/audio/ringtones/Fog_on_the_water.ogg
/system/media/audio/ringtones/Glissando_tone.ogg

/system/media/audio/ringtones/Ice_blue_tone.ogg
/system/media/audio/ringtones/In_your_mind.ogg
/system/media/audio/ringtones/Journey.ogg
/system/media/audio/ringtones/Leisure_time.ogg
/system/media/audio/ringtones/Over_the_horizon.ogg
/system/media/audio/ringtones/Popcorn_tone.ogg
/system/media/audio/ringtones/Quantum_bell.ogg
/system/media/audio/ringtones/Rainbow.ogg
/system/media/audio/ringtones/Rainy_day.ogg
/system/media/audio/ringtones/Rays_of_the_sun.ogg

/system/media/audio/ringtones/Rolling_tone.ogg
/system/media/audio/ringtones/Scampering_tone.ogg
/system/media/audio/ringtones/Writing_adventure.ogg
/system/media/audio/ui/Alert_on_call.ogg
/system/media/audio/ui/Auto_focus.ogg
/system/media/audio/ui/Auto_focus_error.ogg
/system/media/audio/ui/Birdsong_by_the_lake.ogg
/system/media/audio/ui/Call_Connect.ogg
/system/media/audio/ui/Cam_Start.ogg
/system/media/audio/ui/Cam_Stop.ogg

/system/media/audio/ui/Camera_Timer.ogg
/system/media/audio/ui/Camera_Timer_2sec.ogg
/system/media/audio/ui/Camera_empty.ogg
/system/media/audio/ui/Charger_Connection.ogg
/system/media/audio/ui/Dialer_new.ogg
/system/media/audio/ui/Dock.ogg
/system/media/audio/ui/Effect_Tick.ogg
/system/media/audio/ui/Fairy_fountain.ogg
/system/media/audio/ui/Highlight.ogg
/system/media/audio/ui/HoverPointer.ogg

/system/media/audio/ui/KeypressDelete.ogg
/system/media/audio/ui/KeypressInvalid.ogg
/system/media/audio/ui/KeypressReturn.ogg
/system/media/audio/ui/KeypressSpacebar.ogg
/system/media/audio/ui/KeypressStandard.ogg
/system/media/audio/ui/Lock.ogg
/system/media/audio/ui/Lock_none_effect.ogg
/system/media/audio/ui/LowBattery.ogg
/system/media/audio/ui/New_chat.ogg
/system/media/audio/ui/Pen_att_noti.ogg

/system/media/audio/ui/Pen_att_noti1.ogg
/system/media/audio/ui/Pen_att_noti2.ogg
/system/media/audio/ui/Pen_att_noti3.ogg
/system/media/audio/ui/Pen_det_alert.ogg
/system/media/audio/ui/Pen_det_beep1.ogg
/system/media/audio/ui/Pen_det_beep2.ogg
/system/media/audio/ui/Pen_det_beep3.ogg
/system/media/audio/ui/Pen_det_beep4.ogg
/system/media/audio/ui/Pen_det_beep5.ogg
/system/media/audio/ui/Pen_det_noti.ogg

/system/media/audio/ui/Pen_det_noti1.ogg
/system/media/audio/ui/Pen_det_noti2.ogg
/system/media/audio/ui/Pen_det_noti3.ogg
/system/media/audio/ui/PowerOn.ogg
/system/media/audio/ui/S_Beam_end.ogg
/system/media/audio/ui/S_Beam_error.ogg
/system/media/audio/ui/S_Beam_start.ogg
/system/media/audio/ui/S_HW_Touch.ogg
/system/media/audio/ui/S_SIP_Backspace.ogg
/system/media/audio/ui/Sent_chat.ogg

/system/media/audio/ui/Serenity.ogg
/system/media/audio/ui/Shutter.ogg
/system/media/audio/ui/Shutter_multiple.ogg
/system/media/audio/ui/Sparkling_mist.ogg
/system/media/audio/ui/TW_Battery_caution.ogg
/system/media/audio/ui/TW_Battery_swelling_warning.ogg
/system/media/audio/ui/TW_Call_Disconnect.ogg
/system/media/audio/ui/TW_SIP.ogg
/system/media/audio/ui/TW_Silent_mode_off.ogg
/system/media/audio/ui/TW_Touch.ogg

/system/media/audio/ui/TW_Volume_control.ogg
/system/media/audio/ui/The_secret_forest.ogg
/system/media/audio/ui/Undock.ogg
/system/media/audio/ui/Unlock.ogg
/system/media/audio/ui/Unlock_none_effect.ogg
/system/media/audio/ui/VideoRecord.ogg
/system/media/audio/ui/Voice_processing.ogg
/system/media/audio/ui/Voice_start.ogg
/system/media/audio/ui/Voice_stop.ogg
/system/media/audio/ui/WirelessChargingStarted.ogg

/system/media/audio/ui/Zero_Clickr_Ready.ogg
/system/media/audio/ui/airbutton_close.ogg
/system/media/audio/ui/airbutton_open.ogg
/system/media/audio/ui/camera_focus.ogg
/system/media/audio/ui/lens_flare_lock.ogg
/system/media/audio/ui/lens_flare_unlock_silence.ogg
/data/media/0/Ringtones/hangouts_message.ogg
/data/media/0/Ringtones/hangouts_incoming_call.ogg
/data/media/0/Notifications/Calendar Notification.ogg


At this stage I'm not sure whether the stock Camera app is really taking the shutter sound from one of these .ogg files or whether the actual .ogg file is hardcoded into the stock Camera app's binary file.



Answer



On my Samsung Galaxy SIII Neo (Android 4.4.2) I was able to solve my problem as follows:


C:\> adb shell

and then


# su
# mount -o remount,rw /
# cd /system/media/audio/ui/
# mv Shutter.ogg Shutter.ogg.bak


This solved the problem.


data recovery - ADB: Phone is not recognised but Ubuntu 18.04 recognises it



My LG G3 phone (phone is rooted; OS is Android Fulmics) is recognised by my laptop when I plug it in. The laptop is running Ubuntu 18.04 and I can easily copy data from and to my phone.


I have recently installed the Android Debug Bridge (ADB) (sudo apt-get install android-tools-adb). Then, I wanted to reach my device and typed adb devices.


When functioning properly, it should return something like this:


* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
5200d6fd904b2200 device

But when I tried it, it returned this:


List of devices attached

* daemon not running. starting it now on port 5037 *
* daemon started successfully *


So, List of devices attached appeared first and no device was listed.


When I type adb devices again, I get this:


List of devices attached


I have also tried to use sudo adb devices instead of adb devices but the results were the same.



When the ADB would work, I would try to use it for data recovery purposes as described here. Maybe the pull command can do what I want.



Answer



This has solved my problem. I could not turn on USB debugging because the phone was connected to my computer. You have to unplug the phone first, start the USB debugging and plug it back in. Then, adb devices worked.


Friday, December 12, 2014

2.2 froyo - Android market - Application downloading problem


I am accessing an Android market and trying to download Free applications, when i have tried to download any application by clicking on "Install" button.


When i click on "Download" button, it always shows the downloading application with the message : "Starting Download", i am seeing this message since last 2 hours, but application is not getting donwload to my phone.


Whats the problem ?




Answer



This question is redundant: Please see this one for a solution.


Thursday, December 11, 2014

applications - Can I build an APK from an installed app and its data?


I would like to take an installed app, including its data, from a rooted Android device and produce from it an APK suitable for installing on a non-rooted Android device.


Is this possible?


Edit: Existing answers/comments seem to reinforce the idea that existing apps do not support embedding an app's data within an APK. Perhaps the more fundamental question is,can an APK embed files destined for /data/data/[appname], or are they restricted to being self-contained when installed?


Notes:



  • I assumed that, if it were possible, this functionality would be built into an app such as Titanium Backup. Titanium Backup can back up app+data to a single file, but that file is not an APK and can only be restored by Titanium Backup itself - which is no help for me as the destination device is not rooted and so cannot run TB.

  • Solutions that require use of the terminal on the phone or ADB are fine.


Thanks.




Answer



Having now read more about the APK file format, I think I can now safely answer my own question with "it's impossible".


An APK file does not contain a data structure which is "unpacked" on install like the packages used by, for example, most Linux distributions. Instead, an APK is simply a self-contained, rebadged JAR file that contains the application's bytecode, manifest and certificate and nothing else.


The contents of /data/data/[appname] are presumably created by the application code when it is first run (or at some future point), and there is no way of embedding such data into an APK so that the system automatically moves it to the correct destination at install time.


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 ...