***System-image-Upgrader*** - Meizu MX

Look this please: http://people.canonical.com/~alextu/tangxi/share/system-image-upgrader
From the official channel of developing.
Can be an command for rebuild System Image of normal Meizu MX4?

it has connection with ubuntu
{
PARTITION_ROOTFS_SIZE="1500M"
PARTITION_DEVICE_SIZE="350M"
PARTITION_CUSTOM_SIZE="250M"
PARTITION_ROOTFS_FILE="/data/ubuntu-rootfs.img"
PARTITION_DEVICE_FILE="/data/ubuntu-device.img"
PARTITION_CUSTOM_FILE="/data/ubuntu-custom.img"
}

Related

[TOOL]adb extended v1.0.31 / fastboot

Hi Folks,
LINK: adb_fastboot_pi.7z - 1.14 MB
TROUBLE SHOOTING: If you receive the message "No such file or directory" when attempting to run either program you will need to symlink the dynamic linker in your root lib directory or install the hard-float toolchain. I'll probably recompile it to use the standard linker now that I've got "bare-metal" to use
Code:
sudo ln -s /lib/ld-linux.so.3 /lib/ld-linux-armhf.so.3
Here's the new version of adb ( v1.0.31 ) built for the RaspPi, I figure there's no reason the Pi should be a second class citizen when it comes to tools :laugh: and with that in mind I've also built fastboot as well.
My Pi has arrived however I compiled this on Raspbian using qemu, I've built it with FORCE_STATIC_EXECUTABLE := true [ EDIT: Which looking at it now did SweetFA ] and all the android related libraries are statically linked, It should be good to go on any linux pi distro but if you run into problems let me know,
Apart from commenting out the Target Building side of the android build system and only taking the AOSP directories I needed, I decided to keep things simple and leave the individual modules ( libzipfile , libz etc ) intact although building libcutils required a little coercion, probably because I was only building specific modules. It is a lot less of an Hack-Oddity compared to the 1.0.29 Build
This is my own extended version of adb (github sources here ) which contains command line pre-processing, it basically add shortcuts to many adb native and shell commands ( full list below ) and often removes the need for typing the shell keyword altogether. There's some single letter commands and if you symlink the adb executable to just an "a" then you can drop into an adb shell by typing "a s" , because yes, I am that lazy , I've also added lspart as a special treat for Mr Outler .
Apart from the couple of extras I've added it's just a normal adb which comes with the AOSP 4.2.1 code and can be used as such. apart from the remount command which must include the path, but adds the ability to remount more than just the system.
I've think google have fixed the race condition which allowed temp root through backups. They've also added a new dependency to libcrypto, There's probably some other changes but I haven't had a proper route around the code.
I really should master the art of cross compiling, Compiling on the PI took an absolute age, libcrypto especially.
Here's a copy-pasta of the adb shortcuts command_struct, for those that don't read c basically the first column is the shortcut keyword and the last column is the command it will execute. :good:
Code:
struct command_shortcut {
char * short_version;
int token_total;
int process_args;
int is_shell;
char * full_version[MAX_TOKENS];
} shortcuts[] = {
{ "ver",0,COMMAND_HAS_ARGS ,COMMAND_TYPE_ADB,{"version"}},
{ "remount",2,COMMAND_HAS_ARGS ,COMMAND_TYPE_SHELL,{"mount","-orw,remount"}},
{ "dev",1,COMMAND_HAS_ARGS ,COMMAND_TYPE_ADB,{"devices"}},
{ "d",1,COMMAND_HAS_ARGS ,COMMAND_TYPE_ADB,{"devices"}},
{ "kill",COMMAND_HAS_ARGS ,COMMAND_NO_ARGS ,COMMAND_TYPE_ADB,{"kill-server"}},
{ "sh",0,COMMAND_HAS_ARGS ,COMMAND_TYPE_SHELL,{}},
{ "s",0,COMMAND_HAS_ARGS ,COMMAND_TYPE_SHELL,{}},
{ "st",1,COMMAND_HAS_ARGS ,COMMAND_TYPE_SHELL,{"start"}},
{ "ks",1,COMMAND_HAS_ARGS ,COMMAND_TYPE_SHELL,{"stop"}},
{ "dmesg",COMMAND_HAS_ARGS ,COMMAND_NO_ARGS ,COMMAND_TYPE_SHELL,{"dmesg"}},
{ "mount",1,COMMAND_HAS_ARGS ,COMMAND_TYPE_SHELL,{"mount"}},
{ "umount",1,COMMAND_HAS_ARGS ,COMMAND_TYPE_SHELL,{"umount"}},
{ "lspart",1,COMMAND_HAS_ARGS ,COMMAND_TYPE_SHELL,{"mount | grep"}},
{ "uname",2,COMMAND_NO_ARGS ,COMMAND_TYPE_SHELL,{"cat","proc/version"}},
{ "gp",1,COMMAND_HAS_ARGS ,COMMAND_TYPE_SHELL,{"getprop"}},
{ "du",1,COMMAND_HAS_ARGS ,COMMAND_TYPE_SHELL,{"du"}},
{ "df",1,COMMAND_HAS_ARGS ,COMMAND_TYPE_SHELL,{"df"}},
{ "dfh",2,COMMAND_HAS_ARGS ,COMMAND_TYPE_SHELL,{"df","-h"}},
{ "sp",1,COMMAND_HAS_ARGS ,COMMAND_TYPE_SHELL,{"setprop"}},
{ "cat",1,COMMAND_HAS_ARGS ,COMMAND_TYPE_SHELL,{"cat"}},
{ "c",1,COMMAND_HAS_ARGS ,COMMAND_TYPE_SHELL,{"cat"}},
{ "echo",1,COMMAND_HAS_ARGS ,COMMAND_TYPE_SHELL,{"echo"}},
{ "ps",1 ,COMMAND_NO_ARGS ,COMMAND_TYPE_SHELL,{"ps"}},
{ "mv",1,COMMAND_HAS_ARGS ,COMMAND_TYPE_SHELL,{"mv"}},
{ "cp",1,COMMAND_HAS_ARGS ,COMMAND_TYPE_SHELL,{"cp"}},
{ "rm",1,COMMAND_HAS_ARGS ,COMMAND_TYPE_SHELL,{"rm"}},
{ "rmf",2,COMMAND_HAS_ARGS ,COMMAND_TYPE_SHELL,{"rm","-f"}},
{ "symlink",2,COMMAND_HAS_ARGS ,COMMAND_TYPE_SHELL,{"ln","-s"}},
{ "netcfg",1,COMMAND_HAS_ARGS ,COMMAND_TYPE_SHELL,{"netcfg"}},
{ "touch",1,COMMAND_HAS_ARGS ,COMMAND_TYPE_SHELL,{"touch"}},
{ "lsusb",1,COMMAND_HAS_ARGS ,COMMAND_TYPE_SHELL,{"lsusb"}},
{ "mkdir",1,COMMAND_HAS_ARGS ,COMMAND_TYPE_SHELL,{"mkdir"}},
{ "grp",1,COMMAND_HAS_ARGS ,COMMAND_TYPE_SHELL,{"getprop | grep"}},
{ "wp",1,COMMAND_NO_ARGS ,COMMAND_TYPE_SHELL,{"watchprops"}},
{ "chmod",1,COMMAND_HAS_ARGS ,COMMAND_TYPE_SHELL,{"chmod"}},
{ "insmod",1,COMMAND_HAS_ARGS ,COMMAND_TYPE_SHELL,{"insmod"}},
{ "gevt",1,COMMAND_HAS_ARGS ,COMMAND_TYPE_SHELL,{"getevent"}},
{ "sevt",1,COMMAND_HAS_ARGS ,COMMAND_TYPE_SHELL,{"sendevent"}},
{ "lsmod",1,COMMAND_NO_ARGS ,COMMAND_TYPE_SHELL,{"lsmod"}},
{ "pl",1,COMMAND_HAS_ARGS ,COMMAND_TYPE_ADB,{"pull"}},
{ "pu",1,COMMAND_HAS_ARGS ,COMMAND_TYPE_ADB,{"push"}},
{ "wfd",1,COMMAND_NO_ARGS ,COMMAND_TYPE_ADB,{"wait-for-device"}},
// reboot commands, some device specific
{ "recovery",2,COMMAND_NO_ARGS ,COMMAND_TYPE_ADB,{"reboot","recovery"}},
{ "fastboot",2,COMMAND_NO_ARGS ,COMMAND_TYPE_ADB,{"reboot","bootloader"}},
{ "rec",2,COMMAND_NO_ARGS ,COMMAND_TYPE_ADB,{"reboot","recovery"}},
// archos specialness
{ "kdf",1,COMMAND_HAS_ARGS ,COMMAND_TYPE_SHELL,{"kd_flasher"}},
{ "updaterd",1,COMMAND_NO_ARGS ,COMMAND_TYPE_SHELL,{"updaterd"}},
{ "sde",2,COMMAND_NO_ARGS ,COMMAND_TYPE_SHELL,{"reboot_into","sde"}},
{ "into",2,COMMAND_HAS_ARGS ,COMMAND_TYPE_SHELL,{"reboot_into","-s"}},
{ "arec",2,COMMAND_NO_ARGS ,COMMAND_TYPE_SHELL,{"reboot_into","recovery"}},
{ "android",2,COMMAND_NO_ARGS ,COMMAND_TYPE_SHELL,{"reboot_into","android"}},
// samsung download mode
{ "download",2,COMMAND_NO_ARGS ,COMMAND_TYPE_ADB,{"reboot","download"}},
{ "ll",2,COMMAND_HAS_ARGS ,COMMAND_TYPE_SHELL,{"ls","-l"}},
{ "l",2,COMMAND_HAS_ARGS ,COMMAND_TYPE_SHELL,{"ls","-la"}},
{ "lha",2,COMMAND_HAS_ARGS ,COMMAND_TYPE_SHELL,{"ls","-lha"}},
{ "lca",9,COMMAND_NO_ARGS ,COMMAND_TYPE_ADB,{"logcat","-b","system","-b","radio","-b","events","-b","main" }},
{ "lc",1,COMMAND_HAS_ARGS ,COMMAND_TYPE_ADB,{"logcat"}},
{ "temp-root",1,COMMAND_NO_ARGS ,COMMAND_TYPE_SHELL,{"echo 'ro.kernel.qemu=1'>/data/local.prop"}},
{ "un-root",1,COMMAND_NO_ARGS ,COMMAND_TYPE_SHELL,{"echo '#'>/data/local.prop"}},
// Input
{ "key",2,COMMAND_HAS_ARGS ,COMMAND_TYPE_SHELL,{"input","keyevent"}},
{ "tw",2,COMMAND_HAS_ARGS ,COMMAND_TYPE_SHELL,{"input","text"}},
{ "tap",2,COMMAND_HAS_ARGS ,COMMAND_TYPE_SHELL,{"input","tap"}},
{ "swipe",2,COMMAND_HAS_ARGS ,COMMAND_TYPE_SHELL,{"input","swipe"}},
// Activity Manager Startups
{ "vending",6,COMMAND_NO_ARGS ,COMMAND_TYPE_SHELL,{"am", "start","-a" ,"android.intent.action.MAIN","-n","com.android.vending/.AssetBrowserActivity"}},
{ "settings",6,COMMAND_NO_ARGS ,COMMAND_TYPE_SHELL,{"am", "start","-a" ,"android.intent.action.MAIN","-n","com.android.settings/.Settings"}}
} ;
This is great ! As a fun little DIY project you could build a pocket (Semi large pockets that is) size ADB box that is battery powered that you can easily carry around to diagnose phones and preform various hacks (Some what similar to AdamOutler's hackbox but more compact and battery powered), I might be tempted to give this a try when I get some more time on my hands.
Thanks, this is awesome! I was looking for a new reason to use my battery powered kit.
Thanks for this.
But i have a problem with that adb version:
I only get 1 connected device listed. After plugin second device only one device is listed with "adb devices".
If i unplug the first device, "adb devices" shows the second device.
x2on said:
Thanks for this.
But i have a problem with that adb version:
I only get 1 connected device listed. After plugin second device only one device is listed with "adb devices".
If i unplug the first device, "adb devices" shows the second device.
Click to expand...
Click to collapse
I believe this one is a standard adb for the PI although @AdamOutler will be able to confirm that. If that doesn't work properly then the problem's at your end
device shown as offline...
Hi Folks,
I tested the files above and the latest version of the adbOnPi from AdamOutler.
The "adb devices" command shows the serial of the device but it shows up as "offline" not as "device".
seems to be a problem with the whitlisting of the debug host, because i don't get a confirmation dialog on the android device as normal.
I used a Nexus 5 with android 4.4.4
Did anybody have the same problems or could give me a hint?
Thanks!
Hello everybody . I am sorry to ask this but i am very new to everything. Can anyone tell me the sequential steps to download adb on raspberry pi.
Thanks in advance.
Hey guys, i copied adb to bin folder and typed "adb version" it worked. But other commands doesn't work like "adb devices"
it just stucks
Edit: I waited and it said "cannot bind 'tcp:5037'"
**Edit: Okay i solved it...
In console, I typed
"ifconfig lo up"
and it worked..

[FIX][CM11][XPOSED] Fix for Google Camera error on CM11

This Xposed module I made is a workaraound for the "Cannot connect to camera" problem on i9300 CM11 (Don't know if other devices has the same problem. However, the module may work on every device with Google Camera, because of the way it is implemented). I used the "Restart Camera" apk by temasek for some time, but I shortly got tired of making two or three taps every time I had to take a picture, so I kind of "reverse engineered" the temasek's apk and found out that it just kills the MediaServer process. Then, I build an Xposed module to do this automatically every time the user closes Google Camera app. I wrote that in few minutes so I haven't done a lot of testing, but it seem to work fine on my device and I think it can be shared with other users so everybody can get rid of this bug.
INSTRUCTIONS:
Code:
1. Install Xposed Framework (if you don't have it already)
2. Install the APK
3. Enable the module and reboot the device
4. Start Google Camera, wait until it loads the preview, then press the "Back" key to exit. When prompted, grant Google Camera root access for every future requests
5. Enjoy
SOURCE CODE:
Code:
package jager.cmcamerafix;
import java.io.DataOutputStream;
import java.io.IOException;
import static de.robv.android.xposed.XposedHelpers.findAndHookMethod;
import de.robv.android.xposed.IXposedHookLoadPackage;
import de.robv.android.xposed.XC_MethodHook;
import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam;
public class CameraFix implements IXposedHookLoadPackage {
XC_MethodHook mMethodHook = new XC_MethodHook() {
@Override
protected void afterHookedMethod(MethodHookParam param) throws Throwable {
try {
Process su = Runtime.getRuntime().exec("su");
DataOutputStream outputStream = new DataOutputStream(su.getOutputStream());
outputStream.writeBytes("killall mediaserver\n");
outputStream.flush();
outputStream.writeBytes("exit\n");
outputStream.flush();
su.waitFor();
} catch (IOException e) {
throw new Exception(e);
}
}
};
public void handleLoadPackage(final LoadPackageParam lpparam) throws Throwable {
if (!lpparam.packageName.equals("com.google.android.GoogleCamera"))
return;
findAndHookMethod("com.android.camera.CameraActivity", lpparam.classLoader, "onStopTasks", mMethodHook);
}
}
CREDITS:
Code:
- temasek for "Restart Camera" apk
- robv89 for Xposed Framework
@Moderators: I wrote here because I haven't got permissions to write in the Dev section. Sorry.
lollipop compability
This module that can be compatible with android 5.0?
Lollipop
Working great on Lollipop 5.1.1! HUGE THANK YOU
Edited Version for cm13
thanks jagger for your module
i tested it on cm13 rom but it does not work, so i edit it and makes some updates to get it work with cm13 stock camera ( cyanogenmod snap camera )
new version in attachments

[Q&A] [ROM][29Jan][GNU/Linux] Sailfish OS (community port)

[SIZE=+2]This thread has been created
for
Questions & Answers/Troubleshooting[/SIZE]​[SIZE=+2]Specific to[/SIZE]
[ROM][29Jan][GNU/Linux] Sailfish OS (community port)
Click link here>> To jump to Development thread <<Click link here[/COLOR]
Please feel free to share issues, questions and offer help
It is always best to thank a ROM OP, in lieu of simply posting "Thank you".
-----------------------------------------------------------------------------------------------
Hi guys,
i've started a general Q&A thread for n4 and others. Everything related to sailfish and of course n4 can be posted here.
1. Which HW components are working?
A: take a look at the spreadsheet libhybris: https://wiki.merproject.org/wiki/Adaptations/libhybris
2. Can I run my android apps?
A: atm = no. due to licensing issues the dalvik runtime is not included in android ports. Join community efforts in this XDA thread. The jolla phone run android apps.
3. What about playing videos and music
A: new ports with gstreamer1.0 (Nexus 5) play MP3, MP4, H264 out-of-box.
Install gstreamer1.0-libav for more codecs.
For old gst0.10 ports:
MP3: install gst-fluendo-mp3-0.10.23-1.armv7hl.rpm via rpm -i fluendo
Video: Install gst streamer plugins and ultimate codec support. detailed instructions: http://forum.xda-developers.com/showpost.php?p=53552092&postcount=424
4. I'm able to install apps?
A: On Nexus 4 and Nexus 5 yes. But expect glitches because Jolla Store is going under maintenance until Tablet comes out. Known issues:
* "Essential Apps from Jolla" is not visible. Find them one by one via Seach
* Newly added apps might not show up for SFE devices
Alternatively, try Warehouse (openrepos.net):
* Navigate via your phone's browser to https://openrepos.net/content/basil/warehouse-sailfishos
* Download latest RPM
* Either run devel-su pkcon refresh in terminal, or download at least one app from Jolla Store
* Ensure Settings->System->Untrusted software is allowed
* Go to Settings->System->Transfers, click on downloaded file, and it will be installed
5. whatsapp?
A: Beware of WhatsApp temporary banning 3rd party app users. You can try WhatsUp: http://forum.xda-developers.com/showpost.php?p=60264278&postcount=137
Next Mitäkuuluu version is rumoured to be unbannable, lets all wayt
6. How to access the device?
A: Via ssh or sftp. Take a look on @Daycrawler thread: http://forum.xda-developers.com/jolla-sailfish/general/sailfish-android-devices-release-t2696409. He released the ea mail where everything is described.
7. How to install sailfish on my device (other than n4)?
A: You will be able to install when an image is available. Check "Downloadable Image" column in https://wiki.merproject.org/wiki/Adaptations/libhybris .
Porting Sailfish OS by yourself is possible via following the HADK: https://sailfishos.org/hadk
For Nokia N9: http://wiki.maemo.org/Sailfish#Sailfish_Images
9. What about multirom?
A: MultiROM is supported on Nexus 4, Nexus 5, and OnePlus One (possible Nexus 7 too): Follow up: http://forum.xda-developers.com/jolla-sailfish/general/09-06-sailfishos-multirom-how-to-set-t2869096
10. Why I have to flash so much to get sailfish on my device?
mmmmmhhhh. Answer question by yourself and try
E.g. for Nexus 4 please do all steps you'll find in: http://forum.xda-developers.com/nexus-4/development/rom-sailfish-os-community-port-t2969823 . It's necessary to have the right baseband / modem firmware. Maybe wifi won't work if you haven't.
11. How to take a screenshot?
A: Install screenshot app by lbt, from Jolla Store.
A1: This can be done on the phone via terminal and also on a remote SSH PC client.
su-devel grabscreen /home/nemo/Pictures/Test.png
If you need a times then use the 'sleep' command. e.g. below is a timer for 5 seconds.
sleep 5 && grabscreen /home/nemo/Pictures/Test.png
The picture can be accessed in the Gallery or via Filetug.
12. How to get files from/to device, because USB Mass Storage mode and SD card are not available ?
A1: ssh + scp combo (windows[putty] & linux)
This combo is a set of linux standard tools. You can connect to the phone via secure socket shell from your pc and transfer files to your phone and vice versa.
A2: sftp + filezilla (windows & linux)
You can access the files via filezilla. You can transfer files like you're doing with an ftp server.
A3: Gnome Desktop Environment
The gnome filemanager nautilus has an build in option for accessing sftp / ssh servers or devices easily.
A4: WinSCP (windows)
To connect via these methods, enable developer mode, set a new password and take a look what ip you've get. Behind the wlan symbol. Then choose one of the above methods:
username = nemo
password = the one you entered in developer mode section
[ssh]= ssh [email protected]_ip
[filezilla] = sftp://device_ip
[nautilus] = select: Connect to server (on the left side) and enter: ssh://device_ip
13. How can I use the Backup app when there's no (working) SD Card?
A: Launch Settings->System->Backup to save all the settings you want to preserve
Perform
Code:
tar cf $HOME/backup.tar -C $HOME .vault
scp backup.tar onto your PC (other ways of how pull files, see FAQ #12 above)
Install new Sailfish OS.zip, put the tarball back onto device (say at $HOME), then perform:
HTML:
cd $HOME && tar xpf backup.tar
Go to Settings->System->Backup and restore your content from a chosen backup
14. How can I provide another radio.img only for Sailfish OS?
Put radio.img onto Sailfish OS rootfs somewhere safe.
Edit /lib/systemd/system/firmware.mount and replace "What=/dev/mmcblk0p1" with "What=/path/to/firmware.img"
Be careful with that and always do backup (i.e. comment the first What out )
15. How can I skip tutorial?
On first screen, tap on corners in sequence: top-left, top-right, bottom-right, bottom-left
16. How can I mount android's virual sdcard partition (Nexus4,5) with all my goodies?
Try:
Code:
devel-su
mkdir /android
mount /dev/mmcblk0p28 /android
# User data is then available in /android/media/0/
# You can update your fstab file by adding the following line at the end:
/dev/mmcblk0p28 /android ext4 rw,relatime,data 0 0
# And for media to be tracked:
ln -s /android/media/0 /home/nemo/android_sdcard
17. Filemanager?
Install File Browser by Kari from Jolla Store.
For root access add on https://openrepos.net/content/schturman/startasroot-file-browser (See question #4 on how to access openrepos via Warehouse app)
This thread should be a collection for sailfish on devices and I will update frequently if news or tipps & tricks are available.
-----------------------------------------------------------------------------------------------
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Please keep discussion focused, on the topic described in the OP
Arabic Keyboard
Is there a way to enable Arabic keyboard layout in SailfishOS?
Upgrade Sailfish
Today I am upgraded my Nexus 4 to Sailfish OS 1.1.2.16 and I don't noticed any (new) bugs. I done upgrade on fresh install of Sailfish OS 1.1.1.27 from that thread.
Below I will write procedures to successfull upgrade Sailfish from 1.1.1.27 to 1.1.2.16.
[Procedure to add locks - without that camera will not work after upgrade]
[[email protected] ~]$ devel-su zypper al jolla-camera jolla-camera-settings sensorfw-qt5 qt5-qtsensors-plugin-sensorfw
[Fix problem with adaptation0 after upgrade]
[[email protected] ~]$ devel-su zypper al ssu ssu-network-proxy-plugin ssu-vendor-data-jolla
[Change release version to 1.1.2.16]
[[email protected] ~]$ devel-su ssu re 1.1.2.16
[Refresh package list and install updates]
[[email protected] ~]$ devel-su zypper refresh
[[email protected] ~]$ devel-su zypper update
[Accept updates and wait. After update restart your phone]
[Your Nexus 4 should now run Sailfish 1.1.2.16!]
Niyoru said:
Today I am upgraded my Nexus 4 to Sailfish OS 1.1.2.16 and I don't noticed any (new) bugs. I done upgrade on fresh install of Sailfish OS 1.1.1.27 from that thread.
Below I will write procedures to successfull upgrade Sailfish from 1.1.1.27 to 1.1.2.16.
[Procedure to add locks - without that camera will not work after upgrade]
[[email protected] ~]$ devel-su zypper al qt5-qtmultimedia-plugin-mediaservice-gstcamerabin jolla-camera jolla-camera-settings nemo-qtmultimedia-plugins-gstvideotexturebackend sensorfw-qt5
[Change release version to 1.1.2.16]
[[email protected] ~]$ devel-su ssu re 1.1.2.16
[Refresh package list and install updates]
[[email protected] ~]$ devel-su zypper refresh
[[email protected] ~]$ devel-su zypper update
[Accept updates and wait. After update restart your phone]
[Disable repository adaptation0]
[[email protected] ~]$ devel-su ssu dr adaptation0
[Refreshing package list]
[[email protected] ~]$ devel-su zypper refresh
[Your Nexus 4 should now run Sailfish 1.1.2.16!]
Click to expand...
Click to collapse
Thank you for your instruction.. I just have one problem...
I get the below error message when trying to refresh the repositories. Even after doing "zypper clean -a".
"Retrieving repository 'adaptation0' metadata ---------------------------------------------------------------------------------[-]
Timeout exceeded when accessing 'http ://repo.merproject.org/ obs/sailfishos: /testing: /hw:/mako/sailfish_latest_armv7hl/repodata /repomd.xml'."
I'm running sailfish OS with Multirom.
I hope you can help me.
Kind regards,
Edit: I know what the problem is. I have to authenticate but I don't have any credentials. Is there a way how I can register for that repository? Many thanks
That repository probably don't exist for 1.1.2.16.
Try use devel-su ssu rr adaptation0 and devel-su ssu dr adaptation0.
I will try to stop the repo adaptation0 on 1.1.1.27. If I do this I will write here how to fix this repository.
Edit. adaptation0 is a repository for packages like droid-hal, what comunicate with hardware. Now you have installed these packages and Sailfish will work without this repository avaible. However I will try to fix it.
Thanks for feedback.
Niyoru said:
That repository probably don't exist for 1.1.2.16.
Try use devel-su ssu rr adaptation0 and devel-su ssu dr adaptation0.
I will try to stop the repo adaptation0 on 1.1.1.27. If I do this I will write here how to fix this repository.
Edit. adaptation0 is a repository for packages like droid-hal, what comunicate with hardware. Now you have installed these packages and Sailfish will work without this repository avaible. However I will try to fix it.
Thanks for feedback.
Click to expand...
Click to collapse
No, Thank YOU!
I did the update as you proposed, but the UI is not the same as the sailfish 2.0 Hammerhead version. It's probably because of the missing adaptation0 repo and the fact the official images aren't out there, yet.
Thank you for looking at the problem and your time! Let me know if it works
btrdossantos said:
No, Thank YOU!
I did the update as you proposed, but the UI is not the same as the sailfish 2.0 Hammerhead version. It's probably because of the missing adaptation0 repo and the fact the official images aren't out there, yet.
Thank you for looking at the problem and your time! Let me know if it works
Click to expand...
Click to collapse
This will not look like Sailfish 2.0, becouse this is not Sailfish 2.0. This is Sailfish 1.1.2.16, you can read more about that release on Sailfish Website. (Sorry for no links, but I can't put any into post, becouse I have less than 10 posts :c)
sailfish-weather is not found in jolla app store.
When i can get rpm package with weather?)
dimon2242 said:
sailfish-weather is not found in jolla app store.
When i can get rpm package with weather?)
Click to expand...
Click to collapse
If you upgraded Sailfish to 1.1.2.16, you can use command "devel-su zypper install sailfish-weather".
This work for me
Niyoru said:
If you upgraded your Sailfish to 1.1.2.16, you can use just "devel-su zypper install sailfish-weather".
This work for me
Click to expand...
Click to collapse
What is about mp3 codec?
After installing flurence and bad-extras i can't play music(
dimon2242 said:
What is about mp3 codec?
After installing flurence and bad-extras i can't play music(
Click to expand...
Click to collapse
In my phone this one work well: d-h.st/nkS8
Hi all,
we're working on the next official community release. Great you're figured out how to update. But be aware. If a bigger patchset is applied to the kernel this method won't work. But maybe one of you can help us out with a little information if you have upgraded the way from first post. If you open the messages app and looking at the background what do you see? Are there little quarters or or little diamonds?
Thx in advance!
ahoi
carepack said:
Hi all,
we're working on the next official community release. Great you're figured out how to update. But be aware. If a bigger patchset is applied to the kernel this method won't work. But maybe one of you can help us out with a little information if you have upgraded the way from first post. If you open the messages app and looking at the background what do you see? Are there little quarters or or little diamonds?
Thx in advance!
ahoi
Click to expand...
Click to collapse
Definitely little quarters. However I think screenshot can say everythink and I attach one.
Thank you for your interest in this update solution.
I hope that you will be able to make stable build for Nexus 4
Browser is closed if i play online music or youtube video!
Hope, what this will be fixed in next update!)
Niyoru said:
Definitely little quarters. However I think screenshot can say everythink and I attach one.
Thank you for your interest in this update solution.
I hope that you will be able to make stable build for Nexus 4
Click to expand...
Click to collapse
We're doin' our best :fingers-crossed:! Hope you enjoy the beloved sailfishos and thank you for sharing the information about quarters or not!
ahoi
Bug - Untrusted software installation
I am now running on v1.1.2.16 based on the tutorial provided in the thread (thanks Niyoru) and would like to report a bug.
I went into Setting -> System -> Untrusted software
and enabled "Allow untrusted software" option in there. However, I can't install any .rpm files. When I go back into settings, the setting is disabled. Not sure if this is caused by the upgrade or is also a problem in v1.1.1.27 as well in the Nexus 4 port.
The workaround was to go into terminal, do a devel-su and typing in:
zypper in package.rpm
Hope this helps...
PS. Looking forward to this build having the "Sailfish OS Updates" working instead of a manual upgrade process. Happy sailing! :fingers-crossed:
Installing sailfish via multirom with over kitkat primary rom
Hi. ive read all the posts i can find. Any pointers
Running up to date multirom on nexus 4 v31
Kitkat primary (beanstalk)
Lollipop secondary (Tamasek)
Downgraded kitkat radio from .98 to .84 to allow me to install sailfish
Downloaded Cm 10.1.3 and sailfish 1.1.2.16 beta 4
Installed both using sailfish "add rom" multirom option
All i get is bootloop after choosing sailfish from multirom list. Get to "google" screen and then it reboots back to multirom selection , Cant get past Google
Checked md5s, tried 4 or 5 times now
reread threads etc
Am i missing anything obvious..??
Any suggestions?
Updated to v1.1.4.28 and all seems fine thus far...
Looks like latest update is screen resolution aware.
Sent from my Note 2 using Tapatalk...
mikerog said:
Hi. ive read all the posts i can find. Any pointers
Running up to date multirom on nexus 4 v31
Kitkat primary (beanstalk)
Lollipop secondary (Tamasek)
Downgraded kitkat radio from .98 to .84 to allow me to install sailfish
Downloaded Cm 10.1.3 and sailfish 1.1.2.16 beta 4
Installed both using sailfish "add rom" multirom option
All i get is bootloop after choosing sailfish from multirom list. Get to "google" screen and then it reboots back to multirom selection , Cant get past Google
Checked md5s, tried 4 or 5 times now
reread threads etc
Am i missing anything obvious..??
Any suggestions?
Click to expand...
Click to collapse
You got to use cm10.1.3 as primary ROM, too.
ajack2001my said:
Updated to v1.1.4.28 and all seems and fine thus far...
Looks like latest update is screen resolution aware.
Click to expand...
Click to collapse
Did you update via OTA? Does it work now?
Hello, I'm buying a N4 today and am happy to join the community. I love Sailfish OS.
Regards
keenofhiphop said:
Did you update via OTA? Does it work now?
Hello, I'm buying a N4 today and am happy to join the community. I love Sailfish OS.
Regards
Click to expand...
Click to collapse
Yes, I update OTA using a combination of ssu and zypper commands... I guess it also helps that my account allows me to use early release software.

[Tutorial] Manage System Permissions in Android Marshmallow

Hello,
I create that thread to offer you a new tutorial aiming to learn how to manage System Permissions in Android Marshmallow. You can discover the tutorial in video also :
Manage System Permissions on Android 6 Marshmallow
Beginning in Android 6 Marshmallow, users grand permissions to apps while the app is running, not when they install the app. This approach gives the user more control over the app's functionality. Thus, he can choose to give the access to read contacts but not to the device location. Furthermore, users can revoke the permissions at any time, by going to the app's Settings screen.
Note that system permissions are divided into two categories : normal and dangerous. Normal permissions are granted automatically. For dangerous permissions, the user has to give approval to your application at runtime. So, developers must manage permissions at runtime before using some dangerous features.
To manage permissions inside an application, we're going to imagine we want to read contacts. This feature will use the READ_CONTACTS permission that is marked as dangerous. So, the first step is to check for READ_CONTACTS permission. If the permission has already been granted, you can use the feature that read contacts. If not, you have to request for permissions with a custom request code that will be named MY_PERMISSIONS_REQUEST_READ_CONTACTS in our example.
Code:
if (ActivityCompat.checkSelfPermission(this, Manifest.permission.READ_CONTACTS)
!= PackageManager.PERMISSION_GRANTED) {
ActivityCompat.requestPermissions(this,
new String[] { Manifest.permission.READ_CONTACTS },
MY_PERMISSIONS_REQUEST_READ_CONTACTS);
} else {
readContacts();
}
Note that when your application requests for permissions, the system shows a standard dialog box to user that cannot be customized. Now, you need to handle the permissions request response by overriding the onRequestPermissionsResult method :
Code:
@Override
public void onRequestPermissionsResult(int requestCode,
@NonNull String[] permissions, @NonNull int[] grantResults) {
switch (requestCode) {
case MY_PERMISSIONS_REQUEST_READ_CONTACTS :
if (grantResults.length > 0
&& grantResults[0] == PackageManager.PERMISSION_GRANTED) {
readContacts();
} else {
if(ActivityCompat.shouldShowRequestPermissionRationale(this,
Manifest.permission.READ_CONTACTS)) {
new AlertDialog.Builder(this).
setTitle("Read Contacts permission").
setMessage("You need to grant read contacts permission to use read" +
" contacts feature. Retry and grant it !").show();
} else {
new AlertDialog.Builder(this).
setTitle("Read Contacts permission denied").
setMessage("You denied read contacts permission." +
" So, the feature will be disabled. To enable it" +
", go on settings and " +
"grant read contacts for the application").show();
}
}
break;
}
}
Like you can see, managing permissions in your Android application is not really hard.
Don't hesitate to give me your feedbacks or ideas for new tutorials.
Thanks.
Sylvain
Nice Tutorial.
Keep them coming
Black_Eyes said:
Nice Tutorial.
Keep them coming
Click to expand...
Click to collapse
Thanks
Hello,
The tutorial is now also available on my blog : http://www.ssaurel.com/blog/manage-permissions-on-android-6-marshmallow/ .
Don't hesitate to give me your advice and ideas for future tutorials.
Thanks.
Sylvain
They were intimidating at first but once you do it once, you've pretty much got the hang of it.
Jay Rock said:
They were intimidating at first but once you do it once, you've pretty much got the hang of it.
Click to expand...
Click to collapse
True. When you understand the mechanism, it becomes simple to use permissions in your Android code.
Christie37 said:
As I'm new mobile developer this tutorial helped me lot. Thanks keep going!!
Click to expand...
Click to collapse
Great . I made some other tutorials that could be interesting for you. Don't hesitate to look at them
Thanks man awsome
nice bro
@DSttr said:
nice bro
Click to expand...
Click to collapse
Thanks
@sylsau Thanks..
BTW, does this work properly on Android 5.1.1 and below?
I mean, what does this below code do for 5.1.1 and below? :
Code:
ActivityCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED)
Does it always return true, or is there a chance of exceptions or errors?
I'm asking this because I don't have Android Device below 5.1 to test it..
Or should I wrap it up like this:
Code:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
requestPermissions();
}

[GSI][arm64] Ubuntu Touch (ubports) [DRG/B2N/PL2]

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Code:
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/
What is Ubuntu Touch?
Ubuntu Touch is the touch-friendly mobile version of Ubuntu.
This operating system is developed and maintained by UBports: An international community of passionate volunteers.
This means Ubuntu Touch is 100% community driven and independent.
What is Halium?
Halium is the collaborative project to unify the Hardware Abstraction Layer for projects which run GNU/Linux on mobile devices with pre-installed Android.
How it is a GSI?
First of all, I should mention ubports GSI definition is different from android, but both are generic.
ubports root file system was always generic and works for most cases, but devs were porting halium system image to add device-specific (HALs and configs) support to ubports Android container.
But after project treble which introduced in android 8, all device-specific parts of android system image moved to vendor partition and we can use "Generic system images" over one vendor partition.
In halium version 9, we use this adventure and have a totally generic system image + root file system.
Requirements:
The only Requirement of booting this GSI is having Halium patched kernel.
Keep in mind having android 9 firmware installed on the device as GSI base is mandatory (GSI can be used on android 8.0 and 8.1 vendors but experimental and not supported yet)
How to install?
1. Boot TWRP and FORMAT data
2. Flash vendor image and halium-boot.img (Halium-boot.img confirmed working on DRG and PL2, B2N needs testing)
3. Flash GSI installer zip
4. Reboot
Note: if the device is stuck on the splash screen on boot, simply force reboot using the power/volume button combo meant for your device
Download:
GSI - built by @mrcyjanek (download ONLY target.zip)
Vendor images
Halium-boot
Whats suppose to work?
Bluetooth
Camera
Cellular Radio
Mobile Data
GPS
Graphics
Sensors
Sound
In-call Audio
Touch
Wifi
Vibration
Anbox
Media Playback
Known bugs?
Random (but rare) BSOD + reboots
no way to unlock using Fingerprint
Touching Fingerprint sensor can reduce media volume
oh and of course VoLTE
Camera (on B2N)
Supports:
Halium telegram group
UBports telegram group
UBports Porting telegram group
ErfanGSIs telegram group
Report Bugs:
Explain your bug in proper support telegram groups (from above)
Please don't ask about spoon-feeding or helping on building kernel or device specific builds.
Please don't ask about picking/reverting commits or any basic git commands.
bug reports without logs will be ignored
logs we need are: android logcat, kernel log, syslog
kernel log:
Code:
dmesg
syslog:
Code:
cat /var/log/syslog
logcat:
Code:
sudo -s
LD_LIBRARY_PATH=/system/lib64 lxc-attach -e -n android -- /system/bin/logcat
Taken with all due respect from Erfan's Thread
Appendix:
Anbox installation guide (by SevralTi on Github)
Code:
sudo mount -o rw,remount /
sudo apt update && sudo apt install -y anbox-ubuntu-touch android-tools-adb
mkdir ~/anbox-data
wget http://cdimage.ubports.com/anbox-images/android-armhf-64binder.img -O ~/anbox-data/android.img
touch ~/anbox-data/.enable
sudo chmod -R o+wrx /home/phablet/anbox-data/data
sudo start -q anbox-container
reboot, wait 2 minutes the reboot again
To symlink anbox files to system:
ln -s ~/anbox-data/data/media/0/Documents ~/Documents/android
ln -s ~/anbox-data/data/media/0/Pictures ~/Pictures/android
ln -s ~/anbox-data/data/media/0/Music ~/Music/android
ln -s ~/anbox-data/data/media/0/Movies ~/Videos/android
To make the QS panel occupy the whole screen, install UT Tweak Tool from the Open Store and increase device display scaling
Libertine containers can't be created from the settings app for now. To create a container, pass the command "TMPDIR=/tmp" in the terminal and follow documentation here
IMPORTANT
I take NO credit for the UBPorts community. All that I've simply done is patch our kernel to make it compatible.
Default password is "phablet" (without the quotes)
If you like my work, consider buying me a coffee and join our telegram groups
Cheers,
Sid
I would like to offer a special thanks to a bunch of people who've been with me through this ridiculous journey of mine:
@Sahil_Sonar - for all the help and advice he's given
@krushndayshmookh - for being a generally sweet guy and looking out for me
@CarbonGTR and @Nikhilkumar038 - for being solid friends and motivators throughout my struggle
@Catharsis007 - for being best boi
@ArcherTanu - for being extremely helpful
The UBPorts community
EVERYONE who's worked on the LOS sdm660 Kernel
and a special unnamed best friend who helped me power through the last couple of months.
Cheers,
Sid
Wonderful Work!! GBU!!
Pru
Updated #1 with a new GSI link that doesn't have the reduced storage bug
Awesome work!!! (though I can't try it out--I have a PL2)
Vedanth Padmaraman said:
Awesome work!!! (though I can't try it out--I have a PL2)
Click to expand...
Click to collapse
You can! Our kernel sources are unified and known to work on all 3 devices, DRG, PL2, and B2N
I've listed the bugs specific to DRG only because I own only a DRG, but in theory, you should be able to flash this on PL2 or B2N as well
Ok! Installing it soon
It works on the PL2, encountered nothing broken so far :good:. I received an SMS, downloaded some stuff, etc (but haven't tried calling yet). Once in while it does hang with a black screen while booting, but simply holding Vol. up + Power to force-restart does the trick, like mentioned in the OP. Set up whatsapp successfully on Anbox, but graphics on any anbox app are jerky and laggy at times, in a manner similar to that of the anbox installation on my Linux Mint, so this doesn't seem to be an issue pertaining to this GSI/Halium port. Still, would be nice to have an improvement
Updated kernel to fix media playback. Download from link in OP
Oh looks like really interesting. I'm downloading now. I'll test this for a few days. Question: It isn't Android totally. It's Ubuntu yes? Does it meant that other OS's can be ported as well like HarmonyOs? If that's true how it is can be ported.
SamandaR1112 said:
Oh looks like really interesting. I'm downloading now. I'll test this for a few days. Question: It isn't Android totally. It's Ubuntu yes? Does it meant that other OS's can be ported as well like HarmonyOs? If that's true how it is can be ported.
Click to expand...
Click to collapse
It isn't Android, it isn't exactly Ubuntu Desktop either. Canonical was working on Ubuntu Touch/Ubuntu Phone until 2017, and after they dropped the project, the UBports community was born and carried it forward. I'm not sure about HarmonyOS
#1 updated with halium-boot.img (confirmed working on DRG and PL2, B2N needs testing), new flashing method added
Which flashing method is prefered? Anybody who can tell a little on how it is in use? (Does it feel snappy or any lags)
Just about to flash to my B2N. The file B2N####-vendor.img needs to be set to a partition. "Select partition to flash image". I'm guessing boot or system, but honestly I have no idea. help?
---------- Post added at 11:43 AM ---------- Previous post was at 11:32 AM ----------
So.. I'm not exactly known for my patience.. Using method 1 I flashed the vendor image to system image, and boot image to boot partition. then changed to zip and flashed gsi. Twrp prompted me to install official twrp app, I was curious to see if it would work so I chose to do so. Then reboot turned me into a bootloop...
n00bDroid said:
Just about to flash to my B2N. The file B2N####-vendor.img needs to be set to a partition. "Select partition to flash image". I'm guessing boot or system, but honestly I have no idea. help?
---------- Post added at 11:43 AM ---------- Previous post was at 11:32 AM ----------
So.. I'm not exactly known for my patience.. Using method 1 I flashed the vendor image to system image, and boot image to boot partition. then changed to zip and flashed gsi. Twrp prompted me to install official twrp app, I was curious to see if it would work so I chose to do so. Then reboot turned me into a bootloop...
Click to expand...
Click to collapse
Code:
fastboot flash vendor <B2N####-vendor.img>
fastboot flash boot halium-boot.img # NOT B2N-0-354H-00WW-boot.img
Let the keyword "vendor" in <B2N####-vendor.img> serve as a reminder that it is meant to be flashed to the vendor partition.
Vedanth Padmaraman said:
Code:
fastboot flash vendor <B2N####-vendor.img>
fastboot flash boot halium-boot.img # NOT B2N-0-354H-00WW-boot.img
Let the keyword "vendor" in <B2N####-vendor.img> serve as a reminder that it is meant to be flashed to the vendor partition.
Click to expand...
Click to collapse
Immidiately after my post I made the same realization that vendor.img = vendor partition. So I did that, and it still didn't work.. But then again, I actually flashed B2N-0-354H-00WW-boot.img because I hadn't seen the halium-boot
So I went again. Now according to recipe. Then reboot system..I've been stuck on the "AndroidOne" logo for 15 minutes....after a forced reboot I see the Ubuntu Touch logo!!! thank you!
Camera isn't working. Any tips?
i did not thank you @Sid127 ! That's done !
Sorry for the recent inactivity
n00bDroid said:
Camera isn't working. Any tips?
Click to expand...
Click to collapse
I notice you're on B2N... System logs would be helpful from when you're trying to use the camera. That'd be the dmesg. Without that, I can't be of much help.

Categories

Resources