Image not showing in emulator but showing in my phone - Android Studio

Hi
Please help me
I am using SubsamplingScaleImageView to show an zooming image
when running the program in the emulator it is not showing the image
but when running in my phone it is showing it
what can be the issue ???
this is the xml code
<com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView
android:id="@+id/scale_image"
android:layout_width="match_parent"
android:layout_height="match_parent" />
this is the Kotlin code
var image = view.findViewById(R.id.scale_image)as SubsamplingScaleImageView
image.setImage(ImageSource.resource(R.drawable.my_image))

Related

[Q] UMS/USB mass storage for external SD in TWRP or while booted?

I've searched the forum but for the first time RTFM-ing has failed me. Is there anyway to get the phone into UMS mode either in recovery or while booted?
I've already tried the
Code:
adb pull /system/framework/framework-res.apk........... android:allowMassStorage="true"
trick (which worked on my last phone but didn't work this time. Also in TWRP 2.6.1.0 the mount usb storage option isn't working.
Any help would be appreciated.
A bit more info...
Just a few more details; I'm running OliverG96's cm-10.1-20130825-UNOFFICIAL-golden ROM from this thread for the i8190n. And the framework mod i tried was this one but it had two line that looked like this
Code:
<storage android:mountPoint="/storage/sdcard0" android:storageDescription="@string/storage_internal" android:primary="true" android:emulated="true" android:mtpReserve="100" />
<storage android:mountPoint="/storage/sdcard1" android:storageDescription="@string/storage_sd_card" android:primary="false" android:removable="false" />
instead of just the one that i expected.

[Q] Does ez-unlock apk really unlock my att n900a note 3 or is it a load of baloni

I used ez-unlock apk and I press unlock then for a quick second it tells says that was easy and a message appears for a second saying your bootloader is successfully unlocked...Idk if that's true or not because Idk any way how to see if it's unlocked or not... someone who might know how should check it out and see if it's true or fake and is just lyeing to me like I think it is...
Where did you get this apk?
With this being the manifest inside the APK. I'm going to say um no. Internet access needed?
Code:
<manifest package="com.mmmeff.ez.unlock" versionCode="3" versionName="1.2">
<uses-permission name="android.permission.WRITE_EXTERNAL_STORAGE">
</uses-permission>
<uses-permission name="android.permission.INTERNET">
</uses-permission>
<uses-permission name="android.permission.ACCESS_NETWORK_STATE">
</uses-permission>
<uses-sdk minSdkVersion="14" targetSdkVersion="15">
</uses-sdk>
<application icon="resource_id:0x7f020001" label="EZ-Unlock" theme="resource_id:0x7f070000">
<activity screenOrientation="1" label="resource_id:0x7f060003" name=".MainActivity">
<intent-filter>
<action name="android.intent.action.MAIN">
</action>
<category name="android.intent.category.LAUNCHER">
</category>
</intent-filter>
</activity>
<activity configChanges="4016" name="com.google.ads.AdActivity">
</activity>
</application>
</manifest>
To my knowledge this was used for galaxy s3 unlocking.
Sent from my SAMSUNG-SM-N900A using Tapatalk
If you have not rebooted yet you will likely want to revert what you did before rebooting using DD commands. Otherwise you just loaded the aboot zone from a Verizon S3 device to your Note 3. Rebooting could likely result in a dead boot scenario. The app reports success as it's only smart enough to know the file was dumped according to syntax.
Sent from my SAMSUNG-SM-N900A using XDA Premium 4 mobile app

[Solved] Unable to lift KitKat write to SD restrictions (Xperia V)

Hi,
Xperia V here on CM11, Android 4.4.4. (Version 11-20150301-UNOFFICIAL-tsubasa, released by FreeXperia)
To my surprise, writing to SD0 (internal) and SD1 (external) is not possible. I've got a camera app asking me to insert an SD card before taking pictures.
I tried two apps that supposedly fix this problem, to no avail.
I tried editing /system/etc/permissions/platform.xml myself, but get an error every time I try to save changes to it. I even tried setting rw-/r–/r– permissions on this file and all parent folders. No dice. (Tried all this using ES File Explorer with root access.)
Looking at platform.xml, this entry is OK:
Code:
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
<group gid="media_rw" />
</permission>
But this one is missing <group gid="sdcard_rw" />
Code:
<permission name="android.permission.WRITE_MEDIA_STORAGE" >
<group gid="media_rw" />
</permission>
Can anyone help me, please?
Alternatively, if anyone knows of a STABLE rom that is free of Google's BS restrictions, I'd be happy to flash it instead.
EDIT: Come to think of it, I have used this exact rom before without having this problem. What else could be wrong?
Well, I just flashed a different rom (latest official CM11 snapshot) and the problem is still there. Any ideas on what is causing it?
Amplifiction said:
Well, I just flashed a different rom (latest official CM11 snapshot) and the problem is still there. Any ideas on what is causing it?
Click to expand...
Click to collapse
Did you format your internal memory? You should check which user/group is owning /mnt/media_rw/sdcard0 and sdcard1...
http://forum.xda-developers.com/showthread.php?t=2794704
Antiga Prime said:
Did you format your internal memory? You should check which user/group is owning /mnt/media_rw/sdcard0 and sdcard1...
http://forum.xda-developers.com/showthread.php?t=2794704
Click to expand...
Click to collapse
I formatted everything my recovery allowed me to format (including internal memory) and then flashed a CM12 port. Problem gone! Thanks.
I used @WhiteNeo 's CM12 Apr 05 build, found here.

Moto X Dev Edition stuck in fastboot, cant flash any images

Ok so I have a moto x dev edition (2013) with verizon. I had the bootloader unlocked on android 4.4.4 then relocked the bootloader and updated to 5.1 recently. I decided I wanted my root permissions again so i unlocked the bootloader and rooted on 5.1. I then downloaded 2 conflicting emoji switching apps from the play store which caused every app that uses the keyboard (which had emojis) to crash. I went to settings and clicked reset but it would then crash. So i went into fastboot mode and tried to follow the same steps which i used to reset and lock the bootloader before. http://forum.xda-developers.com/moto-x/general/noob-guide-unroot-relock-bootloader-vzw-t2571786 This was what i followed. I got an error on some of the first few steps but i continued entering the commands anyway (being the complete idiot that i am). So at the end i realized i couldn't boot into anything. (Normal powerup, recovery, factory, or BP Tools). When i power it off and turn it back on it says
downgraded security version
update gpt_main version failed
Failed to hab check for gpt_backup: 0x35
CID Read Failure
Invalid CID status 0x69
CustomerID error. Contact Dealer: 0xdead
That last part scared me.
So anyway i found this video https://www.youtube.com/watch?v=aYjzD9WZum0 where the guy had the same problem (although its in spanish). I followed the steps he took which were as far as i can tell, in case you don't want to watch the video, to enter the bootloader by way of pressing the volume down key during boot. He circled that in red so I assume its important. Then he went onto RSD Lite and selected an xml filed called Repair_Boot.xml which when i opened with notepad contained this.
<?xml version="1.0"?>
<flashing>
<header>
<phone_model model="Motorola" />
<software_version version="Flash Boot" />
<interfaces>
<interface name="AP" />
</interfaces>
</header>
<steps interface="AP">
<step operation="oem" var="fb_mode_set" />
<step operation="flash" partition="partition" filename="gpt.bin" />
<step operation="flash" partition="motoboot" filename="motoboot.img" />
<step operation="oem" var="fb_mode_clear" />
</steps>
</flashing>
When i tried flashing the gpt.bin partition and motoboot.img previously it didn't work and it gave me the error message:
downgraded security version
update gpt_main version failed
preflash validation failed for GPT
But anyway i couldnt even get my phone to pop up in the RSD Lite program. I restarted, ran in administrator mode and used different usb cables and ports on my laptop, as well as an entirely different computer. I installed ADB drivers too and tried different versions of the RSD program. My laptop usually told me USB device not recognized a few times but the phone does appear in device manager as 'Mot Single ADB Interface' under 'ADB Interface'
So yeah thats about it. I assume the main priority would be to get the RSD program to recognize my device. Sorry this was so long but i figure better too much detail than too little.
There are many of us in the same boat. I'll try to keep you updated if I find a solution.
http://forum.xda-developers.com/moto-x/moto-x-qa/moto-x-dev-edition-stuck-fastboot-t3457945
Issue was resolved here for anyone with a similar issue.

Building stable/CM-13 for N00Bs

Given how hard it is to find build instructions around here and once you find some that work and are easy to follow you realize they are buried at least on page 9 or later..
I thought I'll make a thread that guides the user in a simple step by step manner from setting up a VM to finishing the CM 13 build.
A thread that will provide all the needed information in the very first post and where thinking is only optional while following the instructions.
But don't worry I will also include some explanations as far as I think to understand the whole matter myself.
==================================================
So lets start first we need to have a machine on which we want to compile. The CM guide https://wiki.cyanogenmod.org/w/Build_for_oneplus3 is not wrong as far as I could tell but it omits crucial steps.
For example it does not tell you where to get the required openjdk-7-jdk as well as some other thinks I will elaborate later on.
The easiest way to get a machine ready to build CM is to download a image of http://bbqlinux.org/
So Step 1.) download https://sourceforge.net/projects/bbqlinux/files/x86_64/bbqlinux-2016.06.19-x86_64-mate.iso/download and install it. It comes with all the pre requirements for building cm13 already installed and it even contain vmware tools (and possibly other VM integration) out of the box.
It has all the right java version android studio, all the libraries and even the repo tool installed.
You can almost right away start with step 2 you only need to config git,y taping the following two commands in a terminal window
Code:
git config --global user.email "[email protected]"
git config --global user.name "me"
==================================================
The Step 2.) is getting a copy of CM sources on the machine.
Create a folder where you want the sources to reside for example ~/Android/cm-13.0 but really it can be any folder you have write permissions to. Than you cd into that folder and initialize the source repository.
Code:
repo init -u https://github.com/CyanogenMod/android.git -b stable/cm-13.0-ZNH5Y
This will prepare you for obtaining the sources of a stable build marked as ZNH5Y if you want an other build just go to https://github.com/CyanogenMod/android and browse through the available brunches so for example to build the latest nightly you would use: "-b cm-13.0" instead of "-b stable/cm-13.0-ZNH5Y"
This call creates a hidden sub folder inside your current directory ".repo"
==================================================
Now we are set up to download the generic cm-13 sources but first we need to add customizations for our specific device. This is done by adding a *.xml file to "./.repo/local_manifests" the default name is roomservice.xml but the cm guide says the name does not meter so you could call it whatever.xml and it should work also.
So Step 3.) add roomservice.xml to "./.repo/local_manifests/", a working one is
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="CyanogenMod/android_device_oppo_common" path="device/oppo/common" remote="github" />
<project name="CyanogenMod/android_device_qcom_common" path="device/qcom/common" remote="github" />
<project name="TheMuppets/proprietary_vendor_oneplus" path="vendor/oneplus" remote="github" />
<project name="CyanogenMod/android_device_oneplus_oneplus3" path="device/oneplus/oneplus3" remote="github" />
<project name="CyanogenMod/android_kernel_oneplus_msm8996" path="kernel/oneplus/msm8996" remote="github" />
<project name="CyanogenMod/android_vendor_nxp-nfc_opensource_Nfc" path="vendor/nxp-nfc/opensource/Nfc" remote="github" />
<project name="CyanogenMod/android_vendor_nxp-nfc_opensource_frameworks" path="vendor/nxp-nfc/opensource/frameworks" remote="github" />
<project name="CyanogenMod/android_vendor_nxp-nfc_opensource_libnfc-nci" path="vendor/nxp-nfc/opensource/libnfc-nci" remote="github" />
</manifest>
With the file in place we can download the sources, just execute
Code:
repo sync
An alternative to creating a local manifest would be, after you have synced without a own local_manifest file, to run
Code:
source build/envsetup.sh
breakfast oneplus3
This should build a similar roomservice.xml on its own. Ho weever this would be missing some key files namely TheMuppets/proprietary_vendor_oneplus this repo provides OEM blobs which are required for CM to build.
The CM guide advises you how to get those blobs from a phone that already runs CM13 but that is IMHO very not elegant as you have to flush your device with some one else CM build only to get a few files which you can easily download of the internet.
You can run "repo sync" without a roomservice.xml than the "breakfast oneplus3" as described above, don't forget envsetup, and once it finished downloading he additional repositories you can add the following line to the created ./.repo/local_manifests/roomservice.xml
Code:
<project name="TheMuppets/proprietary_vendor_oneplus" path="vendor/oneplus" remote="github" />
and resync the repo by executing
Code:
repo sync --force-sync
==================================================
Now after the sync we have all we need to build CM on our HDD, and we can start the build process.
if you want to speed up later build processes you can add "export USE_CCACHE=1" to your ~/.bashrc file, for example using "nano ~/.bashrc" and than executing "prebuilts/misc/linux-x86/ccache/ccache -M 50G" after having synced your repo, you don't have to re do it after each sync later.
So Step 4.) type the following commands in your terminal window
Code:
source build/envsetup.sh
brunch oneplus3
If you have a problem with the build (eider it fails or it builds but the binary does not work) possibly after changing some source files or repositories, you should run "make clobber" just before running "brunch oneplus3"
==================================================
And that is it once it finishes you should have a cm-13 zip ready to be flashed.
reserved
reserved 2
Waoh thank you. I've got quite a potentially fast machine for building at home and always wanted to try this out. Very helpful.
Sent from my ONEPLUS A3000 using XDA-Developers mobile app
I have improved the guide a bit removing some unnecessary things and adding soem explenations and alternatives to spep 3
Hello ! I'm trying to build cm14.0 with official sources and TheMuppets vendor, but I get an error at the begining of the build. Anyone has an idea (this is my first build, please be patient). Here is da output
after brunching, in the attached log.txt. I use jdk 1.8.

Categories

Resources